/* Options: Date: 2024-12-03 18:27:38 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: ResourceTimeExceptionQuery.* //ExcludeTypes: //DefaultImports: */ export interface IReturn { createResponse(): T; } // @DataContract export class QueryBase { /** @description Skip over a given number of elements in a sequence and then return the remainder. Use this when you need paging.

Example:
?skip=10&orderBy=Id */ // @DataMember(Order=1) public Skip?: number; /** @description Return a given number of elements in a sequence and then skip over the remainder. Use this when you need paging.

Example:
?take=20 */ // @DataMember(Order=2) public Take?: number; /** @description Comma separated list of fields to order by. Prefix the field name with a minus if you wan't to invert the sort for that field.

Example:
?orderBy=Id,-Age,FirstName */ // @DataMember(Order=3) public OrderBy: string; /** @description Comma separated list of fields to order by in descending order. Prefix the field name with a minus if you wan't to invert the sort for that field.

Example:
?orderByDesc=Id,-Age,FirstName */ // @DataMember(Order=4) public OrderByDesc: string; /** @description Include any of the aggregates AVG, COUNT, FIRST, LAST, MAX, MIN, SUM in your result set. The results will be returned in the meta field.

Example:
?include=COUNT(*) as Total

or multiple fields with
?include=Count(*) Total, Min(Age), AVG(Age) AverageAge

