@spotto/contract 0.2.5-beta.3 → 0.2.6
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/dist/types/assets/[id]/get.d.ts +3 -2
- package/dist/types/assets/[id]/get.js +11 -8
- package/dist/types/assets/[id]/get.js.map +1 -1
- package/dist/types/assets/[id]/location.d.ts +2 -1
- package/dist/types/assets/[id]/location.js +8 -5
- package/dist/types/assets/[id]/location.js.map +1 -1
- package/dist/types/assets/[id]/patch/request.d.ts +2 -1
- package/dist/types/assets/[id]/patch/request.js +7 -4
- package/dist/types/assets/[id]/patch/request.js.map +1 -1
- package/dist/types/assets/get/query.d.ts +2 -1
- package/dist/types/assets/get/query.js +10 -7
- package/dist/types/assets/get/query.js.map +1 -1
- package/dist/types/assets/get/response.d.ts +2 -1
- package/dist/types/assets/get/response.js +7 -4
- package/dist/types/assets/get/response.js.map +1 -1
- package/dist/types/assets/post/request.d.ts +2 -1
- package/dist/types/assets/post/request.js +7 -4
- package/dist/types/assets/post/request.js.map +1 -1
- package/dist/types/assets/post/response.d.ts +2 -1
- package/dist/types/assets/post/response.js +8 -4
- package/dist/types/assets/post/response.js.map +1 -1
- package/dist/types/assets/suggestions/query.d.ts +2 -1
- package/dist/types/assets/suggestions/query.js +6 -3
- package/dist/types/assets/suggestions/query.js.map +1 -1
- package/dist/types/assets/suggestions/response.d.ts +2 -1
- package/dist/types/assets/suggestions/response.js +8 -5
- package/dist/types/assets/suggestions/response.js.map +1 -1
- package/dist/types/assets/upload/request.d.ts +2 -1
- package/dist/types/assets/upload/request.js +7 -4
- package/dist/types/assets/upload/request.js.map +1 -1
- package/dist/types/connectors/bluecats.d.ts +3 -2
- package/dist/types/connectors/bluecats.js +9 -5
- package/dist/types/connectors/bluecats.js.map +1 -1
- package/dist/types/connectors/impinj.d.ts +3 -2
- package/dist/types/connectors/impinj.js +9 -6
- package/dist/types/connectors/impinj.js.map +1 -1
- package/dist/types/connectors/iotx3/ble.d.ts +2 -1
- package/dist/types/connectors/iotx3/ble.js +12 -9
- package/dist/types/connectors/iotx3/ble.js.map +1 -1
- package/dist/types/connectors/iotx3/index.d.ts +2 -1
- package/dist/types/connectors/iotx3/index.js +11 -8
- package/dist/types/connectors/iotx3/index.js.map +1 -1
- package/dist/types/connectors/iotx3/rfid.d.ts +3 -2
- package/dist/types/connectors/iotx3/rfid.js +7 -4
- package/dist/types/connectors/iotx3/rfid.js.map +1 -1
- package/dist/types/connectors/standard.d.ts +3 -2
- package/dist/types/connectors/standard.js +8 -5
- package/dist/types/connectors/standard.js.map +1 -1
- package/dist/types/connectors/zebra/ble.d.ts +4 -3
- package/dist/types/connectors/zebra/ble.js +9 -6
- package/dist/types/connectors/zebra/ble.js.map +1 -1
- package/dist/types/connectors/zebra/index.js +2 -2
- package/dist/types/connectors/zebra/index.js.map +1 -1
- package/dist/types/connectors/zebra/rfid.d.ts +3 -2
- package/dist/types/connectors/zebra/rfid.js +7 -4
- package/dist/types/connectors/zebra/rfid.js.map +1 -1
- package/dist/types/events/download/query.d.ts +2 -1
- package/dist/types/events/download/query.js +14 -11
- package/dist/types/events/download/query.js.map +1 -1
- package/dist/types/events/download/response.d.ts +2 -1
- package/dist/types/events/download/response.js +7 -4
- package/dist/types/events/download/response.js.map +1 -1
- package/dist/types/events/get/query.d.ts +2 -1
- package/dist/types/events/get/query.js +10 -7
- package/dist/types/events/get/query.js.map +1 -1
- package/dist/types/events/get/response.d.ts +6 -5
- package/dist/types/events/get/response.js +19 -15
- package/dist/types/events/get/response.js.map +1 -1
- package/dist/types/events/post.d.ts +3 -2
- package/dist/types/events/post.js +9 -6
- package/dist/types/events/post.js.map +1 -1
- package/dist/types/integrations/constants.d.ts +4 -3
- package/dist/types/integrations/constants.js +15 -12
- package/dist/types/integrations/constants.js.map +1 -1
- package/dist/types/integrations/mqtt/get.js +1 -1
- package/dist/types/integrations/mqtt/get.js.map +1 -1
- package/dist/types/integrations/mqtt/patch/request.d.ts +2 -1
- package/dist/types/integrations/mqtt/patch/request.js +6 -3
- package/dist/types/integrations/mqtt/patch/request.js.map +1 -1
- package/dist/types/levels/get.d.ts +2 -1
- package/dist/types/levels/get.js +7 -4
- package/dist/types/levels/get.js.map +1 -1
- package/dist/types/levels/post.d.ts +2 -1
- package/dist/types/levels/post.js +6 -3
- package/dist/types/levels/post.js.map +1 -1
- package/dist/types/levels/put.d.ts +3 -2
- package/dist/types/levels/put.js +8 -5
- package/dist/types/levels/put.js.map +1 -1
- package/dist/types/locations/[id]/get.d.ts +3 -2
- package/dist/types/locations/[id]/get.js +9 -6
- package/dist/types/locations/[id]/get.js.map +1 -1
- package/dist/types/locations/[id]/inventory.js +3 -3
- package/dist/types/locations/[id]/inventory.js.map +1 -1
- package/dist/types/locations/[id]/patch/request.d.ts +2 -1
- package/dist/types/locations/[id]/patch/request.js +9 -6
- package/dist/types/locations/[id]/patch/request.js.map +1 -1
- package/dist/types/locations/get/query.d.ts +2 -1
- package/dist/types/locations/get/query.js +13 -10
- package/dist/types/locations/get/query.js.map +1 -1
- package/dist/types/locations/get/response.d.ts +2 -1
- package/dist/types/locations/get/response.js +7 -4
- package/dist/types/locations/get/response.js.map +1 -1
- package/dist/types/locations/post/request.d.ts +2 -1
- package/dist/types/locations/post/request.js +9 -6
- package/dist/types/locations/post/request.js.map +1 -1
- package/dist/types/locations/post/response.d.ts +2 -1
- package/dist/types/locations/post/response.js +8 -4
- package/dist/types/locations/post/response.js.map +1 -1
- package/dist/types/locations/suggestions/query.d.ts +2 -1
- package/dist/types/locations/suggestions/query.js +6 -3
- package/dist/types/locations/suggestions/query.js.map +1 -1
- package/dist/types/locations/suggestions/response.d.ts +2 -1
- package/dist/types/locations/suggestions/response.js +8 -5
- package/dist/types/locations/suggestions/response.js.map +1 -1
- package/dist/types/networks/constants.d.ts +2 -1
- package/dist/types/networks/constants.js +5 -2
- package/dist/types/networks/constants.js.map +1 -1
- package/dist/types/organisations/[id]/delete/query.d.ts +2 -1
- package/dist/types/organisations/[id]/delete/query.js +6 -3
- package/dist/types/organisations/[id]/delete/query.js.map +1 -1
- package/dist/types/organisations/[id]/delete/response.d.ts +2 -1
- package/dist/types/organisations/[id]/delete/response.js +7 -4
- package/dist/types/organisations/[id]/delete/response.js.map +1 -1
- package/dist/types/organisations/[id]/get.d.ts +2 -1
- package/dist/types/organisations/[id]/get.js +6 -3
- package/dist/types/organisations/[id]/get.js.map +1 -1
- package/dist/types/organisations/[id]/patch/request.d.ts +2 -1
- package/dist/types/organisations/[id]/patch/request.js +7 -4
- package/dist/types/organisations/[id]/patch/request.js.map +1 -1
- package/dist/types/organisations/[id]/wifi/query.d.ts +2 -1
- package/dist/types/organisations/[id]/wifi/query.js +6 -3
- package/dist/types/organisations/[id]/wifi/query.js.map +1 -1
- package/dist/types/organisations/[id]/wifi/response.d.ts +3 -2
- package/dist/types/organisations/[id]/wifi/response.js +8 -5
- package/dist/types/organisations/[id]/wifi/response.js.map +1 -1
- package/dist/types/organisations/constants.d.ts +2 -1
- package/dist/types/organisations/constants.js +8 -5
- package/dist/types/organisations/constants.js.map +1 -1
- package/dist/types/organisations/get/query.d.ts +2 -1
- package/dist/types/organisations/get/query.js +9 -6
- package/dist/types/organisations/get/query.js.map +1 -1
- package/dist/types/organisations/get/response.d.ts +2 -1
- package/dist/types/organisations/get/response.js +7 -4
- package/dist/types/organisations/get/response.js.map +1 -1
- package/dist/types/organisations/post/request.d.ts +2 -1
- package/dist/types/organisations/post/request.js +6 -3
- package/dist/types/organisations/post/request.js.map +1 -1
- package/dist/types/readers/[id]/get.d.ts +3 -2
- package/dist/types/readers/[id]/get.js +20 -17
- package/dist/types/readers/[id]/get.js.map +1 -1
- package/dist/types/readers/[id]/inventory/query.d.ts +2 -1
- package/dist/types/readers/[id]/inventory/query.js +6 -3
- package/dist/types/readers/[id]/inventory/query.js.map +1 -1
- package/dist/types/readers/[id]/inventory/response.js +2 -2
- package/dist/types/readers/[id]/inventory/response.js.map +1 -1
- package/dist/types/readers/[id]/patch/request.d.ts +2 -1
- package/dist/types/readers/[id]/patch/request.js +9 -5
- package/dist/types/readers/[id]/patch/request.js.map +1 -1
- package/dist/types/readers/[id]/status.d.ts +2 -1
- package/dist/types/readers/[id]/status.js +7 -4
- package/dist/types/readers/[id]/status.js.map +1 -1
- package/dist/types/readers/constants/deviceTypes.js +3 -3
- package/dist/types/readers/constants/deviceTypes.js.map +1 -1
- package/dist/types/readers/get/query.d.ts +2 -1
- package/dist/types/readers/get/query.js +13 -10
- package/dist/types/readers/get/query.js.map +1 -1
- package/dist/types/readers/get/response.d.ts +2 -1
- package/dist/types/readers/get/response.js +7 -4
- package/dist/types/readers/get/response.js.map +1 -1
- package/dist/types/readers/post/request.d.ts +6 -5
- package/dist/types/readers/post/request.js +26 -23
- package/dist/types/readers/post/request.js.map +1 -1
- package/dist/types/readers/post/response.d.ts +2 -1
- package/dist/types/readers/post/response.js +8 -4
- package/dist/types/readers/post/response.js.map +1 -1
- package/dist/types/readers/suggestions/query.d.ts +2 -1
- package/dist/types/readers/suggestions/query.js +6 -3
- package/dist/types/readers/suggestions/query.js.map +1 -1
- package/dist/types/readers/suggestions/response.d.ts +2 -1
- package/dist/types/readers/suggestions/response.js +8 -5
- package/dist/types/readers/suggestions/response.js.map +1 -1
- package/dist/types/readers/user/request.d.ts +2 -1
- package/dist/types/readers/user/request.js +6 -3
- package/dist/types/readers/user/request.js.map +1 -1
- package/dist/types/readers/user/response.d.ts +2 -1
- package/dist/types/readers/user/response.js +7 -4
- package/dist/types/readers/user/response.js.map +1 -1
- package/dist/types/roles/[id]/get.d.ts +3 -2
- package/dist/types/roles/[id]/get.js +7 -4
- package/dist/types/roles/[id]/get.js.map +1 -1
- package/dist/types/roles/get/query.d.ts +2 -1
- package/dist/types/roles/get/query.js +7 -4
- package/dist/types/roles/get/query.js.map +1 -1
- package/dist/types/roles/get/response.d.ts +2 -1
- package/dist/types/roles/get/response.js +7 -4
- package/dist/types/roles/get/response.js.map +1 -1
- package/dist/types/roles/post/request.d.ts +2 -1
- package/dist/types/roles/post/request.js +6 -3
- package/dist/types/roles/post/request.js.map +1 -1
- package/dist/types/shared/body.d.ts +2 -1
- package/dist/types/shared/body.js +7 -4
- package/dist/types/shared/body.js.map +1 -1
- package/dist/types/shared/delete.d.ts +2 -1
- package/dist/types/shared/delete.js +7 -4
- package/dist/types/shared/delete.js.map +1 -1
- package/dist/types/shared/embed.d.ts +3 -2
- package/dist/types/shared/embed.js +6 -3
- package/dist/types/shared/embed.js.map +1 -1
- package/dist/types/shared/headers.d.ts +2 -1
- package/dist/types/shared/headers.js +7 -3
- package/dist/types/shared/headers.js.map +1 -1
- package/dist/types/shared/index.d.ts +1 -0
- package/dist/types/shared/index.js +1 -0
- package/dist/types/shared/index.js.map +1 -1
- package/dist/types/shared/path.d.ts +2 -1
- package/dist/types/shared/path.js +7 -3
- package/dist/types/shared/path.js.map +1 -1
- package/dist/types/shared/query.js +2 -2
- package/dist/types/shared/query.js.map +1 -1
- package/dist/types/shared/schema.d.ts +22 -24
- package/dist/types/shared/schema.js +26 -39
- package/dist/types/shared/schema.js.map +1 -1
- package/dist/types/shared/validate.d.ts +3 -0
- package/dist/types/shared/validate.js +20 -0
- package/dist/types/shared/validate.js.map +1 -0
- package/dist/types/triggers/[id]/get.d.ts +2 -1
- package/dist/types/triggers/[id]/get.js +9 -6
- package/dist/types/triggers/[id]/get.js.map +1 -1
- package/dist/types/triggers/[id]/patch/request.d.ts +2 -1
- package/dist/types/triggers/[id]/patch/request.js +6 -3
- package/dist/types/triggers/[id]/patch/request.js.map +1 -1
- package/dist/types/triggers/constants.d.ts +3 -2
- package/dist/types/triggers/constants.js +17 -14
- package/dist/types/triggers/constants.js.map +1 -1
- package/dist/types/triggers/get/query.d.ts +2 -1
- package/dist/types/triggers/get/query.js +9 -6
- package/dist/types/triggers/get/query.js.map +1 -1
- package/dist/types/triggers/get/response.d.ts +2 -1
- package/dist/types/triggers/get/response.js +7 -4
- package/dist/types/triggers/get/response.js.map +1 -1
- package/dist/types/triggers/post/request.d.ts +2 -1
- package/dist/types/triggers/post/request.js +9 -6
- package/dist/types/triggers/post/request.js.map +1 -1
- package/dist/types/triggers/post/response.d.ts +2 -1
- package/dist/types/triggers/post/response.js +8 -4
- package/dist/types/triggers/post/response.js.map +1 -1
- package/dist/types/users/[id]/get/query.d.ts +2 -1
- package/dist/types/users/[id]/get/query.js +6 -3
- package/dist/types/users/[id]/get/query.js.map +1 -1
- package/dist/types/users/[id]/get/response.d.ts +2 -1
- package/dist/types/users/[id]/get/response.js +9 -6
- package/dist/types/users/[id]/get/response.js.map +1 -1
- package/dist/types/users/[id]/key.d.ts +2 -1
- package/dist/types/users/[id]/key.js +6 -3
- package/dist/types/users/[id]/key.js.map +1 -1
- package/dist/types/users/[id]/patch/request.d.ts +2 -1
- package/dist/types/users/[id]/patch/request.js +6 -3
- package/dist/types/users/[id]/patch/request.js.map +1 -1
- package/dist/types/users/constants.d.ts +2 -1
- package/dist/types/users/constants.js +6 -3
- package/dist/types/users/constants.js.map +1 -1
- package/dist/types/users/current.js +3 -3
- package/dist/types/users/current.js.map +1 -1
- package/dist/types/users/get/query.d.ts +2 -1
- package/dist/types/users/get/query.js +10 -7
- package/dist/types/users/get/query.js.map +1 -1
- package/dist/types/users/get/response.d.ts +2 -1
- package/dist/types/users/get/response.js +7 -4
- package/dist/types/users/get/response.js.map +1 -1
- package/dist/types/users/post/request.d.ts +2 -1
- package/dist/types/users/post/request.js +10 -7
- package/dist/types/users/post/request.js.map +1 -1
- package/package.json +10 -6
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.validateGetReaderInventoryQuery = exports.getReaderInventoryQuerySchema = void 0;
|
|
4
|
-
const joi_1 = require("joi");
|
|
7
|
+
const joi_1 = __importDefault(require("joi"));
|
|
5
8
|
const shared_1 = require("../../../shared");
|
|
6
|
-
exports.getReaderInventoryQuerySchema = joi_1.object({
|
|
9
|
+
exports.getReaderInventoryQuerySchema = joi_1.default.object({
|
|
7
10
|
windowSize: shared_1.xInt,
|
|
8
11
|
});
|
|
9
|
-
const validateGetReaderInventoryQuery = (payload) => shared_1.validateOptionalJoiSchema(exports.getReaderInventoryQuerySchema, payload);
|
|
12
|
+
const validateGetReaderInventoryQuery = (payload) => (0, shared_1.validateOptionalJoiSchema)(exports.getReaderInventoryQuerySchema, payload);
|
|
10
13
|
exports.validateGetReaderInventoryQuery = validateGetReaderInventoryQuery;
|
|
11
14
|
//# sourceMappingURL=query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../../src/types/readers/[id]/inventory/query.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../../src/types/readers/[id]/inventory/query.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AACtB,4CAAkE;AAOrD,QAAA,6BAA6B,GAAG,aAAG,CAAC,MAAM,CAGrD;IACA,UAAU,EAAE,aAAI;CACjB,CAAC,CAAC;AAEI,MAAM,+BAA+B,GAAG,CAAC,OAAY,EAAE,EAAE,CAC9D,IAAA,kCAAyB,EACvB,qCAA6B,EAC7B,OAAO,CACR,CAAC;AAJS,QAAA,+BAA+B,mCAIxC"}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.validateGetReaderInventoryResponse = exports.getReaderInventoryResponseSchema = void 0;
|
|
4
4
|
const shared_1 = require("../../../shared");
|
|
5
5
|
const inventory_1 = require("../../../locations/[id]/inventory");
|
|
6
|
-
exports.getReaderInventoryResponseSchema = shared_1.xArray(inventory_1.inventoryItemSchema);
|
|
7
|
-
const validateGetReaderInventoryResponse = (payload) => shared_1.validateJoiSchema(exports.getReaderInventoryResponseSchema, payload);
|
|
6
|
+
exports.getReaderInventoryResponseSchema = (0, shared_1.xArray)(inventory_1.inventoryItemSchema);
|
|
7
|
+
const validateGetReaderInventoryResponse = (payload) => (0, shared_1.validateJoiSchema)(exports.getReaderInventoryResponseSchema, payload);
|
|
8
8
|
exports.validateGetReaderInventoryResponse = validateGetReaderInventoryResponse;
|
|
9
9
|
//# sourceMappingURL=response.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../../../src/types/readers/[id]/inventory/response.ts"],"names":[],"mappings":";;;AAAA,4CAA4D;AAC5D,iEAG2C;AAI9B,QAAA,gCAAgC,GAAG,eAAM,
|
|
1
|
+
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../../../src/types/readers/[id]/inventory/response.ts"],"names":[],"mappings":";;;AAAA,4CAA4D;AAC5D,iEAG2C;AAI9B,QAAA,gCAAgC,GAAG,IAAA,eAAM,EAAC,+BAAmB,CAAC,CAAC;AAErE,MAAM,kCAAkC,GAAG,CAAC,OAAY,EAAE,EAAE,CACjE,IAAA,0BAAiB,EACf,wCAAgC,EAChC,OAAO,CACR,CAAC;AAJS,QAAA,kCAAkC,sCAI3C"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import Joi from 'joi';
|
|
1
2
|
import { INetworkRequest } from '../../../networks';
|
|
2
3
|
import { IAntennaRequest, IUpsertedLocation } from '../../post';
|
|
3
4
|
export interface UpdateReaderRequest {
|
|
@@ -9,5 +10,5 @@ export interface UpdateReaderRequest {
|
|
|
9
10
|
network?: INetworkRequest;
|
|
10
11
|
antennas?: IAntennaRequest[];
|
|
11
12
|
}
|
|
12
|
-
export declare const updateReaderRequestSchema:
|
|
13
|
+
export declare const updateReaderRequestSchema: Joi.ObjectSchema<UpdateReaderRequest>;
|
|
13
14
|
export declare const validateUpdateReaderRequest: (payload: any) => UpdateReaderRequest;
|
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.validateUpdateReaderRequest = exports.updateReaderRequestSchema = void 0;
|
|
4
|
-
const joi_1 = require("joi");
|
|
7
|
+
const joi_1 = __importDefault(require("joi"));
|
|
5
8
|
const networks_1 = require("../../../networks");
|
|
6
9
|
const schema_1 = require("../../../shared/schema");
|
|
10
|
+
const validate_1 = require("../../../shared/validate");
|
|
7
11
|
const post_1 = require("../../post");
|
|
8
|
-
exports.updateReaderRequestSchema = joi_1.object({
|
|
12
|
+
exports.updateReaderRequestSchema = joi_1.default.object({
|
|
9
13
|
archived: schema_1.xBool,
|
|
10
14
|
deviceId: schema_1.xString,
|
|
11
|
-
name: joi_1.when('type', {
|
|
15
|
+
name: joi_1.default.when('type', {
|
|
12
16
|
is: 'ROVING',
|
|
13
17
|
then: schema_1.xString.required(),
|
|
14
18
|
otherwise: schema_1.xString.allow(''),
|
|
15
19
|
}),
|
|
16
20
|
locationId: schema_1.xObjectId,
|
|
17
21
|
location: post_1.upsertedLocationSchema,
|
|
18
|
-
network: networks_1.networkSchema(),
|
|
22
|
+
network: (0, networks_1.networkSchema)(),
|
|
19
23
|
antennas: post_1.virtualAntennaSchema,
|
|
20
24
|
})
|
|
21
25
|
.oxor('location', 'locationId')
|
|
22
26
|
.min(1);
|
|
23
|
-
const validateUpdateReaderRequest = (payload) =>
|
|
27
|
+
const validateUpdateReaderRequest = (payload) => (0, validate_1.validateJoiSchema)(exports.updateReaderRequestSchema, payload);
|
|
24
28
|
exports.validateUpdateReaderRequest = validateUpdateReaderRequest;
|
|
25
29
|
//# sourceMappingURL=request.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../../../src/types/readers/[id]/patch/request.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../../../src/types/readers/[id]/patch/request.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AACtB,gDAAmE;AACnE,mDAAmE;AACnE,uDAA6D;AAC7D,qCAKoB;AA+BP,QAAA,yBAAyB,GAAG,aAAG,CAAC,MAAM,CAAsB;IACvE,QAAQ,EAAE,cAAK;IAKf,QAAQ,EAAE,gBAAO;IAKjB,IAAI,EAAE,aAAG,CAAC,IAAI,CAAC,MAAM,EAAE;QACrB,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,gBAAO,CAAC,QAAQ,EAAE;QACxB,SAAS,EAAE,gBAAO,CAAC,KAAK,CAAC,EAAE,CAAC;KAC7B,CAAC;IACF,UAAU,EAAE,kBAAS;IACrB,QAAQ,EAAE,6BAAsB;IAChC,OAAO,EAAE,IAAA,wBAAa,GAAmB;IACzC,QAAQ,EAAE,2BAAoB;CAC/B,CAAC;KACC,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC;KAC9B,GAAG,CAAC,CAAC,CAAC,CAAC;AAEH,MAAM,2BAA2B,GAAG,CAAC,OAAY,EAAE,EAAE,CAC1D,IAAA,4BAAiB,EAAsB,iCAAyB,EAAE,OAAO,CAAC,CAAC;AADhE,QAAA,2BAA2B,+BACqC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import Joi from 'joi';
|
|
1
2
|
import { IReaderStatus, IRovingReaderLocation } from './get';
|
|
2
3
|
export interface GetReaderStatusResponse {
|
|
3
4
|
location?: IRovingReaderLocation;
|
|
4
5
|
status: IReaderStatus;
|
|
5
6
|
}
|
|
6
|
-
export declare const getReaderStatusResponseSchema:
|
|
7
|
+
export declare const getReaderStatusResponseSchema: Joi.ObjectSchema<GetReaderStatusResponse>;
|
|
7
8
|
export declare const validateGetReaderStatusResponse: (payload: any) => GetReaderStatusResponse;
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.validateGetReaderStatusResponse = exports.getReaderStatusResponseSchema = void 0;
|
|
4
|
-
const joi_1 = require("joi");
|
|
7
|
+
const joi_1 = __importDefault(require("joi"));
|
|
5
8
|
const shared_1 = require("../../shared");
|
|
6
9
|
const get_1 = require("./get");
|
|
7
|
-
exports.getReaderStatusResponseSchema = joi_1.object({
|
|
10
|
+
exports.getReaderStatusResponseSchema = joi_1.default.object({
|
|
8
11
|
status: get_1.readerStatusSchema.required(),
|
|
9
|
-
location: shared_1.embeddedEntitySchema().append({
|
|
12
|
+
location: (0, shared_1.embeddedEntitySchema)().append({
|
|
10
13
|
type: 'ROVING',
|
|
11
14
|
firstSeen: shared_1.xTime.required(),
|
|
12
15
|
lastSeen: shared_1.xTime.required(),
|
|
13
16
|
}),
|
|
14
17
|
});
|
|
15
|
-
const validateGetReaderStatusResponse = (payload) => shared_1.validateJoiSchema(exports.getReaderStatusResponseSchema, payload);
|
|
18
|
+
const validateGetReaderStatusResponse = (payload) => (0, shared_1.validateJoiSchema)(exports.getReaderStatusResponseSchema, payload);
|
|
16
19
|
exports.validateGetReaderStatusResponse = validateGetReaderStatusResponse;
|
|
17
20
|
//# sourceMappingURL=status.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../../../src/types/readers/[id]/status.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../../../src/types/readers/[id]/status.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AACtB,yCAA8E;AAC9E,+BAIe;AAOF,QAAA,6BAA6B,GAAG,aAAG,CAAC,MAAM,CAGrD;IACA,MAAM,EAAE,wBAAkB,CAAC,QAAQ,EAAE;IACrC,QAAQ,EAAE,IAAA,6BAAoB,GAAyB,CAAC,MAAM,CAAC;QAC7D,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,cAAK,CAAC,QAAQ,EAAE;QAC3B,QAAQ,EAAE,cAAK,CAAC,QAAQ,EAAE;KAC3B,CAAC;CACH,CAAC,CAAC;AAEI,MAAM,+BAA+B,GAAG,CAAC,OAAY,EAAE,EAAE,CAC9D,IAAA,0BAAiB,EACf,qCAA6B,EAC7B,OAAO,CACR,CAAC;AAJS,QAAA,+BAA+B,mCAIxC"}
|
|
@@ -110,10 +110,10 @@ const getDeviceTypes = (query) => exports.DEVICE_TYPE_DETAILS.filter(type => Obj
|
|
|
110
110
|
: testField === field;
|
|
111
111
|
}));
|
|
112
112
|
exports.getDeviceTypes = getDeviceTypes;
|
|
113
|
-
const getDeviceTypesForFormat = (deviceIdFormat) => exports.getDeviceTypes({ deviceIdFormat }).map(({ id }) => id);
|
|
113
|
+
const getDeviceTypesForFormat = (deviceIdFormat) => (0, exports.getDeviceTypes)({ deviceIdFormat }).map(({ id }) => id);
|
|
114
114
|
exports.getDeviceTypesForFormat = getDeviceTypesForFormat;
|
|
115
|
-
const getDeviceTypesForEndpoint = (endpoint) => exports.getDeviceTypes({ endpoint }).map(({ id }) => id);
|
|
115
|
+
const getDeviceTypesForEndpoint = (endpoint) => (0, exports.getDeviceTypes)({ endpoint }).map(({ id }) => id);
|
|
116
116
|
exports.getDeviceTypesForEndpoint = getDeviceTypesForEndpoint;
|
|
117
|
-
const isIoTX3 = (id) => exports.getDeviceTypesForEndpoint('iotx3').includes(id);
|
|
117
|
+
const isIoTX3 = (id) => (0, exports.getDeviceTypesForEndpoint)('iotx3').includes(id);
|
|
118
118
|
exports.isIoTX3 = isIoTX3;
|
|
119
119
|
//# sourceMappingURL=deviceTypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceTypes.js","sourceRoot":"","sources":["../../../../src/types/readers/constants/deviceTypes.ts"],"names":[],"mappings":";;;AAwBa,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,IAAI,CAAC,GAAG,CAAC,CAAC;IAGxB,OAAO,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,WAAW,MAAK,KAAK,IAAI,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,WAAW,MAAK,KAAK;QACrE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;QAChD,CAAC,CAAC,SAAS,KAAK,KAAK,CAAC;AAC1B,CAAC,CAAC,CACH,CAAC;AAXS,QAAA,cAAc,kBAWvB;AAMG,MAAM,uBAAuB,GAAG,CAAC,cAA8B,EAAE,EAAE,CACxE,sBAAc,
|
|
1
|
+
{"version":3,"file":"deviceTypes.js","sourceRoot":"","sources":["../../../../src/types/readers/constants/deviceTypes.ts"],"names":[],"mappings":";;;AAwBa,QAAA,YAAY,GAAiB;IACxC,IAAI;IACJ,OAAO;IACP,MAAM;IACN,KAAK;IACL,OAAO;IACP,QAAQ;IACR,OAAO;IACP,UAAU;IACV,OAAO;IACP,aAAa;CACd,CAAC;AA+BW,QAAA,mBAAmB,GAAwB;IACtD;QACE,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,4BAA4B;QAClC,UAAU,EAAE,CAAC,KAAK,CAAC;QACnB,QAAQ,EAAE,OAAO;QACjB,QAAQ,EAAE,MAAM;QAChB,cAAc,EAAE,KAAK;QACrB,OAAO,EAAE,IAAI;KACd;IACD;QACE,EAAE,EAAE,OAAO;QACX,IAAI,EAAE,0BAA0B;QAChC,UAAU,EAAE,CAAC,MAAM,CAAC;QACpB,QAAQ,EAAE,OAAO;QACjB,QAAQ,EAAE,MAAM;QAChB,cAAc,EAAE,KAAK;QACrB,OAAO,EAAE,IAAI;KACd;IACD;QACE,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,yBAAyB;QAC/B,UAAU,EAAE,CAAC,MAAM,CAAC;QACpB,QA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EAAE,EAAE,CACvE,IAAA,sBAAc,EAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;AADtC,QAAA,yBAAyB,6BACa;AAM5C,MAAM,OAAO,GAAG,CAAC,EAAc,EAAE,EAAE,CACxC,IAAA,iCAAyB,EAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AADrC,QAAA,OAAO,WAC8B"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import Joi from 'joi';
|
|
1
2
|
import { SearchableSortFields, SortOrders } from '../../shared';
|
|
2
3
|
import { ReaderType, DeviceType } from '../constants';
|
|
3
4
|
export declare type ReaderSearchField = 'name' | 'deviceId';
|
|
@@ -18,5 +19,5 @@ export interface GetReadersQuery {
|
|
|
18
19
|
searchFields?: Array<ReaderSearchField>;
|
|
19
20
|
embed?: Array<ReaderEmbedField>;
|
|
20
21
|
}
|
|
21
|
-
export declare const getReadersQuerySchema:
|
|
22
|
+
export declare const getReadersQuerySchema: Joi.ObjectSchema<GetReadersQuery>;
|
|
22
23
|
export declare const validateGetReadersQuery: (payload: any) => GetReadersQuery | null;
|
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.validateGetReadersQuery = exports.getReadersQuerySchema = void 0;
|
|
4
|
-
const joi_1 = require("joi");
|
|
7
|
+
const joi_1 = __importDefault(require("joi"));
|
|
5
8
|
const shared_1 = require("../../shared");
|
|
6
9
|
const constants_1 = require("../constants");
|
|
7
|
-
exports.getReadersQuerySchema = joi_1.object({
|
|
10
|
+
exports.getReadersQuerySchema = joi_1.default.object({
|
|
8
11
|
page: shared_1.xInt,
|
|
9
12
|
limit: shared_1.xInt,
|
|
10
|
-
locationIds: shared_1.xArrayOfObjectIds(true),
|
|
11
|
-
ids: shared_1.xArrayOfObjectIds(true),
|
|
12
|
-
deviceIds: shared_1.xArrayOfStrings(true),
|
|
13
|
-
types: shared_1.xArrayOfRequiredStrings(...constants_1.READER_TYPES),
|
|
14
|
-
deviceTypes: shared_1.xArrayOfRequiredStrings(...constants_1.DEVICE_TYPES),
|
|
13
|
+
locationIds: (0, shared_1.xArrayOfObjectIds)(true),
|
|
14
|
+
ids: (0, shared_1.xArrayOfObjectIds)(true),
|
|
15
|
+
deviceIds: (0, shared_1.xArrayOfStrings)(true),
|
|
16
|
+
types: (0, shared_1.xArrayOfRequiredStrings)(...constants_1.READER_TYPES),
|
|
17
|
+
deviceTypes: (0, shared_1.xArrayOfRequiredStrings)(...constants_1.DEVICE_TYPES),
|
|
15
18
|
archived: shared_1.xBool,
|
|
16
19
|
sort: shared_1.xSearchableSortFields,
|
|
17
20
|
sortOrder: shared_1.xSortOrder,
|
|
18
21
|
search: shared_1.xString.lowercase(),
|
|
19
22
|
searchFuzzy: shared_1.xBool,
|
|
20
|
-
searchFields: shared_1.xArrayOfRequiredStrings('name', 'deviceId'),
|
|
21
|
-
embed: shared_1.xArrayOfRequiredStrings('meta', 'status'),
|
|
23
|
+
searchFields: (0, shared_1.xArrayOfRequiredStrings)('name', 'deviceId'),
|
|
24
|
+
embed: (0, shared_1.xArrayOfRequiredStrings)('meta', 'status'),
|
|
22
25
|
});
|
|
23
|
-
const validateGetReadersQuery = (payload) => shared_1.validateOptionalJoiSchema(exports.getReadersQuerySchema, payload);
|
|
26
|
+
const validateGetReadersQuery = (payload) => (0, shared_1.validateOptionalJoiSchema)(exports.getReadersQuerySchema, payload);
|
|
24
27
|
exports.validateGetReadersQuery = validateGetReadersQuery;
|
|
25
28
|
//# sourceMappingURL=query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/types/readers/get/query.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/types/readers/get/query.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AACtB,yCAYsB;AACtB,4CAKsB;AAiFT,QAAA,qBAAqB,GAAG,aAAG,CAAC,MAAM,CAAwB;IAErE,IAAI,EAAE,aAAI;IACV,KAAK,EAAE,aAAI;IAGX,WAAW,EAAE,IAAA,0BAAiB,EAAC,IAAI,CAAC;IACpC,GAAG,EAAE,IAAA,0BAAiB,EAAC,IAAI,CAAC;IAC5B,SAAS,EAAE,IAAA,wBAAe,EAAC,IAAI,CAAC;IAChC,KAAK,EAAE,IAAA,gCAAuB,EAAC,GAAG,wBAAY,CAAC;IAC/C,WAAW,EAAE,IAAA,gCAAuB,EAAC,GAAG,wBAAY,CAAC;IACrD,QAAQ,EAAE,cAAK;IAGf,IAAI,EAAE,8BAAqB;IAC3B,SAAS,EAAE,mBAAU;IAGrB,MAAM,EAAE,gBAAO,CAAC,SAAS,EAAE;IAC3B,WAAW,EAAE,cAAK;IAClB,YAAY,EAAE,IAAA,gCAAuB,EAAC,MAAM,EAAE,UAAU,CAAC;IAGzD,KAAK,EAAE,IAAA,gCAAuB,EAAC,MAAM,EAAE,QAAQ,CAAC;CACjD,CAAC,CAAC;AAEI,MAAM,uBAAuB,GAAG,CAAC,OAAY,EAAE,EAAE,CACtD,IAAA,kCAAyB,EAAkB,6BAAqB,EAAE,OAAO,CAAC,CAAC;AADhE,QAAA,uBAAuB,2BACyC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import Joi from 'joi';
|
|
1
2
|
import { GetReadersQuery } from './query';
|
|
2
3
|
import { GetReaderResponse } from '../[id]';
|
|
3
4
|
export interface GetReadersResponse {
|
|
@@ -5,5 +6,5 @@ export interface GetReadersResponse {
|
|
|
5
6
|
total: number;
|
|
6
7
|
items: GetReaderResponse[];
|
|
7
8
|
}
|
|
8
|
-
export declare const getReadersResponseSchema:
|
|
9
|
+
export declare const getReadersResponseSchema: Joi.ObjectSchema<GetReadersResponse>;
|
|
9
10
|
export declare const validateGetReadersResponse: (payload: any) => GetReadersResponse;
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.validateGetReadersResponse = exports.getReadersResponseSchema = void 0;
|
|
4
|
-
const joi_1 = require("joi");
|
|
7
|
+
const joi_1 = __importDefault(require("joi"));
|
|
5
8
|
const query_1 = require("./query");
|
|
6
9
|
const _id_1 = require("../[id]");
|
|
7
10
|
const shared_1 = require("../../shared");
|
|
8
|
-
exports.getReadersResponseSchema = joi_1.object({
|
|
11
|
+
exports.getReadersResponseSchema = joi_1.default.object({
|
|
9
12
|
query: query_1.getReadersQuerySchema.allow(null).required(),
|
|
10
13
|
total: shared_1.xInt.required(),
|
|
11
|
-
items: shared_1.xArray(_id_1.getReaderResponseSchema, 'id').required(),
|
|
14
|
+
items: (0, shared_1.xArray)(_id_1.getReaderResponseSchema, 'id').required(),
|
|
12
15
|
});
|
|
13
|
-
const validateGetReadersResponse = (payload) => shared_1.validateJoiSchema(exports.getReadersResponseSchema, payload);
|
|
16
|
+
const validateGetReadersResponse = (payload) => (0, shared_1.validateJoiSchema)(exports.getReadersResponseSchema, payload);
|
|
14
17
|
exports.validateGetReadersResponse = validateGetReadersResponse;
|
|
15
18
|
//# sourceMappingURL=response.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../../src/types/readers/get/response.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../../src/types/readers/get/response.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AACtB,mCAAiE;AACjE,iCAAqE;AACrE,yCAA+D;AAgBlD,QAAA,wBAAwB,GAAG,aAAG,CAAC,MAAM,CAA2B;IAE3E,KAAK,EAAE,6BAAqB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;IACnD,KAAK,EAAE,aAAI,CAAC,QAAQ,EAAE;IACtB,KAAK,EAAE,IAAA,eAAM,EAAC,6BAAuB,EAAE,IAAI,CAAC,CAAC,QAAQ,EAAE;CACxD,CAAC,CAAC;AAEI,MAAM,0BAA0B,GAAG,CAAC,OAAY,EAAsB,EAAE,CAC7E,IAAA,0BAAiB,EAAC,gCAAwB,EAAE,OAAO,CAAC,CAAC;AAD1C,QAAA,0BAA0B,8BACgB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import Joi from 'joi';
|
|
1
2
|
import { INetworkRequest } from '../../networks';
|
|
2
3
|
import { DeviceType, ReaderType } from '../constants';
|
|
3
4
|
export interface IUpsertedLocation {
|
|
@@ -31,10 +32,10 @@ export interface IFixedReaderRequest extends IBaseReaderRequest {
|
|
|
31
32
|
}
|
|
32
33
|
export declare type PostReaderRequest = DefaultReaderRequest | IFixedReaderRequest;
|
|
33
34
|
export declare type PostReadersRequest = PostReaderRequest[];
|
|
34
|
-
export declare const upsertedLocationSchema:
|
|
35
|
-
export declare const antennaSchema:
|
|
36
|
-
export declare const portalAntennaSchema:
|
|
37
|
-
export declare const virtualAntennaSchema:
|
|
38
|
-
export declare const postReadersRequestSchema:
|
|
35
|
+
export declare const upsertedLocationSchema: Joi.ObjectSchema<IUpsertedLocation>;
|
|
36
|
+
export declare const antennaSchema: Joi.ObjectSchema<IAntennaRequest>;
|
|
37
|
+
export declare const portalAntennaSchema: Joi.ArraySchema;
|
|
38
|
+
export declare const virtualAntennaSchema: Joi.ArraySchema;
|
|
39
|
+
export declare const postReadersRequestSchema: Joi.ArraySchema;
|
|
39
40
|
export declare const validatePostReadersRequest: (payload: any) => PostReadersRequest;
|
|
40
41
|
export {};
|
|
@@ -1,61 +1,64 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.validatePostReadersRequest = exports.postReadersRequestSchema = exports.virtualAntennaSchema = exports.portalAntennaSchema = exports.antennaSchema = exports.upsertedLocationSchema = void 0;
|
|
4
|
-
const joi_1 = require("joi");
|
|
7
|
+
const joi_1 = __importDefault(require("joi"));
|
|
5
8
|
const networks_1 = require("../../networks");
|
|
6
9
|
const shared_1 = require("../../shared");
|
|
7
10
|
const constants_1 = require("../constants");
|
|
8
|
-
exports.upsertedLocationSchema = joi_1.object({
|
|
11
|
+
exports.upsertedLocationSchema = joi_1.default.object({
|
|
9
12
|
name: shared_1.xString,
|
|
10
13
|
level: shared_1.xString,
|
|
11
14
|
});
|
|
12
|
-
exports.antennaSchema = joi_1.object({
|
|
15
|
+
exports.antennaSchema = joi_1.default.object({
|
|
13
16
|
port: shared_1.xInt.required(),
|
|
14
17
|
name: shared_1.xString,
|
|
15
18
|
locationId: shared_1.xObjectId,
|
|
16
19
|
location: exports.upsertedLocationSchema,
|
|
17
20
|
});
|
|
18
|
-
exports.portalAntennaSchema = shared_1.xArray(exports.antennaSchema.xor('location', 'locationId'), 'port')
|
|
21
|
+
exports.portalAntennaSchema = (0, shared_1.xArray)(exports.antennaSchema.xor('location', 'locationId'), 'port')
|
|
19
22
|
.required()
|
|
20
23
|
.min(1);
|
|
21
|
-
exports.virtualAntennaSchema = shared_1.xArray(exports.antennaSchema.oxor('location', 'locationId'), 'port').min(1);
|
|
22
|
-
exports.postReadersRequestSchema = shared_1.xArray(joi_1.object({
|
|
23
|
-
name: joi_1.when('type', {
|
|
24
|
+
exports.virtualAntennaSchema = (0, shared_1.xArray)(exports.antennaSchema.oxor('location', 'locationId'), 'port').min(1);
|
|
25
|
+
exports.postReadersRequestSchema = (0, shared_1.xArray)(joi_1.default.object({
|
|
26
|
+
name: joi_1.default.when('type', {
|
|
24
27
|
is: 'FIXED',
|
|
25
28
|
then: shared_1.xString,
|
|
26
29
|
otherwise: shared_1.xString.required(),
|
|
27
30
|
}),
|
|
28
|
-
type: shared_1.xStringIsOneOf(...constants_1.READER_TYPES).required(),
|
|
29
|
-
deviceType: shared_1.xStringIsOneOf(...constants_1.DEVICE_TYPES).required(),
|
|
30
|
-
deviceId: joi_1.when('deviceType', {
|
|
31
|
+
type: (0, shared_1.xStringIsOneOf)(...constants_1.READER_TYPES).required(),
|
|
32
|
+
deviceType: (0, shared_1.xStringIsOneOf)(...constants_1.DEVICE_TYPES).required(),
|
|
33
|
+
deviceId: joi_1.default.when('deviceType', {
|
|
31
34
|
switch: [
|
|
32
35
|
{
|
|
33
|
-
is: shared_1.xStringIsOneOf(...constants_1.getDeviceTypesForFormat('mac')),
|
|
36
|
+
is: (0, shared_1.xStringIsOneOf)(...(0, constants_1.getDeviceTypesForFormat)('mac')),
|
|
34
37
|
then: shared_1.xMacAddress,
|
|
35
38
|
},
|
|
36
39
|
{
|
|
37
|
-
is: shared_1.xStringIsOneOf(...constants_1.getDeviceTypesForFormat('string')),
|
|
40
|
+
is: (0, shared_1.xStringIsOneOf)(...(0, constants_1.getDeviceTypesForFormat)('string')),
|
|
38
41
|
then: shared_1.xString,
|
|
39
42
|
},
|
|
40
43
|
],
|
|
41
|
-
otherwise: joi_1.forbidden(),
|
|
44
|
+
otherwise: joi_1.default.forbidden(),
|
|
42
45
|
}),
|
|
43
|
-
locationId: joi_1.when('type', {
|
|
46
|
+
locationId: joi_1.default.when('type', {
|
|
44
47
|
is: 'FIXED',
|
|
45
48
|
then: shared_1.xObjectId
|
|
46
49
|
.required()
|
|
47
|
-
.when('location', { is: joi_1.exist(), then: joi_1.forbidden() }),
|
|
48
|
-
otherwise: joi_1.forbidden(),
|
|
50
|
+
.when('location', { is: joi_1.default.exist(), then: joi_1.default.forbidden() }),
|
|
51
|
+
otherwise: joi_1.default.forbidden(),
|
|
49
52
|
}),
|
|
50
|
-
location: joi_1.when('type', {
|
|
53
|
+
location: joi_1.default.when('type', {
|
|
51
54
|
is: 'FIXED',
|
|
52
55
|
then: exports.upsertedLocationSchema
|
|
53
56
|
.required()
|
|
54
|
-
.when('locationId', { is: joi_1.exist(), then: joi_1.forbidden() }),
|
|
55
|
-
otherwise: joi_1.forbidden(),
|
|
57
|
+
.when('locationId', { is: joi_1.default.exist(), then: joi_1.default.forbidden() }),
|
|
58
|
+
otherwise: joi_1.default.forbidden(),
|
|
56
59
|
}),
|
|
57
|
-
network: networks_1.networkSchema(),
|
|
58
|
-
antennas: joi_1.when('type', {
|
|
60
|
+
network: (0, networks_1.networkSchema)(),
|
|
61
|
+
antennas: joi_1.default.when('type', {
|
|
59
62
|
switch: [
|
|
60
63
|
{
|
|
61
64
|
is: 'PORTAL',
|
|
@@ -66,9 +69,9 @@ exports.postReadersRequestSchema = shared_1.xArray(joi_1.object({
|
|
|
66
69
|
then: exports.virtualAntennaSchema,
|
|
67
70
|
},
|
|
68
71
|
],
|
|
69
|
-
otherwise: joi_1.forbidden(),
|
|
72
|
+
otherwise: joi_1.default.forbidden(),
|
|
70
73
|
}),
|
|
71
74
|
}).oxor('location', 'locationId')).min(1);
|
|
72
|
-
const validatePostReadersRequest = (payload) => shared_1.validateJoiSchema(exports.postReadersRequestSchema, payload);
|
|
75
|
+
const validatePostReadersRequest = (payload) => (0, shared_1.validateJoiSchema)(exports.postReadersRequestSchema, payload);
|
|
73
76
|
exports.validatePostReadersRequest = validatePostReadersRequest;
|
|
74
77
|
//# sourceMappingURL=request.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../../src/types/readers/post/request.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../../src/types/readers/post/request.ts"],"names":[],"mappings":";;;;;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CAAC,OAAY,EAAE,EAAE,CACzD,IAAA,0BAAiB,EAAqB,gCAAwB,EAAE,OAAO,CAAC,CAAC;AAD9D,QAAA,0BAA0B,8BACoC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import Joi from 'joi';
|
|
1
2
|
import { GetReaderResponse } from '../[id]/get';
|
|
2
3
|
export interface PostReadersResponse {
|
|
3
4
|
inserted: number;
|
|
4
5
|
items: GetReaderResponse[];
|
|
5
6
|
}
|
|
6
|
-
export declare const postReadersResponseSchema:
|
|
7
|
+
export declare const postReadersResponseSchema: Joi.ObjectSchema<PostReadersResponse>;
|
|
7
8
|
export declare const validatePostReadersResponse: (payload: any) => PostReadersResponse;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.validatePostReadersResponse = exports.postReadersResponseSchema = void 0;
|
|
4
|
-
const joi_1 = require("joi");
|
|
7
|
+
const joi_1 = __importDefault(require("joi"));
|
|
5
8
|
const schema_1 = require("../../shared/schema");
|
|
9
|
+
const validate_1 = require("../../shared/validate");
|
|
6
10
|
const get_1 = require("../[id]/get");
|
|
7
|
-
exports.postReadersResponseSchema = joi_1.object({
|
|
11
|
+
exports.postReadersResponseSchema = joi_1.default.object({
|
|
8
12
|
inserted: schema_1.xInt.required(),
|
|
9
|
-
items: schema_1.xArray(get_1.getReaderResponseSchema).min(1).required(),
|
|
13
|
+
items: (0, schema_1.xArray)(get_1.getReaderResponseSchema).min(1).required(),
|
|
10
14
|
});
|
|
11
|
-
const validatePostReadersResponse = (payload) =>
|
|
15
|
+
const validatePostReadersResponse = (payload) => (0, validate_1.validateJoiSchema)(exports.postReadersResponseSchema, payload);
|
|
12
16
|
exports.validatePostReadersResponse = validatePostReadersResponse;
|
|
13
17
|
//# sourceMappingURL=response.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../../src/types/readers/post/response.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../../src/types/readers/post/response.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AACtB,gDAAmD;AACnD,oDAA0D;AAC1D,qCAAyE;AAU5D,QAAA,yBAAyB,GAAG,aAAG,CAAC,MAAM,CAA4B;IAC7E,QAAQ,EAAE,aAAI,CAAC,QAAQ,EAAE;IACzB,KAAK,EAAE,IAAA,eAAM,EAAC,6BAAuB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CACzD,CAAC,CAAC;AAEI,MAAM,2BAA2B,GAAG,CAAC,OAAY,EAAE,EAAE,CAC1D,IAAA,4BAAiB,EAAsB,iCAAyB,EAAE,OAAO,CAAC,CAAC;AADhE,QAAA,2BAA2B,+BACqC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import Joi from 'joi';
|
|
1
2
|
export interface GetReaderSuggestionsQuery {
|
|
2
3
|
search: string;
|
|
3
4
|
maxSuggestions?: number;
|
|
4
5
|
maxMatches?: number;
|
|
5
6
|
}
|
|
6
|
-
export declare const getReaderSuggestionsQuerySchema:
|
|
7
|
+
export declare const getReaderSuggestionsQuerySchema: Joi.ObjectSchema<GetReaderSuggestionsQuery>;
|
|
7
8
|
export declare const validateGetReaderSuggestionsQuery: (payload: any) => GetReaderSuggestionsQuery;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.validateGetReaderSuggestionsQuery = exports.getReaderSuggestionsQuerySchema = void 0;
|
|
4
|
-
const joi_1 = require("joi");
|
|
7
|
+
const joi_1 = __importDefault(require("joi"));
|
|
5
8
|
const shared_1 = require("../../shared");
|
|
6
|
-
exports.getReaderSuggestionsQuerySchema = joi_1.object({
|
|
9
|
+
exports.getReaderSuggestionsQuerySchema = joi_1.default.object({
|
|
7
10
|
search: shared_1.xString.required().lowercase(),
|
|
8
11
|
maxSuggestions: shared_1.xInt.max(10),
|
|
9
12
|
maxMatches: shared_1.xInt.max(10),
|
|
10
13
|
});
|
|
11
|
-
const validateGetReaderSuggestionsQuery = (payload) => shared_1.validateJoiSchema(exports.getReaderSuggestionsQuerySchema, payload);
|
|
14
|
+
const validateGetReaderSuggestionsQuery = (payload) => (0, shared_1.validateJoiSchema)(exports.getReaderSuggestionsQuerySchema, payload);
|
|
12
15
|
exports.validateGetReaderSuggestionsQuery = validateGetReaderSuggestionsQuery;
|
|
13
16
|
//# sourceMappingURL=query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/types/readers/suggestions/query.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/types/readers/suggestions/query.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AACtB,yCAAgE;AAanD,QAAA,+BAA+B,GAAG,aAAG,CAAC,MAAM,CAGvD;IACA,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,iCAAiC,GAAG,CAAC,OAAY,EAAE,EAAE,CAChE,IAAA,0BAAiB,EACf,uCAA+B,EAC/B,OAAO,CACR,CAAC;AAJS,QAAA,iCAAiC,qCAI1C"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import Joi from 'joi';
|
|
1
2
|
import { GetReaderSuggestionsQuery } from './query';
|
|
2
3
|
import { IEmbeddedEntity } from '../../shared';
|
|
3
4
|
export interface GetReaderSuggestionsResponse {
|
|
@@ -5,5 +6,5 @@ export interface GetReaderSuggestionsResponse {
|
|
|
5
6
|
suggestions: string[];
|
|
6
7
|
matches: IEmbeddedEntity[];
|
|
7
8
|
}
|
|
8
|
-
export declare const getReaderSuggestionsResponseSchema:
|
|
9
|
+
export declare const getReaderSuggestionsResponseSchema: Joi.ObjectSchema<GetReaderSuggestionsResponse>;
|
|
9
10
|
export declare const validateGetReaderSuggestionsResponse: (payload: any) => GetReaderSuggestionsResponse;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.validateGetReaderSuggestionsResponse = exports.getReaderSuggestionsResponseSchema = void 0;
|
|
4
|
-
const joi_1 = require("joi");
|
|
7
|
+
const joi_1 = __importDefault(require("joi"));
|
|
5
8
|
const query_1 = require("./query");
|
|
6
9
|
const shared_1 = require("../../shared");
|
|
7
|
-
exports.getReaderSuggestionsResponseSchema = joi_1.object({
|
|
10
|
+
exports.getReaderSuggestionsResponseSchema = joi_1.default.object({
|
|
8
11
|
query: query_1.getReaderSuggestionsQuerySchema.required(),
|
|
9
|
-
suggestions: shared_1.xArrayOfStrings().required(),
|
|
10
|
-
matches: shared_1.xArray(shared_1.embeddedEntitySchema()).required(),
|
|
12
|
+
suggestions: (0, shared_1.xArrayOfStrings)().required(),
|
|
13
|
+
matches: (0, shared_1.xArray)((0, shared_1.embeddedEntitySchema)()).required(),
|
|
11
14
|
});
|
|
12
|
-
const validateGetReaderSuggestionsResponse = (payload) => shared_1.validateJoiSchema(exports.getReaderSuggestionsResponseSchema, payload);
|
|
15
|
+
const validateGetReaderSuggestionsResponse = (payload) => (0, shared_1.validateJoiSchema)(exports.getReaderSuggestionsResponseSchema, payload);
|
|
13
16
|
exports.validateGetReaderSuggestionsResponse = validateGetReaderSuggestionsResponse;
|
|
14
17
|
//# sourceMappingURL=response.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../../src/types/readers/suggestions/response.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../../src/types/readers/suggestions/response.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AACtB,mCAGiB;AACjB,yCAMsB;AAQT,QAAA,kCAAkC,GAC7C,aAAG,CAAC,MAAM,CAA+B;IACvC,KAAK,EAAE,uCAA+B,CAAC,QAAQ,EAAE;IACjD,WAAW,EAAE,IAAA,wBAAe,GAAE,CAAC,QAAQ,EAAE;IACzC,OAAO,EAAE,IAAA,eAAM,EAAC,IAAA,6BAAoB,GAAE,CAAC,CAAC,QAAQ,EAAE;CACnD,CAAC,CAAC;AAEE,MAAM,oCAAoC,GAAG,CAAC,OAAY,EAAE,EAAE,CACnE,IAAA,0BAAiB,EACf,0CAAkC,EAClC,OAAO,CACR,CAAC;AAJS,QAAA,oCAAoC,wCAI7C"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import Joi from 'joi';
|
|
1
2
|
export interface GetReaderForUserRequest {
|
|
2
3
|
deviceId: string;
|
|
3
4
|
}
|
|
4
|
-
export declare const getReaderForUserRequestSchema:
|
|
5
|
+
export declare const getReaderForUserRequestSchema: Joi.ObjectSchema<GetReaderForUserRequest>;
|
|
5
6
|
export declare const validateGetReaderForUserRequest: (payload: any) => GetReaderForUserRequest;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.validateGetReaderForUserRequest = exports.getReaderForUserRequestSchema = void 0;
|
|
4
|
-
const joi_1 = require("joi");
|
|
7
|
+
const joi_1 = __importDefault(require("joi"));
|
|
5
8
|
const shared_1 = require("../../shared");
|
|
6
|
-
exports.getReaderForUserRequestSchema = joi_1.object({
|
|
9
|
+
exports.getReaderForUserRequestSchema = joi_1.default.object({
|
|
7
10
|
deviceId: shared_1.xString.required(),
|
|
8
11
|
});
|
|
9
|
-
const validateGetReaderForUserRequest = (payload) => shared_1.validateJoiSchema(exports.getReaderForUserRequestSchema, payload);
|
|
12
|
+
const validateGetReaderForUserRequest = (payload) => (0, shared_1.validateJoiSchema)(exports.getReaderForUserRequestSchema, payload);
|
|
10
13
|
exports.validateGetReaderForUserRequest = validateGetReaderForUserRequest;
|
|
11
14
|
//# sourceMappingURL=request.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../../src/types/readers/user/request.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../../src/types/readers/user/request.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AACtB,yCAA0D;AAM7C,QAAA,6BAA6B,GAAG,aAAG,CAAC,MAAM,CAGrD;IACA,QAAQ,EAAE,gBAAO,CAAC,QAAQ,EAAE;CAC7B,CAAC,CAAC;AAEI,MAAM,+BAA+B,GAAG,CAAC,OAAY,EAAE,EAAE,CAC9D,IAAA,0BAAiB,EACf,qCAA6B,EAC7B,OAAO,CACR,CAAC;AAJS,QAAA,+BAA+B,mCAIxC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import Joi from 'joi';
|
|
1
2
|
export interface GetReaderForUserResponse {
|
|
2
3
|
id: string;
|
|
3
4
|
name: string;
|
|
@@ -6,5 +7,5 @@ export interface GetReaderForUserResponse {
|
|
|
6
7
|
deviceId: string;
|
|
7
8
|
user: string;
|
|
8
9
|
}
|
|
9
|
-
export declare const getReaderForUserResponseSchema:
|
|
10
|
+
export declare const getReaderForUserResponseSchema: Joi.ObjectSchema<GetReaderForUserResponse>;
|
|
10
11
|
export declare const validateGetReaderForUserResponse: (payload: any) => GetReaderForUserResponse;
|