"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CheckoutDto = exports.ManualCheckinDto = exports.ScanCheckinDto = void 0;
const swagger_1 = require("@nestjs/swagger");
const class_validator_1 = require("class-validator");
const swagger_docs_1 = require("../../common/swagger-docs");
class ScanCheckinDto {
    estateId;
    qrToken;
    guardId;
    entryGate;
    gateId;
    scanLocation;
    deviceId;
    offlineEventId;
}
exports.ScanCheckinDto = ScanCheckinDto;
__decorate([
    (0, swagger_1.ApiProperty)({ example: swagger_docs_1.ESTATE_ID_EXAMPLE, description: 'Estate where the gate scan happens.' }),
    (0, class_validator_1.IsString)(),
    __metadata("design:type", String)
], ScanCheckinDto.prototype, "estateId", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ example: 'qr-token', description: 'QR token from the visitor pass payload.' }),
    (0, class_validator_1.IsString)(),
    __metadata("design:type", String)
], ScanCheckinDto.prototype, "qrToken", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ example: swagger_docs_1.GUARD_ID_EXAMPLE, description: 'Authenticated guard profile ID. Must match the guard user.' }),
    (0, class_validator_1.IsString)(),
    __metadata("design:type", String)
], ScanCheckinDto.prototype, "guardId", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({ example: 'Main Gate', description: 'Gate where the visitor entered.' }),
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsString)(),
    __metadata("design:type", String)
], ScanCheckinDto.prototype, "entryGate", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({ example: 'gate-uuid', description: 'Gate ID where the visitor entered.' }),
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsString)(),
    __metadata("design:type", String)
], ScanCheckinDto.prototype, "gateId", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({ example: { lat: 6.5244, lng: 3.3792 }, description: 'Optional scanner location metadata.' }),
    (0, class_validator_1.IsOptional)(),
    __metadata("design:type", Object)
], ScanCheckinDto.prototype, "scanLocation", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        example: 'gate-tablet-001',
        description: 'Optional scanner device ID. If the guard has no assigned device, first use binds this device to the guard; future mismatches are rejected.'
    }),
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsString)(),
    __metadata("design:type", String)
], ScanCheckinDto.prototype, "deviceId", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({ example: 'offline-event-001', description: 'Optional client event ID for offline-originated scans.' }),
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsString)(),
    __metadata("design:type", String)
], ScanCheckinDto.prototype, "offlineEventId", void 0);
class ManualCheckinDto {
    estateId;
    visitorCode;
    guardId;
    entryGate;
    gateId;
    scanLocation;
    deviceId;
    offlineEventId;
}
exports.ManualCheckinDto = ManualCheckinDto;
__decorate([
    (0, swagger_1.ApiProperty)({ example: swagger_docs_1.ESTATE_ID_EXAMPLE, description: 'Estate where the manual check-in happens.' }),
    (0, class_validator_1.IsString)(),
    __metadata("design:type", String)
], ManualCheckinDto.prototype, "estateId", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ example: 'ABC12345', description: 'Manual visitor code printed or shared with the visitor.' }),
    (0, class_validator_1.IsString)(),
    __metadata("design:type", String)
], ManualCheckinDto.prototype, "visitorCode", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ example: swagger_docs_1.GUARD_ID_EXAMPLE, description: 'Authenticated guard profile ID. Must match the guard user.' }),
    (0, class_validator_1.IsString)(),
    __metadata("design:type", String)
], ManualCheckinDto.prototype, "guardId", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({ example: 'Main Gate', description: 'Gate where the visitor entered.' }),
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsString)(),
    __metadata("design:type", String)
], ManualCheckinDto.prototype, "entryGate", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({ example: 'gate-uuid', description: 'Gate ID where the visitor entered.' }),
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsString)(),
    __metadata("design:type", String)
], ManualCheckinDto.prototype, "gateId", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({ example: { lat: 6.5244, lng: 3.3792 }, description: 'Optional scanner location metadata.' }),
    (0, class_validator_1.IsOptional)(),
    __metadata("design:type", Object)
], ManualCheckinDto.prototype, "scanLocation", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        example: 'gate-tablet-001',
        description: 'Optional scanner device ID. If the guard has no assigned device, first use binds this device to the guard; future mismatches are rejected.'
    }),
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsString)(),
    __metadata("design:type", String)
], ManualCheckinDto.prototype, "deviceId", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({ example: 'offline-event-001', description: 'Optional client event ID for offline-originated check-ins.' }),
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsString)(),
    __metadata("design:type", String)
], ManualCheckinDto.prototype, "offlineEventId", void 0);
class CheckoutDto {
    visitSessionId;
    guardId;
    exitGate;
    gateId;
    deviceId;
}
exports.CheckoutDto = CheckoutDto;
__decorate([
    (0, swagger_1.ApiProperty)({ example: swagger_docs_1.VISIT_SESSION_ID_EXAMPLE, description: 'Open visit session to check out.' }),
    (0, class_validator_1.IsString)(),
    __metadata("design:type", String)
], CheckoutDto.prototype, "visitSessionId", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ example: swagger_docs_1.GUARD_ID_EXAMPLE, description: 'Authenticated guard profile ID. Must match the guard user.' }),
    (0, class_validator_1.IsString)(),
    __metadata("design:type", String)
], CheckoutDto.prototype, "guardId", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({ example: 'Main Gate', description: 'Gate where the visitor exited.' }),
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsString)(),
    __metadata("design:type", String)
], CheckoutDto.prototype, "exitGate", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({ example: 'gate-uuid', description: 'Gate ID where the visitor exited.' }),
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsString)(),
    __metadata("design:type", String)
], CheckoutDto.prototype, "gateId", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({
        example: 'gate-tablet-001',
        description: 'Optional scanner device ID used for checkout. Mismatches are rejected when the guard is already assigned to a device.'
    }),
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsString)(),
    __metadata("design:type", String)
], CheckoutDto.prototype, "deviceId", void 0);
//# sourceMappingURL=checkin.dto.js.map