-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
77 lines (77 loc) · 2.62 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/// <reference path="./src/types/SheetsAPI/sheets.d.ts" />
declare class Sheet {
private _parentSpreadsheet;
private _GASSheet;
private _APISheet;
private _sheetId;
private _name;
private _values;
private _formulas;
private _formats;
private _conditionalFormats;
private _dataValidations;
private readonly parentSpreadsheet;
private readonly GASSheet;
private readonly APISheet;
readonly sheetId: number;
readonly name: string;
readonly APIvalues: any[][];
values: any[][];
readonly formulas: string[][];
readonly formats: Sheets.CellFormat[][];
readonly conditionalFormatRules: Sheets.ConditionalFormatRule[];
readonly dataValidationRules: Sheets.DataValidationRule[][];
readonly headers: any[];
readonly nRows: number;
readonly nColumns: number;
constructor(parent: Spreadsheet, name: string);
private extractValue;
write(): boolean;
private clear;
sort(column: number, ascending?: boolean): void;
}
interface SheetObjectInterface {
[property: string]: any;
}
interface SheetObjectInstance {
}
interface SheetObjectConstructor<T extends SheetObject> {
new (data: SheetObjectInterface | null): T;
}
declare abstract class SheetObject implements SheetObjectInstance {
private static gDateConversion;
getData(): SheetObjectInterface;
validate(data: SheetObjectInterface): boolean;
static convertFromGDate(dateValue: string | number | Date | null): Date | null;
static convertToGDate(date: Date | null): number | null;
private static getConversionNumber;
static isDaylightSavings(date: Date): boolean;
private static getSTDTimezoneOffset;
}
declare class SheetObjectDictionary<T extends SheetObject> {
ctor: SheetObjectConstructor<T> | null;
sheet: Sheet | null;
constructor(ctor: SheetObjectConstructor<T>, sheet: Sheet);
[property: string]: any;
translate(): T[];
write(instances: T[]): boolean;
dataObjectToValues(data: SheetObjectInterface): any[];
instanceToValueArray(instance: T): any[] | null;
}
declare class Spreadsheet {
private _GASSpreadsheet;
private _APISpreadsheet;
private _spreadsheetId;
private _name;
private _sheetNames;
private readonly GASSpreadsheet;
private readonly APISpreadsheet;
readonly spreadsheetId: string;
readonly name: string;
readonly sheetNames: string[];
constructor(spreadsheetId?: string | null);
requestGASSheet(sheetName: string): GoogleAppsScript.Spreadsheet.Sheet;
isSheetExist(sheetName: string): boolean;
createSheet(sheetName: string): boolean;
deleteSheet(sheetName: string): boolean;
}