/* Options: Date: 2024-07-03 12:35:40 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: CustomFieldQuery.* //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); } } export interface ICompany { CompanyId?: 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 CustomFieldServices { public Id: number; /** @description Name of the service */ // @ApiMember(Description="Name of the service") public Name: string; /** @description The image url of the service */ // @ApiMember(Description="The image url of the service") public ImageUrl: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class CustomFieldLookupResponse { public Id?: number; public Active?: boolean; public SortOrder?: number; public Value: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class CustomFieldQueryResponse { /** @description Custom field id */ // @ApiMember(Description="Custom field id") public Id: number; /** @description Reference to company that owns the custom field configuration */ // @ApiMember(Description="Reference to company that owns the custom field configuration") public CompanyId: string; /** @description Group id */ // @ApiMember(Description="Group id") public GroupId?: number; /** @description Field id */ // @ApiMember(Description="Field id") public FieldId: number; /** @description Configuration name. Example: 'Number of persons'. */ // @ApiMember(Description="Configuration name. Example: 'Number of persons'.") public Name: string; /** @description Field width. Example: 20 */ // @ApiMember(Description="Field width. Example: 20") public Width: number; /** @description Column in database where to store the information. Example: 'TextField1' */ // @ApiMember(Description="Column in database where to store the information. Example: 'TextField1'") public Column: 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 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 Regular expression id for validation of the field */ // @ApiMember(Description="Regular expression id for validation of the field") public RegExId?: number; /** @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 If the field is visible to the customer */ // @ApiMember(Description="If the field is visible to the customer") public IsPublic: boolean; /** @description If the field should be hidden in lists */ // @ApiMember(Description="If the field should be hidden in lists") public IsHidden: boolean; /** @description Table to which the field belongs */ // @ApiMember(Description="Table to which the field belongs") public Table: 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: CustomFieldLookupResponse[]; /** @description The services that is connected to the custom field */ // @ApiMember(Description="The services that is connected to the custom field") public Services: CustomFieldServices[]; 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: CustomFieldQueryResponse[]; // @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("/customfields", "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 CustomFieldQuery extends QueryDb implements IReturn>, ICompany { /** @description One or multiple id's of custom fields to find */ // @ApiMember(Description="One or multiple id's of custom fields to find", ParameterType="query") public Ids: number[]; /** @description Company id to find custom fields for */ // @ApiMember(Description="Company id to find custom fields for", ParameterType="query") public CompanyId?: string; /** @description Table to which the custom field belongs to */ // @ApiMember(Description="Table to which the custom field belongs to", ParameterType="query") public Table: string; /** @description Active or removed fields, empty parameter includes both */ // @ApiMember(Description="Active or removed fields, empty parameter includes both", ParameterType="query") public Active?: boolean; /** @description If you want to include the custom fields values to select from when using dropdown as datatype */ // @ApiMember(Description="If you want to include the custom fields values to select from when using dropdown as datatype", ParameterType="query") public IncludeCustomFieldValues: boolean; /** @description If you want to include the connected services for the custom field */ // @ApiMember(DataType="bool", Description="If you want to include the connected services for the custom field", ParameterType="query") public IncludeConnectedServices: boolean; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } public getTypeName() { return 'CustomFieldQuery'; } public getMethod() { return 'GET'; } public createResponse() { return new QueryResponse(); } }