Comments (2)
// Type definitions for Google Apps Script 2019-04-02
// Project: https://developers.google.com/apps-script/
// Definitions by: grant <https://github.com/grant/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="google-apps-script.script.d.ts" />
/// <reference path="google-apps-script.spreadsheet.d.ts" />
/// <reference path="google-apps-script.slides.d.ts" />
declare namespace GoogleAppsScript {
/**
* Google Apps Script Events
* @see https://developers.google.com/apps-script/guides/triggers/events
*/
export module Events {
// Internal interfaces
interface AppsScriptEvent {
authMode: Script.AuthMode,
triggerUid: string,
user: Base.User,
}
interface HttpRequestEvent {
parameter: object,
contextPath: string,
contentLength: number
queryString: string,
parameters: object,
}
/**
* TODO: What about other properties?
* copyBlob, getAllBlobs, getAs, getBlob, getBytes, getContentType,
* getDataAsString, getDocId, getImageUrl, getName, getPrimitiveByteArray,
* isGoogleType, requireContentType, requireData, requireName, setBytes,
* setContentType, setContentTypeFromExtension, setDataFromString,
* setDataFromString, setName, toString
*/
interface HttpRequestEventPostData {
length: number,
type: string,
contents: string,
name: string // Always the value "postData"
}
// External interfaces
export interface SheetsOnOpen extends AppsScriptEvent {
source: Spreadsheet.Spreadsheet,
}
enum SheetsOnChangeChangeType { EDIT, INSERT_ROW, INSERT_COLUMN, REMOVE_ROW, REMOVE_COLUMN, INSERT_GRID, REMOVE_GRID, FORMAT, OTHER }
export interface SheetsOnChange extends AppsScriptEvent {
changeType: SheetsOnChangeChangeType,
}
export interface SheetsOnEdit extends AppsScriptEvent {
oldValue: string,
range: Spreadsheet.Range,
source: Spreadsheet.Spreadsheet,
value: string,
}
export interface FormsOnSubmit extends AppsScriptEvent {
namedValues: { [key: string]: string[]; },
range: Spreadsheet.Range,
values: string[],
}
export interface DocsOnOpen extends AppsScriptEvent {
source: Document.Document,
}
export interface SlidesOnOpen extends AppsScriptEvent {
source: Slides.Presentation,
}
export interface FormsOnOpen extends AppsScriptEvent {
source: Forms.Form,
}
// TODO: Is there a `user` attribute?
export interface CalendarEventUpdated extends AppsScriptEvent {
calendarId: string,
}
export interface AddonOnInstall {
authMode: Script.AuthMode,
}
export interface DoGet extends HttpRequestEvent {
}
export interface DoPost extends HttpRequestEvent {
postData: HttpRequestEventPostData
}
}
}
from google-apps-script-snippets.
DefinitelyTyped/DefinitelyTyped#35646
from google-apps-script-snippets.
Related Issues (20)
- Copy project
- Custom function get sheet name by gid HOT 1
- Get root global objects
- Get EXIF
- Auto add up
- Clear out of datarange ranges
- Collect several sheets in one HOT 1
- Google Apps Script to read JSON and write to sheet
- XLS examples
- Google apps script to export an individual sheet as csv file
- Google Sheets locale list
- В телеграм-боте неверное обозначение свойства
- andrewroberts/Metadata
- postman31/goal-manager
- test issue
- autoid HOT 1
- Create a footnote
- Create a footnote
- https://github.com/sqrrrl/apps-script-typescript-rollup-starter
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-apps-script-snippets.