@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/v4.ts
CHANGED
|
@@ -136,10 +136,14 @@ export namespace safebrowsing_v4 {
|
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
+
/**
|
|
140
|
+
* 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); \}
|
|
141
|
+
*/
|
|
142
|
+
export interface Schema$GoogleProtobufEmpty {}
|
|
139
143
|
/**
|
|
140
144
|
* The expected state of a client's local database.
|
|
141
145
|
*/
|
|
142
|
-
export interface Schema$
|
|
146
|
+
export interface Schema$GoogleSecuritySafebrowsingV4Checksum {
|
|
143
147
|
/**
|
|
144
148
|
* The SHA256 hash of the client state; that is, of the sorted list of all hashes present in the database.
|
|
145
149
|
*/
|
|
@@ -148,7 +152,7 @@ export namespace safebrowsing_v4 {
|
|
|
148
152
|
/**
|
|
149
153
|
* The client metadata associated with Safe Browsing API requests.
|
|
150
154
|
*/
|
|
151
|
-
export interface Schema$
|
|
155
|
+
export interface Schema$GoogleSecuritySafebrowsingV4ClientInfo {
|
|
152
156
|
/**
|
|
153
157
|
* A client ID that (hopefully) uniquely identifies the client implementation of the Safe Browsing API.
|
|
154
158
|
*/
|
|
@@ -158,10 +162,48 @@ export namespace safebrowsing_v4 {
|
|
|
158
162
|
*/
|
|
159
163
|
clientVersion?: string | null;
|
|
160
164
|
}
|
|
165
|
+
/**
|
|
166
|
+
* 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
|
|
167
|
+
*/
|
|
168
|
+
export interface Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequest {
|
|
169
|
+
/**
|
|
170
|
+
* The client metadata.
|
|
171
|
+
*/
|
|
172
|
+
client?: Schema$GoogleSecuritySafebrowsingV4ClientInfo;
|
|
173
|
+
/**
|
|
174
|
+
* The requested threat list updates.
|
|
175
|
+
*/
|
|
176
|
+
listUpdateRequests?: Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequest[];
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* A single list update request.
|
|
180
|
+
*/
|
|
181
|
+
export interface Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequest {
|
|
182
|
+
/**
|
|
183
|
+
* The constraints associated with this request.
|
|
184
|
+
*/
|
|
185
|
+
constraints?: Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestConstraints;
|
|
186
|
+
/**
|
|
187
|
+
* The type of platform at risk by entries present in the list.
|
|
188
|
+
*/
|
|
189
|
+
platformType?: string | null;
|
|
190
|
+
/**
|
|
191
|
+
* The current state of the client for the requested list (the encrypted client state that was received from the last successful list update).
|
|
192
|
+
*/
|
|
193
|
+
state?: string | null;
|
|
194
|
+
/**
|
|
195
|
+
* The types of entries present in the list.
|
|
196
|
+
*/
|
|
197
|
+
threatEntryType?: string | null;
|
|
198
|
+
/**
|
|
199
|
+
* The type of threat posed by entries present in the list.
|
|
200
|
+
*/
|
|
201
|
+
threatType?: string | null;
|
|
202
|
+
}
|
|
161
203
|
/**
|
|
162
204
|
* The constraints for this update.
|
|
163
205
|
*/
|
|
164
|
-
export interface Schema$
|
|
206
|
+
export interface Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestConstraints {
|
|
165
207
|
/**
|
|
166
208
|
* A client's physical location, expressed as a ISO 31166-1 alpha-2 region code.
|
|
167
209
|
*/
|
|
@@ -187,45 +229,65 @@ export namespace safebrowsing_v4 {
|
|
|
187
229
|
*/
|
|
188
230
|
supportedCompressions?: string[] | null;
|
|
189
231
|
}
|
|
232
|
+
export interface Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse {
|
|
233
|
+
/**
|
|
234
|
+
* 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.
|
|
235
|
+
*/
|
|
236
|
+
listUpdateResponses?: Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponseListUpdateResponse[];
|
|
237
|
+
/**
|
|
238
|
+
* 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.
|
|
239
|
+
*/
|
|
240
|
+
minimumWaitDuration?: string | null;
|
|
241
|
+
}
|
|
190
242
|
/**
|
|
191
|
-
*
|
|
192
|
-
*/
|
|
193
|
-
export interface Schema$Empty {}
|
|
194
|
-
/**
|
|
195
|
-
* 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
|
|
243
|
+
* An update to an individual list.
|
|
196
244
|
*/
|
|
197
|
-
export interface Schema$
|
|
245
|
+
export interface Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponseListUpdateResponse {
|
|
198
246
|
/**
|
|
199
|
-
*
|
|
247
|
+
* 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.
|
|
200
248
|
*/
|
|
201
|
-
|
|
249
|
+
additions?: Schema$GoogleSecuritySafebrowsingV4ThreatEntrySet[];
|
|
202
250
|
/**
|
|
203
|
-
* The
|
|
251
|
+
* 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.
|
|
204
252
|
*/
|
|
205
|
-
|
|
206
|
-
}
|
|
207
|
-
export interface Schema$FetchThreatListUpdatesResponse {
|
|
253
|
+
checksum?: Schema$GoogleSecuritySafebrowsingV4Checksum;
|
|
208
254
|
/**
|
|
209
|
-
* The
|
|
255
|
+
* The new client state, in encrypted format. Opaque to clients.
|
|
210
256
|
*/
|
|
211
|
-
|
|
257
|
+
newClientState?: string | null;
|
|
212
258
|
/**
|
|
213
|
-
* The
|
|
259
|
+
* The platform type for which data is returned.
|
|
214
260
|
*/
|
|
215
|
-
|
|
261
|
+
platformType?: string | null;
|
|
262
|
+
/**
|
|
263
|
+
* A set of entries to remove from a local threat type's list. In practice, this field is empty or contains exactly one ThreatEntrySet.
|
|
264
|
+
*/
|
|
265
|
+
removals?: Schema$GoogleSecuritySafebrowsingV4ThreatEntrySet[];
|
|
266
|
+
/**
|
|
267
|
+
* The type of response. This may indicate that an action is required by the client when the response is received.
|
|
268
|
+
*/
|
|
269
|
+
responseType?: string | null;
|
|
270
|
+
/**
|
|
271
|
+
* The format of the threats.
|
|
272
|
+
*/
|
|
273
|
+
threatEntryType?: string | null;
|
|
274
|
+
/**
|
|
275
|
+
* The threat type for which data is returned.
|
|
276
|
+
*/
|
|
277
|
+
threatType?: string | null;
|
|
216
278
|
}
|
|
217
279
|
/**
|
|
218
280
|
* Request to return full hashes matched by the provided hash prefixes.
|
|
219
281
|
*/
|
|
220
|
-
export interface Schema$
|
|
282
|
+
export interface Schema$GoogleSecuritySafebrowsingV4FindFullHashesRequest {
|
|
221
283
|
/**
|
|
222
284
|
* Client metadata associated with callers of higher-level APIs built on top of the client's implementation.
|
|
223
285
|
*/
|
|
224
|
-
apiClient?: Schema$
|
|
286
|
+
apiClient?: Schema$GoogleSecuritySafebrowsingV4ClientInfo;
|
|
225
287
|
/**
|
|
226
288
|
* The client metadata.
|
|
227
289
|
*/
|
|
228
|
-
client?: Schema$
|
|
290
|
+
client?: Schema$GoogleSecuritySafebrowsingV4ClientInfo;
|
|
229
291
|
/**
|
|
230
292
|
* The current client states for each of the client's local threat lists.
|
|
231
293
|
*/
|
|
@@ -233,13 +295,13 @@ export namespace safebrowsing_v4 {
|
|
|
233
295
|
/**
|
|
234
296
|
* The lists and hashes to be checked.
|
|
235
297
|
*/
|
|
236
|
-
threatInfo?: Schema$
|
|
298
|
+
threatInfo?: Schema$GoogleSecuritySafebrowsingV4ThreatInfo;
|
|
237
299
|
}
|
|
238
|
-
export interface Schema$
|
|
300
|
+
export interface Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse {
|
|
239
301
|
/**
|
|
240
302
|
* The full hashes that matched the requested prefixes.
|
|
241
303
|
*/
|
|
242
|
-
matches?: Schema$
|
|
304
|
+
matches?: Schema$GoogleSecuritySafebrowsingV4ThreatMatch[];
|
|
243
305
|
/**
|
|
244
306
|
* 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.
|
|
245
307
|
*/
|
|
@@ -252,107 +314,32 @@ export namespace safebrowsing_v4 {
|
|
|
252
314
|
/**
|
|
253
315
|
* Request to check entries against lists.
|
|
254
316
|
*/
|
|
255
|
-
export interface Schema$
|
|
317
|
+
export interface Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesRequest {
|
|
256
318
|
/**
|
|
257
319
|
* The client metadata.
|
|
258
320
|
*/
|
|
259
|
-
client?: Schema$
|
|
321
|
+
client?: Schema$GoogleSecuritySafebrowsingV4ClientInfo;
|
|
260
322
|
/**
|
|
261
323
|
* The lists and entries to be checked for matches.
|
|
262
324
|
*/
|
|
263
|
-
threatInfo?: Schema$
|
|
325
|
+
threatInfo?: Schema$GoogleSecuritySafebrowsingV4ThreatInfo;
|
|
264
326
|
}
|
|
265
|
-
export interface Schema$
|
|
327
|
+
export interface Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesResponse {
|
|
266
328
|
/**
|
|
267
329
|
* The threat list matches.
|
|
268
330
|
*/
|
|
269
|
-
matches?: Schema$
|
|
331
|
+
matches?: Schema$GoogleSecuritySafebrowsingV4ThreatMatch[];
|
|
270
332
|
}
|
|
271
|
-
export interface Schema$
|
|
333
|
+
export interface Schema$GoogleSecuritySafebrowsingV4ListThreatListsResponse {
|
|
272
334
|
/**
|
|
273
335
|
* The lists available for download by the client.
|
|
274
336
|
*/
|
|
275
|
-
threatLists?: Schema$
|
|
276
|
-
}
|
|
277
|
-
/**
|
|
278
|
-
* A single list update request.
|
|
279
|
-
*/
|
|
280
|
-
export interface Schema$ListUpdateRequest {
|
|
281
|
-
/**
|
|
282
|
-
* The constraints associated with this request.
|
|
283
|
-
*/
|
|
284
|
-
constraints?: Schema$Constraints;
|
|
285
|
-
/**
|
|
286
|
-
* The type of platform at risk by entries present in the list.
|
|
287
|
-
*/
|
|
288
|
-
platformType?: string | null;
|
|
289
|
-
/**
|
|
290
|
-
* The current state of the client for the requested list (the encrypted client state that was received from the last successful list update).
|
|
291
|
-
*/
|
|
292
|
-
state?: string | null;
|
|
293
|
-
/**
|
|
294
|
-
* The types of entries present in the list.
|
|
295
|
-
*/
|
|
296
|
-
threatEntryType?: string | null;
|
|
297
|
-
/**
|
|
298
|
-
* The type of threat posed by entries present in the list.
|
|
299
|
-
*/
|
|
300
|
-
threatType?: string | null;
|
|
301
|
-
}
|
|
302
|
-
/**
|
|
303
|
-
* An update to an individual list.
|
|
304
|
-
*/
|
|
305
|
-
export interface Schema$ListUpdateResponse {
|
|
306
|
-
/**
|
|
307
|
-
* 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.
|
|
308
|
-
*/
|
|
309
|
-
additions?: Schema$ThreatEntrySet[];
|
|
310
|
-
/**
|
|
311
|
-
* 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.
|
|
312
|
-
*/
|
|
313
|
-
checksum?: Schema$Checksum;
|
|
314
|
-
/**
|
|
315
|
-
* The new client state, in encrypted format. Opaque to clients.
|
|
316
|
-
*/
|
|
317
|
-
newClientState?: string | null;
|
|
318
|
-
/**
|
|
319
|
-
* The platform type for which data is returned.
|
|
320
|
-
*/
|
|
321
|
-
platformType?: string | null;
|
|
322
|
-
/**
|
|
323
|
-
* A set of entries to remove from a local threat type's list. In practice, this field is empty or contains exactly one ThreatEntrySet.
|
|
324
|
-
*/
|
|
325
|
-
removals?: Schema$ThreatEntrySet[];
|
|
326
|
-
/**
|
|
327
|
-
* The type of response. This may indicate that an action is required by the client when the response is received.
|
|
328
|
-
*/
|
|
329
|
-
responseType?: string | null;
|
|
330
|
-
/**
|
|
331
|
-
* The format of the threats.
|
|
332
|
-
*/
|
|
333
|
-
threatEntryType?: string | null;
|
|
334
|
-
/**
|
|
335
|
-
* The threat type for which data is returned.
|
|
336
|
-
*/
|
|
337
|
-
threatType?: string | null;
|
|
338
|
-
}
|
|
339
|
-
/**
|
|
340
|
-
* A single metadata entry.
|
|
341
|
-
*/
|
|
342
|
-
export interface Schema$MetadataEntry {
|
|
343
|
-
/**
|
|
344
|
-
* The metadata entry key. For JSON requests, the key is base64-encoded.
|
|
345
|
-
*/
|
|
346
|
-
key?: string | null;
|
|
347
|
-
/**
|
|
348
|
-
* The metadata entry value. For JSON requests, the value is base64-encoded.
|
|
349
|
-
*/
|
|
350
|
-
value?: string | null;
|
|
337
|
+
threatLists?: Schema$GoogleSecuritySafebrowsingV4ThreatListDescriptor[];
|
|
351
338
|
}
|
|
352
339
|
/**
|
|
353
340
|
* 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.
|
|
354
341
|
*/
|
|
355
|
-
export interface Schema$
|
|
342
|
+
export interface Schema$GoogleSecuritySafebrowsingV4RawHashes {
|
|
356
343
|
/**
|
|
357
344
|
* The number of bytes for each prefix encoded below. This field can be anywhere from 4 (shortest prefix) to 32 (full SHA256 hash).
|
|
358
345
|
*/
|
|
@@ -365,7 +352,7 @@ export namespace safebrowsing_v4 {
|
|
|
365
352
|
/**
|
|
366
353
|
* A set of raw indices to remove from a local list.
|
|
367
354
|
*/
|
|
368
|
-
export interface Schema$
|
|
355
|
+
export interface Schema$GoogleSecuritySafebrowsingV4RawIndices {
|
|
369
356
|
/**
|
|
370
357
|
* The indices to remove from a lexicographically-sorted local list.
|
|
371
358
|
*/
|
|
@@ -374,7 +361,7 @@ export namespace safebrowsing_v4 {
|
|
|
374
361
|
/**
|
|
375
362
|
* The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or compressed removal indices.
|
|
376
363
|
*/
|
|
377
|
-
export interface Schema$
|
|
364
|
+
export interface Schema$GoogleSecuritySafebrowsingV4RiceDeltaEncoding {
|
|
378
365
|
/**
|
|
379
366
|
* The encoded deltas that are encoded using the Golomb-Rice coder.
|
|
380
367
|
*/
|
|
@@ -395,7 +382,7 @@ export namespace safebrowsing_v4 {
|
|
|
395
382
|
/**
|
|
396
383
|
* An individual threat; for example, a malicious URL or its hash representation. Only one of these fields should be set.
|
|
397
384
|
*/
|
|
398
|
-
export interface Schema$
|
|
385
|
+
export interface Schema$GoogleSecuritySafebrowsingV4ThreatEntry {
|
|
399
386
|
/**
|
|
400
387
|
* The digest of an executable in SHA256 format. The API supports both binary and hex digests. For JSON requests, digests are base64-encoded.
|
|
401
388
|
*/
|
|
@@ -412,16 +399,29 @@ export namespace safebrowsing_v4 {
|
|
|
412
399
|
/**
|
|
413
400
|
* The metadata associated with a specific threat entry. The client is expected to know the metadata key/value pairs associated with each threat type.
|
|
414
401
|
*/
|
|
415
|
-
export interface Schema$
|
|
402
|
+
export interface Schema$GoogleSecuritySafebrowsingV4ThreatEntryMetadata {
|
|
416
403
|
/**
|
|
417
404
|
* The metadata entries.
|
|
418
405
|
*/
|
|
419
|
-
entries?: Schema$
|
|
406
|
+
entries?: Schema$GoogleSecuritySafebrowsingV4ThreatEntryMetadataMetadataEntry[];
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* A single metadata entry.
|
|
410
|
+
*/
|
|
411
|
+
export interface Schema$GoogleSecuritySafebrowsingV4ThreatEntryMetadataMetadataEntry {
|
|
412
|
+
/**
|
|
413
|
+
* The metadata entry key. For JSON requests, the key is base64-encoded.
|
|
414
|
+
*/
|
|
415
|
+
key?: string | null;
|
|
416
|
+
/**
|
|
417
|
+
* The metadata entry value. For JSON requests, the value is base64-encoded.
|
|
418
|
+
*/
|
|
419
|
+
value?: string | null;
|
|
420
420
|
}
|
|
421
421
|
/**
|
|
422
422
|
* A set of threats that should be added or removed from a client's local database.
|
|
423
423
|
*/
|
|
424
|
-
export interface Schema$
|
|
424
|
+
export interface Schema$GoogleSecuritySafebrowsingV4ThreatEntrySet {
|
|
425
425
|
/**
|
|
426
426
|
* The compression type for the entries in this set.
|
|
427
427
|
*/
|
|
@@ -429,29 +429,29 @@ export namespace safebrowsing_v4 {
|
|
|
429
429
|
/**
|
|
430
430
|
* The raw SHA256-formatted entries.
|
|
431
431
|
*/
|
|
432
|
-
rawHashes?: Schema$
|
|
432
|
+
rawHashes?: Schema$GoogleSecuritySafebrowsingV4RawHashes;
|
|
433
433
|
/**
|
|
434
434
|
* The raw removal indices for a local list.
|
|
435
435
|
*/
|
|
436
|
-
rawIndices?: Schema$
|
|
436
|
+
rawIndices?: Schema$GoogleSecuritySafebrowsingV4RawIndices;
|
|
437
437
|
/**
|
|
438
438
|
* 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.
|
|
439
439
|
*/
|
|
440
|
-
riceHashes?: Schema$
|
|
440
|
+
riceHashes?: Schema$GoogleSecuritySafebrowsingV4RiceDeltaEncoding;
|
|
441
441
|
/**
|
|
442
442
|
* 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.
|
|
443
443
|
*/
|
|
444
|
-
riceIndices?: Schema$
|
|
444
|
+
riceIndices?: Schema$GoogleSecuritySafebrowsingV4RiceDeltaEncoding;
|
|
445
445
|
}
|
|
446
|
-
export interface Schema$
|
|
446
|
+
export interface Schema$GoogleSecuritySafebrowsingV4ThreatHit {
|
|
447
447
|
/**
|
|
448
448
|
* Client-reported identification.
|
|
449
449
|
*/
|
|
450
|
-
clientInfo?: Schema$
|
|
450
|
+
clientInfo?: Schema$GoogleSecuritySafebrowsingV4ClientInfo;
|
|
451
451
|
/**
|
|
452
452
|
* The threat entry responsible for the hit. Full hash should be reported for hash-based hits.
|
|
453
453
|
*/
|
|
454
|
-
entry?: Schema$
|
|
454
|
+
entry?: Schema$GoogleSecuritySafebrowsingV4ThreatEntry;
|
|
455
455
|
/**
|
|
456
456
|
* The platform type reported.
|
|
457
457
|
*/
|
|
@@ -459,7 +459,7 @@ export namespace safebrowsing_v4 {
|
|
|
459
459
|
/**
|
|
460
460
|
* The resources related to the threat hit.
|
|
461
461
|
*/
|
|
462
|
-
resources?: Schema$
|
|
462
|
+
resources?: Schema$GoogleSecuritySafebrowsingV4ThreatHitThreatSource[];
|
|
463
463
|
/**
|
|
464
464
|
* The threat type reported.
|
|
465
465
|
*/
|
|
@@ -467,12 +467,46 @@ export namespace safebrowsing_v4 {
|
|
|
467
467
|
/**
|
|
468
468
|
* Details about the user that encountered the threat.
|
|
469
469
|
*/
|
|
470
|
-
userInfo?: Schema$
|
|
470
|
+
userInfo?: Schema$GoogleSecuritySafebrowsingV4ThreatHitUserInfo;
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* A single resource related to a threat hit.
|
|
474
|
+
*/
|
|
475
|
+
export interface Schema$GoogleSecuritySafebrowsingV4ThreatHitThreatSource {
|
|
476
|
+
/**
|
|
477
|
+
* Referrer of the resource. Only set if the referrer is available.
|
|
478
|
+
*/
|
|
479
|
+
referrer?: string | null;
|
|
480
|
+
/**
|
|
481
|
+
* The remote IP of the resource in ASCII format. Either IPv4 or IPv6.
|
|
482
|
+
*/
|
|
483
|
+
remoteIp?: string | null;
|
|
484
|
+
/**
|
|
485
|
+
* The type of source reported.
|
|
486
|
+
*/
|
|
487
|
+
type?: string | null;
|
|
488
|
+
/**
|
|
489
|
+
* The URL of the resource.
|
|
490
|
+
*/
|
|
491
|
+
url?: string | null;
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* Details about the user that encountered the threat.
|
|
495
|
+
*/
|
|
496
|
+
export interface Schema$GoogleSecuritySafebrowsingV4ThreatHitUserInfo {
|
|
497
|
+
/**
|
|
498
|
+
* The UN M.49 region code associated with the user's location.
|
|
499
|
+
*/
|
|
500
|
+
regionCode?: string | null;
|
|
501
|
+
/**
|
|
502
|
+
* Unique user identifier defined by the client.
|
|
503
|
+
*/
|
|
504
|
+
userId?: string | null;
|
|
471
505
|
}
|
|
472
506
|
/**
|
|
473
507
|
* The information regarding one or more threats that a client submits when checking for matches in threat lists.
|
|
474
508
|
*/
|
|
475
|
-
export interface Schema$
|
|
509
|
+
export interface Schema$GoogleSecuritySafebrowsingV4ThreatInfo {
|
|
476
510
|
/**
|
|
477
511
|
* The platform types to be checked.
|
|
478
512
|
*/
|
|
@@ -480,7 +514,7 @@ export namespace safebrowsing_v4 {
|
|
|
480
514
|
/**
|
|
481
515
|
* The threat entries to be checked.
|
|
482
516
|
*/
|
|
483
|
-
threatEntries?: Schema$
|
|
517
|
+
threatEntries?: Schema$GoogleSecuritySafebrowsingV4ThreatEntry[];
|
|
484
518
|
/**
|
|
485
519
|
* The entry types to be checked.
|
|
486
520
|
*/
|
|
@@ -493,7 +527,7 @@ export namespace safebrowsing_v4 {
|
|
|
493
527
|
/**
|
|
494
528
|
* 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.
|
|
495
529
|
*/
|
|
496
|
-
export interface Schema$
|
|
530
|
+
export interface Schema$GoogleSecuritySafebrowsingV4ThreatListDescriptor {
|
|
497
531
|
/**
|
|
498
532
|
* The platform type targeted by the list's entries.
|
|
499
533
|
*/
|
|
@@ -510,7 +544,7 @@ export namespace safebrowsing_v4 {
|
|
|
510
544
|
/**
|
|
511
545
|
* A match when checking a threat entry in the Safe Browsing threat lists.
|
|
512
546
|
*/
|
|
513
|
-
export interface Schema$
|
|
547
|
+
export interface Schema$GoogleSecuritySafebrowsingV4ThreatMatch {
|
|
514
548
|
/**
|
|
515
549
|
* The cache lifetime for the returned match. Clients must not cache this response for more than this duration to avoid false positives.
|
|
516
550
|
*/
|
|
@@ -522,11 +556,11 @@ export namespace safebrowsing_v4 {
|
|
|
522
556
|
/**
|
|
523
557
|
* The threat matching this threat.
|
|
524
558
|
*/
|
|
525
|
-
threat?: Schema$
|
|
559
|
+
threat?: Schema$GoogleSecuritySafebrowsingV4ThreatEntry;
|
|
526
560
|
/**
|
|
527
561
|
* Optional metadata associated with this threat.
|
|
528
562
|
*/
|
|
529
|
-
threatEntryMetadata?: Schema$
|
|
563
|
+
threatEntryMetadata?: Schema$GoogleSecuritySafebrowsingV4ThreatEntryMetadata;
|
|
530
564
|
/**
|
|
531
565
|
* The threat entry type matching this threat.
|
|
532
566
|
*/
|
|
@@ -536,40 +570,6 @@ export namespace safebrowsing_v4 {
|
|
|
536
570
|
*/
|
|
537
571
|
threatType?: string | null;
|
|
538
572
|
}
|
|
539
|
-
/**
|
|
540
|
-
* A single resource related to a threat hit.
|
|
541
|
-
*/
|
|
542
|
-
export interface Schema$ThreatSource {
|
|
543
|
-
/**
|
|
544
|
-
* Referrer of the resource. Only set if the referrer is available.
|
|
545
|
-
*/
|
|
546
|
-
referrer?: string | null;
|
|
547
|
-
/**
|
|
548
|
-
* The remote IP of the resource in ASCII format. Either IPv4 or IPv6.
|
|
549
|
-
*/
|
|
550
|
-
remoteIp?: string | null;
|
|
551
|
-
/**
|
|
552
|
-
* The type of source reported.
|
|
553
|
-
*/
|
|
554
|
-
type?: string | null;
|
|
555
|
-
/**
|
|
556
|
-
* The URL of the resource.
|
|
557
|
-
*/
|
|
558
|
-
url?: string | null;
|
|
559
|
-
}
|
|
560
|
-
/**
|
|
561
|
-
* Details about the user that encountered the threat.
|
|
562
|
-
*/
|
|
563
|
-
export interface Schema$UserInfo {
|
|
564
|
-
/**
|
|
565
|
-
* The UN M.49 region code associated with the user's location.
|
|
566
|
-
*/
|
|
567
|
-
regionCode?: string | null;
|
|
568
|
-
/**
|
|
569
|
-
* Unique user identifier defined by the client.
|
|
570
|
-
*/
|
|
571
|
-
userId?: string | null;
|
|
572
|
-
}
|
|
573
573
|
|
|
574
574
|
export class Resource$Encodedfullhashes {
|
|
575
575
|
context: APIRequestContext;
|
|
@@ -578,54 +578,6 @@ export namespace safebrowsing_v4 {
|
|
|
578
578
|
}
|
|
579
579
|
|
|
580
580
|
/**
|
|
581
|
-
* @example
|
|
582
|
-
* ```js
|
|
583
|
-
* // Before running the sample:
|
|
584
|
-
* // - Enable the API at:
|
|
585
|
-
* // https://console.developers.google.com/apis/api/safebrowsing.googleapis.com
|
|
586
|
-
* // - Login into gcloud by running:
|
|
587
|
-
* // `$ gcloud auth application-default login`
|
|
588
|
-
* // - Install the npm module by running:
|
|
589
|
-
* // `$ npm install googleapis`
|
|
590
|
-
*
|
|
591
|
-
* const {google} = require('googleapis');
|
|
592
|
-
* const safebrowsing = google.safebrowsing('v4');
|
|
593
|
-
*
|
|
594
|
-
* async function main() {
|
|
595
|
-
* const auth = new google.auth.GoogleAuth({
|
|
596
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
597
|
-
* scopes: [],
|
|
598
|
-
* });
|
|
599
|
-
*
|
|
600
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
601
|
-
* const authClient = await auth.getClient();
|
|
602
|
-
* google.options({auth: authClient});
|
|
603
|
-
*
|
|
604
|
-
* // Do the magic
|
|
605
|
-
* const res = await safebrowsing.encodedFullHashes.get({
|
|
606
|
-
* // A client ID that (hopefully) uniquely identifies the client implementation of the Safe Browsing API.
|
|
607
|
-
* clientId: 'placeholder-value',
|
|
608
|
-
* // The version of the client implementation.
|
|
609
|
-
* clientVersion: 'placeholder-value',
|
|
610
|
-
* // A serialized FindFullHashesRequest proto.
|
|
611
|
-
* encodedRequest: 'placeholder-value',
|
|
612
|
-
* });
|
|
613
|
-
* console.log(res.data);
|
|
614
|
-
*
|
|
615
|
-
* // Example response
|
|
616
|
-
* // {
|
|
617
|
-
* // "matches": [],
|
|
618
|
-
* // "minimumWaitDuration": "my_minimumWaitDuration",
|
|
619
|
-
* // "negativeCacheDuration": "my_negativeCacheDuration"
|
|
620
|
-
* // }
|
|
621
|
-
* }
|
|
622
|
-
*
|
|
623
|
-
* main().catch(e => {
|
|
624
|
-
* console.error(e);
|
|
625
|
-
* throw e;
|
|
626
|
-
* });
|
|
627
|
-
*
|
|
628
|
-
* ```
|
|
629
581
|
*
|
|
630
582
|
* @param params - Parameters for request
|
|
631
583
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -639,7 +591,7 @@ export namespace safebrowsing_v4 {
|
|
|
639
591
|
get(
|
|
640
592
|
params?: Params$Resource$Encodedfullhashes$Get,
|
|
641
593
|
options?: MethodOptions
|
|
642
|
-
): GaxiosPromise<Schema$
|
|
594
|
+
): GaxiosPromise<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>;
|
|
643
595
|
get(
|
|
644
596
|
params: Params$Resource$Encodedfullhashes$Get,
|
|
645
597
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -649,30 +601,32 @@ export namespace safebrowsing_v4 {
|
|
|
649
601
|
params: Params$Resource$Encodedfullhashes$Get,
|
|
650
602
|
options:
|
|
651
603
|
| MethodOptions
|
|
652
|
-
| BodyResponseCallback<Schema$
|
|
653
|
-
callback: BodyResponseCallback<Schema$
|
|
604
|
+
| BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>,
|
|
605
|
+
callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>
|
|
654
606
|
): void;
|
|
655
607
|
get(
|
|
656
608
|
params: Params$Resource$Encodedfullhashes$Get,
|
|
657
|
-
callback: BodyResponseCallback<Schema$
|
|
609
|
+
callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>
|
|
610
|
+
): void;
|
|
611
|
+
get(
|
|
612
|
+
callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>
|
|
658
613
|
): void;
|
|
659
|
-
get(callback: BodyResponseCallback<Schema$FindFullHashesResponse>): void;
|
|
660
614
|
get(
|
|
661
615
|
paramsOrCallback?:
|
|
662
616
|
| Params$Resource$Encodedfullhashes$Get
|
|
663
|
-
| BodyResponseCallback<Schema$
|
|
617
|
+
| BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>
|
|
664
618
|
| BodyResponseCallback<Readable>,
|
|
665
619
|
optionsOrCallback?:
|
|
666
620
|
| MethodOptions
|
|
667
621
|
| StreamMethodOptions
|
|
668
|
-
| BodyResponseCallback<Schema$
|
|
622
|
+
| BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>
|
|
669
623
|
| BodyResponseCallback<Readable>,
|
|
670
624
|
callback?:
|
|
671
|
-
| BodyResponseCallback<Schema$
|
|
625
|
+
| BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>
|
|
672
626
|
| BodyResponseCallback<Readable>
|
|
673
627
|
):
|
|
674
628
|
| void
|
|
675
|
-
| GaxiosPromise<Schema$
|
|
629
|
+
| GaxiosPromise<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>
|
|
676
630
|
| GaxiosPromise<Readable> {
|
|
677
631
|
let params = (paramsOrCallback ||
|
|
678
632
|
{}) as Params$Resource$Encodedfullhashes$Get;
|
|
@@ -707,12 +661,14 @@ export namespace safebrowsing_v4 {
|
|
|
707
661
|
context: this.context,
|
|
708
662
|
};
|
|
709
663
|
if (callback) {
|
|
710
|
-
createAPIRequest<Schema$
|
|
664
|
+
createAPIRequest<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>(
|
|
711
665
|
parameters,
|
|
712
666
|
callback as BodyResponseCallback<unknown>
|
|
713
667
|
);
|
|
714
668
|
} else {
|
|
715
|
-
return createAPIRequest<Schema$
|
|
669
|
+
return createAPIRequest<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>(
|
|
670
|
+
parameters
|
|
671
|
+
);
|
|
716
672
|
}
|
|
717
673
|
}
|
|
718
674
|
}
|
|
@@ -740,53 +696,6 @@ export namespace safebrowsing_v4 {
|
|
|
740
696
|
}
|
|
741
697
|
|
|
742
698
|
/**
|
|
743
|
-
* @example
|
|
744
|
-
* ```js
|
|
745
|
-
* // Before running the sample:
|
|
746
|
-
* // - Enable the API at:
|
|
747
|
-
* // https://console.developers.google.com/apis/api/safebrowsing.googleapis.com
|
|
748
|
-
* // - Login into gcloud by running:
|
|
749
|
-
* // `$ gcloud auth application-default login`
|
|
750
|
-
* // - Install the npm module by running:
|
|
751
|
-
* // `$ npm install googleapis`
|
|
752
|
-
*
|
|
753
|
-
* const {google} = require('googleapis');
|
|
754
|
-
* const safebrowsing = google.safebrowsing('v4');
|
|
755
|
-
*
|
|
756
|
-
* async function main() {
|
|
757
|
-
* const auth = new google.auth.GoogleAuth({
|
|
758
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
759
|
-
* scopes: [],
|
|
760
|
-
* });
|
|
761
|
-
*
|
|
762
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
763
|
-
* const authClient = await auth.getClient();
|
|
764
|
-
* google.options({auth: authClient});
|
|
765
|
-
*
|
|
766
|
-
* // Do the magic
|
|
767
|
-
* const res = await safebrowsing.encodedUpdates.get({
|
|
768
|
-
* // A client ID that uniquely identifies the client implementation of the Safe Browsing API.
|
|
769
|
-
* clientId: 'placeholder-value',
|
|
770
|
-
* // The version of the client implementation.
|
|
771
|
-
* clientVersion: 'placeholder-value',
|
|
772
|
-
* // A serialized FetchThreatListUpdatesRequest proto.
|
|
773
|
-
* encodedRequest: 'placeholder-value',
|
|
774
|
-
* });
|
|
775
|
-
* console.log(res.data);
|
|
776
|
-
*
|
|
777
|
-
* // Example response
|
|
778
|
-
* // {
|
|
779
|
-
* // "listUpdateResponses": [],
|
|
780
|
-
* // "minimumWaitDuration": "my_minimumWaitDuration"
|
|
781
|
-
* // }
|
|
782
|
-
* }
|
|
783
|
-
*
|
|
784
|
-
* main().catch(e => {
|
|
785
|
-
* console.error(e);
|
|
786
|
-
* throw e;
|
|
787
|
-
* });
|
|
788
|
-
*
|
|
789
|
-
* ```
|
|
790
699
|
*
|
|
791
700
|
* @param params - Parameters for request
|
|
792
701
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -800,7 +709,7 @@ export namespace safebrowsing_v4 {
|
|
|
800
709
|
get(
|
|
801
710
|
params?: Params$Resource$Encodedupdates$Get,
|
|
802
711
|
options?: MethodOptions
|
|
803
|
-
): GaxiosPromise<Schema$
|
|
712
|
+
): GaxiosPromise<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>;
|
|
804
713
|
get(
|
|
805
714
|
params: Params$Resource$Encodedupdates$Get,
|
|
806
715
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -810,32 +719,32 @@ export namespace safebrowsing_v4 {
|
|
|
810
719
|
params: Params$Resource$Encodedupdates$Get,
|
|
811
720
|
options:
|
|
812
721
|
| MethodOptions
|
|
813
|
-
| BodyResponseCallback<Schema$
|
|
814
|
-
callback: BodyResponseCallback<Schema$
|
|
722
|
+
| BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>,
|
|
723
|
+
callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>
|
|
815
724
|
): void;
|
|
816
725
|
get(
|
|
817
726
|
params: Params$Resource$Encodedupdates$Get,
|
|
818
|
-
callback: BodyResponseCallback<Schema$
|
|
727
|
+
callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>
|
|
819
728
|
): void;
|
|
820
729
|
get(
|
|
821
|
-
callback: BodyResponseCallback<Schema$
|
|
730
|
+
callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>
|
|
822
731
|
): void;
|
|
823
732
|
get(
|
|
824
733
|
paramsOrCallback?:
|
|
825
734
|
| Params$Resource$Encodedupdates$Get
|
|
826
|
-
| BodyResponseCallback<Schema$
|
|
735
|
+
| BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>
|
|
827
736
|
| BodyResponseCallback<Readable>,
|
|
828
737
|
optionsOrCallback?:
|
|
829
738
|
| MethodOptions
|
|
830
739
|
| StreamMethodOptions
|
|
831
|
-
| BodyResponseCallback<Schema$
|
|
740
|
+
| BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>
|
|
832
741
|
| BodyResponseCallback<Readable>,
|
|
833
742
|
callback?:
|
|
834
|
-
| BodyResponseCallback<Schema$
|
|
743
|
+
| BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>
|
|
835
744
|
| BodyResponseCallback<Readable>
|
|
836
745
|
):
|
|
837
746
|
| void
|
|
838
|
-
| GaxiosPromise<Schema$
|
|
747
|
+
| GaxiosPromise<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>
|
|
839
748
|
| GaxiosPromise<Readable> {
|
|
840
749
|
let params = (paramsOrCallback ||
|
|
841
750
|
{}) as Params$Resource$Encodedupdates$Get;
|
|
@@ -870,12 +779,12 @@ export namespace safebrowsing_v4 {
|
|
|
870
779
|
context: this.context,
|
|
871
780
|
};
|
|
872
781
|
if (callback) {
|
|
873
|
-
createAPIRequest<Schema$
|
|
782
|
+
createAPIRequest<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>(
|
|
874
783
|
parameters,
|
|
875
784
|
callback as BodyResponseCallback<unknown>
|
|
876
785
|
);
|
|
877
786
|
} else {
|
|
878
|
-
return createAPIRequest<Schema$
|
|
787
|
+
return createAPIRequest<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>(
|
|
879
788
|
parameters
|
|
880
789
|
);
|
|
881
790
|
}
|
|
@@ -906,58 +815,6 @@ export namespace safebrowsing_v4 {
|
|
|
906
815
|
|
|
907
816
|
/**
|
|
908
817
|
* Finds the full hashes that match the requested hash prefixes.
|
|
909
|
-
* @example
|
|
910
|
-
* ```js
|
|
911
|
-
* // Before running the sample:
|
|
912
|
-
* // - Enable the API at:
|
|
913
|
-
* // https://console.developers.google.com/apis/api/safebrowsing.googleapis.com
|
|
914
|
-
* // - Login into gcloud by running:
|
|
915
|
-
* // `$ gcloud auth application-default login`
|
|
916
|
-
* // - Install the npm module by running:
|
|
917
|
-
* // `$ npm install googleapis`
|
|
918
|
-
*
|
|
919
|
-
* const {google} = require('googleapis');
|
|
920
|
-
* const safebrowsing = google.safebrowsing('v4');
|
|
921
|
-
*
|
|
922
|
-
* async function main() {
|
|
923
|
-
* const auth = new google.auth.GoogleAuth({
|
|
924
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
925
|
-
* scopes: [],
|
|
926
|
-
* });
|
|
927
|
-
*
|
|
928
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
929
|
-
* const authClient = await auth.getClient();
|
|
930
|
-
* google.options({auth: authClient});
|
|
931
|
-
*
|
|
932
|
-
* // Do the magic
|
|
933
|
-
* const res = await safebrowsing.fullHashes.find({
|
|
934
|
-
* // Request body metadata
|
|
935
|
-
* requestBody: {
|
|
936
|
-
* // request body parameters
|
|
937
|
-
* // {
|
|
938
|
-
* // "apiClient": {},
|
|
939
|
-
* // "client": {},
|
|
940
|
-
* // "clientStates": [],
|
|
941
|
-
* // "threatInfo": {}
|
|
942
|
-
* // }
|
|
943
|
-
* },
|
|
944
|
-
* });
|
|
945
|
-
* console.log(res.data);
|
|
946
|
-
*
|
|
947
|
-
* // Example response
|
|
948
|
-
* // {
|
|
949
|
-
* // "matches": [],
|
|
950
|
-
* // "minimumWaitDuration": "my_minimumWaitDuration",
|
|
951
|
-
* // "negativeCacheDuration": "my_negativeCacheDuration"
|
|
952
|
-
* // }
|
|
953
|
-
* }
|
|
954
|
-
*
|
|
955
|
-
* main().catch(e => {
|
|
956
|
-
* console.error(e);
|
|
957
|
-
* throw e;
|
|
958
|
-
* });
|
|
959
|
-
*
|
|
960
|
-
* ```
|
|
961
818
|
*
|
|
962
819
|
* @param params - Parameters for request
|
|
963
820
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -971,7 +828,7 @@ export namespace safebrowsing_v4 {
|
|
|
971
828
|
find(
|
|
972
829
|
params?: Params$Resource$Fullhashes$Find,
|
|
973
830
|
options?: MethodOptions
|
|
974
|
-
): GaxiosPromise<Schema$
|
|
831
|
+
): GaxiosPromise<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>;
|
|
975
832
|
find(
|
|
976
833
|
params: Params$Resource$Fullhashes$Find,
|
|
977
834
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -981,30 +838,32 @@ export namespace safebrowsing_v4 {
|
|
|
981
838
|
params: Params$Resource$Fullhashes$Find,
|
|
982
839
|
options:
|
|
983
840
|
| MethodOptions
|
|
984
|
-
| BodyResponseCallback<Schema$
|
|
985
|
-
callback: BodyResponseCallback<Schema$
|
|
841
|
+
| BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>,
|
|
842
|
+
callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>
|
|
986
843
|
): void;
|
|
987
844
|
find(
|
|
988
845
|
params: Params$Resource$Fullhashes$Find,
|
|
989
|
-
callback: BodyResponseCallback<Schema$
|
|
846
|
+
callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>
|
|
847
|
+
): void;
|
|
848
|
+
find(
|
|
849
|
+
callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>
|
|
990
850
|
): void;
|
|
991
|
-
find(callback: BodyResponseCallback<Schema$FindFullHashesResponse>): void;
|
|
992
851
|
find(
|
|
993
852
|
paramsOrCallback?:
|
|
994
853
|
| Params$Resource$Fullhashes$Find
|
|
995
|
-
| BodyResponseCallback<Schema$
|
|
854
|
+
| BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>
|
|
996
855
|
| BodyResponseCallback<Readable>,
|
|
997
856
|
optionsOrCallback?:
|
|
998
857
|
| MethodOptions
|
|
999
858
|
| StreamMethodOptions
|
|
1000
|
-
| BodyResponseCallback<Schema$
|
|
859
|
+
| BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>
|
|
1001
860
|
| BodyResponseCallback<Readable>,
|
|
1002
861
|
callback?:
|
|
1003
|
-
| BodyResponseCallback<Schema$
|
|
862
|
+
| BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>
|
|
1004
863
|
| BodyResponseCallback<Readable>
|
|
1005
864
|
):
|
|
1006
865
|
| void
|
|
1007
|
-
| GaxiosPromise<Schema$
|
|
866
|
+
| GaxiosPromise<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>
|
|
1008
867
|
| GaxiosPromise<Readable> {
|
|
1009
868
|
let params = (paramsOrCallback || {}) as Params$Resource$Fullhashes$Find;
|
|
1010
869
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1038,12 +897,14 @@ export namespace safebrowsing_v4 {
|
|
|
1038
897
|
context: this.context,
|
|
1039
898
|
};
|
|
1040
899
|
if (callback) {
|
|
1041
|
-
createAPIRequest<Schema$
|
|
900
|
+
createAPIRequest<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>(
|
|
1042
901
|
parameters,
|
|
1043
902
|
callback as BodyResponseCallback<unknown>
|
|
1044
903
|
);
|
|
1045
904
|
} else {
|
|
1046
|
-
return createAPIRequest<Schema$
|
|
905
|
+
return createAPIRequest<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>(
|
|
906
|
+
parameters
|
|
907
|
+
);
|
|
1047
908
|
}
|
|
1048
909
|
}
|
|
1049
910
|
}
|
|
@@ -1052,7 +913,7 @@ export namespace safebrowsing_v4 {
|
|
|
1052
913
|
/**
|
|
1053
914
|
* Request body metadata
|
|
1054
915
|
*/
|
|
1055
|
-
requestBody?: Schema$
|
|
916
|
+
requestBody?: Schema$GoogleSecuritySafebrowsingV4FindFullHashesRequest;
|
|
1056
917
|
}
|
|
1057
918
|
|
|
1058
919
|
export class Resource$Threathits {
|
|
@@ -1063,56 +924,6 @@ export namespace safebrowsing_v4 {
|
|
|
1063
924
|
|
|
1064
925
|
/**
|
|
1065
926
|
* Reports a Safe Browsing threat list hit to Google. Only projects with TRUSTED_REPORTER visibility can use this method.
|
|
1066
|
-
* @example
|
|
1067
|
-
* ```js
|
|
1068
|
-
* // Before running the sample:
|
|
1069
|
-
* // - Enable the API at:
|
|
1070
|
-
* // https://console.developers.google.com/apis/api/safebrowsing.googleapis.com
|
|
1071
|
-
* // - Login into gcloud by running:
|
|
1072
|
-
* // `$ gcloud auth application-default login`
|
|
1073
|
-
* // - Install the npm module by running:
|
|
1074
|
-
* // `$ npm install googleapis`
|
|
1075
|
-
*
|
|
1076
|
-
* const {google} = require('googleapis');
|
|
1077
|
-
* const safebrowsing = google.safebrowsing('v4');
|
|
1078
|
-
*
|
|
1079
|
-
* async function main() {
|
|
1080
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1081
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1082
|
-
* scopes: [],
|
|
1083
|
-
* });
|
|
1084
|
-
*
|
|
1085
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1086
|
-
* const authClient = await auth.getClient();
|
|
1087
|
-
* google.options({auth: authClient});
|
|
1088
|
-
*
|
|
1089
|
-
* // Do the magic
|
|
1090
|
-
* const res = await safebrowsing.threatHits.create({
|
|
1091
|
-
* // Request body metadata
|
|
1092
|
-
* requestBody: {
|
|
1093
|
-
* // request body parameters
|
|
1094
|
-
* // {
|
|
1095
|
-
* // "clientInfo": {},
|
|
1096
|
-
* // "entry": {},
|
|
1097
|
-
* // "platformType": "my_platformType",
|
|
1098
|
-
* // "resources": [],
|
|
1099
|
-
* // "threatType": "my_threatType",
|
|
1100
|
-
* // "userInfo": {}
|
|
1101
|
-
* // }
|
|
1102
|
-
* },
|
|
1103
|
-
* });
|
|
1104
|
-
* console.log(res.data);
|
|
1105
|
-
*
|
|
1106
|
-
* // Example response
|
|
1107
|
-
* // {}
|
|
1108
|
-
* }
|
|
1109
|
-
*
|
|
1110
|
-
* main().catch(e => {
|
|
1111
|
-
* console.error(e);
|
|
1112
|
-
* throw e;
|
|
1113
|
-
* });
|
|
1114
|
-
*
|
|
1115
|
-
* ```
|
|
1116
927
|
*
|
|
1117
928
|
* @param params - Parameters for request
|
|
1118
929
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1126,7 +937,7 @@ export namespace safebrowsing_v4 {
|
|
|
1126
937
|
create(
|
|
1127
938
|
params?: Params$Resource$Threathits$Create,
|
|
1128
939
|
options?: MethodOptions
|
|
1129
|
-
): GaxiosPromise<Schema$
|
|
940
|
+
): GaxiosPromise<Schema$GoogleProtobufEmpty>;
|
|
1130
941
|
create(
|
|
1131
942
|
params: Params$Resource$Threathits$Create,
|
|
1132
943
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1134,28 +945,31 @@ export namespace safebrowsing_v4 {
|
|
|
1134
945
|
): void;
|
|
1135
946
|
create(
|
|
1136
947
|
params: Params$Resource$Threathits$Create,
|
|
1137
|
-
options: MethodOptions | BodyResponseCallback<Schema$
|
|
1138
|
-
callback: BodyResponseCallback<Schema$
|
|
948
|
+
options: MethodOptions | BodyResponseCallback<Schema$GoogleProtobufEmpty>,
|
|
949
|
+
callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
1139
950
|
): void;
|
|
1140
951
|
create(
|
|
1141
952
|
params: Params$Resource$Threathits$Create,
|
|
1142
|
-
callback: BodyResponseCallback<Schema$
|
|
953
|
+
callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
1143
954
|
): void;
|
|
1144
|
-
create(callback: BodyResponseCallback<Schema$
|
|
955
|
+
create(callback: BodyResponseCallback<Schema$GoogleProtobufEmpty>): void;
|
|
1145
956
|
create(
|
|
1146
957
|
paramsOrCallback?:
|
|
1147
958
|
| Params$Resource$Threathits$Create
|
|
1148
|
-
| BodyResponseCallback<Schema$
|
|
959
|
+
| BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
1149
960
|
| BodyResponseCallback<Readable>,
|
|
1150
961
|
optionsOrCallback?:
|
|
1151
962
|
| MethodOptions
|
|
1152
963
|
| StreamMethodOptions
|
|
1153
|
-
| BodyResponseCallback<Schema$
|
|
964
|
+
| BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
1154
965
|
| BodyResponseCallback<Readable>,
|
|
1155
966
|
callback?:
|
|
1156
|
-
| BodyResponseCallback<Schema$
|
|
967
|
+
| BodyResponseCallback<Schema$GoogleProtobufEmpty>
|
|
1157
968
|
| BodyResponseCallback<Readable>
|
|
1158
|
-
):
|
|
969
|
+
):
|
|
970
|
+
| void
|
|
971
|
+
| GaxiosPromise<Schema$GoogleProtobufEmpty>
|
|
972
|
+
| GaxiosPromise<Readable> {
|
|
1159
973
|
let params = (paramsOrCallback ||
|
|
1160
974
|
{}) as Params$Resource$Threathits$Create;
|
|
1161
975
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1186,12 +1000,12 @@ export namespace safebrowsing_v4 {
|
|
|
1186
1000
|
context: this.context,
|
|
1187
1001
|
};
|
|
1188
1002
|
if (callback) {
|
|
1189
|
-
createAPIRequest<Schema$
|
|
1003
|
+
createAPIRequest<Schema$GoogleProtobufEmpty>(
|
|
1190
1004
|
parameters,
|
|
1191
1005
|
callback as BodyResponseCallback<unknown>
|
|
1192
1006
|
);
|
|
1193
1007
|
} else {
|
|
1194
|
-
return createAPIRequest<Schema$
|
|
1008
|
+
return createAPIRequest<Schema$GoogleProtobufEmpty>(parameters);
|
|
1195
1009
|
}
|
|
1196
1010
|
}
|
|
1197
1011
|
}
|
|
@@ -1201,7 +1015,7 @@ export namespace safebrowsing_v4 {
|
|
|
1201
1015
|
/**
|
|
1202
1016
|
* Request body metadata
|
|
1203
1017
|
*/
|
|
1204
|
-
requestBody?: Schema$
|
|
1018
|
+
requestBody?: Schema$GoogleSecuritySafebrowsingV4ThreatHit;
|
|
1205
1019
|
}
|
|
1206
1020
|
|
|
1207
1021
|
export class Resource$Threatlists {
|
|
@@ -1212,45 +1026,6 @@ export namespace safebrowsing_v4 {
|
|
|
1212
1026
|
|
|
1213
1027
|
/**
|
|
1214
1028
|
* Lists the Safe Browsing threat lists available for download.
|
|
1215
|
-
* @example
|
|
1216
|
-
* ```js
|
|
1217
|
-
* // Before running the sample:
|
|
1218
|
-
* // - Enable the API at:
|
|
1219
|
-
* // https://console.developers.google.com/apis/api/safebrowsing.googleapis.com
|
|
1220
|
-
* // - Login into gcloud by running:
|
|
1221
|
-
* // `$ gcloud auth application-default login`
|
|
1222
|
-
* // - Install the npm module by running:
|
|
1223
|
-
* // `$ npm install googleapis`
|
|
1224
|
-
*
|
|
1225
|
-
* const {google} = require('googleapis');
|
|
1226
|
-
* const safebrowsing = google.safebrowsing('v4');
|
|
1227
|
-
*
|
|
1228
|
-
* async function main() {
|
|
1229
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1230
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1231
|
-
* scopes: [],
|
|
1232
|
-
* });
|
|
1233
|
-
*
|
|
1234
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1235
|
-
* const authClient = await auth.getClient();
|
|
1236
|
-
* google.options({auth: authClient});
|
|
1237
|
-
*
|
|
1238
|
-
* // Do the magic
|
|
1239
|
-
* const res = await safebrowsing.threatLists.list({});
|
|
1240
|
-
* console.log(res.data);
|
|
1241
|
-
*
|
|
1242
|
-
* // Example response
|
|
1243
|
-
* // {
|
|
1244
|
-
* // "threatLists": []
|
|
1245
|
-
* // }
|
|
1246
|
-
* }
|
|
1247
|
-
*
|
|
1248
|
-
* main().catch(e => {
|
|
1249
|
-
* console.error(e);
|
|
1250
|
-
* throw e;
|
|
1251
|
-
* });
|
|
1252
|
-
*
|
|
1253
|
-
* ```
|
|
1254
1029
|
*
|
|
1255
1030
|
* @param params - Parameters for request
|
|
1256
1031
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1264,7 +1039,7 @@ export namespace safebrowsing_v4 {
|
|
|
1264
1039
|
list(
|
|
1265
1040
|
params?: Params$Resource$Threatlists$List,
|
|
1266
1041
|
options?: MethodOptions
|
|
1267
|
-
): GaxiosPromise<Schema$
|
|
1042
|
+
): GaxiosPromise<Schema$GoogleSecuritySafebrowsingV4ListThreatListsResponse>;
|
|
1268
1043
|
list(
|
|
1269
1044
|
params: Params$Resource$Threatlists$List,
|
|
1270
1045
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1274,30 +1049,32 @@ export namespace safebrowsing_v4 {
|
|
|
1274
1049
|
params: Params$Resource$Threatlists$List,
|
|
1275
1050
|
options:
|
|
1276
1051
|
| MethodOptions
|
|
1277
|
-
| BodyResponseCallback<Schema$
|
|
1278
|
-
callback: BodyResponseCallback<Schema$
|
|
1052
|
+
| BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4ListThreatListsResponse>,
|
|
1053
|
+
callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4ListThreatListsResponse>
|
|
1279
1054
|
): void;
|
|
1280
1055
|
list(
|
|
1281
1056
|
params: Params$Resource$Threatlists$List,
|
|
1282
|
-
callback: BodyResponseCallback<Schema$
|
|
1057
|
+
callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4ListThreatListsResponse>
|
|
1058
|
+
): void;
|
|
1059
|
+
list(
|
|
1060
|
+
callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4ListThreatListsResponse>
|
|
1283
1061
|
): void;
|
|
1284
|
-
list(callback: BodyResponseCallback<Schema$ListThreatListsResponse>): void;
|
|
1285
1062
|
list(
|
|
1286
1063
|
paramsOrCallback?:
|
|
1287
1064
|
| Params$Resource$Threatlists$List
|
|
1288
|
-
| BodyResponseCallback<Schema$
|
|
1065
|
+
| BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4ListThreatListsResponse>
|
|
1289
1066
|
| BodyResponseCallback<Readable>,
|
|
1290
1067
|
optionsOrCallback?:
|
|
1291
1068
|
| MethodOptions
|
|
1292
1069
|
| StreamMethodOptions
|
|
1293
|
-
| BodyResponseCallback<Schema$
|
|
1070
|
+
| BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4ListThreatListsResponse>
|
|
1294
1071
|
| BodyResponseCallback<Readable>,
|
|
1295
1072
|
callback?:
|
|
1296
|
-
| BodyResponseCallback<Schema$
|
|
1073
|
+
| BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4ListThreatListsResponse>
|
|
1297
1074
|
| BodyResponseCallback<Readable>
|
|
1298
1075
|
):
|
|
1299
1076
|
| void
|
|
1300
|
-
| GaxiosPromise<Schema$
|
|
1077
|
+
| GaxiosPromise<Schema$GoogleSecuritySafebrowsingV4ListThreatListsResponse>
|
|
1301
1078
|
| GaxiosPromise<Readable> {
|
|
1302
1079
|
let params = (paramsOrCallback || {}) as Params$Resource$Threatlists$List;
|
|
1303
1080
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1328,12 +1105,14 @@ export namespace safebrowsing_v4 {
|
|
|
1328
1105
|
context: this.context,
|
|
1329
1106
|
};
|
|
1330
1107
|
if (callback) {
|
|
1331
|
-
createAPIRequest<Schema$
|
|
1108
|
+
createAPIRequest<Schema$GoogleSecuritySafebrowsingV4ListThreatListsResponse>(
|
|
1332
1109
|
parameters,
|
|
1333
1110
|
callback as BodyResponseCallback<unknown>
|
|
1334
1111
|
);
|
|
1335
1112
|
} else {
|
|
1336
|
-
return createAPIRequest<Schema$
|
|
1113
|
+
return createAPIRequest<Schema$GoogleSecuritySafebrowsingV4ListThreatListsResponse>(
|
|
1114
|
+
parameters
|
|
1115
|
+
);
|
|
1337
1116
|
}
|
|
1338
1117
|
}
|
|
1339
1118
|
}
|
|
@@ -1349,55 +1128,6 @@ export namespace safebrowsing_v4 {
|
|
|
1349
1128
|
|
|
1350
1129
|
/**
|
|
1351
1130
|
* Fetches the most recent threat list updates. A client can request updates for multiple lists at once.
|
|
1352
|
-
* @example
|
|
1353
|
-
* ```js
|
|
1354
|
-
* // Before running the sample:
|
|
1355
|
-
* // - Enable the API at:
|
|
1356
|
-
* // https://console.developers.google.com/apis/api/safebrowsing.googleapis.com
|
|
1357
|
-
* // - Login into gcloud by running:
|
|
1358
|
-
* // `$ gcloud auth application-default login`
|
|
1359
|
-
* // - Install the npm module by running:
|
|
1360
|
-
* // `$ npm install googleapis`
|
|
1361
|
-
*
|
|
1362
|
-
* const {google} = require('googleapis');
|
|
1363
|
-
* const safebrowsing = google.safebrowsing('v4');
|
|
1364
|
-
*
|
|
1365
|
-
* async function main() {
|
|
1366
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1367
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1368
|
-
* scopes: [],
|
|
1369
|
-
* });
|
|
1370
|
-
*
|
|
1371
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1372
|
-
* const authClient = await auth.getClient();
|
|
1373
|
-
* google.options({auth: authClient});
|
|
1374
|
-
*
|
|
1375
|
-
* // Do the magic
|
|
1376
|
-
* const res = await safebrowsing.threatListUpdates.fetch({
|
|
1377
|
-
* // Request body metadata
|
|
1378
|
-
* requestBody: {
|
|
1379
|
-
* // request body parameters
|
|
1380
|
-
* // {
|
|
1381
|
-
* // "client": {},
|
|
1382
|
-
* // "listUpdateRequests": []
|
|
1383
|
-
* // }
|
|
1384
|
-
* },
|
|
1385
|
-
* });
|
|
1386
|
-
* console.log(res.data);
|
|
1387
|
-
*
|
|
1388
|
-
* // Example response
|
|
1389
|
-
* // {
|
|
1390
|
-
* // "listUpdateResponses": [],
|
|
1391
|
-
* // "minimumWaitDuration": "my_minimumWaitDuration"
|
|
1392
|
-
* // }
|
|
1393
|
-
* }
|
|
1394
|
-
*
|
|
1395
|
-
* main().catch(e => {
|
|
1396
|
-
* console.error(e);
|
|
1397
|
-
* throw e;
|
|
1398
|
-
* });
|
|
1399
|
-
*
|
|
1400
|
-
* ```
|
|
1401
1131
|
*
|
|
1402
1132
|
* @param params - Parameters for request
|
|
1403
1133
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1411,7 +1141,7 @@ export namespace safebrowsing_v4 {
|
|
|
1411
1141
|
fetch(
|
|
1412
1142
|
params?: Params$Resource$Threatlistupdates$Fetch,
|
|
1413
1143
|
options?: MethodOptions
|
|
1414
|
-
): GaxiosPromise<Schema$
|
|
1144
|
+
): GaxiosPromise<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>;
|
|
1415
1145
|
fetch(
|
|
1416
1146
|
params: Params$Resource$Threatlistupdates$Fetch,
|
|
1417
1147
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1421,32 +1151,32 @@ export namespace safebrowsing_v4 {
|
|
|
1421
1151
|
params: Params$Resource$Threatlistupdates$Fetch,
|
|
1422
1152
|
options:
|
|
1423
1153
|
| MethodOptions
|
|
1424
|
-
| BodyResponseCallback<Schema$
|
|
1425
|
-
callback: BodyResponseCallback<Schema$
|
|
1154
|
+
| BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>,
|
|
1155
|
+
callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>
|
|
1426
1156
|
): void;
|
|
1427
1157
|
fetch(
|
|
1428
1158
|
params: Params$Resource$Threatlistupdates$Fetch,
|
|
1429
|
-
callback: BodyResponseCallback<Schema$
|
|
1159
|
+
callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>
|
|
1430
1160
|
): void;
|
|
1431
1161
|
fetch(
|
|
1432
|
-
callback: BodyResponseCallback<Schema$
|
|
1162
|
+
callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>
|
|
1433
1163
|
): void;
|
|
1434
1164
|
fetch(
|
|
1435
1165
|
paramsOrCallback?:
|
|
1436
1166
|
| Params$Resource$Threatlistupdates$Fetch
|
|
1437
|
-
| BodyResponseCallback<Schema$
|
|
1167
|
+
| BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>
|
|
1438
1168
|
| BodyResponseCallback<Readable>,
|
|
1439
1169
|
optionsOrCallback?:
|
|
1440
1170
|
| MethodOptions
|
|
1441
1171
|
| StreamMethodOptions
|
|
1442
|
-
| BodyResponseCallback<Schema$
|
|
1172
|
+
| BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>
|
|
1443
1173
|
| BodyResponseCallback<Readable>,
|
|
1444
1174
|
callback?:
|
|
1445
|
-
| BodyResponseCallback<Schema$
|
|
1175
|
+
| BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>
|
|
1446
1176
|
| BodyResponseCallback<Readable>
|
|
1447
1177
|
):
|
|
1448
1178
|
| void
|
|
1449
|
-
| GaxiosPromise<Schema$
|
|
1179
|
+
| GaxiosPromise<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>
|
|
1450
1180
|
| GaxiosPromise<Readable> {
|
|
1451
1181
|
let params = (paramsOrCallback ||
|
|
1452
1182
|
{}) as Params$Resource$Threatlistupdates$Fetch;
|
|
@@ -1481,12 +1211,12 @@ export namespace safebrowsing_v4 {
|
|
|
1481
1211
|
context: this.context,
|
|
1482
1212
|
};
|
|
1483
1213
|
if (callback) {
|
|
1484
|
-
createAPIRequest<Schema$
|
|
1214
|
+
createAPIRequest<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>(
|
|
1485
1215
|
parameters,
|
|
1486
1216
|
callback as BodyResponseCallback<unknown>
|
|
1487
1217
|
);
|
|
1488
1218
|
} else {
|
|
1489
|
-
return createAPIRequest<Schema$
|
|
1219
|
+
return createAPIRequest<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>(
|
|
1490
1220
|
parameters
|
|
1491
1221
|
);
|
|
1492
1222
|
}
|
|
@@ -1498,7 +1228,7 @@ export namespace safebrowsing_v4 {
|
|
|
1498
1228
|
/**
|
|
1499
1229
|
* Request body metadata
|
|
1500
1230
|
*/
|
|
1501
|
-
requestBody?: Schema$
|
|
1231
|
+
requestBody?: Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequest;
|
|
1502
1232
|
}
|
|
1503
1233
|
|
|
1504
1234
|
export class Resource$Threatmatches {
|
|
@@ -1509,54 +1239,6 @@ export namespace safebrowsing_v4 {
|
|
|
1509
1239
|
|
|
1510
1240
|
/**
|
|
1511
1241
|
* Finds the threat entries that match the Safe Browsing lists.
|
|
1512
|
-
* @example
|
|
1513
|
-
* ```js
|
|
1514
|
-
* // Before running the sample:
|
|
1515
|
-
* // - Enable the API at:
|
|
1516
|
-
* // https://console.developers.google.com/apis/api/safebrowsing.googleapis.com
|
|
1517
|
-
* // - Login into gcloud by running:
|
|
1518
|
-
* // `$ gcloud auth application-default login`
|
|
1519
|
-
* // - Install the npm module by running:
|
|
1520
|
-
* // `$ npm install googleapis`
|
|
1521
|
-
*
|
|
1522
|
-
* const {google} = require('googleapis');
|
|
1523
|
-
* const safebrowsing = google.safebrowsing('v4');
|
|
1524
|
-
*
|
|
1525
|
-
* async function main() {
|
|
1526
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1527
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1528
|
-
* scopes: [],
|
|
1529
|
-
* });
|
|
1530
|
-
*
|
|
1531
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1532
|
-
* const authClient = await auth.getClient();
|
|
1533
|
-
* google.options({auth: authClient});
|
|
1534
|
-
*
|
|
1535
|
-
* // Do the magic
|
|
1536
|
-
* const res = await safebrowsing.threatMatches.find({
|
|
1537
|
-
* // Request body metadata
|
|
1538
|
-
* requestBody: {
|
|
1539
|
-
* // request body parameters
|
|
1540
|
-
* // {
|
|
1541
|
-
* // "client": {},
|
|
1542
|
-
* // "threatInfo": {}
|
|
1543
|
-
* // }
|
|
1544
|
-
* },
|
|
1545
|
-
* });
|
|
1546
|
-
* console.log(res.data);
|
|
1547
|
-
*
|
|
1548
|
-
* // Example response
|
|
1549
|
-
* // {
|
|
1550
|
-
* // "matches": []
|
|
1551
|
-
* // }
|
|
1552
|
-
* }
|
|
1553
|
-
*
|
|
1554
|
-
* main().catch(e => {
|
|
1555
|
-
* console.error(e);
|
|
1556
|
-
* throw e;
|
|
1557
|
-
* });
|
|
1558
|
-
*
|
|
1559
|
-
* ```
|
|
1560
1242
|
*
|
|
1561
1243
|
* @param params - Parameters for request
|
|
1562
1244
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1570,7 +1252,7 @@ export namespace safebrowsing_v4 {
|
|
|
1570
1252
|
find(
|
|
1571
1253
|
params?: Params$Resource$Threatmatches$Find,
|
|
1572
1254
|
options?: MethodOptions
|
|
1573
|
-
): GaxiosPromise<Schema$
|
|
1255
|
+
): GaxiosPromise<Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesResponse>;
|
|
1574
1256
|
find(
|
|
1575
1257
|
params: Params$Resource$Threatmatches$Find,
|
|
1576
1258
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1580,32 +1262,32 @@ export namespace safebrowsing_v4 {
|
|
|
1580
1262
|
params: Params$Resource$Threatmatches$Find,
|
|
1581
1263
|
options:
|
|
1582
1264
|
| MethodOptions
|
|
1583
|
-
| BodyResponseCallback<Schema$
|
|
1584
|
-
callback: BodyResponseCallback<Schema$
|
|
1265
|
+
| BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesResponse>,
|
|
1266
|
+
callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesResponse>
|
|
1585
1267
|
): void;
|
|
1586
1268
|
find(
|
|
1587
1269
|
params: Params$Resource$Threatmatches$Find,
|
|
1588
|
-
callback: BodyResponseCallback<Schema$
|
|
1270
|
+
callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesResponse>
|
|
1589
1271
|
): void;
|
|
1590
1272
|
find(
|
|
1591
|
-
callback: BodyResponseCallback<Schema$
|
|
1273
|
+
callback: BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesResponse>
|
|
1592
1274
|
): void;
|
|
1593
1275
|
find(
|
|
1594
1276
|
paramsOrCallback?:
|
|
1595
1277
|
| Params$Resource$Threatmatches$Find
|
|
1596
|
-
| BodyResponseCallback<Schema$
|
|
1278
|
+
| BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesResponse>
|
|
1597
1279
|
| BodyResponseCallback<Readable>,
|
|
1598
1280
|
optionsOrCallback?:
|
|
1599
1281
|
| MethodOptions
|
|
1600
1282
|
| StreamMethodOptions
|
|
1601
|
-
| BodyResponseCallback<Schema$
|
|
1283
|
+
| BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesResponse>
|
|
1602
1284
|
| BodyResponseCallback<Readable>,
|
|
1603
1285
|
callback?:
|
|
1604
|
-
| BodyResponseCallback<Schema$
|
|
1286
|
+
| BodyResponseCallback<Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesResponse>
|
|
1605
1287
|
| BodyResponseCallback<Readable>
|
|
1606
1288
|
):
|
|
1607
1289
|
| void
|
|
1608
|
-
| GaxiosPromise<Schema$
|
|
1290
|
+
| GaxiosPromise<Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesResponse>
|
|
1609
1291
|
| GaxiosPromise<Readable> {
|
|
1610
1292
|
let params = (paramsOrCallback ||
|
|
1611
1293
|
{}) as Params$Resource$Threatmatches$Find;
|
|
@@ -1640,12 +1322,14 @@ export namespace safebrowsing_v4 {
|
|
|
1640
1322
|
context: this.context,
|
|
1641
1323
|
};
|
|
1642
1324
|
if (callback) {
|
|
1643
|
-
createAPIRequest<Schema$
|
|
1325
|
+
createAPIRequest<Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesResponse>(
|
|
1644
1326
|
parameters,
|
|
1645
1327
|
callback as BodyResponseCallback<unknown>
|
|
1646
1328
|
);
|
|
1647
1329
|
} else {
|
|
1648
|
-
return createAPIRequest<Schema$
|
|
1330
|
+
return createAPIRequest<Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesResponse>(
|
|
1331
|
+
parameters
|
|
1332
|
+
);
|
|
1649
1333
|
}
|
|
1650
1334
|
}
|
|
1651
1335
|
}
|
|
@@ -1655,6 +1339,6 @@ export namespace safebrowsing_v4 {
|
|
|
1655
1339
|
/**
|
|
1656
1340
|
* Request body metadata
|
|
1657
1341
|
*/
|
|
1658
|
-
requestBody?: Schema$
|
|
1342
|
+
requestBody?: Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesRequest;
|
|
1659
1343
|
}
|
|
1660
1344
|
}
|