@spotto/contract 0.2.7-alpha.0 → 0.2.8-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,6 +2,7 @@ import Joi from 'joi';
|
|
|
2
2
|
import { SearchableSortFields, SortOrders } from '../../shared';
|
|
3
3
|
export declare type AssetSearchField = 'name' | 'tagIds';
|
|
4
4
|
export declare type AssetEmbedField = 'meta' | 'tagIds' | 'lastLocation' | 'candidateLocations' | 'telemetry';
|
|
5
|
+
export declare type AssetSortField = SearchableSortFields | 'battery';
|
|
5
6
|
export interface GetAssetsQuery {
|
|
6
7
|
page?: number;
|
|
7
8
|
limit?: number;
|
|
@@ -9,7 +10,7 @@ export interface GetAssetsQuery {
|
|
|
9
10
|
tagIds?: string[];
|
|
10
11
|
hasTags?: boolean;
|
|
11
12
|
archived?: boolean;
|
|
12
|
-
sort?:
|
|
13
|
+
sort?: AssetSortField;
|
|
13
14
|
sortOrder?: SortOrders;
|
|
14
15
|
search?: string;
|
|
15
16
|
searchFuzzy?: boolean;
|
|
@@ -13,7 +13,7 @@ exports.getAssetsQuerySchema = joi_1.default.object({
|
|
|
13
13
|
tagIds: (0, shared_1.xArrayOfStrings)(true),
|
|
14
14
|
hasTags: shared_1.xBool,
|
|
15
15
|
archived: shared_1.xBool,
|
|
16
|
-
sort: shared_1.
|
|
16
|
+
sort: (0, shared_1.xStringIsOneOf)(...shared_1.searchableSortFields, 'battery'),
|
|
17
17
|
sortOrder: shared_1.xSortOrder,
|
|
18
18
|
search: shared_1.xString.lowercase(),
|
|
19
19
|
searchFuzzy: shared_1.xBool,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/types/assets/get/query.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AACtB,
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/types/assets/get/query.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AACtB,yCAasB;AA8ET,QAAA,oBAAoB,GAAG,aAAG,CAAC,MAAM,CAAuB;IAEnE,IAAI,EAAE,aAAI;IACV,KAAK,EAAE,aAAI;IAGX,GAAG,EAAE,IAAA,0BAAiB,EAAC,IAAI,CAAC;IAC5B,MAAM,EAAE,IAAA,wBAAe,EAAC,IAAI,CAAC;IAC7B,OAAO,EAAE,cAAK;IACd,QAAQ,EAAE,cAAK;IAGf,IAAI,EAAE,IAAA,uBAAc,EAAC,GAAG,6BAAoB,EAAE,SAAS,CAAC;IACxD,SAAS,EAAE,mBAAU;IAGrB,MAAM,EAAE,gBAAO,CAAC,SAAS,EAAE;IAC3B,WAAW,EAAE,cAAK;IAClB,YAAY,EAAE,IAAA,gCAAuB,EAAC,MAAM,EAAE,QAAQ,CAAC;IAGvD,KAAK,EAAE,IAAA,gCAAuB,EAC5B,MAAM,EACN,QAAQ,EACR,cAAc,EACd,oBAAoB,EACpB,WAAW,CACZ;CACF,CAAC,CAAC;AAEI,MAAM,sBAAsB,GAAG,CAAC,OAAY,EAAE,EAAE,CACrD,IAAA,kCAAyB,EAAiB,4BAAoB,EAAE,OAAO,CAAC,CAAC;AAD9D,QAAA,sBAAsB,0BACwC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spotto/contract",
|
|
3
3
|
"license": "ISC",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.8-alpha.0",
|
|
5
5
|
"description": "Spotto's API Contract",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"files": [
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"@babel/preset-typescript": "^7.12.7",
|
|
31
31
|
"jest": "^27.3.0"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "2951dcd3867523dcb4c4e21de208179f6d5db9b1"
|
|
34
34
|
}
|