or unique with
?include=COUNT(DISTINCT LivingStatus) as UniqueStatus */ // @DataMember(Order=5) public Include: string; // @DataMember(Order=6) public Fields: string; // @DataMember(Order=7) public Meta: { [index: string]: string; }; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class QueryDb extends QueryBase { public constructor(init?: Partial>) { super(init); (Object as any).assign(this, init); } } // @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 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 enum BokaMeraDayOfWeek { Monday = 1, Tuesday = 2, Wednesday = 3, Thursday = 4, Friday = 5, Saturday = 6, Sunday = 7, } export class ResourceTimeExceptionDayOfWeekRelation extends BaseModel { // @Ignore() public DayOfWeek: BokaMeraDayOfWeek; // @Required() public DayOfWeekId: number; // @Required() public CompanyId: string; // @Required() public ResourceTimeExceptionId: number; public ModifiedDate?: string; public Id: number; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } export class ResourceTimeExceptionResourceRelation extends BaseModel { // @Ignore() public Resource: Resource; // @Required() public CompanyId: string; // @Required() public ResourceTimeExceptionId: number; // @Required() public ResourceId: number; public Id: number; public ModifiedDate?: string; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } export class CalendarExport extends BaseModel { // @Required() public CompanyId: string; // @Required() public BookingId: number; // @Required() public ExceptionId: number; public CalendarSync?: boolean; public CalendarId: string; public IsExceptionDeleted?: boolean; public ModifiedDate?: string; public Id: number; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } export class ResourceTimeException extends BaseModel implements IInterval, IBaseModelCreated, IBaseModelUpdated { public DayOfWeeks: ResourceTimeExceptionDayOfWeekRelation[]; public Resources: ResourceTimeExceptionResourceRelation[]; // @Ignore() public CalendarExport: CalendarExport; // @Required() public CompanyId: string; public Id: number; // @Required() public ReasonText: string; // @Required() public FromTime: string; // @Required() public ToTime: string; // @Required() public UpdatedDate: string; // @Required() public CreatedDate: string; public Color: string; public ReasonTextPublic: string; // @Required() public BlockTime: boolean; // @Required() public Private: boolean; public ModifiedDate?: string; // @Required() public From: string; // @Required() public To: string; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } export class TimeExceptionReosurceDetails { /** @description Ids of the resources that owns this exception */ // @ApiMember(Description="Ids of the resources that owns this exception") public Id: number; /** @description Name of the resource */ // @ApiMember(Description="Name of the resource") public Name: string; /** @description Description of the resource */ // @ApiMember(Description="Description of the resource") public Description: string; /** @description Color of the resource */ // @ApiMember(Description="Color of the resource") public Color: string; /** @description Image of the resource */ // @ApiMember(Description="Image of the resource") public ImageUrl: string; public ResponseStatus: ResponseStatus; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class ExceptionCalendarExportStatus { public CalendarId: string; public ExceptionId: number; public Synced?: boolean; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class DayOfWeekDto { public DayOfWeekId: number; public DotNetDayOfWeekId: number; public DayOfWeek: string; 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 class ResourceTimeExceptionQueryResponse { /** @description Time exception id */ // @ApiMember(Description="Time exception id") public Id: number; /** @description Time company id */ // @ApiMember(Description="Time company id") public CompanyId: string; /** @description If it's locked for editing for the logged in administrator */ // @ApiMember(Description="If it's locked for editing for the logged in administrator") public Locked: boolean; /** @description Resources that owns this exception */ // @ApiMember(Description="Resources that owns this exception") public ResourceIds: number[]; /** @description Resources that owns this exception */ // @ApiMember(Description="Resources that owns this exception") public Resources: TimeExceptionReosurceDetails[]; /** @description Indicates wheter or not the time exception is recurring */ // @ApiMember(Description="Indicates wheter or not the time exception is recurring") public IsRecurring: boolean; /** @description Time exception starting timestamp */ // @ApiMember(Description="Time exception starting timestamp") public From: string; /** @description Time exception ending timestamp */ // @ApiMember(Description="Time exception ending timestamp") public To: string; /** @description If recurring then this value indicates the time of day when the time exception begins */ // @ApiMember(Description="If recurring then this value indicates the time of day when the time exception begins") public FromTime: string; /** @description If recurring then this value indicates the time of day when the time exception ends */ // @ApiMember(Description="If recurring then this value indicates the time of day when the time exception ends") public ToTime: string; /** @description The reason of the time exception, example: Vacation, doctors appointment, ... */ // @ApiMember(Description="The reason of the time exception, example: Vacation, doctors appointment, ...") public ReasonText: string; /** @description The reason of the time exception that could be public to customers, example: Vacation, Closed, Sick leave, ... */ // @ApiMember(Description="The reason of the time exception that could be public to customers, example: Vacation, Closed, Sick leave, ...") public ReasonTextPublic: string; /** @description What hexadecimal color code the exception should have in the scheduler */ // @ApiMember(Description="What hexadecimal color code the exception should have in the scheduler") public Color: string; /** @description If the time exception should block the time in the scheduler so it's not avaialable to book */ // @ApiMember(Description="If the time exception should block the time in the scheduler so it's not avaialable to book") public BlockTime: boolean; /** @description If the ReasonText should only be visible to conncted resources. If false, all resources will be able to see it */ // @ApiMember(Description="If the ReasonText should only be visible to conncted resources. If false, all resources will be able to see it") public Private: boolean; /** @description The status for export to calendars like Gcal */ // @ApiMember(Description="The status for export to calendars like Gcal") public CalendarExportStatus: ExceptionCalendarExportStatus; /** @description If recurring, an array indicating which days of the week the exception 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 exception 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: DayOfWeekDto[]; /** @description The datetime the exception was created */ // @ApiMember(Description="The datetime the exception was created") public Created: string; public ResponseStatus: ResponseStatus; public constructor(init?: Partial) { (Object as any).assign(this, init); } } // @DataContract export class QueryResponse { // @DataMember(Order=1) public Offset: number; // @DataMember(Order=2) public Total: number; // @DataMember(Order=3) public Results: ResourceTimeExceptionQueryResponse[]; // @DataMember(Order=4) public Meta: { [index: string]: string; }; // @DataMember(Order=5) public ResponseStatus: ResponseStatus; public constructor(init?: Partial>) { (Object as any).assign(this, init); } } // @Route("/timeexceptions", "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 ResourceTimeExceptionQuery extends QueryDb implements IReturn> { /** @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 Enter the resource id's separated by comma that you want to see time exceptions for, if no value is given all time exceptions will be returned */ // @ApiMember(Description="Enter the resource id's separated by comma that you want to see time exceptions for, if no value is given all time exceptions will be returned", ParameterType="query") public ResourceIds: number[]; /** @description Start of interval to query for time exceptions. UTC+0 and parameter as defined by date-time - RFC3339 */ // @ApiMember(DataType="dateTime", Description="Start of interval to query for time exceptions. UTC+0 and parameter as defined by date-time - RFC3339") public TimeExceptionStart?: string; /** @description End of interval to query for time exceptions. UTC+0 and parameter as defined by date-time - RFC3339 */ // @ApiMember(DataType="dateTime", Description="End of interval to query for time exceptions. UTC+0 and parameter as defined by date-time - RFC3339") public TimeExceptionEnd?: string; /** @description Include only recurring time exceptions or not, if no value is given, all time exceptions will be returned */ // @ApiMember(Description="Include only recurring time exceptions or not, if no value is given, all time exceptions will be returned", ParameterType="query") public IsRecurring?: boolean; /** @description Include only time exceptions that are blocking, if no value is given, all time exceptions will be returned */ // @ApiMember(Description="Include only time exceptions that are blocking, if no value is given, all time exceptions will be returned", ParameterType="query") public IsBlocking?: boolean; /** @description If you want to include the resource details */ // @ApiMember(DataType="boolean", Description="If you want to include the resource details", ParameterType="query") public IncludeResourceDetails: boolean; /** @description If you want to include google calendar sync status */ // @ApiMember(DataType="boolean", Description="If you want to include google calendar sync status", ParameterType="query") public IncludeCalendarExportStatus: boolean; /** @description The max limit of records you want to retrieve, default is 200 */ // @ApiMember(DataType="int", Description="The max limit of records you want to retrieve, default is 200", ParameterType="query") public MaxLimit?: number; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } public getTypeName() { return 'ResourceTimeExceptionQuery'; } public getMethod() { return 'GET'; } public createResponse() { return new QueryResponse(); } }