/* Options: Date: 2024-11-21 12:43:44 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.bokamera.se //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CustomFieldQuery.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; abstract class ICompany { String? CompanyId; } class BaseModel implements IConvertible { BaseModel(); BaseModel.fromJson(Map json) : super(); fromMap(Map json) { return this; } Map toJson() => {}; getTypeName() => "BaseModel"; TypeContext? context = _ctx; } class CustomFieldValue extends BaseModel implements IConvertible { // @Required() String? CompanyId; int? Id; // @Required() String? Value; // @Required() bool? Active; int? SortOrder; DateTime? ModifiedDate; CustomFieldValue({this.CompanyId,this.Id,this.Value,this.Active,this.SortOrder,this.ModifiedDate}); CustomFieldValue.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); CompanyId = json['CompanyId']; Id = json['Id']; Value = json['Value']; Active = json['Active']; SortOrder = json['SortOrder']; ModifiedDate = JsonConverters.fromJson(json['ModifiedDate'],'DateTime',context!); return this; } Map toJson() => super.toJson()..addAll({ 'CompanyId': CompanyId, 'Id': Id, 'Value': Value, 'Active': Active, 'SortOrder': SortOrder, 'ModifiedDate': JsonConverters.toJson(ModifiedDate,'DateTime',context!) }); getTypeName() => "CustomFieldValue"; TypeContext? context = _ctx; } class CustomField extends BaseModel implements IConvertible { // @Required() String? Table; // @Required() String? Column; // @Required() String? DataType; // @Required() String? Description; // @Required() bool? Active; DateTime? ModifiedDate; int? Id; CustomField({this.Table,this.Column,this.DataType,this.Description,this.Active,this.ModifiedDate,this.Id}); CustomField.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Table = json['Table']; Column = json['Column']; DataType = json['DataType']; Description = json['Description']; Active = json['Active']; ModifiedDate = JsonConverters.fromJson(json['ModifiedDate'],'DateTime',context!); Id = json['Id']; return this; } Map toJson() => super.toJson()..addAll({ 'Table': Table, 'Column': Column, 'DataType': DataType, 'Description': Description, 'Active': Active, 'ModifiedDate': JsonConverters.toJson(ModifiedDate,'DateTime',context!), 'Id': Id }); getTypeName() => "CustomField"; TypeContext? context = _ctx; } class RegEx extends BaseModel implements IConvertible { // @Required() String? Name; // @Required() String? Description; // @Required() String? RegExCode; String? ErrorMessage; DateTime? ModifiedDate; int? Id; RegEx({this.Name,this.Description,this.RegExCode,this.ErrorMessage,this.ModifiedDate,this.Id}); RegEx.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Name = json['Name']; Description = json['Description']; RegExCode = json['RegExCode']; ErrorMessage = json['ErrorMessage']; ModifiedDate = JsonConverters.fromJson(json['ModifiedDate'],'DateTime',context!); Id = json['Id']; return this; } Map toJson() => super.toJson()..addAll({ 'Name': Name, 'Description': Description, 'RegExCode': RegExCode, 'ErrorMessage': ErrorMessage, 'ModifiedDate': JsonConverters.toJson(ModifiedDate,'DateTime',context!), 'Id': Id }); getTypeName() => "RegEx"; TypeContext? context = _ctx; } class CustomFieldServiceRelation extends BaseModel implements IConvertible { // @Required() String? CompanyId; int? Id; // @Required() int? CustomFieldConfigId; // @Required() int? ServiceId; DateTime? ModifiedDate; CustomFieldServiceRelation({this.CompanyId,this.Id,this.CustomFieldConfigId,this.ServiceId,this.ModifiedDate}); CustomFieldServiceRelation.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); CompanyId = json['CompanyId']; Id = json['Id']; CustomFieldConfigId = json['CustomFieldConfigId']; ServiceId = json['ServiceId']; ModifiedDate = JsonConverters.fromJson(json['ModifiedDate'],'DateTime',context!); return this; } Map toJson() => super.toJson()..addAll({ 'CompanyId': CompanyId, 'Id': Id, 'CustomFieldConfigId': CustomFieldConfigId, 'ServiceId': ServiceId, 'ModifiedDate': JsonConverters.toJson(ModifiedDate,'DateTime',context!) }); getTypeName() => "CustomFieldServiceRelation"; TypeContext? context = _ctx; } class CustomFieldConfig extends BaseModel implements IConvertible { // @Ignore() List? Values; CustomField? CustomField; // @Ignore() RegEx? RegEx; // @Ignore() List? Services; List? CustomFieldServiceRelation; // @Required() String? CompanyId; int? Id; int? GroupId; // @Required() int? FieldId; // @Required() int? IconId; int? RegExId; // @Required() String? Name; // @Required() String? Description; // @Required() String? Datatype; // @Required() int? MaxLength; // @Required() bool? IsPublic; // @Required() bool? IsHidden; // @Required() bool? IsMandatory; String? DefaultValue; String? RegExErrorMessage; String? MandatoryErrorMessage; int? Width; // @Required() bool? MultipleLineText; DateTime? ModifiedDate; CustomFieldConfig({this.Values,this.CustomField,this.RegEx,this.Services,this.CustomFieldServiceRelation,this.CompanyId,this.Id,this.GroupId,this.FieldId,this.IconId,this.RegExId,this.Name,this.Description,this.Datatype,this.MaxLength,this.IsPublic,this.IsHidden,this.IsMandatory,this.DefaultValue,this.RegExErrorMessage,this.MandatoryErrorMessage,this.Width,this.MultipleLineText,this.ModifiedDate}); CustomFieldConfig.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Values = JsonConverters.fromJson(json['Values'],'List',context!); CustomField = JsonConverters.fromJson(json['CustomField'],'CustomField',context!); RegEx = JsonConverters.fromJson(json['RegEx'],'RegEx',context!); Services = JsonConverters.fromJson(json['Services'],'List',context!); CustomFieldServiceRelation = JsonConverters.fromJson(json['CustomFieldServiceRelation'],'List',context!); CompanyId = json['CompanyId']; Id = json['Id']; GroupId = json['GroupId']; FieldId = json['FieldId']; IconId = json['IconId']; RegExId = json['RegExId']; Name = json['Name']; Description = json['Description']; Datatype = json['Datatype']; MaxLength = json['MaxLength']; IsPublic = json['IsPublic']; IsHidden = json['IsHidden']; IsMandatory = json['IsMandatory']; DefaultValue = json['DefaultValue']; RegExErrorMessage = json['RegExErrorMessage']; MandatoryErrorMessage = json['MandatoryErrorMessage']; Width = json['Width']; MultipleLineText = json['MultipleLineText']; ModifiedDate = JsonConverters.fromJson(json['ModifiedDate'],'DateTime',context!); return this; } Map toJson() => super.toJson()..addAll({ 'Values': JsonConverters.toJson(Values,'List',context!), 'CustomField': JsonConverters.toJson(CustomField,'CustomField',context!), 'RegEx': JsonConverters.toJson(RegEx,'RegEx',context!), 'Services': JsonConverters.toJson(Services,'List',context!), 'CustomFieldServiceRelation': JsonConverters.toJson(CustomFieldServiceRelation,'List',context!), 'CompanyId': CompanyId, 'Id': Id, 'GroupId': GroupId, 'FieldId': FieldId, 'IconId': IconId, 'RegExId': RegExId, 'Name': Name, 'Description': Description, 'Datatype': Datatype, 'MaxLength': MaxLength, 'IsPublic': IsPublic, 'IsHidden': IsHidden, 'IsMandatory': IsMandatory, 'DefaultValue': DefaultValue, 'RegExErrorMessage': RegExErrorMessage, 'MandatoryErrorMessage': MandatoryErrorMessage, 'Width': Width, 'MultipleLineText': MultipleLineText, 'ModifiedDate': JsonConverters.toJson(ModifiedDate,'DateTime',context!) }); getTypeName() => "CustomFieldConfig"; TypeContext? context = _ctx; } class CustomFieldServices implements IConvertible { int? Id; /** * Name of the service */ // @ApiMember(Description="Name of the service") String? Name; /** * The image url of the service */ // @ApiMember(Description="The image url of the service") Uri? ImageUrl; CustomFieldServices({this.Id,this.Name,this.ImageUrl}); CustomFieldServices.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Name = json['Name']; ImageUrl = JsonConverters.fromJson(json['ImageUrl'],'Uri',context!); return this; } Map toJson() => { 'Id': Id, 'Name': Name, 'ImageUrl': JsonConverters.toJson(ImageUrl,'Uri',context!) }; getTypeName() => "CustomFieldServices"; TypeContext? context = _ctx; } class CustomFieldLookupResponse implements IConvertible { int? Id; bool? Active; int? SortOrder; String? Value; CustomFieldLookupResponse({this.Id,this.Active,this.SortOrder,this.Value}); CustomFieldLookupResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; Active = json['Active']; SortOrder = json['SortOrder']; Value = json['Value']; return this; } Map toJson() => { 'Id': Id, 'Active': Active, 'SortOrder': SortOrder, 'Value': Value }; getTypeName() => "CustomFieldLookupResponse"; TypeContext? context = _ctx; } class CustomFieldQueryResponse implements IConvertible { /** * Custom field id */ // @ApiMember(Description="Custom field id") int? Id; /** * Reference to company that owns the custom field configuration */ // @ApiMember(Description="Reference to company that owns the custom field configuration") String? CompanyId; /** * Group id */ // @ApiMember(Description="Group id") int? GroupId; /** * Field id */ // @ApiMember(Description="Field id") int? FieldId; /** * Configuration name. Example: 'Number of persons'. */ // @ApiMember(Description="Configuration name. Example: 'Number of persons'.") String? Name; /** * Field width. Example: 20 */ // @ApiMember(Description="Field width. Example: 20") int? Width; /** * Column in database where to store the information. Example: 'TextField1' */ // @ApiMember(Description="Column in database where to store the information. Example: 'TextField1'") String? Column; /** * Custom field description. Example: 'For how many persons is this booking?' */ // @ApiMember(Description="Custom field description. Example: 'For how many persons is this booking?'") 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'") String? DataType; /** * Default value of the field. Example: '3' */ // @ApiMember(Description="Default value of the field. Example: '3'") String? DefaultValue; /** * 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") bool? IsMandatory; /** * 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") String? MandatoryErrorMessage; /** * Max lenght of the field */ // @ApiMember(Description="Max lenght of the field") int? MaxLength; /** * If the field should have multiple lines */ // @ApiMember(Description="If the field should have multiple lines") bool? MultipleLineText; /** * Regular expression used for validation of the field */ // @ApiMember(Description="Regular expression used for validation of the field") String? RegEx; /** * Regular expression id for validation of the field */ // @ApiMember(Description="Regular expression id for validation of the field") int? RegExId; /** * Error message shown if the regular expression validation failed */ // @ApiMember(Description="Error message shown if the regular expression validation failed") String? RegExErrorMessage; /** * If the field is visible to the customer */ // @ApiMember(Description="If the field is visible to the customer") bool? IsPublic; /** * If the field should be hidden in lists */ // @ApiMember(Description="If the field should be hidden in lists") bool? IsHidden; /** * Table to which the field belongs */ // @ApiMember(Description="Table to which the field belongs") String? Table; /** * 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") List? Values; /** * The services that is connected to the custom field */ // @ApiMember(Description="The services that is connected to the custom field") List? Services; CustomFieldQueryResponse({this.Id,this.CompanyId,this.GroupId,this.FieldId,this.Name,this.Width,this.Column,this.Description,this.DataType,this.DefaultValue,this.IsMandatory,this.MandatoryErrorMessage,this.MaxLength,this.MultipleLineText,this.RegEx,this.RegExId,this.RegExErrorMessage,this.IsPublic,this.IsHidden,this.Table,this.Values,this.Services}); CustomFieldQueryResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Id = json['Id']; CompanyId = json['CompanyId']; GroupId = json['GroupId']; FieldId = json['FieldId']; Name = json['Name']; Width = json['Width']; Column = json['Column']; Description = json['Description']; DataType = json['DataType']; DefaultValue = json['DefaultValue']; IsMandatory = json['IsMandatory']; MandatoryErrorMessage = json['MandatoryErrorMessage']; MaxLength = json['MaxLength']; MultipleLineText = json['MultipleLineText']; RegEx = json['RegEx']; RegExId = json['RegExId']; RegExErrorMessage = json['RegExErrorMessage']; IsPublic = json['IsPublic']; IsHidden = json['IsHidden']; Table = json['Table']; Values = JsonConverters.fromJson(json['Values'],'List',context!); Services = JsonConverters.fromJson(json['Services'],'List',context!); return this; } Map toJson() => { 'Id': Id, 'CompanyId': CompanyId, 'GroupId': GroupId, 'FieldId': FieldId, 'Name': Name, 'Width': Width, 'Column': Column, 'Description': Description, 'DataType': DataType, 'DefaultValue': DefaultValue, 'IsMandatory': IsMandatory, 'MandatoryErrorMessage': MandatoryErrorMessage, 'MaxLength': MaxLength, 'MultipleLineText': MultipleLineText, 'RegEx': RegEx, 'RegExId': RegExId, 'RegExErrorMessage': RegExErrorMessage, 'IsPublic': IsPublic, 'IsHidden': IsHidden, 'Table': Table, 'Values': JsonConverters.toJson(Values,'List',context!), 'Services': JsonConverters.toJson(Services,'List',context!) }; getTypeName() => "CustomFieldQueryResponse"; TypeContext? context = _ctx; } // @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") class CustomFieldQuery extends QueryDb2 implements IReturn>, ICompany, IConvertible, IGet { /** * One or multiple id's of custom fields to find */ // @ApiMember(Description="One or multiple id's of custom fields to find", ParameterType="query") List? Ids; /** * Company id to find custom fields for */ // @ApiMember(Description="Company id to find custom fields for", ParameterType="query") String? CompanyId; /** * Table to which the custom field belongs to */ // @ApiMember(Description="Table to which the custom field belongs to", ParameterType="query") String? Table; /** * Active or removed fields, empty parameter includes both */ // @ApiMember(Description="Active or removed fields, empty parameter includes both", ParameterType="query") bool? Active; /** * 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") bool? IncludeCustomFieldValues; /** * 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") bool? IncludeConnectedServices; CustomFieldQuery({this.Ids,this.CompanyId,this.Table,this.Active,this.IncludeCustomFieldValues,this.IncludeConnectedServices}); CustomFieldQuery.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); Ids = JsonConverters.fromJson(json['Ids'],'List',context!); CompanyId = json['CompanyId']; Table = json['Table']; Active = json['Active']; IncludeCustomFieldValues = json['IncludeCustomFieldValues']; IncludeConnectedServices = json['IncludeConnectedServices']; return this; } Map toJson() => super.toJson()..addAll({ 'Ids': JsonConverters.toJson(Ids,'List',context!), 'CompanyId': CompanyId, 'Table': Table, 'Active': Active, 'IncludeCustomFieldValues': IncludeCustomFieldValues, 'IncludeConnectedServices': IncludeConnectedServices }); createResponse() => QueryResponse(); getResponseTypeName() => "QueryResponse"; getTypeName() => "CustomFieldQuery"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: { 'ICompany': TypeInfo(TypeOf.Interface), 'BaseModel': TypeInfo(TypeOf.Class, create:() => BaseModel()), 'CustomFieldValue': TypeInfo(TypeOf.Class, create:() => CustomFieldValue()), 'CustomField': TypeInfo(TypeOf.Class, create:() => CustomField()), 'RegEx': TypeInfo(TypeOf.Class, create:() => RegEx()), 'CustomFieldServiceRelation': TypeInfo(TypeOf.Class, create:() => CustomFieldServiceRelation()), 'CustomFieldConfig': TypeInfo(TypeOf.Class, create:() => CustomFieldConfig()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'Service': TypeInfo(TypeOf.Class, create:() => Service()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'CustomFieldServices': TypeInfo(TypeOf.Class, create:() => CustomFieldServices()), 'Uri': TypeInfo(TypeOf.Class, create:() => Uri()), 'CustomFieldLookupResponse': TypeInfo(TypeOf.Class, create:() => CustomFieldLookupResponse()), 'CustomFieldQueryResponse': TypeInfo(TypeOf.Class, create:() => CustomFieldQueryResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'QueryResponse': TypeInfo(TypeOf.Class, create:() => QueryResponse()), 'CustomFieldQuery': TypeInfo(TypeOf.Class, create:() => CustomFieldQuery()), 'List': TypeInfo(TypeOf.Class, create:() => []), });