1 import {getService} from '@loopback/service-proxy';
2 import {inject, Provider} from '@loopback/core';
3 import {BlueprintDataSource} from '../datasources';
5 export interface BlueprintService {
6 getAllblueprints(): Promise<any>;
7 getByTags(tags: string): Promise<JSON>;
10 export class BlueprintServiceProvider implements Provider<BlueprintService> {
12 // blueprint must match the name property in the datasource json file
13 @inject('datasources.blueprint')
14 protected dataSource: BlueprintDataSource = new BlueprintDataSource(),
17 value(): Promise<BlueprintService> {
18 return getService(this.dataSource);