UNPKG

facebook-nodejs-business-sdk

Version:
74 lines (66 loc) 1.91 kB
/** * Copyright (c) 2017-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the license found in the * LICENSE file in the root directory of this source tree. * @flow */ import {AbstractCrudObject} from './../abstract-crud-object'; import AbstractObject from './../abstract-object'; import Cursor from './../cursor'; import AdsInsights from './ads-insights'; /** * AdReportRun * @extends AbstractCrudObject * @see {@link https://developers.facebook.com/docs/marketing-api/} */ export default class AdReportRun extends AbstractCrudObject { static get Fields () { return Object.freeze({ account_id: 'account_id', async_percent_completion: 'async_percent_completion', async_status: 'async_status', date_start: 'date_start', date_stop: 'date_stop', emails: 'emails', friendly_name: 'friendly_name', id: 'id', is_bookmarked: 'is_bookmarked', is_running: 'is_running', schedule_id: 'schedule_id', time_completed: 'time_completed', time_ref: 'time_ref', }); } getInsights (fields: Array<string>, params: Object = {}, fetchFirstPage: boolean = true): Cursor | Promise<*> { return this.getEdge( AdsInsights, fields, params, fetchFirstPage, '/insights' ); } // $FlowFixMe : Support Generic Types delete (fields: Array<string>, params: Object = {}): AbstractObject { // $FlowFixMe : Support Generic Types return super.delete( params ); } get (fields: Array<string>, params: Object = {}): AdReportRun { // $FlowFixMe : Support Generic Types return this.read( fields, params ); } // $FlowFixMe : Support Generic Types update (fields: Array<string>, params: Object = {}): AdReportRun { // $FlowFixMe : Support Generic Types return super.update( params ); } }