import { BindingTemplate , extensionFor } from '@loopback/core' ; import { ApplicationWithRepositories , Model } from '@loopback/repository' ; import { ModelApiConfig } from './model-api-config' ; /**
 * Extension Point name for Model API builders.
 */ export const MODEL_API_BUILDER_PLUGINS = 'model-api-builders' ; /**
 * Interface for extensions contributing custom API flavors.
 */ export interface ModelApiBuilder { readonly pattern : string ; build ( application , modelClass , config ) : Promise < void > ; } /**
 * A binding template for model API extensions
 */ export const asModelApiBuilder = binding => { extensionFor ( MODEL_API_BUILDER_PLUGINS ) ( binding ) ; binding . tag ( { namespace : 'model-api-builders' } ) ; } ;