/* Options: Date: 2024-11-21 11:29:34 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bokamera.se //GlobalNamespace: //MakePropertiesOptional: False //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: GenerateToken.* //ExcludeTypes: //DefaultImports: */ export interface IReturn { createResponse(): T; } // @DataContract export class ResponseError { // @DataMember(Order=1) public ErrorCode: string; // @DataMember(Order=2) public FieldName: string; // @DataMember(Order=3) public Message: string; // @DataMember(Order=4) public Meta: { [index: string]: string; }; public constructor(init?: Partial) { (Object as any).assign(this, init); } } // @DataContract export class ResponseStatus { // @DataMember(Order=1) public ErrorCode: string; // @DataMember(Order=2) public Message: string; // @DataMember(Order=3) public StackTrace: string; // @DataMember(Order=4) public Errors: ResponseError[]; // @DataMember(Order=5) public Meta: { [index: string]: string; }; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class TokenResponse { /** @description The token indentifier */ // @ApiMember(Description="The token indentifier") public TokenIdentifier: string; public Type: number; /** @description The unique token */ // @ApiMember(Description="The unique token", IsRequired=true) public UniqueToken: string; public ExpirationDate: string; public ResponseStatus: ResponseStatus; public constructor(init?: Partial) { (Object as any).assign(this, init); } } // @Route("/token", "POST") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") export class GenerateToken implements IReturn { /** @description The token identifier */ // @ApiMember(Description="The token identifier") public TokenIdentifier: string; /** @description The token type */ // @ApiMember(Description="The token type", IsRequired=true) public Type: number; /** @description The token expiration datetime */ // @ApiMember(Description="The token expiration datetime", IsRequired=true) public ExpirationDate: string; /** @description The unique token.If empty a unique token will be generated automatically */ // @ApiMember(Description="The unique token.If empty a unique token will be generated automatically", IsRequired=true) public UniqueToken: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } public getTypeName() { return 'GenerateToken'; } public getMethod() { return 'POST'; } public createResponse() { return new TokenResponse(); } }