/* Options: Date: 2024-11-07 06:50:20 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: DeleteServiceResourceTypes.* //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 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 class RatingReviewResponse { /** @description The title for the review */ // @ApiMember(Description="The title for the review") public Title: string; /** @description The description for the review */ // @ApiMember(Description="The description for the review") public Description: string; /** @description The rating score */ // @ApiMember(Description="The rating score") public RatingScore: number; /** @description The review author */ // @ApiMember(Description="The review author") public Author: string; /** @description The created date */ // @ApiMember(Description="The created date") public Created: string; /** @description The review answer from the company */ // @ApiMember(Description="The review answer from the company") public ReviewAnswer: string; public constructor(init?: Partial) { (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 GroupBookingSettings { public Active: boolean; public Min: number; public Max: number; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class MultipleResourceSettings { public Active: boolean; public Min: number; public Max: number; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class CustomFieldValueResponse { public Value: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class CustomFieldConfigData { /** @description Custom field id */ // @ApiMember(Description="Custom field id") public Id: number; /** @description Configuration name. Example: 'Number of persons'. */ // @ApiMember(Description="Configuration name. Example: 'Number of persons'.") public Name: string; /** @description Custom field description. Example: 'For how many persons is this booking?' */ // @ApiMember(Description="Custom field description. Example: 'For how many persons is this booking?'") public Description: string; /** @description Field width. Example: 20 for 20px */ // @ApiMember(Description="Field width. Example: 20 for 20px") public Width?: number; /** @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; /** @description Default value of the field. Example: '3' */ // @ApiMember(Description="Default value of the field. Example: '3'") public DefaultValue: string; /** @description Determines if the field is required to have a value or not */ // @ApiMember(Description="Determines if the field is required to have a value or not") public IsMandatory: boolean; /** @description Error message shown to the user if the field data is required but not entered */ // @ApiMember(Description="Error message shown to the user if the field data is required but not entered") public MandatoryErrorMessage: string; /** @description Max lenght of the field */ // @ApiMember(Description="Max lenght of the field") public MaxLength: number; /** @description If the field should have multiple lines */ // @ApiMember(Description="If the field should have multiple lines") public MultipleLineText: boolean; /** @description Regular expression used for validation of the field */ // @ApiMember(Description="Regular expression used for validation of the field") public RegEx: string; /** @description Error message shown if the regular expression validation failed */ // @ApiMember(Description="Error message shown if the regular expression validation failed") public RegExErrorMessage: string; /** @description The values to select from if Datatype is DropDown for this custom field */ // @ApiMember(Description="The values to select from if Datatype is DropDown for this custom field") public Values: CustomFieldValueResponse[]; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class CompanyRatingSummary { /** @description The average rating score */ // @ApiMember(Description="The average rating score") public AverageScore: number; /** @description The number of ratings of score 1 */ // @ApiMember(Description="The number of ratings of score 1") public RatingScore1Count: number; /** @description The number of ratings of score 2 */ // @ApiMember(Description="The number of ratings of score 2") public RatingScore2Count: number; /** @description The number of ratings of score 3 */ // @ApiMember(Description="The number of ratings of score 3") public RatingScore3Count: number; /** @description The number of ratings of score 4 */ // @ApiMember(Description="The number of ratings of score 4") public RaingScore4Count: number; /** @description The number of ratings of score 5 */ // @ApiMember(Description="The number of ratings of score 5") public RatingScore5Count: number; /** @description The number of ratings */ // @ApiMember(Description="The number of ratings") public Count: number; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class BookingStatusOptionsResponse { public Id: number; public Name: string; public Description: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class ServiceSchedules { public ScheduleType: ScheduleType; public RecurringSchedules: ISchedule[]; public DateSchedules: ISchedule[]; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class ServiceResourceTypeResource { /** @description The resource id */ // @ApiMember(Description="The resource id") public Id: number; /** @description The resource name */ // @ApiMember(Description="The resource name") public Name: string; /** @description The resource description */ // @ApiMember(Description="The resource description") public Description: string; /** @description The resource email */ // @ApiMember(Description="The resource email") public Email: string; /** @description The resource phone */ // @ApiMember(Description="The resource phone") public Phone: string; /** @description The resource color */ // @ApiMember(Description="The resource color") public Color: string; /** @description The resource image */ // @ApiMember(Description="The resource image") public ImageUrl: string; /** @description The priority of the resource */ // @ApiMember(Description="The priority of the resource") public Priority: number; /** @description If the resource want to receive email notifications */ // @ApiMember(Description="If the resource want to receive email notifications") public EmailNotification: boolean; /** @description If the resource want to receive sms notifications */ // @ApiMember(Description="If the resource want to receive sms notifications") public SMSNotification: boolean; /** @description If the resource want to receive email reminders */ // @ApiMember(Description="If the resource want to receive email reminders") public EmailReminder: boolean; /** @description If the resource want to receive sms reminders */ // @ApiMember(Description="If the resource want to receive sms reminders") public SMSReminder: boolean; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class ServiceResourceTypeResponse { /** @description The resourcetype id */ // @ApiMember(Description="The resourcetype id") public Id: number; /** @description The resourcetype is selectable by customer */ // @ApiMember(Description="The resourcetype is selectable by customer") public SelectableByUser: boolean; /** @description The resourcetype name */ // @ApiMember(Description="The resourcetype name") public Name: string; /** @description The resourcetype description */ // @ApiMember(Description="The resourcetype description") public Description: string; /** @description The resources in the resourcetype. Only shows active resources if not admin. */ // @ApiMember(Description="The resources in the resourcetype. Only shows active resources if not admin.") public Resources: ServiceResourceTypeResource[]; 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 ServicePriceResponse { /** @description The company id */ // @ApiMember(Description="The company id") public CompanyId: string; /** @description The price id */ // @ApiMember(Description="The price id") public Id: number; /** @description The service id */ // @ApiMember(Description="The service id") public ServiceId: number; /** @description The price */ // @ApiMember(Description="The price") public Price: number; /** @description The price calculation type id, 1 = Normal, price is for the service total duration, 2 = Price is per minute, 3 = Price is per hour, 4= Price is per day */ // @ApiMember(Description="The price calculation type id, 1 = Normal, price is for the service total duration, 2 = Price is per minute, 3 = Price is per hour, 4= Price is per day") public CalculationTypeId: number; /** @description The price currency */ // @ApiMember(Description="The price currency") public CurrencyId: string; /** @description The price sign */ // @ApiMember(Description="The price sign") public PriceSign: string; /** @description The price VAT in percent */ // @ApiMember(Description="The price VAT in percent") public VAT: number; /** @description The price category if price has a category */ // @ApiMember(Description="The price category if price has a category") public Category: string; /** @description The price text to display */ // @ApiMember(Description="The price text to display") public PriceText: string; /** @description The valid from date for the price. */ // @ApiMember(Description="The valid from date for the price.") public From: string; /** @description The valid to date for the price. */ // @ApiMember(Description="The valid to date for the price.") public To: string; /** @description If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update. */ // @ApiMember(Description="If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.") public DaysOfWeek: DayOfWeekDto[]; /** @description If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update. */ // @ApiMember(Description="If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.") public FromTime?: string; /** @description If the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters. */ // @ApiMember(Description="If the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters.") public ToTime?: string; public Service: ServiceInfoResponse; /** @description If the price is only valid for a specific time span */ // @ApiMember(Description="If the price is only valid for a specific time span") public IsTimeSpecific: boolean; /** @description If the price is only valid for specific days of week */ // @ApiMember(Description="If the price is only valid for specific days of week") public IsDaysOfWeekSpecific: boolean; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class ServiceQueryResponse { public Id: number; public Name: string; public Description: string; public ImageUrl: string; public TotalSpots: number; /** @description If this setting is turned on the remaining spots (if Totalspots > 1) is locked from be booked by another customer. */ // @ApiMember(Description="If this setting is turned on the remaining spots (if Totalspots > 1) is locked from be booked by another customer.") public LockSpotsToBooking?: boolean; public MinNumberOfSpotsPerBooking: number; public MaxNumberOfSpotsPerBooking: number; public MinNumberOfResourcesToBook: number; public MaxNumberOfResourcesToBook: number; public UnbookBeforeDays: number; public UnbookBeforeHours: number; public UnbookBeforeMinutes: number; /** @description What type of schedule is connected to the service. RecurringSchedule = 1, DateSchedule = 2 */ // @ApiMember(Description="What type of schedule is connected to the service. RecurringSchedule = 1, DateSchedule = 2") public ScheduleType: ScheduleType; /** @description What type of schedule is connected to the service. RecurringSchedule = 1, DateSchedule = 2 */ // @ApiMember(Description="What type of schedule is connected to the service. RecurringSchedule = 1, DateSchedule = 2") public ScheduleTypeId: number; public BookBeforeDays: number; public BookBeforeHours: number; public BookBeforeMinutes: number; public Group: string; public EnableBookingQueue: boolean; public EnableCodeLockSync: boolean; public EnableCustomerManualPayment: boolean; public SortOrder: number; public Active: boolean; public IsGroupBooking: boolean; public GroupBooking: GroupBookingSettings; public MultipleResource: MultipleResourceSettings; public IsPaymentEnabled: boolean; /** @description Maximum numbers of minutes the booking payment must be completed before automatically unbooked */ // @ApiMember(Description="Maximum numbers of minutes the booking payment must be completed before automatically unbooked") public MaxPaymentTime: number; /** @description If the booking should be either 1 = Booked) or 3 = Reserved. Default is 1 = Booked. */ // @ApiMember(Description="If the booking should be either 1 = Booked) or 3 = Reserved. Default is 1 = Booked.") public BookingStatusId: number; public OnlyVisibleByAdmin: boolean; public LengthInMinutes?: number; public DurationTypeId: number; public Duration?: number; public MinDuration?: number; public MaxDuration?: number; public DurationInterval?: number; public PauseAfterBooking: number; public CustomFields: CustomFieldConfigData[]; public CustomFieldValues: CustomFieldDataResponse[]; public BookingCustomFields: CustomFieldConfigData[]; public CustomerCustomFields: CustomFieldConfigData[]; /** @description The booking status options to choose from */ // @ApiMember(Description="The booking status options to choose from") public BookingStatusOptions: BookingStatusOptionsResponse[]; public Prices: ServicePriceResponse[]; public Schedules: ServiceSchedules; public RatingSummary: CompanyRatingSummary; public Reviews: RatingReviewResponse[]; public ResourceTypes: ServiceResourceTypeResponse[]; public ResponseStatus: ResponseStatus; public PriceViewTypeId?: number; public constructor(init?: Partial) { (Object as any).assign(this, init); } } // @Route("/services/{Id}/resourcetypes/{ResourceTypeId}", "DELETE") // @ValidateRequest(Validator="IsAuthenticated") export class DeleteServiceResourceTypes 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 Id of the service */ // @ApiMember(Description="Id of the service", IsRequired=true, ParameterType="path") public Id: number; /** @description Ids of Resource Type of the service to remove */ // @ApiMember(Description="Ids of Resource Type of the service to remove", IsRequired=true, ParameterType="path") public ResourceTypeId: number; public constructor(init?: Partial) { (Object as any).assign(this, init); } public getTypeName() { return 'DeleteServiceResourceTypes'; } public getMethod() { return 'DELETE'; } public createResponse() { return new ServiceQueryResponse(); } }