@Component({
  selector: 'app-recipe-list',
  templateUrl: './recipe-list.component.html',
  styleUrls: ['./recipe-list.component.css']
})
export class RecipeListComponent implements OnInit {
  public recipes: Recipe[] = [
    new Recipe('A test recipe', 'Recipe desc', 'https://www.elmundoeats.com/wp-content/uploads/2020/12/FP-10-Minute-Eggless-Tiramisu-For-Two-2.jpg'),
    new Recipe('A test recipe', 'Recipe desc', 'https://www.elmundoeats.com/wp-content/uploads/2020/12/FP-10-Minute-Eggless-Tiramisu-For-Two-2.jpg')

  ];

  constructor() { }

  ngOnInit(): void {
  }

}


({
  templateDataTestId
}: {
  templateDataTestId?: string;
}) => {
  recursiveFunction(2, recursiveFunction);

  // create the caller object
  const caller = {
    action: jest.fn(),
    templateSetState: ((_state) => {}) as React.Dispatch<
      React.SetStateAction<{ num: number; text: string }>
    >,
    unmount: jest.fn()
  };

  // after the render, set the state in Template
  React.useEffect(() => {
    caller.templateSetState({ num: 5, text: "Some text" });
  }, []);

  return (
    <>
      <div>
        <UnregisteredComponentWithChildren>
          <Template data-testid={templateDataTestId} caller={caller} />
        </UnregisteredComponentWithChildren>
      </div>
      <UnregisteredComponentWithOneUseRef />
      <OneUseCallback callFunc={caller.action}>
        <OneUseState />
      </OneUseCallback>
    </>


(_state) => {}


() => {
    caller.templateSetState({ num: 5, text: "Some text" });
  }


({
  children
}: React.PropsWithChildren<{}>) => {
  return <>{children}</>;
}


({
  children,
  text
}: {
  children: (text: string) => React.ReactNode;
  text: string;
}) => {
  return <>{children(text)}</>;
}


({
  templateDataTestId
}: {
  templateDataTestId?: string;
}) => {
  // create a caller object
  const caller = {
    action: jest.fn(),
    templateSetState: ((_state) => {}) as React.Dispatch<
      React.SetStateAction<{ num: number; text: string }>
    >,
    unmount: jest.fn()
  };

  // after the render, set the state in Template
  React.useEffect(() => {
    caller.templateSetState({ num: 5, text: "Some text" });
  }, []);

  return <Template data-testid={templateDataTestId} caller={caller} />;
}


({
  templateDataTestId
}: {
  templateDataTestId?: string;
}) => <DirectComponent templateDataTestId


({ text }: { text?: string }) => {
  return <p>{text}</p>;
}


({ text }: { text?: string }) => (
  <SimpleComponent text={text} />


children(text)


function getError(code: number, message: string): VerdaccioError {
  const httpError = createError(code, message);

  httpError.code = code;

  return httpError as VerdaccioError;
}


export function getConflict(message: string = API_ERROR.PACKAGE_EXIST): VerdaccioError {
  return getError(HTTP_STATUS.CONFLICT, message);
}


export function getBadData(customMessage?: string): VerdaccioError {
  return getError(HTTP_STATUS.BAD_DATA, customMessage || API_ERROR.BAD_DATA);
}


export function getBadRequest(customMessage: string): VerdaccioError {
  return getError(HTTP_STATUS.BAD_REQUEST, customMessage);
}


export function getInternalError(customMessage?: string): VerdaccioError {
  return customMessage
    ? getError(HTTP_STATUS.INTERNAL_ERROR, customMessage)
    : getError(HTTP_STATUS.INTERNAL_ERROR, API_ERROR.UNKNOWN_ERROR);
}


export function getUnauthorized(message = 'no credentials provided'): VerdaccioError {
  return getError(HTTP_STATUS.UNAUTHORIZED, message);
}


export function getForbidden(message = "can't use this filename"): VerdaccioError {
  return getError(HTTP_STATUS.FORBIDDEN, message);
}


export function getServiceUnavailable(message: string = API_ERROR.RESOURCE_UNAVAILABLE): VerdaccioError {
  return getError(HTTP_STATUS.SERVICE_UNAVAILABLE, message);
}


export function getNotFound(customMessage?: string): VerdaccioError {
  return getError(HTTP_STATUS.NOT_FOUND, customMessage || API_ERROR.NO_PACKAGE);
}


export function getCode(statusCode: number, customMessage: string): VerdaccioError {
  return getError(statusCode, customMessage);
}


(passLength = DEFAULT_MIN_LIMIT_PASSWORD): string =>
    `The provided password is too short. Please pick a password longer than ${passLength} characters.`


export type VerdaccioError = HttpError & { code: number };


() => {
    const { connection } = useConnection();
    const { publicKey, sendTransaction } = useWallet();

    const onClick = useCallback(async () => {
        if (!publicKey) throw new WalletNotConnectedError();

        const transaction = new Transaction().add(
            SystemProgram.transfer({
                fromPubkey: publicKey,
                toPubkey: Keypair.generate().publicKey,
                lamports: 1,
            })
        );

        const signature = await sendTransaction(transaction, connection);

        await connection.confirmTransaction(signature, 'processed');
    }, [publicKey, sendTransaction, connection]);

    return (
        <button onClick={onClick} disabled={!publicKey}


async () => {
        if (!publicKey) throw new WalletNotConnectedError();

        const transaction = new Transaction().add(
            SystemProgram.transfer({
                fromPubkey: publicKey,
                toPubkey: Keypair.generate().publicKey,
                lamports: 1,
            })
        );

        const signature = await sendTransaction(transaction, connection);

        await connection.confirmTransaction(signature, 'processed');
    }


export type AnyFixMe = any;


@NgModule({
    declarations: [],
    imports: [
        CommonModule
    ]
})
export class CoreModule {
}


/**
   * Find a related item by id for customerTabs.
   *
   * @param {any} id user id
   *
   * @param {any} fk Foreign key for customerTabs
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public findByIdCustomerTabs(id: any, fk: any, customHeaders?: Function): Observable<any> {
    let _method: string = "GET";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/customerTabs/:fk";
    let _routeParams: any = {
      id: id,
      fk: fk
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Delete a related item by id for customerTabs.
   *
   * @param {any} id user id
   *
   * @param {any} fk Foreign key for customerTabs
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * This method returns no data.
   */
public destroyByIdCustomerTabs(id: any, fk: any, customHeaders?: Function): Observable<any> {
    let _method: string = "DELETE";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/customerTabs/:fk";
    let _routeParams: any = {
      id: id,
      fk: fk
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Update a related item by id for customerTabs.
   *
   * @param {any} id user id
   *
   * @param {any} fk Foreign key for customerTabs
   *
   * @param {object} data Request data.
   *
   * This method expects a subset of model properties as request parameters.
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public updateByIdCustomerTabs(id: any, fk: any, data: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "PUT";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/customerTabs/:fk";
    let _routeParams: any = {
      id: id,
      fk: fk
    };
    let _postBody: any = {
      data: data
    };
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Find a related item by id for employeeTabs.
   *
   * @param {any} id user id
   *
   * @param {any} fk Foreign key for employeeTabs
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public findByIdEmployeeTabs(id: any, fk: any, customHeaders?: Function): Observable<any> {
    let _method: string = "GET";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/employeeTabs/:fk";
    let _routeParams: any = {
      id: id,
      fk: fk
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Delete a related item by id for employeeTabs.
   *
   * @param {any} id user id
   *
   * @param {any} fk Foreign key for employeeTabs
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * This method returns no data.
   */
public destroyByIdEmployeeTabs(id: any, fk: any, customHeaders?: Function): Observable<any> {
    let _method: string = "DELETE";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/employeeTabs/:fk";
    let _routeParams: any = {
      id: id,
      fk: fk
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Update a related item by id for employeeTabs.
   *
   * @param {any} id user id
   *
   * @param {any} fk Foreign key for employeeTabs
   *
   * @param {object} data Request data.
   *
   * This method expects a subset of model properties as request parameters.
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public updateByIdEmployeeTabs(id: any, fk: any, data: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "PUT";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/employeeTabs/:fk";
    let _routeParams: any = {
      id: id,
      fk: fk
    };
    let _postBody: any = {
      data: data
    };
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Fetches hasOne relation business.
   *
   * @param {any} id user id
   *
   * @param {boolean} refresh
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public getBusiness(id: any, refresh: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "GET";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/business";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    if (typeof refresh !== 'undefined' && refresh !== null) _urlParams.refresh = refresh;
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Creates a new instance in business of this model.
   *
   * @param {any} id user id
   *
   * @param {object} data Request data.
   *
   * This method expects a subset of model properties as request parameters.
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public createBusiness(id: any, data: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "POST";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/business";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {
      data: data
    };
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Update business of this model.
   *
   * @param {any} id user id
   *
   * @param {object} data Request data.
   *
   * This method expects a subset of model properties as request parameters.
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public updateBusiness(id: any, data: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "PUT";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/business";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {
      data: data
    };
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Deletes business of this model.
   *
   * @param {any} id user id
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * This method returns no data.
   */
public destroyBusiness(id: any, customHeaders?: Function): Observable<any> {
    let _method: string = "DELETE";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/business";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Fetches belongsTo relation employeeBusiness.
   *
   * @param {any} id user id
   *
   * @param {boolean} refresh
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public getEmployeeBusiness(id: any, refresh: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "GET";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/employeeBusiness";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    if (typeof refresh !== 'undefined' && refresh !== null) _urlParams.refresh = refresh;
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Queries customerTabs of user.
   *
   * @param {any} id user id
   *
   * @param {object} filter
   *
   * @returns {object[]} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public getCustomerTabs(id: any, filter: LoopBackFilter = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "GET";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/customerTabs";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    if (typeof filter !== 'undefined' && filter !== null) _urlParams.filter = filter;
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Creates a new instance in customerTabs of this model.
   *
   * @param {any} id user id
   *
   * @param {object} data Request data.
   *
   * This method expects a subset of model properties as request parameters.
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public createCustomerTabs(id: any, data: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "POST";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/customerTabs";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {
      data: data
    };
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Deletes all customerTabs of this model.
   *
   * @param {any} id user id
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * This method returns no data.
   */
public deleteCustomerTabs(id: any, customHeaders?: Function): Observable<any> {
    let _method: string = "DELETE";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/customerTabs";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Counts customerTabs of user.
   *
   * @param {any} id user id
   *
   * @param {object} where Criteria to match model instances
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * Data properties:
   *
   *  - `count` – `{number}` -
   */
public countCustomerTabs(id: any, where: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "GET";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/customerTabs/count";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    if (typeof where !== 'undefined' && where !== null) _urlParams.where = where;
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Queries employeeTabs of user.
   *
   * @param {any} id user id
   *
   * @param {object} filter
   *
   * @returns {object[]} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public getEmployeeTabs(id: any, filter: LoopBackFilter = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "GET";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/employeeTabs";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    if (typeof filter !== 'undefined' && filter !== null) _urlParams.filter = filter;
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Creates a new instance in employeeTabs of this model.
   *
   * @param {any} id user id
   *
   * @param {object} data Request data.
   *
   * This method expects a subset of model properties as request parameters.
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public createEmployeeTabs(id: any, data: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "POST";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/employeeTabs";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {
      data: data
    };
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Deletes all employeeTabs of this model.
   *
   * @param {any} id user id
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * This method returns no data.
   */
public deleteEmployeeTabs(id: any, customHeaders?: Function): Observable<any> {
    let _method: string = "DELETE";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/employeeTabs";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Counts employeeTabs of user.
   *
   * @param {any} id user id
   *
   * @param {object} where Criteria to match model instances
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * Data properties:
   *
   *  - `count` – `{number}` -
   */
public countEmployeeTabs(id: any, where: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "GET";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/employeeTabs/count";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    if (typeof where !== 'undefined' && where !== null) _urlParams.where = where;
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Patch an existing model instance or insert a new one into the data source.
   *
   * @param {object} data Request data.
   *
   *  - `data` – `{object}` - Model instance data
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public patchOrCreate(data: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "PATCH";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users";
    let _routeParams: any = {};
    let _postBody: any = {
      data: data
    };
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Patch attributes for a model instance and persist it into the data source.
   *
   * @param {any} id user id
   *
   * @param {object} data Request data.
   *
   *  - `data` – `{object}` - An object of model property name/value pairs
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public patchAttributes(id: any, data: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "PATCH";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {
      data: data
    };
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * <em>
         * (The remote method definition does not provide any description.)
         * </em>
   *
   * @param {object} data Request data.
   *
   *  - `userEmail` – `{string}` -
   *
   *  - `firstName` – `{string}` -
   *
   *  - `lastName` – `{string}` -
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * Data properties:
   *
   *  - `status` – `{object}` -
   */
public addInfoToMailChimp(userEmail: any = {}, firstName: any = {}, lastName: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "POST";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/addInfoToMailChimp";
    let _routeParams: any = {};
    let _postBody: any = {};
    let _urlParams: any = {};
    if (typeof userEmail !== 'undefined' && userEmail !== null) _urlParams.userEmail = userEmail;
    if (typeof firstName !== 'undefined' && firstName !== null) _urlParams.firstName = firstName;
    if (typeof lastName !== 'undefined' && lastName !== null) _urlParams.lastName = lastName;
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * <em>
         * (The remote method definition does not provide any description.)
         * </em>
   *
   * @param {object} data Request data.
   *
   *  - `userEmail` – `{string}` -
   *
   *  - `number` – `{string}` -
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * Data properties:
   *
   *  - `status` – `{object}` -
   */
public verifyPhone(userEmail: any = {}, number: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "POST";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/verifyPhone";
    let _routeParams: any = {};
    let _postBody: any = {};
    let _urlParams: any = {};
    if (typeof userEmail !== 'undefined' && userEmail !== null) _urlParams.userEmail = userEmail;
    if (typeof number !== 'undefined' && number !== null) _urlParams.number = number;
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * <em>
         * (The remote method definition does not provide any description.)
         * </em>
   *
   * @param {object} data Request data.
   *
   *  - `userEmail` – `{string}` -
   *
   *  - `phoneNumber` – `{string}` -
   *
   *  - `code` – `{string}` -
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * Data properties:
   *
   *  - `status` – `{object}` -
   */
public confirmCode(userEmail: any = {}, phoneNumber: any = {}, code: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "POST";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/confirmCode";
    let _routeParams: any = {};
    let _postBody: any = {};
    let _urlParams: any = {};
    if (typeof userEmail !== 'undefined' && userEmail !== null) _urlParams.userEmail = userEmail;
    if (typeof phoneNumber !== 'undefined' && phoneNumber !== null) _urlParams.phoneNumber = phoneNumber;
    if (typeof code !== 'undefined' && code !== null) _urlParams.code = code;
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * <em>
         * (The remote method definition does not provide any description.)
         * </em>
   *
   * @param {object} data Request data.
   *
   *  - `email` – `{string}` -
   *
   *  - `token` – `{string}` -
   *
   *  - `amount` – `{number}` -
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * Data properties:
   *
   *  - `status` – `{object}` -
   */
public payment(email: any = {}, token: any = {}, amount: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "POST";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/payment";
    let _routeParams: any = {};
    let _postBody: any = {};
    let _urlParams: any = {};
    if (typeof email !== 'undefined' && email !== null) _urlParams.email = email;
    if (typeof token !== 'undefined' && token !== null) _urlParams.token = token;
    if (typeof amount !== 'undefined' && amount !== null) _urlParams.amount = amount;
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Fetches belongsTo relation customer.
   *
   * @param {any} id user id
   *
   * @param {any} nk Foreign key for customerTabs.
   *
   * @param {boolean} refresh
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public getCustomerTabsCustomer(id: any, nk: any, refresh: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "GET";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/customerTabs/:nk/customer";
    let _routeParams: any = {
      id: id,
      nk: nk
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    if (typeof refresh !== 'undefined' && refresh !== null) _urlParams.refresh = refresh;
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Fetches belongsTo relation employee.
   *
   * @param {any} id user id
   *
   * @param {any} nk Foreign key for customerTabs.
   *
   * @param {boolean} refresh
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public getCustomerTabsEmployee(id: any, nk: any, refresh: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "GET";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/customerTabs/:nk/employee";
    let _routeParams: any = {
      id: id,
      nk: nk
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    if (typeof refresh !== 'undefined' && refresh !== null) _urlParams.refresh = refresh;
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Fetches belongsTo relation customer.
   *
   * @param {any} id user id
   *
   * @param {any} nk Foreign key for employeeTabs.
   *
   * @param {boolean} refresh
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public getEmployeeTabsCustomer(id: any, nk: any, refresh: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "GET";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/employeeTabs/:nk/customer";
    let _routeParams: any = {
      id: id,
      nk: nk
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    if (typeof refresh !== 'undefined' && refresh !== null) _urlParams.refresh = refresh;
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Fetches belongsTo relation employee.
   *
   * @param {any} id user id
   *
   * @param {any} nk Foreign key for employeeTabs.
   *
   * @param {boolean} refresh
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public getEmployeeTabsEmployee(id: any, nk: any, refresh: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "GET";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/employeeTabs/:nk/employee";
    let _routeParams: any = {
      id: id,
      nk: nk
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    if (typeof refresh !== 'undefined' && refresh !== null) _urlParams.refresh = refresh;
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Fetches belongsTo relation owner.
   *
   * @param {any} id user id
   *
   * @param {boolean} refresh
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public getBusinessOwner(id: any, refresh: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "GET";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/business/owner";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    if (typeof refresh !== 'undefined' && refresh !== null) _urlParams.refresh = refresh;
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Find a related item by id for employees.
   *
   * @param {any} id user id
   *
   * @param {any} fk Foreign key for employees
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public findByIdBusinessEmployees(id: any, fk: any, customHeaders?: Function): Observable<any> {
    let _method: string = "GET";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/business/employees/:fk";
    let _routeParams: any = {
      id: id,
      fk: fk
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Delete a related item by id for employees.
   *
   * @param {any} id user id
   *
   * @param {any} fk Foreign key for employees
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * This method returns no data.
   */
public destroyByIdBusinessEmployees(id: any, fk: any, customHeaders?: Function): Observable<any> {
    let _method: string = "DELETE";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/business/employees/:fk";
    let _routeParams: any = {
      id: id,
      fk: fk
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Update a related item by id for employees.
   *
   * @param {any} id user id
   *
   * @param {any} fk Foreign key for employees
   *
   * @param {object} data Request data.
   *
   * This method expects a subset of model properties as request parameters.
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public updateByIdBusinessEmployees(id: any, fk: any, data: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "PUT";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/business/employees/:fk";
    let _routeParams: any = {
      id: id,
      fk: fk
    };
    let _postBody: any = {
      data: data
    };
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Find a related item by id for tabs.
   *
   * @param {any} id user id
   *
   * @param {any} fk Foreign key for tabs
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public findByIdBusinessTabs(id: any, fk: any, customHeaders?: Function): Observable<any> {
    let _method: string = "GET";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/business/tabs/:fk";
    let _routeParams: any = {
      id: id,
      fk: fk
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Delete a related item by id for tabs.
   *
   * @param {any} id user id
   *
   * @param {any} fk Foreign key for tabs
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * This method returns no data.
   */
public destroyByIdBusinessTabs(id: any, fk: any, customHeaders?: Function): Observable<any> {
    let _method: string = "DELETE";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/business/tabs/:fk";
    let _routeParams: any = {
      id: id,
      fk: fk
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Update a related item by id for tabs.
   *
   * @param {any} id user id
   *
   * @param {any} fk Foreign key for tabs
   *
   * @param {object} data Request data.
   *
   * This method expects a subset of model properties as request parameters.
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public updateByIdBusinessTabs(id: any, fk: any, data: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "PUT";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/business/tabs/:fk";
    let _routeParams: any = {
      id: id,
      fk: fk
    };
    let _postBody: any = {
      data: data
    };
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Queries employees of business.
   *
   * @param {any} id user id
   *
   * @param {object} filter
   *
   * @returns {object[]} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public getBusinessEmployees(id: any, filter: LoopBackFilter = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "GET";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/business/employees";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    if (typeof filter !== 'undefined' && filter !== null) _urlParams.filter = filter;
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Creates a new instance in employees of this model.
   *
   * @param {any} id user id
   *
   * @param {object} data Request data.
   *
   * This method expects a subset of model properties as request parameters.
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public createBusinessEmployees(id: any, data: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "POST";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/business/employees";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {
      data: data
    };
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Deletes all employees of this model.
   *
   * @param {any} id user id
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * This method returns no data.
   */
public deleteBusinessEmployees(id: any, customHeaders?: Function): Observable<any> {
    let _method: string = "DELETE";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/business/employees";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Counts employees of business.
   *
   * @param {any} id user id
   *
   * @param {object} where Criteria to match model instances
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * Data properties:
   *
   *  - `count` – `{number}` -
   */
public countBusinessEmployees(id: any, where: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "GET";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/business/employees/count";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    if (typeof where !== 'undefined' && where !== null) _urlParams.where = where;
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Queries tabs of business.
   *
   * @param {any} id user id
   *
   * @param {object} filter
   *
   * @returns {object[]} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public getBusinessTabs(id: any, filter: LoopBackFilter = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "GET";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/business/tabs";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    if (typeof filter !== 'undefined' && filter !== null) _urlParams.filter = filter;
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Creates a new instance in tabs of this model.
   *
   * @param {any} id user id
   *
   * @param {object} data Request data.
   *
   * This method expects a subset of model properties as request parameters.
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public createBusinessTabs(id: any, data: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "POST";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/business/tabs";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {
      data: data
    };
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Deletes all tabs of this model.
   *
   * @param {any} id user id
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * This method returns no data.
   */
public deleteBusinessTabs(id: any, customHeaders?: Function): Observable<any> {
    let _method: string = "DELETE";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/business/tabs";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Counts tabs of business.
   *
   * @param {any} id user id
   *
   * @param {object} where Criteria to match model instances
   *
   * @returns {object} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * Data properties:
   *
   *  - `count` – `{number}` -
   */
public countBusinessTabs(id: any, where: any = {}, customHeaders?: Function): Observable<any> {
    let _method: string = "GET";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/business/tabs/count";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {};
    let _urlParams: any = {};
    if (typeof where !== 'undefined' && where !== null) _urlParams.where = where;
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Creates a new instance in business of this model.
   *
   * @param {any} id user id
   *
   * @param {object} data Request data.
   *
   * This method expects a subset of model properties as request parameters.
   *
   * @returns {object[]} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public createManyBusiness(id: any, data: any[] = [], customHeaders?: Function): Observable<any> {
    let _method: string = "POST";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/business";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {
      data: data
    };
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Creates a new instance in customerTabs of this model.
   *
   * @param {any} id user id
   *
   * @param {object} data Request data.
   *
   * This method expects a subset of model properties as request parameters.
   *
   * @returns {object[]} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public createManyCustomerTabs(id: any, data: any[] = [], customHeaders?: Function): Observable<any> {
    let _method: string = "POST";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/customerTabs";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {
      data: data
    };
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Creates a new instance in employeeTabs of this model.
   *
   * @param {any} id user id
   *
   * @param {object} data Request data.
   *
   * This method expects a subset of model properties as request parameters.
   *
   * @returns {object[]} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public createManyEmployeeTabs(id: any, data: any[] = [], customHeaders?: Function): Observable<any> {
    let _method: string = "POST";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/employeeTabs";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {
      data: data
    };
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Creates a new instance in employees of this model.
   *
   * @param {any} id user id
   *
   * @param {object} data Request data.
   *
   * This method expects a subset of model properties as request parameters.
   *
   * @returns {object[]} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public createManyBusinessEmployees(id: any, data: any[] = [], customHeaders?: Function): Observable<any> {
    let _method: string = "POST";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/business/employees";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {
      data: data
    };
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * Creates a new instance in tabs of this model.
   *
   * @param {any} id user id
   *
   * @param {object} data Request data.
   *
   * This method expects a subset of model properties as request parameters.
   *
   * @returns {object[]} An empty reference that will be
   *   populated with the actual data once the response is returned
   *   from the server.
   *
   * <em>
   * (The remote method definition does not provide any description.
   * This usually means the response is a `User` object.)
   * </em>
   */
public createManyBusinessTabs(id: any, data: any[] = [], customHeaders?: Function): Observable<any> {
    let _method: string = "POST";
    let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
    "/users/:id/business/tabs";
    let _routeParams: any = {
      id: id
    };
    let _postBody: any = {
      data: data
    };
    let _urlParams: any = {};
    let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
    return result;
  }


/**
   * The name of the model represented by this $resource,
   * i.e. `User`.
   */
public getModelName() {
    return "User";
  }


v => typeof v === `number`


(v): IContentTypeSelection => ({ contentType: (v as ContentType), selected: v === ContentType.Product })


() => moment()


(prev, curr) =>
      prev.year() === curr.year() &&
      prev.dayOfYear() === curr.dayOfYear() &&
      prev.hour() === curr.hour() &&
      prev.minute() === curr.minute() &&
      prev.second() === curr.second()


t => t.selected


() => {
      const currentConfiguration = { ...this.configuration };

      if (currentConfiguration.sysRootPath.trim().length === 0) {
        currentConfiguration.sysRootPath = undefined;
      }

      this.storageService.set(`configuration`, currentConfiguration);
    }


file => file.type === `text/xml`


file => {
        const name = file.name.split(`.`).slice(0, -1).join(`.`);

        const configuration = cloneDeep(this.configuration);

        const transformation = this.transformService.enqueueTransform(file, name, configuration).pipe(
          catchError((err: Error) => of({ completionValue: 1, progressValue: 1, errorMessage: err.message } as ITransformation)),
          tap(tranformation => {
            if (tranformation.arrayBuffer) {
              const outputType = configuration.outputType;

              const outputBlob = new Blob([tranformation.arrayBuffer], {
                type: outputType === OutputType.PLMXML ?
                  `txt/xml` : (outputType === OutputType.AJT ? `text/plain` : 'application/octet-stream')
              });
              const outputBlobURL = URL.createObjectURL(outputBlob);

              const linkELement = document.createElement(`a`);
              linkELement.href = outputBlobURL;
              linkELement.download = `${name}.${outputType === OutputType.PLMXML ?
                'plmxml' : (outputType === OutputType.AJT ? 'ajt' : 'jt')}`;
              linkELement.click();

              linkELement.remove();
              URL.revokeObjectURL(outputBlobURL);
            }
          }),
          share()
        );

        return {
          name,
          outputType: configuration.outputType,
          transformation,

          runDuration: combineLatest([
            transformation.pipe(
              take(1),
              map(() => moment())
            ),
            this.animationFrame
          ]).pipe(
            takeUntil(transformation.pipe(
              takeLast(1)
            )),
            map(([start, current]) => {
              if (current.isBefore(start)) {
                start = current;
              }

              const runDuration = duration(current.diff(start));

              const hours = Math.floor(runDuration.asHours()).toString().padStart(2, '0');
              const minutes = runDuration.minutes().toString().padStart(2, '0');
              const seconds = runDuration.seconds().toString().padStart(2, '0');

              return `${hours}:${minutes}:${seconds}`;
            })
          )
        };
      }


(err: Error) => of({ completionValue: 1, progressValue: 1, errorMessage: err.message } as ITransformation)


tranformation => {
            if (tranformation.arrayBuffer) {
              const outputType = configuration.outputType;

              const outputBlob = new Blob([tranformation.arrayBuffer], {
                type: outputType === OutputType.PLMXML ?
                  `txt/xml` : (outputType === OutputType.AJT ? `text/plain` : 'application/octet-stream')
              });
              const outputBlobURL = URL.createObjectURL(outputBlob);

              const linkELement = document.createElement(`a`);
              linkELement.href = outputBlobURL;
              linkELement.download = `${name}.${outputType === OutputType.PLMXML ?
                'plmxml' : (outputType === OutputType.AJT ? 'ajt' : 'jt')}`;
              linkELement.click();

              linkELement.remove();
              URL.revokeObjectURL(outputBlobURL);
            }
          }


([start, current]) => {
              if (current.isBefore(start)) {
                start = current;
              }

              const runDuration = duration(current.diff(start));

              const hours = Math.floor(runDuration.asHours()).toString().padStart(2, '0');
              const minutes = runDuration.minutes().toString().padStart(2, '0');
              const seconds = runDuration.seconds().toString().padStart(2, '0');

              return `${hours}:${minutes}:${seconds}`;
            }


@Component({
  templateUrl: './transformer.component.html',
  styleUrls: ['./transformer.component.scss']
})
export class TransformerComponent {
  transformationItems: ITransformationItem[] = [];

  acceptDrop: boolean = null;

  ouputTypes = OutputType;
  contentTypes = ContentType;

  configuration: ITransformationConfiguration = {
    includeBranchesWithoutCAD: false,
    resourceSysRootJTFilesAreAssemblies: true,
    outputType: OutputType.JT,
    sysRootPath: `\\\\gal71836\\hq\\Manufacturing\\AME\\VME\\sys_root`,
    //ajt2jtConverterPath: `C:\\Program Files\\Siemens\\JtUtilities\\12_4\\bin64\\asciitojt.exe`,
    selectedContentTypes: Array.from(Object.values(ContentType))
      .filter(v => typeof v === `number`)
      .map((v): IContentTypeSelection => ({ contentType: (v as ContentType), selected: v === ContentType.Product }))
  };

  private animationFrame = scheduled(of(null), animationFrameScheduler).pipe(
    repeat(),
    map(() => moment()),
    distinctUntilChanged((prev, curr) =>
      prev.year() === curr.year() &&
      prev.dayOfYear() === curr.dayOfYear() &&
      prev.hour() === curr.hour() &&
      prev.minute() === curr.minute() &&
      prev.second() === curr.second()),
    share()
  );

  constructor(
    private transformService: TransformerService,
    private storageService: StorageService
  ) {
    merge(this.configuration, storageService.get<ITransformationConfiguration>(`configuration`) ?? {}, { outputType: OutputType.JT });
  }

  countNumberOfSelectedContentTypes() {
    return this.configuration.selectedContentTypes.filter(t => t.selected).length;
  }

  onConfigurationChange() {
    setTimeout(() => {
      const currentConfiguration = { ...this.configuration };

      if (currentConfiguration.sysRootPath.trim().length === 0) {
        currentConfiguration.sysRootPath = undefined;
      }

      this.storageService.set(`configuration`, currentConfiguration);
    });
  }

  dragEnterOver(dragEvent: DragEvent, preventDrop = false) {
    this.preventDefault(dragEvent);

    const dataTransfer = dragEvent.dataTransfer;

    if (preventDrop) {
      this.acceptDrop = false;
      dataTransfer.dropEffect = `none`;
      return;
    }

    const items = dataTransfer.items;
    let containsXMLFiles = false;

    for (let i = 0, c = items.length; i < c; ++i) {
      const item = items[i];

      if (item.kind === `file` && item.type === `text/xml`) {
        containsXMLFiles = true;
        break;
      }
    }

    if (containsXMLFiles) {
      this.acceptDrop = true;
      dataTransfer.dropEffect = `copy`;
    }

    else {
      this.acceptDrop = false;
      dataTransfer.dropEffect = `none`;
    }
  }

  dragLeave(dragEvent: DragEvent) {
    this.preventDefault(dragEvent);
    this.acceptDrop = null;
  }

  drop(dragEvent: DragEvent) {
    this.preventDefault(dragEvent);

    this.acceptDrop = null;

    const dataTransfer = dragEvent.dataTransfer;
    const files = Array.from(dataTransfer.files).filter(file => file.type === `text/xml`);

    if (!files.length) { return; }

    this.transform(files);
  }

  go(files: FileList) {
    if (!files || !files.length) { return; }

    this.transform(Array.from(files));
  }

  arrayBuffer2File(arrayBuffer: ArrayBuffer, name: string) {
    return arrayBuffer ? new File([arrayBuffer], name, { type: `txt/xml` }) : null;
  }

  private preventDefault(dragEvent: DragEvent) {
    dragEvent.preventDefault();
    dragEvent.stopPropagation();
  }

  private transform(files: File[]) {
    if (!files || !files.length) { return; }

    this.transformationItems = [
      ...files.map(file => {
        const name = file.name.split(`.`).slice(0, -1).join(`.`);

        const configuration = cloneDeep(this.configuration);

        const transformation = this.transformService.enqueueTransform(file, name, configuration).pipe(
          catchError((err: Error) => of({ completionValue: 1, progressValue: 1, errorMessage: err.message } as ITransformation)),
          tap(tranformation => {
            if (tranformation.arrayBuffer) {
              const outputType = configuration.outputType;

              const outputBlob = new Blob([tranformation.arrayBuffer], {
                type: outputType === OutputType.PLMXML ?
                  `txt/xml` : (outputType === OutputType.AJT ? `text/plain` : 'application/octet-stream')
              });
              const outputBlobURL = URL.createObjectURL(outputBlob);

              const linkELement = document.createElement(`a`);
              linkELement.href = outputBlobURL;
              linkELement.download = `${name}.${outputType === OutputType.PLMXML ?
                'plmxml' : (outputType === OutputType.AJT ? 'ajt' : 'jt')}`;
              linkELement.click();

              linkELement.remove();
              URL.revokeObjectURL(outputBlobURL);
            }
          }),
          share()
        );

        return {
          name,
          outputType: configuration.outputType,
          transformation,

          runDuration: combineLatest([
            transformation.pipe(
              take(1),
              map(() => moment())
            ),
            this.animationFrame
          ]).pipe(
            takeUntil(transformation.pipe(
              takeLast(1)
            )),
            map(([start, current]) => {
              if (current.isBefore(start)) {
                start = current;
              }

              const runDuration = duration(current.diff(start));

              const hours = Math.floor(runDuration.asHours()).toString().padStart(2, '0');
              const minutes = runDuration.minutes().toString().padStart(2, '0');
              const seconds = runDuration.seconds().toString().padStart(2, '0');

              return `${hours}:${minutes}:${seconds}`;
            })
          )
        };
      }),

      ...this.transformationItems
    ];
  }
}


interface ITransformationItem {
  transformation: Observable<ITransformation>;

  name: string;

  outputType: OutputType;

  runDuration: Observable<string>;
}


countNumberOfSelectedContentTypes() {
    return this.configuration.selectedContentTypes.filter(t => t.selected).length;
  }


onConfigurationChange() {
    setTimeout(() => {
      const currentConfiguration = { ...this.configuration };

      if (currentConfiguration.sysRootPath.trim().length === 0) {
        currentConfiguration.sysRootPath = undefined;
      }

      this.storageService.set(`configuration`, currentConfiguration);
    });
  }


dragEnterOver(dragEvent: DragEvent, preventDrop = false) {
    this.preventDefault(dragEvent);

    const dataTransfer = dragEvent.dataTransfer;

    if (preventDrop) {
      this.acceptDrop = false;
      dataTransfer.dropEffect = `none`;
      return;
    }

    const items = dataTransfer.items;
    let containsXMLFiles = false;

    for (let i = 0, c = items.length; i < c; ++i) {
      const item = items[i];

      if (item.kind === `file` && item.type === `text/xml`) {
        containsXMLFiles = true;
        break;
      }
    }

    if (containsXMLFiles) {
      this.acceptDrop = true;
      dataTransfer.dropEffect = `copy`;
    }

    else {
      this.acceptDrop = false;
      dataTransfer.dropEffect = `none`;
    }
  }


dragLeave(dragEvent: DragEvent) {
    this.preventDefault(dragEvent);
    this.acceptDrop = null;
  }


drop(dragEvent: DragEvent) {
    this.preventDefault(dragEvent);

    this.acceptDrop = null;

    const dataTransfer = dragEvent.dataTransfer;
    const files = Array.from(dataTransfer.files).filter(file => file.type === `text/xml`);

    if (!files.length) { return; }

    this.transform(files);
  }


go(files: FileList) {
    if (!files || !files.length) { return; }

    this.transform(Array.from(files));
  }


arrayBuffer2File(arrayBuffer: ArrayBuffer, name: string) {
    return arrayBuffer ? new File([arrayBuffer], name, { type: `txt/xml` }) : null;
  }


private preventDefault(dragEvent: DragEvent) {
    dragEvent.preventDefault();
    dragEvent.stopPropagation();
  }


private transform(files: File[]) {
    if (!files || !files.length) { return; }

    this.transformationItems = [
      ...files.map(file => {
        const name = file.name.split(`.`).slice(0, -1).join(`.`);

        const configuration = cloneDeep(this.configuration);

        const transformation = this.transformService.enqueueTransform(file, name, configuration).pipe(
          catchError((err: Error) => of({ completionValue: 1, progressValue: 1, errorMessage: err.message } as ITransformation)),
          tap(tranformation => {
            if (tranformation.arrayBuffer) {
              const outputType = configuration.outputType;

              const outputBlob = new Blob([tranformation.arrayBuffer], {
                type: outputType === OutputType.PLMXML ?
                  `txt/xml` : (outputType === OutputType.AJT ? `text/plain` : 'application/octet-stream')
              });
              const outputBlobURL = URL.createObjectURL(outputBlob);

              const linkELement = document.createElement(`a`);
              linkELement.href = outputBlobURL;
              linkELement.download = `${name}.${outputType === OutputType.PLMXML ?
                'plmxml' : (outputType === OutputType.AJT ? 'ajt' : 'jt')}`;
              linkELement.click();

              linkELement.remove();
              URL.revokeObjectURL(outputBlobURL);
            }
          }),
          share()
        );

        return {
          name,
          outputType: configuration.outputType,
          transformation,

          runDuration: combineLatest([
            transformation.pipe(
              take(1),
              map(() => moment())
            ),
            this.animationFrame
          ]).pipe(
            takeUntil(transformation.pipe(
              takeLast(1)
            )),
            map(([start, current]) => {
              if (current.isBefore(start)) {
                start = current;
              }

              const runDuration = duration(current.diff(start));

              const hours = Math.floor(runDuration.asHours()).toString().padStart(2, '0');
              const minutes = runDuration.minutes().toString().padStart(2, '0');
              const seconds = runDuration.seconds().toString().padStart(2, '0');

              return `${hours}:${minutes}:${seconds}`;
            })
          )
        };
      }),

      ...this.transformationItems
    ];
  }


result => {
        if (result.success) {
          this.notificationService.notify('Registration successful');
          this.router.navigateByUrl(UrlConstants.LOGIN_URL);
        } else {
          this.notificationService.showError(result.message);
        }
      }


@Component({
  selector: 'register',
  templateUrl: './register.component.html',
  styleUrls: ['../../app.component.scss', '../index.component.scss']
})
export class RegisterComponent {

  readonly NAME_MIN_LENGTH: number = AppConstants.HERO_NAME_MIN_LENGTH;
  readonly NAME_MAX_LENGTH: number = AppConstants.HERO_NAME_MAX_LENGTH;
  readonly PASSWORD_MIN_LENGTH: number = 5;

  account: RegisterUserModel = new RegisterUserModel();

  constructor(
    private userService: UserService,
    private notificationService: NotificationService,
    private router: Router) {
  }

  isNameValid(name: string): boolean {
    return Toolbox.isContentLengthBetween(name,
      this.NAME_MIN_LENGTH, this.NAME_MAX_LENGTH);
  }

  onSubmit() {
    this.notificationService.loading();
    this.userService.register(this.account)
      .subscribe(result => {
        if (result.success) {
          this.notificationService.notify('Registration successful');
          this.router.navigateByUrl(UrlConstants.LOGIN_URL);
        } else {
          this.notificationService.showError(result.message);
        }
      });
  }
}


isNameValid(name: string): boolean {
    return Toolbox.isContentLengthBetween(name,
      this.NAME_MIN_LENGTH, this.NAME_MAX_LENGTH);
  }


onSubmit() {
    this.notificationService.loading();
    this.userService.register(this.account)
      .subscribe(result => {
        if (result.success) {
          this.notificationService.notify('Registration successful');
          this.router.navigateByUrl(UrlConstants.LOGIN_URL);
        } else {
          this.notificationService.showError(result.message);
        }
      });
  }


export class CancelSimulationJobCommand extends $Command<
  CancelSimulationJobCommandInput,
  CancelSimulationJobCommandOutput,
  RoboMakerClientResolvedConfig
> {
  // Start section: command_properties
  // End section: command_properties

  constructor(readonly input: CancelSimulationJobCommandInput) {
    // Start section: command_constructor
    super();
    // End section: command_constructor
  }

  resolveMiddleware(
    clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
    configuration: RoboMakerClientResolvedConfig,
    options?: __HttpHandlerOptions
  ): Handler<CancelSimulationJobCommandInput, CancelSimulationJobCommandOutput> {
    this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

    const stack = clientStack.concat(this.middlewareStack);

    const { logger } = configuration;
    const handlerExecutionContext: HandlerExecutionContext = {
      logger,
      inputFilterSensitiveLog: CancelSimulationJobRequest.filterSensitiveLog,
      outputFilterSensitiveLog: CancelSimulationJobResponse.filterSensitiveLog,
    };
    const { requestHandler } = configuration;
    return stack.resolve(
      (request: FinalizeHandlerArguments<any>) =>
        requestHandler.handle(request.request as __HttpRequest, options || {}),
      handlerExecutionContext
    );
  }

  private serialize(input: CancelSimulationJobCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
    return serializeAws_restJson1CancelSimulationJobCommand(input, context);
  }

  private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<CancelSimulationJobCommandOutput> {
    return deserializeAws_restJson1CancelSimulationJobCommand(output, context);
  }

  // Start section: command_body_extra
  // End section: command_body_extra
}


export type CancelSimulationJobCommandInput = CancelSimulationJobRequest;


export type CancelSimulationJobCommandOutput = CancelSimulationJobResponse & __MetadataBearer;


resolveMiddleware(
    clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
    configuration: RoboMakerClientResolvedConfig,
    options?: __HttpHandlerOptions
  ): Handler<CancelSimulationJobCommandInput, CancelSimulationJobCommandOutput> {
    this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

    const stack = clientStack.concat(this.middlewareStack);

    const { logger } = configuration;
    const handlerExecutionContext: HandlerExecutionContext = {
      logger,
      inputFilterSensitiveLog: CancelSimulationJobRequest.filterSensitiveLog,
      outputFilterSensitiveLog: CancelSimulationJobResponse.filterSensitiveLog,
    };
    const { requestHandler } = configuration;
    return stack.resolve(
      (request: FinalizeHandlerArguments<any>) =>
        requestHandler.handle(request.request as __HttpRequest, options || {}),
      handlerExecutionContext
    );
  }


private serialize(input: CancelSimulationJobCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
    return serializeAws_restJson1CancelSimulationJobCommand(input, context);
  }


private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<CancelSimulationJobCommandOutput> {
    return deserializeAws_restJson1CancelSimulationJobCommand(output, context);
  }


@Module({
  imports: [],
  providers: [UserService],
  controllers: [UserController],
  exports: [],
})
export class UserModule {}


@NgModule({
    imports: [
        AppModule,
        ServerModule,
    ],
    bootstrap: [AppComponent],
})
export class AppServerModule {
}


@NgModule({
  declarations: [
   PerfilesComponent,
   PerfilComponent,
   RecursoComponent,
   RecursosComponent,
   PermisosComponent,
   PermisoComponent,
   UsuariosComponent,
   UsuarioComponent,
   UsuariopubComponent,
   UpperDirective
  ],
  imports: [
    CommonModule,
    SeguridadRoutingModule,
    FormsModule,
    ReactiveFormsModule,
    DataTablesModule,
    NgbModule,
     NgSelectModule,
    NotifierModule.withConfig(customNotifierOptions)
  ],
  providers:[
    DataService,
    UtilService,
    {provide: Location},
  ]
})
export class SeguridadModule { }


() => {
  it('should send activity history to a conversation', () => {
    const req: any = {
      body: {
        activities: ['activity1', 'activity2', 'activity3'],
      },
      conversation: {
        postActivityToUser: jest.fn().mockImplementationOnce(() => {
          throw new Error('Something went wrong.');
        }),
      },
    };
    const res: any = {
      end: jest.fn(),
      send: jest.fn(),
    };
    const next = jest.fn();
    sendHistoryToConversation(req, res, next);

    expect(res.send).toHaveBeenCalledWith(
      HttpStatus.OK,
      createResourceResponse(`Processed ${2} of ${3} activities successfully.${new Error('Something went wrong.')}`)
    );
    expect(res.end).toHaveBeenCalled();
    expect(next).toHaveBeenCalled();
  });
}


() => {
    const req: any = {
      body: {
        activities: ['activity1', 'activity2', 'activity3'],
      },
      conversation: {
        postActivityToUser: jest.fn().mockImplementationOnce(() => {
          throw new Error('Something went wrong.');
        }),
      },
    };
    const res: any = {
      end: jest.fn(),
      send: jest.fn(),
    };
    const next = jest.fn();
    sendHistoryToConversation(req, res, next);

    expect(res.send).toHaveBeenCalledWith(
      HttpStatus.OK,
      createResourceResponse(`Processed ${2} of ${3} activities successfully.${new Error('Something went wrong.')}`)
    );
    expect(res.end).toHaveBeenCalled();
    expect(next).toHaveBeenCalled();
  }


() => {
          throw new Error('Something went wrong.');
        }


@NgModule({
    imports: [
        CommonModule,
        FuiModalModule
    ],
    declarations: [
        AlertModalComponent,
        ConfirmModalComponent
    ],
    exports: [
        AlertModalComponent,
        ConfirmModalComponent
    ],
    entryComponents: [
        AlertModalComponent,
        ConfirmModalComponent
    ]
})
export class DemoModalsModule {}


// JWT authentication class used for building auth headers containing
// JSON web token information in either the form of a claim and
// corresponding key, or the literal token itself.
export class Jwt extends Base {
    public token?: string;
    public claim?: object;
    public key?: Buffer;

    constructor(token: string);
    constructor(claim: object, key: Buffer | string);
    constructor(...args: any[]) {
        super();
        // Initialize with the specified claim and key. If only one parameter
        // was provided then treat it as the literal token.
        if (args.length === 1) {
            this.token = args[0] as string;
            this.claim = undefined;
            this.key = undefined;
        } else {
            this.token = undefined;
            this.claim = args[0] as object;
            this.key = args[1] instanceof Buffer ? args[1] : Buffer.from(String(args[1]), 'utf8');
        }
    }

    // Returns the auth header containing the JWT token in Bearer format.
    buildHeader() {
        let token;
        if (this.token != null) {
            token = this.token;
        } else {
            token = jwt.sign(this.claim as object, this.key as string | Buffer, { expiresIn: '10m' });
        }
        return `Bearer ${token}`;
    }
}


// Returns the auth header containing the JWT token in Bearer format.
buildHeader() {
        let token;
        if (this.token != null) {
            token = this.token;
        } else {
            token = jwt.sign(this.claim as object, this.key as string | Buffer, { expiresIn: '10m' });
        }
        return `Bearer ${token}`;
    }


export class PatchGitIgnoreFile extends BaseCommand {
  public execute(): void {
    const gitIgnorePath = path.join(process.cwd(), '.gitignore');
    const lineToAdd = '*.scss.d.ts';

    if (!fs.existsSync(gitIgnorePath)) {
      logger.warning(chalk.yellowBright('.gitignore file is not found under ' + gitIgnorePath + '. Skipping the step.'));
      logger.warning(chalk.yellowBright('Manually add \'' + lineToAdd + '\' to your .gitignore'));
      logger.newLine();
      return;
    }
    const gitIgnorePathFile = fs.readFileSync(gitIgnorePath).toString();

    if (gitIgnorePathFile.indexOf(lineToAdd) !== -1) {
      logger.success(chalk.blueBright('It looks like .gitignore was patched before, skipping.'));
      logger.newLine();
      return;
    }

    fs.appendFileSync(gitIgnorePath, lineToAdd);

    logger.success(chalk.blueBright('Updated .gitignore.'));
    logger.newLine();
  }

}


public execute(): void {
    const gitIgnorePath = path.join(process.cwd(), '.gitignore');
    const lineToAdd = '*.scss.d.ts';

    if (!fs.existsSync(gitIgnorePath)) {
      logger.warning(chalk.yellowBright('.gitignore file is not found under ' + gitIgnorePath + '. Skipping the step.'));
      logger.warning(chalk.yellowBright('Manually add \'' + lineToAdd + '\' to your .gitignore'));
      logger.newLine();
      return;
    }
    const gitIgnorePathFile = fs.readFileSync(gitIgnorePath).toString();

    if (gitIgnorePathFile.indexOf(lineToAdd) !== -1) {
      logger.success(chalk.blueBright('It looks like .gitignore was patched before, skipping.'));
      logger.newLine();
      return;
    }

    fs.appendFileSync(gitIgnorePath, lineToAdd);

    logger.success(chalk.blueBright('Updated .gitignore.'));
    logger.newLine();
  }


({
  data,
  filters,
  application,
  namespace,
  serviceBinding,
  eventSourceEnabled,
  onSelectTab,
}) => {
  const visRef = React.useRef<Visualization | null>(null);
  const applicationRef = React.useRef<string>(null);
  const componentFactoryRef = React.useRef<ComponentFactory | null>(null);
  const knativeComponentFactoryRef = React.useRef<KnativeComponentFactory | null>(null);
  const helmComponentFactoryRef = React.useRef<HelmComponentFactory | null>(null);
  const operatorsComponentFactoryRef = React.useRef<OperatorsComponentFactory | null>(null);
  const vmsComponentFactoryRef = React.useRef<KubevirtComponentFactory | null>(null);
  const [layout, setLayout] = React.useState<string>(graphModel.graph.layout);
  const [model, setModel] = React.useState<Model>();
  const [graphData, setGraphData] = React.useState<GraphData>();
  const [selectedIds, setSelectedIds] = React.useState<string[]>([]);
  const createResourceAccess: string[] = useAddToProjectAccess(namespace);
  const [dragHint, setDragHint] = React.useState<string>('');

  if (!componentFactoryRef.current) {
    componentFactoryRef.current = new ComponentFactory(serviceBinding);
  }
  if (!knativeComponentFactoryRef.current) {
    knativeComponentFactoryRef.current = new KnativeComponentFactory(serviceBinding);
  }
  if (!helmComponentFactoryRef.current) {
    helmComponentFactoryRef.current = new HelmComponentFactory(serviceBinding);
  }
  if (!operatorsComponentFactoryRef.current) {
    operatorsComponentFactoryRef.current = new OperatorsComponentFactory(serviceBinding);
  }
  if (!vmsComponentFactoryRef.current) {
    vmsComponentFactoryRef.current = new KubevirtComponentFactory(serviceBinding);
  }

  if (!visRef.current) {
    visRef.current = new Visualization();
    visRef.current.registerLayoutFactory(layoutFactory);
    visRef.current.registerComponentFactory(componentFactoryRef.current.getFactory());
    // TODO: Use Plugins
    visRef.current.registerComponentFactory(knativeComponentFactoryRef.current.getFactory());
    visRef.current.registerComponentFactory(helmComponentFactoryRef.current.getFactory());
    visRef.current.registerComponentFactory(operatorsComponentFactoryRef.current.getFactory());
    visRef.current.registerComponentFactory(vmsComponentFactoryRef.current.getFactory());
    visRef.current.addEventListener<SelectionEventListener>(SELECTION_EVENT, (ids: string[]) => {
      // set empty selection when selecting the graph
      if (ids.length > 0 && ids[0] === graphModel.graph.id) {
        setSelectedIds([]);
        removeQueryArgument('selectId');
      } else {
        setSelectedIds(ids);
        ids.length > 0 ? setQueryArgument('selectId', ids[0]) : removeQueryArgument('selectId');
      }
    });
    visRef.current.addEventListener<ShowGroupingHintEventListener>(
      SHOW_GROUPING_HINT_EVENT,
      (element, hint) => {
        setDragHint(hint);
      },
    );
    visRef.current.fromModel(graphModel);
  }

  React.useEffect(() => {
    const newGraphData: GraphData = {
      createResourceAccess,
      namespace,
      eventSourceEnabled,
    };
    visRef.current.getGraph().setData(newGraphData);
    setGraphData(newGraphData);
  }, [namespace, createResourceAccess, eventSourceEnabled]);

  React.useEffect(() => {
    const newModel = topologyModelFromDataModel(data, application, filters);
    visRef.current.fromModel(newModel);
    setModel(newModel);
    if (selectedIds.length && !visRef.current.getElementById(selectedIds[0])) {
      setSelectedIds([]);
    } else {
      const selectId = getQueryArgument('selectId');
      const selectTab = getQueryArgument('selectTab');
      visRef.current.getElementById(selectId) && setSelectedIds([selectId]);
      if (selectTab) {
        onSelectTab(selectTab);
        removeQueryArgument('selectTab');
      }
    }
    // eslint-disable-next-line react-hooks/exhaustive-deps
  }, [data]);

  React.useEffect(() => {
    if (!applicationRef.current) {
      applicationRef.current = application;
      return;
    }
    if (application !== applicationRef.current) {
      applicationRef.current = application;
      visRef.current.getGraph().reset();
      visRef.current.getGraph().layout();
    }
  }, [application]);

  React.useEffect(() => {
    let resizeTimeout = null;
    if (selectedIds.length > 0) {
      const selectedEntity = visRef.current.getElementById(selectedIds[0]);
      if (selectedEntity) {
        const visibleEntity = isNode(selectedEntity)
          ? selectedEntity
          : (selectedEntity as BaseEdge).getSource();
        resizeTimeout = setTimeout(
          action(() => {
            visRef.current
              .getGraph()
              .panIntoView(visibleEntity, { offset: 20, minimumVisible: 40 });
            resizeTimeout = null;
          }),
          500,
        );
      }
    }
    return () => {
      if (resizeTimeout) {
        clearTimeout(resizeTimeout);
      }
    };
  }, [selectedIds]);

  React.useEffect(() => {
    action(() => {
      visRef.current.getGraph().setLayout(layout);
    })();
  }, [layout]);

  const onSearchChange = (searchQuery) => {
    if (searchQuery.length > 0) {
      setQueryArgument(TOPOLOGY_SEARCH_FILTER_KEY, searchQuery);
      document.body.classList.add(FILTER_ACTIVE_CLASS);
    } else {
      removeQueryArgument(TOPOLOGY_SEARCH_FILTER_KEY);
      document.body.classList.remove(FILTER_ACTIVE_CLASS);
    }
  };

  React.useEffect(() => {
    const searchQuery = getTopologySearchQuery();
    searchQuery && onSearchChange(searchQuery);
  }, []);

  const onSidebarClose = () => {
    setSelectedIds([]);
    removeQueryArgument('selectId');
  };

  const renderControlBar = () => {
    return (
      <TopologyControlBar
        controlButtons={[
          ...createTopologyControlButtons({
            ...defaultControlButtonsOptions,
            zoomInCallback: action(() => {
              visRef.current.getGraph().scaleBy(4 / 3);
            }),
            zoomOutCallback: action(() => {
              visRef.current.getGraph().scaleBy(0.75);
            }),
            fitToScreenCallback: action(() => {
              visRef.current.getGraph().fit(80);
            }),
            resetViewCallback: action(() => {
              visRef.current.getGraph().reset();
              visRef.current.getGraph().layout();
            }),
            legend: false,
          }),


(ids: string[]) => {
      // set empty selection when selecting the graph
      if (ids.length > 0 && ids[0] === graphModel.graph.id) {
        setSelectedIds([]);
        removeQueryArgument('selectId');
      } else {
        setSelectedIds(ids);
        ids.length > 0 ? setQueryArgument('selectId', ids[0]) : removeQueryArgument('selectId');
      }
    }


(element, hint) => {
        setDragHint(hint);
      }


() => {
    const newGraphData: GraphData = {
      createResourceAccess,
      namespace,
      eventSourceEnabled,
    };
    visRef.current.getGraph().setData(newGraphData);
    setGraphData(newGraphData);
  }


() => {
    const newModel = topologyModelFromDataModel(data, application, filters);
    visRef.current.fromModel(newModel);
    setModel(newModel);
    if (selectedIds.length && !visRef.current.getElementById(selectedIds[0])) {
      setSelectedIds([]);
    } else {
      const selectId = getQueryArgument('selectId');
      const selectTab = getQueryArgument('selectTab');
      visRef.current.getElementById(selectId) && setSelectedIds([selectId]);
      if (selectTab) {
        onSelectTab(selectTab);
        removeQueryArgument('selectTab');
      }
    }
    // eslint-disable-next-line react-hooks/exhaustive-deps
  }


() => {
    if (!applicationRef.current) {
      applicationRef.current = application;
      return;
    }
    if (application !== applicationRef.current) {
      applicationRef.current = application;
      visRef.current.getGraph().reset();
      visRef.current.getGraph().layout();
    }
  }


() => {
    let resizeTimeout = null;
    if (selectedIds.length > 0) {
      const selectedEntity = visRef.current.getElementById(selectedIds[0]);
      if (selectedEntity) {
        const visibleEntity = isNode(selectedEntity)
          ? selectedEntity
          : (selectedEntity as BaseEdge).getSource();
        resizeTimeout = setTimeout(
          action(() => {
            visRef.current
              .getGraph()
              .panIntoView(visibleEntity, { offset: 20, minimumVisible: 40 });
            resizeTimeout = null;
          }),
          500,
        );
      }
    }
    return () => {
      if (resizeTimeout) {
        clearTimeout(resizeTimeout);
      }
    };
  }


() => {
            visRef.current
              .getGraph()
              .panIntoView(visibleEntity, { offset: 20, minimumVisible: 40 });
            resizeTimeout = null;
          }


() => {
      if (resizeTimeout) {
        clearTimeout(resizeTimeout);
      }
    }


() => {
    action(() => {
      visRef.current.getGraph().setLayout(layout);
    })();
  }


() => {
      visRef.current.getGraph().setLayout(layout);
    }


(searchQuery) => {
    if (searchQuery.length > 0) {
      setQueryArgument(TOPOLOGY_SEARCH_FILTER_KEY, searchQuery);
      document.body.classList.add(FILTER_ACTIVE_CLASS);
    } else {
      removeQueryArgument(TOPOLOGY_SEARCH_FILTER_KEY);
      document.body.classList.remove(FILTER_ACTIVE_CLASS);
    }
  }


() => {
    const searchQuery = getTopologySearchQuery();
    searchQuery && onSearchChange(searchQuery);
  }


() => {
    setSelectedIds([]);
    removeQueryArgument('selectId');
  }


() => {
    return (
      <TopologyControlBar
        controlButtons={[
          ...createTopologyControlButtons({
            ...defaultControlButtonsOptions,
            zoomInCallback: action(() => {
              visRef.current.getGraph().scaleBy(4 / 3);
            }),
            zoomOutCallback: action(() => {
              visRef.current.getGraph().scaleBy(0.75);
            }),
            fitToScreenCallback: action(() => {
              visRef.current.getGraph().fit(80);
            }),
            resetViewCallback: action(() => {
              visRef.current.getGraph().reset();
              visRef.current.getGraph().layout();
            }),
            legend: false,
          }),


() => {
              visRef.current.getGraph().scaleBy(4 / 3);
            }


() => {
              visRef.current.getGraph().scaleBy(0.75);
            }


() => {
              visRef.current.getGraph().fit(80);
            }


() => {
              visRef.current.getGraph().reset();
              visRef.current.getGraph().layout();
            }


() => {
    const selectedEntity = selectedIds[0] ? visRef.current.getElementById(selectedIds[0]) : null;
    if (isNode(selectedEntity)) {
      if (selectedEntity.getType() === TYPE_APPLICATION_GROUP) {
        return (
          <TopologyApplicationPanel
            graphData={graphData}
            application={{
              id: selectedEntity.getId(),
              name: selectedEntity.getLabel(),
              resources: selectedEntity.getData().groupResources,
            }}
          />


() => {
    const selectedEntity =
      selectedIds.length === 0 ? null : visRef.current.getElementById(selectedIds[0]);
    const details = selectedItemDetails();
    if (!selectedEntity || !details) {
      return null;
    }

    return (
      <TopologySideBar show={!!selectedEntity && !!details}


(state: RootState): StateProps => {
  return {
    filters: getTopologyFilters(state),
    application: getActiveApplication(state),
    serviceBinding: getServiceBindingStatus(state),
    eventSourceEnabled: getEventSourceStatus(state),
  };
}


(dispatch): DispatchProps => ({
  onSelectTab: (name) => dispatch(selectOverviewDetailsTab(name)),
})


(name) => dispatch(selectOverviewDetailsTab(name))


interface StateProps {
  filters: TopologyFilters;
  application: string;
  serviceBinding: boolean;
  eventSourceEnabled: boolean;
}


interface DispatchProps {
  onSelectTab?: (name: string) => void;
}


interface TopologyProps {
  data: TopologyDataModel;
  namespace: string;
}


type ComponentProps = TopologyProps & StateProps & DispatchProps;


renderControlBar()


(extraProviders: StaticProvider[]) => {
  const platformRef = platformBrowserDynamic(extraProviders);
  return platformRef.bootstrapModule(ProfilePageModule);
}


// This component is needed to force-bootstrap Angular at the beginning of the
// app.
@Component({
  selector: 'service-bootstrap',
  template: ''
})
export class ServiceBootstrapComponent {}


@NgModule({
  imports: [
    BrowserModule,
    HttpClientModule
  ],
  declarations: [
    ServiceBootstrapComponent
  ],
  entryComponents: [
    ServiceBootstrapComponent
  ],
  providers: [
    AppConstants,
    InteractionsExtensionsConstants,
    ObjectsDomainConstants,
  ]
})
class ProfilePageModule {
  // Empty placeholder method to satisfy the `Compiler`.
  ngDoBootstrap() {}
}


// Empty placeholder method to satisfy the `Compiler`.
ngDoBootstrap() {}


() => {
  let service: PromptsService;

  beforeEach(() => {
    TestBed.configureTestingModule({});
    service = TestBed.inject(PromptsService);
  });

  it('should be created', () => {
    expect(service).toBeTruthy();
  });
}


() => {
    TestBed.configureTestingModule({});
    service = TestBed.inject(PromptsService);
  }


//import {ExpandableListView} from 'react-native-expandable-listview';
export default function Navigation({ colorScheme }: { colorScheme: ColorSchemeName }) {
  return (
    <NavigationContainer
      linking={LinkingConfiguration}
      theme={colorScheme === 'dark' ? DarkTheme : DefaultTheme}


function RootNavigator() {
  return (
    <Stack.Navigator>
      <Stack.Screen name="Root" component={BottomTabNavigator} options={{ headerShown: false }}


function BottomTabNavigator() {
  const colorScheme = useColorScheme();

  return (
    <BottomTab.Navigator
      initialRouteName="TabOne"
      screenOptions={{
        tabBarActiveTintColor: Colors[colorScheme].tint,
      }}


/**
 * You can explore the built-in icon families and icons on the web at https://icons.expo.fyi/
 */
function TabBarIcon(props: {
  name: React.ComponentProps<typeof FontAwesome>['name'];
  color: string;
}) {
  return <FontAwesome size={30} style={{ marginBottom: -3 }}


({ color }) => <TabBarIcon name


() => (
            <Pressable
              onPress={()


(schema: any): (json: any) => ErrorObject[] => {
    const ajvSchemaValidator = ajv.compile(schema)
    return (json: any): ErrorObject[] => {
        const valid = ajvSchemaValidator(json)
        return valid ? [] : ajvSchemaValidator.errors!!
    }
}


(json: any): ErrorObject[] => {
        const valid = ajvSchemaValidator(json)
        return valid ? [] : ajvSchemaValidator.errors!!
    }


() => {
  let component: DisburseComponent;
  let fixture: ComponentFixture<DisburseComponent>;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [ DisburseComponent ]
    })
    .compileComponents();
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(DisburseComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
}


() => {
    TestBed.configureTestingModule({
      declarations: [ DisburseComponent ]
    })
    .compileComponents();
  }


() => {
    fixture = TestBed.createComponent(DisburseComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  }


@Injectable({
  providedIn: 'root'
})
export class ControlServiceService {
  controls  : CreateControlInputDto[] =[];
  toggleVal : boolean = false;
  iii : number;

addItem(item : CreateControlInputDto){
    this.controls.push(item);
}
deleteItem(index){
   this.controls.splice(index,1);
}
getItemByIndex(index){
  return this.controls[index];
}

  constructor() { }
}


addItem(item : CreateControlInputDto){
    this.controls.push(item);
}


deleteItem(index){
   this.controls.splice(index,1);
}


getItemByIndex(index){
  return this.controls[index];
}


export abstract class CreateMessage {

    public static fromArray(data: Array<any>): IMessage {
        switch (data[0]) {
            case AbortMessage.MSG_ABORT:
                return new AbortMessage(data[1], data[2]);
            case GoodbyeMessage.MSG_GOODBYE:
                return new GoodbyeMessage(data[1], data[2]);
            case UnregisteredMessage.MSG_UNREGISTERED:
                return new UnregisteredMessage(data[1]);
            case WelcomeMessage.MSG_WELCOME:
                return new WelcomeMessage(data[1], data[2]);
            case SubscribedMessage.MSG_SUBSCRIBED:
                return new SubscribedMessage(data[1], data[2]);
            case UnsubscribedMessage.MSG_UNSUBSCRIBED:
                return new UnsubscribedMessage(data[1]);
            case EventMessage.MSG_EVENT:
                return new EventMessage(data[1], data[2], data[3], data[4] || [], data[5] || {});
            case RegisteredMessage.MSG_REGISTERED:
                return new RegisteredMessage(data[1], data[2]);
            case InvocationMessage.MSG_INVOCATION:
                return new InvocationMessage(data[1], data[2], data[3], data[4] || [], data[5] || {});
            case ResultMessage.MSG_RESULT:
                return new ResultMessage(data[1], data[2], data[3], data[4]);
            case ChallengeMessage.MSG_CHALLENGE:
                return new ChallengeMessage(data[1], data[2]);
            case ErrorMessage.MSG_ERROR:
                return new ErrorMessage(data[1], data[2], data[3], data[4], data[5] || [], data[6] || {});
            case InterruptMessage.MSG_INTERRUPT:
                return new InterruptMessage(data[1], data[2]);
            // default:
            //     throw new MessageException("Unhandled message type: " . data[0]);
        }
    }
}