/* Options: Date: 2024-07-03 13:31:50 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: StatisticQuery.* //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 BookedByDay { public Date: string; public Value: number; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class StatisticQueryResponse { public NumberOfOccuringBookings: number; public NumberOfCanceledBookings: number; public NumberOfCreatedBookings: number; public NumberOfCreatedCustomers: number; public OccuringBookingsByDay: BookedByDay[]; public CanceledBookingsByDay: BookedByDay[]; public CreatedBookingsByDay: BookedByDay[]; public CreatedCustomersByDay: BookedByDay[]; public ResponseStatus: ResponseStatus; public constructor(init?: Partial) { (Object as any).assign(this, init); } } // @Route("/statistics", "GET") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ApiResponse(Description="You have too low privilegies to call this service", StatusCode=403) // @ValidateRequest(Validator="IsAuthenticated") export class StatisticQuery implements IReturn, ICompany { /** @description Enter the company id, if blank company id and you are an admin, your company id will be used. */ // @ApiMember(Description="Enter the company id, if blank company id and you are an admin, your company id will be used.", IsRequired=true, ParameterType="query") public CompanyId: string; /** @description Start of interval to get bookings and customers */ // @ApiMember(Description="Start of interval to get bookings and customers", IsRequired=true, ParameterType="query") // @Required() public From: string; /** @description End of interval to get bookings and customers */ // @ApiMember(Description="End of interval to get bookings and customers", IsRequired=true, ParameterType="query") public To: string; /** @description Set true if you want to include booked events by day */ // @ApiMember(Description="Set true if you want to include booked events by day", ParameterType="query") public IncludeOccuringBookingsByDay: boolean; /** @description Set true if you want to include canceled booked events by day */ // @ApiMember(Description="Set true if you want to include canceled booked events by day", ParameterType="query") public IncludeBookingsCanceledByDay: boolean; /** @description Set true if you want to include booking created by day */ // @ApiMember(Description="Set true if you want to include booking created by day", ParameterType="query") public IncludeCreatedBookingsByDay: boolean; /** @description Set true if you want to include customers created by day */ // @ApiMember(Description="Set true if you want to include customers created by day", ParameterType="query") public IncludeCreatedCustomersByDay: boolean; public constructor(init?: Partial) { (Object as any).assign(this, init); } public getTypeName() { return 'StatisticQuery'; } public getMethod() { return 'GET'; } public createResponse() { return new StatisticQueryResponse(); } }