-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
115 lines (96 loc) · 3.22 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
declare namespace GoogleAppsScript {
class DataValidationProtection {
getColumn(column?: number): GoogleAppsScript.Spreadsheet.Protection[];
/**
* @summary gets data validation protections at a certain row
*/
getRow(row?: number): GoogleAppsScript.Spreadsheet.Protection[];
/**
* @summary lists data validation protections
*/
list(): GoogleAppsScript.Spreadsheet.Protection[];
/**
* @summary adds data validation protection
*/
protect(skipRows?: number): DataValidationProtection;
/**
* @summary removes data validation protection
*/
unprotect(): DataValidationProtection;
/**
* @summary adds data validation protection to columns except blacklisted
*/
protectColumnsExcept(
blacklist: number[],
skipRows?: number
): DataValidationProtection;
/**
* @summary adds editors to a column of data validations
*/
addToColumn(
column: number,
...emails: string[]
): DataValidationProtection;
/**
* @summary adds editors to a row of data validations
*/
addToRow(row: number, ...emails: string[]): DataValidationProtection;
/**
* @summary removes editors from a column of data validations
*/
removeFromColumn(
column: number,
...emails: string[]
): DataValidationProtection;
/**
* @summary removes editors from a row of data validations
*/
removeFromRow(
row: number,
...emails: string[]
): DataValidationProtection;
/**
* @summary adds editors to the data validation protection
*/
addEditors(...emails: string[]): DataValidationProtection;
/**
* @summary removes editors from the data validation protection
*/
removeEditors(...emails: string[]): DataValidationProtection;
}
class Protection {
/**
* @summary checks if a given protection applies to coordinates
*/
isProtectedCell(row: number, col: number): boolean;
/**
* @summary adds an editor from the protection
*/
addEditor(email: string): Protection;
/**
* @summary removes an editor from the protection
*/
removeEditor(email: string): Protection;
/**
* @summary removes all editors from the protection
*/
removeEditors(): Protection;
}
interface DataValidationProtectionApp {
/**
* @summary instantiates a DataValidationProtection class
*/
getInstance(
sheet: GoogleAppsScript.Spreadsheet.Sheet
): DataValidationProtection;
/**
* @summary sets prefix to add to protection name
*/
setPrefix(prefix: string): void;
/**
* @summary wraps a protection into Protection class instance
*/
wrap(protection: GoogleAppsScript.Spreadsheet.Protection): Protection;
}
}
declare var DataValidationProtectionApp: GoogleAppsScript.DataValidationProtectionApp;