/* Options: Date: 2024-11-21 11:41:01 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: TestRecurringSchedule.* //ExcludeTypes: //DefaultImports: */ export interface IReturn { createResponse(): T; } export interface ICompany { CompanyId?: string; } export enum BookingStatusEnum { Booked = 1, Unbooked = 2, Reserved = 3, Canceled = 4, AwaitingPayment = 5, AwaitingPaymentNoTimeLimit = 6, Payed = 7, AwaitingPaymentRequestFromAdmin = 8, AwaitingPaymentFromProvider = 9, Invoiced = 10, } export interface IInterval { From: string; To: string; } export class BaseModel { public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class CustomFieldValue extends BaseModel { // @Required() public CompanyId: string; public Id: number; // @Required() public Value: string; // @Required() public Active: boolean; public SortOrder?: number; public ModifiedDate?: string; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } export class CustomField extends BaseModel { // @Required() public Table: string; // @Required() public Column: string; // @Required() public DataType: string; // @Required() public Description: string; // @Required() public Active: boolean; public ModifiedDate?: string; public Id: number; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } export class RegEx extends BaseModel { // @Required() public Name: string; // @Required() public Description: string; // @Required() public RegExCode: string; public ErrorMessage: string; public ModifiedDate?: string; public Id: number; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } export class CustomFieldServiceRelation extends BaseModel { // @Required() public CompanyId: string; public Id: number; // @Required() public CustomFieldConfigId: number; // @Required() public ServiceId: number; public ModifiedDate?: string; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } export class CustomFieldConfig extends BaseModel { // @Ignore() public Values: CustomFieldValue[]; public CustomField: CustomField; // @Ignore() public RegEx: RegEx; // @Ignore() public Services: Service[]; public CustomFieldServiceRelation: CustomFieldServiceRelation[]; // @Required() public CompanyId: string; public Id: number; public GroupId?: number; // @Required() public FieldId: number; // @Required() public IconId: number; public RegExId?: number; // @Required() public Name: string; // @Required() public Description: string; // @Required() public Datatype: string; // @Required() public MaxLength: number; // @Required() public IsPublic: boolean; // @Required() public IsHidden: boolean; // @Required() public IsMandatory: boolean; public DefaultValue: string; public RegExErrorMessage: string; public MandatoryErrorMessage: string; public Width?: number; // @Required() public MultipleLineText: boolean; public ModifiedDate?: string; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } export interface ITimeException extends IInterval { Id: number; ReasonText: string; IsBlock: boolean; ReasonTextPublic: string; IsRecurring: boolean; ResourceIds: number[]; } export class BookedCustomer { public Id: string; public Firstname: string; public Lastname: string; public Email: string; public Phone: string; public FacebookUserName: string; public ImageUrl: string; public CorporateIdentityNumber: string; public InvoiceAddress1: string; public InvoiceAddress2: string; public InvoiceCity: string; public InvoicePostalCode: string; public InvoiceCountryCode: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export interface IBookedTime extends IInterval { Id: number; ServiceId: number; BookedSpots: number; TotalSpots: number; PauseAfterInMinutes: number; Status: BookingStatusEnum; StatusId: number; Customer: BookedCustomer; } export class CustomFieldDataResponse { public Id: number; public Column: string; public Name: string; public Description: string; public Value: string; /** @description Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox' */ // @ApiMember(Description="Data field of custom field. Valid values are: TextBox, ... Example: 'TextBox'") public DataType: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class Resource extends BaseModel implements ICustomFieldTable, IBaseModelCreated, IBaseModelUpdated { // @Ignore() public Priority: number; // @Ignore() public Schedules: IList; // @Ignore() public Exceptions: IList; // @Ignore() public Bookings: IList; // @Ignore() public CustomFieldsConfig: IList; // @Ignore() public CustomFieldsData: IList; // @Required() public CompanyId: string; public Id: number; // @Required() public Name: string; // @Required() public Active: boolean; public Description: string; public ImageUrl: string; // @Required() public UpdatedDate: string; // @Required() public CreatedDate: string; // @Required() public Color: string; public Email: string; public MobilePhone: string; public EmailNotification?: boolean; public SMSNotification?: boolean; // @Required() public SendSMSReminder: boolean; // @Required() public SendEmailReminder: boolean; public ModifiedDate?: string; public AccessGroup: string; public TextField1: string; public TextField2: string; public TextField3: string; public TextField4: string; public TextField5: string; public TextField6: string; public TextField7: string; public TextField8: string; public TextField9: string; public TextField10: string; public TextField11: string; public TextField12: string; public TextField13: string; public TextField14: string; public TextField15: string; public TextField16: string; public TextField17: string; public TextField18: string; public TextField19: string; public TextField20: string; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } export enum ScheduleType { NotDefined = 'NotDefined', RecurringSchedule = 'RecurringSchedule', DateSchedule = 'DateSchedule', } export interface ISchedule { Resources: IList; Type: ScheduleType; Active: boolean; IsResourceSpecific: boolean; } export class AddRecurringScheduleDate { /** @description The date for the schedule opening (only date part is used here */ // @ApiMember(Description="The date for the schedule opening (only date part is used here", IsRequired=true) public Date: string; /** @description The time for the schedule opening hours (starttime) */ // @ApiMember(Description="The time for the schedule opening hours (starttime)", IsRequired=true) public StartTime: string; /** @description The time for the schedule opening hours (endtime) */ // @ApiMember(Description="The time for the schedule opening hours (endtime)", IsRequired=true) public EndTime: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class ScheduleException { public StartTime: string; public EndTime: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class AddScheduleService { /** @description The service id */ // @ApiMember(Description="The service id", IsRequired=true) public Id: number; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class ExceptionText { public Reason: string; public ReasonPublic: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class AvailableTimesSum implements IAvailableTime { public From: string; public To: string; public Free: number; public FreeSpots: number; public ExceptionTexts: ExceptionText[]; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export interface IBaseModelCreated { CreatedDate: string; } export interface IBaseModelUpdated { UpdatedDate: string; } export interface ICustomFieldTable { CustomFieldsConfig: IList; CustomFieldsData: IList; TextField1: string; TextField2: string; TextField3: string; TextField4: string; TextField5: string; TextField6: string; TextField7: string; TextField8: string; TextField9: string; TextField10: string; TextField11: string; TextField12: string; TextField13: string; TextField14: string; TextField15: string; TextField16: string; TextField17: string; TextField18: string; TextField19: string; TextField20: string; } export interface IAvailableTime extends IInterval { Free: number; } export class AvailableTimesResponse { public CompanyId: string; public ServiceId: number; public TimesFreeTextSingle: string; public TimesFreeTextMultiple: string; public Times: AvailableTimesSum[]; public constructor(init?: Partial) { (Object as any).assign(this, init); } } // @Route("/schedules/recurring/test", "POST") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") export class TestRecurringSchedule implements IReturn, ICompany, IInterval { /** @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 From what datetime to show available times */ // @ApiMember(DataType="dateTime", Description="From what datetime to show available times", IsRequired=true, ParameterType="query") public From: string; /** @description To what datetime to show available times */ // @ApiMember(DataType="dateTime", Description="To what datetime to show available times", IsRequired=true, ParameterType="query") public To: string; /** @description The Service Duration to be faked if there is no Service selected */ // @ApiMember(Description="The Service Duration to be faked if there is no Service selected") public Duration?: number; /** @description Time interval for available times. Here you set the interval at which times should appear. For example, if you select the range 15minutes, and your service has an duration of 1 hour and opening hours are 9AM to 6PM you will see the following suggested times: 09AM-10PM 09:15AM-10:15PM, 09:30AM-10:30PM , ..... 04:45PM-05:45, 05:00PM-06:00PM */ // @ApiMember(Description="Time interval for available times. Here you set the interval at which times should appear. For example, if you select the range 15minutes, and your service has an duration of 1 hour and opening hours are 9AM to 6PM you will see the following suggested times: 09AM-10PM 09:15AM-10:15PM, 09:30AM-10:30PM , ..... 04:45PM-05:45, 05:00PM-06:00PM", IsRequired=true) public TimeInterval: number; /** @description Allow bookings end time exceeds the opening hours Here you can choose whether it should be possible to make a reservation exceeding the opening hours. This should be ticked when a service duration is longer than 24 hours (possible to book over midnight). */ // @ApiMember(Description="Allow bookings end time exceeds the opening hours Here you can choose whether it should be possible to make a reservation exceeding the opening hours. This should be ticked when a service duration is longer than 24 hours (possible to book over midnight).", IsRequired=true) public EnableBookingUntilClosingTime: boolean; /** @description The timestamp to which the schedule is valid from */ // @ApiMember(Description="The timestamp to which the schedule is valid from", IsRequired=true) public ValidFrom: string; /** @description The timestamp to which the schedule is valid to */ // @ApiMember(Description="The timestamp to which the schedule is valid to", IsRequired=true) public ValidTo: string; /** @description The time for the schedule opening hours (starttime) */ // @ApiMember(Description="The time for the schedule opening hours (starttime)", IsRequired=true) public StartTime: string; /** @description The time for the schedule opening hours (endtime) */ // @ApiMember(Description="The time for the schedule opening hours (endtime)", IsRequired=true) public EndTime: string; /** @description The number of days the schedule is valid from todays date */ // @ApiMember(Description="The number of days the schedule is valid from todays date", IsRequired=true) public NumberOfScheduleDays: number; /** @description If recurring, an array indicating which days of the week the schedule recures on where 1 = Monday .. 7 = Sunday. When recurring then the time portion of the Fields From and To indicates the time of day the recurrence occurs */ // @ApiMember(Description="If recurring, an array indicating which days of the week the schedule recures on where 1 = Monday .. 7 = Sunday. When recurring then the time portion of the Fields From and To indicates the time of day the recurrence occurs") public DaysOfWeek: number[]; /** @description If not recuring, an array indicating which dates that are open for the schedule. */ // @ApiMember(Description="If not recuring, an array indicating which dates that are open for the schedule.") public ScheduleDates: AddRecurringScheduleDate[]; /** @description Schedule exceptions. For example closed on lunch time between 12AM and 1PM. These times will be removed from the recurring schedule. */ // @ApiMember(Description="Schedule exceptions. For example closed on lunch time between 12AM and 1PM. These times will be removed from the recurring schedule.") public Exceptions: ScheduleException[]; // @ApiMember() public Services: AddScheduleService[]; // @ApiMember() public Resources: Resource[]; public constructor(init?: Partial) { (Object as any).assign(this, init); } public getTypeName() { return 'TestRecurringSchedule'; } public getMethod() { return 'POST'; } public createResponse() { return new AvailableTimesResponse(); } }