DefinitelyTyped/gapi.analytics/index.d.ts
2016-11-10 08:11:59 -08:00

127 lines
4.7 KiB
TypeScript

// Type definitions for Google Analytics API
// Project: https://developers.google.com/analytics/devguides/reporting/core/v4/
// Definitions by: César Costas <https://github.com/gatsbimantico>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="gapi" />
declare namespace gapi.client.analytics {}
declare namespace gapi.client.analytics.provisioning {
export function createAccountTicket() : Promise<any>;
}
interface DataQuery {
"ids" ?: string;
"start-date" ?: string;
"30daysAgo" ?: string;
"end-date" ?: string;
"yesterday" ?: string;
"metrics" ?: string;
"dimensions" ?: string;
"sort" ?: string;
"filters" ?: string;
"segment" ?: string;
"samplingLevel" ?: string;
"include-empty-rows" ?: string;
"start-index" ?: string;
"max-results" ?: string;
}
declare namespace gapi.client.analytics.data {}
declare namespace gapi.client.analytics.data.ga {
export function get(data ?: DataQuery) : Promise<any>;
}
declare namespace gapi.client.analytics.data.mcf {
export function get(data ?: DataQuery) : Promise<any>;
}
declare namespace gapi.client.analytics.data.realtime {
export function get(data ?: DataQuery) : Promise<any>;
}
declare namespace gapi.client.analytics.kB {}
declare namespace gapi.client.analytics.kB.parameters {
export interface AnalyticsParameter {
"type" ?: string;
"description" ?: string;
"default" ?: string;
"enum" ?: string[];
"enumDescriptions" ?: string[];
"location" ?: string;
}
export class alt implements AnalyticsParameter {}
export class fields implements AnalyticsParameter {}
export class key implements AnalyticsParameter {}
export class oauth_token implements AnalyticsParameter {}
export class prettyPrint implements AnalyticsParameter {}
export class quotaUser implements AnalyticsParameter {}
export class userIP implements AnalyticsParameter {}
}
interface View {
accountId ?: string;
webPropertyId ?: string;
webViewId ?: string;
}
declare namespace gapi.client.analytics.management {}
declare namespace gapi.client.analytics.management.accountSummaries {
export function list(view ?: View) : Promise<any>;
}
declare namespace gapi.client.analytics.management.accountUserLinks {
export function list(view ?: View) : Promise<any>;
}
declare namespace gapi.client.analytics.management.accounts {
export function list(view ?: View) : Promise<any>;
}
declare namespace gapi.client.analytics.management.customDataSources {
export function list(view ?: View) : Promise<any>;
}
declare namespace gapi.client.analytics.management.customDimensions {
export function list(view ?: View) : Promise<any>;
}
declare namespace gapi.client.analytics.management.customMetrics {
export function list(view ?: View) : Promise<any>;
}
declare namespace gapi.client.analytics.management.experiments {
export function list(view ?: View) : Promise<any>;
}
declare namespace gapi.client.analytics.management.filters {
export function list(view ?: View) : Promise<any>;
}
declare namespace gapi.client.analytics.management.goals {
export function list(view ?: View) : Promise<any>;
}
declare namespace gapi.client.analytics.management.profileFilterLinks {
export function list(view ?: View) : Promise<any>;
}
declare namespace gapi.client.analytics.management.profileUserLinks {
export function list(view ?: View) : Promise<any>;
}
declare namespace gapi.client.analytics.management.profiles {
export function list(view ?: View) : Promise<any>;
}
declare namespace gapi.client.analytics.management.remarketingAudience {
export function list(view ?: View) : Promise<any>;
}
declare namespace gapi.client.analytics.management.segments {
export function list(view ?: View) : Promise<any>;
}
declare namespace gapi.client.analytics.management.unsampledReports {
export function list(view ?: View) : Promise<any>;
}
declare namespace gapi.client.analytics.management.uploads {
export function list(view ?: View) : Promise<any>;
}
declare namespace gapi.client.analytics.management.webPropertyAdWordsLinks {
export function list(view ?: View) : Promise<any>;
}
declare namespace gapi.client.analytics.management.webproperties {
export function list(view ?: View) : Promise<any>;
}
declare namespace gapi.client.analytics.management.webpropertyUserLinks {
export function list(view ?: View) : Promise<any>;
}
declare namespace gapi.client.analytics.metadata {}
declare namespace gapi.client.analytics.metadata.column {
export function list() : Promise<any>;
}