/* Options: Date: 2024-11-21 12:33:41 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: CreateNewsItem.* //ExcludeTypes: //DefaultImports: */ export interface IReturn { createResponse(): T; } export interface ICompany { CompanyId?: string; } // @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 NewsItemQueryResponse { /** @description The news item id */ // @ApiMember(Description="The news item id") public Id: number; /** @description Heading of the news item */ // @ApiMember(Description="Heading of the news item") public Heading: string; /** @description Body of the news item */ // @ApiMember(Description="Body of the news item") public Body: string; /** @description Url to a image associated with the news */ // @ApiMember(Description="Url to a image associated with the news") public ImageUrl: string; /** @description The timestamp from which the newsitem should be visible from */ // @ApiMember(Description="The timestamp from which the newsitem should be visible from", IsRequired=true) public From: string; /** @description The timestamp to which the newsitem should be visible to */ // @ApiMember(Description="The timestamp to which the newsitem should be visible to", IsRequired=true) public To: string; /** @description The timestamp when news was created */ // @ApiMember(Description="The timestamp when news was created", IsRequired=true) public Created: string; public ResponseStatus: ResponseStatus; public constructor(init?: Partial) { (Object as any).assign(this, init); } } // @Route("/news", "POST") // @ValidateRequest(Validator="IsAuthenticated") export class CreateNewsItem implements IReturn, ICompany { /** @description The company id, if empty will use the company id for the user you are logged in with. */ // @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.") public CompanyId?: string; /** @description The news item header, keep this short and concise */ // @ApiMember(Description="The news item header, keep this short and concise", IsRequired=true) public Heading: string; /** @description The news body text */ // @ApiMember(Description="The news body text", IsRequired=true) public Body: string; /** @description Valid url to a image associated with the news */ // @ApiMember(Description="Valid url to a image associated with the news") public ImageUrl: string; /** @description The timestamp from which the newsitem should be visible from */ // @ApiMember(Description="The timestamp from which the newsitem should be visible from", IsRequired=true) public From: string; /** @description The timestamp to which the newsitem should be visible to */ // @ApiMember(Description="The timestamp to which the newsitem should be visible to", IsRequired=true) public To: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } public getTypeName() { return 'CreateNewsItem'; } public getMethod() { return 'POST'; } public createResponse() { return new NewsItemQueryResponse(); } }