import { injectable, /* inject, */ BindingScope, Provider, inject, } from '@loopback/core'; import {Filter} from '@loopback/repository'; import {getService} from '@loopback/service-proxy'; import {MoodsFactors, Sleep, UserSecondaryData} from '../models'; import {CheckInUsersServiceDataSource} from '../datasources'; import { SuccessResponse } from '@sourcefuse-npm/alivio-lib'; /* * Fix the service type. Possible options can be: * - import {CheckInUsersService} from 'your-module'; * - export type CheckInUsersService = string; * - export interface CheckInUsersService {} */ export interface CheckInUsersService { getMoodFactors( filter?: Filter, token?: string, ): Promise; getSleep(filter?: Filter, token?: string): Promise; updateUserSecondory(id :number, user:Partial,token?: string ):Promise; } @injectable({scope: BindingScope.TRANSIENT}) export class CheckInUsersServiceProvider implements Provider { constructor( @inject('datasources.CheckInUsersService') protected dataSource: CheckInUsersServiceDataSource = new CheckInUsersServiceDataSource(), ) {} value(): Promise { return getService(this.dataSource); } }