@spotto/contract 1.0.70-alpha.27 → 1.0.70-alpha.28
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 +83 -83
- package/dist/assets/get/query.js +2 -2
- package/dist/assets/get/response.d.ts +6 -6
- package/dist/assets/get/response.js +2 -2
- package/dist/assets/index.d.ts +11 -11
- package/dist/assets/index.js +27 -27
- 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/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/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 +24 -24
- package/dist/events/constants.js +53 -53
- 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 +160 -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 +24 -24
- 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 +22 -22
- 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 +23 -23
- package/dist/fields/constants.js +41 -41
- 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 +18 -18
- package/dist/fields/post/request.js +8 -8
- 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 +127 -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 +253 -253
- 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 +54 -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 +27 -27
- 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/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 +5 -5
- package/dist/types/index.js +21 -21
- package/dist/types/post/index.d.ts +2 -2
- package/dist/types/post/index.js +18 -18
- package/dist/types/post/request.d.ts +98 -98
- package/dist/types/post/request.js +24 -24
- 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 +12 -12
- 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 +35 -35
- 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 +11 -11
- 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/constants.d.ts +2 -2
- package/dist/users/constants.js +4 -4
- package/dist/users/current.d.ts +67 -67
- 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 +121 -98
- package/dist/users/home-layout/shared.js +20 -20
- package/dist/users/index.d.ts +8 -8
- package/dist/users/index.js +24 -24
- package/dist/users/invites.d.ts +19 -19
- package/dist/users/invites.js +2 -2
- package/dist/users/password-reset.d.ts +26 -26
- 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 +19 -19
- 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,318 +1,318 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.semanticQuerySortFields = exports.semanticQueryViewTypes = exports.SEMANTIC_QUERY_VERSION = exports.SEMANTIC_QUERY_LIMITS = exports.semanticConditionTypes = exports.semanticConditionTypesByEntity = exports.semanticReaderConditionTypes = exports.semanticSnapshotConditionTypes = exports.semanticEventConditionTypes = exports.semanticLocationConditionTypes = exports.semanticAssetConditionTypes = exports.semanticGroupConditionTypes = exports.semanticReadinessLevels = exports.semanticTelemetryFields = exports.semanticSetOperators = exports.semanticComparisonOperators = exports.semanticTimestampOperators = exports.semanticFieldOperators = exports.semanticRelativeDatePositions = exports.semanticRelativeDateBases = exports.semanticQueryVisibilities = exports.semanticQueryKinds = exports.semanticQueryEntityTypes = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* SEMANTIC QUERIES — the portable query language.
|
|
6
|
-
*
|
|
7
|
-
* A semantic query is a JSON list of typed conditions (ANDed together, nestable
|
|
8
|
-
* with and/or groups) over one entity type. Three parties speak this contract —
|
|
9
|
-
* the client filter UI that builds conditions, the LLM that generates them, and
|
|
10
|
-
* the server compiler that executes them — so this file is the single
|
|
11
|
-
* vocabulary all three encode.
|
|
12
|
-
*
|
|
13
|
-
* THE CLOSED-VOCABULARY RULE. Condition types, operators AND property names are
|
|
14
|
-
* closed sets: validation rejects an unknown property rather than ignoring it,
|
|
15
|
-
* at every level. This is not defensive tidiness — an LLM once invented a
|
|
16
|
-
* `"negate": true` property; ignoring it compiled NOT(X) as X, a query that ran
|
|
17
|
-
* successfully and returned exactly the complement of what was asked. Every
|
|
18
|
-
* defect class this design guards against fails SILENTLY (valid query, wrong
|
|
19
|
-
* rows), which is why an honest rejection always beats a plausible guess.
|
|
20
|
-
*
|
|
21
|
-
* There is deliberately NO general negation (no `not` group, no invertible
|
|
22
|
-
* flag). Expressible negatively: `notExists`, `ne`, `geolocation.exists:false`,
|
|
23
|
-
* `kit.isMember:false`. Anything else must surface as a validation issue,
|
|
24
|
-
* never an approximation.
|
|
25
|
-
*
|
|
26
|
-
* Descends from the G2G Chat prototype (see g2g-client
|
|
27
|
-
* `docs/semantic-query-decisions.md` while it lives, folding into
|
|
28
|
-
* TECHNICAL_DECISIONS.md) and the semantic-query specification errata.
|
|
29
|
-
*/
|
|
30
|
-
// --- Entity + record kind -------------------------------------------------
|
|
31
|
-
/**
|
|
32
|
-
* What a semantic query targets. All but `manifest` execute; it is recorded so
|
|
33
|
-
* the classifier can name what it is declining, and so a stored query would
|
|
34
|
-
* never need retrofitting if it ever learns to speak.
|
|
35
|
-
*/
|
|
36
|
-
exports.semanticQueryEntityTypes = [
|
|
37
|
-
'asset',
|
|
38
|
-
'location',
|
|
39
|
-
'event',
|
|
40
|
-
'reader',
|
|
41
|
-
'snapshot',
|
|
42
|
-
'manifest',
|
|
43
|
-
];
|
|
44
|
-
/**
|
|
45
|
-
* What a stored record IS, as opposed to what it targets.
|
|
46
|
-
* - `query` — a selector. Executing it returns rows.
|
|
47
|
-
* - `operation` — a selector PLUS verbs ("move everything matching this to
|
|
48
|
-
* Southport"). Only the DEFINITION is stored; execution belongs
|
|
49
|
-
* to the bulk-operations API when it exists.
|
|
50
|
-
*/
|
|
51
|
-
exports.semanticQueryKinds = ['query', 'operation'];
|
|
52
|
-
exports.semanticQueryVisibilities = ['private', 'organisation'];
|
|
53
|
-
// --- Relative dates -------------------------------------------------------
|
|
54
|
-
exports.semanticRelativeDateBases = [
|
|
55
|
-
'day',
|
|
56
|
-
'week',
|
|
57
|
-
'month',
|
|
58
|
-
'quarter',
|
|
59
|
-
'year',
|
|
60
|
-
];
|
|
61
|
-
exports.semanticRelativeDatePositions = ['start', 'end', 'same'];
|
|
62
|
-
// --- Operators ------------------------------------------------------------
|
|
63
|
-
exports.semanticFieldOperators = [
|
|
64
|
-
'eq',
|
|
65
|
-
'ne',
|
|
66
|
-
'gt',
|
|
67
|
-
'gte',
|
|
68
|
-
'lt',
|
|
69
|
-
'lte',
|
|
70
|
-
'contains',
|
|
71
|
-
'exists',
|
|
72
|
-
'notExists',
|
|
73
|
-
];
|
|
74
|
-
exports.semanticTimestampOperators = ['gt', 'gte', 'lt', 'lte'];
|
|
75
|
-
exports.semanticComparisonOperators = [
|
|
76
|
-
'eq',
|
|
77
|
-
'ne',
|
|
78
|
-
'gt',
|
|
79
|
-
'gte',
|
|
80
|
-
'lt',
|
|
81
|
-
'lte',
|
|
82
|
-
];
|
|
83
|
-
exports.semanticSetOperators = ['any', 'all'];
|
|
84
|
-
exports.semanticTelemetryFields = [
|
|
85
|
-
'battery',
|
|
86
|
-
'temperature',
|
|
87
|
-
'voltage',
|
|
88
|
-
];
|
|
89
|
-
/** Readiness severity scale (contract shared/readiness.ts): 0 green, 1 amber, 2 red. */
|
|
90
|
-
exports.semanticReadinessLevels = [0, 1, 2];
|
|
91
|
-
/**
|
|
92
|
-
* Grouping — valid in every entity's vocabulary, because nesting is structure
|
|
93
|
-
* rather than subject matter.
|
|
94
|
-
*/
|
|
95
|
-
exports.semanticGroupConditionTypes = ['and', 'or'];
|
|
96
|
-
/**
|
|
97
|
-
* The ASSET vocabulary. Over a third of it is asset-only by nature —
|
|
98
|
-
* `readiness`, `kit`, `withAsset`, `telemetry`, `locationStatus` mean nothing
|
|
99
|
-
* for a reader or a snapshot.
|
|
100
|
-
*/
|
|
101
|
-
exports.semanticAssetConditionTypes = [
|
|
102
|
-
...exports.semanticGroupConditionTypes,
|
|
103
|
-
'assetType',
|
|
104
|
-
'location',
|
|
105
|
-
'homeLocation',
|
|
106
|
-
'withAsset',
|
|
107
|
-
'customField',
|
|
108
|
-
'createdDate',
|
|
109
|
-
'lastUpdated',
|
|
110
|
-
'lastChanged',
|
|
111
|
-
'lastSeen',
|
|
112
|
-
'firstSeen',
|
|
113
|
-
'geolocation',
|
|
114
|
-
'tags',
|
|
115
|
-
'telemetry',
|
|
116
|
-
'readiness',
|
|
117
|
-
'kit',
|
|
118
|
-
'locationStatus',
|
|
119
|
-
];
|
|
120
|
-
/**
|
|
121
|
-
* The LOCATION vocabulary.
|
|
122
|
-
*
|
|
123
|
-
* Where a fact is genuinely the same as an asset's, it keeps the same word AND
|
|
124
|
-
* the same meaning — `tags`, `createdDate`, `lastUpdated`, `lastChanged`. That
|
|
125
|
-
* is the naming rule working: one fact stored the same way, sharing one
|
|
126
|
-
* emitter, not two coincidences that agree today.
|
|
127
|
-
*
|
|
128
|
-
* `geolocation` is the exception that proves it needs care. The word means the
|
|
129
|
-
* same thing — "has map coordinates" — but a location has TWO: the coordinates
|
|
130
|
-
* it was configured with, and the ones a moving location last reported
|
|
131
|
-
* (`state.geolocation`, which is what the asset condition reads). This
|
|
132
|
-
* condition means the CONFIGURED position; the observed one belongs to a
|
|
133
|
-
* separate condition if it is ever wanted, rather than being silently folded
|
|
134
|
-
* in here.
|
|
135
|
-
*
|
|
136
|
-
* DELIBERATELY ABSENT: `lastSeen`, `firstSeen` and `telemetry`. The location
|
|
137
|
-
* document declares all three and the parser exposes them, so they were easy
|
|
138
|
-
* to add — but nothing in this repo writes them (the reader/MQTT ingestion
|
|
139
|
-
* does, if anything does), no legacy filter or prototype condition ever
|
|
140
|
-
* offered them, and they could only ever apply to MOVING locations carrying a
|
|
141
|
-
* tracker. A condition over a field that may never be populated is one that
|
|
142
|
-
* runs and confidently returns nothing. They come back the day the ingestion
|
|
143
|
-
* is confirmed to populate them — the emitters are already shared, so it is a
|
|
144
|
-
* list entry and two switch arms.
|
|
145
|
-
*
|
|
146
|
-
* Also absent, and for a different reason: free text. There is no
|
|
147
|
-
* `nameContains` (the prototype had one) because search is a view option
|
|
148
|
-
* platform-wide, not a condition.
|
|
149
|
-
*/
|
|
150
|
-
exports.semanticLocationConditionTypes = [
|
|
151
|
-
...exports.semanticGroupConditionTypes,
|
|
152
|
-
'path',
|
|
153
|
-
'locationType',
|
|
154
|
-
'hasReaders',
|
|
155
|
-
'geofence',
|
|
156
|
-
'manifest',
|
|
157
|
-
'tags',
|
|
158
|
-
'geolocation',
|
|
159
|
-
'createdDate',
|
|
160
|
-
'lastUpdated',
|
|
161
|
-
'lastChanged',
|
|
162
|
-
];
|
|
163
|
-
/**
|
|
164
|
-
* The EVENT vocabulary.
|
|
165
|
-
*
|
|
166
|
-
* `location` borrows its WORD from the asset vocabulary but not its meaning:
|
|
167
|
-
* an asset's `location` is where the asset is now, an event's is where the
|
|
168
|
-
* event happened. Same name for the same kind of question, different subject —
|
|
169
|
-
* which is why each entity compiles it against its own field.
|
|
170
|
-
* `occurred` is its own word rather than reusing a timestamp
|
|
171
|
-
* name, because an event has exactly ONE time and calling it `createdDate`
|
|
172
|
-
* would invite the reading that events have several dates the way assets do.
|
|
173
|
-
*/
|
|
174
|
-
exports.semanticEventConditionTypes = [
|
|
175
|
-
...exports.semanticGroupConditionTypes,
|
|
176
|
-
'occurred',
|
|
177
|
-
'eventType',
|
|
178
|
-
'assetType',
|
|
179
|
-
'location',
|
|
180
|
-
'reader',
|
|
181
|
-
'user',
|
|
182
|
-
'action',
|
|
183
|
-
];
|
|
184
|
-
/**
|
|
185
|
-
* The SNAPSHOT vocabulary.
|
|
186
|
-
*
|
|
187
|
-
* Full parity with the prototype's six words, plus `assetType` and `reader`,
|
|
188
|
-
* which its descriptor lacked and the platform's flat filters already support.
|
|
189
|
-
*
|
|
190
|
-
* Nothing is withheld here, and that is worth contrasting with events. The
|
|
191
|
-
* prototype matched `asset`, `user` and `manifest` by case-insensitive regex
|
|
192
|
-
* over a denormalised name — the failure the asset vocabulary refuses, three
|
|
193
|
-
* times over. It survives translation intact only because this entity stores
|
|
194
|
-
* real ids for all three, so the honest form costs no capability. Where it
|
|
195
|
-
* could not (a name for `user`), the event ladder already solved it.
|
|
196
|
-
*
|
|
197
|
-
* Absent for the standing reason: free text. No `nameContains` — search is a
|
|
198
|
-
* view option platform-wide, never a stored condition.
|
|
199
|
-
*/
|
|
200
|
-
exports.semanticSnapshotConditionTypes = [
|
|
201
|
-
...exports.semanticGroupConditionTypes,
|
|
202
|
-
'occurred',
|
|
203
|
-
'snapshotType',
|
|
204
|
-
'asset',
|
|
205
|
-
'assetType',
|
|
206
|
-
'location',
|
|
207
|
-
'manifest',
|
|
208
|
-
'user',
|
|
209
|
-
'reader',
|
|
210
|
-
];
|
|
211
|
-
/**
|
|
212
|
-
* The READER vocabulary.
|
|
213
|
-
*
|
|
214
|
-
* Five of the prototype's six words, plus `hasReported` and `hasGeolocation`
|
|
215
|
-
* that it had no form for. The sixth (`nameContains`) is refused above.
|
|
216
|
-
*
|
|
217
|
-
* Note what is NOT here: readers carry no user-group scope, and this
|
|
218
|
-
* vocabulary does not add one. `usergroups/scope.ts` lists them among the
|
|
219
|
-
* surfaces deliberately unscoped in v1, and filtering a set the caller can
|
|
220
|
-
* already read in full reveals nothing new.
|
|
221
|
-
*/
|
|
222
|
-
exports.semanticReaderConditionTypes = [
|
|
223
|
-
...exports.semanticGroupConditionTypes,
|
|
224
|
-
'deviceType',
|
|
225
|
-
'readerType',
|
|
226
|
-
'location',
|
|
227
|
-
'attachedAsset',
|
|
228
|
-
'online',
|
|
229
|
-
'hasReported',
|
|
230
|
-
'hasGeolocation',
|
|
231
|
-
];
|
|
232
|
-
/**
|
|
233
|
-
* WHICH WORDS EACH ENTITY KNOWS — the closed vocabulary, per entity.
|
|
234
|
-
*
|
|
235
|
-
* The rule only has teeth if "unknown" is decidable for the entity being
|
|
236
|
-
* queried. In one flat list `{type:'readiness'}` on a location query is a
|
|
237
|
-
* VALID word, so rejecting it would demote to a hand-maintained compatibility
|
|
238
|
-
* table — a second gate that can drift from the first, which is the
|
|
239
|
-
* runs-cleanly-returns-wrong-rows failure this design exists to prevent.
|
|
240
|
-
*
|
|
241
|
-
* It also scopes what the generator is shown: composing a location query, the
|
|
242
|
-
* model never sees `readiness` at all. The prototype's prompt listed
|
|
243
|
-
* conditions it could not supply and the model duly emitted them (finding 12);
|
|
244
|
-
* a shared vocabulary hands that failure to every entity at once.
|
|
245
|
-
*
|
|
246
|
-
* An entity with an EMPTY vocabulary is one the language does not speak yet —
|
|
247
|
-
* every condition is rejected, which is the honest answer while only assets
|
|
248
|
-
* execute. Entities are listed from day one so a stored record never needs
|
|
249
|
-
* retrofitting.
|
|
250
|
-
*
|
|
251
|
-
* Where a concept genuinely coincides across entities it keeps the SAME word
|
|
252
|
-
* (`createdDate` is the same fact everywhere). A domain word is only earned
|
|
253
|
-
* where the meaning differs.
|
|
254
|
-
*/
|
|
255
|
-
exports.semanticConditionTypesByEntity = {
|
|
256
|
-
asset: exports.semanticAssetConditionTypes,
|
|
257
|
-
location: exports.semanticLocationConditionTypes,
|
|
258
|
-
event: exports.semanticEventConditionTypes,
|
|
259
|
-
snapshot: exports.semanticSnapshotConditionTypes,
|
|
260
|
-
reader: exports.semanticReaderConditionTypes,
|
|
261
|
-
manifest: [],
|
|
262
|
-
};
|
|
263
|
-
/**
|
|
264
|
-
* Every condition type the language knows, across all entities.
|
|
265
|
-
*
|
|
266
|
-
* This is the BOUNDARY's list — the wire schema checks that a condition names
|
|
267
|
-
* a real word at all, and leaves which-entity-may-use-it to the shared
|
|
268
|
-
* validator, which knows the entity and can say "'readiness' is an asset
|
|
269
|
-
* condition" instead of "not allowed".
|
|
270
|
-
*/
|
|
271
|
-
exports.semanticConditionTypes = [
|
|
272
|
-
...new Set([
|
|
273
|
-
...exports.semanticAssetConditionTypes,
|
|
274
|
-
...exports.semanticLocationConditionTypes,
|
|
275
|
-
...exports.semanticEventConditionTypes,
|
|
276
|
-
...exports.semanticSnapshotConditionTypes,
|
|
277
|
-
...exports.semanticReaderConditionTypes,
|
|
278
|
-
]),
|
|
279
|
-
];
|
|
280
|
-
/**
|
|
281
|
-
* Query size bounds, shared by the boundary schema (which refuses an oversized
|
|
282
|
-
* query before parsing it) and the compiler (which counts every branch as it
|
|
283
|
-
* walks). Both halves are load-bearing: without the compiler's counting a
|
|
284
|
-
* single `or` could carry thousands of arms, and without the boundary's cap
|
|
285
|
-
* the parse itself is the cost.
|
|
286
|
-
*/
|
|
287
|
-
exports.SEMANTIC_QUERY_LIMITS = {
|
|
288
|
-
maxConditions: 50,
|
|
289
|
-
maxDepth: 5,
|
|
290
|
-
};
|
|
291
|
-
// --- The envelope ---------------------------------------------------------
|
|
292
|
-
/** Current wire version of the condition vocabulary. */
|
|
293
|
-
exports.SEMANTIC_QUERY_VERSION = 2;
|
|
294
|
-
// --- Stored-record display config -----------------------------------------
|
|
295
|
-
/** Which rendering of the asset list a saved query opens in. */
|
|
296
|
-
exports.semanticQueryViewTypes = ['table', 'map', 'tree'];
|
|
297
|
-
/**
|
|
298
|
-
* The same list as VALUES, for the boundary schema.
|
|
299
|
-
*
|
|
300
|
-
* Keyed as a Record so the compiler enforces it BOTH ways: a field missing
|
|
301
|
-
* here is a build error, and one that is not a real sort field is too. The
|
|
302
|
-
* validator hand-wrote `searchableSortFields, 'battery', 'ready'` — which was
|
|
303
|
-
* correct when assets were the only entity and became a rejection of every
|
|
304
|
-
* location view the moment they were not. A hand-kept copy of a type is a copy
|
|
305
|
-
* that drifts; this one cannot.
|
|
306
|
-
*/
|
|
307
|
-
const SEMANTIC_QUERY_SORT_FIELD_SET = {
|
|
308
|
-
name: true,
|
|
309
|
-
updated: true,
|
|
310
|
-
created: true,
|
|
311
|
-
relevancy: true,
|
|
312
|
-
battery: true,
|
|
313
|
-
ready: true,
|
|
314
|
-
path: true,
|
|
315
|
-
submitted: true,
|
|
316
|
-
};
|
|
317
|
-
exports.semanticQuerySortFields = Object.keys(SEMANTIC_QUERY_SORT_FIELD_SET);
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.semanticQuerySortFields = exports.semanticQueryViewTypes = exports.SEMANTIC_QUERY_VERSION = exports.SEMANTIC_QUERY_LIMITS = exports.semanticConditionTypes = exports.semanticConditionTypesByEntity = exports.semanticReaderConditionTypes = exports.semanticSnapshotConditionTypes = exports.semanticEventConditionTypes = exports.semanticLocationConditionTypes = exports.semanticAssetConditionTypes = exports.semanticGroupConditionTypes = exports.semanticReadinessLevels = exports.semanticTelemetryFields = exports.semanticSetOperators = exports.semanticComparisonOperators = exports.semanticTimestampOperators = exports.semanticFieldOperators = exports.semanticRelativeDatePositions = exports.semanticRelativeDateBases = exports.semanticQueryVisibilities = exports.semanticQueryKinds = exports.semanticQueryEntityTypes = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* SEMANTIC QUERIES — the portable query language.
|
|
6
|
+
*
|
|
7
|
+
* A semantic query is a JSON list of typed conditions (ANDed together, nestable
|
|
8
|
+
* with and/or groups) over one entity type. Three parties speak this contract —
|
|
9
|
+
* the client filter UI that builds conditions, the LLM that generates them, and
|
|
10
|
+
* the server compiler that executes them — so this file is the single
|
|
11
|
+
* vocabulary all three encode.
|
|
12
|
+
*
|
|
13
|
+
* THE CLOSED-VOCABULARY RULE. Condition types, operators AND property names are
|
|
14
|
+
* closed sets: validation rejects an unknown property rather than ignoring it,
|
|
15
|
+
* at every level. This is not defensive tidiness — an LLM once invented a
|
|
16
|
+
* `"negate": true` property; ignoring it compiled NOT(X) as X, a query that ran
|
|
17
|
+
* successfully and returned exactly the complement of what was asked. Every
|
|
18
|
+
* defect class this design guards against fails SILENTLY (valid query, wrong
|
|
19
|
+
* rows), which is why an honest rejection always beats a plausible guess.
|
|
20
|
+
*
|
|
21
|
+
* There is deliberately NO general negation (no `not` group, no invertible
|
|
22
|
+
* flag). Expressible negatively: `notExists`, `ne`, `geolocation.exists:false`,
|
|
23
|
+
* `kit.isMember:false`. Anything else must surface as a validation issue,
|
|
24
|
+
* never an approximation.
|
|
25
|
+
*
|
|
26
|
+
* Descends from the G2G Chat prototype (see g2g-client
|
|
27
|
+
* `docs/semantic-query-decisions.md` while it lives, folding into
|
|
28
|
+
* TECHNICAL_DECISIONS.md) and the semantic-query specification errata.
|
|
29
|
+
*/
|
|
30
|
+
// --- Entity + record kind -------------------------------------------------
|
|
31
|
+
/**
|
|
32
|
+
* What a semantic query targets. All but `manifest` execute; it is recorded so
|
|
33
|
+
* the classifier can name what it is declining, and so a stored query would
|
|
34
|
+
* never need retrofitting if it ever learns to speak.
|
|
35
|
+
*/
|
|
36
|
+
exports.semanticQueryEntityTypes = [
|
|
37
|
+
'asset',
|
|
38
|
+
'location',
|
|
39
|
+
'event',
|
|
40
|
+
'reader',
|
|
41
|
+
'snapshot',
|
|
42
|
+
'manifest',
|
|
43
|
+
];
|
|
44
|
+
/**
|
|
45
|
+
* What a stored record IS, as opposed to what it targets.
|
|
46
|
+
* - `query` — a selector. Executing it returns rows.
|
|
47
|
+
* - `operation` — a selector PLUS verbs ("move everything matching this to
|
|
48
|
+
* Southport"). Only the DEFINITION is stored; execution belongs
|
|
49
|
+
* to the bulk-operations API when it exists.
|
|
50
|
+
*/
|
|
51
|
+
exports.semanticQueryKinds = ['query', 'operation'];
|
|
52
|
+
exports.semanticQueryVisibilities = ['private', 'organisation'];
|
|
53
|
+
// --- Relative dates -------------------------------------------------------
|
|
54
|
+
exports.semanticRelativeDateBases = [
|
|
55
|
+
'day',
|
|
56
|
+
'week',
|
|
57
|
+
'month',
|
|
58
|
+
'quarter',
|
|
59
|
+
'year',
|
|
60
|
+
];
|
|
61
|
+
exports.semanticRelativeDatePositions = ['start', 'end', 'same'];
|
|
62
|
+
// --- Operators ------------------------------------------------------------
|
|
63
|
+
exports.semanticFieldOperators = [
|
|
64
|
+
'eq',
|
|
65
|
+
'ne',
|
|
66
|
+
'gt',
|
|
67
|
+
'gte',
|
|
68
|
+
'lt',
|
|
69
|
+
'lte',
|
|
70
|
+
'contains',
|
|
71
|
+
'exists',
|
|
72
|
+
'notExists',
|
|
73
|
+
];
|
|
74
|
+
exports.semanticTimestampOperators = ['gt', 'gte', 'lt', 'lte'];
|
|
75
|
+
exports.semanticComparisonOperators = [
|
|
76
|
+
'eq',
|
|
77
|
+
'ne',
|
|
78
|
+
'gt',
|
|
79
|
+
'gte',
|
|
80
|
+
'lt',
|
|
81
|
+
'lte',
|
|
82
|
+
];
|
|
83
|
+
exports.semanticSetOperators = ['any', 'all'];
|
|
84
|
+
exports.semanticTelemetryFields = [
|
|
85
|
+
'battery',
|
|
86
|
+
'temperature',
|
|
87
|
+
'voltage',
|
|
88
|
+
];
|
|
89
|
+
/** Readiness severity scale (contract shared/readiness.ts): 0 green, 1 amber, 2 red. */
|
|
90
|
+
exports.semanticReadinessLevels = [0, 1, 2];
|
|
91
|
+
/**
|
|
92
|
+
* Grouping — valid in every entity's vocabulary, because nesting is structure
|
|
93
|
+
* rather than subject matter.
|
|
94
|
+
*/
|
|
95
|
+
exports.semanticGroupConditionTypes = ['and', 'or'];
|
|
96
|
+
/**
|
|
97
|
+
* The ASSET vocabulary. Over a third of it is asset-only by nature —
|
|
98
|
+
* `readiness`, `kit`, `withAsset`, `telemetry`, `locationStatus` mean nothing
|
|
99
|
+
* for a reader or a snapshot.
|
|
100
|
+
*/
|
|
101
|
+
exports.semanticAssetConditionTypes = [
|
|
102
|
+
...exports.semanticGroupConditionTypes,
|
|
103
|
+
'assetType',
|
|
104
|
+
'location',
|
|
105
|
+
'homeLocation',
|
|
106
|
+
'withAsset',
|
|
107
|
+
'customField',
|
|
108
|
+
'createdDate',
|
|
109
|
+
'lastUpdated',
|
|
110
|
+
'lastChanged',
|
|
111
|
+
'lastSeen',
|
|
112
|
+
'firstSeen',
|
|
113
|
+
'geolocation',
|
|
114
|
+
'tags',
|
|
115
|
+
'telemetry',
|
|
116
|
+
'readiness',
|
|
117
|
+
'kit',
|
|
118
|
+
'locationStatus',
|
|
119
|
+
];
|
|
120
|
+
/**
|
|
121
|
+
* The LOCATION vocabulary.
|
|
122
|
+
*
|
|
123
|
+
* Where a fact is genuinely the same as an asset's, it keeps the same word AND
|
|
124
|
+
* the same meaning — `tags`, `createdDate`, `lastUpdated`, `lastChanged`. That
|
|
125
|
+
* is the naming rule working: one fact stored the same way, sharing one
|
|
126
|
+
* emitter, not two coincidences that agree today.
|
|
127
|
+
*
|
|
128
|
+
* `geolocation` is the exception that proves it needs care. The word means the
|
|
129
|
+
* same thing — "has map coordinates" — but a location has TWO: the coordinates
|
|
130
|
+
* it was configured with, and the ones a moving location last reported
|
|
131
|
+
* (`state.geolocation`, which is what the asset condition reads). This
|
|
132
|
+
* condition means the CONFIGURED position; the observed one belongs to a
|
|
133
|
+
* separate condition if it is ever wanted, rather than being silently folded
|
|
134
|
+
* in here.
|
|
135
|
+
*
|
|
136
|
+
* DELIBERATELY ABSENT: `lastSeen`, `firstSeen` and `telemetry`. The location
|
|
137
|
+
* document declares all three and the parser exposes them, so they were easy
|
|
138
|
+
* to add — but nothing in this repo writes them (the reader/MQTT ingestion
|
|
139
|
+
* does, if anything does), no legacy filter or prototype condition ever
|
|
140
|
+
* offered them, and they could only ever apply to MOVING locations carrying a
|
|
141
|
+
* tracker. A condition over a field that may never be populated is one that
|
|
142
|
+
* runs and confidently returns nothing. They come back the day the ingestion
|
|
143
|
+
* is confirmed to populate them — the emitters are already shared, so it is a
|
|
144
|
+
* list entry and two switch arms.
|
|
145
|
+
*
|
|
146
|
+
* Also absent, and for a different reason: free text. There is no
|
|
147
|
+
* `nameContains` (the prototype had one) because search is a view option
|
|
148
|
+
* platform-wide, not a condition.
|
|
149
|
+
*/
|
|
150
|
+
exports.semanticLocationConditionTypes = [
|
|
151
|
+
...exports.semanticGroupConditionTypes,
|
|
152
|
+
'path',
|
|
153
|
+
'locationType',
|
|
154
|
+
'hasReaders',
|
|
155
|
+
'geofence',
|
|
156
|
+
'manifest',
|
|
157
|
+
'tags',
|
|
158
|
+
'geolocation',
|
|
159
|
+
'createdDate',
|
|
160
|
+
'lastUpdated',
|
|
161
|
+
'lastChanged',
|
|
162
|
+
];
|
|
163
|
+
/**
|
|
164
|
+
* The EVENT vocabulary.
|
|
165
|
+
*
|
|
166
|
+
* `location` borrows its WORD from the asset vocabulary but not its meaning:
|
|
167
|
+
* an asset's `location` is where the asset is now, an event's is where the
|
|
168
|
+
* event happened. Same name for the same kind of question, different subject —
|
|
169
|
+
* which is why each entity compiles it against its own field.
|
|
170
|
+
* `occurred` is its own word rather than reusing a timestamp
|
|
171
|
+
* name, because an event has exactly ONE time and calling it `createdDate`
|
|
172
|
+
* would invite the reading that events have several dates the way assets do.
|
|
173
|
+
*/
|
|
174
|
+
exports.semanticEventConditionTypes = [
|
|
175
|
+
...exports.semanticGroupConditionTypes,
|
|
176
|
+
'occurred',
|
|
177
|
+
'eventType',
|
|
178
|
+
'assetType',
|
|
179
|
+
'location',
|
|
180
|
+
'reader',
|
|
181
|
+
'user',
|
|
182
|
+
'action',
|
|
183
|
+
];
|
|
184
|
+
/**
|
|
185
|
+
* The SNAPSHOT vocabulary.
|
|
186
|
+
*
|
|
187
|
+
* Full parity with the prototype's six words, plus `assetType` and `reader`,
|
|
188
|
+
* which its descriptor lacked and the platform's flat filters already support.
|
|
189
|
+
*
|
|
190
|
+
* Nothing is withheld here, and that is worth contrasting with events. The
|
|
191
|
+
* prototype matched `asset`, `user` and `manifest` by case-insensitive regex
|
|
192
|
+
* over a denormalised name — the failure the asset vocabulary refuses, three
|
|
193
|
+
* times over. It survives translation intact only because this entity stores
|
|
194
|
+
* real ids for all three, so the honest form costs no capability. Where it
|
|
195
|
+
* could not (a name for `user`), the event ladder already solved it.
|
|
196
|
+
*
|
|
197
|
+
* Absent for the standing reason: free text. No `nameContains` — search is a
|
|
198
|
+
* view option platform-wide, never a stored condition.
|
|
199
|
+
*/
|
|
200
|
+
exports.semanticSnapshotConditionTypes = [
|
|
201
|
+
...exports.semanticGroupConditionTypes,
|
|
202
|
+
'occurred',
|
|
203
|
+
'snapshotType',
|
|
204
|
+
'asset',
|
|
205
|
+
'assetType',
|
|
206
|
+
'location',
|
|
207
|
+
'manifest',
|
|
208
|
+
'user',
|
|
209
|
+
'reader',
|
|
210
|
+
];
|
|
211
|
+
/**
|
|
212
|
+
* The READER vocabulary.
|
|
213
|
+
*
|
|
214
|
+
* Five of the prototype's six words, plus `hasReported` and `hasGeolocation`
|
|
215
|
+
* that it had no form for. The sixth (`nameContains`) is refused above.
|
|
216
|
+
*
|
|
217
|
+
* Note what is NOT here: readers carry no user-group scope, and this
|
|
218
|
+
* vocabulary does not add one. `usergroups/scope.ts` lists them among the
|
|
219
|
+
* surfaces deliberately unscoped in v1, and filtering a set the caller can
|
|
220
|
+
* already read in full reveals nothing new.
|
|
221
|
+
*/
|
|
222
|
+
exports.semanticReaderConditionTypes = [
|
|
223
|
+
...exports.semanticGroupConditionTypes,
|
|
224
|
+
'deviceType',
|
|
225
|
+
'readerType',
|
|
226
|
+
'location',
|
|
227
|
+
'attachedAsset',
|
|
228
|
+
'online',
|
|
229
|
+
'hasReported',
|
|
230
|
+
'hasGeolocation',
|
|
231
|
+
];
|
|
232
|
+
/**
|
|
233
|
+
* WHICH WORDS EACH ENTITY KNOWS — the closed vocabulary, per entity.
|
|
234
|
+
*
|
|
235
|
+
* The rule only has teeth if "unknown" is decidable for the entity being
|
|
236
|
+
* queried. In one flat list `{type:'readiness'}` on a location query is a
|
|
237
|
+
* VALID word, so rejecting it would demote to a hand-maintained compatibility
|
|
238
|
+
* table — a second gate that can drift from the first, which is the
|
|
239
|
+
* runs-cleanly-returns-wrong-rows failure this design exists to prevent.
|
|
240
|
+
*
|
|
241
|
+
* It also scopes what the generator is shown: composing a location query, the
|
|
242
|
+
* model never sees `readiness` at all. The prototype's prompt listed
|
|
243
|
+
* conditions it could not supply and the model duly emitted them (finding 12);
|
|
244
|
+
* a shared vocabulary hands that failure to every entity at once.
|
|
245
|
+
*
|
|
246
|
+
* An entity with an EMPTY vocabulary is one the language does not speak yet —
|
|
247
|
+
* every condition is rejected, which is the honest answer while only assets
|
|
248
|
+
* execute. Entities are listed from day one so a stored record never needs
|
|
249
|
+
* retrofitting.
|
|
250
|
+
*
|
|
251
|
+
* Where a concept genuinely coincides across entities it keeps the SAME word
|
|
252
|
+
* (`createdDate` is the same fact everywhere). A domain word is only earned
|
|
253
|
+
* where the meaning differs.
|
|
254
|
+
*/
|
|
255
|
+
exports.semanticConditionTypesByEntity = {
|
|
256
|
+
asset: exports.semanticAssetConditionTypes,
|
|
257
|
+
location: exports.semanticLocationConditionTypes,
|
|
258
|
+
event: exports.semanticEventConditionTypes,
|
|
259
|
+
snapshot: exports.semanticSnapshotConditionTypes,
|
|
260
|
+
reader: exports.semanticReaderConditionTypes,
|
|
261
|
+
manifest: [],
|
|
262
|
+
};
|
|
263
|
+
/**
|
|
264
|
+
* Every condition type the language knows, across all entities.
|
|
265
|
+
*
|
|
266
|
+
* This is the BOUNDARY's list — the wire schema checks that a condition names
|
|
267
|
+
* a real word at all, and leaves which-entity-may-use-it to the shared
|
|
268
|
+
* validator, which knows the entity and can say "'readiness' is an asset
|
|
269
|
+
* condition" instead of "not allowed".
|
|
270
|
+
*/
|
|
271
|
+
exports.semanticConditionTypes = [
|
|
272
|
+
...new Set([
|
|
273
|
+
...exports.semanticAssetConditionTypes,
|
|
274
|
+
...exports.semanticLocationConditionTypes,
|
|
275
|
+
...exports.semanticEventConditionTypes,
|
|
276
|
+
...exports.semanticSnapshotConditionTypes,
|
|
277
|
+
...exports.semanticReaderConditionTypes,
|
|
278
|
+
]),
|
|
279
|
+
];
|
|
280
|
+
/**
|
|
281
|
+
* Query size bounds, shared by the boundary schema (which refuses an oversized
|
|
282
|
+
* query before parsing it) and the compiler (which counts every branch as it
|
|
283
|
+
* walks). Both halves are load-bearing: without the compiler's counting a
|
|
284
|
+
* single `or` could carry thousands of arms, and without the boundary's cap
|
|
285
|
+
* the parse itself is the cost.
|
|
286
|
+
*/
|
|
287
|
+
exports.SEMANTIC_QUERY_LIMITS = {
|
|
288
|
+
maxConditions: 50,
|
|
289
|
+
maxDepth: 5,
|
|
290
|
+
};
|
|
291
|
+
// --- The envelope ---------------------------------------------------------
|
|
292
|
+
/** Current wire version of the condition vocabulary. */
|
|
293
|
+
exports.SEMANTIC_QUERY_VERSION = 2;
|
|
294
|
+
// --- Stored-record display config -----------------------------------------
|
|
295
|
+
/** Which rendering of the asset list a saved query opens in. */
|
|
296
|
+
exports.semanticQueryViewTypes = ['table', 'map', 'tree'];
|
|
297
|
+
/**
|
|
298
|
+
* The same list as VALUES, for the boundary schema.
|
|
299
|
+
*
|
|
300
|
+
* Keyed as a Record so the compiler enforces it BOTH ways: a field missing
|
|
301
|
+
* here is a build error, and one that is not a real sort field is too. The
|
|
302
|
+
* validator hand-wrote `searchableSortFields, 'battery', 'ready'` — which was
|
|
303
|
+
* correct when assets were the only entity and became a rejection of every
|
|
304
|
+
* location view the moment they were not. A hand-kept copy of a type is a copy
|
|
305
|
+
* that drifts; this one cannot.
|
|
306
|
+
*/
|
|
307
|
+
const SEMANTIC_QUERY_SORT_FIELD_SET = {
|
|
308
|
+
name: true,
|
|
309
|
+
updated: true,
|
|
310
|
+
created: true,
|
|
311
|
+
relevancy: true,
|
|
312
|
+
battery: true,
|
|
313
|
+
ready: true,
|
|
314
|
+
path: true,
|
|
315
|
+
submitted: true,
|
|
316
|
+
};
|
|
317
|
+
exports.semanticQuerySortFields = Object.keys(SEMANTIC_QUERY_SORT_FIELD_SET);
|
|
318
318
|
//# sourceMappingURL=shared.js.map
|