/* Options: Date: 2024-10-18 10:30:42 Version: 8.23 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://testapi.bokamera.se //GlobalNamespace: //MakePropertiesOptional: False //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CustomerQuery.* //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 class BaseModel { public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class UserAccessKeys extends BaseModel { // @Required() public CompanyId: string; // @Required() public AccessKeyTypeId: number; // @Required() public Value: string; // @Required() public CustomerId: string; public Description: string; // @Required() public Id: string; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } 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 Customer extends BaseModel implements IUser, ICustomFieldTable { public IdentityId: number; public Id: string; // @Ignore() public CustomerId: string; // @Ignore() public AccessKeys: IList; public Email: string; // @Ignore() public ExternalReferences: IList; // @Ignore() public Company: Company; // @Ignore() public CustomFieldsConfig: IList; // @Ignore() public CustomFieldsData: IList; // @Ignore() public Comments: IList; // @Ignore() public RebateCodes: IList; public Firstname: string; // @Ignore() public FullName: string; // @Ignore() public ImageUrl: string; // @Required() public Active: boolean; public FacebookUsername: string; // @Required() public Updated: string; // @Required() public Created: string; public IpAddress: string; public ModifiedDate?: 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 UserId: string; public Lastname: string; public Phone: string; public CorporateIdentityNumber: string; public InvoiceAddress1: string; public InvoiceAddress2: string; public InvoiceCity: string; public InvoicePostalCode: string; public InvoiceCountryCode: string; // @Required() public CompanyId: string; public SubscribedToNewsletter: boolean; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } } export class InvoiceAddress { 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 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 Customer { public City: string; public CountryCode: string; public IdentityNumber: string; public Email: string; public FirstName: string; public LastName: string; public Phone: string; public PostalCode: string; public Street: string; public Reference: string; public Type: CustomerType; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class CustomerCommentsResponse { public Id: number; public CustomerId: string; public Comments: string; public Updated: string; public Created: string; public ImageUrl: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class CustomerQueryResponse { public Id: string; public Firstname: string; public Lastname: string; public Email: string; public Phone: string; public ImageUrl: string; public CustomFields: CustomFieldConfigData[]; public CustomFieldValues: CustomFieldDataResponse[]; public Comments: CustomerCommentsResponse[]; public AccessKeys: UserAccessKeys[]; public Updated: string; public Created: string; public ResponseStatus: Object; public SubscribedToNewsletter: boolean; public InvoiceAddress: InvoiceAddress; 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: CustomerQueryResponse[]; // @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("/customers", "GET") // @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) // @ValidateRequest(Validator="IsAuthenticated") export class CustomerQuery extends QueryDb implements IReturn> { /** @description Enter the company and id you want to see the information for a customer, if blank company id and you are an admin, your company id will be used. If blank id, all resources will be shown */ // @ApiMember(Description="Enter the company and id you want to see the information for a customer, if blank company id and you are an admin, your company id will be used. If blank id, all resources will be shown ", IsRequired=true, ParameterType="query") public CompanyId: string; /** @description Enter the customer id you want to see the information for a customer. Only admins are allowed to see all customers on their company, users can only see their own customer info. */ // @ApiMember(Description="Enter the customer id you want to see the information for a customer. Only admins are allowed to see all customers on their company, users can only see their own customer info.", ParameterType="query") public CustomerId?: string; /** @description Enter the user id you want to see the information for a customer. Only admins are allowed to see all customers on their company, users can only see their own customer info. User Id is the userprofile */ // @ApiMember(Description="Enter the user id you want to see the information for a customer. Only admins are allowed to see all customers on their company, users can only see their own customer info. User Id is the userprofile", ParameterType="query") public UserId?: string; /** @description Will search by any customer name,phone or email that contains the searchstring provided. */ // @ApiMember(Description="Will search by any customer name,phone or email that contains the searchstring provided.", ParameterType="query") public Search: string; /** @description If you want to filter on visible customers. */ // @ApiMember(Description="If you want to filter on visible customers.", ParameterType="query") public Visible?: boolean; /** @description If you want to include the connected custom fields */ // @ApiMember(DataType="boolean", Description="If you want to include the connected custom fields", ParameterType="query") public IncludeCustomFieldValues: boolean; /** @description If you want to include the connected custom fields */ // @ApiMember(DataType="boolean", Description="If you want to include the connected custom fields", ParameterType="query") public IncludeCustomFields: boolean; /** @description If you want to include the comments on the customer */ // @ApiMember(DataType="boolean", Description="If you want to include the comments on the customer", ParameterType="query") public IncludeComments: boolean; /** @description If you want to include the accesskeys */ // @ApiMember(Description="If you want to include the accesskeys") public IncludeAccessKeys: boolean; /** @description If you want to include invoice address */ // @ApiMember(Description="If you want to include invoice address") public IncludeInvoiceAddress: boolean; public constructor(init?: Partial) { super(init); (Object as any).assign(this, init); } public getTypeName() { return 'CustomerQuery'; } public getMethod() { return 'GET'; } public createResponse() { return new QueryResponse(); } }