@googleapis/safebrowsing 5.0.0 → 5.0.2
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 +14 -0
- package/build/v4.d.ts +0 -333
- package/build/v4.js.map +1 -1
- package/package.json +3 -3
- package/v4.ts +0 -333
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [5.0.2](https://github.com/googleapis/google-api-nodejs-client/compare/safebrowsing-v5.0.1...safebrowsing-v5.0.2) (2023-08-25)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **deps:** update dependency googleapis-common to v7 ([9491ec1](https://github.com/googleapis/google-api-nodejs-client/commit/9491ec1cdc3c413e7d73edcfcd59cf5c28a7c855))
|
|
9
|
+
|
|
10
|
+
## [5.0.1](https://github.com/googleapis/google-api-nodejs-client/compare/safebrowsing-v5.0.0...safebrowsing-v5.0.1) (2023-08-09)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **safebrowsing:** update the API ([fe23d83](https://github.com/googleapis/google-api-nodejs-client/commit/fe23d83559d427ae9b5aea1a78faaecd0be92c10))
|
|
16
|
+
|
|
3
17
|
## [5.0.0](https://github.com/googleapis/google-api-nodejs-client/compare/safebrowsing-v4.0.0...safebrowsing-v5.0.0) (2023-02-24)
|
|
4
18
|
|
|
5
19
|
|
package/build/v4.d.ts
CHANGED
|
@@ -516,54 +516,6 @@ export declare namespace safebrowsing_v4 {
|
|
|
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`.
|
|
@@ -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`.
|
|
@@ -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`.
|
|
@@ -750,56 +603,6 @@ export declare namespace safebrowsing_v4 {
|
|
|
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`.
|
|
@@ -824,45 +627,6 @@ export declare namespace safebrowsing_v4 {
|
|
|
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`.
|
|
@@ -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`.
|
|
@@ -956,54 +671,6 @@ export declare namespace safebrowsing_v4 {
|
|
|
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`.
|
package/build/v4.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v4.js","sourceRoot":"","sources":["../v4.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,uDAAuD;AACvD,sDAAsD;AACtD,0DAA0D;AAC1D,oDAAoD;AACpD,4CAA4C;AAE5C,yDAe2B;AAG3B,IAAiB,eAAe,
|
|
1
|
+
{"version":3,"file":"v4.js","sourceRoot":"","sources":["../v4.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AwB,CAAC,CAAC,OAAO,CAC/C,cAAc,EACd,IAAI,CACL;oBACD,MAAM,EAAE,MAAM;iBACf,EACD,OAAO,CACR;gBACD,MAAM;gBACN,cAAc,EAAE,EAAE;gBAClB,UAAU,EAAE,EAAE;gBACd,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC;YACF,IAAI,QAAQ,EAAE;gBACZ,IAAA,oCAAgB,EACd,UAAU,EACV,QAAyC,CAC1C,CAAC;aACH;iBAAM;gBACL,OAAO,IAAA,oCAAgB,EACrB,UAAU,CACX,CAAC;aACH;QACH,CAAC;KACF;IArGY,sCAAsB,yBAqGlC,CAAA;AASH,CAAC,EA1xCgB,eAAe,GAAf,uBAAe,KAAf,uBAAe,QA0xC/B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@googleapis/safebrowsing",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"description": "safebrowsing",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"webpack": "webpack"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"googleapis-common": "^
|
|
31
|
+
"googleapis-common": "^7.0.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@microsoft/api-documenter": "^7.8.10",
|
|
35
35
|
"@microsoft/api-extractor": "^7.8.10",
|
|
36
|
-
"gts": "^
|
|
36
|
+
"gts": "^5.0.0",
|
|
37
37
|
"null-loader": "^4.0.0",
|
|
38
38
|
"ts-loader": "^9.0.0",
|
|
39
39
|
"typescript": "~4.8.4",
|
package/v4.ts
CHANGED
|
@@ -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`.
|
|
@@ -744,53 +696,6 @@ export namespace safebrowsing_v4 {
|
|
|
744
696
|
}
|
|
745
697
|
|
|
746
698
|
/**
|
|
747
|
-
* @example
|
|
748
|
-
* ```js
|
|
749
|
-
* // Before running the sample:
|
|
750
|
-
* // - Enable the API at:
|
|
751
|
-
* // https://console.developers.google.com/apis/api/safebrowsing.googleapis.com
|
|
752
|
-
* // - Login into gcloud by running:
|
|
753
|
-
* // `$ gcloud auth application-default login`
|
|
754
|
-
* // - Install the npm module by running:
|
|
755
|
-
* // `$ npm install googleapis`
|
|
756
|
-
*
|
|
757
|
-
* const {google} = require('googleapis');
|
|
758
|
-
* const safebrowsing = google.safebrowsing('v4');
|
|
759
|
-
*
|
|
760
|
-
* async function main() {
|
|
761
|
-
* const auth = new google.auth.GoogleAuth({
|
|
762
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
763
|
-
* scopes: [],
|
|
764
|
-
* });
|
|
765
|
-
*
|
|
766
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
767
|
-
* const authClient = await auth.getClient();
|
|
768
|
-
* google.options({auth: authClient});
|
|
769
|
-
*
|
|
770
|
-
* // Do the magic
|
|
771
|
-
* const res = await safebrowsing.encodedUpdates.get({
|
|
772
|
-
* // A client ID that uniquely identifies the client implementation of the Safe Browsing API.
|
|
773
|
-
* clientId: 'placeholder-value',
|
|
774
|
-
* // The version of the client implementation.
|
|
775
|
-
* clientVersion: 'placeholder-value',
|
|
776
|
-
* // A serialized FetchThreatListUpdatesRequest proto.
|
|
777
|
-
* encodedRequest: 'placeholder-value',
|
|
778
|
-
* });
|
|
779
|
-
* console.log(res.data);
|
|
780
|
-
*
|
|
781
|
-
* // Example response
|
|
782
|
-
* // {
|
|
783
|
-
* // "listUpdateResponses": [],
|
|
784
|
-
* // "minimumWaitDuration": "my_minimumWaitDuration"
|
|
785
|
-
* // }
|
|
786
|
-
* }
|
|
787
|
-
*
|
|
788
|
-
* main().catch(e => {
|
|
789
|
-
* console.error(e);
|
|
790
|
-
* throw e;
|
|
791
|
-
* });
|
|
792
|
-
*
|
|
793
|
-
* ```
|
|
794
699
|
*
|
|
795
700
|
* @param params - Parameters for request
|
|
796
701
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -910,58 +815,6 @@ export namespace safebrowsing_v4 {
|
|
|
910
815
|
|
|
911
816
|
/**
|
|
912
817
|
* Finds the full hashes that match the requested hash prefixes.
|
|
913
|
-
* @example
|
|
914
|
-
* ```js
|
|
915
|
-
* // Before running the sample:
|
|
916
|
-
* // - Enable the API at:
|
|
917
|
-
* // https://console.developers.google.com/apis/api/safebrowsing.googleapis.com
|
|
918
|
-
* // - Login into gcloud by running:
|
|
919
|
-
* // `$ gcloud auth application-default login`
|
|
920
|
-
* // - Install the npm module by running:
|
|
921
|
-
* // `$ npm install googleapis`
|
|
922
|
-
*
|
|
923
|
-
* const {google} = require('googleapis');
|
|
924
|
-
* const safebrowsing = google.safebrowsing('v4');
|
|
925
|
-
*
|
|
926
|
-
* async function main() {
|
|
927
|
-
* const auth = new google.auth.GoogleAuth({
|
|
928
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
929
|
-
* scopes: [],
|
|
930
|
-
* });
|
|
931
|
-
*
|
|
932
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
933
|
-
* const authClient = await auth.getClient();
|
|
934
|
-
* google.options({auth: authClient});
|
|
935
|
-
*
|
|
936
|
-
* // Do the magic
|
|
937
|
-
* const res = await safebrowsing.fullHashes.find({
|
|
938
|
-
* // Request body metadata
|
|
939
|
-
* requestBody: {
|
|
940
|
-
* // request body parameters
|
|
941
|
-
* // {
|
|
942
|
-
* // "apiClient": {},
|
|
943
|
-
* // "client": {},
|
|
944
|
-
* // "clientStates": [],
|
|
945
|
-
* // "threatInfo": {}
|
|
946
|
-
* // }
|
|
947
|
-
* },
|
|
948
|
-
* });
|
|
949
|
-
* console.log(res.data);
|
|
950
|
-
*
|
|
951
|
-
* // Example response
|
|
952
|
-
* // {
|
|
953
|
-
* // "matches": [],
|
|
954
|
-
* // "minimumWaitDuration": "my_minimumWaitDuration",
|
|
955
|
-
* // "negativeCacheDuration": "my_negativeCacheDuration"
|
|
956
|
-
* // }
|
|
957
|
-
* }
|
|
958
|
-
*
|
|
959
|
-
* main().catch(e => {
|
|
960
|
-
* console.error(e);
|
|
961
|
-
* throw e;
|
|
962
|
-
* });
|
|
963
|
-
*
|
|
964
|
-
* ```
|
|
965
818
|
*
|
|
966
819
|
* @param params - Parameters for request
|
|
967
820
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1071,56 +924,6 @@ export namespace safebrowsing_v4 {
|
|
|
1071
924
|
|
|
1072
925
|
/**
|
|
1073
926
|
* Reports a Safe Browsing threat list hit to Google. Only projects with TRUSTED_REPORTER visibility can use this method.
|
|
1074
|
-
* @example
|
|
1075
|
-
* ```js
|
|
1076
|
-
* // Before running the sample:
|
|
1077
|
-
* // - Enable the API at:
|
|
1078
|
-
* // https://console.developers.google.com/apis/api/safebrowsing.googleapis.com
|
|
1079
|
-
* // - Login into gcloud by running:
|
|
1080
|
-
* // `$ gcloud auth application-default login`
|
|
1081
|
-
* // - Install the npm module by running:
|
|
1082
|
-
* // `$ npm install googleapis`
|
|
1083
|
-
*
|
|
1084
|
-
* const {google} = require('googleapis');
|
|
1085
|
-
* const safebrowsing = google.safebrowsing('v4');
|
|
1086
|
-
*
|
|
1087
|
-
* async function main() {
|
|
1088
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1089
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1090
|
-
* scopes: [],
|
|
1091
|
-
* });
|
|
1092
|
-
*
|
|
1093
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1094
|
-
* const authClient = await auth.getClient();
|
|
1095
|
-
* google.options({auth: authClient});
|
|
1096
|
-
*
|
|
1097
|
-
* // Do the magic
|
|
1098
|
-
* const res = await safebrowsing.threatHits.create({
|
|
1099
|
-
* // Request body metadata
|
|
1100
|
-
* requestBody: {
|
|
1101
|
-
* // request body parameters
|
|
1102
|
-
* // {
|
|
1103
|
-
* // "clientInfo": {},
|
|
1104
|
-
* // "entry": {},
|
|
1105
|
-
* // "platformType": "my_platformType",
|
|
1106
|
-
* // "resources": [],
|
|
1107
|
-
* // "threatType": "my_threatType",
|
|
1108
|
-
* // "userInfo": {}
|
|
1109
|
-
* // }
|
|
1110
|
-
* },
|
|
1111
|
-
* });
|
|
1112
|
-
* console.log(res.data);
|
|
1113
|
-
*
|
|
1114
|
-
* // Example response
|
|
1115
|
-
* // {}
|
|
1116
|
-
* }
|
|
1117
|
-
*
|
|
1118
|
-
* main().catch(e => {
|
|
1119
|
-
* console.error(e);
|
|
1120
|
-
* throw e;
|
|
1121
|
-
* });
|
|
1122
|
-
*
|
|
1123
|
-
* ```
|
|
1124
927
|
*
|
|
1125
928
|
* @param params - Parameters for request
|
|
1126
929
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1223,45 +1026,6 @@ export namespace safebrowsing_v4 {
|
|
|
1223
1026
|
|
|
1224
1027
|
/**
|
|
1225
1028
|
* Lists the Safe Browsing threat lists available for download.
|
|
1226
|
-
* @example
|
|
1227
|
-
* ```js
|
|
1228
|
-
* // Before running the sample:
|
|
1229
|
-
* // - Enable the API at:
|
|
1230
|
-
* // https://console.developers.google.com/apis/api/safebrowsing.googleapis.com
|
|
1231
|
-
* // - Login into gcloud by running:
|
|
1232
|
-
* // `$ gcloud auth application-default login`
|
|
1233
|
-
* // - Install the npm module by running:
|
|
1234
|
-
* // `$ npm install googleapis`
|
|
1235
|
-
*
|
|
1236
|
-
* const {google} = require('googleapis');
|
|
1237
|
-
* const safebrowsing = google.safebrowsing('v4');
|
|
1238
|
-
*
|
|
1239
|
-
* async function main() {
|
|
1240
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1241
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1242
|
-
* scopes: [],
|
|
1243
|
-
* });
|
|
1244
|
-
*
|
|
1245
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1246
|
-
* const authClient = await auth.getClient();
|
|
1247
|
-
* google.options({auth: authClient});
|
|
1248
|
-
*
|
|
1249
|
-
* // Do the magic
|
|
1250
|
-
* const res = await safebrowsing.threatLists.list({});
|
|
1251
|
-
* console.log(res.data);
|
|
1252
|
-
*
|
|
1253
|
-
* // Example response
|
|
1254
|
-
* // {
|
|
1255
|
-
* // "threatLists": []
|
|
1256
|
-
* // }
|
|
1257
|
-
* }
|
|
1258
|
-
*
|
|
1259
|
-
* main().catch(e => {
|
|
1260
|
-
* console.error(e);
|
|
1261
|
-
* throw e;
|
|
1262
|
-
* });
|
|
1263
|
-
*
|
|
1264
|
-
* ```
|
|
1265
1029
|
*
|
|
1266
1030
|
* @param params - Parameters for request
|
|
1267
1031
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1364,55 +1128,6 @@ export namespace safebrowsing_v4 {
|
|
|
1364
1128
|
|
|
1365
1129
|
/**
|
|
1366
1130
|
* Fetches the most recent threat list updates. A client can request updates for multiple lists at once.
|
|
1367
|
-
* @example
|
|
1368
|
-
* ```js
|
|
1369
|
-
* // Before running the sample:
|
|
1370
|
-
* // - Enable the API at:
|
|
1371
|
-
* // https://console.developers.google.com/apis/api/safebrowsing.googleapis.com
|
|
1372
|
-
* // - Login into gcloud by running:
|
|
1373
|
-
* // `$ gcloud auth application-default login`
|
|
1374
|
-
* // - Install the npm module by running:
|
|
1375
|
-
* // `$ npm install googleapis`
|
|
1376
|
-
*
|
|
1377
|
-
* const {google} = require('googleapis');
|
|
1378
|
-
* const safebrowsing = google.safebrowsing('v4');
|
|
1379
|
-
*
|
|
1380
|
-
* async function main() {
|
|
1381
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1382
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1383
|
-
* scopes: [],
|
|
1384
|
-
* });
|
|
1385
|
-
*
|
|
1386
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1387
|
-
* const authClient = await auth.getClient();
|
|
1388
|
-
* google.options({auth: authClient});
|
|
1389
|
-
*
|
|
1390
|
-
* // Do the magic
|
|
1391
|
-
* const res = await safebrowsing.threatListUpdates.fetch({
|
|
1392
|
-
* // Request body metadata
|
|
1393
|
-
* requestBody: {
|
|
1394
|
-
* // request body parameters
|
|
1395
|
-
* // {
|
|
1396
|
-
* // "client": {},
|
|
1397
|
-
* // "listUpdateRequests": []
|
|
1398
|
-
* // }
|
|
1399
|
-
* },
|
|
1400
|
-
* });
|
|
1401
|
-
* console.log(res.data);
|
|
1402
|
-
*
|
|
1403
|
-
* // Example response
|
|
1404
|
-
* // {
|
|
1405
|
-
* // "listUpdateResponses": [],
|
|
1406
|
-
* // "minimumWaitDuration": "my_minimumWaitDuration"
|
|
1407
|
-
* // }
|
|
1408
|
-
* }
|
|
1409
|
-
*
|
|
1410
|
-
* main().catch(e => {
|
|
1411
|
-
* console.error(e);
|
|
1412
|
-
* throw e;
|
|
1413
|
-
* });
|
|
1414
|
-
*
|
|
1415
|
-
* ```
|
|
1416
1131
|
*
|
|
1417
1132
|
* @param params - Parameters for request
|
|
1418
1133
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1524,54 +1239,6 @@ export namespace safebrowsing_v4 {
|
|
|
1524
1239
|
|
|
1525
1240
|
/**
|
|
1526
1241
|
* Finds the threat entries that match the Safe Browsing lists.
|
|
1527
|
-
* @example
|
|
1528
|
-
* ```js
|
|
1529
|
-
* // Before running the sample:
|
|
1530
|
-
* // - Enable the API at:
|
|
1531
|
-
* // https://console.developers.google.com/apis/api/safebrowsing.googleapis.com
|
|
1532
|
-
* // - Login into gcloud by running:
|
|
1533
|
-
* // `$ gcloud auth application-default login`
|
|
1534
|
-
* // - Install the npm module by running:
|
|
1535
|
-
* // `$ npm install googleapis`
|
|
1536
|
-
*
|
|
1537
|
-
* const {google} = require('googleapis');
|
|
1538
|
-
* const safebrowsing = google.safebrowsing('v4');
|
|
1539
|
-
*
|
|
1540
|
-
* async function main() {
|
|
1541
|
-
* const auth = new google.auth.GoogleAuth({
|
|
1542
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1543
|
-
* scopes: [],
|
|
1544
|
-
* });
|
|
1545
|
-
*
|
|
1546
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
1547
|
-
* const authClient = await auth.getClient();
|
|
1548
|
-
* google.options({auth: authClient});
|
|
1549
|
-
*
|
|
1550
|
-
* // Do the magic
|
|
1551
|
-
* const res = await safebrowsing.threatMatches.find({
|
|
1552
|
-
* // Request body metadata
|
|
1553
|
-
* requestBody: {
|
|
1554
|
-
* // request body parameters
|
|
1555
|
-
* // {
|
|
1556
|
-
* // "client": {},
|
|
1557
|
-
* // "threatInfo": {}
|
|
1558
|
-
* // }
|
|
1559
|
-
* },
|
|
1560
|
-
* });
|
|
1561
|
-
* console.log(res.data);
|
|
1562
|
-
*
|
|
1563
|
-
* // Example response
|
|
1564
|
-
* // {
|
|
1565
|
-
* // "matches": []
|
|
1566
|
-
* // }
|
|
1567
|
-
* }
|
|
1568
|
-
*
|
|
1569
|
-
* main().catch(e => {
|
|
1570
|
-
* console.error(e);
|
|
1571
|
-
* throw e;
|
|
1572
|
-
* });
|
|
1573
|
-
*
|
|
1574
|
-
* ```
|
|
1575
1242
|
*
|
|
1576
1243
|
* @param params - Parameters for request
|
|
1577
1244
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|