import { Observable } from 'rxjs/Observable' ; import { ScenarioFieldConfigId } from 'teambition-types' ; import { SDK } from '../../SDK' ; import { SDKFetch } from '../../SDKFetch' ; import { ScenarioFieldConfigSchema } from '../../schemas' ; export function restoreScenarioFieldConfigFetch ( this , scenarioFieldConfigId ) { return this . put ( `scenariofieldconfigs/${ scenarioFieldConfigId }/restore` ) ; } export function syncScenarioFieldConfigFetch ( this , scenarioFieldConfigId ) { return this . put ( `scenariofieldconfigs/${ scenarioFieldConfigId }/sync` ) ; } declare module '../../SDKFetch' { interface SDKFetch { restoreScenarioFieldConfig : typeof restoreScenarioFieldConfigFetch ; syncScenarioFieldConfig : typeof syncScenarioFieldConfigFetch ; } } SDKFetch . prototype . restoreScenarioFieldConfig = restoreScenarioFieldConfigFetch ; SDKFetch . prototype . syncScenarioFieldConfig = syncScenarioFieldConfigFetch ; export function restoreScenarioFieldConfig ( this , scenarioFieldConfigId ) { return this . lift ( { tableName : 'ScenarioFieldConfig' , method : 'update' , request : this . fetch . restoreScenarioFieldConfig ( scenarioFieldConfigId ) , clause : { _id : scenarioFieldConfigId } } ) ; } export function syncScenarioFieldConfig ( this , scenarioFieldConfigId ) { return this . lift ( { tableName : 'ScenarioFieldConfig' , method : 'update' , request : this . fetch . syncScenarioFieldConfig ( scenarioFieldConfigId ) . map ( ( ) => ( { _id : scenarioFieldConfigId } ) ) , clause : { } } ) ; } declare module '../../SDK' { interface SDK { restoreScenarioFieldConfig : typeof restoreScenarioFieldConfig ; syncScenarioFieldConfig : typeof syncScenarioFieldConfig ; } } SDK . prototype . restoreScenarioFieldConfig = restoreScenarioFieldConfig ; SDK . prototype . syncScenarioFieldConfig = syncScenarioFieldConfig ;