diff --git a/insomnia.yml b/insomnia.yml index bafa88f..e7ace72 100644 --- a/insomnia.yml +++ b/insomnia.yml @@ -1,10 +1,10 @@ _type: export __export_format: 4 -__export_date: 2023-07-23T07:25:05.005Z +__export_date: 2023-11-26T12:25:04.014Z __export_source: insomnia.desktop.app:v2023.4.0 resources: - - _id: req_fb00458b91284843b9e2c6e8d065d4e5 - parentId: fld_45b8644602c74f8f944799f9e4b4136b + - _id: req_27e4b3e404f0475a9806ec504047a9c3 + parentId: fld_8dc3eb2d970d40a69c8b1d719cd91d47 modified: 1689954495695 created: 1687621763480 url: '{{ _.baseUrl }}/boxes/claim' @@ -34,8 +34,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: fld_45b8644602c74f8f944799f9e4b4136b - parentId: wrk_b40edded1d6b48ceac4cb12f9d40561d + - _id: fld_8dc3eb2d970d40a69c8b1d719cd91d47 + parentId: wrk_1f52a56f8af34b59938c3f2a1daa258e modified: 1687721554685 created: 1687609986199 name: box @@ -44,16 +44,16 @@ resources: environmentPropertyOrder: {} metaSortKey: -1687693687685 _type: request_group - - _id: wrk_b40edded1d6b48ceac4cb12f9d40561d + - _id: wrk_1f52a56f8af34b59938c3f2a1daa258e parentId: null - modified: 1690096779458 - created: 1690096779458 + modified: 1700996335423 + created: 1700996335423 name: OpenSenseMap description: '' scope: design _type: workspace - - _id: req_b6ea261b0d724397988fdf664492abfd - parentId: fld_45b8644602c74f8f944799f9e4b4136b + - _id: req_17cce28b1ede4134bf257ca3652f4832 + parentId: fld_8dc3eb2d970d40a69c8b1d719cd91d47 modified: 1689954400942 created: 1687674880918 url: '{{ _.baseUrl }}/boxes/transfer' @@ -85,8 +85,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_f0c459a712434caba0c430eb725dd095 - parentId: fld_45b8644602c74f8f944799f9e4b4136b + - _id: req_709065f2a76a40978e357999fc0073ec + parentId: fld_8dc3eb2d970d40a69c8b1d719cd91d47 modified: 1689963442253 created: 1687678405384 url: '{{ _.baseUrl }}/boxes/{{ _.boxID }}' @@ -116,9 +116,30 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_b6f9b672ff704c5eba7d8536974f8091 - parentId: fld_45b8644602c74f8f944799f9e4b4136b - modified: 1687621773258 + - _id: req_26824ca5a06840899d237d83f28a1ccb + parentId: fld_8dc3eb2d970d40a69c8b1d719cd91d47 + modified: 1700996435961 + created: 1700996427395 + url: '{{ _.baseUrl }}/tags' + name: getAllTags + description: '' + method: GET + body: {} + parameters: [] + headers: [] + authentication: {} + metaSortKey: -1687618849568.25 + isPrivate: false + settingStoreCookies: true + settingSendCookies: true + settingDisableRenderRequestBody: false + settingEncodeUrl: true + settingRebuildPath: true + settingFollowRedirects: global + _type: request + - _id: req_dc824c31c95149e38fed83b8c9e894bb + parentId: fld_8dc3eb2d970d40a69c8b1d719cd91d47 + modified: 1701000711430 created: 1687618849662 url: '{{ _.baseUrl }}/boxes/{{ _.boxID }}' name: getBox @@ -137,8 +158,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_2ee19d88f36c441f8bef3f0458a61d6e - parentId: fld_45b8644602c74f8f944799f9e4b4136b + - _id: req_6b523cb4a0104f40bc79e6e9493189a7 + parentId: fld_8dc3eb2d970d40a69c8b1d719cd91d47 modified: 1687683328517 created: 1687678807780 url: '{{ _.baseUrl }}/boxes' @@ -165,8 +186,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_5c9370148721477f9715fab3e1457607 - parentId: fld_45b8644602c74f8f944799f9e4b4136b + - _id: req_d083e5732ebc4f518cab4370513e29dc + parentId: fld_8dc3eb2d970d40a69c8b1d719cd91d47 modified: 1687977432633 created: 1687683582239 url: '{{ _.baseUrl }}/boxes/{{ _.boxID }}/locations' @@ -193,8 +214,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_f923290e26924301aa0ee4d0f8894bd1 - parentId: fld_45b8644602c74f8f944799f9e4b4136b + - _id: req_0d8429ca679d49ed87853d613198f1ee + parentId: fld_8dc3eb2d970d40a69c8b1d719cd91d47 modified: 1687686990891 created: 1687686511597 url: '{{ _.baseUrl }}/boxes/{{ _.boxID }}/script' @@ -224,8 +245,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_cf7191105a0b439c98b9e72df7d8df2e - parentId: fld_45b8644602c74f8f944799f9e4b4136b + - _id: req_fe87740f63754a5394f5d36eafece2d3 + parentId: fld_8dc3eb2d970d40a69c8b1d719cd91d47 modified: 1687688018601 created: 1687687013545 url: '{{ _.baseUrl }}/boxes/transfer/{{ _.boxID }}' @@ -248,8 +269,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_1d1d52a02b6a41f6a550cd069b1420e5 - parentId: fld_45b8644602c74f8f944799f9e4b4136b + - _id: req_98651d2fe3d94431b414baabb19b5d95 + parentId: fld_8dc3eb2d970d40a69c8b1d719cd91d47 modified: 1689884137332 created: 1687688062661 url: '{{ _.baseUrl }}/boxes' @@ -287,8 +308,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_26b69beeb4b04f2b905db79d3d532dc4 - parentId: fld_45b8644602c74f8f944799f9e4b4136b + - _id: req_4386f3e0ea9242ec80a1fd44da24ef6a + parentId: fld_8dc3eb2d970d40a69c8b1d719cd91d47 modified: 1689884143480 created: 1687688094414 url: '{{ _.baseUrl }}/boxes/transfer' @@ -319,8 +340,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_aacd5c4ce01f4dad9973a4f6cbddb07c - parentId: fld_45b8644602c74f8f944799f9e4b4136b + - _id: req_4e730e487d3e4ee181f794db57e545dc + parentId: fld_8dc3eb2d970d40a69c8b1d719cd91d47 modified: 1689955066542 created: 1687689492405 url: '{{ _.baseUrl }}/boxes/{{ _.boxID }}' @@ -350,8 +371,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_840aee97ad384fd69c9c14f95cc2d026 - parentId: fld_45b8644602c74f8f944799f9e4b4136b + - _id: req_21820dad73ce46bd8459ac3a0337d698 + parentId: fld_8dc3eb2d970d40a69c8b1d719cd91d47 modified: 1687691692843 created: 1687691166683 url: '{{ _.baseUrl }}/boxes/transfer/{{ _.boxID }}' @@ -382,8 +403,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_a4e309da5b064bf58de87362527ae6cb - parentId: fld_daf654815a49451ca78eaa901c5fe32d + - _id: req_1c32d9c17bef40ada2643acbb1d428f8 + parentId: fld_6ba1665aad29435ca71dcfade014ea04 modified: 1687798314606 created: 1687721559543 url: '{{ _.baseUrl }}/statistics/idw' @@ -411,8 +432,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: fld_daf654815a49451ca78eaa901c5fe32d - parentId: wrk_b40edded1d6b48ceac4cb12f9d40561d + - _id: fld_6ba1665aad29435ca71dcfade014ea04 + parentId: wrk_1f52a56f8af34b59938c3f2a1daa258e modified: 1687721556091 created: 1687721547961 name: interpolation @@ -421,8 +442,8 @@ resources: environmentPropertyOrder: null metaSortKey: -1687693687635 _type: request_group - - _id: req_d3329f31a49148099071577ef296ca20 - parentId: fld_de65fdaa3d5c4105be5da761ac7ba36d + - _id: req_9deea3f2387241ea81e745ab33920150 + parentId: fld_3a283bd4bbd24757b3126f0fd0061fa8 modified: 1689962776779 created: 1687797686749 url: '{{ _.baseUrl }}/boxes/{{ _.boxID }}/{{ _.sensorID }}/measurements' @@ -452,8 +473,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: fld_de65fdaa3d5c4105be5da761ac7ba36d - parentId: wrk_b40edded1d6b48ceac4cb12f9d40561d + - _id: fld_3a283bd4bbd24757b3126f0fd0061fa8 + parentId: wrk_1f52a56f8af34b59938c3f2a1daa258e modified: 1687797476208 created: 1687797450965 name: measurement @@ -462,8 +483,8 @@ resources: environmentPropertyOrder: null metaSortKey: -1687693687585 _type: request_group - - _id: req_9b602dd5ee0e4d36b8bbe6c558cc8a65 - parentId: fld_de65fdaa3d5c4105be5da761ac7ba36d + - _id: req_10074107831640a4a43a73594515407f + parentId: fld_3a283bd4bbd24757b3126f0fd0061fa8 modified: 1687804628235 created: 1687798047937 url: '{{ _.baseUrl }}/boxes/{{ _.boxID }}/data/{{ _.sensorID }}' @@ -490,8 +511,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_d365a30852604e329f43e4ca9f746b81 - parentId: fld_de65fdaa3d5c4105be5da761ac7ba36d + - _id: req_32d7b544108b463c86315bcebc337f3c + parentId: fld_3a283bd4bbd24757b3126f0fd0061fa8 modified: 1687978687703 created: 1687977599367 url: '{{ _.baseUrl }}/boxes/data/bytag' @@ -518,8 +539,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_b151254d95dc4f19a67f82178537d5b6 - parentId: fld_de65fdaa3d5c4105be5da761ac7ba36d + - _id: req_0d97d5a8e66d458db8d3585c25a9a2d8 + parentId: fld_3a283bd4bbd24757b3126f0fd0061fa8 modified: 1688583798880 created: 1688580610056 url: '{{ _.baseUrl }}/boxes/data' @@ -550,8 +571,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_820b3278e00645b3a7496ce2edbbbeb8 - parentId: fld_de65fdaa3d5c4105be5da761ac7ba36d + - _id: req_461872c0502b452bba51fd156d0ca106 + parentId: fld_3a283bd4bbd24757b3126f0fd0061fa8 modified: 1688667334672 created: 1688666475714 url: '{{ _.baseUrl }}/boxes/{{ _.boxID }}/sensors/{{ _.sensorID }}' @@ -578,8 +599,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_9a20dadcad9a41ec8675fa7d2ff5af8e - parentId: fld_de65fdaa3d5c4105be5da761ac7ba36d + - _id: req_ffcb61a7c0ae475d9f943ab016fc6b0a + parentId: fld_3a283bd4bbd24757b3126f0fd0061fa8 modified: 1688667464847 created: 1688667358436 url: '{{ _.baseUrl }}/boxes/{{ _.boxID }}/sensors' @@ -606,8 +627,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_1b04ae6c4201483e813d0ffbc2d57ba2 - parentId: fld_de65fdaa3d5c4105be5da761ac7ba36d + - _id: req_f8e2636236824b92b65617884a770eb3 + parentId: fld_3a283bd4bbd24757b3126f0fd0061fa8 modified: 1689959526752 created: 1688668038686 url: '{{ _.baseUrl }}/boxes/{{ _.boxID }}/{{ _.sensorID }}' @@ -639,8 +660,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_73077b9df7e344e59183c1d723175cb7 - parentId: fld_de65fdaa3d5c4105be5da761ac7ba36d + - _id: req_49116ab882134d2b81369c9e9dd82687 + parentId: fld_3a283bd4bbd24757b3126f0fd0061fa8 modified: 1689960302809 created: 1688668058546 url: '{{ _.baseUrl }}/boxes/{{ _.boxID }}/data' @@ -679,8 +700,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_d4b7af6aa83c49c4a818bf7f8aca9c9c - parentId: fld_f04e38966dd1461bb22020ecd2185044 + - _id: req_1c066a880f1a435e9db046b5e77c5479 + parentId: fld_8eb8da0184344b5993697c6535f610c9 modified: 1688668410429 created: 1688668131344 url: '{{ _.baseUrl }}/stats' @@ -707,8 +728,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: fld_f04e38966dd1461bb22020ecd2185044 - parentId: wrk_b40edded1d6b48ceac4cb12f9d40561d + - _id: fld_8eb8da0184344b5993697c6535f610c9 + parentId: wrk_1f52a56f8af34b59938c3f2a1daa258e modified: 1688668128758 created: 1688668125487 name: misc @@ -717,8 +738,8 @@ resources: environmentPropertyOrder: null metaSortKey: -1687693687535 _type: request_group - - _id: req_56705883fd374575b556b0dd885a575a - parentId: fld_f04e38966dd1461bb22020ecd2185044 + - _id: req_6e09730baadc438f8215d1be3984c979 + parentId: fld_8eb8da0184344b5993697c6535f610c9 modified: 1688668491247 created: 1688668480785 url: '{{ _.baseUrl }}/' @@ -738,8 +759,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_d2ecbea6e29d4ca39545ef86ae753550 - parentId: fld_233a32cc4e4e4d88a1f47ab7c971e0c6 + - _id: req_edc2c70e08544e4683f9f0765ea46798 + parentId: fld_1fb6f75ae770449e8b027f6f98de7c93 modified: 1689015988480 created: 1689011295266 url: '{{ _.baseUrl }}/statistics/descriptive' @@ -772,8 +793,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: fld_233a32cc4e4e4d88a1f47ab7c971e0c6 - parentId: wrk_b40edded1d6b48ceac4cb12f9d40561d + - _id: fld_1fb6f75ae770449e8b027f6f98de7c93 + parentId: wrk_1f52a56f8af34b59938c3f2a1daa258e modified: 1689011292446 created: 1689011290373 name: statistic @@ -782,8 +803,8 @@ resources: environmentPropertyOrder: null metaSortKey: -1687693687485 _type: request_group - - _id: req_182e4dd21cc0468083f9ac930625b7f1 - parentId: fld_3aa2f1961a3c4fb8820106590e4b3c8e + - _id: req_91731a45ac0246ebbfabe2503450a5ba + parentId: fld_be8a4072f9c5460b96e6f28daf2b3532 modified: 1689880174492 created: 1689610668869 url: '{{ _.baseUrl }}/users/confirm-email' @@ -811,8 +832,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: fld_3aa2f1961a3c4fb8820106590e4b3c8e - parentId: wrk_b40edded1d6b48ceac4cb12f9d40561d + - _id: fld_be8a4072f9c5460b96e6f28daf2b3532 + parentId: wrk_1f52a56f8af34b59938c3f2a1daa258e modified: 1689099787662 created: 1689099765750 name: user @@ -821,8 +842,8 @@ resources: environmentPropertyOrder: null metaSortKey: -1687693687435 _type: request_group - - _id: req_8eef85e5e1ee4c6e8d216719ee42e969 - parentId: fld_3aa2f1961a3c4fb8820106590e4b3c8e + - _id: req_a3d5ae6436ee4709bf417f3b2d75c14d + parentId: fld_be8a4072f9c5460b96e6f28daf2b3532 modified: 1689968117962 created: 1689610984927 url: '{{ _.baseUrl }}/users/me' @@ -852,8 +873,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_3d94c9743a1c4ba689f4719bf9531b9b - parentId: fld_3aa2f1961a3c4fb8820106590e4b3c8e + - _id: req_fcaeaf4842e84aeb9d4e8c009ad2d256 + parentId: fld_be8a4072f9c5460b96e6f28daf2b3532 modified: 1689101215498 created: 1689099792424 url: '{{ _.baseUrl }}/users/me' @@ -876,8 +897,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_d7dee0b00240470e9f15feca411bb2e8 - parentId: fld_3aa2f1961a3c4fb8820106590e4b3c8e + - _id: req_7b8df9f1d4644f50b98057e105030aea + parentId: fld_be8a4072f9c5460b96e6f28daf2b3532 modified: 1689968087977 created: 1689964575687 url: '{{ _.baseUrl }}/users/me/boxes/{{ _.boxID }}' @@ -900,8 +921,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_8d2cfbcc03404d39b1a6541f407898fd - parentId: fld_3aa2f1961a3c4fb8820106590e4b3c8e + - _id: req_00546e023f3e4fdeaf8a13b8b2f12d61 + parentId: fld_be8a4072f9c5460b96e6f28daf2b3532 modified: 1689968108428 created: 1689099845377 url: '{{ _.baseUrl }}/users/me/boxes' @@ -931,8 +952,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_51d34f58529149d7874a3588a2533198 - parentId: fld_3aa2f1961a3c4fb8820106590e4b3c8e + - _id: req_0f64bd27cc624942b28e2790750e4c44 + parentId: fld_be8a4072f9c5460b96e6f28daf2b3532 modified: 1689954467625 created: 1689611278748 url: '{{ _.baseUrl }}/users/password-reset' @@ -960,8 +981,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_7133bc8d94854c7a94c447e007d2fae6 - parentId: fld_3aa2f1961a3c4fb8820106590e4b3c8e + - _id: req_ce99b2c01b7b44a5bb57ef92717b885a + parentId: fld_be8a4072f9c5460b96e6f28daf2b3532 modified: 1689272880302 created: 1689272523405 url: '{{ _.baseUrl }}/users/refresh-auth' @@ -999,8 +1020,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_5db565d51c4044cea003da56a06352dc - parentId: fld_3aa2f1961a3c4fb8820106590e4b3c8e + - _id: req_b73dbd62bcae4100a68a2b94497ce2e5 + parentId: fld_be8a4072f9c5460b96e6f28daf2b3532 modified: 1689875114307 created: 1689612271584 url: '{{ _.baseUrl }}/users/register' @@ -1040,8 +1061,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_b71ad724858f4dc1ae2ae6d4d24acc5e - parentId: fld_3aa2f1961a3c4fb8820106590e4b3c8e + - _id: req_870e8d8e94604fdf9e5ab38384eba538 + parentId: fld_be8a4072f9c5460b96e6f28daf2b3532 modified: 1689878883236 created: 1689612500637 url: '{{ _.baseUrl }}/users/request-password-reset' @@ -1068,8 +1089,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_552f052c08bd4af385e10a17e71f6cd4 - parentId: fld_3aa2f1961a3c4fb8820106590e4b3c8e + - _id: req_ce259bfb1aae4c329d271b8eee2d4ca4 + parentId: fld_be8a4072f9c5460b96e6f28daf2b3532 modified: 1689879794165 created: 1689612634231 url: '{{ _.baseUrl }}/users/me/resend-email-confirmation' @@ -1092,8 +1113,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_c0c44b35442f4a8fa851f4d64a5f9cb2 - parentId: fld_3aa2f1961a3c4fb8820106590e4b3c8e + - _id: req_bf1e95431f9e46aca1899c885386ca86 + parentId: fld_be8a4072f9c5460b96e6f28daf2b3532 modified: 1689184823605 created: 1689100059624 url: '{{ _.baseUrl }}/users/sign-in' @@ -1132,8 +1153,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_751089e227f94f7d8487982bc81dc1c0 - parentId: fld_3aa2f1961a3c4fb8820106590e4b3c8e + - _id: req_cc1664bc2d484d38933a1da92e70eab9 + parentId: fld_be8a4072f9c5460b96e6f28daf2b3532 modified: 1689187209529 created: 1689187101280 url: '{{ _.baseUrl }}/users/sign-out' @@ -1156,8 +1177,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: req_a5472538442f466e8661aeb2b2bf81f5 - parentId: fld_3aa2f1961a3c4fb8820106590e4b3c8e + - _id: req_538b2b0452d84541b9679e9457329744 + parentId: fld_be8a4072f9c5460b96e6f28daf2b3532 modified: 1689873497489 created: 1689871454430 url: '{{ _.baseUrl }}/users/me' @@ -1188,8 +1209,8 @@ resources: settingRebuildPath: true settingFollowRedirects: global _type: request - - _id: env_3e985efaceed4ca78c12d1d092200af9 - parentId: wrk_b40edded1d6b48ceac4cb12f9d40561d + - _id: env_b80fb326fd054f8da344a11a6407a6ce + parentId: wrk_1f52a56f8af34b59938c3f2a1daa258e modified: 1687618969633 created: 1687609956132 name: Base Environment @@ -1199,23 +1220,23 @@ resources: isPrivate: false metaSortKey: 1687609956132 _type: environment - - _id: jar_d423ecce6dc142f889450147b4521c69 - parentId: wrk_b40edded1d6b48ceac4cb12f9d40561d + - _id: jar_37a082eb1900483ea4b20917b18b05d3 + parentId: wrk_1f52a56f8af34b59938c3f2a1daa258e modified: 1687609956133 created: 1687609956133 name: Default Jar cookies: [] _type: cookie_jar - - _id: spc_ebad5036d5a54538ad38c93a3d356f8e - parentId: wrk_b40edded1d6b48ceac4cb12f9d40561d - modified: 1690096779463 - created: 1690096779460 + - _id: spc_78f7174459c94374b99955bd7f8edf1f + parentId: wrk_1f52a56f8af34b59938c3f2a1daa258e + modified: 1700996335427 + created: 1700996335426 fileName: OpenSenseMap contents: '' contentType: yaml _type: api_spec - - _id: env_3549159adc6048d1ac45480c0cdf98e0 - parentId: env_3e985efaceed4ca78c12d1d092200af9 + - _id: env_1d9a73b97d25426f96b14c8a50228068 + parentId: env_b80fb326fd054f8da344a11a6407a6ce modified: 1690097035148 created: 1687618970849 name: Default Environment diff --git a/src/api/box/_boxModels.ts b/src/api/box/_boxModels.ts index 6a5cde1..636e84f 100644 --- a/src/api/box/_boxModels.ts +++ b/src/api/box/_boxModels.ts @@ -17,7 +17,7 @@ export type BoxData = { currentLocation: BoxLocation; loc: BoxLoc[]; updatedAt: RFC3339Date; - sensors: Sensor[]; + sensors: Sensor[]; lastMeasurementAt?: RFC3339Date; }; @@ -93,7 +93,7 @@ export type TTN = { * @linkcode https://github.com/sensebox/openSenseMap-API/blob/2e645bdc4c80e668720b5eaaf384a35d2909569e/packages/models/src/sensor/sensor.js#L8 * @linkcode https://github.com/sensebox/openSenseMap-API/blob/2e645bdc4c80e668720b5eaaf384a35d2909569e/packages/models/src/box/box.js#L1057 */ -export type Sensor = { +export type Sensor = { _id: OpenSenseMapID; title: string; unit: string; diff --git a/src/api/box/_index.ts b/src/api/box/_index.ts index 014f93b..fe7ba38 100644 --- a/src/api/box/_index.ts +++ b/src/api/box/_index.ts @@ -6,6 +6,7 @@ export * from './_boxModels'; export * from './claimBox'; export * from './createTransfer'; export * from './deleteBox'; +export * from './getAllTags'; export * from './getBox'; export * from './getBoxLocations'; export * from './getBoxes'; diff --git a/src/api/box/deleteBox.ts b/src/api/box/deleteBox.ts index 9722f1b..0f481b8 100644 --- a/src/api/box/deleteBox.ts +++ b/src/api/box/deleteBox.ts @@ -2,7 +2,6 @@ import axios from 'axios'; import { OpenSenseMapID } from '../globalTypes'; /** - * ❗❗ BREAKING CHANGE! * @see https://docs.opensensemap.org/#api-Boxes-deleteBox */ export async function deleteBox(senseBoxId: OpenSenseMapID, password: string, authorization: string): Promise { diff --git a/src/api/box/getAllTags.ts b/src/api/box/getAllTags.ts new file mode 100644 index 0000000..e15c161 --- /dev/null +++ b/src/api/box/getAllTags.ts @@ -0,0 +1,16 @@ +import axios from 'axios'; + +/** + * @see https://docs.opensensemap.org/#api-Boxes-getAllTags + */ +export async function getAllTags(): Promise { + return (await axios.get(`https://api.opensensemap.org/tags`)).data; +} + +/** + * @linkcode https://github.com/sensebox/openSenseMap-API/blob/11695a33cf0260a62aecbefd76c46735b690be62/packages/api/lib/controllers/boxesController.js#L704C5-L704C5 + */ +export type GetAllTagsResult = { + code: 'Ok'; + data: string[]; +}; diff --git a/src/api/box/postNewBox.ts b/src/api/box/postNewBox.ts index 14c1068..524b04c 100644 --- a/src/api/box/postNewBox.ts +++ b/src/api/box/postNewBox.ts @@ -33,10 +33,15 @@ export async function postNewBox( } export type PostNewBoxOptions = { + description?: string; grouptag?: string; model?: BoxModel; sensors?: PostNewBoxSensor[]; sensorTemplates?: SensorTemplates[]; + serialPort?: 'Serial1' | 'Serial2'; + soilDigitalPort?: 'A' | 'B' | 'C'; + soundMeterPort?: 'A' | 'B' | 'C'; + windSpeedPort?: 'A' | 'B' | 'C'; mqtt?: MQTT; ttn?: TTN; useAuth?: boolean; diff --git a/src/api/user/_userModels.ts b/src/api/user/_userModels.ts index f73f919..3e349e4 100644 --- a/src/api/user/_userModels.ts +++ b/src/api/user/_userModels.ts @@ -11,6 +11,7 @@ export type UserData = { boxes: OpenSenseMapID[]; sharedBoxes?: OpenSenseMapID[]; emailIsConfirmed: boolean; + integrations?: object; }; /** diff --git a/src/api/user/register.ts b/src/api/user/register.ts index c877366..947bd50 100644 --- a/src/api/user/register.ts +++ b/src/api/user/register.ts @@ -21,7 +21,8 @@ export async function register(userName: UserName, email: string, password: stri } export type RegisterOptions = { - language: Language; + language?: Language; + integrations?: object; }; /** diff --git a/src/api/user/updateUser.ts b/src/api/user/updateUser.ts index e69d41a..5113d50 100644 --- a/src/api/user/updateUser.ts +++ b/src/api/user/updateUser.ts @@ -28,6 +28,7 @@ export type UpdateUserOptions = { language?: Language; name?: string; newPassword?: string; + integrations?: object; }; export type UpdateUserResult = UpdateUserResultResultUpdated | UpdateUserResultUserNotUpdated; @@ -47,12 +48,9 @@ export type UpdateUserResultResultUpdated = { }; /** - * @linkcode https://github.com/sensebox/openSenseMap-API/blob/2e645bdc4c80e668720b5eaaf384a35d2909569e/packages/models/src/user/user.js#L533 + * @linkcode https://github.com/sensebox/openSenseMap-API/blob/11695a33cf0260a62aecbefd76c46735b690be62/packages/api/lib/controllers/usersController.js#L320 */ export type UpdateUserResultUserNotUpdated = { code: 'Ok'; - message: 'User successfully saved.'; - data: { - me: { updated: false }; - }; + message: 'No changed properties supplied. User remains unchanged.'; };