@googleapis/safebrowsing 4.0.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/build/v4.d.ts +195 -528
- package/build/v4.js.map +1 -1
- package/package.json +1 -1
- package/v4.ts +261 -577
package/build/v4.d.ts
CHANGED
|
@@ -77,10 +77,15 @@ export declare namespace safebrowsing_v4 {
|
|
|
77
77
|
threatMatches: Resource$Threatmatches;
|
|
78
78
|
constructor(options: GlobalOptions, google?: GoogleConfigurable);
|
|
79
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \}
|
|
82
|
+
*/
|
|
83
|
+
export interface Schema$GoogleProtobufEmpty {
|
|
84
|
+
}
|
|
80
85
|
/**
|
|
81
86
|
* The expected state of a client's local database.
|
|
82
87
|
*/
|
|
83
|
-
export interface Schema$
|
|
88
|
+
export interface Schema$GoogleSecuritySafebrowsingV4Checksum {
|
|
84
89
|
/**
|
|
85
90
|
* The SHA256 hash of the client state; that is, of the sorted list of all hashes present in the database.
|
|
86
91
|
*/
|
|
@@ -89,7 +94,7 @@ export declare namespace safebrowsing_v4 {
|
|
|
89
94
|
/**
|
|
90
95
|
* The client metadata associated with Safe Browsing API requests.
|
|
91
96
|
*/
|
|
92
|
-
export interface Schema$
|
|
97
|
+
export interface Schema$GoogleSecuritySafebrowsingV4ClientInfo {
|
|
93
98
|
/**
|
|
94
99
|
* A client ID that (hopefully) uniquely identifies the client implementation of the Safe Browsing API.
|
|
95
100
|
*/
|
|
@@ -99,10 +104,48 @@ export declare namespace safebrowsing_v4 {
|
|
|
99
104
|
*/
|
|
100
105
|
clientVersion?: string | null;
|
|
101
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* Describes a Safe Browsing API update request. Clients can request updates for multiple lists in a single request. The server may not respond to all requests, if the server has no updates for that list. NOTE: Field index 2 is unused. NEXT: 5
|
|
109
|
+
*/
|
|
110
|
+
export interface Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequest {
|
|
111
|
+
/**
|
|
112
|
+
* The client metadata.
|
|
113
|
+
*/
|
|
114
|
+
client?: Schema$GoogleSecuritySafebrowsingV4ClientInfo;
|
|
115
|
+
/**
|
|
116
|
+
* The requested threat list updates.
|
|
117
|
+
*/
|
|
118
|
+
listUpdateRequests?: Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequest[];
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* A single list update request.
|
|
122
|
+
*/
|
|
123
|
+
export interface Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequest {
|
|
124
|
+
/**
|
|
125
|
+
* The constraints associated with this request.
|
|
126
|
+
*/
|
|
127
|
+
constraints?: Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestConstraints;
|
|
128
|
+
/**
|
|
129
|
+
* The type of platform at risk by entries present in the list.
|
|
130
|
+
*/
|
|
131
|
+
platformType?: string | null;
|
|
132
|
+
/**
|
|
133
|
+
* The current state of the client for the requested list (the encrypted client state that was received from the last successful list update).
|
|
134
|
+
*/
|
|
135
|
+
state?: string | null;
|
|
136
|
+
/**
|
|
137
|
+
* The types of entries present in the list.
|
|
138
|
+
*/
|
|
139
|
+
threatEntryType?: string | null;
|
|
140
|
+
/**
|
|
141
|
+
* The type of threat posed by entries present in the list.
|
|
142
|
+
*/
|
|
143
|
+
threatType?: string | null;
|
|
144
|
+
}
|
|
102
145
|
/**
|
|
103
146
|
* The constraints for this update.
|
|
104
147
|
*/
|
|
105
|
-
export interface Schema$
|
|
148
|
+
export interface Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestConstraints {
|
|
106
149
|
/**
|
|
107
150
|
* A client's physical location, expressed as a ISO 31166-1 alpha-2 region code.
|
|
108
151
|
*/
|
|
@@ -128,46 +171,65 @@ export declare namespace safebrowsing_v4 {
|
|
|
128
171
|
*/
|
|
129
172
|
supportedCompressions?: string[] | null;
|
|
130
173
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
174
|
+
export interface Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse {
|
|
175
|
+
/**
|
|
176
|
+
* The list updates requested by the clients. The number of responses here may be less than the number of requests sent by clients. This is the case, for example, if the server has no updates for a particular list.
|
|
177
|
+
*/
|
|
178
|
+
listUpdateResponses?: Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponseListUpdateResponse[];
|
|
179
|
+
/**
|
|
180
|
+
* The minimum duration the client must wait before issuing any update request. If this field is not set clients may update as soon as they want.
|
|
181
|
+
*/
|
|
182
|
+
minimumWaitDuration?: string | null;
|
|
135
183
|
}
|
|
136
184
|
/**
|
|
137
|
-
*
|
|
185
|
+
* An update to an individual list.
|
|
138
186
|
*/
|
|
139
|
-
export interface Schema$
|
|
187
|
+
export interface Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponseListUpdateResponse {
|
|
140
188
|
/**
|
|
141
|
-
*
|
|
189
|
+
* A set of entries to add to a local threat type's list. Repeated to allow for a combination of compressed and raw data to be sent in a single response.
|
|
142
190
|
*/
|
|
143
|
-
|
|
191
|
+
additions?: Schema$GoogleSecuritySafebrowsingV4ThreatEntrySet[];
|
|
144
192
|
/**
|
|
145
|
-
* The
|
|
193
|
+
* The expected SHA256 hash of the client state; that is, of the sorted list of all hashes present in the database after applying the provided update. If the client state doesn't match the expected state, the client must disregard this update and retry later.
|
|
146
194
|
*/
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
export interface Schema$FetchThreatListUpdatesResponse {
|
|
195
|
+
checksum?: Schema$GoogleSecuritySafebrowsingV4Checksum;
|
|
150
196
|
/**
|
|
151
|
-
* The
|
|
197
|
+
* The new client state, in encrypted format. Opaque to clients.
|
|
152
198
|
*/
|
|
153
|
-
|
|
199
|
+
newClientState?: string | null;
|
|
154
200
|
/**
|
|
155
|
-
* The
|
|
201
|
+
* The platform type for which data is returned.
|
|
156
202
|
*/
|
|
157
|
-
|
|
203
|
+
platformType?: string | null;
|
|
204
|
+
/**
|
|
205
|
+
* A set of entries to remove from a local threat type's list. In practice, this field is empty or contains exactly one ThreatEntrySet.
|
|
206
|
+
*/
|
|
207
|
+
removals?: Schema$GoogleSecuritySafebrowsingV4ThreatEntrySet[];
|
|
208
|
+
/**
|
|
209
|
+
* The type of response. This may indicate that an action is required by the client when the response is received.
|
|
210
|
+
*/
|
|
211
|
+
responseType?: string | null;
|
|
212
|
+
/**
|
|
213
|
+
* The format of the threats.
|
|
214
|
+
*/
|
|
215
|
+
threatEntryType?: string | null;
|
|
216
|
+
/**
|
|
217
|
+
* The threat type for which data is returned.
|
|
218
|
+
*/
|
|
219
|
+
threatType?: string | null;
|
|
158
220
|
}
|
|
159
221
|
/**
|
|
160
222
|
* Request to return full hashes matched by the provided hash prefixes.
|
|
161
223
|
*/
|
|
162
|
-
export interface Schema$
|
|
224
|
+
export interface Schema$GoogleSecuritySafebrowsingV4FindFullHashesRequest {
|
|
163
225
|
/**
|
|
164
226
|
* Client metadata associated with callers of higher-level APIs built on top of the client's implementation.
|
|
165
227
|
*/
|
|
166
|
-
apiClient?: Schema$
|
|
228
|
+
apiClient?: Schema$GoogleSecuritySafebrowsingV4ClientInfo;
|
|
167
229
|
/**
|
|
168
230
|
* The client metadata.
|
|
169
231
|
*/
|
|
170
|
-
client?: Schema$
|
|
232
|
+
client?: Schema$GoogleSecuritySafebrowsingV4ClientInfo;
|
|
171
233
|
/**
|
|
172
234
|
* The current client states for each of the client's local threat lists.
|
|
173
235
|
*/
|
|
@@ -175,13 +237,13 @@ export declare namespace safebrowsing_v4 {
|
|
|
175
237
|
/**
|
|
176
238
|
* The lists and hashes to be checked.
|
|
177
239
|
*/
|
|
178
|
-
threatInfo?: Schema$
|
|
240
|
+
threatInfo?: Schema$GoogleSecuritySafebrowsingV4ThreatInfo;
|
|
179
241
|
}
|
|
180
|
-
export interface Schema$
|
|
242
|
+
export interface Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse {
|
|
181
243
|
/**
|
|
182
244
|
* The full hashes that matched the requested prefixes.
|
|
183
245
|
*/
|
|
184
|
-
matches?: Schema$
|
|
246
|
+
matches?: Schema$GoogleSecuritySafebrowsingV4ThreatMatch[];
|
|
185
247
|
/**
|
|
186
248
|
* The minimum duration the client must wait before issuing any find hashes request. If this field is not set, clients can issue a request as soon as they want.
|
|
187
249
|
*/
|
|
@@ -194,107 +256,32 @@ export declare namespace safebrowsing_v4 {
|
|
|
194
256
|
/**
|
|
195
257
|
* Request to check entries against lists.
|
|
196
258
|
*/
|
|
197
|
-
export interface Schema$
|
|
259
|
+
export interface Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesRequest {
|
|
198
260
|
/**
|
|
199
261
|
* The client metadata.
|
|
200
262
|
*/
|
|
201
|
-
client?: Schema$
|
|
263
|
+
client?: Schema$GoogleSecuritySafebrowsingV4ClientInfo;
|
|
202
264
|
/**
|
|
203
265
|
* The lists and entries to be checked for matches.
|
|
204
266
|
*/
|
|
205
|
-
threatInfo?: Schema$
|
|
267
|
+
threatInfo?: Schema$GoogleSecuritySafebrowsingV4ThreatInfo;
|
|
206
268
|
}
|
|
207
|
-
export interface Schema$
|
|
269
|
+
export interface Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesResponse {
|
|
208
270
|
/**
|
|
209
271
|
* The threat list matches.
|
|
210
272
|
*/
|
|
211
|
-
matches?: Schema$
|
|
273
|
+
matches?: Schema$GoogleSecuritySafebrowsingV4ThreatMatch[];
|
|
212
274
|
}
|
|
213
|
-
export interface Schema$
|
|
275
|
+
export interface Schema$GoogleSecuritySafebrowsingV4ListThreatListsResponse {
|
|
214
276
|
/**
|
|
215
277
|
* The lists available for download by the client.
|
|
216
278
|
*/
|
|
217
|
-
threatLists?: Schema$
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* A single list update request.
|
|
221
|
-
*/
|
|
222
|
-
export interface Schema$ListUpdateRequest {
|
|
223
|
-
/**
|
|
224
|
-
* The constraints associated with this request.
|
|
225
|
-
*/
|
|
226
|
-
constraints?: Schema$Constraints;
|
|
227
|
-
/**
|
|
228
|
-
* The type of platform at risk by entries present in the list.
|
|
229
|
-
*/
|
|
230
|
-
platformType?: string | null;
|
|
231
|
-
/**
|
|
232
|
-
* The current state of the client for the requested list (the encrypted client state that was received from the last successful list update).
|
|
233
|
-
*/
|
|
234
|
-
state?: string | null;
|
|
235
|
-
/**
|
|
236
|
-
* The types of entries present in the list.
|
|
237
|
-
*/
|
|
238
|
-
threatEntryType?: string | null;
|
|
239
|
-
/**
|
|
240
|
-
* The type of threat posed by entries present in the list.
|
|
241
|
-
*/
|
|
242
|
-
threatType?: string | null;
|
|
243
|
-
}
|
|
244
|
-
/**
|
|
245
|
-
* An update to an individual list.
|
|
246
|
-
*/
|
|
247
|
-
export interface Schema$ListUpdateResponse {
|
|
248
|
-
/**
|
|
249
|
-
* A set of entries to add to a local threat type's list. Repeated to allow for a combination of compressed and raw data to be sent in a single response.
|
|
250
|
-
*/
|
|
251
|
-
additions?: Schema$ThreatEntrySet[];
|
|
252
|
-
/**
|
|
253
|
-
* The expected SHA256 hash of the client state; that is, of the sorted list of all hashes present in the database after applying the provided update. If the client state doesn't match the expected state, the client must disregard this update and retry later.
|
|
254
|
-
*/
|
|
255
|
-
checksum?: Schema$Checksum;
|
|
256
|
-
/**
|
|
257
|
-
* The new client state, in encrypted format. Opaque to clients.
|
|
258
|
-
*/
|
|
259
|
-
newClientState?: string | null;
|
|
260
|
-
/**
|
|
261
|
-
* The platform type for which data is returned.
|
|
262
|
-
*/
|
|
263
|
-
platformType?: string | null;
|
|
264
|
-
/**
|
|
265
|
-
* A set of entries to remove from a local threat type's list. In practice, this field is empty or contains exactly one ThreatEntrySet.
|
|
266
|
-
*/
|
|
267
|
-
removals?: Schema$ThreatEntrySet[];
|
|
268
|
-
/**
|
|
269
|
-
* The type of response. This may indicate that an action is required by the client when the response is received.
|
|
270
|
-
*/
|
|
271
|
-
responseType?: string | null;
|
|
272
|
-
/**
|
|
273
|
-
* The format of the threats.
|
|
274
|
-
*/
|
|
275
|
-
threatEntryType?: string | null;
|
|
276
|
-
/**
|
|
277
|
-
* The threat type for which data is returned.
|
|
278
|
-
*/
|
|
279
|
-
threatType?: string | null;
|
|
280
|
-
}
|
|
281
|
-
/**
|
|
282
|
-
* A single metadata entry.
|
|
283
|
-
*/
|
|
284
|
-
export interface Schema$MetadataEntry {
|
|
285
|
-
/**
|
|
286
|
-
* The metadata entry key. For JSON requests, the key is base64-encoded.
|
|
287
|
-
*/
|
|
288
|
-
key?: string | null;
|
|
289
|
-
/**
|
|
290
|
-
* The metadata entry value. For JSON requests, the value is base64-encoded.
|
|
291
|
-
*/
|
|
292
|
-
value?: string | null;
|
|
279
|
+
threatLists?: Schema$GoogleSecuritySafebrowsingV4ThreatListDescriptor[];
|
|
293
280
|
}
|
|
294
281
|
/**
|
|
295
282
|
* The uncompressed threat entries in hash format of a particular prefix length. Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4 bytes, but some hashes are lengthened if they collide with the hash of a popular URL. Used for sending ThreatEntrySet to clients that do not support compression, or when sending non-4-byte hashes to clients that do support compression.
|
|
296
283
|
*/
|
|
297
|
-
export interface Schema$
|
|
284
|
+
export interface Schema$GoogleSecuritySafebrowsingV4RawHashes {
|
|
298
285
|
/**
|
|
299
286
|
* The number of bytes for each prefix encoded below. This field can be anywhere from 4 (shortest prefix) to 32 (full SHA256 hash).
|
|
300
287
|
*/
|
|
@@ -307,7 +294,7 @@ export declare namespace safebrowsing_v4 {
|
|
|
307
294
|
/**
|
|
308
295
|
* A set of raw indices to remove from a local list.
|
|
309
296
|
*/
|
|
310
|
-
export interface Schema$
|
|
297
|
+
export interface Schema$GoogleSecuritySafebrowsingV4RawIndices {
|
|
311
298
|
/**
|
|
312
299
|
* The indices to remove from a lexicographically-sorted local list.
|
|
313
300
|
*/
|
|
@@ -316,7 +303,7 @@ export declare namespace safebrowsing_v4 {
|
|
|
316
303
|
/**
|
|
317
304
|
* The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or compressed removal indices.
|
|
318
305
|
*/
|
|
319
|
-
export interface Schema$
|
|
306
|
+
export interface Schema$GoogleSecuritySafebrowsingV4RiceDeltaEncoding {
|
|
320
307
|
/**
|
|
321
308
|
* The encoded deltas that are encoded using the Golomb-Rice coder.
|
|
322
309
|
*/
|
|
@@ -337,7 +324,7 @@ export declare namespace safebrowsing_v4 {
|
|
|
337
324
|
/**
|
|
338
325
|
* An individual threat; for example, a malicious URL or its hash representation. Only one of these fields should be set.
|
|
339
326
|
*/
|
|
340
|
-
export interface Schema$
|
|
327
|
+
export interface Schema$GoogleSecuritySafebrowsingV4ThreatEntry {
|
|
341
328
|
/**
|
|
342
329
|
* The digest of an executable in SHA256 format. The API supports both binary and hex digests. For JSON requests, digests are base64-encoded.
|
|
343
330
|
*/
|
|
@@ -354,16 +341,29 @@ export declare namespace safebrowsing_v4 {
|
|
|
354
341
|
/**
|
|
355
342
|
* The metadata associated with a specific threat entry. The client is expected to know the metadata key/value pairs associated with each threat type.
|
|
356
343
|
*/
|
|
357
|
-
export interface Schema$
|
|
344
|
+
export interface Schema$GoogleSecuritySafebrowsingV4ThreatEntryMetadata {
|
|
358
345
|
/**
|
|
359
346
|
* The metadata entries.
|
|
360
347
|
*/
|
|
361
|
-
entries?: Schema$
|
|
348
|
+
entries?: Schema$GoogleSecuritySafebrowsingV4ThreatEntryMetadataMetadataEntry[];
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* A single metadata entry.
|
|
352
|
+
*/
|
|
353
|
+
export interface Schema$GoogleSecuritySafebrowsingV4ThreatEntryMetadataMetadataEntry {
|
|
354
|
+
/**
|
|
355
|
+
* The metadata entry key. For JSON requests, the key is base64-encoded.
|
|
356
|
+
*/
|
|
357
|
+
key?: string | null;
|
|
358
|
+
/**
|
|
359
|
+
* The metadata entry value. For JSON requests, the value is base64-encoded.
|
|
360
|
+
*/
|
|
361
|
+
value?: string | null;
|
|
362
362
|
}
|
|
363
363
|
/**
|
|
364
364
|
* A set of threats that should be added or removed from a client's local database.
|
|
365
365
|
*/
|
|
366
|
-
export interface Schema$
|
|
366
|
+
export interface Schema$GoogleSecuritySafebrowsingV4ThreatEntrySet {
|
|
367
367
|
/**
|
|
368
368
|
* The compression type for the entries in this set.
|
|
369
369
|
*/
|
|
@@ -371,29 +371,29 @@ export declare namespace safebrowsing_v4 {
|
|
|
371
371
|
/**
|
|
372
372
|
* The raw SHA256-formatted entries.
|
|
373
373
|
*/
|
|
374
|
-
rawHashes?: Schema$
|
|
374
|
+
rawHashes?: Schema$GoogleSecuritySafebrowsingV4RawHashes;
|
|
375
375
|
/**
|
|
376
376
|
* The raw removal indices for a local list.
|
|
377
377
|
*/
|
|
378
|
-
rawIndices?: Schema$
|
|
378
|
+
rawIndices?: Schema$GoogleSecuritySafebrowsingV4RawIndices;
|
|
379
379
|
/**
|
|
380
380
|
* The encoded 4-byte prefixes of SHA256-formatted entries, using a Golomb-Rice encoding. The hashes are converted to uint32, sorted in ascending order, then delta encoded and stored as encoded_data.
|
|
381
381
|
*/
|
|
382
|
-
riceHashes?: Schema$
|
|
382
|
+
riceHashes?: Schema$GoogleSecuritySafebrowsingV4RiceDeltaEncoding;
|
|
383
383
|
/**
|
|
384
384
|
* The encoded local, lexicographically-sorted list indices, using a Golomb-Rice encoding. Used for sending compressed removal indices. The removal indices (uint32) are sorted in ascending order, then delta encoded and stored as encoded_data.
|
|
385
385
|
*/
|
|
386
|
-
riceIndices?: Schema$
|
|
386
|
+
riceIndices?: Schema$GoogleSecuritySafebrowsingV4RiceDeltaEncoding;
|
|
387
387
|
}
|
|
388
|
-
export interface Schema$
|
|
388
|
+
export interface Schema$GoogleSecuritySafebrowsingV4ThreatHit {
|
|
389
389
|
/**
|
|
390
390
|
* Client-reported identification.
|
|
391
391
|
*/
|
|
392
|
-
clientInfo?: Schema$
|
|
392
|
+
clientInfo?: Schema$GoogleSecuritySafebrowsingV4ClientInfo;
|
|
393
393
|
/**
|
|
394
394
|
* The threat entry responsible for the hit. Full hash should be reported for hash-based hits.
|
|
395
395
|
*/
|
|
396
|
-
entry?: Schema$
|
|
396
|
+
entry?: Schema$GoogleSecuritySafebrowsingV4ThreatEntry;
|
|
397
397
|
/**
|
|
398
398
|
* The platform type reported.
|
|
399
399
|
*/
|
|
@@ -401,7 +401,7 @@ export declare namespace safebrowsing_v4 {
|
|
|
401
401
|
/**
|
|
402
402
|
* The resources related to the threat hit.
|
|
403
403
|
*/
|
|
404
|
-
resources?: Schema$
|
|
404
|
+
resources?: Schema$GoogleSecuritySafebrowsingV4ThreatHitThreatSource[];
|
|
405
405
|
/**
|
|
406
406
|
* The threat type reported.
|
|
407
407
|
*/
|
|
@@ -409,12 +409,46 @@ export declare namespace safebrowsing_v4 {
|
|
|
409
409
|
/**
|
|
410
410
|
* Details about the user that encountered the threat.
|
|
411
411
|
*/
|
|
412
|
-
userInfo?: Schema$
|
|
412
|
+
userInfo?: Schema$GoogleSecuritySafebrowsingV4ThreatHitUserInfo;
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* A single resource related to a threat hit.
|
|
416
|
+
*/
|
|
417
|
+
export interface Schema$GoogleSecuritySafebrowsingV4ThreatHitThreatSource {
|
|
418
|
+
/**
|
|
419
|
+
* Referrer of the resource. Only set if the referrer is available.
|
|
420
|
+
*/
|
|
421
|
+
referrer?: string | null;
|
|
422
|
+
/**
|
|
423
|
+
* The remote IP of the resource in ASCII format. Either IPv4 or IPv6.
|
|
424
|
+
*/
|
|
425
|
+
remoteIp?: string | null;
|
|
426
|
+
/**
|
|
427
|
+
* The type of source reported.
|
|
428
|
+
*/
|
|
429
|
+
type?: string | null;
|
|
430
|
+
/**
|
|
431
|
+
* The URL of the resource.
|
|
432
|
+
*/
|
|
433
|
+
url?: string | null;
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* Details about the user that encountered the threat.
|
|
437
|
+
*/
|
|
438
|
+
export interface Schema$GoogleSecuritySafebrowsingV4ThreatHitUserInfo {
|
|
439
|
+
/**
|
|
440
|
+
* The UN M.49 region code associated with the user's location.
|
|
441
|
+
*/
|
|
442
|
+
regionCode?: string | null;
|
|
443
|
+
/**
|
|
444
|
+
* Unique user identifier defined by the client.
|
|
445
|
+
*/
|
|
446
|
+
userId?: string | null;
|
|
413
447
|
}
|
|
414
448
|
/**
|
|
415
449
|
* The information regarding one or more threats that a client submits when checking for matches in threat lists.
|
|
416
450
|
*/
|
|
417
|
-
export interface Schema$
|
|
451
|
+
export interface Schema$GoogleSecuritySafebrowsingV4ThreatInfo {
|
|
418
452
|
/**
|
|
419
453
|
* The platform types to be checked.
|
|
420
454
|
*/
|
|
@@ -422,7 +456,7 @@ export declare namespace safebrowsing_v4 {
|
|
|
422
456
|
/**
|
|
423
457
|
* The threat entries to be checked.
|
|
424
458
|
*/
|
|
425
|
-
threatEntries?: Schema$
|
|
459
|
+
threatEntries?: Schema$GoogleSecuritySafebrowsingV4ThreatEntry[];
|
|
426
460
|
/**
|
|
427
461
|
* The entry types to be checked.
|
|
428
462
|
*/
|
|
@@ -435,7 +469,7 @@ export declare namespace safebrowsing_v4 {
|
|
|
435
469
|
/**
|
|
436
470
|
* Describes an individual threat list. A list is defined by three parameters: the type of threat posed, the type of platform targeted by the threat, and the type of entries in the list.
|
|
437
471
|
*/
|
|
438
|
-
export interface Schema$
|
|
472
|
+
export interface Schema$GoogleSecuritySafebrowsingV4ThreatListDescriptor {
|
|
439
473
|
/**
|
|
440
474
|
* The platform type targeted by the list's entries.
|
|
441
475
|
*/
|
|
@@ -452,7 +486,7 @@ export declare namespace safebrowsing_v4 {
|
|
|
452
486
|
/**
|
|
453
487
|
* A match when checking a threat entry in the Safe Browsing threat lists.
|
|
454
488
|
*/
|
|
455
|
-
export interface Schema$
|
|
489
|
+
export interface Schema$GoogleSecuritySafebrowsingV4ThreatMatch {
|
|
456
490
|
/**
|
|
457
491
|
* The cache lifetime for the returned match. Clients must not cache this response for more than this duration to avoid false positives.
|
|
458
492
|
*/
|
|
@@ -464,11 +498,11 @@ export declare namespace safebrowsing_v4 {
|
|
|
464
498
|
/**
|
|
465
499
|
* The threat matching this threat.
|
|
466
500
|
*/
|
|
467
|
-
threat?: Schema$
|
|
501
|
+
threat?: Schema$GoogleSecuritySafebrowsingV4ThreatEntry;
|
|
468
502
|
/**
|
|
469
503
|
* Optional metadata associated with this threat.
|
|
470
504
|
*/
|
|
471
|
-
threatEntryMetadata?: Schema$
|
|
505
|
+
threatEntryMetadata?: Schema$GoogleSecuritySafebrowsingV4ThreatEntryMetadata;
|
|
472
506
|
/**
|
|
473
507
|
* The threat entry type matching this threat.
|
|
474
508
|
*/
|
|
@@ -478,92 +512,10 @@ export declare namespace safebrowsing_v4 {
|
|
|
478
512
|
*/
|
|
479
513
|
threatType?: string | null;
|
|
480
514
|
}
|
|
481
|
-
/**
|
|
482
|
-
* A single resource related to a threat hit.
|
|
483
|
-
*/
|
|
484
|
-
export interface Schema$ThreatSource {
|
|
485
|
-
/**
|
|
486
|
-
* Referrer of the resource. Only set if the referrer is available.
|
|
487
|
-
*/
|
|
488
|
-
referrer?: string | null;
|
|
489
|
-
/**
|
|
490
|
-
* The remote IP of the resource in ASCII format. Either IPv4 or IPv6.
|
|
491
|
-
*/
|
|
492
|
-
remoteIp?: string | null;
|
|
493
|
-
/**
|
|
494
|
-
* The type of source reported.
|
|
495
|
-
*/
|
|
496
|
-
type?: string | null;
|
|
497
|
-
/**
|
|
498
|
-
* The URL of the resource.
|
|
499
|
-
*/
|
|
500
|
-
url?: string | null;
|
|
501
|
-
}
|
|
502
|
-
/**
|
|
503
|
-
* Details about the user that encountered the threat.
|
|
504
|
-
*/
|
|
505
|
-
export interface Schema$UserInfo {
|
|
506
|
-
/**
|
|
507
|
-
* The UN M.49 region code associated with the user's location.
|
|
508
|
-
*/
|
|
509
|
-
regionCode?: string | null;
|
|
510
|
-
/**
|
|
511
|
-
* Unique user identifier defined by the client.
|
|
512
|
-
*/
|
|
513
|
-
userId?: string | null;
|
|
514
|
-
}
|
|
515
515
|
export class Resource$Encodedfullhashes {
|
|
516
516
|
context: APIRequestContext;
|
|
517
517
|
constructor(context: APIRequestContext);
|
|
518
518
|
/**
|
|
519
|
-
* @example
|
|
520
|
-
* ```js
|
|
521
|
-
* // Before running the sample:
|
|
522
|
-
* // - Enable the API at:
|
|
523
|
-
* // https://console.developers.google.com/apis/api/safebrowsing.googleapis.com
|
|
524
|
-
* // - Login into gcloud by running:
|
|
525
|
-
* // `$ gcloud auth application-default login`
|
|
526
|
-
* // - Install the npm module by running:
|
|
527
|
-
* // `$ npm install googleapis`
|
|
528
|
-
*
|
|
529
|
-
* const {google} = require('googleapis');
|
|
530
|
-
* const safebrowsing = google.safebrowsing('v4');
|
|
531
|
-
*
|
|
532
|
-
* async function main() {
|
|
533
|
-
* const auth = new google.auth.GoogleAuth({
|
|
534
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
535
|
-
* scopes: [],
|
|
536
|
-
* });
|
|
537
|
-
*
|
|
538
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
539
|
-
* const authClient = await auth.getClient();
|
|
540
|
-
* google.options({auth: authClient});
|
|
541
|
-
*
|
|
542
|
-
* // Do the magic
|
|
543
|
-
* const res = await safebrowsing.encodedFullHashes.get({
|
|
544
|
-
* // A client ID that (hopefully) uniquely identifies the client implementation of the Safe Browsing API.
|
|
545
|
-
* clientId: 'placeholder-value',
|
|
546
|
-
* // The version of the client implementation.
|
|
547
|
-
* clientVersion: 'placeholder-value',
|
|
548
|
-
* // A serialized FindFullHashesRequest proto.
|
|
549
|
-
* encodedRequest: 'placeholder-value',
|
|
550
|
-
* });
|
|
551
|
-
* console.log(res.data);
|
|
552
|
-
*
|
|
553
|
-
* // Example response
|
|
554
|
-
* // {
|
|
555
|
-
* // "matches": [],
|
|
556
|
-
* // "minimumWaitDuration": "my_minimumWaitDuration",
|
|
557
|
-
* // "negativeCacheDuration": "my_negativeCacheDuration"
|
|
558
|
-
* // }
|
|
559
|
-
* }
|
|
560
|
-
*
|
|
561
|
-
* main().catch(e => {
|
|
562
|
-
* console.error(e);
|
|
563
|
-
* throw e;
|
|
564
|
-
* });
|
|
565
|
-
*
|
|
566
|
-
* ```
|
|
567
519
|
*
|
|
568
520
|
* @param params - Parameters for request
|
|
569
521
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -571,11 +523,11 @@ export declare namespace safebrowsing_v4 {
|
|
|
571
523
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
572
524
|
*/
|
|
573
525
|
get(params: Params$Resource$Encodedfullhashes$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
|
|
574
|
-
get(params?: Params$Resource$Encodedfullhashes$Get, options?: MethodOptions): GaxiosPromise<Schema$
|
|
526
|
+
get(params?: Params$Resource$Encodedfullhashes$Get, options?: MethodOptions): GaxiosPromise<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>;
|
|
575
527
|
get(params: Params$Resource$Encodedfullhashes$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
576
|
-
get(params: Params$Resource$Encodedfullhashes$Get, options: MethodOptions | BodyResponseCallback<Schema$
|
|
577
|
-
get(params: Params$Resource$Encodedfullhashes$Get, callback: BodyResponseCallback<Schema$
|
|
578
|
-
get(callback: BodyResponseCallback<Schema$
|
|
528
|
+
get(params: Params$Resource$Encodedfullhashes$Get, options: MethodOptions | BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>, callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>): void;
|
|
529
|
+
get(params: Params$Resource$Encodedfullhashes$Get, callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>): void;
|
|
530
|
+
get(callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>): void;
|
|
579
531
|
}
|
|
580
532
|
export interface Params$Resource$Encodedfullhashes$Get extends StandardParameters {
|
|
581
533
|
/**
|
|
@@ -595,53 +547,6 @@ export declare namespace safebrowsing_v4 {
|
|
|
595
547
|
context: APIRequestContext;
|
|
596
548
|
constructor(context: APIRequestContext);
|
|
597
549
|
/**
|
|
598
|
-
* @example
|
|
599
|
-
* ```js
|
|
600
|
-
* // Before running the sample:
|
|
601
|
-
* // - Enable the API at:
|
|
602
|
-
* // https://console.developers.google.com/apis/api/safebrowsing.googleapis.com
|
|
603
|
-
* // - Login into gcloud by running:
|
|
604
|
-
* // `$ gcloud auth application-default login`
|
|
605
|
-
* // - Install the npm module by running:
|
|
606
|
-
* // `$ npm install googleapis`
|
|
607
|
-
*
|
|
608
|
-
* const {google} = require('googleapis');
|
|
609
|
-
* const safebrowsing = google.safebrowsing('v4');
|
|
610
|
-
*
|
|
611
|
-
* async function main() {
|
|
612
|
-
* const auth = new google.auth.GoogleAuth({
|
|
613
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
614
|
-
* scopes: [],
|
|
615
|
-
* });
|
|
616
|
-
*
|
|
617
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
618
|
-
* const authClient = await auth.getClient();
|
|
619
|
-
* google.options({auth: authClient});
|
|
620
|
-
*
|
|
621
|
-
* // Do the magic
|
|
622
|
-
* const res = await safebrowsing.encodedUpdates.get({
|
|
623
|
-
* // A client ID that uniquely identifies the client implementation of the Safe Browsing API.
|
|
624
|
-
* clientId: 'placeholder-value',
|
|
625
|
-
* // The version of the client implementation.
|
|
626
|
-
* clientVersion: 'placeholder-value',
|
|
627
|
-
* // A serialized FetchThreatListUpdatesRequest proto.
|
|
628
|
-
* encodedRequest: 'placeholder-value',
|
|
629
|
-
* });
|
|
630
|
-
* console.log(res.data);
|
|
631
|
-
*
|
|
632
|
-
* // Example response
|
|
633
|
-
* // {
|
|
634
|
-
* // "listUpdateResponses": [],
|
|
635
|
-
* // "minimumWaitDuration": "my_minimumWaitDuration"
|
|
636
|
-
* // }
|
|
637
|
-
* }
|
|
638
|
-
*
|
|
639
|
-
* main().catch(e => {
|
|
640
|
-
* console.error(e);
|
|
641
|
-
* throw e;
|
|
642
|
-
* });
|
|
643
|
-
*
|
|
644
|
-
* ```
|
|
645
550
|
*
|
|
646
551
|
* @param params - Parameters for request
|
|
647
552
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -649,11 +554,11 @@ export declare namespace safebrowsing_v4 {
|
|
|
649
554
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
650
555
|
*/
|
|
651
556
|
get(params: Params$Resource$Encodedupdates$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
|
|
652
|
-
get(params?: Params$Resource$Encodedupdates$Get, options?: MethodOptions): GaxiosPromise<Schema$
|
|
557
|
+
get(params?: Params$Resource$Encodedupdates$Get, options?: MethodOptions): GaxiosPromise<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>;
|
|
653
558
|
get(params: Params$Resource$Encodedupdates$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
654
|
-
get(params: Params$Resource$Encodedupdates$Get, options: MethodOptions | BodyResponseCallback<Schema$
|
|
655
|
-
get(params: Params$Resource$Encodedupdates$Get, callback: BodyResponseCallback<Schema$
|
|
656
|
-
get(callback: BodyResponseCallback<Schema$
|
|
559
|
+
get(params: Params$Resource$Encodedupdates$Get, options: MethodOptions | BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>, callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>): void;
|
|
560
|
+
get(params: Params$Resource$Encodedupdates$Get, callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>): void;
|
|
561
|
+
get(callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>): void;
|
|
657
562
|
}
|
|
658
563
|
export interface Params$Resource$Encodedupdates$Get extends StandardParameters {
|
|
659
564
|
/**
|
|
@@ -674,58 +579,6 @@ export declare namespace safebrowsing_v4 {
|
|
|
674
579
|
constructor(context: APIRequestContext);
|
|
675
580
|
/**
|
|
676
581
|
* Finds the full hashes that match the requested hash prefixes.
|
|
677
|
-
* @example
|
|
678
|
-
* ```js
|
|
679
|
-
* // Before running the sample:
|
|
680
|
-
* // - Enable the API at:
|
|
681
|
-
* // https://console.developers.google.com/apis/api/safebrowsing.googleapis.com
|
|
682
|
-
* // - Login into gcloud by running:
|
|
683
|
-
* // `$ gcloud auth application-default login`
|
|
684
|
-
* // - Install the npm module by running:
|
|
685
|
-
* // `$ npm install googleapis`
|
|
686
|
-
*
|
|
687
|
-
* const {google} = require('googleapis');
|
|
688
|
-
* const safebrowsing = google.safebrowsing('v4');
|
|
689
|
-
*
|
|
690
|
-
* async function main() {
|
|
691
|
-
* const auth = new google.auth.GoogleAuth({
|
|
692
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
693
|
-
* scopes: [],
|
|
694
|
-
* });
|
|
695
|
-
*
|
|
696
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
697
|
-
* const authClient = await auth.getClient();
|
|
698
|
-
* google.options({auth: authClient});
|
|
699
|
-
*
|
|
700
|
-
* // Do the magic
|
|
701
|
-
* const res = await safebrowsing.fullHashes.find({
|
|
702
|
-
* // Request body metadata
|
|
703
|
-
* requestBody: {
|
|
704
|
-
* // request body parameters
|
|
705
|
-
* // {
|
|
706
|
-
* // "apiClient": {},
|
|
707
|
-
* // "client": {},
|
|
708
|
-
* // "clientStates": [],
|
|
709
|
-
* // "threatInfo": {}
|
|
710
|
-
* // }
|
|
711
|
-
* },
|
|
712
|
-
* });
|
|
713
|
-
* console.log(res.data);
|
|
714
|
-
*
|
|
715
|
-
* // Example response
|
|
716
|
-
* // {
|
|
717
|
-
* // "matches": [],
|
|
718
|
-
* // "minimumWaitDuration": "my_minimumWaitDuration",
|
|
719
|
-
* // "negativeCacheDuration": "my_negativeCacheDuration"
|
|
720
|
-
* // }
|
|
721
|
-
* }
|
|
722
|
-
*
|
|
723
|
-
* main().catch(e => {
|
|
724
|
-
* console.error(e);
|
|
725
|
-
* throw e;
|
|
726
|
-
* });
|
|
727
|
-
*
|
|
728
|
-
* ```
|
|
729
582
|
*
|
|
730
583
|
* @param params - Parameters for request
|
|
731
584
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -733,73 +586,23 @@ export declare namespace safebrowsing_v4 {
|
|
|
733
586
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
734
587
|
*/
|
|
735
588
|
find(params: Params$Resource$Fullhashes$Find, options: StreamMethodOptions): GaxiosPromise<Readable>;
|
|
736
|
-
find(params?: Params$Resource$Fullhashes$Find, options?: MethodOptions): GaxiosPromise<Schema$
|
|
589
|
+
find(params?: Params$Resource$Fullhashes$Find, options?: MethodOptions): GaxiosPromise<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>;
|
|
737
590
|
find(params: Params$Resource$Fullhashes$Find, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
738
|
-
find(params: Params$Resource$Fullhashes$Find, options: MethodOptions | BodyResponseCallback<Schema$
|
|
739
|
-
find(params: Params$Resource$Fullhashes$Find, callback: BodyResponseCallback<Schema$
|
|
740
|
-
find(callback: BodyResponseCallback<Schema$
|
|
591
|
+
find(params: Params$Resource$Fullhashes$Find, options: MethodOptions | BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>, callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>): void;
|
|
592
|
+
find(params: Params$Resource$Fullhashes$Find, callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>): void;
|
|
593
|
+
find(callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>): void;
|
|
741
594
|
}
|
|
742
595
|
export interface Params$Resource$Fullhashes$Find extends StandardParameters {
|
|
743
596
|
/**
|
|
744
597
|
* Request body metadata
|
|
745
598
|
*/
|
|
746
|
-
requestBody?: Schema$
|
|
599
|
+
requestBody?: Schema$GoogleSecuritySafebrowsingV4FindFullHashesRequest;
|
|
747
600
|
}
|
|
748
601
|
export class Resource$Threathits {
|
|
749
602
|
context: APIRequestContext;
|
|
750
603
|
constructor(context: APIRequestContext);
|
|
751
604
|
/**
|
|
752
605
|
* Reports a Safe Browsing threat list hit to Google. Only projects with TRUSTED_REPORTER visibility can use this method.
|
|
753
|
-
* @example
|
|
754
|
-
* ```js
|
|
755
|
-
* // Before running the sample:
|
|
756
|
-
* // - Enable the API at:
|
|
757
|
-
* // https://console.developers.google.com/apis/api/safebrowsing.googleapis.com
|
|
758
|
-
* // - Login into gcloud by running:
|
|
759
|
-
* // `$ gcloud auth application-default login`
|
|
760
|
-
* // - Install the npm module by running:
|
|
761
|
-
* // `$ npm install googleapis`
|
|
762
|
-
*
|
|
763
|
-
* const {google} = require('googleapis');
|
|
764
|
-
* const safebrowsing = google.safebrowsing('v4');
|
|
765
|
-
*
|
|
766
|
-
* async function main() {
|
|
767
|
-
* const auth = new google.auth.GoogleAuth({
|
|
768
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
769
|
-
* scopes: [],
|
|
770
|
-
* });
|
|
771
|
-
*
|
|
772
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
773
|
-
* const authClient = await auth.getClient();
|
|
774
|
-
* google.options({auth: authClient});
|
|
775
|
-
*
|
|
776
|
-
* // Do the magic
|
|
777
|
-
* const res = await safebrowsing.threatHits.create({
|
|
778
|
-
* // Request body metadata
|
|
779
|
-
* requestBody: {
|
|
780
|
-
* // request body parameters
|
|
781
|
-
* // {
|
|
782
|
-
* // "clientInfo": {},
|
|
783
|
-
* // "entry": {},
|
|
784
|
-
* // "platformType": "my_platformType",
|
|
785
|
-
* // "resources": [],
|
|
786
|
-
* // "threatType": "my_threatType",
|
|
787
|
-
* // "userInfo": {}
|
|
788
|
-
* // }
|
|
789
|
-
* },
|
|
790
|
-
* });
|
|
791
|
-
* console.log(res.data);
|
|
792
|
-
*
|
|
793
|
-
* // Example response
|
|
794
|
-
* // {}
|
|
795
|
-
* }
|
|
796
|
-
*
|
|
797
|
-
* main().catch(e => {
|
|
798
|
-
* console.error(e);
|
|
799
|
-
* throw e;
|
|
800
|
-
* });
|
|
801
|
-
*
|
|
802
|
-
* ```
|
|
803
606
|
*
|
|
804
607
|
* @param params - Parameters for request
|
|
805
608
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -807,62 +610,23 @@ export declare namespace safebrowsing_v4 {
|
|
|
807
610
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
808
611
|
*/
|
|
809
612
|
create(params: Params$Resource$Threathits$Create, options: StreamMethodOptions): GaxiosPromise<Readable>;
|
|
810
|
-
create(params?: Params$Resource$Threathits$Create, options?: MethodOptions): GaxiosPromise<Schema$
|
|
613
|
+
create(params?: Params$Resource$Threathits$Create, options?: MethodOptions): GaxiosPromise<Schema$GoogleProtobufEmpty>;
|
|
811
614
|
create(params: Params$Resource$Threathits$Create, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
812
|
-
create(params: Params$Resource$Threathits$Create, options: MethodOptions | BodyResponseCallback<Schema$
|
|
813
|
-
create(params: Params$Resource$Threathits$Create, callback: BodyResponseCallback<Schema$
|
|
814
|
-
create(callback: BodyResponseCallback<Schema$
|
|
615
|
+
create(params: Params$Resource$Threathits$Create, options: MethodOptions | BodyResponseCallback<Schema$GoogleProtobufEmpty>, callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>): void;
|
|
616
|
+
create(params: Params$Resource$Threathits$Create, callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>): void;
|
|
617
|
+
create(callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>): void;
|
|
815
618
|
}
|
|
816
619
|
export interface Params$Resource$Threathits$Create extends StandardParameters {
|
|
817
620
|
/**
|
|
818
621
|
* Request body metadata
|
|
819
622
|
*/
|
|
820
|
-
requestBody?: Schema$
|
|
623
|
+
requestBody?: Schema$GoogleSecuritySafebrowsingV4ThreatHit;
|
|
821
624
|
}
|
|
822
625
|
export class Resource$Threatlists {
|
|
823
626
|
context: APIRequestContext;
|
|
824
627
|
constructor(context: APIRequestContext);
|
|
825
628
|
/**
|
|
826
629
|
* Lists the Safe Browsing threat lists available for download.
|
|
827
|
-
* @example
|
|
828
|
-
* ```js
|
|
829
|
-
* // Before running the sample:
|
|
830
|
-
* // - Enable the API at:
|
|
831
|
-
* // https://console.developers.google.com/apis/api/safebrowsing.googleapis.com
|
|
832
|
-
* // - Login into gcloud by running:
|
|
833
|
-
* // `$ gcloud auth application-default login`
|
|
834
|
-
* // - Install the npm module by running:
|
|
835
|
-
* // `$ npm install googleapis`
|
|
836
|
-
*
|
|
837
|
-
* const {google} = require('googleapis');
|
|
838
|
-
* const safebrowsing = google.safebrowsing('v4');
|
|
839
|
-
*
|
|
840
|
-
* async function main() {
|
|
841
|
-
* const auth = new google.auth.GoogleAuth({
|
|
842
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
843
|
-
* scopes: [],
|
|
844
|
-
* });
|
|
845
|
-
*
|
|
846
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
847
|
-
* const authClient = await auth.getClient();
|
|
848
|
-
* google.options({auth: authClient});
|
|
849
|
-
*
|
|
850
|
-
* // Do the magic
|
|
851
|
-
* const res = await safebrowsing.threatLists.list({});
|
|
852
|
-
* console.log(res.data);
|
|
853
|
-
*
|
|
854
|
-
* // Example response
|
|
855
|
-
* // {
|
|
856
|
-
* // "threatLists": []
|
|
857
|
-
* // }
|
|
858
|
-
* }
|
|
859
|
-
*
|
|
860
|
-
* main().catch(e => {
|
|
861
|
-
* console.error(e);
|
|
862
|
-
* throw e;
|
|
863
|
-
* });
|
|
864
|
-
*
|
|
865
|
-
* ```
|
|
866
630
|
*
|
|
867
631
|
* @param params - Parameters for request
|
|
868
632
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -870,11 +634,11 @@ export declare namespace safebrowsing_v4 {
|
|
|
870
634
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
871
635
|
*/
|
|
872
636
|
list(params: Params$Resource$Threatlists$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
|
|
873
|
-
list(params?: Params$Resource$Threatlists$List, options?: MethodOptions): GaxiosPromise<Schema$
|
|
637
|
+
list(params?: Params$Resource$Threatlists$List, options?: MethodOptions): GaxiosPromise<Schema$GoogleSecuritySafebrowsingV4ListThreatListsResponse>;
|
|
874
638
|
list(params: Params$Resource$Threatlists$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
875
|
-
list(params: Params$Resource$Threatlists$List, options: MethodOptions | BodyResponseCallback<Schema$
|
|
876
|
-
list(params: Params$Resource$Threatlists$List, callback: BodyResponseCallback<Schema$
|
|
877
|
-
list(callback: BodyResponseCallback<Schema$
|
|
639
|
+
list(params: Params$Resource$Threatlists$List, options: MethodOptions | BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4ListThreatListsResponse>, callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4ListThreatListsResponse>): void;
|
|
640
|
+
list(params: Params$Resource$Threatlists$List, callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4ListThreatListsResponse>): void;
|
|
641
|
+
list(callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4ListThreatListsResponse>): void;
|
|
878
642
|
}
|
|
879
643
|
export interface Params$Resource$Threatlists$List extends StandardParameters {
|
|
880
644
|
}
|
|
@@ -883,55 +647,6 @@ export declare namespace safebrowsing_v4 {
|
|
|
883
647
|
constructor(context: APIRequestContext);
|
|
884
648
|
/**
|
|
885
649
|
* Fetches the most recent threat list updates. A client can request updates for multiple lists at once.
|
|
886
|
-
* @example
|
|
887
|
-
* ```js
|
|
888
|
-
* // Before running the sample:
|
|
889
|
-
* // - Enable the API at:
|
|
890
|
-
* // https://console.developers.google.com/apis/api/safebrowsing.googleapis.com
|
|
891
|
-
* // - Login into gcloud by running:
|
|
892
|
-
* // `$ gcloud auth application-default login`
|
|
893
|
-
* // - Install the npm module by running:
|
|
894
|
-
* // `$ npm install googleapis`
|
|
895
|
-
*
|
|
896
|
-
* const {google} = require('googleapis');
|
|
897
|
-
* const safebrowsing = google.safebrowsing('v4');
|
|
898
|
-
*
|
|
899
|
-
* async function main() {
|
|
900
|
-
* const auth = new google.auth.GoogleAuth({
|
|
901
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
902
|
-
* scopes: [],
|
|
903
|
-
* });
|
|
904
|
-
*
|
|
905
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
906
|
-
* const authClient = await auth.getClient();
|
|
907
|
-
* google.options({auth: authClient});
|
|
908
|
-
*
|
|
909
|
-
* // Do the magic
|
|
910
|
-
* const res = await safebrowsing.threatListUpdates.fetch({
|
|
911
|
-
* // Request body metadata
|
|
912
|
-
* requestBody: {
|
|
913
|
-
* // request body parameters
|
|
914
|
-
* // {
|
|
915
|
-
* // "client": {},
|
|
916
|
-
* // "listUpdateRequests": []
|
|
917
|
-
* // }
|
|
918
|
-
* },
|
|
919
|
-
* });
|
|
920
|
-
* console.log(res.data);
|
|
921
|
-
*
|
|
922
|
-
* // Example response
|
|
923
|
-
* // {
|
|
924
|
-
* // "listUpdateResponses": [],
|
|
925
|
-
* // "minimumWaitDuration": "my_minimumWaitDuration"
|
|
926
|
-
* // }
|
|
927
|
-
* }
|
|
928
|
-
*
|
|
929
|
-
* main().catch(e => {
|
|
930
|
-
* console.error(e);
|
|
931
|
-
* throw e;
|
|
932
|
-
* });
|
|
933
|
-
*
|
|
934
|
-
* ```
|
|
935
650
|
*
|
|
936
651
|
* @param params - Parameters for request
|
|
937
652
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -939,71 +654,23 @@ export declare namespace safebrowsing_v4 {
|
|
|
939
654
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
940
655
|
*/
|
|
941
656
|
fetch(params: Params$Resource$Threatlistupdates$Fetch, options: StreamMethodOptions): GaxiosPromise<Readable>;
|
|
942
|
-
fetch(params?: Params$Resource$Threatlistupdates$Fetch, options?: MethodOptions): GaxiosPromise<Schema$
|
|
657
|
+
fetch(params?: Params$Resource$Threatlistupdates$Fetch, options?: MethodOptions): GaxiosPromise<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>;
|
|
943
658
|
fetch(params: Params$Resource$Threatlistupdates$Fetch, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
944
|
-
fetch(params: Params$Resource$Threatlistupdates$Fetch, options: MethodOptions | BodyResponseCallback<Schema$
|
|
945
|
-
fetch(params: Params$Resource$Threatlistupdates$Fetch, callback: BodyResponseCallback<Schema$
|
|
946
|
-
fetch(callback: BodyResponseCallback<Schema$
|
|
659
|
+
fetch(params: Params$Resource$Threatlistupdates$Fetch, options: MethodOptions | BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>, callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>): void;
|
|
660
|
+
fetch(params: Params$Resource$Threatlistupdates$Fetch, callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>): void;
|
|
661
|
+
fetch(callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>): void;
|
|
947
662
|
}
|
|
948
663
|
export interface Params$Resource$Threatlistupdates$Fetch extends StandardParameters {
|
|
949
664
|
/**
|
|
950
665
|
* Request body metadata
|
|
951
666
|
*/
|
|
952
|
-
requestBody?: Schema$
|
|
667
|
+
requestBody?: Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequest;
|
|
953
668
|
}
|
|
954
669
|
export class Resource$Threatmatches {
|
|
955
670
|
context: APIRequestContext;
|
|
956
671
|
constructor(context: APIRequestContext);
|
|
957
672
|
/**
|
|
958
673
|
* Finds the threat entries that match the Safe Browsing lists.
|
|
959
|
-
* @example
|
|
960
|
-
* ```js
|
|
961
|
-
* // Before running the sample:
|
|
962
|
-
* // - Enable the API at:
|
|
963
|
-
* // https://console.developers.google.com/apis/api/safebrowsing.googleapis.com
|
|
964
|
-
* // - Login into gcloud by running:
|
|
965
|
-
* // `$ gcloud auth application-default login`
|
|
966
|
-
* // - Install the npm module by running:
|
|
967
|
-
* // `$ npm install googleapis`
|
|
968
|
-
*
|
|
969
|
-
* const {google} = require('googleapis');
|
|
970
|
-
* const safebrowsing = google.safebrowsing('v4');
|
|
971
|
-
*
|
|
972
|
-
* async function main() {
|
|
973
|
-
* const auth = new google.auth.GoogleAuth({
|
|
974
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
975
|
-
* scopes: [],
|
|
976
|
-
* });
|
|
977
|
-
*
|
|
978
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
979
|
-
* const authClient = await auth.getClient();
|
|
980
|
-
* google.options({auth: authClient});
|
|
981
|
-
*
|
|
982
|
-
* // Do the magic
|
|
983
|
-
* const res = await safebrowsing.threatMatches.find({
|
|
984
|
-
* // Request body metadata
|
|
985
|
-
* requestBody: {
|
|
986
|
-
* // request body parameters
|
|
987
|
-
* // {
|
|
988
|
-
* // "client": {},
|
|
989
|
-
* // "threatInfo": {}
|
|
990
|
-
* // }
|
|
991
|
-
* },
|
|
992
|
-
* });
|
|
993
|
-
* console.log(res.data);
|
|
994
|
-
*
|
|
995
|
-
* // Example response
|
|
996
|
-
* // {
|
|
997
|
-
* // "matches": []
|
|
998
|
-
* // }
|
|
999
|
-
* }
|
|
1000
|
-
*
|
|
1001
|
-
* main().catch(e => {
|
|
1002
|
-
* console.error(e);
|
|
1003
|
-
* throw e;
|
|
1004
|
-
* });
|
|
1005
|
-
*
|
|
1006
|
-
* ```
|
|
1007
674
|
*
|
|
1008
675
|
* @param params - Parameters for request
|
|
1009
676
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1011,17 +678,17 @@ export declare namespace safebrowsing_v4 {
|
|
|
1011
678
|
* @returns A promise if used with async/await, or void if used with a callback.
|
|
1012
679
|
*/
|
|
1013
680
|
find(params: Params$Resource$Threatmatches$Find, options: StreamMethodOptions): GaxiosPromise<Readable>;
|
|
1014
|
-
find(params?: Params$Resource$Threatmatches$Find, options?: MethodOptions): GaxiosPromise<Schema$
|
|
681
|
+
find(params?: Params$Resource$Threatmatches$Find, options?: MethodOptions): GaxiosPromise<Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesResponse>;
|
|
1015
682
|
find(params: Params$Resource$Threatmatches$Find, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
1016
|
-
find(params: Params$Resource$Threatmatches$Find, options: MethodOptions | BodyResponseCallback<Schema$
|
|
1017
|
-
find(params: Params$Resource$Threatmatches$Find, callback: BodyResponseCallback<Schema$
|
|
1018
|
-
find(callback: BodyResponseCallback<Schema$
|
|
683
|
+
find(params: Params$Resource$Threatmatches$Find, options: MethodOptions | BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesResponse>, callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesResponse>): void;
|
|
684
|
+
find(params: Params$Resource$Threatmatches$Find, callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesResponse>): void;
|
|
685
|
+
find(callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesResponse>): void;
|
|
1019
686
|
}
|
|
1020
687
|
export interface Params$Resource$Threatmatches$Find extends StandardParameters {
|
|
1021
688
|
/**
|
|
1022
689
|
* Request body metadata
|
|
1023
690
|
*/
|
|
1024
|
-
requestBody?: Schema$
|
|
691
|
+
requestBody?: Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesRequest;
|
|
1025
692
|
}
|
|
1026
693
|
export {};
|
|
1027
694
|
}
|