/* tslint:disable */ /* eslint-disable */ /** * My API * API documentation for my Laravel app * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { mapValues } from '../runtime'; /** * * @export * @interface SearchCustomersRequest */ export interface SearchCustomersRequest { /** * * @type {string} * @memberof SearchCustomersRequest */ search?: string | null; /** * * @type {string} * @memberof SearchCustomersRequest */ sortBy?: SearchCustomersRequestSortByEnum; /** * * @type {string} * @memberof SearchCustomersRequest */ sortDirection?: SearchCustomersRequestSortDirectionEnum; /** * * @type {number} * @memberof SearchCustomersRequest */ perPage?: number; /** * * @type {number} * @memberof SearchCustomersRequest */ page?: number; /** * * @type {Array} * @memberof SearchCustomersRequest */ siteId?: Array; /** * * @type {Array} * @memberof SearchCustomersRequest */ type?: Array; /** * * @type {Array} * @memberof SearchCustomersRequest */ signUpType?: Array; /** * * @type {Date} * @memberof SearchCustomersRequest */ beforeCreatedAt?: Date; /** * * @type {Date} * @memberof SearchCustomersRequest */ afterCreatedAt?: Date; /** * * @type {number} * @memberof SearchCustomersRequest */ relatedId?: number; /** * * @type {string} * @memberof SearchCustomersRequest */ relatedType?: string; /** * * @type {boolean} * @memberof SearchCustomersRequest */ includesRelations?: boolean; } /** * @export */ export const SearchCustomersRequestSortByEnum = { Id: 'id', NetsuiteSyncNetsuiteId: 'netsuiteSync-netsuite_id', CreatedAt: 'created_at', UpdatedAt: 'updated_at', UserFirstName: 'user-first_name', UserLastName: 'user-last_name', UserEmail: 'user-email', Type: 'type', SignUpType: 'sign_up_type' } as const; export type SearchCustomersRequestSortByEnum = typeof SearchCustomersRequestSortByEnum[keyof typeof SearchCustomersRequestSortByEnum]; /** * @export */ export const SearchCustomersRequestSortDirectionEnum = { Asc: 'asc', Desc: 'desc' } as const; export type SearchCustomersRequestSortDirectionEnum = typeof SearchCustomersRequestSortDirectionEnum[keyof typeof SearchCustomersRequestSortDirectionEnum]; /** * Check if a given object implements the SearchCustomersRequest interface. */ export function instanceOfSearchCustomersRequest(value: object): value is SearchCustomersRequest { return true; } export function SearchCustomersRequestFromJSON(json: any): SearchCustomersRequest { return SearchCustomersRequestFromJSONTyped(json, false); } export function SearchCustomersRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchCustomersRequest { if (json == null) { return json; } return { 'search': json['search'] == null ? undefined : json['search'], 'sortBy': json['sortBy'] == null ? undefined : json['sortBy'], 'sortDirection': json['sortDirection'] == null ? undefined : json['sortDirection'], 'perPage': json['per_page'] == null ? undefined : json['per_page'], 'page': json['page'] == null ? undefined : json['page'], 'siteId': json['site_id'] == null ? undefined : json['site_id'], 'type': json['type'] == null ? undefined : json['type'], 'signUpType': json['sign_up_type'] == null ? undefined : json['sign_up_type'], 'beforeCreatedAt': json['before_created_at'] == null ? undefined : (new Date(json['before_created_at'])), 'afterCreatedAt': json['after_created_at'] == null ? undefined : (new Date(json['after_created_at'])), 'relatedId': json['related_id'] == null ? undefined : json['related_id'], 'relatedType': json['related_type'] == null ? undefined : json['related_type'], 'includesRelations': json['includes_relations'] == null ? undefined : json['includes_relations'], }; } export function SearchCustomersRequestToJSON(json: any): SearchCustomersRequest { return SearchCustomersRequestToJSONTyped(json, false); } export function SearchCustomersRequestToJSONTyped(value?: SearchCustomersRequest | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'search': value['search'], 'sortBy': value['sortBy'], 'sortDirection': value['sortDirection'], 'per_page': value['perPage'], 'page': value['page'], 'site_id': value['siteId'], 'type': value['type'], 'sign_up_type': value['signUpType'], 'before_created_at': value['beforeCreatedAt'] == null ? undefined : ((value['beforeCreatedAt']).toISOString()), 'after_created_at': value['afterCreatedAt'] == null ? undefined : ((value['afterCreatedAt']).toISOString()), 'related_id': value['relatedId'], 'related_type': value['relatedType'], 'includes_relations': value['includesRelations'], }; }