diff --git a/types/google-apps-script/google-apps-script.calendar.d.ts b/types/google-apps-script/google-apps-script.calendar.d.ts
index 888add81f5..502d34ac52 100644
--- a/types/google-apps-script/google-apps-script.calendar.d.ts
+++ b/types/google-apps-script/google-apps-script.calendar.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for Google Apps Script 2018-07-11
+// Type definitions for Google Apps Script 2019-04-09
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -7,7 +7,7 @@
///
declare namespace GoogleAppsScript {
- export module CalendarApp {
+ export module Calendar {
/**
* Represents a calendar that the user owns or is subscribed to.
*/
@@ -308,4 +308,4 @@ declare namespace GoogleAppsScript {
}
}
-declare var CalendarApp: GoogleAppsScript.CalendarApp.CalendarApp;
+declare var CalendarApp: GoogleAppsScript.Calendar.CalendarApp;
diff --git a/types/google-apps-script/google-apps-script.card-service.d.ts b/types/google-apps-script/google-apps-script.card-service.d.ts
index 64f5194595..76caae381e 100644
--- a/types/google-apps-script/google-apps-script.card-service.d.ts
+++ b/types/google-apps-script/google-apps-script.card-service.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for Google Apps Script 2018-12-26
+// Type definitions for Google Apps Script 2019-04-09
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -37,7 +37,6 @@ declare namespace GoogleAppsScript {
* // An action that shows a notification.
* var actionResponse = CardService.newActionResponseBuilder()
* .setNotification(CardService.newNotification()
- * .setType(CardService.NotificationType.INFO)
* .setText("Some info to display to user"))
* .build();
*
@@ -255,7 +254,6 @@ declare namespace GoogleAppsScript {
Icon: typeof Icon;
ImageStyle: typeof ImageStyle;
LoadIndicator: typeof LoadIndicator;
- NotificationType: typeof NotificationType;
OnClose: typeof OnClose;
OpenAs: typeof OpenAs;
SelectionInputType: typeof SelectionInputType;
@@ -438,14 +436,12 @@ declare namespace GoogleAppsScript {
* function notificationCallback() {
* return CardService.newActionResponseBuilder()
* .setNotification(CardService.newNotification()
- * .setType(CardService.NotificationType.WARNING)
* .setText("Some info to display to user"))
* .build();
* }
*/
export interface Notification {
setText(text: string): Notification;
- setType(type: NotificationType): Notification;
}
/**
@@ -590,7 +586,8 @@ declare namespace GoogleAppsScript {
}
/**
- * A TextButton with a text label.
+ * A TextButton with a text label. You can set the background color and disable the button when
+ * needed.
*
* var textButton = CardService.newTextButton()
* .setText("Open Link")
diff --git a/types/google-apps-script/google-apps-script.charts.d.ts b/types/google-apps-script/google-apps-script.charts.d.ts
index 5898092bb4..85031a0496 100644
--- a/types/google-apps-script/google-apps-script.charts.d.ts
+++ b/types/google-apps-script/google-apps-script.charts.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for Google Apps Script 2018-12-26
+// Type definitions for Google Apps Script 2019-04-09
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -14,7 +14,6 @@ declare namespace GoogleAppsScript {
*
* Here is an example that shows how to build an area chart.
*
- * function doGet() {
* // Create a data table with some sample data.
* var sampleData = Charts.newDataTable()
* .addColumn(Charts.ColumnType.STRING, "Month")
@@ -43,9 +42,6 @@ declare namespace GoogleAppsScript {
* .setColors(['red', 'green'])
* .setDataTable(sampleData)
* .build();
- *
- * return UiApp.createApplication().add(chart);
- * }
*/
export interface AreaChartBuilder {
build(): Chart;
@@ -80,7 +76,6 @@ declare namespace GoogleAppsScript {
* Here is an example that shows how to build a bar chart. The data is imported from a
* Google spreadsheet.
*
- * function doGet() {
* // Get sample data from a spreadsheet.
* var dataSourceUrl = 'https://docs.google.com/spreadsheet/tq?range=B1%3AC11' +
* '&key=0Aq4s9w_HxMs7dHpfX05JdmVSb1FpT21sbXd4NVE3UEE&gid=0&headers=-1';
@@ -94,8 +89,6 @@ declare namespace GoogleAppsScript {
* .setDataSourceUrl(dataSourceUrl);
*
* var chart = chartBuilder.build();
- * return UiApp.createApplication().add(chart);
- * }
*/
export interface BarChartBuilder {
build(): Chart;
@@ -128,58 +121,11 @@ declare namespace GoogleAppsScript {
* A builder for category filter controls.
*
* A category filter is a picker to choose one or more between a set of defined values. Given a
- * column of type string, this control will filter out the rows that don't match any of the picked
+ * column of type string, this control filters out the rows that don't match any of the picked
* values.
*
- * Here is an example that creates a table chart a binds a category filter to it. This allows the
- * user to filter the data the table displays.
- *
- * function doGet() {
- * var app = UiApp.createApplication();
- * var sampleData = Charts.newDataTable()
- * .addColumn(Charts.ColumnType.STRING, "Month")
- * .addColumn(Charts.ColumnType.NUMBER, "Dining")
- * .addColumn(Charts.ColumnType.NUMBER, "Total")
- * .addRow(["Jan", 60, 520])
- * .addRow(["Feb", 50, 430])
- * .addRow(["Mar", 53, 440])
- * .addRow(["Apr", 70, 410])
- * .addRow(["May", 80, 390])
- * .addRow(["Jun", 60, 500])
- * .addRow(["Jul", 100, 450])
- * .addRow(["Aug", 140, 431])
- * .addRow(["Sep", 75, 488])
- * .addRow(["Oct", 70, 521])
- * .addRow(["Nov", 58, 388])
- * .addRow(["Dec", 63, 400])
- * .build();
- *
- * var chart = Charts.newTableChart()
- * .setDimensions(600, 500)
- * .build();
- *
- * var categoryFilter = Charts.newCategoryFilter()
- * .setFilterColumnLabel("Month")
- * .setAllowMultiple(true)
- * .setSortValues(true)
- * .setLabelStacking(Charts.Orientation.VERTICAL)
- * .setCaption('Choose categories...')
- * .build();
- *
- * var panel = app.createVerticalPanel().setSpacing(10);
- * panel.add(categoryFilter).add(chart);
- *
- * var dashboard = Charts.newDashboardPanel()
- * .setDataTable(sampleData)
- * .bind(categoryFilter, chart)
- * .build();
- *
- * dashboard.add(panel);
- * app.add(dashboard);
- * return app;
- * }
- *
- * documentation
+ * For more details, see the Gviz
+ * documentation.
*/
export interface CategoryFilterBuilder {
build(): Control;
@@ -305,32 +251,28 @@ declare namespace GoogleAppsScript {
*
* This example shows how to create a column chart with data from a data table.
*
- * function doGet() {
- * var sampleData = Charts.newDataTable()
- * .addColumn(Charts.ColumnType.STRING, "Year")
- * .addColumn(Charts.ColumnType.NUMBER, "Sales")
- * .addColumn(Charts.ColumnType.NUMBER, "Expenses")
- * .addRow(["2004", 1000, 400])
- * .addRow(["2005", 1170, 460])
- * .addRow(["2006", 660, 1120])
- * .addRow(["2007", 1030, 540])
- * .addRow(["2008", 800, 600])
- * .addRow(["2009", 943, 678])
- * .addRow(["2010", 1020, 550])
- * .addRow(["2011", 910, 700])
- * .addRow(["2012", 1230, 840])
- * .build();
+ * var sampleData = Charts.newDataTable()
+ * .addColumn(Charts.ColumnType.STRING, "Year")
+ * .addColumn(Charts.ColumnType.NUMBER, "Sales")
+ * .addColumn(Charts.ColumnType.NUMBER, "Expenses")
+ * .addRow(["2004", 1000, 400])
+ * .addRow(["2005", 1170, 460])
+ * .addRow(["2006", 660, 1120])
+ * .addRow(["2007", 1030, 540])
+ * .addRow(["2008", 800, 600])
+ * .addRow(["2009", 943, 678])
+ * .addRow(["2010", 1020, 550])
+ * .addRow(["2011", 910, 700])
+ * .addRow(["2012", 1230, 840])
+ * .build();
*
- * var chart = Charts.newColumnChart()
- * .setTitle('Sales vs. Expenses')
- * .setXAxisTitle('Year')
- * .setYAxisTitle('Amount (USD)')
- * .setDimensions(600, 500)
- * .setDataTable(sampleData)
- * .build();
- *
- * return UiApp.createApplication().add(chart);
- * }
+ * var chart = Charts.newColumnChart()
+ * .setTitle('Sales & Expenses')
+ * .setXAxisTitle('Year')
+ * .setYAxisTitle('Amount (USD)')
+ * .setDimensions(600, 500)
+ * .setDataTable(sampleData)
+ * .build();
*/
export interface ColumnChartBuilder {
build(): Chart;
@@ -370,9 +312,9 @@ declare namespace GoogleAppsScript {
* pickers, range sliders, autocompleters, etc.) users interact with in order to drive the data
* managed by a dashboard and the charts that are part of it. Controls collect user input and use
* the information to decide which of the data the dashboard is managing should be made available to
- * the charts that are part of it. Given a data table, a control will filter out the data that
- * doesn't comply with the conditions implied by its current state, and will expose the filtered
- * data table as an output.
+ * the charts that are part of it. Given a data table, a control filters out the data that doesn't
+ * comply with the conditions implied by its current state, and exposes the filtered data table as
+ * an output.
*
* For more details, see the Gviz documentation.
*/
@@ -394,8 +336,8 @@ declare namespace GoogleAppsScript {
* Controls are user interface widgets (category pickers, range sliders, autocompleters, etc.)
* users interact with in order to drive the data managed by a dashboard and the charts that are
* part of it. For example, a string filter control is a simple text input field that lets the user
- * filter data via string matching. Given a column and matching options, the control will filter out
- * the rows that don't match the term that's in the input field.
+ * filter data via string matching. Given a column and matching options, the control filters out the
+ * rows that don't match the term that's in the input field.
*
* The Gviz API defines a dashboard as a set of charts and controls bound together. The bindings
* between the different components define the data flow, the state of the controls filters views of
@@ -405,50 +347,6 @@ declare namespace GoogleAppsScript {
* The dashboard panel has two purposes, one is being a container for the charts and controls
* objects that compose the dashboard, and the other is holding the data and use as an interface for
* binding controls to charts.
- *
- * Here's an example of creating a dashboard and showing it in a UI app:
- *
- * function doGet() {
- * // Create a data table with some sample data.
- * var data = Charts.newDataTable()
- * .addColumn(Charts.ColumnType.STRING, "Name")
- * .addColumn(Charts.ColumnType.NUMBER, "Age")
- * .addRow(["Michael", 18])
- * .addRow(["Elisa", 12])
- * .addRow(["John", 20])
- * .addRow(["Jessica", 25])
- * .addRow(["Aaron", 14])
- * .addRow(["Margareth", 19])
- * .addRow(["Miranda", 22])
- * .addRow(["May", 20])
- * .build();
- *
- * var chart = Charts.newBarChart()
- * .setTitle("Ages")
- * .build();
- *
- * var control = Charts.newStringFilter()
- * .setFilterColumnLabel("Name")
- * .build();
- *
- * // Bind the control to the chart in a dashboard panel.
- * var dashboard = Charts.newDashboardPanel()
- * .setDataTable(data)
- * .bind(control, chart)
- * .build();
- *
- * var uiApp = UiApp.createApplication().setTitle("My Dashboard");
- *
- * var panel = uiApp.createHorizontalPanel()
- * .setVerticalAlignment(UiApp.VerticalAlignment.MIDDLE)
- * .setSpacing(50);
- *
- * panel.add(control);
- * panel.add(chart);
- * dashboard.add(panel);
- * uiApp.add(dashboard);
- * return uiApp;
- * }
*/
export interface DashboardPanel {
getId(): string;
@@ -520,9 +418,9 @@ declare namespace GoogleAppsScript {
*
* Data view definition can be set for charts to visualize a view derived from the given data
* table and not the data table itself. For example if the view definition of a chart states that
- * the view columns are [0, 3], only the first and the third columns of the data table will be taken
- * into consideration when drawing the chart. See DataViewDefinitionBuilder for an example
- * on how to define and use a DataViewDefinition.
+ * the view columns are [0, 3], only the first and the third columns of the data table is taken into
+ * consideration when drawing the chart. See DataViewDefinitionBuilder for an example on how
+ * to define and use a DataViewDefinition.
*/
export interface DataViewDefinition {
}
@@ -578,7 +476,6 @@ declare namespace GoogleAppsScript {
*
* Here is an example that shows how to build a line chart. The data is imported from a Google spreadsheet.
*
- * function doGet() {
* // Get sample data from a spreadsheet.
* var dataSourceUrl = 'https://docs.google.com/spreadsheet/tq?range=A1%3AG5' +
* '&key=0Aq4s9w_HxMs7dHpfX05JdmVSb1FpT21sbXd4NVE3UEE&gid=2&headers=-1';
@@ -593,8 +490,6 @@ declare namespace GoogleAppsScript {
* .setDataSourceUrl(dataSourceUrl);
*
* var chart = chartBuilder.build();
- * return UiApp.createApplication().add(chart);
- * }
*/
export interface LineChartBuilder {
build(): Chart;
@@ -625,8 +520,8 @@ declare namespace GoogleAppsScript {
/**
* An enumeration of how a string value should be matched. Matching a string is a boolean operation.
- * Given a string, a match term (string), and a match type, the operation will output true in the
- * following cases:
+ * Given a string, a match term (string), and a match type, the operation outputs true in
+ * the following cases:
*
* If the match type equals EXACT and the match term equals the string.
*
@@ -644,43 +539,11 @@ declare namespace GoogleAppsScript {
* A builder for number range filter controls.
*
* A number range filter is a slider with two thumbs that lets the user select ranges of numeric
- * values. Given a column of type number and matching options, this control will filter out the rows
+ * values. Given a column of type number and matching options, this control filters out the rows
* that don't match the range that was selected.
*
- * This example creates a table chart bound to a number range filter:
- *
- * function doGet() {
- * var app = UiApp.createApplication();
- * // Get sample data from a spreadsheet.
- * var dataSourceUrl = 'https://docs.google.com/spreadsheet/tq?range=A1%3AF' +
- * '&key=0Aq4s9w_HxMs7dHpfX05JdmVSb1FpT21sbXd4NVE3UEE&gid=4&headers=-1';
- * var data = SpreadsheetApp.openByUrl(dataSourceUrl).getSheetByName('US_GDP').getRange("A1:F");
- *
- * var chart = Charts.newTableChart()
- * .setDimensions(600, 500)
- * .build();
- *
- * var numberRangeFilter = Charts.newNumberRangeFilter()
- * .setFilterColumnLabel("Year")
- * .setShowRangeValues(true)
- * .setLabel("Restrict year range")
- * .build();
- *
- * var panel = app.createVerticalPanel().setSpacing(10);
- * panel.add(numberRangeFilter).add(chart);
- *
- * // Create a new dashboard panel to bind the filter and chart together.
- * var dashboard = Charts.newDashboardPanel()
- * .setDataTable(data)
- * .bind(numberRangeFilter, chart)
- * .build();
- *
- * dashboard.add(panel);
- * app.add(dashboard);
- * return app;
- * }
- *
- * documentation
+ * For more details, see the Gviz
+ * documentation.
*/
export interface NumberRangeFilterBuilder {
build(): Control;
@@ -713,7 +576,6 @@ declare namespace GoogleAppsScript {
*
* Here is an example that shows how to build a pie chart. The data is imported from a Google spreadsheet.
*
- * function doGet() {
* // Get sample data from a spreadsheet.
* var dataSourceUrl = 'https://docs.google.com/spreadsheet/tq?range=A1%3AB8' +
* '&key=0Aq4s9w_HxMs7dHpfX05JdmVSb1FpT21sbXd4NVE3UEE&gid=3&headers=-1';
@@ -725,8 +587,6 @@ declare namespace GoogleAppsScript {
* .setDataSourceUrl(dataSourceUrl);
*
* var chart = chartBuilder.build();
- * return UiApp.createApplication().add(chart);
- * }
*/
export interface PieChartBuilder {
build(): Chart;
@@ -761,22 +621,19 @@ declare namespace GoogleAppsScript {
*
* Here is an example that shows how to build a scatter chart. The data is imported from a Google spreadsheet.
*
- * function doGet() {
- * // Get sample data from a spreadsheet.
- * var dataSourceUrl = 'https://docs.google.com/spreadsheet/tq?range=C1%3AD' +
- * '&key=0Aq4s9w_HxMs7dHpfX05JdmVSb1FpT21sbXd4NVE3UEE&gid=4&headers=-1';
+ * // Get sample data from a spreadsheet.
+ * var dataSourceUrl = 'https://docs.google.com/spreadsheet/tq?range=C1%3AD' +
+ * '&key=0Aq4s9w_HxMs7dHpfX05JdmVSb1FpT21sbXd4NVE3UEE&gid=4&headers=-1';
*
- * var chartBuilder = Charts.newScatterChart()
- * .setTitle('Adjusted GDP vs. U.S. Population')
- * .setXAxisTitle('U.S. Population (millions)')
- * .setYAxisTitle('Adjusted GDP ($ billions)')
- * .setDimensions(600, 500)
- * .setLegendPosition(Charts.Position.NONE)
- * .setDataSourceUrl(dataSourceUrl);
+ * var chartBuilder = Charts.newScatterChart()
+ * .setTitle('Adjusted GDP & U.S. Population')
+ * .setXAxisTitle('U.S. Population (millions)')
+ * .setYAxisTitle('Adjusted GDP ($ billions)')
+ * .setDimensions(600, 500)
+ * .setLegendPosition(Charts.Position.NONE)
+ * .setDataSourceUrl(dataSourceUrl);
*
- * var chart = chartBuilder.build();
- * return UiApp.createApplication().add(chart);
- * }
+ * var chart = chartBuilder.build();
*/
export interface ScatterChartBuilder {
build(): Chart;
@@ -809,58 +666,11 @@ declare namespace GoogleAppsScript {
* A builder for string filter controls.
*
* A string filter is a simple text input field that lets the user filter data via string
- * matching. Given a column of type string and matching options, this control will filter out the
- * rows that don't match the term that's in the input field.
+ * matching. Given a column of type string and matching options, this control filters out the rows
+ * that don't match the term that's in the input field.
*
- * This example creates a table chart and binds it to a string filter. Using the filter, it is
- * possible to change the table chart to display a subset of its data.
- *
- * function doGet() {
- * var app = UiApp.createApplication();
- * var sampleData = Charts.newDataTable()
- * .addColumn(Charts.ColumnType.STRING, "Month")
- * .addColumn(Charts.ColumnType.NUMBER, "Dining")
- * .addColumn(Charts.ColumnType.NUMBER, "Total")
- * .addRow(["Jan", 60, 520])
- * .addRow(["Feb", 50, 430])
- * .addRow(["Mar", 53, 440])
- * .addRow(["Apr", 70, 410])
- * .addRow(["May", 80, 390])
- * .addRow(["Jun", 60, 500])
- * .addRow(["Jul", 100, 450])
- * .addRow(["Aug", 140, 431])
- * .addRow(["Sep", 75, 488])
- * .addRow(["Oct", 70, 521])
- * .addRow(["Nov", 58, 388])
- * .addRow(["Dec", 63, 400])
- * .build();
- *
- * var chart = Charts.newTableChart()
- * .setDimensions(600, 500)
- * .build();
- *
- * var stringFilter = Charts.newStringFilter()
- * .setFilterColumnLabel("Month")
- * .setRealtimeTrigger(true)
- * .setCaseSensitive(true)
- * .setLabel("Filter months shown")
- * .build();
- *
- * var panel = app.createVerticalPanel().setSpacing(10);
- * panel.add(stringFilter).add(chart);
- *
- * // Create a dashboard panel to bind the filter and the chart together.
- * var dashboard = Charts.newDashboardPanel()
- * .setDataTable(sampleData)
- * .bind(stringFilter, chart)
- * .build();
- *
- * dashboard.add(panel);
- * app.add(dashboard);
- * return app;
- * }
- *
- * documentation
+ * For more details, see the Gviz
+ * documentation.
*/
export interface StringFilterBuilder {
build(): Control;
@@ -881,19 +691,16 @@ declare namespace GoogleAppsScript {
*
* Here is an example that shows how to build a table chart. The data is imported from a Google spreadsheet.
*
- * function doGet() {
- * // Get sample data from a spreadsheet.
- * var dataSourceUrl = 'https://docs.google.com/spreadsheet/tq?range=A1%3AF' +
- * '&key=0Aq4s9w_HxMs7dHpfX05JdmVSb1FpT21sbXd4NVE3UEE&gid=4&headers=-1';
+ * // Get sample data from a spreadsheet.
+ * var dataSourceUrl = 'https://docs.google.com/spreadsheet/tq?range=A1%3AF' +
+ * '&key=0Aq4s9w_HxMs7dHpfX05JdmVSb1FpT21sbXd4NVE3UEE&gid=4&headers=-1';
*
- * var chartBuilder = Charts.newTableChart()
- * .setDimensions(600, 500)
- * .enablePaging(20)
- * .setDataSourceUrl(dataSourceUrl);
+ * var chartBuilder = Charts.newTableChart()
+ * .setDimensions(600, 500)
+ * .enablePaging(20)
+ * .setDataSourceUrl(dataSourceUrl);
*
- * var chart = chartBuilder.build();
- * return UiApp.createApplication().add(chart);
- * }
+ * var chart = chartBuilder.build();
*/
export interface TableChartBuilder {
build(): Chart;
@@ -920,7 +727,6 @@ declare namespace GoogleAppsScript {
* that accepts it, such as title, horizontal axis, vertical axis, legend and tooltip.
*
* // This example creates a chart specifying different text styles for the title and axes.
- * function doGet() {
* var sampleData = Charts.newDataTable()
* .addColumn(Charts.ColumnType.STRING, "Seasons")
* .addColumn(Charts.ColumnType.NUMBER, "Rainy Days")
@@ -946,9 +752,6 @@ declare namespace GoogleAppsScript {
* .setYAxisTitle('Number of Rainy Days')
* .setDataTable(sampleData)
* .build();
- *
- * return UiApp.createApplication().add(chart);
- * }
*/
export interface TextStyle {
getColor(): string;
diff --git a/types/google-apps-script/google-apps-script.data-studio.d.ts b/types/google-apps-script/google-apps-script.data-studio.d.ts
index c86bd39447..eb564d3c06 100644
--- a/types/google-apps-script/google-apps-script.data-studio.d.ts
+++ b/types/google-apps-script/google-apps-script.data-studio.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for Google Apps Script 2019-02-27
+// Type definitions for Google Apps Script 2019-04-09
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -10,13 +10,43 @@ declare namespace GoogleAppsScript {
/**
* An enum that defines the aggregation types that can be set for a Field.
*/
- export enum AggregationType { NO_AGGREGATION, AVG, COUNT, COUNT_DISTINCT, MAX, MIN, SUM }
+ export enum AggregationType { AVG, COUNT, COUNT_DISTINCT, MAX, MIN, SUM, AUTO, NO_AGGREGATION }
/**
* An enum that defines the authentication types that can be set for a connector.
*/
export enum AuthType { NONE, OAUTH2, USER_PASS, KEY, USER_TOKEN }
+ /**
+ * A configuration object for a native BigQuery connector. Return this object from getData()
+ * for Data Studio to query BigQuery for the connector.
+ *
+ * var cc = DataStudioApp.createCommunityConnector();
+ * var types = cc.BigQueryParameterType;
+ *
+ * var bqConfig = cc.newBigQueryConfig()
+ * .setBillingProjectId('billingProjectId')
+ * .setQuery('queryString')
+ * .setUseStandardSql(true)
+ * .setAccessToken('accessToken')
+ * .addQueryParameter('dob', types.STRING, '01011990')
+ * .build();
+ */
+ export interface BigQueryConfig {
+ addQueryParameter(name: string, type: BigQueryParameterType, value: string): BigQueryConfig;
+ build(): Object;
+ printJson(): string;
+ setAccessToken(accessToken: string): BigQueryConfig;
+ setBillingProjectId(billingProjectId: string): BigQueryConfig;
+ setQuery(query: string): BigQueryConfig;
+ setUseStandardSql(useStandardSql: boolean): BigQueryConfig;
+ }
+
+ /**
+ * An enum that defines the BigQuery parameter types that you can set.
+ */
+ export enum BigQueryParameterType { STRING, INT64, BOOL, FLOAT64 }
+
/**
* Contains checkbox information for the config. Its properties determine how the checkbox is
* displayed in Data Studio.
@@ -53,10 +83,12 @@ declare namespace GoogleAppsScript {
export interface CommunityConnector {
AggregationType: typeof AggregationType;
AuthType: typeof AuthType;
+ BigQueryParameterType: typeof BigQueryParameterType;
FieldType: typeof FieldType;
getConfig(): Config;
getFields(): Fields;
newAuthTypeResponse(): GetAuthTypeResponse;
+ newBigQueryConfig(): BigQueryConfig;
newDebugError(): DebugError;
newUserError(): UserError;
}
@@ -279,7 +311,7 @@ declare namespace GoogleAppsScript {
* .setLabel("second option label")
* .setValue("option_value_2");
*
- * var info1 = config.newSelectMultiple()
+ * var info1 = config.newSelectSingle()
* .setId("api_endpoint")
* .setName("Data Type")
* .setHelpText("Select the data type you're interested in.")
diff --git a/types/google-apps-script/google-apps-script.maps.d.ts b/types/google-apps-script/google-apps-script.maps.d.ts
index 985def200b..c05e044177 100644
--- a/types/google-apps-script/google-apps-script.maps.d.ts
+++ b/types/google-apps-script/google-apps-script.maps.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for Google Apps Script 2018-07-11
+// Type definitions for Google Apps Script 2019-04-09
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -226,35 +226,29 @@ declare namespace GoogleAppsScript {
* The example below shows how you can use this class to create a map of New York City's Theatre
* District, including nearby train stations, and display it in a simple web app.
*
- * function doGet(event) {
- * // Create a map centered on Times Square.
- * var map = Maps.newStaticMap()
- * .setSize(600, 600)
- * .setCenter('Times Square, New York, NY');
+ * // Create a map centered on Times Square.
+ * var map = Maps.newStaticMap()
+ * .setSize(600, 600)
+ * .setCenter('Times Square, New York, NY');
*
- * // Add markers for the nearbye train stations.
- * map.setMarkerStyle(Maps.StaticMap.MarkerSize.MID, Maps.StaticMap.Color.RED, 'T');
- * map.addMarker('Grand Central Station, New York, NY');
- * map.addMarker('Penn Station, New York, NY');
+ * // Add markers for the nearbye train stations.
+ * map.setMarkerStyle(Maps.StaticMap.MarkerSize.MID, Maps.StaticMap.Color.RED, 'T');
+ * map.addMarker('Grand Central Station, New York, NY');
+ * map.addMarker('Penn Station, New York, NY');
*
- * // Show the boundaries of the Theatre District.
- * var corners = [
- * '8th Ave & 53rd St, New York, NY',
- * '6th Ave & 53rd St, New York, NY',
- * '6th Ave & 40th St, New York, NY',
- * '8th Ave & 40th St, New York, NY'
- * ];
- * map.setPathStyle(4, Maps.StaticMap.Color.BLACK, Maps.StaticMap.Color.BLUE);
- * map.beginPath();
- * for (var i = 0; i < corners.length; i++) {
- * map.addAddress(corners[i]);
- * }
- *
- * // Create the user interface and add the map image.
- * var app = UiApp.createApplication().setTitle('NYC Theatre District');
- * app.add(app.createImage(map.getMapUrl()));
- * return app;
+ * // Show the boundaries of the Theatre District.
+ * var corners = [
+ * '8th Ave & 53rd St, New York, NY',
+ * '6th Ave & 53rd St, New York, NY',
+ * '6th Ave & 40th St, New York, NY',
+ * '8th Ave & 40th St, New York, NY'
+ * ];
+ * map.setPathStyle(4, Maps.StaticMap.Color.BLACK, Maps.StaticMap.Color.BLUE);
+ * map.beginPath();
+ * for (var i = 0; i < corners.length; i++) {
+ * map.addAddress(corners[i]);
* }
+ * var url = map.getMapUrl();
*
* See also
*
diff --git a/types/google-apps-script/google-apps-script.slides.d.ts b/types/google-apps-script/google-apps-script.slides.d.ts
index 1619d92369..8cbf220b08 100644
--- a/types/google-apps-script/google-apps-script.slides.d.ts
+++ b/types/google-apps-script/google-apps-script.slides.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for Google Apps Script 2019-01-06
+// Type definitions for Google Apps Script 2019-04-09
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -1195,6 +1195,7 @@ declare namespace GoogleAppsScript {
SelectionType: typeof SelectionType;
ShapeType: typeof ShapeType;
SheetsChartEmbedType: typeof SheetsChartEmbedType;
+ SlideLinkingMode: typeof SlideLinkingMode;
SlidePosition: typeof SlidePosition;
SpacingMode: typeof SpacingMode;
TextBaselineOffset: typeof TextBaselineOffset;
diff --git a/types/google-apps-script/google-apps-script.spreadsheet.d.ts b/types/google-apps-script/google-apps-script.spreadsheet.d.ts
index ba28d9719c..a67d8409c6 100644
--- a/types/google-apps-script/google-apps-script.spreadsheet.d.ts
+++ b/types/google-apps-script/google-apps-script.spreadsheet.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for Google Apps Script 2019-02-27
+// Type definitions for Google Apps Script 2019-04-09
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -383,6 +383,9 @@ declare namespace GoogleAppsScript {
getCriteriaType(): DataValidationCriteria;
getCriteriaValues(): Object[];
getHelpText(): string;
+ requireCheckbox(): DataValidationBuilder;
+ requireCheckbox(checkedValue: Object): DataValidationBuilder;
+ requireCheckbox(checkedValue: Object, uncheckedValue: Object): DataValidationBuilder;
requireDate(): DataValidationBuilder;
requireDateAfter(date: Date): DataValidationBuilder;
requireDateBefore(date: Date): DataValidationBuilder;
@@ -527,6 +530,7 @@ declare namespace GoogleAppsScript {
asScatterChart(): EmbeddedScatterChartBuilder;
asTableChart(): EmbeddedTableChartBuilder;
build(): EmbeddedChart;
+ clearRanges(): EmbeddedChartBuilder;
getChartType(): Charts.ChartType;
getContainer(): ContainerInfo;
getRanges(): Range[];
@@ -573,6 +577,7 @@ declare namespace GoogleAppsScript {
asScatterChart(): EmbeddedScatterChartBuilder;
asTableChart(): EmbeddedTableChartBuilder;
build(): EmbeddedChart;
+ clearRanges(): EmbeddedChartBuilder;
getChartType(): Charts.ChartType;
getContainer(): ContainerInfo;
getRanges(): Range[];
@@ -633,6 +638,7 @@ declare namespace GoogleAppsScript {
export interface EmbeddedChart {
getAs(contentType: string): Base.Blob;
getBlob(): Base.Blob;
+ getChartId(): Integer;
getContainerInfo(): ContainerInfo;
getHiddenDimensionStrategy(): Charts.ChartHiddenDimensionStrategy;
getId(): string;
@@ -673,6 +679,7 @@ declare namespace GoogleAppsScript {
asScatterChart(): EmbeddedScatterChartBuilder;
asTableChart(): EmbeddedTableChartBuilder;
build(): EmbeddedChart;
+ clearRanges(): EmbeddedChartBuilder;
getChartType(): Charts.ChartType;
getContainer(): ContainerInfo;
getRanges(): Range[];
@@ -702,6 +709,7 @@ declare namespace GoogleAppsScript {
asScatterChart(): EmbeddedScatterChartBuilder;
asTableChart(): EmbeddedTableChartBuilder;
build(): EmbeddedChart;
+ clearRanges(): EmbeddedChartBuilder;
getChartType(): Charts.ChartType;
getContainer(): ContainerInfo;
getRanges(): Range[];
@@ -746,6 +754,7 @@ declare namespace GoogleAppsScript {
asScatterChart(): EmbeddedScatterChartBuilder;
asTableChart(): EmbeddedTableChartBuilder;
build(): EmbeddedChart;
+ clearRanges(): EmbeddedChartBuilder;
getChartType(): Charts.ChartType;
getContainer(): ContainerInfo;
getRanges(): Range[];
@@ -791,6 +800,7 @@ declare namespace GoogleAppsScript {
asScatterChart(): EmbeddedScatterChartBuilder;
asTableChart(): EmbeddedTableChartBuilder;
build(): EmbeddedChart;
+ clearRanges(): EmbeddedChartBuilder;
getChartType(): Charts.ChartType;
getContainer(): ContainerInfo;
getRanges(): Range[];
@@ -836,6 +846,7 @@ declare namespace GoogleAppsScript {
asScatterChart(): EmbeddedScatterChartBuilder;
asTableChart(): EmbeddedTableChartBuilder;
build(): EmbeddedChart;
+ clearRanges(): EmbeddedChartBuilder;
getChartType(): Charts.ChartType;
getContainer(): ContainerInfo;
getRanges(): Range[];
@@ -882,6 +893,7 @@ declare namespace GoogleAppsScript {
asScatterChart(): EmbeddedScatterChartBuilder;
asTableChart(): EmbeddedTableChartBuilder;
build(): EmbeddedChart;
+ clearRanges(): EmbeddedChartBuilder;
getChartType(): Charts.ChartType;
getContainer(): ContainerInfo;
getRanges(): Range[];
@@ -919,6 +931,7 @@ declare namespace GoogleAppsScript {
asScatterChart(): EmbeddedScatterChartBuilder;
asTableChart(): EmbeddedTableChartBuilder;
build(): EmbeddedChart;
+ clearRanges(): EmbeddedChartBuilder;
getChartType(): Charts.ChartType;
getContainer(): ContainerInfo;
getRanges(): Range[];
@@ -964,6 +977,7 @@ declare namespace GoogleAppsScript {
asScatterChart(): EmbeddedScatterChartBuilder;
asTableChart(): EmbeddedTableChartBuilder;
build(): EmbeddedChart;
+ clearRanges(): EmbeddedChartBuilder;
enablePaging(enablePaging: boolean): EmbeddedTableChartBuilder;
enablePaging(pageSize: Integer): EmbeddedTableChartBuilder;
enablePaging(pageSize: Integer, startPage: Integer): EmbeddedTableChartBuilder;
@@ -1367,6 +1381,7 @@ declare namespace GoogleAppsScript {
autoFillToNeighbor(series: AutoFillSeries): void;
breakApart(): Range;
canEdit(): boolean;
+ check(): Range;
clear(): Range;
clear(options: Object): Range;
clearContent(): Range;
@@ -1384,6 +1399,7 @@ declare namespace GoogleAppsScript {
createDeveloperMetadataFinder(): DeveloperMetadataFinder;
createFilter(): Filter;
createPivotTable(sourceData: Range): PivotTable;
+ createTextFinder(findText: string): TextFinder;
deleteCells(shiftDimension: Dimension): void;
expandGroups(): Range;
getA1Notation(): string;
@@ -1392,6 +1408,8 @@ declare namespace GoogleAppsScript {
getBandings(): Banding[];
getCell(row: Integer, column: Integer): Range;
getColumn(): Integer;
+ getDataRegion(): Range;
+ getDataRegion(dimension: Dimension): Range;
getDataSourceTables(): DataSourceTable[];
getDataSourceUrl(): string;
getDataTable(): Charts.DataTable;
@@ -1453,7 +1471,11 @@ declare namespace GoogleAppsScript {
getWrapStrategy(): WrapStrategy;
getWraps(): boolean[][];
insertCells(shiftDimension: Dimension): Range;
+ insertCheckboxes(): Range;
+ insertCheckboxes(checkedValue: Object): Range;
+ insertCheckboxes(checkedValue: Object, uncheckedValue: Object): Range;
isBlank(): boolean;
+ isChecked(): boolean;
isEndColumnBounded(): boolean;
isEndRowBounded(): boolean;
isPartOfMerge(): boolean;
@@ -1468,6 +1490,7 @@ declare namespace GoogleAppsScript {
offset(rowOffset: Integer, columnOffset: Integer, numRows: Integer, numColumns: Integer): Range;
protect(): Protection;
randomize(): Range;
+ removeCheckboxes(): Range;
setBackground(color: string): Range;
setBackgroundRGB(red: Integer, green: Integer, blue: Integer): Range;
setBackgrounds(color: string[][]): Range;
@@ -1522,6 +1545,7 @@ declare namespace GoogleAppsScript {
splitTextToColumns(): void;
splitTextToColumns(delimiter: string): void;
splitTextToColumns(delimiter: TextToColumnsDelimiter): void;
+ uncheck(): Range;
}
/**
@@ -1531,6 +1555,7 @@ declare namespace GoogleAppsScript {
export interface RangeList {
activate(): RangeList;
breakApart(): RangeList;
+ check(): RangeList;
clear(): RangeList;
clear(options: Object): RangeList;
clearContent(): RangeList;
@@ -1538,6 +1563,10 @@ declare namespace GoogleAppsScript {
clearFormat(): RangeList;
clearNote(): RangeList;
getRanges(): Range[];
+ insertCheckboxes(): RangeList;
+ insertCheckboxes(checkedValue: Object): RangeList;
+ insertCheckboxes(checkedValue: Object, uncheckedValue: Object): RangeList;
+ removeCheckboxes(): RangeList;
setBackground(color: string): RangeList;
setBackgroundRGB(red: Integer, green: Integer, blue: Integer): RangeList;
setBorder(top: boolean, left: boolean, bottom: boolean, right: boolean, vertical: boolean, horizontal: boolean): RangeList;
@@ -1561,8 +1590,14 @@ declare namespace GoogleAppsScript {
setVerticalText(isVertical: boolean): RangeList;
setWrap(isWrapEnabled: boolean): RangeList;
setWrapStrategy(strategy: WrapStrategy): RangeList;
+ uncheck(): RangeList;
}
+ /**
+ * An enumeration representing the possible intervals used in spreadsheet recalculation.
+ */
+ export enum RecalculationInterval { ON_CHANGE, MINUTE, HOUR }
+
/**
* An enumeration representing the relative date options for calculating a value to be used in
* date-based BooleanCriteria.
@@ -1651,6 +1686,7 @@ declare namespace GoogleAppsScript {
collapseAllRowGroups(): Sheet;
copyTo(spreadsheet: Spreadsheet): Sheet;
createDeveloperMetadataFinder(): DeveloperMetadataFinder;
+ createTextFinder(findText: string): TextFinder;
deleteColumn(columnPosition: Integer): Sheet;
deleteColumns(columnPosition: Integer, howMany: Integer): void;
deleteRow(rowPosition: Integer): Sheet;
@@ -1702,6 +1738,7 @@ declare namespace GoogleAppsScript {
getSheetName(): string;
getSheetValues(startRow: Integer, startColumn: Integer, numRows: Integer, numColumns: Integer): Object[][];
getTabColor(): string;
+ getType(): SheetType;
hasHiddenGridlines(): boolean;
hideColumn(column: Range): void;
hideColumns(columnIndex: Integer): void;
@@ -1769,6 +1806,11 @@ declare namespace GoogleAppsScript {
setSheetProtection(permissions: PageProtection): void;
}
+ /**
+ * The different types of sheets that can exist in a spreadsheet.
+ */
+ export enum SheetType { GRID, OBJECT }
+
/**
* Access and modify Google Sheets files. Common operations are adding new sheets and adding
* collaborators.
@@ -1789,6 +1831,7 @@ declare namespace GoogleAppsScript {
autoResizeColumn(columnPosition: Integer): Sheet;
copy(name: string): Spreadsheet;
createDeveloperMetadataFinder(): DeveloperMetadataFinder;
+ createTextFinder(findText: string): TextFinder;
deleteActiveSheet(): Sheet;
deleteColumn(columnPosition: Integer): Sheet;
deleteColumns(columnPosition: Integer, howMany: Integer): void;
@@ -1814,8 +1857,10 @@ declare namespace GoogleAppsScript {
getFrozenRows(): Integer;
getId(): string;
getImages(): OverGridImage[];
+ getIterativeCalculationConvergenceThreshold(): Number;
getLastColumn(): Integer;
getLastRow(): Integer;
+ getMaxIterativeCalculationCycles(): Integer;
getName(): string;
getNamedRanges(): NamedRange[];
getNumSheets(): Integer;
@@ -1824,6 +1869,7 @@ declare namespace GoogleAppsScript {
getRange(a1Notation: string): Range;
getRangeByName(name: string): Range;
getRangeList(a1Notations: string[]): RangeList;
+ getRecalculationInterval(): RecalculationInterval;
getRowHeight(rowPosition: Integer): Integer;
getSelection(): Selection;
getSheetByName(name: string): Sheet;
@@ -1859,9 +1905,11 @@ declare namespace GoogleAppsScript {
insertSheet(sheetName: string, options: Object): Sheet;
insertSheetWithDataSourceTable(spec: DataSourceSpec): Sheet;
isColumnHiddenByUser(columnPosition: Integer): boolean;
+ isIterativeCalculationEnabled(): boolean;
isRowHiddenByFilter(rowPosition: Integer): boolean;
isRowHiddenByUser(rowPosition: Integer): boolean;
moveActiveSheet(pos: Integer): void;
+ moveChartToObjectSheet(chart: EmbeddedChart): Sheet;
removeEditor(emailAddress: string): Spreadsheet;
removeEditor(user: Base.User): Spreadsheet;
removeMenu(name: string): void;
@@ -1880,7 +1928,11 @@ declare namespace GoogleAppsScript {
setCurrentCell(cell: Range): Range;
setFrozenColumns(columns: Integer): void;
setFrozenRows(rows: Integer): void;
+ setIterativeCalculationConvergenceThreshold(minThreshold: Number): Spreadsheet;
+ setIterativeCalculationEnabled(isEnabled: boolean): Spreadsheet;
+ setMaxIterativeCalculationCycles(maxIterations: Integer): Spreadsheet;
setNamedRange(name: string, range: Range): void;
+ setRecalculationInterval(recalculationInterval: RecalculationInterval): Spreadsheet;
setRowHeight(rowPosition: Integer, height: Integer): Sheet;
setSpreadsheetLocale(locale: string): void;
setSpreadsheetTimeZone(timezone: string): void;
@@ -1923,7 +1975,9 @@ declare namespace GoogleAppsScript {
PivotTableSummarizeFunction: typeof PivotTableSummarizeFunction;
PivotValueDisplayType: typeof PivotValueDisplayType;
ProtectionType: typeof ProtectionType;
+ RecalculationInterval: typeof RecalculationInterval;
RelativeDate: typeof RelativeDate;
+ SheetType: typeof SheetType;
TextDirection: typeof TextDirection;
TextToColumnsDelimiter: typeof TextToColumnsDelimiter;
WrapStrategy: typeof WrapStrategy;
@@ -1962,6 +2016,24 @@ declare namespace GoogleAppsScript {
*/
export enum TextDirection { LEFT_TO_RIGHT, RIGHT_TO_LEFT }
+ /**
+ * Find or replace text within a range, sheet or spreadsheet. Can also specify search options.
+ */
+ export interface TextFinder {
+ findAll(): Range[];
+ findNext(): Range;
+ findPrevious(): Range;
+ getCurrentMatch(): Range;
+ ignoreDiacritics(ignoreDiacritics: boolean): TextFinder;
+ matchCase(matchCase: boolean): TextFinder;
+ matchEntireCell(matchEntireCell: boolean): TextFinder;
+ matchFormulaText(matchFormulaText: boolean): TextFinder;
+ replaceAllWith(replaceText: string): Integer;
+ replaceWith(replaceText: string): Integer;
+ startFrom(startRange: Range): TextFinder;
+ useRegularExpression(useRegEx: boolean): TextFinder;
+ }
+
/**
* Access the text rotation settings for a cell.
*/
diff --git a/types/google-apps-script/google-apps-script.xml-service.d.ts b/types/google-apps-script/google-apps-script.xml-service.d.ts
index ff63f961b8..77d9ff10ae 100644
--- a/types/google-apps-script/google-apps-script.xml-service.d.ts
+++ b/types/google-apps-script/google-apps-script.xml-service.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for Google Apps Script 2018-07-11
+// Type definitions for Google Apps Script 2019-04-09
// Project: https://developers.google.com/apps-script/
// Definitions by: motemen
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -291,7 +291,7 @@ declare namespace GoogleAppsScript {
* var root = document.getRootElement();
* var atom = XmlService.getNamespace('http://www.w3.org/2005/Atom');
*
- * var entries = document.getRootElement().getChildren('entry', atom);
+ * var entries = root.getChildren('entry', atom);
* for (var i = 0; i < entries.length; i++) {
* var title = entries[i].getChild('title', atom).getText();
* var categoryElements = entries[i].getChildren('category', atom);