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 getBlueprintsByKeyword(keyword: string): Promise<any>;
8 getByTags(tags: string): Promise<JSON>;
11 export class BlueprintServiceProvider implements Provider<BlueprintService> {
13 // blueprint must match the name property in the datasource json file
14 @inject('datasources.blueprint')
15 protected dataSource: BlueprintDataSource = new BlueprintDataSource(),
18 value(): Promise<BlueprintService> {
19 return getService(this.dataSource);