diff --git a/types/google-apps-script/google-apps-script.base.d.ts b/types/google-apps-script/google-apps-script.base.d.ts index 8f5a425d23..f320ec2b93 100644 --- a/types/google-apps-script/google-apps-script.base.d.ts +++ b/types/google-apps-script/google-apps-script.base.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Apps Script 2019-10-24 +// Type definitions for Google Apps Script 2019-11-06 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -25,10 +25,8 @@ declare namespace GoogleAppsScript { setDataFromString(string: string): Blob; setDataFromString(string: string, charset: string): Blob; setName(name: string): Blob; - /** @deprecated DO NOT USE */ - getAllBlobs(): Blob[]; + /** @deprecated DO NOT USE */getAllBlobs(): Blob[]; } - /** * Interface for objects that can export their data as a Blob. * Implementing classes @@ -73,7 +71,6 @@ declare namespace GoogleAppsScript { getAs(contentType: string): Blob; getBlob(): Blob; } - /** * This class provides access to dialog boxes specific to Google Sheets. * @@ -92,7 +89,6 @@ declare namespace GoogleAppsScript { msgBox(prompt: string, buttons: ButtonSet): string; msgBox(title: string, prompt: string, buttons: ButtonSet): string; } - /** * An enum representing predetermined, localized dialog buttons returned by an alert or PromptResponse.getSelectedButton() to indicate * which button in a dialog the user clicked. These values cannot be set; to add buttons to an @@ -110,7 +106,6 @@ declare namespace GoogleAppsScript { * } */ enum Button { CLOSE, OK, CANCEL, YES, NO } - /** * An enum representing predetermined, localized sets of one or more dialog buttons that can be * added to an alert or a prompt. To determine which button the user clicked, @@ -128,12 +123,10 @@ declare namespace GoogleAppsScript { * } */ enum ButtonSet { OK, OK_CANCEL, YES_NO, YES_NO_CANCEL } - /** * The types of Colors */ enum ColorType { UNSUPPORTED, RGB, THEME } - /** * This class allows the developer to write out text to the debugging logs. */ @@ -143,7 +136,6 @@ declare namespace GoogleAppsScript { log(data: any): Logger; log(format: string, ...values: any[]): Logger; } - /** * A custom menu in an instance of the user interface for a Google App. A script can only interact * with the UI for the current instance of an open document or form, and only if the script is container-bound to the document or form. For more @@ -167,7 +159,6 @@ declare namespace GoogleAppsScript { addSubMenu(menu: Menu): Menu; addToUi(): void; } - /** * An enumeration that provides access to MIME-type declarations without typing the strings * explicitly. Methods that expect a MIME type rendered as a string (for example, @@ -189,12 +180,10 @@ declare namespace GoogleAppsScript { * } */ enum MimeType { GOOGLE_APPS_SCRIPT, GOOGLE_DRAWINGS, GOOGLE_DOCS, GOOGLE_FORMS, GOOGLE_SHEETS, GOOGLE_SITES, GOOGLE_SLIDES, FOLDER, BMP, GIF, JPEG, PNG, SVG, PDF, CSS, CSV, HTML, JAVASCRIPT, PLAIN_TEXT, RTF, OPENDOCUMENT_GRAPHICS, OPENDOCUMENT_PRESENTATION, OPENDOCUMENT_SPREADSHEET, OPENDOCUMENT_TEXT, MICROSOFT_EXCEL, MICROSOFT_EXCEL_LEGACY, MICROSOFT_POWERPOINT, MICROSOFT_POWERPOINT_LEGACY, MICROSOFT_WORD, MICROSOFT_WORD_LEGACY, ZIP } - /** * An enum representing the months of the year. */ enum Month { JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER } - /** * A response to a prompt dialog displayed in the * user-interface environment for a Google App. The response contains any text the user entered in @@ -218,7 +207,6 @@ declare namespace GoogleAppsScript { getResponseText(): string; getSelectedButton(): Button; } - /** * A color defined by red, green, blue color channels. */ @@ -229,7 +217,6 @@ declare namespace GoogleAppsScript { getGreen(): Integer; getRed(): Integer; } - /** * The Session class provides access to session information, such as the user's email address (in * some circumstances) and language setting. @@ -240,12 +227,9 @@ declare namespace GoogleAppsScript { getEffectiveUser(): User; getScriptTimeZone(): string; getTemporaryActiveUserKey(): string; - /** @deprecated DO NOT USE */ - getTimeZone(): string; - /** @deprecated DO NOT USE */ - getUser(): User; + /** @deprecated DO NOT USE */getTimeZone(): string; + /** @deprecated DO NOT USE */getUser(): User; } - /** * An instance of the user-interface environment for a Google App that allows the script to add * features like menus, dialogs, and sidebars. A script can only interact with the UI for the @@ -279,24 +263,19 @@ declare namespace GoogleAppsScript { showModalDialog(userInterface: HTML.HtmlOutput, title: string): void; showModelessDialog(userInterface: HTML.HtmlOutput, title: string): void; showSidebar(userInterface: HTML.HtmlOutput): void; - /** @deprecated DO NOT USE */ - showDialog(userInterface: HTML.HtmlOutput): void; + /** @deprecated DO NOT USE */showDialog(userInterface: HTML.HtmlOutput): void; } - /** * Representation of a user, suitable for scripting. */ interface User { getEmail(): string; - /** @deprecated DO NOT USE */ - getUserLoginId(): string; + /** @deprecated DO NOT USE */getUserLoginId(): string; } - /** * An enum representing the days of the week. */ enum Weekday { SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY } - /** * This class allows the developer to write logs to the Google Cloud Platform's Stackdriver Logging service. The following * shows some logging examples: diff --git a/types/google-apps-script/google-apps-script.cache.d.ts b/types/google-apps-script/google-apps-script.cache.d.ts index 1793ccc960..342f1b7ac4 100644 --- a/types/google-apps-script/google-apps-script.cache.d.ts +++ b/types/google-apps-script/google-apps-script.cache.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Apps Script 2019-10-24 +// Type definitions for Google Apps Script 2019-11-06 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -37,7 +37,6 @@ declare namespace GoogleAppsScript { remove(key: string): void; removeAll(keys: string[]): void; } - /** * CacheService allows you to access a cache for short term storage of data. * 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 d18a346a22..93bca59874 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 2019-10-24 +// Type definitions for Google Apps Script 2019-11-06 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -47,7 +47,6 @@ declare namespace GoogleAppsScript { setTimeZone(timeZone: string): Calendar; unsubscribeFromCalendar(): void; } - /** * Allows a script to read and update the user's Google Calendar. This class provides direct access * to the user's default calendar, as well as the ability to retrieve additional calendars that the @@ -105,7 +104,6 @@ declare namespace GoogleAppsScript { subscribeToCalendar(id: string): Calendar; subscribeToCalendar(id: string, options: { [key: string]: any }): Calendar; } - /** * Represents a single calendar event. */ @@ -165,7 +163,6 @@ declare namespace GoogleAppsScript { setTitle(title: string): CalendarEvent; setVisibility(visibility: Visibility): CalendarEvent; } - /** * Represents a series of events (a recurring event). */ @@ -217,17 +214,14 @@ declare namespace GoogleAppsScript { setTitle(title: string): CalendarEventSeries; setVisibility(visibility: Visibility): CalendarEventSeries; } - /** * An enum representing the named colors available in the Calendar service. */ enum Color { BLUE, BROWN, CHARCOAL, CHESTNUT, GRAY, GREEN, INDIGO, LIME, MUSTARD, OLIVE, ORANGE, PINK, PLUM, PURPLE, RED, RED_ORANGE, SEA_BLUE, SLATE, TEAL, TURQOISE, YELLOW } - /** * An enum representing the named event colors available in the Calendar service. */ enum EventColor { PALE_BLUE, PALE_GREEN, MAUVE, PALE_RED, YELLOW, ORANGE, CYAN, GRAY, BLUE, GREEN, RED } - /** * Represents a guest of an event. */ @@ -236,10 +230,8 @@ declare namespace GoogleAppsScript { getEmail(): string; getGuestStatus(): GuestStatus; getName(): string; - /** @deprecated DO NOT USE */ - getStatus(): string; + /** @deprecated DO NOT USE */getStatus(): string; } - /** * Represents the recurrence settings for an event series. */ @@ -256,12 +248,10 @@ declare namespace GoogleAppsScript { addYearlyRule(): RecurrenceRule; setTimeZone(timeZone: string): EventRecurrence; } - /** * An enum representing the statuses a guest can have for an event. */ enum GuestStatus { INVITED, MAYBE, NO, OWNER, YES } - /** * Represents a recurrence rule for an event series. * @@ -300,7 +290,6 @@ declare namespace GoogleAppsScript { until(endDate: Base.Date): RecurrenceRule; weekStartsOn(day: Base.Weekday): RecurrenceRule; } - /** * An enum representing the visibility of an event. */ 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 d53191a7cf..233793d9aa 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 2019-10-24 +// Type definitions for Google Apps Script 2019-11-06 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -21,10 +21,8 @@ declare namespace GoogleAppsScript { setFunctionName(functionName: string): Action; setLoadIndicator(loadIndicator: LoadIndicator): Action; setParameters(parameters: { [key: string]: string }): Action; - /** @deprecated DO NOT USE */ - setMethodName(functionName: string): Action; + /** @deprecated DO NOT USE */setMethodName(functionName: string): Action; } - /** * The response object that may be returned from a callback function (e.g., a form response handler) * to perform one or more actions on the client. Some combinations of actions are not supported. @@ -55,7 +53,6 @@ declare namespace GoogleAppsScript { interface ActionResponse { printJson(): string; } - /** * A builder for ActionResponse objects. */ @@ -66,7 +63,6 @@ declare namespace GoogleAppsScript { setOpenLink(openLink: OpenLink): ActionResponseBuilder; setStateChanged(stateChanged: boolean): ActionResponseBuilder; } - /** * An authorization action that will send the user to the AuthorizationUrl when clicked. * @@ -76,7 +72,6 @@ declare namespace GoogleAppsScript { interface AuthorizationAction { setAuthorizationUrl(authorizationUrl: string): AuthorizationAction; } - /** * An error that can be returned to trigger an authorization card to be shown to the user. * @@ -92,7 +87,6 @@ declare namespace GoogleAppsScript { setResourceDisplayName(name: string): AuthorizationException; throwException(): void; } - /** * A base class for all buttons. */ @@ -103,7 +97,6 @@ declare namespace GoogleAppsScript { setOnClickOpenLinkAction(action: Action): Button; setOpenLink(openLink: OpenLink): Button; } - /** * Holds a set of Button objects that are displayed in a row. * @@ -120,7 +113,6 @@ declare namespace GoogleAppsScript { interface ButtonSet { addButton(button: Button): ButtonSet; } - /** * A context card that represents a single view in the * UI. @@ -137,7 +129,6 @@ declare namespace GoogleAppsScript { interface Card { printJson(): string; } - /** * A clickable menu item that is added to the card header menu. * @@ -156,7 +147,6 @@ declare namespace GoogleAppsScript { setOpenLink(openLink: OpenLink): CardAction; setText(text: string): CardAction; } - /** * A builder for Card objects. */ @@ -167,7 +157,6 @@ declare namespace GoogleAppsScript { setHeader(cardHeader: CardHeader): CardBuilder; setName(name: string): CardBuilder; } - /** * The header of a Card. * @@ -184,7 +173,6 @@ declare namespace GoogleAppsScript { setSubtitle(subtitle: string): CardHeader; setTitle(title: string): CardHeader; } - /** * A card section holds groups of widgets and provides visual separation between them. * @@ -204,7 +192,6 @@ declare namespace GoogleAppsScript { setHeader(header: string): CardSection; setNumUncollapsibleWidgets(numUncollapsibleWidgets: Integer): CardSection; } - /** * CardService provides the ability to create generic cards used across different Google * extensibility products, such as Gmail add-ons. @@ -287,7 +274,6 @@ declare namespace GoogleAppsScript { newUpdateDraftActionResponseBuilder(): UpdateDraftActionResponseBuilder; newUpdateDraftBodyAction(): UpdateDraftBodyAction; } - /** * The response object that may be returned from a callback method for compose action in a Gmail add-on. * @@ -303,7 +289,6 @@ declare namespace GoogleAppsScript { interface ComposeActionResponse { printJson(): string; } - /** * A builder for ComposeActionResponse objects. * @@ -316,22 +301,18 @@ declare namespace GoogleAppsScript { build(): ComposeActionResponse; setGmailDraft(draft: Gmail.GmailDraft): ComposeActionResponseBuilder; } - /** * An enum value that specifies whether the composed email is a standalone or reply draft. */ enum ComposedEmailType { REPLY_AS_DRAFT, STANDALONE_DRAFT } - /** * An enum value that specifies the content type of the content generated by a UpdateDraftActionResponse. */ enum ContentType { TEXT, MUTABLE_HTML, IMMUTABLE_HTML } - /** * Predefined icons that can be used in various UI objects, such as ImageButton or KeyValue widgets. */ enum Icon { NONE, AIRPLANE, BOOKMARK, BUS, CAR, CLOCK, CONFIRMATION_NUMBER_ICON, DOLLAR, DESCRIPTION, EMAIL, EVENT_PERFORMER, EVENT_SEAT, FLIGHT_ARRIVAL, FLIGHT_DEPARTURE, HOTEL, HOTEL_ROOM_TYPE, INVITE, MAP_PIN, MEMBERSHIP, MULTIPLE_PEOPLE, OFFER, PERSON, PHONE, RESTAURANT_ICON, SHOPPING_CART, STAR, STORE, TICKET, TRAIN, VIDEO_CAMERA, VIDEO_PLAY } - /** * A widget that shows a single image. * @@ -346,7 +327,6 @@ declare namespace GoogleAppsScript { setOnClickOpenLinkAction(action: Action): Image; setOpenLink(openLink: OpenLink): Image; } - /** * A ImageButton with an image displayed on it. * @@ -366,12 +346,10 @@ declare namespace GoogleAppsScript { setOnClickOpenLinkAction(action: Action): ImageButton; setOpenLink(openLink: OpenLink): ImageButton; } - /** * An enum that defines an image cropping style. */ enum ImageStyle { SQUARE, CIRCLE } - /** * A widget that displays one or more "keys" around a text "value". The possible keys include an * icon, a label above and a label below. Setting the text content and one of the keys is required @@ -408,12 +386,10 @@ declare namespace GoogleAppsScript { setSwitch(switchToSet: Switch): KeyValue; setTopLabel(text: string): KeyValue; } - /** * An enum type that specifies the type of loading or progress indicator to display while an Action is being processed. */ enum LoadIndicator { SPINNER, NONE } - /** * A helper object that controls card navigation. See the card navigation guide for more details. */ @@ -425,7 +401,6 @@ declare namespace GoogleAppsScript { pushCard(card: Card): Navigation; updateCard(card: Card): Navigation; } - /** * A notification shown to the user as a response to interacting with a UI element. * @@ -444,7 +419,6 @@ declare namespace GoogleAppsScript { interface Notification { setText(text: string): Notification; } - /** * An enum that specifies what to do when a URL opened through an OpenLink is closed. * @@ -453,7 +427,6 @@ declare namespace GoogleAppsScript { * OnClose takes precedence. */ enum OnClose { NOTHING, RELOAD_ADD_ON } - /** * An enum that specifies how to open a URL. * @@ -465,7 +438,6 @@ declare namespace GoogleAppsScript { * support both selected values together, OnClose takes precedence. */ enum OpenAs { FULL_SIZE, OVERLAY } - /** * Represents an action to open a link with some options. * @@ -492,7 +464,6 @@ declare namespace GoogleAppsScript { setOpenAs(openAs: OpenAs): OpenLink; setUrl(url: string): OpenLink; } - /** * An input field that allows choosing between a set of predefined options. * @@ -521,12 +492,10 @@ declare namespace GoogleAppsScript { setTitle(title: string): SelectionInput; setType(type: SelectionInputType): SelectionInput; } - /** * Type of selection input. */ enum SelectionInputType { CHECK_BOX, RADIO_BUTTON, DROPDOWN } - /** * Autocomplete suggestions to supplement a TextInput widget. * @@ -539,7 +508,6 @@ declare namespace GoogleAppsScript { addSuggestion(suggestion: string): Suggestions; addSuggestions(suggestions: string[]): Suggestions; } - /** * A response object that can be returned from a suggestions callback function. This is used with * TextInput widgets that implement autocomplete. @@ -553,7 +521,6 @@ declare namespace GoogleAppsScript { interface SuggestionsResponse { printJson(): string; } - /** * A builder for SuggestionsResponse objects. */ @@ -561,7 +528,6 @@ declare namespace GoogleAppsScript { build(): SuggestionsResponse; setSuggestions(suggestions: Suggestions): SuggestionsResponseBuilder; } - /** * A UI element that supports being toggled on or off. This can only be used within a KeyValue widget. * @@ -580,7 +546,6 @@ declare namespace GoogleAppsScript { setSelected(selected: boolean): Switch; setValue(value: string): Switch; } - /** * A TextButton with a text label. You can set the background color and disable the button when * needed. @@ -601,7 +566,6 @@ declare namespace GoogleAppsScript { setText(text: string): TextButton; setTextButtonStyle(textButtonStyle: TextButtonStyle): TextButton; } - /** * An enum that specifies the style for TextButton. * @@ -610,7 +574,6 @@ declare namespace GoogleAppsScript { * TextButton.setBackgroundColor(backgroundColor). */ enum TextButtonStyle { TEXT, FILLED } - /** * A input field widget that accepts text input. * @@ -629,7 +592,6 @@ declare namespace GoogleAppsScript { setTitle(title: string): TextInput; setValue(value: string): TextInput; } - /** * A widget that displays text and supports basic HTML formatting. * @@ -639,7 +601,6 @@ declare namespace GoogleAppsScript { interface TextParagraph { setText(text: string): TextParagraph; } - /** * The response object that may be returned from a method that creates universal action. * @@ -663,7 +624,6 @@ declare namespace GoogleAppsScript { interface UniversalActionResponse { printJson(): string; } - /** * A builder for the UniversalActionResponse objects. */ @@ -672,7 +632,6 @@ declare namespace GoogleAppsScript { displayAddOnCards(cardObjects: Card[]): UniversalActionResponseBuilder; setOpenLink(openLink: OpenLink): UniversalActionResponseBuilder; } - /** * Represents an action that updates the email draft that the user is currently editing. * @@ -712,7 +671,6 @@ declare namespace GoogleAppsScript { interface UpdateDraftActionResponse { printJson(): string; } - /** * A builder for UpdateDraftActionResponse objects. */ @@ -720,7 +678,6 @@ declare namespace GoogleAppsScript { build(): UpdateDraftActionResponse; setUpdateDraftBodyAction(updateDraftBodyAction: UpdateDraftBodyAction): UpdateDraftActionResponseBuilder; } - /** * Represents an action that updates the email draft body. */ @@ -728,18 +685,15 @@ declare namespace GoogleAppsScript { addUpdateContent(content: string, contentType: ContentType): UpdateDraftBodyAction; setUpdateType(updateType: UpdateDraftBodyType): UpdateDraftBodyAction; } - /** * An enum value that specifies the type of an UpdateDraftBodyAction. */ enum UpdateDraftBodyType { IN_PLACE_INSERT } - /** * Base class for all widgets that can be added to a Card. */ // tslint:disable-next-line: no-empty-interface interface Widget { - // tslint:disable-next-line: no-empty-interface } } } 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 6d604aeeca..a4db06e0d0 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 2019-10-24 +// Type definitions for Google Apps Script 2019-11-06 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -68,7 +68,6 @@ declare namespace GoogleAppsScript { setYAxisTitleTextStyle(textStyle: TextStyle): AreaChartBuilder; useLogScale(): AreaChartBuilder; } - /** * Builder for bar charts. For more details, see the Google Charts documentation. * @@ -115,7 +114,6 @@ declare namespace GoogleAppsScript { setYAxisTitleTextStyle(textStyle: TextStyle): BarChartBuilder; useLogScale(): BarChartBuilder; } - /** * A Chart object, which can be converted to a static image. For charts embedded in spreadsheets, * see EmbeddedChart. @@ -125,17 +123,14 @@ declare namespace GoogleAppsScript { getBlob(): Base.Blob; getOptions(): ChartOptions; } - /** * An enumeration of how hidden dimensions in a source are expressed in a chart. */ enum ChartHiddenDimensionStrategy { IGNORE_BOTH, IGNORE_ROWS, IGNORE_COLUMNS, SHOW_BOTH } - /** * An enumeration of how multiple ranges in the source are expressed in a chart. */ enum ChartMergeStrategy { MERGE_COLUMNS, MERGE_ROWS } - /** * Exposes options currently configured for a Chart, such as height, color, etc. * @@ -148,12 +143,10 @@ declare namespace GoogleAppsScript { interface ChartOptions { get(option: string): any; } - /** * Chart types supported by the Charts service. */ enum ChartType { TIMELINE, AREA, BAR, BUBBLE, CANDLESTICK, COLUMN, COMBO, GAUGE, GEO, HISTOGRAM, RADAR, LINE, ORG, PIE, SCATTER, SPARKLINE, STEPPED_AREA, TABLE, TREEMAP, WATERFALL } - /** * Entry point for creating Charts in scripts. * @@ -206,7 +199,6 @@ declare namespace GoogleAppsScript { newTableChart(): TableChartBuilder; newTextStyle(): TextStyleBuilder; } - /** * Builder for column charts. For more details, see the Google Charts documentation. * @@ -260,17 +252,14 @@ declare namespace GoogleAppsScript { setYAxisTitleTextStyle(textStyle: TextStyle): ColumnChartBuilder; useLogScale(): ColumnChartBuilder; } - /** * An enumeration of the valid data types for columns in a DataTable. */ enum ColumnType { DATE, NUMBER, STRING } - /** * An enumeration of the styles for curves in a chart. */ enum CurveStyle { NORMAL, SMOOTH } - /** * A Data Table to be used in charts. A DataTable can come from sources such as Google * Sheets or specified data-table URLs, or can be filled in by hand. This class intentionally has no @@ -278,9 +267,7 @@ declare namespace GoogleAppsScript { */ // tslint:disable-next-line: no-empty-interface interface DataTable { - // tslint:disable-next-line: no-empty-interface } - /** * Builder of DataTable objects. Building a data table consists of first specifying its columns, and * then adding its rows, one at a time. Example: @@ -302,7 +289,6 @@ declare namespace GoogleAppsScript { build(): DataTable; setValue(row: Integer, column: Integer, value: any): DataTableBuilder; } - /** * Interface for objects that can represent their data as a DataTable. * Implementing classes @@ -316,7 +302,6 @@ declare namespace GoogleAppsScript { interface DataTableSource { getDataTable(): DataTable; } - /** * A data view definition for visualizing chart data. * @@ -328,9 +313,7 @@ declare namespace GoogleAppsScript { */ // tslint:disable-next-line: no-empty-interface interface DataViewDefinition { - // tslint:disable-next-line: no-empty-interface } - /** * Builder for DataViewDefinition objects. * @@ -376,7 +359,6 @@ declare namespace GoogleAppsScript { build(): DataViewDefinition; setColumns(columns: any[]): DataViewDefinitionBuilder; } - /** * Builder for line charts. For more details, see the Google Charts documentation. * @@ -423,7 +405,6 @@ declare namespace GoogleAppsScript { setYAxisTitleTextStyle(textStyle: TextStyle): LineChartBuilder; useLogScale(): LineChartBuilder; } - /** * 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 outputs true in @@ -440,7 +421,6 @@ declare namespace GoogleAppsScript { * in the filter input box, using one of the above matching types. */ enum MatchType { EXACT, PREFIX, ANY } - /** * A builder for number range filter controls. * @@ -458,17 +438,14 @@ declare namespace GoogleAppsScript { setShowRangeValues(showRangeValues: boolean): NumberRangeFilterBuilder; setTicks(ticks: Integer): NumberRangeFilterBuilder; } - /** * An enumeration of the orientation of an object. */ enum Orientation { HORIZONTAL, VERTICAL } - /** * An enumeration of how to display selected values in picker widget. */ enum PickerValuesLayout { ASIDE, BELOW, BELOW_WRAPPING, BELOW_STACKED } - /** * A builder for pie charts. For more details, see the Google Charts documentation. * @@ -503,17 +480,14 @@ declare namespace GoogleAppsScript { setTitle(chartTitle: string): PieChartBuilder; setTitleTextStyle(textStyle: TextStyle): PieChartBuilder; } - /** * An enumeration of the styles of points in a line. */ enum PointStyle { NONE, TINY, MEDIUM, LARGE, HUGE } - /** * An enumeration of legend positions within a chart. */ enum Position { TOP, RIGHT, BOTTOM, NONE } - /** * Builder for scatter charts. For more details, see the Google Charts documentation. * @@ -559,7 +533,6 @@ declare namespace GoogleAppsScript { setYAxisTitle(title: string): ScatterChartBuilder; setYAxisTitleTextStyle(textStyle: TextStyle): ScatterChartBuilder; } - /** * A builder for string filter controls. * @@ -575,7 +548,6 @@ declare namespace GoogleAppsScript { setMatchType(matchType: MatchType): StringFilterBuilder; setRealtimeTrigger(realtimeTrigger: boolean): StringFilterBuilder; } - /** * A builder for table charts. For more details, see the Google Charts documentation. * @@ -611,7 +583,6 @@ declare namespace GoogleAppsScript { showRowNumberColumn(showRowNumber: boolean): TableChartBuilder; useAlternatingRowStyle(alternate: boolean): TableChartBuilder; } - /** * A text style configuration object. Used in charts options to configure text style for elements * that accepts it, such as title, horizontal axis, vertical axis, legend and tooltip. @@ -648,7 +619,6 @@ declare namespace GoogleAppsScript { getFontName(): string; getFontSize(): number; } - /** * A builder used to create TextStyle objects. It allows configuration of the text's * properties such as name, color, and size. diff --git a/types/google-apps-script/google-apps-script.contacts.d.ts b/types/google-apps-script/google-apps-script.contacts.d.ts index 0f93aebd46..1237e93ef4 100644 --- a/types/google-apps-script/google-apps-script.contacts.d.ts +++ b/types/google-apps-script/google-apps-script.contacts.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Apps Script 2019-10-24 +// Type definitions for Google Apps Script 2019-11-06 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -21,7 +21,6 @@ declare namespace GoogleAppsScript { setLabel(field: Field): AddressField; setLabel(label: string): AddressField; } - /** * Company field in a Contact. */ @@ -34,7 +33,6 @@ declare namespace GoogleAppsScript { setCompanyName(company: string): CompanyField; setJobTitle(title: string): CompanyField; } - /** * A Contact contains the name, address, and various contact details of a contact. */ @@ -91,52 +89,29 @@ declare namespace GoogleAppsScript { setPrefix(prefix: string): Contact; setShortName(shortName: string): Contact; setSuffix(suffix: string): Contact; - /** @deprecated DO NOT USE */ - getEmailAddresses(): string[]; - /** @deprecated DO NOT USE */ - getHomeAddress(): string; - /** @deprecated DO NOT USE */ - getHomeFax(): string; - /** @deprecated DO NOT USE */ - getHomePhone(): string; - /** @deprecated DO NOT USE */ - getMobilePhone(): string; - /** @deprecated DO NOT USE */ - getPager(): string; - /** @deprecated DO NOT USE */ - getUserDefinedField(key: string): string; - /** @deprecated DO NOT USE */ - getUserDefinedFields(): any; - /** @deprecated DO NOT USE */ - getWorkAddress(): string; - /** @deprecated DO NOT USE */ - getWorkFax(): string; - /** @deprecated DO NOT USE */ - getWorkPhone(): string; - /** @deprecated DO NOT USE */ - setHomeAddress(addr: string): void; - /** @deprecated DO NOT USE */ - setHomeFax(phone: string): void; - /** @deprecated DO NOT USE */ - setHomePhone(phone: string): void; - /** @deprecated DO NOT USE */ - setMobilePhone(phone: string): void; - /** @deprecated DO NOT USE */ - setPager(phone: string): void; - /** @deprecated DO NOT USE */ - setPrimaryEmail(primaryEmail: string): void; - /** @deprecated DO NOT USE */ - setUserDefinedField(key: string, value: string): void; - /** @deprecated DO NOT USE */ - setUserDefinedFields(o: any): void; - /** @deprecated DO NOT USE */ - setWorkAddress(addr: string): void; - /** @deprecated DO NOT USE */ - setWorkFax(phone: string): void; - /** @deprecated DO NOT USE */ - setWorkPhone(phone: string): void; + /** @deprecated DO NOT USE */getEmailAddresses(): string[]; + /** @deprecated DO NOT USE */getHomeAddress(): string; + /** @deprecated DO NOT USE */getHomeFax(): string; + /** @deprecated DO NOT USE */getHomePhone(): string; + /** @deprecated DO NOT USE */getMobilePhone(): string; + /** @deprecated DO NOT USE */getPager(): string; + /** @deprecated DO NOT USE */getUserDefinedField(key: string): string; + /** @deprecated DO NOT USE */getUserDefinedFields(): any; + /** @deprecated DO NOT USE */getWorkAddress(): string; + /** @deprecated DO NOT USE */getWorkFax(): string; + /** @deprecated DO NOT USE */getWorkPhone(): string; + /** @deprecated DO NOT USE */setHomeAddress(addr: string): void; + /** @deprecated DO NOT USE */setHomeFax(phone: string): void; + /** @deprecated DO NOT USE */setHomePhone(phone: string): void; + /** @deprecated DO NOT USE */setMobilePhone(phone: string): void; + /** @deprecated DO NOT USE */setPager(phone: string): void; + /** @deprecated DO NOT USE */setPrimaryEmail(primaryEmail: string): void; + /** @deprecated DO NOT USE */setUserDefinedField(key: string, value: string): void; + /** @deprecated DO NOT USE */setUserDefinedFields(o: any): void; + /** @deprecated DO NOT USE */setWorkAddress(addr: string): void; + /** @deprecated DO NOT USE */setWorkFax(phone: string): void; + /** @deprecated DO NOT USE */setWorkPhone(phone: string): void; } - /** * A ContactGroup is is a group of contacts. */ @@ -149,12 +124,9 @@ declare namespace GoogleAppsScript { isSystemGroup(): boolean; removeContact(contact: Contact): ContactGroup; setName(name: string): ContactGroup; - /** @deprecated DO NOT USE */ - getGroupName(): string; - /** @deprecated DO NOT USE */ - setGroupName(name: string): void; + /** @deprecated DO NOT USE */getGroupName(): string; + /** @deprecated DO NOT USE */setGroupName(name: string): void; } - /** * This class allows users to access their own Google Contacts and create, remove, and update * contacts listed therein. @@ -202,14 +174,10 @@ declare namespace GoogleAppsScript { getContactsByUrl(query: string): Contact[]; getContactsByUrl(query: string, label: Field): Contact[]; getContactsByUrl(query: string, label: string): Contact[]; - /** @deprecated DO NOT USE */ - findByEmailAddress(email: string): Contact; - /** @deprecated DO NOT USE */ - findContactGroup(name: string): ContactGroup; - /** @deprecated DO NOT USE */ - getAllContacts(): Contact[]; + /** @deprecated DO NOT USE */findByEmailAddress(email: string): Contact; + /** @deprecated DO NOT USE */findContactGroup(name: string): ContactGroup; + /** @deprecated DO NOT USE */getAllContacts(): Contact[]; } - /** * A custom field in a Contact. */ @@ -221,7 +189,6 @@ declare namespace GoogleAppsScript { setLabel(label: string): CustomField; setValue(value: any): CustomField; } - /** * A date field in a Contact. * @@ -240,7 +207,6 @@ declare namespace GoogleAppsScript { setLabel(label: Field): DateField; setLabel(label: string): DateField; } - /** * An email field in a Contact. */ @@ -256,22 +222,18 @@ declare namespace GoogleAppsScript { setLabel(field: Field): EmailField; setLabel(label: string): EmailField; } - /** * An enum for extended contacts fields. */ enum ExtendedField { HOBBY, MILEAGE, LANGUAGE, GENDER, BILLING_INFORMATION, DIRECTORY_SERVER, SENSITIVITY, PRIORITY, HOME, WORK, USER, OTHER } - /** * An enum for contacts fields. */ enum Field { FULL_NAME, GIVEN_NAME, MIDDLE_NAME, FAMILY_NAME, MAIDEN_NAME, NICKNAME, SHORT_NAME, INITIALS, PREFIX, SUFFIX, HOME_EMAIL, WORK_EMAIL, BIRTHDAY, ANNIVERSARY, HOME_ADDRESS, WORK_ADDRESS, ASSISTANT_PHONE, CALLBACK_PHONE, MAIN_PHONE, PAGER, HOME_FAX, WORK_FAX, HOME_PHONE, WORK_PHONE, MOBILE_PHONE, GOOGLE_VOICE, NOTES, GOOGLE_TALK, AIM, YAHOO, SKYPE, QQ, MSN, ICQ, JABBER, BLOG, FTP, PROFILE, HOME_PAGE, WORK_WEBSITE, HOME_WEBSITE, JOB_TITLE, COMPANY } - /** * An enum for contact gender. */ enum Gender { MALE, FEMALE } - /** * An instant messaging field in a Contact. */ @@ -286,7 +248,6 @@ declare namespace GoogleAppsScript { setLabel(field: Field): IMField; setLabel(label: string): IMField; } - /** * A phone number field in a Contact. */ @@ -300,17 +261,14 @@ declare namespace GoogleAppsScript { setLabel(label: string): PhoneField; setPhoneNumber(number: string): PhoneField; } - /** * An enum for contact priority. */ enum Priority { HIGH, LOW, NORMAL } - /** * An enum for contact sensitivity. */ enum Sensitivity { CONFIDENTIAL, NORMAL, PERSONAL, PRIVATE } - /** * A URL field in a Contact. */ diff --git a/types/google-apps-script/google-apps-script.content.d.ts b/types/google-apps-script/google-apps-script.content.d.ts index b980853559..b8ed56d8a0 100644 --- a/types/google-apps-script/google-apps-script.content.d.ts +++ b/types/google-apps-script/google-apps-script.content.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Apps Script 2019-10-24 +// Type definitions for Google Apps Script 2019-11-06 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -21,12 +21,10 @@ declare namespace GoogleAppsScript { createTextOutput(): TextOutput; createTextOutput(content: string): TextOutput; } - /** * An enum for mime types that can be served from a script. */ enum MimeType { ATOM, CSV, ICAL, JAVASCRIPT, JSON, RSS, TEXT, VCARD, XML } - /** * A TextOutput object that can be served from a script. * 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 9fd8031f7e..598b1dac0c 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-10-24 +// Type definitions for Google Apps Script 2019-11-06 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -11,12 +11,10 @@ declare namespace GoogleAppsScript { * An enum that defines the aggregation types that can be set for a Field. */ 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. */ 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. @@ -41,12 +39,10 @@ declare namespace GoogleAppsScript { setQuery(query: string): BigQueryConfig; setUseStandardSql(useStandardSql: boolean): BigQueryConfig; } - /** * An enum that defines the BigQuery parameter types that you can set. */ enum BigQueryParameterType { STRING, INT64, BOOL, FLOAT64 } - /** * Contains checkbox information for the config. Its properties determine how the checkbox is * displayed in Data Studio. @@ -63,7 +59,6 @@ declare namespace GoogleAppsScript { setId(id: string): Checkbox; setName(name: string): Checkbox; } - /** * CommunityConnector enables scripts to access builders and utilities to help with development of * Community Connectors for Data Studio. Use this class to get a reference to the Fields @@ -92,7 +87,6 @@ declare namespace GoogleAppsScript { newDebugError(): DebugError; newUserError(): UserError; } - /** * Contains the configuration entries for a connector. These configuration entries define what * questions are asked when adding a new connector. @@ -116,14 +110,12 @@ declare namespace GoogleAppsScript { printJson(): string; setDateRangeRequired(dateRangeRequired: boolean): Config; } - /** * DataStudioApp allows scripts to interact with developer-oriented features for Data Studio. */ interface DataStudioApp { createCommunityConnector(): CommunityConnector; } - /** * An error that is only visible to admins of the connector. * @@ -138,7 +130,6 @@ declare namespace GoogleAppsScript { setText(text: string): DebugError; throwException(): void; } - /** * Contains field-related data. Its properties determine how the field is used in Data Studio. * @@ -176,12 +167,10 @@ declare namespace GoogleAppsScript { setName(name: string): Field; setType(type: FieldType): Field; } - /** * An enum that defines the types that can be set for a Field. */ enum FieldType { YEAR, YEAR_QUARTER, YEAR_MONTH, YEAR_WEEK, YEAR_MONTH_DAY, YEAR_MONTH_DAY_HOUR, YEAR_MONTH_DAY_SECOND, QUARTER, MONTH, WEEK, MONTH_DAY, DAY_OF_WEEK, DAY, HOUR, MINUTE, DURATION, COUNTRY, COUNTRY_CODE, CONTINENT, CONTINENT_CODE, SUB_CONTINENT, SUB_CONTINENT_CODE, REGION, REGION_CODE, CITY, CITY_CODE, METRO, METRO_CODE, LATITUDE_LONGITUDE, NUMBER, PERCENT, TEXT, BOOLEAN, URL, HYPERLINK, IMAGE, IMAGE_LINK, CURRENCY_AED, CURRENCY_ALL, CURRENCY_ARS, CURRENCY_AUD, CURRENCY_BDT, CURRENCY_BGN, CURRENCY_BOB, CURRENCY_BRL, CURRENCY_CAD, CURRENCY_CDF, CURRENCY_CHF, CURRENCY_CLP, CURRENCY_CNY, CURRENCY_COP, CURRENCY_CRC, CURRENCY_CZK, CURRENCY_DKK, CURRENCY_DOP, CURRENCY_EGP, CURRENCY_ETB, CURRENCY_EUR, CURRENCY_GBP, CURRENCY_HKD, CURRENCY_HRK, CURRENCY_HUF, CURRENCY_IDR, CURRENCY_ILS, CURRENCY_INR, CURRENCY_IRR, CURRENCY_ISK, CURRENCY_JMD, CURRENCY_JPY, CURRENCY_KRW, CURRENCY_LKR, CURRENCY_LTL, CURRENCY_MNT, CURRENCY_MVR, CURRENCY_MXN, CURRENCY_MYR, CURRENCY_NOK, CURRENCY_NZD, CURRENCY_PAB, CURRENCY_PEN, CURRENCY_PHP, CURRENCY_PKR, CURRENCY_PLN, CURRENCY_RON, CURRENCY_RSD, CURRENCY_RUB, CURRENCY_SAR, CURRENCY_SEK, CURRENCY_SGD, CURRENCY_THB, CURRENCY_TRY, CURRENCY_TWD, CURRENCY_TZS, CURRENCY_UAH, CURRENCY_USD, CURRENCY_UYU, CURRENCY_VEF, CURRENCY_VND, CURRENCY_YER, CURRENCY_ZAR } - /** * Contains a set of Fields for a community connector. This set of fields define which * dimensions and metrics can be used in Data Studio. @@ -206,7 +195,6 @@ declare namespace GoogleAppsScript { setDefaultDimension(fieldId: string): void; setDefaultMetric(fieldId: string): void; } - /** * Builder to create a getAuthType() response for your script project. * @@ -226,7 +214,6 @@ declare namespace GoogleAppsScript { setAuthType(authType: AuthType): GetAuthTypeResponse; setHelpUrl(helpUrl: string): GetAuthTypeResponse; } - /** * Contains info data for the config. Its properties determine how the info is displayed in Data * Studio. @@ -242,7 +229,6 @@ declare namespace GoogleAppsScript { setId(id: string): Info; setText(text: string): Info; } - /** * A builder for creating options for SelectSingles and SelectMultiples. * @@ -268,7 +254,6 @@ declare namespace GoogleAppsScript { setLabel(label: string): OptionBuilder; setValue(value: string): OptionBuilder; } - /** * Contains select multiple information for the config. Its properties determine how the select * multiple is displayed in Data Studio. @@ -298,7 +283,6 @@ declare namespace GoogleAppsScript { setId(id: string): SelectMultiple; setName(name: string): SelectMultiple; } - /** * Contains select single information for the config. Its properties determine how the select single * is displayed in Data Studio. @@ -326,7 +310,6 @@ declare namespace GoogleAppsScript { setId(id: string): SelectSingle; setName(name: string): SelectSingle; } - /** * Contains text area information for the config. Its properties determine how the text input is * displayed in Data Studio. @@ -350,7 +333,6 @@ declare namespace GoogleAppsScript { setName(name: string): TextArea; setPlaceholder(placeholder: string): TextArea; } - /** * Contains text input information for the config. Its properties determine how the text input is * displayed in Data Studio. @@ -372,7 +354,6 @@ declare namespace GoogleAppsScript { setName(name: string): TextInput; setPlaceholder(placeholder: string): TextInput; } - /** * An error that is shown to users of the connector. * diff --git a/types/google-apps-script/google-apps-script.document.d.ts b/types/google-apps-script/google-apps-script.document.d.ts index ec5ba9b734..69f2d98b6d 100644 --- a/types/google-apps-script/google-apps-script.document.d.ts +++ b/types/google-apps-script/google-apps-script.document.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Apps Script 2019-10-24 +// Type definitions for Google Apps Script 2019-11-06 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -24,7 +24,6 @@ declare namespace GoogleAppsScript { * .setAttributes(0, 4, highlightStyle); */ enum Attribute { BACKGROUND_COLOR, BOLD, BORDER_COLOR, BORDER_WIDTH, CODE, FONT_FAMILY, FONT_SIZE, FOREGROUND_COLOR, HEADING, HEIGHT, HORIZONTAL_ALIGNMENT, INDENT_END, INDENT_FIRST_LINE, INDENT_START, ITALIC, GLYPH_TYPE, LEFT_TO_RIGHT, LINE_SPACING, LINK_URL, LIST_ID, MARGIN_BOTTOM, MARGIN_LEFT, MARGIN_RIGHT, MARGIN_TOP, NESTING_LEVEL, MINIMUM_HEIGHT, PADDING_BOTTOM, PADDING_LEFT, PADDING_RIGHT, PADDING_TOP, PAGE_HEIGHT, PAGE_WIDTH, SPACING_AFTER, SPACING_BEFORE, STRIKETHROUGH, UNDERLINE, VERTICAL_ALIGNMENT, WIDTH } - /** * An element representing a document body. The Body may contain ListItem, Paragraph, Table, and TableOfContents elements. For more information on document * structure, see the guide to extending @@ -102,20 +101,13 @@ declare namespace GoogleAppsScript { setPageWidth(pageWidth: number): Body; setText(text: string): Body; setTextAlignment(textAlignment: TextAlignment): Body; - /** @deprecated DO NOT USE */ - getFootnotes(): Footnote[]; - /** @deprecated DO NOT USE */ - getLinkUrl(): string; - /** @deprecated DO NOT USE */ - getNextSibling(): Element; - /** @deprecated DO NOT USE */ - getPreviousSibling(): Element; - /** @deprecated DO NOT USE */ - isAtDocumentEnd(): boolean; - /** @deprecated DO NOT USE */ - setLinkUrl(url: string): Body; + /** @deprecated DO NOT USE */getFootnotes(): Footnote[]; + /** @deprecated DO NOT USE */getLinkUrl(): string; + /** @deprecated DO NOT USE */getNextSibling(): Element; + /** @deprecated DO NOT USE */getPreviousSibling(): Element; + /** @deprecated DO NOT USE */isAtDocumentEnd(): boolean; + /** @deprecated DO NOT USE */setLinkUrl(url: string): Body; } - /** * An object representing a bookmark. * @@ -130,7 +122,6 @@ declare namespace GoogleAppsScript { getPosition(): Position; remove(): void; } - /** * A generic element that may contain other elements. All elements that may contain child elements, * such as Paragraph, inherit from ContainerElement. @@ -173,7 +164,6 @@ declare namespace GoogleAppsScript { setLinkUrl(url: string): ContainerElement; setTextAlignment(textAlignment: TextAlignment): ContainerElement; } - /** * A document, containing rich text and elements such as tables and lists. * @@ -228,7 +218,6 @@ declare namespace GoogleAppsScript { setName(name: string): Document; setSelection(range: Range): Document; } - /** * The document service creates and opens Documents that can be edited. * @@ -241,8 +230,7 @@ declare namespace GoogleAppsScript { interface DocumentApp { Attribute: typeof Attribute; ElementType: typeof ElementType; - /** @deprecated DO NOT USE */ - FontFamily: typeof FontFamily; + /** @deprecated DO NOT USE */FontFamily: typeof FontFamily; GlyphType: typeof GlyphType; HorizontalAlignment: typeof HorizontalAlignment; ParagraphHeading: typeof ParagraphHeading; @@ -255,7 +243,6 @@ declare namespace GoogleAppsScript { openById(id: string): Document; openByUrl(url: string): Document; } - /** * A generic element. Document contents are * represented as elements. For example, ListItem, Paragraph, and Table are @@ -341,7 +328,6 @@ declare namespace GoogleAppsScript { removeFromParent(): Element; setAttributes(attributes: any): Element; } - /** * An enumeration of all the element types. * @@ -354,7 +340,6 @@ declare namespace GoogleAppsScript { * } */ enum ElementType { BODY_SECTION, COMMENT_SECTION, DOCUMENT, EQUATION, EQUATION_FUNCTION, EQUATION_FUNCTION_ARGUMENT_SEPARATOR, EQUATION_SYMBOL, FOOTER_SECTION, FOOTNOTE, FOOTNOTE_SECTION, HEADER_SECTION, HORIZONTAL_RULE, INLINE_DRAWING, INLINE_IMAGE, LIST_ITEM, PAGE_BREAK, PARAGRAPH, TABLE, TABLE_CELL, TABLE_OF_CONTENTS, TABLE_ROW, TEXT, UNSUPPORTED } - /** * An element representing a mathematical expression. An Equation may contain EquationFunction, EquationSymbol, and Text elements. For more information on * document structure, see the guide to @@ -387,7 +372,6 @@ declare namespace GoogleAppsScript { setLinkUrl(url: string): Equation; setTextAlignment(textAlignment: TextAlignment): Equation; } - /** * An element representing a function in a mathematical Equation. An EquationFunction may contain EquationFunction, EquationFunctionArgumentSeparator, EquationSymbol, and Text elements. For more * information on document structure, see the guide to extending Google Docs. @@ -420,7 +404,6 @@ declare namespace GoogleAppsScript { setLinkUrl(url: string): EquationFunction; setTextAlignment(textAlignment: TextAlignment): EquationFunction; } - /** * An element representing a function separator in a mathematical Equation. An EquationFunctionArgumentSeparator cannot contain any other element. For more information on * document structure, see the guide to @@ -438,7 +421,6 @@ declare namespace GoogleAppsScript { removeFromParent(): EquationFunctionArgumentSeparator; setAttributes(attributes: any): EquationFunctionArgumentSeparator; } - /** * An element representing a symbol in a mathematical Equation. An EquationSymbol * cannot contain any other element. For more information on document structure, see the guide to extending Google Docs. @@ -456,7 +438,6 @@ declare namespace GoogleAppsScript { removeFromParent(): EquationSymbol; setAttributes(attributes: any): EquationSymbol; } - /** * * Deprecated. The methods getFontFamily() and setFontFamily(String) now use string @@ -485,7 +466,6 @@ declare namespace GoogleAppsScript { * body.editAsText().setFontFamily(a, b, DocumentApp.FontFamily.COMIC_SANS_MS); */ enum FontFamily { AMARANTH, ARIAL, ARIAL_BLACK, ARIAL_NARROW, ARVO, CALIBRI, CAMBRIA, COMIC_SANS_MS, CONSOLAS, CORSIVA, COURIER_NEW, DANCING_SCRIPT, DROID_SANS, DROID_SERIF, GARAMOND, GEORGIA, GLORIA_HALLELUJAH, GREAT_VIBES, LOBSTER, MERRIWEATHER, PACIFICO, PHILOSOPHER, POIRET_ONE, QUATTROCENTO, ROBOTO, SHADOWS_INTO_LIGHT, SYNCOPATE, TAHOMA, TIMES_NEW_ROMAN, TREBUCHET_MS, UBUNTU, VERDANA } - /** * An element representing a footer section. A Document typically contains at most one FooterSection. The FooterSection may contain ListItem, Paragraph, and * Table elements. For more information on document structure, see the guide to extending Google Docs. @@ -536,20 +516,13 @@ declare namespace GoogleAppsScript { setAttributes(attributes: any): FooterSection; setText(text: string): FooterSection; setTextAlignment(textAlignment: TextAlignment): FooterSection; - /** @deprecated DO NOT USE */ - getFootnotes(): Footnote[]; - /** @deprecated DO NOT USE */ - getLinkUrl(): string; - /** @deprecated DO NOT USE */ - getNextSibling(): Element; - /** @deprecated DO NOT USE */ - getPreviousSibling(): Element; - /** @deprecated DO NOT USE */ - isAtDocumentEnd(): boolean; - /** @deprecated DO NOT USE */ - setLinkUrl(url: string): FooterSection; + /** @deprecated DO NOT USE */getFootnotes(): Footnote[]; + /** @deprecated DO NOT USE */getLinkUrl(): string; + /** @deprecated DO NOT USE */getNextSibling(): Element; + /** @deprecated DO NOT USE */getPreviousSibling(): Element; + /** @deprecated DO NOT USE */isAtDocumentEnd(): boolean; + /** @deprecated DO NOT USE */setLinkUrl(url: string): FooterSection; } - /** * An element representing a footnote. Each Footnote is contained within a ListItem * or Paragraph and has a corresponding FootnoteSection element for the footnote's @@ -569,7 +542,6 @@ declare namespace GoogleAppsScript { removeFromParent(): Footnote; setAttributes(attributes: any): Footnote; } - /** * An element representing a footnote section. A FootnoteSection contains the text that * corresponds to a Footnote. The FootnoteSection may contain ListItem or @@ -604,16 +576,11 @@ declare namespace GoogleAppsScript { setAttributes(attributes: any): FootnoteSection; setText(text: string): FootnoteSection; setTextAlignment(textAlignment: TextAlignment): FootnoteSection; - /** @deprecated DO NOT USE */ - getFootnotes(): Footnote[]; - /** @deprecated DO NOT USE */ - getLinkUrl(): string; - /** @deprecated DO NOT USE */ - isAtDocumentEnd(): boolean; - /** @deprecated DO NOT USE */ - setLinkUrl(url: string): FootnoteSection; + /** @deprecated DO NOT USE */getFootnotes(): Footnote[]; + /** @deprecated DO NOT USE */getLinkUrl(): string; + /** @deprecated DO NOT USE */isAtDocumentEnd(): boolean; + /** @deprecated DO NOT USE */setLinkUrl(url: string): FootnoteSection; } - /** * An enumeration of the supported glyph types. * @@ -630,7 +597,6 @@ declare namespace GoogleAppsScript { * .setGlyphType(DocumentApp.GlyphType.SQUARE_BULLET); */ enum GlyphType { BULLET, HOLLOW_BULLET, SQUARE_BULLET, NUMBER, LATIN_UPPER, LATIN_LOWER, ROMAN_UPPER, ROMAN_LOWER } - /** * An element representing a header section. A Document typically contains at most one HeaderSection. The HeaderSection may contain ListItem, Paragraph, and * Table elements. For more information on document structure, see the guide to extending Google Docs. @@ -681,20 +647,13 @@ declare namespace GoogleAppsScript { setAttributes(attributes: any): HeaderSection; setText(text: string): HeaderSection; setTextAlignment(textAlignment: TextAlignment): HeaderSection; - /** @deprecated DO NOT USE */ - getFootnotes(): Footnote[]; - /** @deprecated DO NOT USE */ - getLinkUrl(): string; - /** @deprecated DO NOT USE */ - getNextSibling(): Element; - /** @deprecated DO NOT USE */ - getPreviousSibling(): Element; - /** @deprecated DO NOT USE */ - isAtDocumentEnd(): boolean; - /** @deprecated DO NOT USE */ - setLinkUrl(url: string): HeaderSection; + /** @deprecated DO NOT USE */getFootnotes(): Footnote[]; + /** @deprecated DO NOT USE */getLinkUrl(): string; + /** @deprecated DO NOT USE */getNextSibling(): Element; + /** @deprecated DO NOT USE */getPreviousSibling(): Element; + /** @deprecated DO NOT USE */isAtDocumentEnd(): boolean; + /** @deprecated DO NOT USE */setLinkUrl(url: string): HeaderSection; } - /** * An enumeration of the supported horizontal alignment types. * @@ -718,7 +677,6 @@ declare namespace GoogleAppsScript { * par3.setAlignment(DocumentApp.HorizontalAlignment.RIGHT); */ enum HorizontalAlignment { LEFT, CENTER, RIGHT, JUSTIFY } - /** * An element representing an horizontal rule. A HorizontalRule can be contained within a * ListItem or Paragraph, but cannot itself contain any other element. For more @@ -735,7 +693,6 @@ declare namespace GoogleAppsScript { removeFromParent(): HorizontalRule; setAttributes(attributes: any): HorizontalRule; } - /** * An element representing an embedded drawing. An InlineDrawing can be contained within a * ListItem or Paragraph, unless the ListItem or Paragraph is within @@ -758,7 +715,6 @@ declare namespace GoogleAppsScript { setAltTitle(title: string): InlineDrawing; setAttributes(attributes: any): InlineDrawing; } - /** * An element representing an embedded image. An InlineImage can be contained within a * ListItem or Paragraph, unless the ListItem or Paragraph is within @@ -789,7 +745,6 @@ declare namespace GoogleAppsScript { setLinkUrl(url: string): InlineImage; setWidth(width: Integer): InlineImage; } - /** * An element representing a list item. A ListItem is a Paragraph that is associated * with a list ID. A ListItem may contain Equation, Footnote, HorizontalRule, InlineDrawing, InlineImage, PageBreak, and Text @@ -892,7 +847,6 @@ declare namespace GoogleAppsScript { setText(text: string): void; setTextAlignment(textAlignment: TextAlignment): ListItem; } - /** * A Range that has a name and ID to allow later retrieval. Names are not * necessarily unique; several different ranges in the same document may share the same name, much @@ -917,7 +871,6 @@ declare namespace GoogleAppsScript { getRange(): Range; remove(): void; } - /** * An element representing a page break. A PageBreak can be contained within a ListItem or Paragraph, unless the ListItem or Paragraph is within a * Table, HeaderSection, FooterSection, or FootnoteSection. A PageBreak cannot itself contain any other element. For more information on document structure, @@ -935,7 +888,6 @@ declare namespace GoogleAppsScript { removeFromParent(): PageBreak; setAttributes(attributes: any): PageBreak; } - /** * An element representing a paragraph. A Paragraph may contain Equation, Footnote, HorizontalRule, InlineDrawing, InlineImage, PageBreak, * and Text elements. For more information on document structure, see the guide to extending Google Docs. @@ -1021,7 +973,6 @@ declare namespace GoogleAppsScript { setText(text: string): void; setTextAlignment(textAlignment: TextAlignment): Paragraph; } - /** * An enumeration of the standard paragraph headings. * @@ -1042,7 +993,6 @@ declare namespace GoogleAppsScript { * par3.setHeading(DocumentApp.ParagraphHeading.NORMAL); */ enum ParagraphHeading { NORMAL, HEADING1, HEADING2, HEADING3, HEADING4, HEADING5, HEADING6, TITLE, SUBTITLE } - /** * A reference to a location in the document, relative to a specific element. The user's cursor is * represented as a Position, among other uses. Scripts can only access the cursor of the @@ -1072,7 +1022,6 @@ declare namespace GoogleAppsScript { insertInlineImage(image: Base.BlobSource): InlineImage; insertText(text: string): Text; } - /** * Fixed position image anchored to a Paragraph. Unlike an InlineImage, a PositionedImage is * not an Element. It does not have a @@ -1109,13 +1058,11 @@ declare namespace GoogleAppsScript { setTopOffset(offset: number): PositionedImage; setWidth(width: Integer): PositionedImage; } - /** * An enumeration that specifies how to lay out a PositionedImage in relation to surrounding * text. */ enum PositionedLayout { ABOVE_TEXT, BREAK_BOTH, BREAK_LEFT, BREAK_RIGHT, WRAP_TEXT } - /** * A range of elements in a document. The user's selection is represented as a Range, among * other uses. Scripts can only access the selection of the user who is running the script, and only @@ -1144,10 +1091,8 @@ declare namespace GoogleAppsScript { */ interface Range { getRangeElements(): RangeElement[]; - /** @deprecated DO NOT USE */ - getSelectedElements(): RangeElement[]; + /** @deprecated DO NOT USE */getSelectedElements(): RangeElement[]; } - /** * A builder used to construct Range objects from document elements. * @@ -1168,10 +1113,8 @@ declare namespace GoogleAppsScript { addRange(range: Range): RangeBuilder; build(): Range; getRangeElements(): RangeElement[]; - /** @deprecated DO NOT USE */ - getSelectedElements(): RangeElement[]; + /** @deprecated DO NOT USE */getSelectedElements(): RangeElement[]; } - /** * A wrapper around an Element with a possible start and end offset. These offsets allow a * range of characters within a Text @@ -1183,7 +1126,6 @@ declare namespace GoogleAppsScript { getStartOffset(): Integer; isPartial(): boolean; } - /** * An element representing a table. A Table may only contain TableRow elements. For * more information on document structure, see the guide to extending Google Docs. @@ -1243,7 +1185,6 @@ declare namespace GoogleAppsScript { setLinkUrl(url: string): Table; setTextAlignment(textAlignment: TextAlignment): Table; } - /** * An element representing a table cell. A TableCell is always contained within a TableRow and may contain ListItem, Paragraph, or Table elements. For * more information on document structure, see the guide to extending Google Docs. @@ -1315,7 +1256,6 @@ declare namespace GoogleAppsScript { setVerticalAlignment(alignment: VerticalAlignment): TableCell; setWidth(width: number): TableCell; } - /** * An element containing a table of contents. A TableOfContents may contain ListItem, Paragraph, and Table elements, although the contents of a TableOfContents are usually generated automatically by Google Docs. For more information on * document structure, see the guide to @@ -1347,7 +1287,6 @@ declare namespace GoogleAppsScript { setLinkUrl(url: string): TableOfContents; setTextAlignment(textAlignment: TextAlignment): TableOfContents; } - /** * An element representing a table row. A TableRow is always contained within a Table and may only contain TableCell elements. For more information on document * structure, see the guide to extending @@ -1393,7 +1332,6 @@ declare namespace GoogleAppsScript { setMinimumHeight(minHeight: Integer): TableRow; setTextAlignment(textAlignment: TextAlignment): TableRow; } - /** * An element representing a rich text region. All text in a Document is contained within Text elements. * A Text element can be contained within an Equation, EquationFunction, @@ -1479,7 +1417,6 @@ declare namespace GoogleAppsScript { setUnderline(underline: boolean): Text; setUnderline(startOffset: Integer, endOffsetInclusive: Integer, underline: boolean): Text; } - /** * An enumeration of the type of text alignments. * @@ -1488,7 +1425,6 @@ declare namespace GoogleAppsScript { * text.setTextAlignment(0, 0, DocumentApp.TextAlignment.SUPERSCRIPT); */ enum TextAlignment { NORMAL, SUPERSCRIPT, SUBSCRIPT } - /** * An element representing a region that is unknown or cannot be affected by a script, such as a * page number. @@ -1505,7 +1441,6 @@ declare namespace GoogleAppsScript { removeFromParent(): UnsupportedElement; setAttributes(attributes: any): UnsupportedElement; } - /** * An enumeration of the supported vertical alignment types. * diff --git a/types/google-apps-script/google-apps-script.drive.d.ts b/types/google-apps-script/google-apps-script.drive.d.ts index b0591231fa..7c5f444aac 100644 --- a/types/google-apps-script/google-apps-script.drive.d.ts +++ b/types/google-apps-script/google-apps-script.drive.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Apps Script 2019-10-24 +// Type definitions for Google Apps Script 2019-11-06 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -18,7 +18,6 @@ declare namespace GoogleAppsScript { * folder.setSharing(DriveApp.Access.ANYONE, DriveApp.Permission.EDIT); */ enum Access { ANYONE, ANYONE_WITH_LINK, DOMAIN, DOMAIN_WITH_LINK, PRIVATE } - /** * Allows scripts to create, find, and modify files and folders in Google Drive. * @@ -132,7 +131,6 @@ declare namespace GoogleAppsScript { */ searchFolders(params: string): FolderIterator; } - /** * A file in Google Drive. Files can be accessed or created from DriveApp. * @@ -200,7 +198,6 @@ declare namespace GoogleAppsScript { setStarred(starred: boolean): File; setTrashed(trashed: boolean): File; } - /** * An iterator that allows scripts to iterate over a potentially large collection of files. File * iterators can be acccessed from DriveApp or a Folder. @@ -227,7 +224,6 @@ declare namespace GoogleAppsScript { */ next(): File; } - /** * A folder in Google Drive. Folders can be accessed or created from DriveApp. * @@ -293,7 +289,6 @@ declare namespace GoogleAppsScript { setStarred(starred: boolean): Folder; setTrashed(trashed: boolean): Folder; } - /** * An object that allows scripts to iterate over a potentially large collection of folders. Folder * iterators can be acccessed from DriveApp, a File, or a Folder. @@ -310,7 +305,6 @@ declare namespace GoogleAppsScript { hasNext(): boolean; next(): Folder; } - /** * An enum representing the permissions granted to users who can access a file or folder, besides * any individual users who have been explicitly given access. These properties can be accessed from @@ -322,7 +316,6 @@ declare namespace GoogleAppsScript { * folder.setSharing(DriveApp.Access.ANYONE, DriveApp.Permission.EDIT); */ enum Permission { VIEW, EDIT, COMMENT, OWNER, ORGANIZER, NONE } - /** * A user associated with a file in Google Drive. Users can be accessed from File.getEditors(), Folder.getViewers(), and other methods. * diff --git a/types/google-apps-script/google-apps-script.forms.d.ts b/types/google-apps-script/google-apps-script.forms.d.ts index dff7ddad0a..19bff9dc5a 100644 --- a/types/google-apps-script/google-apps-script.forms.d.ts +++ b/types/google-apps-script/google-apps-script.forms.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Apps Script 2019-10-24 +// Type definitions for Google Apps Script 2019-11-06 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -20,7 +20,6 @@ declare namespace GoogleAppsScript { * .setAlignment(FormApp.Alignment.CENTER); */ enum Alignment { LEFT, CENTER, RIGHT } - /** * A question item, presented as a grid of columns and rows, that allows the respondent to select * multiple choices per row from a sequence of checkboxes. Items can be accessed or created from a @@ -52,7 +51,6 @@ declare namespace GoogleAppsScript { setTitle(title: string): CheckboxGridItem; setValidation(validation: CheckboxGridValidation): CheckboxGridItem; } - /** * A DataValidation for a CheckboxGridItem. * @@ -69,9 +67,7 @@ declare namespace GoogleAppsScript { */ // tslint:disable-next-line: no-empty-interface interface CheckboxGridValidation { - // TODO: no-empty-interface } - /** * A DataValidationBuilder for a CheckboxGridValidation. * @@ -89,7 +85,6 @@ declare namespace GoogleAppsScript { interface CheckboxGridValidationBuilder { requireLimitOneResponsePerColumn(): CheckboxGridValidationBuilder; } - /** * A question item that allows the respondent to select one or more checkboxes, as well as an * optional "other" field. Items can be accessed or created from a Form. When used in a @@ -134,7 +129,6 @@ declare namespace GoogleAppsScript { setValidation(validation: CheckboxValidation): CheckboxItem; showOtherOption(enabled: boolean): CheckboxItem; } - /** * A DataValidation for a CheckboxItem. * @@ -153,11 +147,10 @@ declare namespace GoogleAppsScript { * checkBoxItem.setValidation(checkBoxValidation); */ interface CheckboxValidation { - requireSelectAtLeast(number: Integer): CheckboxValidation; - requireSelectAtMost(number: Integer): CheckboxValidation; - requireSelectExactly(number: Integer): CheckboxValidation; - } - + requireSelectAtLeast(number: Integer): CheckboxValidation; + requireSelectAtMost(number: Integer): CheckboxValidation; + requireSelectExactly(number: Integer): CheckboxValidation; + } /** * A DataValidationBuilder for a CheckboxValidation. * @@ -180,7 +173,6 @@ declare namespace GoogleAppsScript { requireSelectAtMost(number: Integer): CheckboxValidationBuilder; requireSelectExactly(number: Integer): CheckboxValidationBuilder; } - /** * A single choice associated with a type of Item that supports choices, like CheckboxItem, ListItem, or MultipleChoiceItem. * @@ -210,7 +202,6 @@ declare namespace GoogleAppsScript { getValue(): string; isCorrectAnswer(): boolean; } - /** * A question item that allows the respondent to indicate a date. Items can be accessed or created * from a Form. When used in a quiz, these items are graded. @@ -239,7 +230,6 @@ declare namespace GoogleAppsScript { setRequired(enabled: boolean): DateItem; setTitle(title: string): DateItem; } - /** * A question item that allows the respondent to indicate a date and time. Items can be accessed or * created from a Form. When used in a quiz, these items are graded. @@ -268,7 +258,6 @@ declare namespace GoogleAppsScript { setRequired(enabled: boolean): DateTimeItem; setTitle(title: string): DateTimeItem; } - /** * An enum representing the supported types of form-response destinations. All forms, including * those that do not have a destination set explicitly, save a copy of responses in the form's @@ -282,7 +271,6 @@ declare namespace GoogleAppsScript { * form.setDestination(FormApp.DestinationType.SPREADSHEET, ss.getId()); */ enum DestinationType { SPREADSHEET } - /** * A question item that allows the respondent to indicate a length of time. Items can be accessed or * created from a Form. When used in a quiz, these items are graded. @@ -309,7 +297,6 @@ declare namespace GoogleAppsScript { setRequired(enabled: boolean): DurationItem; setTitle(title: string): DurationItem; } - /** * An enum representing the supported types of feedback. Feedback types can be accessed from FormApp.FeedbackType. * @@ -326,7 +313,6 @@ declare namespace GoogleAppsScript { * FormApp.createFeedback().setDisplayText("Dogs rule, cats drool.").build()); */ enum FeedbackType { CORRECT, INCORRECT, GENERAL } - /** * A form that contains overall properties and items. Properties include title, settings, and where * responses are stored. Items include question items like checkboxes or radio items, while layout @@ -421,7 +407,6 @@ declare namespace GoogleAppsScript { shortenFormUrl(url: string): string; submitGrades(responses: FormResponse[]): Form; } - /** * Allows a script to open an existing Form or create a new one. * @@ -449,7 +434,6 @@ declare namespace GoogleAppsScript { openById(id: string): Form; openByUrl(url: string): Form; } - /** * A response to the form as a whole. A FormResponse can be used in three ways: to access * the answers submitted by a respondent (see getItemResponses()), to programmatically @@ -485,7 +469,6 @@ declare namespace GoogleAppsScript { withItemGrade(gradedResponse: ItemResponse): FormResponse; withItemResponse(response: ItemResponse): FormResponse; } - /** * A question item, presented as a grid of columns and rows, that allows the respondent to select * one choice per row from a sequence of radio buttons. Items can be accessed or created from a @@ -517,7 +500,6 @@ declare namespace GoogleAppsScript { setTitle(title: string): GridItem; setValidation(validation: GridValidation): GridItem; } - /** * A DataValidation for a GridItem. * @@ -534,9 +516,7 @@ declare namespace GoogleAppsScript { */ // tslint:disable-next-line: no-empty-interface interface GridValidation { - // TODO: no-empty-interface } - /** * A DataValidationBuilder for a GridValidation. * @@ -554,7 +534,6 @@ declare namespace GoogleAppsScript { interface GridValidationBuilder { requireLimitOneResponsePerColumn(): GridValidationBuilder; } - /** * A layout item that displays an image. Items can be accessed or created from a Form. * @@ -582,7 +561,6 @@ declare namespace GoogleAppsScript { setTitle(title: string): ImageItem; setWidth(width: Integer): ImageItem; } - /** * A generic form item that contains properties common to all items, such as title and help text. * Items can be accessed or created from a Form. @@ -634,7 +612,6 @@ declare namespace GoogleAppsScript { setHelpText(text: string): Item; setTitle(title: string): Item; } - /** * A response to one question item within a form. Item responses can be accessed from FormResponse and created from any Item that asks the respondent to answer a question. * @@ -661,7 +638,6 @@ declare namespace GoogleAppsScript { setFeedback(feedback: any): ItemResponse; setScore(score: any): ItemResponse; } - /** * An enum representing the supported types of form items. Item types can be accessed from FormApp.ItemType. * @@ -676,7 +652,6 @@ declare namespace GoogleAppsScript { * } */ enum ItemType { CHECKBOX, CHECKBOX_GRID, DATE, DATETIME, DURATION, GRID, IMAGE, LIST, MULTIPLE_CHOICE, PAGE_BREAK, PARAGRAPH_TEXT, SCALE, SECTION_HEADER, TEXT, TIME, VIDEO } - /** * A question item that allows the respondent to select one choice from a drop-down list. Items can * be accessed or created from a Form. @@ -716,7 +691,6 @@ declare namespace GoogleAppsScript { setRequired(enabled: boolean): ListItem; setTitle(title: string): ListItem; } - /** * A question item that allows the respondent to select one choice from a list of radio buttons or * an optional "other" field. Items can be accessed or created from a Form. When used in a @@ -760,7 +734,6 @@ declare namespace GoogleAppsScript { setTitle(title: string): MultipleChoiceItem; showOtherOption(enabled: boolean): MultipleChoiceItem; } - /** * A layout item that marks the start of a page. Items can be accessed or created from a Form. * @@ -787,7 +760,6 @@ declare namespace GoogleAppsScript { setHelpText(text: string): PageBreakItem; setTitle(title: string): PageBreakItem; } - /** * An enum representing the supported types of page navigation. Page navigation types can be * accessed from FormApp.PageNavigationType. @@ -816,7 +788,6 @@ declare namespace GoogleAppsScript { * item.setChoices([rightChoice, wrongChoice, iffyChoice, otherChoice]); */ enum PageNavigationType { CONTINUE, GO_TO_PAGE, RESTART, SUBMIT } - /** * A question item that allows the respondent to enter a block of text. Items can be accessed or * created from a Form. When used in a quiz, these items are graded. @@ -845,7 +816,6 @@ declare namespace GoogleAppsScript { setTitle(title: string): ParagraphTextItem; setValidation(validation: ParagraphTextValidation): ParagraphTextItem; } - /** * A DataValidation for a ParagraphTextItem. * @@ -858,9 +828,7 @@ declare namespace GoogleAppsScript { */ // tslint:disable-next-line: no-empty-interface interface ParagraphTextValidation { - // TODO: no-empty-interface } - /** * A DataValidationBuilder for a ParagraphTextValidation. * @@ -879,7 +847,6 @@ declare namespace GoogleAppsScript { requireTextLengthLessThanOrEqualTo(number: Integer): ParagraphTextValidationBuilder; requireTextMatchesPattern(pattern: string): ParagraphTextValidationBuilder; } - /** * The bean implementation of a Feedback, which contains properties common to all feedback, such as * display text or links. @@ -899,7 +866,6 @@ declare namespace GoogleAppsScript { getLinkUrls(): string[]; getText(): string; } - /** * The base FeedbackBuilder that contains setters for properties common to all feedback, such as * display text. Used to build Feedback objects. @@ -921,7 +887,6 @@ declare namespace GoogleAppsScript { copy(): QuizFeedbackBuilder; setText(text: string): QuizFeedbackBuilder; } - /** * A question item that allows the respondent to choose one option from a numbered sequence of radio * buttons. Items can be accessed or created from a Form. When used in a quiz, these items @@ -956,7 +921,6 @@ declare namespace GoogleAppsScript { setRequired(enabled: boolean): ScaleItem; setTitle(title: string): ScaleItem; } - /** * A layout item that visually indicates the start of a section. Items can be accessed or created * from a Form. @@ -976,7 +940,6 @@ declare namespace GoogleAppsScript { setHelpText(text: string): SectionHeaderItem; setTitle(title: string): SectionHeaderItem; } - /** * A question item that allows the respondent to enter a single line of text. Items can be accessed * or created from a Form. When used in a quiz, these items are graded. @@ -1005,7 +968,6 @@ declare namespace GoogleAppsScript { setTitle(title: string): TextItem; setValidation(validation: TextValidation): TextItem; } - /** * A DataValidation for a TextItem. * @@ -1021,7 +983,6 @@ declare namespace GoogleAppsScript { interface TextValidation { // TODO: no-empty-interface } - /** * A DataValidationBuilder for a TextValidation. * @@ -1052,7 +1013,6 @@ declare namespace GoogleAppsScript { requireTextMatchesPattern(pattern: string): TextValidationBuilder; requireWholeNumber(): TextValidationBuilder; } - /** * A question item that allows the respondent to indicate a time of day. Items can be accessed or * created from a Form. When used in a quiz, these items are graded. @@ -1079,7 +1039,6 @@ declare namespace GoogleAppsScript { setRequired(enabled: boolean): TimeItem; setTitle(title: string): TimeItem; } - /** * A layout item that displays a video. Items can be accessed or created from a Form. * diff --git a/types/google-apps-script/google-apps-script.gmail.d.ts b/types/google-apps-script/google-apps-script.gmail.d.ts index 94ecc78c16..fcf45b792d 100644 --- a/types/google-apps-script/google-apps-script.gmail.d.ts +++ b/types/google-apps-script/google-apps-script.gmail.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Apps Script 2019-10-24 +// Type definitions for Google Apps Script 2019-11-06 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -78,7 +78,6 @@ declare namespace GoogleAppsScript { unstarMessage(message: GmailMessage): GmailApp; unstarMessages(messages: GmailMessage[]): GmailApp; } - /** * An attachment from Gmail. This is a regular Blob except that it has an extra getSize() method that is faster than calling * getBytes().length and does not count against the Gmail read quota. @@ -113,10 +112,8 @@ declare namespace GoogleAppsScript { setDataFromString(string: string): Base.Blob; setDataFromString(string: string, charset: string): Base.Blob; setName(name: string): Base.Blob; - /** @deprecated DO NOT USE */ - getAllBlobs(): Base.Blob[]; + /** @deprecated DO NOT USE */getAllBlobs(): Base.Blob[]; } - /** * A user-created draft message in a user's Gmail account. */ @@ -222,7 +219,6 @@ declare namespace GoogleAppsScript { removeFromThread(thread: GmailThread): GmailLabel; removeFromThreads(threads: GmailThread[]): GmailLabel; } - /** * A message in a user's Gmail account. */ @@ -266,7 +262,6 @@ declare namespace GoogleAppsScript { star(): GmailMessage; unstar(): GmailMessage; } - /** * A thread in a user's Gmail account. */ diff --git a/types/google-apps-script/google-apps-script.groups.d.ts b/types/google-apps-script/google-apps-script.groups.d.ts index 2ae5faf904..dd190e2e8c 100644 --- a/types/google-apps-script/google-apps-script.groups.d.ts +++ b/types/google-apps-script/google-apps-script.groups.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Apps Script 2019-10-24 +// Type definitions for Google Apps Script 2019-11-06 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -37,7 +37,6 @@ declare namespace GoogleAppsScript { hasUser(email: string): boolean; hasUser(user: Base.User): boolean; } - /** * This class provides access to Google Groups information. It can be used to query information such * as a group's email address, or the list of groups in which the user is a direct member. @@ -52,7 +51,6 @@ declare namespace GoogleAppsScript { getGroupByEmail(email: string): Group; getGroups(): Group[]; } - /** * Possible roles of a user within a group, such as owner or ordinary member. Users subscribed to a * group have exactly one role within the context of that group. diff --git a/types/google-apps-script/google-apps-script.html.d.ts b/types/google-apps-script/google-apps-script.html.d.ts index 0c94c08e99..5a6d437c42 100644 --- a/types/google-apps-script/google-apps-script.html.d.ts +++ b/types/google-apps-script/google-apps-script.html.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Apps Script 2019-10-24 +// Type definitions for Google Apps Script 2019-11-06 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -43,7 +43,6 @@ declare namespace GoogleAppsScript { setWidth(width: Integer): HtmlOutput; setXFrameOptionsMode(mode: XFrameOptionsMode): HtmlOutput; } - /** * An object that represents a meta tag added to the page by calling HtmlOutput.addMetaTag(name, content). * @@ -57,7 +56,6 @@ declare namespace GoogleAppsScript { getContent(): string; getName(): string; } - /** * Service for returning HTML and other text content from a script. * @@ -77,7 +75,6 @@ declare namespace GoogleAppsScript { createTemplateFromFile(filename: string): HtmlTemplate; getUserAgent(): string; } - /** * A template object for dynamically constructing HTML. For more information, see the guide to templates. */ @@ -88,7 +85,6 @@ declare namespace GoogleAppsScript { getRawContent(): string; [propName: string]: any; } - /** * An enum representing the sandbox modes that can be used for client-side HtmlService * scripts. These values can be accessed from HtmlService.SandboxMode, and set by calling @@ -115,7 +111,6 @@ declare namespace GoogleAppsScript { * */ enum SandboxMode { EMULATED, IFRAME, NATIVE } - /** * An enum representing the X-Frame-Options modes that can be used for client-side HtmlService scripts. These values can be accessed from HtmlService.XFrameOptionsMode, * and set by calling HtmlOutput.setXFrameOptionsMode(mode). diff --git a/types/google-apps-script/google-apps-script.jdbc.d.ts b/types/google-apps-script/google-apps-script.jdbc.d.ts index ff8a179042..2d62bb0e6a 100644 --- a/types/google-apps-script/google-apps-script.jdbc.d.ts +++ b/types/google-apps-script/google-apps-script.jdbc.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Apps Script 2019-10-24 +// Type definitions for Google Apps Script 2019-11-06 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -58,7 +58,6 @@ declare namespace GoogleAppsScript { parseTime(time: string): JdbcTime; parseTimestamp(timestamp: string): JdbcTimestamp; } - /** * A JDBC Array. For documentation of this class, see java.sql.Array * . @@ -72,7 +71,6 @@ declare namespace GoogleAppsScript { getResultSet(): JdbcResultSet; getResultSet(index: Integer, count: Integer): JdbcResultSet; } - /** * A JDBC Blob. For documentation of this class, see java.sql.Blob * . @@ -91,7 +89,6 @@ declare namespace GoogleAppsScript { setBytes(position: Integer, bytes: Byte[], offset: Integer, length: Integer): Integer; truncate(length: Integer): void; } - /** * A JDBC CallableStatement. For documentation of this class, see * java.sql.CallableStatement. @@ -262,7 +259,6 @@ declare namespace GoogleAppsScript { setURL(parameterName: string, val: string): void; wasNull(): boolean; } - /** * A JDBC Clob. For documentation of this class, see java.sql.Clob * . @@ -281,7 +277,6 @@ declare namespace GoogleAppsScript { setString(position: Integer, value: string, offset: Integer, len: Integer): Integer; truncate(length: Integer): void; } - /** * A JDBC Connection. For documentation of this class, see * java.sql.Connection. @@ -329,7 +324,6 @@ declare namespace GoogleAppsScript { setSavepoint(name: string): JdbcSavepoint; setTransactionIsolation(level: Integer): void; } - /** * A JDBC database metadata object. For documentation of this class, see * java.sql.DatabaseMetaData. @@ -508,7 +502,6 @@ declare namespace GoogleAppsScript { usesLocalFilePerTable(): boolean; usesLocalFiles(): boolean; } - /** * A JDBC Date. For documentation of this class, see java.sql.Date * . @@ -525,7 +518,6 @@ declare namespace GoogleAppsScript { setTime(milliseconds: Integer): void; setYear(year: Integer): void; } - /** * A JDBC ParameterMetaData. For documentation of this class, see * java.sql.ParameterMetaData. @@ -541,7 +533,6 @@ declare namespace GoogleAppsScript { isNullable(param: Integer): Integer; isSigned(param: Integer): boolean; } - /** * A JDBC PreparedStatement. For documentation of this class, see * java.sql.PreparedStatement. @@ -625,7 +616,6 @@ declare namespace GoogleAppsScript { setTimestamp(parameterIndex: Integer, x: JdbcTimestamp, timeZone: string): void; setURL(parameterIndex: Integer, x: string): void; } - /** * A JDBC Ref. For documentation of this class, see java.sql.Ref. */ @@ -634,7 +624,6 @@ declare namespace GoogleAppsScript { getObject(): any; setObject(object: any): void; } - /** * A JDBC ResultSet. For documentation of this class, see java.sql.ResultSet * . @@ -780,7 +769,6 @@ declare namespace GoogleAppsScript { updateTimestamp(columnLabel: string, x: JdbcTimestamp): void; wasNull(): boolean; } - /** * A JDBC ResultSetMetaData. For documentation of this class, see * java.sql.ResultSetMetaData. @@ -808,7 +796,6 @@ declare namespace GoogleAppsScript { isSigned(column: Integer): boolean; isWritable(column: Integer): boolean; } - /** * A JDBC RowId. For documentation of this class, see java.sql.RowId * . @@ -816,7 +803,6 @@ declare namespace GoogleAppsScript { interface JdbcRowId { getBytes(): Byte[]; } - /** * A JDBC SQLXML. For documentation of this class, see java.sql.SQLXML * . @@ -826,7 +812,6 @@ declare namespace GoogleAppsScript { getString(): string; setString(value: string): void; } - /** * A JDBC Savepoint. For documentation of this class, see java.sql.Savepoint * . @@ -835,7 +820,6 @@ declare namespace GoogleAppsScript { getSavepointId(): Integer; getSavepointName(): string; } - /** * A JDBC Statement. For documentation of this class, see java.sql.Statement * . @@ -882,7 +866,6 @@ declare namespace GoogleAppsScript { setPoolable(poolable: boolean): void; setQueryTimeout(seconds: Integer): void; } - /** * A JDBC Struct. For documentation of this class, see java.sql.Struct * . @@ -891,7 +874,6 @@ declare namespace GoogleAppsScript { getAttributes(): any[]; getSQLTypeName(): string; } - /** * A JDBC Time. For documentation of this class, see java.sql.Time * . @@ -908,7 +890,6 @@ declare namespace GoogleAppsScript { setSeconds(seconds: Integer): void; setTime(milliseconds: Integer): void; } - /** * A JDBC Timestamp. For documentation of this class, see java.sql.Timestamp * . diff --git a/types/google-apps-script/google-apps-script.lock.d.ts b/types/google-apps-script/google-apps-script.lock.d.ts index 0414facc6d..6217218011 100644 --- a/types/google-apps-script/google-apps-script.lock.d.ts +++ b/types/google-apps-script/google-apps-script.lock.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Apps Script 2019-10-24 +// Type definitions for Google Apps Script 2019-11-06 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -43,7 +43,6 @@ declare namespace GoogleAppsScript { tryLock(timeoutInMillis: Integer): boolean; waitLock(timeoutInMillis: Integer): void; } - /** * Prevents concurrent access to sections of code. This can be useful when you have multiple users * or processes modifying a shared resource and want to prevent collisions. 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 f3f1de712d..6833797577 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 2019-10-24 +// Type definitions for Google Apps Script 2019-11-06 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -12,12 +12,10 @@ declare namespace GoogleAppsScript { * An enum representing the types of restrictions to avoid when finding directions. */ enum Avoid { TOLLS, HIGHWAYS } - /** * An enum representing the named colors available to use in map images. */ enum Color { BLACK, BROWN, GREEN, PURPLE, YELLOW, BLUE, GRAY, ORANGE, RED, WHITE } - /** * Allows for the retrieval of directions between locations. * The example below shows how you can use this class to get the directions from Times Square to @@ -91,7 +89,6 @@ declare namespace GoogleAppsScript { setOrigin(address: string): DirectionFinder; setRegion(region: string): DirectionFinder; } - /** * A collection of enums used by DirectionFinder. */ @@ -99,7 +96,6 @@ declare namespace GoogleAppsScript { Avoid: typeof Avoid; Mode: typeof Mode; } - /** * Allows for the sampling of elevations at particular locations. * The example below shows how you can use this class to determine the highest point along the route @@ -148,7 +144,6 @@ declare namespace GoogleAppsScript { samplePath(points: number[], numSamples: Integer): any; samplePath(encodedPolyline: string, numSamples: Integer): any; } - /** * An enum representing the format of the map image. * See also @@ -156,7 +151,6 @@ declare namespace GoogleAppsScript { * Google Static Maps API */ enum Format { PNG, PNG8, PNG32, GIF, JPG, JPG_BASELINE } - /** * Allows for the conversion between an address and geographical coordinates. * The example below shows how you can use this class find the top nine matches for the location @@ -195,7 +189,6 @@ declare namespace GoogleAppsScript { setLanguage(language: string): Geocoder; setRegion(region: string): Geocoder; } - /** * Allows for direction finding, geocoding, elevation sampling and the creation of static map * images. @@ -211,7 +204,6 @@ declare namespace GoogleAppsScript { newStaticMap(): StaticMap; setAuthentication(clientId: string, signingKey: string): void; } - /** * An enum representing the size of a marker added to a map. * See also @@ -219,12 +211,10 @@ declare namespace GoogleAppsScript { * Google Static Maps API */ enum MarkerSize { TINY, MID, SMALL } - /** * An enum representing the mode of travel to use when finding directions. */ enum Mode { DRIVING, WALKING, BICYCLING, TRANSIT } - /** * Allows for the creation and decoration of static map images. * @@ -290,7 +280,6 @@ declare namespace GoogleAppsScript { setSize(width: Integer, height: Integer): StaticMap; setZoom(zoom: Integer): StaticMap; } - /** * A collection of enums used by StaticMap. */ @@ -300,7 +289,6 @@ declare namespace GoogleAppsScript { MarkerSize: typeof MarkerSize; Type: typeof Type; } - /** * An enum representing the type of map to render. * See also diff --git a/types/google-apps-script/google-apps-script.optimization.d.ts b/types/google-apps-script/google-apps-script.optimization.d.ts index 6859bbdf90..459c20dc0d 100644 --- a/types/google-apps-script/google-apps-script.optimization.d.ts +++ b/types/google-apps-script/google-apps-script.optimization.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Apps Script 2019-10-24 +// Type definitions for Google Apps Script 2019-11-06 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -29,7 +29,6 @@ declare namespace GoogleAppsScript { interface LinearOptimizationConstraint { setCoefficient(variableName: string, coefficient: number): LinearOptimizationConstraint; } - /** * The engine used to model and solve a linear program. The example below solves the following * linear program: @@ -95,7 +94,6 @@ declare namespace GoogleAppsScript { solve(): LinearOptimizationSolution; solve(seconds: number): LinearOptimizationSolution; } - /** * The linear optimization service, used to model and solve linear and mixed-integer linear * programs. The example below solves the following linear program: @@ -153,7 +151,6 @@ declare namespace GoogleAppsScript { VariableType: typeof VariableType; createEngine(): LinearOptimizationEngine; } - /** * The solution of a linear program. The example below solves the following linear program: * @@ -212,14 +209,12 @@ declare namespace GoogleAppsScript { getVariableValue(variableName: string): number; isValid(): boolean; } - /** * Status of the solution. Before solving a problem the status will be NOT_SOLVED; * afterwards it will take any of the other values depending if it successfully found a solution and * if the solution is optimal. */ enum Status { OPTIMAL, FEASIBLE, INFEASIBLE, UNBOUNDED, ABNORMAL, MODEL_INVALID, NOT_SOLVED } - /** * Type of variables created by the engine. */ diff --git a/types/google-apps-script/google-apps-script.properties.d.ts b/types/google-apps-script/google-apps-script.properties.d.ts index e2008e2b64..4df583858d 100644 --- a/types/google-apps-script/google-apps-script.properties.d.ts +++ b/types/google-apps-script/google-apps-script.properties.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Apps Script 2019-10-24 +// Type definitions for Google Apps Script 2019-11-06 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -24,7 +24,6 @@ declare namespace GoogleAppsScript { setProperties(properties: { [key: string]: string }, deleteAllOthers: boolean): Properties; setProperty(key: string, value: string): Properties; } - /** * Allows scripts to store simple data in key-value pairs scoped to one script, one user of a * script, or one document in which an add-on is used. Properties cannot be shared between scripts. @@ -44,7 +43,6 @@ declare namespace GoogleAppsScript { getScriptProperties(): Properties; getUserProperties(): Properties; } - /** * * Deprecated. This class is deprecated and should not be used in new scripts. @@ -52,16 +50,15 @@ declare namespace GoogleAppsScript { * are scoped per script, regardless of which user runs the script. */ interface ScriptProperties { - deleteAllProperties(): ScriptProperties; - deleteProperty(key: string): ScriptProperties; - getKeys(): string[]; - getProperties(): { [key: string]: string }; - getProperty(key: string): string | null; - setProperties(properties: { [key: string]: string }): ScriptProperties; - setProperties(properties: { [key: string]: string }, deleteAllOthers: boolean): ScriptProperties; - setProperty(key: string, value: string): ScriptProperties; + /** @deprecated DO NOT USE */deleteAllProperties(): ScriptProperties; + /** @deprecated DO NOT USE */deleteProperty(key: string): ScriptProperties; + /** @deprecated DO NOT USE */getKeys(): string[]; + /** @deprecated DO NOT USE */getProperties(): { [key: string]: string }; + /** @deprecated DO NOT USE */getProperty(key: string): string | null ; + /** @deprecated DO NOT USE */setProperties(properties: { [key: string]: string }): ScriptProperties; + /** @deprecated DO NOT USE */setProperties(properties: { [key: string]: string }, deleteAllOthers: boolean): ScriptProperties; + /** @deprecated DO NOT USE */setProperty(key: string, value: string): ScriptProperties; } - /** * * Deprecated. This class is deprecated and should not be used in new scripts. @@ -69,14 +66,14 @@ declare namespace GoogleAppsScript { * script running under the identity of a user can access User Properties for that user only. */ interface UserProperties { - deleteAllProperties(): UserProperties; - deleteProperty(key: string): UserProperties; - getKeys(): string[]; - getProperties(): { [key: string]: string }; - getProperty(key: string): string | null; - setProperties(properties: { [key: string]: string }): UserProperties; - setProperties(properties: { [key: string]: string }, deleteAllOthers: boolean): UserProperties; - setProperty(key: string, value: string): UserProperties; + /** @deprecated DO NOT USE */deleteAllProperties(): UserProperties; + /** @deprecated DO NOT USE */deleteProperty(key: string): UserProperties; + /** @deprecated DO NOT USE */getKeys(): string[]; + /** @deprecated DO NOT USE */getProperties(): { [key: string]: string }; + /** @deprecated DO NOT USE */getProperty(key: string): string | null; + /** @deprecated DO NOT USE */setProperties(properties: { [key: string]: string }): UserProperties; + /** @deprecated DO NOT USE */setProperties(properties: { [key: string]: string }, deleteAllOthers: boolean): UserProperties; + /** @deprecated DO NOT USE */setProperty(key: string, value: string): UserProperties; } } } diff --git a/types/google-apps-script/google-apps-script.script.d.ts b/types/google-apps-script/google-apps-script.script.d.ts index 3ca2fc89ae..4244ed488f 100644 --- a/types/google-apps-script/google-apps-script.script.d.ts +++ b/types/google-apps-script/google-apps-script.script.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Apps Script 2019-10-24 +// Type definitions for Google Apps Script 2019-11-06 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -39,7 +39,6 @@ declare namespace GoogleAppsScript { * } */ enum AuthMode { NONE, CUSTOM_FUNCTION, LIMITED, FULL } - /** * An object used to determine whether the user needs to authorize this script to use one or more * services, and to provide the URL for an authorization dialog. If the script is published as an add-on that uses installable triggers, this information can be used @@ -55,12 +54,10 @@ declare namespace GoogleAppsScript { getAuthorizationStatus(): AuthorizationStatus; getAuthorizationUrl(): string; } - /** * An enumeration denoting the authorization status of a script. */ enum AuthorizationStatus { REQUIRED, NOT_REQUIRED } - /** * Builder for calendar triggers. */ @@ -68,7 +65,6 @@ declare namespace GoogleAppsScript { create(): Trigger; onEventUpdated(): CalendarTriggerBuilder; } - /** * A builder for clock triggers. */ @@ -87,7 +83,6 @@ declare namespace GoogleAppsScript { onMonthDay(day: Integer): ClockTriggerBuilder; onWeekDay(day: Base.Weekday): ClockTriggerBuilder; } - /** * A builder for document triggers. */ @@ -95,12 +90,10 @@ declare namespace GoogleAppsScript { create(): Trigger; onOpen(): DocumentTriggerBuilder; } - /** * An enumeration denoting the type of triggered event. */ enum EventType { CLOCK, ON_OPEN, ON_EDIT, ON_FORM_SUBMIT, ON_CHANGE, ON_EVENT_UPDATED } - /** * A builder for form triggers. */ @@ -109,13 +102,11 @@ declare namespace GoogleAppsScript { onFormSubmit(): FormTriggerBuilder; onOpen(): FormTriggerBuilder; } - /** * An enumeration that indicates how the script came to be installed as an add-on for the current * user. */ enum InstallationSource { APPS_MARKETPLACE_DOMAIN_ADD_ON, NONE, WEB_STORE_ADD_ON } - /** * Access and manipulate script publishing and triggers. This class allows users to create script * triggers and control publishing the script as a service. @@ -129,6 +120,7 @@ declare namespace GoogleAppsScript { WeekDay: typeof Base.Weekday; deleteTrigger(trigger: Trigger): void; getAuthorizationInfo(authMode: AuthMode): AuthorizationInfo; + getIdentityToken(): string; getInstallationSource(): InstallationSource; getOAuthToken(): string; getProjectTriggers(): Trigger[]; @@ -140,22 +132,17 @@ declare namespace GoogleAppsScript { invalidateAuth(): void; newStateToken(): StateTokenBuilder; newTrigger(functionName: string): TriggerBuilder; - /** @deprecated DO NOT USE */ - getProjectKey(): string; - /** @deprecated DO NOT USE */ - getScriptTriggers(): Trigger[]; + /** @deprecated DO NOT USE */getProjectKey(): string; + /** @deprecated DO NOT USE */getScriptTriggers(): Trigger[]; } - /** * Access and manipulate script publishing. */ interface Service { getUrl(): string; isEnabled(): boolean; - /** @deprecated DO NOT USE */ - disable(): void; + /** @deprecated DO NOT USE */disable(): void; } - /** * Builder for spreadsheet triggers. */ @@ -166,7 +153,6 @@ declare namespace GoogleAppsScript { onFormSubmit(): SpreadsheetTriggerBuilder; onOpen(): SpreadsheetTriggerBuilder; } - /** * Allows scripts to create state tokens that can be used in callback APIs (like OAuth flows). * @@ -190,7 +176,6 @@ declare namespace GoogleAppsScript { withMethod(method: string): StateTokenBuilder; withTimeout(seconds: Integer): StateTokenBuilder; } - /** * A script trigger. */ @@ -201,7 +186,6 @@ declare namespace GoogleAppsScript { getTriggerSourceId(): string; getUniqueId(): string; } - /** * A generic builder for script triggers. */ @@ -215,7 +199,6 @@ declare namespace GoogleAppsScript { forUserCalendar(emailId: string): CalendarTriggerBuilder; timeBased(): ClockTriggerBuilder; } - /** * An enumeration denoting the source of the event that causes the trigger to fire. */ diff --git a/types/google-apps-script/google-apps-script.sites.d.ts b/types/google-apps-script/google-apps-script.sites.d.ts index 02b656df9b..f05c1e7efc 100644 --- a/types/google-apps-script/google-apps-script.sites.d.ts +++ b/types/google-apps-script/google-apps-script.sites.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Apps Script 2019-10-24 +// Type definitions for Google Apps Script 2019-11-06 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -43,7 +43,6 @@ declare namespace GoogleAppsScript { setTitle(title: string): Attachment; setUrl(url: string): Attachment; } - /** * A typesafe enum for sites attachment type. * A rebuilt @@ -52,7 +51,6 @@ declare namespace GoogleAppsScript { * classic Sites. */ enum AttachmentType { WEB, HOSTED } - /** * A Sites Column - a column from a Sites List page. * A rebuilt @@ -66,7 +64,6 @@ declare namespace GoogleAppsScript { getParent(): Page; setName(name: string): Column; } - /** * A Comment attached to any Sites page. * A rebuilt @@ -85,7 +82,6 @@ declare namespace GoogleAppsScript { setContent(content: string): Comment; setParent(parent: Page): Comment; } - /** * A Sites ListItem - a list element from a Sites List page. * A rebuilt @@ -174,18 +170,12 @@ declare namespace GoogleAppsScript { setName(name: string): Page; setParent(parent: Page): Page; setTitle(title: string): Page; - /** @deprecated DO NOT USE */ - addComment(content: string): Comment; - /** @deprecated DO NOT USE */ - getComments(): Comment[]; - /** @deprecated DO NOT USE */ - getComments(optOptions: { start?: Integer; max?: Integer}): Comment[]; - /** @deprecated DO NOT USE */ - getPageName(): string; - /** @deprecated DO NOT USE */ - getSelfLink(): string; + /** @deprecated DO NOT USE */addComment(content: string): Comment; + /** @deprecated DO NOT USE */getComments(): Comment[]; + /** @deprecated DO NOT USE */getComments(optOptions: { start?: Integer; max?: Integer}): Comment[]; + /** @deprecated DO NOT USE */getPageName(): string; + /** @deprecated DO NOT USE */getSelfLink(): string; } - /** * A typesafe enum for sites page type. * A rebuilt @@ -194,7 +184,6 @@ declare namespace GoogleAppsScript { * classic Sites. */ enum PageType { WEB_PAGE, LIST_PAGE, ANNOUNCEMENT, ANNOUNCEMENTS_PAGE, FILE_CABINET_PAGE } - /** * An object representing a Google Site. * A rebuilt @@ -241,50 +230,28 @@ declare namespace GoogleAppsScript { setSummary(summary: string): Site; setTheme(theme: string): Site; setTitle(title: string): Site; - /** @deprecated DO NOT USE */ - addCollaborator(email: string): Site; - /** @deprecated DO NOT USE */ - addCollaborator(user: Base.User): Site; - /** @deprecated DO NOT USE */ - createAnnouncement(title: string, html: string, parent: Page): Page; - /** @deprecated DO NOT USE */ - createComment(inReplyTo: string, html: string, parent: Page): Comment; - /** @deprecated DO NOT USE */ - createListItem(html: string, columnNames: string[], values: string[], parent: Page): ListItem; - /** @deprecated DO NOT USE */ - createWebAttachment(title: string, url: string, parent: Page): Attachment; - /** @deprecated DO NOT USE */ - deleteSite(): void; - /** @deprecated DO NOT USE */ - getAnnouncements(): Page[]; - /** @deprecated DO NOT USE */ - getAnnouncementsPages(): Page[]; - /** @deprecated DO NOT USE */ - getAttachments(): Attachment[]; - /** @deprecated DO NOT USE */ - getCollaborators(): Base.User[]; - /** @deprecated DO NOT USE */ - getComments(): Comment[]; - /** @deprecated DO NOT USE */ - getFileCabinetPages(): Page[]; - /** @deprecated DO NOT USE */ - getListItems(): ListItem[]; - /** @deprecated DO NOT USE */ - getListPages(): Page[]; - /** @deprecated DO NOT USE */ - getSelfLink(): string; - /** @deprecated DO NOT USE */ - getSiteName(): string; - /** @deprecated DO NOT USE */ - getWebAttachments(): Attachment[]; - /** @deprecated DO NOT USE */ - getWebPages(): Page[]; - /** @deprecated DO NOT USE */ - removeCollaborator(email: string): Site; - /** @deprecated DO NOT USE */ - removeCollaborator(user: Base.User): Site; + /** @deprecated DO NOT USE */addCollaborator(email: string): Site; + /** @deprecated DO NOT USE */addCollaborator(user: Base.User): Site; + /** @deprecated DO NOT USE */createAnnouncement(title: string, html: string, parent: Page): Page; + /** @deprecated DO NOT USE */createComment(inReplyTo: string, html: string, parent: Page): Comment; + /** @deprecated DO NOT USE */createListItem(html: string, columnNames: string[], values: string[], parent: Page): ListItem; + /** @deprecated DO NOT USE */createWebAttachment(title: string, url: string, parent: Page): Attachment; + /** @deprecated DO NOT USE */deleteSite(): void; + /** @deprecated DO NOT USE */getAnnouncements(): Page[]; + /** @deprecated DO NOT USE */getAnnouncementsPages(): Page[]; + /** @deprecated DO NOT USE */getAttachments(): Attachment[]; + /** @deprecated DO NOT USE */getCollaborators(): Base.User[]; + /** @deprecated DO NOT USE */getComments(): Comment[]; + /** @deprecated DO NOT USE */getFileCabinetPages(): Page[]; + /** @deprecated DO NOT USE */getListItems(): ListItem[]; + /** @deprecated DO NOT USE */getListPages(): Page[]; + /** @deprecated DO NOT USE */getSelfLink(): string; + /** @deprecated DO NOT USE */getSiteName(): string; + /** @deprecated DO NOT USE */getWebAttachments(): Attachment[]; + /** @deprecated DO NOT USE */getWebPages(): Page[]; + /** @deprecated DO NOT USE */removeCollaborator(email: string): Site; + /** @deprecated DO NOT USE */removeCollaborator(user: Base.User): Site; } - /** * Create and access Google Sites. * A rebuilt 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 eadc5e2021..06ff5f7930 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-10-24 +// Type definitions for Google Apps Script 2019-11-06 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -31,7 +31,6 @@ declare namespace GoogleAppsScript { getTranslateY(): number; toBuilder(): AffineTransformBuilder; } - /** * A builder for AffineTransform objects. Defaults to the identity transform. * @@ -54,12 +53,10 @@ declare namespace GoogleAppsScript { setTranslateX(translateX: number): AffineTransformBuilder; setTranslateY(translateY: number): AffineTransformBuilder; } - /** * The alignment position to apply. */ enum AlignmentPosition { CENTER, HORIZONTAL_CENTER, VERTICAL_CENTER } - /** * The kinds of start and end forms with which linear geometry can be rendered. * @@ -68,7 +65,6 @@ declare namespace GoogleAppsScript { * edition. */ enum ArrowStyle { UNSUPPORTED, NONE, STEALTH_ARROW, FILL_ARROW, FILL_CIRCLE, FILL_SQUARE, FILL_DIAMOND, OPEN_ARROW, OPEN_CIRCLE, OPEN_SQUARE, OPEN_DIAMOND } - /** * An element of text that is dynamically replaced with content that can change over time, such as a * slide number. @@ -78,12 +74,10 @@ declare namespace GoogleAppsScript { getIndex(): Integer; getRange(): TextRange; } - /** * The types of auto text. */ enum AutoTextType { UNSUPPORTED, SLIDE_NUMBER } - /** * Describes the border around an element. */ @@ -96,12 +90,10 @@ declare namespace GoogleAppsScript { setTransparent(): Border; setWeight(points: number): Border; } - /** * The table cell merge states. */ enum CellMergeState { NORMAL, HEAD, MERGED } - /** * An opaque color */ @@ -110,7 +102,6 @@ declare namespace GoogleAppsScript { asThemeColor(): ThemeColor; getColorType(): Base.ColorType; } - /** * A color scheme defines a mapping from members of ThemeColorType to the actual colors used * to render them. @@ -122,7 +113,6 @@ declare namespace GoogleAppsScript { setConcreteColor(type: ThemeColorType, red: Integer, green: Integer, blue: Integer): ColorScheme; setConcreteColor(type: ThemeColorType, hexColor: string): ColorScheme; } - /** * The connection site on a PageElement that can connect to a connector. */ @@ -130,7 +120,6 @@ declare namespace GoogleAppsScript { getIndex(): Integer; getPageElement(): PageElement; } - /** * The content alignments for a Shape or TableCell. The supported alignments * correspond to predefined text anchoring types from the ECMA-376 standard. @@ -141,7 +130,6 @@ declare namespace GoogleAppsScript { * edition. */ enum ContentAlignment { UNSUPPORTED, TOP, MIDDLE, BOTTOM } - /** * The kinds of dashes with which linear geometry can be rendered. These values are based on the * "ST_PresetLineDashVal" simple type described in section 20.1.10.48 of "Office Open XML File @@ -149,7 +137,6 @@ declare namespace GoogleAppsScript { * edition. */ enum DashStyle { UNSUPPORTED, SOLID, DOT, DASH, DASH_DOT, LONG_DASH, LONG_DASH_DOT } - /** * Describes the page element's background */ @@ -167,12 +154,10 @@ declare namespace GoogleAppsScript { setSolidFill(color: ThemeColorType, alpha: number): void; setTransparent(): void; } - /** * The kinds of fill. */ enum FillType { UNSUPPORTED, NONE, SOLID } - /** * A collection of PageElements joined as a single unit. */ @@ -215,7 +200,6 @@ declare namespace GoogleAppsScript { setWidth(width: number): Group; ungroup(): void; } - /** * A PageElement representing an image. */ @@ -271,7 +255,6 @@ declare namespace GoogleAppsScript { setTransform(transform: AffineTransform): Image; setWidth(width: number): Image; } - /** * A layout in a presentation. * @@ -331,7 +314,6 @@ declare namespace GoogleAppsScript { replaceAllText(findText: string, replaceText: string, matchCase: boolean): Integer; selectAsCurrentPage(): void; } - /** * A PageElement representing a line. */ @@ -402,7 +384,6 @@ declare namespace GoogleAppsScript { setWeight(points: number): Line; setWidth(width: number): Line; } - /** * The line category. * @@ -410,7 +391,6 @@ declare namespace GoogleAppsScript { * connect to other page elements. */ enum LineCategory { UNSUPPORTED, STRAIGHT, BENT, CURVED } - /** * Describes the fill of a line or outline */ @@ -426,12 +406,10 @@ declare namespace GoogleAppsScript { setSolidFill(color: ThemeColorType): void; setSolidFill(color: ThemeColorType, alpha: number): void; } - /** * The kinds of line fill. */ enum LineFillType { UNSUPPORTED, NONE, SOLID } - /** * The line types. * @@ -440,7 +418,6 @@ declare namespace GoogleAppsScript { * edition. */ enum LineType { UNSUPPORTED, STRAIGHT_CONNECTOR_1, BENT_CONNECTOR_2, BENT_CONNECTOR_3, BENT_CONNECTOR_4, BENT_CONNECTOR_5, CURVED_CONNECTOR_2, CURVED_CONNECTOR_3, CURVED_CONNECTOR_4, CURVED_CONNECTOR_5, STRAIGHT_LINE } - /** * A hypertext link. */ @@ -452,12 +429,10 @@ declare namespace GoogleAppsScript { getSlidePosition(): SlidePosition; getUrl(): string; } - /** * The types of a Link. */ enum LinkType { UNSUPPORTED, URL, SLIDE_POSITION, SLIDE_ID, SLIDE_INDEX } - /** * A list in the text. */ @@ -465,7 +440,6 @@ declare namespace GoogleAppsScript { getListId(): string; getListParagraphs(): Paragraph[]; } - /** * Preset patterns of glyphs for lists in text. * @@ -508,7 +482,6 @@ declare namespace GoogleAppsScript { * point */ enum ListPreset { DISC_CIRCLE_SQUARE, DIAMONDX_ARROW3D_SQUARE, CHECKBOX, ARROW_DIAMOND_DISC, STAR_CIRCLE_SQUARE, ARROW3D_CIRCLE_SQUARE, LEFTTRIANGLE_DIAMOND_DISC, DIAMONDX_HOLLOWDIAMOND_SQUARE, DIAMOND_CIRCLE_SQUARE, DIGIT_ALPHA_ROMAN, DIGIT_ALPHA_ROMAN_PARENS, DIGIT_NESTED, UPPERALPHA_ALPHA_ROMAN, UPPERROMAN_UPPERALPHA_DIGIT, ZERODIGIT_ALPHA_ROMAN } - /** * The list styling for a range of text. */ @@ -520,7 +493,6 @@ declare namespace GoogleAppsScript { isInList(): boolean; removeFromList(): ListStyle; } - /** * A master in a presentation. * @@ -587,7 +559,6 @@ declare namespace GoogleAppsScript { replaceAllText(findText: string, replaceText: string, matchCase: boolean): Integer; selectAsCurrentPage(): void; } - /** * A notes master in a presentation. * @@ -610,7 +581,6 @@ declare namespace GoogleAppsScript { getVideos(): Video[]; getWordArts(): WordArt[]; } - /** * A notes page in a presentation. * @@ -637,7 +607,6 @@ declare namespace GoogleAppsScript { replaceAllText(findText: string, replaceText: string): Integer; replaceAllText(findText: string, replaceText: string, matchCase: boolean): Integer; } - /** * A page in a presentation. */ @@ -695,7 +664,6 @@ declare namespace GoogleAppsScript { replaceAllText(findText: string, replaceText: string, matchCase: boolean): Integer; selectAsCurrentPage(): void; } - /** * Describes the page's background */ @@ -716,12 +684,10 @@ declare namespace GoogleAppsScript { setSolidFill(color: ThemeColorType, alpha: number): void; setTransparent(): void; } - /** * The kinds of page backgrounds. */ enum PageBackgroundType { UNSUPPORTED, NONE, SOLID, PICTURE } - /** * A visual element rendered on a page. */ @@ -770,31 +736,26 @@ declare namespace GoogleAppsScript { setTransform(transform: AffineTransform): PageElement; setWidth(width: number): PageElement; } - /** * A collection of one or more PageElement instances. */ interface PageElementRange { getPageElements(): PageElement[]; } - /** * The page element type. */ enum PageElementType { UNSUPPORTED, SHAPE, IMAGE, VIDEO, TABLE, GROUP, LINE, WORD_ART, SHEETS_CHART } - /** * A collection of one or more Page instances. */ interface PageRange { getPages(): Page[]; } - /** * The page types. */ enum PageType { UNSUPPORTED, SLIDE, LAYOUT, MASTER } - /** * A segment of text terminated by a newline character. */ @@ -802,12 +763,10 @@ declare namespace GoogleAppsScript { getIndex(): Integer; getRange(): TextRange; } - /** * The types of text alignment for a paragraph. */ enum ParagraphAlignment { UNSUPPORTED, START, CENTER, END, JUSTIFIED } - /** * The styles of text that apply to entire paragraphs. * @@ -835,7 +794,6 @@ declare namespace GoogleAppsScript { setSpacingMode(mode: SpacingMode): ParagraphStyle; setTextDirection(direction: TextDirection): ParagraphStyle; } - /** * A fill that renders an image that's stretched to the dimensions of its container. */ @@ -845,7 +803,6 @@ declare namespace GoogleAppsScript { getContentUrl(): string; getSourceUrl(): string; } - /** * The placeholder types. Many of these placeholder types correspond to placeholder IDs from the * ECMA-376 standard. More information on those shapes can be found in the description of the @@ -854,7 +811,6 @@ declare namespace GoogleAppsScript { * edition. */ enum PlaceholderType { UNSUPPORTED, NONE, BODY, CHART, CLIP_ART, CENTERED_TITLE, DIAGRAM, DATE_AND_TIME, FOOTER, HEADER, MEDIA, OBJECT, PICTURE, SLIDE_NUMBER, SUBTITLE, TABLE, TITLE, SLIDE_IMAGE } - /** * A point representing a location. */ @@ -862,14 +818,12 @@ declare namespace GoogleAppsScript { getX(): number; getY(): number; } - /** * Predefined layouts. These are commonly found layouts in presentations. However, there is no * guarantee that these layouts are present in the current master as they could have been deleted or * not part of the used theme. Additionally, the placeholders on each layout may have been changed. */ enum PredefinedLayout { UNSUPPORTED, BLANK, CAPTION_ONLY, TITLE, TITLE_AND_BODY, TITLE_AND_TWO_COLUMNS, TITLE_ONLY, SECTION_HEADER, SECTION_TITLE_AND_DESCRIPTION, ONE_COLUMN_TEXT, MAIN_POINT, BIG_NUMBER } - /** * A presentation. */ @@ -915,7 +869,6 @@ declare namespace GoogleAppsScript { saveAndClose(): void; setName(name: string): void; } - /** * The user's selection in the active presentation. * @@ -932,7 +885,6 @@ declare namespace GoogleAppsScript { getTableCellRange(): TableCellRange; getTextRange(): TextRange; } - /** * Type of Selection. * @@ -943,7 +895,6 @@ declare namespace GoogleAppsScript { * Selection.getCurrentPage. */ enum SelectionType { UNSUPPORTED, NONE, TEXT, TABLE_CELL, PAGE, PAGE_ELEMENT, CURRENT_PAGE } - /** * A PageElement representing a generic shape that does not have a more specific * classification. Includes text boxes, rectangles, and other predefined shapes. @@ -1006,7 +957,6 @@ declare namespace GoogleAppsScript { setTransform(transform: AffineTransform): Shape; setWidth(width: number): Shape; } - /** * The shape types. Many of these shapes correspond to predefined shapes from the ECMA-376 standard. * More information on those shapes can be found in the description of the "ST_ShapeType" simple @@ -1015,7 +965,6 @@ declare namespace GoogleAppsScript { * edition. */ enum ShapeType { UNSUPPORTED, TEXT_BOX, RECTANGLE, ROUND_RECTANGLE, ELLIPSE, ARC, BENT_ARROW, BENT_UP_ARROW, BEVEL, BLOCK_ARC, BRACE_PAIR, BRACKET_PAIR, CAN, CHEVRON, CHORD, CLOUD, CORNER, CUBE, CURVED_DOWN_ARROW, CURVED_LEFT_ARROW, CURVED_RIGHT_ARROW, CURVED_UP_ARROW, DECAGON, DIAGONAL_STRIPE, DIAMOND, DODECAGON, DONUT, DOUBLE_WAVE, DOWN_ARROW, DOWN_ARROW_CALLOUT, FOLDED_CORNER, FRAME, HALF_FRAME, HEART, HEPTAGON, HEXAGON, HOME_PLATE, HORIZONTAL_SCROLL, IRREGULAR_SEAL_1, IRREGULAR_SEAL_2, LEFT_ARROW, LEFT_ARROW_CALLOUT, LEFT_BRACE, LEFT_BRACKET, LEFT_RIGHT_ARROW, LEFT_RIGHT_ARROW_CALLOUT, LEFT_RIGHT_UP_ARROW, LEFT_UP_ARROW, LIGHTNING_BOLT, MATH_DIVIDE, MATH_EQUAL, MATH_MINUS, MATH_MULTIPLY, MATH_NOT_EQUAL, MATH_PLUS, MOON, NO_SMOKING, NOTCHED_RIGHT_ARROW, OCTAGON, PARALLELOGRAM, PENTAGON, PIE, PLAQUE, PLUS, QUAD_ARROW, QUAD_ARROW_CALLOUT, RIBBON, RIBBON_2, RIGHT_ARROW, RIGHT_ARROW_CALLOUT, RIGHT_BRACE, RIGHT_BRACKET, ROUND_1_RECTANGLE, ROUND_2_DIAGONAL_RECTANGLE, ROUND_2_SAME_RECTANGLE, RIGHT_TRIANGLE, SMILEY_FACE, SNIP_1_RECTANGLE, SNIP_2_DIAGONAL_RECTANGLE, SNIP_2_SAME_RECTANGLE, SNIP_ROUND_RECTANGLE, STAR_10, STAR_12, STAR_16, STAR_24, STAR_32, STAR_4, STAR_5, STAR_6, STAR_7, STAR_8, STRIPED_RIGHT_ARROW, SUN, TRAPEZOID, TRIANGLE, UP_ARROW, UP_ARROW_CALLOUT, UP_DOWN_ARROW, UTURN_ARROW, VERTICAL_SCROLL, WAVE, WEDGE_ELLIPSE_CALLOUT, WEDGE_RECTANGLE_CALLOUT, WEDGE_ROUND_RECTANGLE_CALLOUT, FLOW_CHART_ALTERNATE_PROCESS, FLOW_CHART_COLLATE, FLOW_CHART_CONNECTOR, FLOW_CHART_DECISION, FLOW_CHART_DELAY, FLOW_CHART_DISPLAY, FLOW_CHART_DOCUMENT, FLOW_CHART_EXTRACT, FLOW_CHART_INPUT_OUTPUT, FLOW_CHART_INTERNAL_STORAGE, FLOW_CHART_MAGNETIC_DISK, FLOW_CHART_MAGNETIC_DRUM, FLOW_CHART_MAGNETIC_TAPE, FLOW_CHART_MANUAL_INPUT, FLOW_CHART_MANUAL_OPERATION, FLOW_CHART_MERGE, FLOW_CHART_MULTIDOCUMENT, FLOW_CHART_OFFLINE_STORAGE, FLOW_CHART_OFFPAGE_CONNECTOR, FLOW_CHART_ONLINE_STORAGE, FLOW_CHART_OR, FLOW_CHART_PREDEFINED_PROCESS, FLOW_CHART_PREPARATION, FLOW_CHART_PROCESS, FLOW_CHART_PUNCHED_CARD, FLOW_CHART_PUNCHED_TAPE, FLOW_CHART_SORT, FLOW_CHART_SUMMING_JUNCTION, FLOW_CHART_TERMINATOR, ARROW_EAST, ARROW_NORTH_EAST, ARROW_NORTH, SPEECH, STARBURST, TEARDROP, ELLIPSE_RIBBON, ELLIPSE_RIBBON_2, CLOUD_CALLOUT, CUSTOM } - /** * A PageElement representing a linked chart embedded from Google Sheets. */ @@ -1067,12 +1016,10 @@ declare namespace GoogleAppsScript { setTransform(transform: AffineTransform): SheetsChart; setWidth(width: number): SheetsChart; } - /** * The Sheets chart's embed type. */ enum SheetsChartEmbedType { UNSUPPORTED, IMAGE } - /** * A slide in a presentation. * @@ -1139,17 +1086,14 @@ declare namespace GoogleAppsScript { selectAsCurrentPage(): void; unlink(): void; } - /** * The mode of links between slides. */ enum SlideLinkingMode { UNSUPPORTED, LINKED, NOT_LINKED } - /** * The relative position of a Slide. */ enum SlidePosition { NEXT_SLIDE, PREVIOUS_SLIDE, FIRST_SLIDE, LAST_SLIDE } - /** * Creates and opens Presentations that can be edited. * @@ -1196,7 +1140,6 @@ declare namespace GoogleAppsScript { openById(id: string): Presentation; openByUrl(url: string): Presentation; } - /** * A solid color fill. * @@ -1207,12 +1150,10 @@ declare namespace GoogleAppsScript { getAlpha(): number; getColor(): Color; } - /** * The different modes for paragraph spacing. */ enum SpacingMode { UNSUPPORTED, NEVER_COLLAPSE, COLLAPSE_LISTS } - /** * A PageElement representing a table. */ @@ -1262,7 +1203,6 @@ declare namespace GoogleAppsScript { setTransform(transform: AffineTransform): Table; setWidth(width: number): Table; } - /** * A cell in a table. */ @@ -1281,14 +1221,12 @@ declare namespace GoogleAppsScript { getText(): TextRange; setContentAlignment(contentAlignment: ContentAlignment): TableCell; } - /** * A collection of one or more TableCell instances. */ interface TableCellRange { getTableCells(): TableCell[]; } - /** * A column in a table. A column consists of a list of table cells. A column is identified by the * column index. @@ -1301,7 +1239,6 @@ declare namespace GoogleAppsScript { getWidth(): number; remove(): void; } - /** * A row in a table. A row consists of a list of table cells. A row is identified by the row index. */ @@ -1313,17 +1250,14 @@ declare namespace GoogleAppsScript { getParentTable(): Table; remove(): void; } - /** * The text vertical offset from its normal position. */ enum TextBaselineOffset { UNSUPPORTED, NONE, SUPERSCRIPT, SUBSCRIPT } - /** * The directions text can flow in. */ enum TextDirection { UNSUPPORTED, LEFT_TO_RIGHT, RIGHT_TO_LEFT } - /** * A segment of the text contents of a Shape or a TableCell. */ @@ -1360,7 +1294,6 @@ declare namespace GoogleAppsScript { select(): void; setText(newText: string): TextRange; } - /** * The style of text. * @@ -1407,7 +1340,6 @@ declare namespace GoogleAppsScript { setStrikethrough(strikethrough: boolean): TextStyle; setUnderline(underline: boolean): TextStyle; } - /** * A color that refers to an entry in the page's ColorScheme. */ @@ -1415,12 +1347,10 @@ declare namespace GoogleAppsScript { getColorType(): Base.ColorType; getThemeColorType(): ThemeColorType; } - /** * The name of an entry in the page's color scheme. */ enum ThemeColorType { UNSUPPORTED, DARK1, LIGHT1, DARK2, LIGHT2, ACCENT1, ACCENT2, ACCENT3, ACCENT4, ACCENT5, ACCENT6, HYPERLINK, FOLLOWED_HYPERLINK } - /** * A PageElement representing a video. */ @@ -1466,12 +1396,10 @@ declare namespace GoogleAppsScript { setTransform(transform: AffineTransform): Video; setWidth(width: number): Video; } - /** * The video source types. */ enum VideoSourceType { UNSUPPORTED, YOUTUBE } - /** * A PageElement representing word art. */ 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 7998ea33eb..d4c8273d25 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-10-24 +// Type definitions for Google Apps Script 2019-11-06 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -15,7 +15,6 @@ declare namespace GoogleAppsScript { * these series affect calculated values differs depending on the type and amount of source data. */ enum AutoFillSeries { DEFAULT_SERIES, ALTERNATE_SERIES } - /** * Access and modify bandings, the color patterns applied to rows or columns of a range. Each * banding consists of a range and a set of colors for rows, columns, headers, and footers. @@ -42,13 +41,11 @@ declare namespace GoogleAppsScript { setSecondColumnColor(color: string | null): Banding; setSecondRowColor(color: string | null): Banding; } - /** * An enumeration of banding themes. Each theme consists of several complementary colors that are * applied to different cells based on the banding settings. */ enum BandingTheme { LIGHT_GREY, CYAN, GREEN, YELLOW, ORANGE, BLUE, TEAL, GREY, BROWN, LIGHT_GREEN, INDIGO, PINK } - /** * Access the existing BigQuery data source specification. To create a new data source * specification, use SpreadsheetApp.newDataSourceSpec(). @@ -60,7 +57,6 @@ declare namespace GoogleAppsScript { getRawQuery(): string; getType(): DataSourceType; } - /** * The builder for BigQueryDataSourceSpecBuilder. */ @@ -77,7 +73,6 @@ declare namespace GoogleAppsScript { setProjectId(projectId: string): BigQueryDataSourceSpecBuilder; setRawQuery(rawQuery: string): BigQueryDataSourceSpecBuilder; } - /** * Access boolean conditions in ConditionalFormatRules. Each * conditional format rule may contain a single boolean condition. The boolean condition itself @@ -95,18 +90,15 @@ declare namespace GoogleAppsScript { getStrikethrough(): boolean | null; getUnderline(): boolean | null; } - /** * An enumeration representing the boolean criteria that can be used in conditional format or * filter. */ enum BooleanCriteria { CELL_EMPTY, CELL_NOT_EMPTY, DATE_AFTER, DATE_BEFORE, DATE_EQUAL_TO, DATE_AFTER_RELATIVE, DATE_BEFORE_RELATIVE, DATE_EQUAL_TO_RELATIVE, NUMBER_BETWEEN, NUMBER_EQUAL_TO, NUMBER_GREATER_THAN, NUMBER_GREATER_THAN_OR_EQUAL_TO, NUMBER_LESS_THAN, NUMBER_LESS_THAN_OR_EQUAL_TO, NUMBER_NOT_BETWEEN, NUMBER_NOT_EQUAL_TO, TEXT_CONTAINS, TEXT_DOES_NOT_CONTAIN, TEXT_EQUAL_TO, TEXT_STARTS_WITH, TEXT_ENDS_WITH, CUSTOM_FORMULA } - /** * Styles that can be set on a range using Range.setBorder(top, left, bottom, right, vertical, horizontal, color, style). */ enum BorderStyle { DOTTED, DASHED, SOLID, SOLID_MEDIUM, SOLID_THICK, DOUBLE } - /** * Access conditional formatting rules. To create a new rule, use SpreadsheetApp.newConditionalFormatRule() and ConditionalFormatRuleBuilder. * You can use Sheet.setConditionalFormatRules(rules) to set the @@ -118,7 +110,6 @@ declare namespace GoogleAppsScript { getGradientCondition(): GradientCondition | null; getRanges(): Range[]; } - /** * Builder for conditional format rules. * @@ -177,7 +168,6 @@ declare namespace GoogleAppsScript { whenTextStartsWith(text: string): ConditionalFormatRuleBuilder; withCriteria(criteria: BooleanCriteria, args: any[]): ConditionalFormatRuleBuilder; } - /** * Access the chart's position within a sheet. Can be updated using the EmbeddedChart.modify() function. * @@ -190,22 +180,18 @@ declare namespace GoogleAppsScript { getOffsetX(): Integer; getOffsetY(): Integer; } - /** * An enumeration of possible special paste types. */ enum CopyPasteType { PASTE_NORMAL, PASTE_NO_BORDERS, PASTE_FORMAT, PASTE_FORMULA, PASTE_DATA_VALIDATION, PASTE_VALUES, PASTE_CONDITIONAL_FORMATTING, PASTE_COLUMN_WIDTHS } - /** * An enumeration of data execution error codes. */ enum DataExecutionErrorCode { DATA_EXECUTION_ERROR_CODE_UNSUPPORTED, NONE, TIME_OUT, TOO_MANY_ROWS, TOO_MANY_CELLS, ENGINE, PARAMETER_INVALID, UNSUPPORTED_DATA_TYPE, DUPLICATE_COLUMN_NAMES, INTERRUPTED, OTHER, TOO_MANY_CHARS_PER_CELL } - /** * An enumeration of data execution states. */ enum DataExecutionState { DATA_EXECUTION_STATE_UNSUPPORTED, RUNNING, SUCCESS, ERROR, NOT_STARTED } - /** * The data execution status. */ @@ -216,7 +202,6 @@ declare namespace GoogleAppsScript { getLastRefreshedTime(): Base.Date | null; isTruncated(): boolean; } - /** * Access and modify existing data source. To create a data source table with new data source, see * DataSourceTable. @@ -225,7 +210,6 @@ declare namespace GoogleAppsScript { getSpec(): DataSourceSpec; updateSpec(spec: DataSourceSpec): DataSource; } - /** * Access existing data source parameters. */ @@ -234,12 +218,10 @@ declare namespace GoogleAppsScript { getSourceCell(): string | null; getType(): DataSourceParameterType; } - /** * An enumeration of data source parameter types. */ enum DataSourceParameterType { DATA_SOURCE_PARAMETER_TYPE_UNSUPPORTED, CELL } - /** * Access the general settings of an existing data source spec. To access data source spec for * certain type, use as...() method. To create a new data source spec, use SpreadsheetApp.newDataSourceSpec(). @@ -261,7 +243,6 @@ declare namespace GoogleAppsScript { getParameters(): DataSourceParameter[]; getType(): DataSourceType; } - /** * The builder for DataSourceSpec. To create a specification for certain type, use as...() method. To create a new builder, use SpreadsheetApp.newDataSourceSpec(). To use the specification, see DataSourceTable. * @@ -285,7 +266,6 @@ declare namespace GoogleAppsScript { removeParameter(parameterName: string): DataSourceSpecBuilder; setParameterFromCell(parameterName: string, sourceCell: string): DataSourceSpecBuilder; } - /** * Access and modify existing data source table. To create a new data source table on a new sheet, * use Spreadsheet.insertSheetWithDataSourceTable(spec). @@ -338,12 +318,10 @@ declare namespace GoogleAppsScript { refreshData(): DataSourceTable; waitForCompletion(timeoutInSeconds: Integer): DataExecutionStatus; } - /** * An enumeration of data source types. */ enum DataSourceType { DATA_SOURCE_TYPE_UNSUPPORTED, BIGQUERY } - /** * Access data validation rules. To create a new rule, use SpreadsheetApp.newDataValidation() and DataValidationBuilder. You can use * Range.setDataValidation(rule) to set the validation rule for a range. @@ -366,7 +344,6 @@ declare namespace GoogleAppsScript { getCriteriaValues(): any[]; getHelpText(): string; } - /** * Builder for data validation rules. * @@ -416,13 +393,12 @@ declare namespace GoogleAppsScript { setHelpText(helpText: string): DataValidationBuilder; withCriteria(criteria: DataValidationCriteria, args: any[]): DataValidationBuilder; } - /** * An enumeration representing the data validation criteria that can be set on a range. * * // Change existing data-validation rules that require a date in 2013 to require a date in 2014. - * var oldDates = [new Date('1/1/2013'), new Date('12/31/2013')]; - * var newDates = [new Date('1/1/2014'), new Date('12/31/2014')]; + * var oldDates = [new Base.Date('1/1/2013'), new Base.Date('12/31/2013')]; + * var newDates = [new Base.Date('1/1/2014'), new Base.Date('12/31/2014')]; * var sheet = SpreadsheetApp.getActiveSheet(); * var range = sheet.getRange(1, 1, sheet.getMaxRows(), sheet.getMaxColumns()); * var rules = range.getDataValidations(); @@ -447,7 +423,6 @@ declare namespace GoogleAppsScript { * range.setDataValidations(rules); */ enum DataValidationCriteria { DATE_AFTER, DATE_BEFORE, DATE_BETWEEN, DATE_EQUAL_TO, DATE_IS_VALID_DATE, DATE_NOT_BETWEEN, DATE_ON_OR_AFTER, DATE_ON_OR_BEFORE, NUMBER_BETWEEN, NUMBER_EQUAL_TO, NUMBER_GREATER_THAN, NUMBER_GREATER_THAN_OR_EQUAL_TO, NUMBER_LESS_THAN, NUMBER_LESS_THAN_OR_EQUAL_TO, NUMBER_NOT_BETWEEN, NUMBER_NOT_EQUAL_TO, TEXT_CONTAINS, TEXT_DOES_NOT_CONTAIN, TEXT_EQUAL_TO, TEXT_IS_VALID_EMAIL, TEXT_IS_VALID_URL, VALUE_IN_LIST, VALUE_IN_RANGE, CUSTOM_FORMULA, CHECKBOX } - /** * Access and modify developer metadata. To create new developer metadata use Range.addDeveloperMetadata(key), Sheet.addDeveloperMetadata(key), or Spreadsheet.addDeveloperMetadata(key). */ @@ -466,7 +441,6 @@ declare namespace GoogleAppsScript { setValue(value: string): DeveloperMetadata; setVisibility(visibility: DeveloperMetadataVisibility): DeveloperMetadata; } - /** * Search for developer metadata in a spreadsheet. To create new developer metadata finder use * Range.createDeveloperMetadataFinder(), Sheet.createDeveloperMetadataFinder(), @@ -481,7 +455,6 @@ declare namespace GoogleAppsScript { withValue(value: string): DeveloperMetadataFinder; withVisibility(visibility: DeveloperMetadataVisibility): DeveloperMetadataFinder; } - /** * Access developer metadata location information. */ @@ -492,28 +465,23 @@ declare namespace GoogleAppsScript { getSheet(): Sheet | null; getSpreadsheet(): Spreadsheet | null; } - /** * An enumeration of the types of developer metadata location types. */ enum DeveloperMetadataLocationType { SPREADSHEET, SHEET, ROW, COLUMN } - /** * An enumeration of the types of developer metadata visibility. */ enum DeveloperMetadataVisibility { DOCUMENT, PROJECT } - /** * An enumeration of possible directions along which data can be stored in a spreadsheet. */ enum Dimension { COLUMNS, ROWS } - /** * An enumeration representing the possible directions that one can move within a spreadsheet using * the arrow keys. */ enum Direction { UP, DOWN, PREVIOUS, NEXT } - /** * Builder for area charts. For more details, see the Gviz * documentation. @@ -560,7 +528,6 @@ declare namespace GoogleAppsScript { setYAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedAreaChartBuilder; useLogScale(): EmbeddedAreaChartBuilder; } - /** * Builder for bar charts. For more details, see the Gviz * documentation. @@ -607,7 +574,6 @@ declare namespace GoogleAppsScript { setYAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedBarChartBuilder; useLogScale(): EmbeddedBarChartBuilder; } - /** * Represents a chart that has been embedded into a spreadsheet. * @@ -648,7 +614,6 @@ declare namespace GoogleAppsScript { getTransposeRowsAndColumns(): boolean; modify(): EmbeddedChartBuilder; } - /** * Builder used to edit an EmbeddedChart. Changes made to the chart are not saved until * Sheet.updateChart(chart) is called on the rebuilt chart. @@ -689,7 +654,6 @@ declare namespace GoogleAppsScript { setPosition(anchorRowPos: Integer, anchorColPos: Integer, offsetX: Integer, offsetY: Integer): EmbeddedChartBuilder; setTransposeRowsAndColumns(transpose: boolean): EmbeddedChartBuilder; } - /** * Builder for column charts. For more details, see the Gviz * documentation. @@ -735,7 +699,6 @@ declare namespace GoogleAppsScript { setYAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedColumnChartBuilder; useLogScale(): EmbeddedColumnChartBuilder; } - /** * Builder for combo charts. For more details, see the Gviz documentation. */ @@ -780,7 +743,6 @@ declare namespace GoogleAppsScript { setYAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedComboChartBuilder; useLogScale(): EmbeddedComboChartBuilder; } - /** * Builder for histogram charts. For more details, see the Gviz * documentation. @@ -826,7 +788,6 @@ declare namespace GoogleAppsScript { setYAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedHistogramChartBuilder; useLogScale(): EmbeddedHistogramChartBuilder; } - /** * Builder for line charts. For more details, see the Gviz * documentation. @@ -873,7 +834,6 @@ declare namespace GoogleAppsScript { setYAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedLineChartBuilder; useLogScale(): EmbeddedLineChartBuilder; } - /** * Builder for pie charts. For more details, see the Gviz * documentation. @@ -911,7 +871,6 @@ declare namespace GoogleAppsScript { setTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedPieChartBuilder; setTransposeRowsAndColumns(transpose: boolean): EmbeddedChartBuilder; } - /** * Builder for scatter charts. For more details, see the Gviz * documentation. @@ -958,7 +917,6 @@ declare namespace GoogleAppsScript { setYAxisTitle(title: string): EmbeddedScatterChartBuilder; setYAxisTitleTextStyle(textStyle: Charts.TextStyle): EmbeddedScatterChartBuilder; } - /** * Builder for table charts. For more details, see the Gviz documentation. */ @@ -997,7 +955,6 @@ declare namespace GoogleAppsScript { showRowNumberColumn(showRowNumber: boolean): EmbeddedTableChartBuilder; useAlternatingRowStyle(alternate: boolean): EmbeddedTableChartBuilder; } - /** * Access and modify existing filters. To create a new filter, use Range.createFilter(). */ @@ -1009,7 +966,6 @@ declare namespace GoogleAppsScript { setColumnFilterCriteria(columnPosition: Integer, filterCriteria: FilterCriteria | null): Filter; sort(columnPosition: Integer, ascending: boolean): Filter; } - /** * Access filter criteria. To create a new criteria, use SpreadsheetApp.newFilterCriteria() and FilterCriteriaBuilder. */ @@ -1020,7 +976,6 @@ declare namespace GoogleAppsScript { getHiddenValues(): string[]; getVisibleValues(): string[]; } - /** * Builder for FilterCriteria. */ @@ -1057,7 +1012,6 @@ declare namespace GoogleAppsScript { whenTextStartsWith(text: string): FilterCriteriaBuilder; withCriteria(criteria: BooleanCriteria, args: any[]): FilterCriteriaBuilder; } - /** * Access gradient (color) conditions in ConditionalFormatRuleApis. * Each conditional format rule may contain a single gradient condition. A gradient condition is @@ -1091,7 +1045,6 @@ declare namespace GoogleAppsScript { getMinType(): InterpolationType | null; getMinValue(): string; } - /** * Access and modify spreadsheet groups. Groups are an association between an interval of contiguous * rows or columns that can be expanded or collapsed as a unit to hide/show the rows or columns. @@ -1114,18 +1067,15 @@ declare namespace GoogleAppsScript { isCollapsed(): boolean; remove(): void; } - /** * An enumeration representing the possible positions that a group control toggle can have. */ enum GroupControlTogglePosition { BEFORE, AFTER } - /** * An enumeration representing the interpolation options for calculating a value to be used in a * GradientCondition in a ConditionalFormatRule. */ enum InterpolationType { NUMBER, PERCENT, PERCENTILE, MIN, MAX } - /** * Create, access and modify named ranges in a spreadsheet. Named ranges are ranges that have * associated string aliases. They can be viewed and edited via the Sheets UI under the Data > @@ -1138,7 +1088,6 @@ declare namespace GoogleAppsScript { setName(name: string): NamedRange; setRange(range: Range): NamedRange; } - /** * Represents an image over the grid in a spreadsheet. */ @@ -1168,7 +1117,6 @@ declare namespace GoogleAppsScript { setHeight(height: Integer): OverGridImage; setWidth(width: Integer): OverGridImage; } - /** * * Deprecated. For spreadsheets created in the newer version of Google Sheets, use the more powerful @@ -1177,13 +1125,12 @@ declare namespace GoogleAppsScript { * Access and modify protected sheets in the older version of Google Sheets. */ interface PageProtection { - addUser(email: string): void; - getUsers(): string[]; - isProtected(): boolean; - removeUser(user: string): void; - setProtected(protection: boolean): void; + /** @deprecated DO NOT USE */addUser(email: string): void; + /** @deprecated DO NOT USE */getUsers(): string[]; + /** @deprecated DO NOT USE */isProtected(): boolean; + /** @deprecated DO NOT USE */removeUser(user: string): void; + /** @deprecated DO NOT USE */setProtected(protection: boolean): void; } - /** * Access and modify pivot table filters. */ @@ -1194,7 +1141,6 @@ declare namespace GoogleAppsScript { remove(): void; setFilterCriteria(filterCriteria: FilterCriteria): PivotFilter; } - /** * Access and modify pivot table breakout groups. */ @@ -1222,7 +1168,6 @@ declare namespace GoogleAppsScript { sortDescending(): PivotGroup; totalsAreShown(): boolean; } - /** * Access and modify pivot tables. */ @@ -1241,12 +1186,10 @@ declare namespace GoogleAppsScript { remove(): void; setValuesDisplayOrientation(dimension: Dimension): PivotTable; } - /** * An enumeration of functions that summarize pivot table data. */ enum PivotTableSummarizeFunction { CUSTOM, SUM, COUNTA, COUNT, COUNTUNIQUE, AVERAGE, MAX, MIN, MEDIAN, PRODUCT, STDEV, STDEVP, VAR, VARP } - /** * Access and modify value groups in pivot tables. */ @@ -1260,12 +1203,10 @@ declare namespace GoogleAppsScript { showAs(displayType: PivotValueDisplayType): PivotValue; summarizeBy(summarizeFunction: PivotTableSummarizeFunction): PivotValue; } - /** * An enumeration of ways to display a pivot value as a function of another value. */ enum PivotValueDisplayType { DEFAULT, PERCENT_OF_ROW_TOTAL, PERCENT_OF_COLUMN_TOTAL, PERCENT_OF_GRAND_TOTAL } - /** * Access and modify protected ranges and sheets. A protected range can protect either a static * range of cells or a named range. A protected sheet may include unprotected regions. For @@ -1334,7 +1275,6 @@ declare namespace GoogleAppsScript { setUnprotectedRanges(ranges: Range[]): Protection; setWarningOnly(warningOnly: boolean): Protection; } - /** * An enumeration representing the parts of a spreadsheet that can be protected from edits. * @@ -1356,7 +1296,6 @@ declare namespace GoogleAppsScript { * } */ enum ProtectionType { RANGE, SHEET } - /** * Access and modify spreadsheet ranges. A range can be a single cell in a sheet or a group of * adjacent cells in a sheet. @@ -1547,7 +1486,6 @@ declare namespace GoogleAppsScript { trimWhitespace(): Range; uncheck(): Range; } - /** * A collection of one or more Range instances in the same sheet. You can use this class * to apply operations on collections of non-adjacent ranges or cells. @@ -1593,18 +1531,15 @@ declare namespace GoogleAppsScript { trimWhitespace(): RangeList; uncheck(): RangeList; } - /** * An enumeration representing the possible intervals used in spreadsheet recalculation. */ enum RecalculationInterval { ON_CHANGE, MINUTE, HOUR } - /** * An enumeration representing the relative date options for calculating a value to be used in * date-based BooleanCriteria. */ enum RelativeDate { TODAY, TOMORROW, YESTERDAY, PAST_WEEK, PAST_MONTH, PAST_YEAR } - /** * A stylized text string used to represent cell text. Substrings of the text can have different * text styles. @@ -1622,7 +1557,6 @@ declare namespace GoogleAppsScript { getTextStyle(): TextStyle; getTextStyle(startOffset: Integer, endOffset: Integer): TextStyle; } - /** * A builder for Rich Text values. */ @@ -1632,7 +1566,6 @@ declare namespace GoogleAppsScript { setTextStyle(startOffset: Integer, endOffset: Integer, textStyle: TextStyle | null): RichTextValueBuilder; setTextStyle(textStyle: TextStyle | null): RichTextValueBuilder; } - /** * Access the current active selection in the active sheet. A selection is the set of cells the user * has highlighted in the sheet, which can be non-adjacent ranges. One cell in the selection is the @@ -1662,7 +1595,6 @@ declare namespace GoogleAppsScript { getCurrentCell(): Range | null; getNextDataRange(direction: Direction): Range | null; } - /** * Access and modify spreadsheet sheets. Common operations are renaming a sheet and accessing range * objects from the sheet. @@ -1738,6 +1670,7 @@ declare namespace GoogleAppsScript { getSheetId(): Integer; getSheetName(): string; getSheetValues(startRow: Integer, startColumn: Integer, numRows: Integer, numColumns: Integer): any[][]; + getSlicers(): Slicer[]; getTabColor(): string | null; getType(): SheetType; hasHiddenGridlines(): boolean; @@ -1765,6 +1698,8 @@ declare namespace GoogleAppsScript { insertRows(rowIndex: Integer, numRows: Integer): void; insertRowsAfter(afterPosition: Integer, howMany: Integer): Sheet; insertRowsBefore(beforePosition: Integer, howMany: Integer): Sheet; + insertSlicer(range: Range, anchorRowPos: Integer, anchorColPos: Integer): Slicer; + insertSlicer(range: Range, anchorRowPos: Integer, anchorColPos: Integer, offsetX: Integer, offsetY: Integer): Slicer; isColumnHiddenByUser(columnPosition: Integer): boolean; isRightToLeft(): boolean; isRowHiddenByFilter(rowPosition: Integer): boolean; @@ -1803,17 +1738,38 @@ declare namespace GoogleAppsScript { unhideColumn(column: Range): void; unhideRow(row: Range): void; updateChart(chart: EmbeddedChart): void; - /** @deprecated DO NOT USE */ - getSheetProtection(): PageProtection; - /** @deprecated DO NOT USE */ - setSheetProtection(permissions: PageProtection): void; + /** @deprecated DO NOT USE */getSheetProtection(): PageProtection; + /** @deprecated DO NOT USE */setSheetProtection(permissions: PageProtection): void; } - /** * The different types of sheets that can exist in a spreadsheet. */ enum SheetType { GRID, OBJECT } - + /** + * Represents a slicer, which is used + * to filter ranges, charts and pivot tables in a non-collaborative manner. This class contains + * methods to access and modify existing slicers. To create a new slicer, use Sheet.insertSlicer(range, anchorRowPos, anchorColPos). + */ + interface Slicer { + getBackgroundColor(): string; + getColumnPosition(): Integer; + getContainerInfo(): ContainerInfo; + getFilterCriteria(): FilterCriteria; + getRange(): Range; + getTitle(): string; + getTitleHorizontalAlignment(): string; + getTitleTextStyle(): TextStyle; + isAppliedToPivotTables(): boolean; + remove(): void; + setApplyToPivotTables(applyToPivotTables: boolean): Slicer; + setBackgroundColor(color: string): Slicer; + setColumnFilterCriteria(columnPosition: Integer, filterCriteria: FilterCriteria): Slicer; + setPosition(anchorRowPos: Integer, anchorColPos: Integer, offsetX: Integer, offsetY: Integer): Slicer; + setRange(rangeApi: Range): Slicer; + setTitle(title: string): Slicer; + setTitleHorizontalAlignment(horizontalAlignment: string): Slicer; + setTitleTextStyle(textStyle: TextStyle): Slicer; + } /** * Access and modify Google Sheets files. Common operations are adding new sheets and adding * collaborators. @@ -1948,18 +1904,12 @@ declare namespace GoogleAppsScript { unhideColumn(column: Range): void; unhideRow(row: Range): void; updateMenu(name: string, subMenus: { name: string, functionName: string }[]): void; - /** @deprecated DO NOT USE */ - getSheetProtection(): PageProtection; - /** @deprecated DO NOT USE */ - isAnonymousView(): boolean; - /** @deprecated DO NOT USE */ - isAnonymousWrite(): boolean; - /** @deprecated DO NOT USE */ - setAnonymousAccess(anonymousReadAllowed: boolean, anonymousWriteAllowed: boolean): void; - /** @deprecated DO NOT USE */ - setSheetProtection(permissions: PageProtection): void; + /** @deprecated DO NOT USE */getSheetProtection(): PageProtection; + /** @deprecated DO NOT USE */isAnonymousView(): boolean; + /** @deprecated DO NOT USE */isAnonymousWrite(): boolean; + /** @deprecated DO NOT USE */setAnonymousAccess(anonymousReadAllowed: boolean, anonymousWriteAllowed: boolean): void; + /** @deprecated DO NOT USE */setSheetProtection(permissions: PageProtection): void; } - /** * Access and create Google Sheets files. This class is the parent class for the Spreadsheet service. */ @@ -2018,12 +1968,10 @@ declare namespace GoogleAppsScript { setActiveSpreadsheet(newActiveSpreadsheet: Spreadsheet): void; setCurrentCell(cell: Range): Range; } - /** * An enumerations of text directions. */ enum TextDirection { LEFT_TO_RIGHT, RIGHT_TO_LEFT } - /** * Find or replace text within a range, sheet or spreadsheet. Can also specify search options. */ @@ -2041,7 +1989,6 @@ declare namespace GoogleAppsScript { startFrom(startRange: Range): TextFinder; useRegularExpression(useRegEx: boolean): TextFinder; } - /** * Access the text rotation settings for a cell. */ @@ -2049,7 +1996,6 @@ declare namespace GoogleAppsScript { getDegrees(): Integer; isVertical(): boolean; } - /** * The rendered style of text in a cell. * @@ -2067,7 +2013,6 @@ declare namespace GoogleAppsScript { isStrikethrough(): boolean | null; isUnderline(): boolean | null; } - /** * A builder for text styles. */ @@ -2081,13 +2026,11 @@ declare namespace GoogleAppsScript { setStrikethrough(strikethrough: boolean): TextStyleBuilder; setUnderline(underline: boolean): TextStyleBuilder; } - /** * An enumeration of the types of preset delimiters that can split a column of text into multiple * columns. */ enum TextToColumnsDelimiter { COMMA, SEMICOLON, PERIOD, SPACE } - /** * An enumeration of the strategies used to handle cell text wrapping. */ diff --git a/types/google-apps-script/google-apps-script.url-fetch.d.ts b/types/google-apps-script/google-apps-script.url-fetch.d.ts index e05ecc9439..53bc471d04 100644 --- a/types/google-apps-script/google-apps-script.url-fetch.d.ts +++ b/types/google-apps-script/google-apps-script.url-fetch.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Apps Script 2019-10-24 +// Type definitions for Google Apps Script 2019-11-06 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // takoyaki9n @@ -27,9 +27,9 @@ declare namespace GoogleAppsScript { } interface URLFetchRequest extends URLFetchRequestOptions { - url: string; - } - interface URLFetchRequestOptions { + url: string; + } + interface URLFetchRequestOptions { /** * the content type (defaults to 'application/x-www-form-urlencoded'). Another example of content * type is 'application/xml; charset=utf-8'. diff --git a/types/google-apps-script/google-apps-script.utilities.d.ts b/types/google-apps-script/google-apps-script.utilities.d.ts index 0aece64253..a5a62eda8e 100644 --- a/types/google-apps-script/google-apps-script.utilities.d.ts +++ b/types/google-apps-script/google-apps-script.utilities.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Apps Script 2019-10-24 +// Type definitions for Google Apps Script 2019-11-06 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -12,22 +12,18 @@ declare namespace GoogleAppsScript { * A typesafe enum for character sets. */ enum Charset { US_ASCII, UTF_8 } - /** * Selector of Digest algorithm. */ enum DigestAlgorithm { MD2, MD5, SHA_1, SHA_256, SHA_384, SHA_512 } - /** * Selector of MAC algorithm */ enum MacAlgorithm { HMAC_MD5, HMAC_SHA_1, HMAC_SHA_256, HMAC_SHA_384, HMAC_SHA_512 } - /** * Selector of RSA algorithm */ enum RsaAlgorithm { RSA_SHA_1, RSA_SHA_256 } - /** * This service provides utilities for string encoding/decoding, date formatting, JSON manipulation, * and other miscellaneous tasks. @@ -80,10 +76,8 @@ declare namespace GoogleAppsScript { unzip(blob: Base.BlobSource): Base.Blob[]; zip(blobs: Base.BlobSource[]): Base.Blob; zip(blobs: Base.BlobSource[], name: string): Base.Blob; - /** @deprecated DO NOT USE */ - jsonParse(jsonString: string): any; - /** @deprecated DO NOT USE */ - jsonStringify(obj: any): string; + /** @deprecated DO NOT USE */jsonParse(jsonString: string): any; + /** @deprecated DO NOT USE */jsonStringify(obj: any): string; } } } 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 e9dda38621..3e84841277 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 2019-10-24 +// Type definitions for Google Apps Script 2019-11-06 // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -34,7 +34,6 @@ declare namespace GoogleAppsScript { setNamespace(namespace: Namespace): Attribute; setValue(value: string): Attribute; } - /** * A representation of an XML CDATASection node. * @@ -56,7 +55,6 @@ declare namespace GoogleAppsScript { getValue(): string; setText(text: string): Text; } - /** * A representation of an XML Comment node. */ @@ -67,7 +65,6 @@ declare namespace GoogleAppsScript { getValue(): string; setText(text: string): Comment; } - /** * A representation of a generic XML node. * Implementing classes @@ -101,12 +98,10 @@ declare namespace GoogleAppsScript { getType(): ContentType; getValue(): string; } - /** * An enumeration representing the types of XML content nodes. */ enum ContentType { CDATA, COMMENT, DOCTYPE, ELEMENT, ENTITYREF, PROCESSINGINSTRUCTION, TEXT } - /** * A representation of an XML DocumentType node. */ @@ -123,7 +118,6 @@ declare namespace GoogleAppsScript { setPublicId(id: string): DocType; setSystemId(id: string): DocType; } - /** * A representation of an XML document. */ @@ -145,7 +139,6 @@ declare namespace GoogleAppsScript { setDocType(docType: DocType): Document; setRootElement(element: Element): Document; } - /** * A representation of an XML Element node. * @@ -209,7 +202,6 @@ declare namespace GoogleAppsScript { setNamespace(namespace: Namespace): Element; setText(text: string): Element; } - /** * A representation of an XML EntityReference node. */ @@ -224,7 +216,6 @@ declare namespace GoogleAppsScript { setPublicId(id: string): EntityRef; setSystemId(id: string): EntityRef; } - /** * A formatter for outputting an XML document, with three pre-defined formats that can be further * customized. @@ -248,7 +239,6 @@ declare namespace GoogleAppsScript { setOmitDeclaration(omitDeclaration: boolean): Format; setOmitEncoding(omitEncoding: boolean): Format; } - /** * A representation of an XML namespace. */ @@ -256,7 +246,6 @@ declare namespace GoogleAppsScript { getPrefix(): string; getURI(): string; } - /** * A representation of an XML ProcessingInstruction node. */ @@ -267,7 +256,6 @@ declare namespace GoogleAppsScript { getTarget(): string; getValue(): string; } - /** * A representation of an XML Text node. */ @@ -279,7 +267,6 @@ declare namespace GoogleAppsScript { getValue(): string; setText(text: string): Text; } - /** * This service allows scripts to parse, navigate, and programmatically create XML documents. * diff --git a/types/google-apps-script/index.d.ts b/types/google-apps-script/index.d.ts index 2a374e7c31..cd6579431b 100644 --- a/types/google-apps-script/index.d.ts +++ b/types/google-apps-script/index.d.ts @@ -2,6 +2,7 @@ // Project: https://developers.google.com/apps-script/ // Definitions by: motemen // grant +// PopGoesTheWza // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2