UNPKG

homebridge-config-ui-x

Version:

A web based management, configuration and control platform for Homebridge.

57 lines 2.03 kB
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); }; import { ApiProperty } from '@nestjs/swagger'; import { IsDefined, IsIn, IsNotEmpty, IsOptional, IsString } from 'class-validator'; export class AuthDto { username; password; otp; } __decorate([ IsDefined(), IsString(), IsNotEmpty(), ApiProperty({ type: String }), __metadata("design:type", String) ], AuthDto.prototype, "username", void 0); __decorate([ IsDefined(), IsString(), IsNotEmpty(), ApiProperty({ type: String }), __metadata("design:type", String) ], AuthDto.prototype, "password", void 0); __decorate([ IsString(), IsOptional(), ApiProperty({ required: false, type: String }), __metadata("design:type", String) ], AuthDto.prototype, "otp", void 0); export const REFRESH_TOKEN_REASONS = [ 'hb-session-bootstrap', 'admin-guard', 'session-extension', 'profile-update', ]; export class RefreshTokenDto { reason; } __decorate([ IsOptional(), IsString(), IsIn(REFRESH_TOKEN_REASONS), ApiProperty({ required: false, enum: REFRESH_TOKEN_REASONS, description: 'Why the client is refreshing; affects log wording only.', }), __metadata("design:type", String) ], RefreshTokenDto.prototype, "reason", void 0); //# sourceMappingURL=auth.dto.js.map