@spotto/contract 0.0.12-alpha.0 → 0.0.13

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.
@@ -1,5 +1,7 @@
1
1
  export interface GetAssetSuggestionsQuery {
2
2
  search: string;
3
+ maxSuggestions?: number;
4
+ maxMatches?: number;
3
5
  }
4
6
  export declare const getAssetSuggestionsQuerySchema: import("joi").ObjectSchema<GetAssetSuggestionsQuery>;
5
7
  export declare const validateGetAssetSuggestionsQuery: (payload: any) => GetAssetSuggestionsQuery;
@@ -5,6 +5,8 @@ const joi_1 = require("joi");
5
5
  const shared_1 = require("../../shared");
6
6
  exports.getAssetSuggestionsQuerySchema = joi_1.object({
7
7
  search: shared_1.xString.required().lowercase(),
8
+ maxSuggestions: shared_1.xInt.max(10),
9
+ maxMatches: shared_1.xInt.max(10),
8
10
  });
9
11
  const validateGetAssetSuggestionsQuery = (payload) => shared_1.validateJoiSchema(exports.getAssetSuggestionsQuerySchema, payload);
10
12
  exports.validateGetAssetSuggestionsQuery = validateGetAssetSuggestionsQuery;
@@ -1 +1 @@
1
- {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/types/assets/suggestions/query.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAC7B,yCAA0D;AAO7C,QAAA,8BAA8B,GAAG,YAAM,CAA2B;IAC7E,MAAM,EAAE,gBAAO,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE;CACvC,CAAC,CAAC;AAEI,MAAM,gCAAgC,GAAG,CAAC,OAAY,EAAE,EAAE,CAC/D,0BAAiB,CACf,sCAA8B,EAC9B,OAAO,CACR,CAAC;AAJS,QAAA,gCAAgC,oCAIzC"}
1
+ {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/types/assets/suggestions/query.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAC7B,yCAAgE;AAanD,QAAA,8BAA8B,GAAG,YAAM,CAA2B;IAC7E,MAAM,EAAE,gBAAO,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE;IACtC,cAAc,EAAE,aAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IAC5B,UAAU,EAAE,aAAI,CAAC,GAAG,CAAC,EAAE,CAAC;CACzB,CAAC,CAAC;AAEI,MAAM,gCAAgC,GAAG,CAAC,OAAY,EAAE,EAAE,CAC/D,0BAAiB,CACf,sCAA8B,EAC9B,OAAO,CACR,CAAC;AAJS,QAAA,gCAAgC,oCAIzC"}
@@ -1,5 +1,7 @@
1
1
  export interface GetLocationSuggestionsQuery {
2
2
  search: string;
3
+ maxSuggestions?: number;
4
+ maxMatches?: number;
3
5
  }
4
6
  export declare const getLocationSuggestionsQuerySchema: import("joi").ObjectSchema<GetLocationSuggestionsQuery>;
5
7
  export declare const validateGetLocationSuggestionsQuery: (payload: any) => GetLocationSuggestionsQuery;
@@ -5,6 +5,8 @@ const joi_1 = require("joi");
5
5
  const shared_1 = require("../../shared");
6
6
  exports.getLocationSuggestionsQuerySchema = joi_1.object({
7
7
  search: shared_1.xString.required().lowercase(),
8
+ maxSuggestions: shared_1.xInt.max(10),
9
+ maxMatches: shared_1.xInt.max(10),
8
10
  });
9
11
  const validateGetLocationSuggestionsQuery = (payload) => shared_1.validateJoiSchema(exports.getLocationSuggestionsQuerySchema, payload);
10
12
  exports.validateGetLocationSuggestionsQuery = validateGetLocationSuggestionsQuery;
@@ -1 +1 @@
1
- {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/types/locations/suggestions/query.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAC7B,yCAA0D;AAO7C,QAAA,iCAAiC,GAAG,YAAM,CACrD;IACE,MAAM,EAAE,gBAAO,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE;CACvC,CACF,CAAC;AAEK,MAAM,mCAAmC,GAAG,CAAC,OAAY,EAAE,EAAE,CAClE,0BAAiB,CACf,yCAAiC,EACjC,OAAO,CACR,CAAC;AAJS,QAAA,mCAAmC,uCAI5C"}
1
+ {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/types/locations/suggestions/query.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAC7B,yCAAgE;AAanD,QAAA,iCAAiC,GAC5C,YAAM,CAA8B;IAClC,MAAM,EAAE,gBAAO,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE;IACtC,cAAc,EAAE,aAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IAC5B,UAAU,EAAE,aAAI,CAAC,GAAG,CAAC,EAAE,CAAC;CACzB,CAAC,CAAC;AAEE,MAAM,mCAAmC,GAAG,CAAC,OAAY,EAAE,EAAE,CAClE,0BAAiB,CACf,yCAAiC,EACjC,OAAO,CACR,CAAC;AAJS,QAAA,mCAAmC,uCAI5C"}
@@ -6,6 +6,7 @@ export interface GetReadersQuery {
6
6
  page?: number;
7
7
  limit?: number;
8
8
  ids?: string[];
9
+ locationIds?: string[];
9
10
  deviceIds?: string[];
10
11
  type?: ReaderType;
11
12
  manufacturer?: Manufacturer;
@@ -7,6 +7,7 @@ const constants_1 = require("../constants");
7
7
  exports.getReadersQuerySchema = joi_1.object({
8
8
  page: shared_1.xInt,
9
9
  limit: shared_1.xInt,
10
+ locationIds: shared_1.xArrayOfObjectIds(true),
10
11
  ids: shared_1.xArrayOfObjectIds(true),
11
12
  deviceIds: shared_1.xArrayOfStrings(true),
12
13
  type: shared_1.xStringIsOneOf(...constants_1.READER_TYPES),
@@ -1 +1 @@
1
- {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/types/readers/get/query.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAC7B,yCAasB;AACtB,4CAKsB;AA8ET,QAAA,qBAAqB,GAAG,YAAM,CAAkB;IAE3D,IAAI,EAAE,aAAI;IACV,KAAK,EAAE,aAAI;IAGX,GAAG,EAAE,0BAAiB,CAAC,IAAI,CAAC;IAC5B,SAAS,EAAE,wBAAe,CAAC,IAAI,CAAC;IAChC,IAAI,EAAE,uBAAc,CAAC,GAAG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G,CAAC,OAAY,EAAE,EAAE,CACtD,kCAAyB,CAAkB,6BAAqB,EAAE,OAAO,CAAC,CAAC;AADhE,QAAA,uBAAuB,2BACyC"}
@@ -1,5 +1,7 @@
1
1
  export interface GetReaderSuggestionsQuery {
2
2
  search: string;
3
+ maxSuggestions?: number;
4
+ maxMatches?: number;
3
5
  }
4
6
  export declare const getReaderSuggestionsQuerySchema: import("joi").ObjectSchema<GetReaderSuggestionsQuery>;
5
7
  export declare const validateGetReaderSuggestionsQuery: (payload: any) => GetReaderSuggestionsQuery;
@@ -5,6 +5,8 @@ const joi_1 = require("joi");
5
5
  const shared_1 = require("../../shared");
6
6
  exports.getReaderSuggestionsQuerySchema = joi_1.object({
7
7
  search: shared_1.xString.required().lowercase(),
8
+ maxSuggestions: shared_1.xInt.max(10),
9
+ maxMatches: shared_1.xInt.max(10),
8
10
  });
9
11
  const validateGetReaderSuggestionsQuery = (payload) => shared_1.validateJoiSchema(exports.getReaderSuggestionsQuerySchema, payload);
10
12
  exports.validateGetReaderSuggestionsQuery = validateGetReaderSuggestionsQuery;
@@ -1 +1 @@
1
- {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/types/readers/suggestions/query.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAC7B,yCAA0D;AAO7C,QAAA,+BAA+B,GAAG,YAAM,CACnD;IACE,MAAM,EAAE,gBAAO,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE;CACvC,CACF,CAAC;AAEK,MAAM,iCAAiC,GAAG,CAAC,OAAY,EAAE,EAAE,CAChE,0BAAiB,CACf,uCAA+B,EAC/B,OAAO,CACR,CAAC;AAJS,QAAA,iCAAiC,qCAI1C"}
1
+ {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/types/readers/suggestions/query.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAC7B,yCAAgE;AAanD,QAAA,+BAA+B,GAC1C,YAAM,CAA4B;IAChC,MAAM,EAAE,gBAAO,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE;IACtC,cAAc,EAAE,aAAI,CAAC,GAAG,CAAC,EAAE,CAAC;IAC5B,UAAU,EAAE,aAAI,CAAC,GAAG,CAAC,EAAE,CAAC;CACzB,CAAC,CAAC;AAEE,MAAM,iCAAiC,GAAG,CAAC,OAAY,EAAE,EAAE,CAChE,0BAAiB,CACf,uCAA+B,EAC/B,OAAO,CACR,CAAC;AAJS,QAAA,iCAAiC,qCAI1C"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spotto/contract",
3
3
  "license": "ISC",
4
- "version": "0.0.12-alpha.0",
4
+ "version": "0.0.13",
5
5
  "description": "Spotto's API Contract",
6
6
  "main": "./dist/index.js",
7
7
  "files": [
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@airtasker/spot": "^1.4.0",
20
- "@spotto/core-lib": "^0.0.12-alpha.0",
20
+ "@spotto/core-lib": "^0.0.13",
21
21
  "geojson-validation": "^1.0.2",
22
22
  "joi": "^17.2.1",
23
23
  "qs": "^6.9.4"
@@ -26,5 +26,5 @@
26
26
  "jest": "^26.6.3",
27
27
  "ts-jest": "^26.5.3"
28
28
  },
29
- "gitHead": "ea5e3a4065f9242a79ab9089e79cc1b7d8853488"
29
+ "gitHead": "7f90771c87a0450eca14fa239365a861e55aeb8d"
30
30
  }