@googleapis/safebrowsing 10.0.0 → 12.1.0
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 +47 -0
- package/build/index.d.ts +1 -1
- package/build/index.js.map +1 -1
- package/build/v4.d.ts +376 -15
- package/build/v4.js.map +1 -1
- package/build/v5.d.ts +503 -3
- package/build/v5.js +108 -0
- package/build/v5.js.map +1 -1
- package/index.ts +0 -1
- package/package.json +2 -2
- package/v4.ts +414 -29
- package/v5.ts +776 -5
package/build/v5.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v5.js","sourceRoot":"","sources":["../v5.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":"v5.js","sourceRoot":"","sources":["../v5.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,CA8+B/B;AA9+BD,WAAiB,eAAe;IAgE9B;;;;;;;;;;OAUG;IACH,MAAa,YAAY;QAMvB,YAAY,OAAsB,EAAE,MAA2B;YAC7D,IAAI,CAAC,OAAO,GAAG;gBACb,Q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6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@googleapis/safebrowsing",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.1.0",
|
|
4
4
|
"description": "safebrowsing",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"webpack": "webpack"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"googleapis-common": "^
|
|
31
|
+
"googleapis-common": "^8.0.2-rc.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@microsoft/api-documenter": "^7.8.10",
|
package/v4.ts
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
Compute,
|
|
24
24
|
UserRefreshClient,
|
|
25
25
|
BaseExternalAccountClient,
|
|
26
|
-
|
|
26
|
+
GaxiosResponseWithHTTP2,
|
|
27
27
|
GoogleConfigurable,
|
|
28
28
|
createAPIRequest,
|
|
29
29
|
MethodOptions,
|
|
@@ -578,6 +578,58 @@ 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
|
+
* // ```sh
|
|
588
|
+
* // $ gcloud auth application-default login
|
|
589
|
+
* // ```
|
|
590
|
+
* // - Install the npm module by running:
|
|
591
|
+
* // ```sh
|
|
592
|
+
* // $ npm install googleapis
|
|
593
|
+
* // ```
|
|
594
|
+
*
|
|
595
|
+
* const {google} = require('googleapis');
|
|
596
|
+
* const safebrowsing = google.safebrowsing('v4');
|
|
597
|
+
*
|
|
598
|
+
* async function main() {
|
|
599
|
+
* const auth = new google.auth.GoogleAuth({
|
|
600
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
601
|
+
* scopes: [],
|
|
602
|
+
* });
|
|
603
|
+
*
|
|
604
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
605
|
+
* const authClient = await auth.getClient();
|
|
606
|
+
* google.options({auth: authClient});
|
|
607
|
+
*
|
|
608
|
+
* // Do the magic
|
|
609
|
+
* const res = await safebrowsing.encodedFullHashes.get({
|
|
610
|
+
* // A client ID that (hopefully) uniquely identifies the client implementation of the Safe Browsing API.
|
|
611
|
+
* clientId: 'placeholder-value',
|
|
612
|
+
* // The version of the client implementation.
|
|
613
|
+
* clientVersion: 'placeholder-value',
|
|
614
|
+
* // A serialized FindFullHashesRequest proto.
|
|
615
|
+
* encodedRequest: 'placeholder-value',
|
|
616
|
+
* });
|
|
617
|
+
* console.log(res.data);
|
|
618
|
+
*
|
|
619
|
+
* // Example response
|
|
620
|
+
* // {
|
|
621
|
+
* // "matches": [],
|
|
622
|
+
* // "minimumWaitDuration": "my_minimumWaitDuration",
|
|
623
|
+
* // "negativeCacheDuration": "my_negativeCacheDuration"
|
|
624
|
+
* // }
|
|
625
|
+
* }
|
|
626
|
+
*
|
|
627
|
+
* main().catch(e => {
|
|
628
|
+
* console.error(e);
|
|
629
|
+
* throw e;
|
|
630
|
+
* });
|
|
631
|
+
*
|
|
632
|
+
* ```
|
|
581
633
|
*
|
|
582
634
|
* @param params - Parameters for request
|
|
583
635
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -587,11 +639,13 @@ export namespace safebrowsing_v4 {
|
|
|
587
639
|
get(
|
|
588
640
|
params: Params$Resource$Encodedfullhashes$Get,
|
|
589
641
|
options: StreamMethodOptions
|
|
590
|
-
):
|
|
642
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
591
643
|
get(
|
|
592
644
|
params?: Params$Resource$Encodedfullhashes$Get,
|
|
593
645
|
options?: MethodOptions
|
|
594
|
-
):
|
|
646
|
+
): Promise<
|
|
647
|
+
GaxiosResponseWithHTTP2<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>
|
|
648
|
+
>;
|
|
595
649
|
get(
|
|
596
650
|
params: Params$Resource$Encodedfullhashes$Get,
|
|
597
651
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -626,8 +680,10 @@ export namespace safebrowsing_v4 {
|
|
|
626
680
|
| BodyResponseCallback<Readable>
|
|
627
681
|
):
|
|
628
682
|
| void
|
|
629
|
-
|
|
|
630
|
-
|
|
683
|
+
| Promise<
|
|
684
|
+
GaxiosResponseWithHTTP2<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>
|
|
685
|
+
>
|
|
686
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
631
687
|
let params = (paramsOrCallback ||
|
|
632
688
|
{}) as Params$Resource$Encodedfullhashes$Get;
|
|
633
689
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -697,6 +753,57 @@ export namespace safebrowsing_v4 {
|
|
|
697
753
|
}
|
|
698
754
|
|
|
699
755
|
/**
|
|
756
|
+
* @example
|
|
757
|
+
* ```js
|
|
758
|
+
* // Before running the sample:
|
|
759
|
+
* // - Enable the API at:
|
|
760
|
+
* // https://console.developers.google.com/apis/api/safebrowsing.googleapis.com
|
|
761
|
+
* // - Login into gcloud by running:
|
|
762
|
+
* // ```sh
|
|
763
|
+
* // $ gcloud auth application-default login
|
|
764
|
+
* // ```
|
|
765
|
+
* // - Install the npm module by running:
|
|
766
|
+
* // ```sh
|
|
767
|
+
* // $ npm install googleapis
|
|
768
|
+
* // ```
|
|
769
|
+
*
|
|
770
|
+
* const {google} = require('googleapis');
|
|
771
|
+
* const safebrowsing = google.safebrowsing('v4');
|
|
772
|
+
*
|
|
773
|
+
* async function main() {
|
|
774
|
+
* const auth = new google.auth.GoogleAuth({
|
|
775
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
776
|
+
* scopes: [],
|
|
777
|
+
* });
|
|
778
|
+
*
|
|
779
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
780
|
+
* const authClient = await auth.getClient();
|
|
781
|
+
* google.options({auth: authClient});
|
|
782
|
+
*
|
|
783
|
+
* // Do the magic
|
|
784
|
+
* const res = await safebrowsing.encodedUpdates.get({
|
|
785
|
+
* // A client ID that uniquely identifies the client implementation of the Safe Browsing API.
|
|
786
|
+
* clientId: 'placeholder-value',
|
|
787
|
+
* // The version of the client implementation.
|
|
788
|
+
* clientVersion: 'placeholder-value',
|
|
789
|
+
* // A serialized FetchThreatListUpdatesRequest proto.
|
|
790
|
+
* encodedRequest: 'placeholder-value',
|
|
791
|
+
* });
|
|
792
|
+
* console.log(res.data);
|
|
793
|
+
*
|
|
794
|
+
* // Example response
|
|
795
|
+
* // {
|
|
796
|
+
* // "listUpdateResponses": [],
|
|
797
|
+
* // "minimumWaitDuration": "my_minimumWaitDuration"
|
|
798
|
+
* // }
|
|
799
|
+
* }
|
|
800
|
+
*
|
|
801
|
+
* main().catch(e => {
|
|
802
|
+
* console.error(e);
|
|
803
|
+
* throw e;
|
|
804
|
+
* });
|
|
805
|
+
*
|
|
806
|
+
* ```
|
|
700
807
|
*
|
|
701
808
|
* @param params - Parameters for request
|
|
702
809
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -706,11 +813,13 @@ export namespace safebrowsing_v4 {
|
|
|
706
813
|
get(
|
|
707
814
|
params: Params$Resource$Encodedupdates$Get,
|
|
708
815
|
options: StreamMethodOptions
|
|
709
|
-
):
|
|
816
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
710
817
|
get(
|
|
711
818
|
params?: Params$Resource$Encodedupdates$Get,
|
|
712
819
|
options?: MethodOptions
|
|
713
|
-
):
|
|
820
|
+
): Promise<
|
|
821
|
+
GaxiosResponseWithHTTP2<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>
|
|
822
|
+
>;
|
|
714
823
|
get(
|
|
715
824
|
params: Params$Resource$Encodedupdates$Get,
|
|
716
825
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -745,8 +854,10 @@ export namespace safebrowsing_v4 {
|
|
|
745
854
|
| BodyResponseCallback<Readable>
|
|
746
855
|
):
|
|
747
856
|
| void
|
|
748
|
-
|
|
|
749
|
-
|
|
857
|
+
| Promise<
|
|
858
|
+
GaxiosResponseWithHTTP2<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>
|
|
859
|
+
>
|
|
860
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
750
861
|
let params = (paramsOrCallback ||
|
|
751
862
|
{}) as Params$Resource$Encodedupdates$Get;
|
|
752
863
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -817,6 +928,62 @@ export namespace safebrowsing_v4 {
|
|
|
817
928
|
|
|
818
929
|
/**
|
|
819
930
|
* Finds the full hashes that match the requested hash prefixes.
|
|
931
|
+
* @example
|
|
932
|
+
* ```js
|
|
933
|
+
* // Before running the sample:
|
|
934
|
+
* // - Enable the API at:
|
|
935
|
+
* // https://console.developers.google.com/apis/api/safebrowsing.googleapis.com
|
|
936
|
+
* // - Login into gcloud by running:
|
|
937
|
+
* // ```sh
|
|
938
|
+
* // $ gcloud auth application-default login
|
|
939
|
+
* // ```
|
|
940
|
+
* // - Install the npm module by running:
|
|
941
|
+
* // ```sh
|
|
942
|
+
* // $ npm install googleapis
|
|
943
|
+
* // ```
|
|
944
|
+
*
|
|
945
|
+
* const {google} = require('googleapis');
|
|
946
|
+
* const safebrowsing = google.safebrowsing('v4');
|
|
947
|
+
*
|
|
948
|
+
* async function main() {
|
|
949
|
+
* const auth = new google.auth.GoogleAuth({
|
|
950
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
951
|
+
* scopes: [],
|
|
952
|
+
* });
|
|
953
|
+
*
|
|
954
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
955
|
+
* const authClient = await auth.getClient();
|
|
956
|
+
* google.options({auth: authClient});
|
|
957
|
+
*
|
|
958
|
+
* // Do the magic
|
|
959
|
+
* const res = await safebrowsing.fullHashes.find({
|
|
960
|
+
* // Request body metadata
|
|
961
|
+
* requestBody: {
|
|
962
|
+
* // request body parameters
|
|
963
|
+
* // {
|
|
964
|
+
* // "apiClient": {},
|
|
965
|
+
* // "client": {},
|
|
966
|
+
* // "clientStates": [],
|
|
967
|
+
* // "threatInfo": {}
|
|
968
|
+
* // }
|
|
969
|
+
* },
|
|
970
|
+
* });
|
|
971
|
+
* console.log(res.data);
|
|
972
|
+
*
|
|
973
|
+
* // Example response
|
|
974
|
+
* // {
|
|
975
|
+
* // "matches": [],
|
|
976
|
+
* // "minimumWaitDuration": "my_minimumWaitDuration",
|
|
977
|
+
* // "negativeCacheDuration": "my_negativeCacheDuration"
|
|
978
|
+
* // }
|
|
979
|
+
* }
|
|
980
|
+
*
|
|
981
|
+
* main().catch(e => {
|
|
982
|
+
* console.error(e);
|
|
983
|
+
* throw e;
|
|
984
|
+
* });
|
|
985
|
+
*
|
|
986
|
+
* ```
|
|
820
987
|
*
|
|
821
988
|
* @param params - Parameters for request
|
|
822
989
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -826,11 +993,13 @@ export namespace safebrowsing_v4 {
|
|
|
826
993
|
find(
|
|
827
994
|
params: Params$Resource$Fullhashes$Find,
|
|
828
995
|
options: StreamMethodOptions
|
|
829
|
-
):
|
|
996
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
830
997
|
find(
|
|
831
998
|
params?: Params$Resource$Fullhashes$Find,
|
|
832
999
|
options?: MethodOptions
|
|
833
|
-
):
|
|
1000
|
+
): Promise<
|
|
1001
|
+
GaxiosResponseWithHTTP2<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>
|
|
1002
|
+
>;
|
|
834
1003
|
find(
|
|
835
1004
|
params: Params$Resource$Fullhashes$Find,
|
|
836
1005
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -865,8 +1034,10 @@ export namespace safebrowsing_v4 {
|
|
|
865
1034
|
| BodyResponseCallback<Readable>
|
|
866
1035
|
):
|
|
867
1036
|
| void
|
|
868
|
-
|
|
|
869
|
-
|
|
1037
|
+
| Promise<
|
|
1038
|
+
GaxiosResponseWithHTTP2<Schema$GoogleSecuritySafebrowsingV4FindFullHashesResponse>
|
|
1039
|
+
>
|
|
1040
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
870
1041
|
let params = (paramsOrCallback || {}) as Params$Resource$Fullhashes$Find;
|
|
871
1042
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
872
1043
|
|
|
@@ -927,6 +1098,60 @@ export namespace safebrowsing_v4 {
|
|
|
927
1098
|
|
|
928
1099
|
/**
|
|
929
1100
|
* Reports a Safe Browsing threat list hit to Google. Only projects with TRUSTED_REPORTER visibility can use this method.
|
|
1101
|
+
* @example
|
|
1102
|
+
* ```js
|
|
1103
|
+
* // Before running the sample:
|
|
1104
|
+
* // - Enable the API at:
|
|
1105
|
+
* // https://console.developers.google.com/apis/api/safebrowsing.googleapis.com
|
|
1106
|
+
* // - Login into gcloud by running:
|
|
1107
|
+
* // ```sh
|
|
1108
|
+
* // $ gcloud auth application-default login
|
|
1109
|
+
* // ```
|
|
1110
|
+
* // - Install the npm module by running:
|
|
1111
|
+
* // ```sh
|
|
1112
|
+
* // $ npm install googleapis
|
|
1113
|
+
* // ```
|
|
1114
|
+
*
|
|
1115
|
+
* const {google} = require('googleapis');
|
|
1116
|
+
* const safebrowsing = google.safebrowsing('v4');
|
|
1117
|
+
*
|
|
1118
|
+
* async function main() {
|
|
1119
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1120
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1121
|
+
* scopes: [],
|
|
1122
|
+
* });
|
|
1123
|
+
*
|
|
1124
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1125
|
+
* const authClient = await auth.getClient();
|
|
1126
|
+
* google.options({auth: authClient});
|
|
1127
|
+
*
|
|
1128
|
+
* // Do the magic
|
|
1129
|
+
* const res = await safebrowsing.threatHits.create({
|
|
1130
|
+
* // Request body metadata
|
|
1131
|
+
* requestBody: {
|
|
1132
|
+
* // request body parameters
|
|
1133
|
+
* // {
|
|
1134
|
+
* // "clientInfo": {},
|
|
1135
|
+
* // "entry": {},
|
|
1136
|
+
* // "platformType": "my_platformType",
|
|
1137
|
+
* // "resources": [],
|
|
1138
|
+
* // "threatType": "my_threatType",
|
|
1139
|
+
* // "userInfo": {}
|
|
1140
|
+
* // }
|
|
1141
|
+
* },
|
|
1142
|
+
* });
|
|
1143
|
+
* console.log(res.data);
|
|
1144
|
+
*
|
|
1145
|
+
* // Example response
|
|
1146
|
+
* // {}
|
|
1147
|
+
* }
|
|
1148
|
+
*
|
|
1149
|
+
* main().catch(e => {
|
|
1150
|
+
* console.error(e);
|
|
1151
|
+
* throw e;
|
|
1152
|
+
* });
|
|
1153
|
+
*
|
|
1154
|
+
* ```
|
|
930
1155
|
*
|
|
931
1156
|
* @param params - Parameters for request
|
|
932
1157
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -936,11 +1161,11 @@ export namespace safebrowsing_v4 {
|
|
|
936
1161
|
create(
|
|
937
1162
|
params: Params$Resource$Threathits$Create,
|
|
938
1163
|
options: StreamMethodOptions
|
|
939
|
-
):
|
|
1164
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
940
1165
|
create(
|
|
941
1166
|
params?: Params$Resource$Threathits$Create,
|
|
942
1167
|
options?: MethodOptions
|
|
943
|
-
):
|
|
1168
|
+
): Promise<GaxiosResponseWithHTTP2<Schema$GoogleProtobufEmpty>>;
|
|
944
1169
|
create(
|
|
945
1170
|
params: Params$Resource$Threathits$Create,
|
|
946
1171
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -971,8 +1196,8 @@ export namespace safebrowsing_v4 {
|
|
|
971
1196
|
| BodyResponseCallback<Readable>
|
|
972
1197
|
):
|
|
973
1198
|
| void
|
|
974
|
-
|
|
|
975
|
-
|
|
|
1199
|
+
| Promise<GaxiosResponseWithHTTP2<Schema$GoogleProtobufEmpty>>
|
|
1200
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
976
1201
|
let params = (paramsOrCallback ||
|
|
977
1202
|
{}) as Params$Resource$Threathits$Create;
|
|
978
1203
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1030,6 +1255,49 @@ export namespace safebrowsing_v4 {
|
|
|
1030
1255
|
|
|
1031
1256
|
/**
|
|
1032
1257
|
* Lists the Safe Browsing threat lists available for download.
|
|
1258
|
+
* @example
|
|
1259
|
+
* ```js
|
|
1260
|
+
* // Before running the sample:
|
|
1261
|
+
* // - Enable the API at:
|
|
1262
|
+
* // https://console.developers.google.com/apis/api/safebrowsing.googleapis.com
|
|
1263
|
+
* // - Login into gcloud by running:
|
|
1264
|
+
* // ```sh
|
|
1265
|
+
* // $ gcloud auth application-default login
|
|
1266
|
+
* // ```
|
|
1267
|
+
* // - Install the npm module by running:
|
|
1268
|
+
* // ```sh
|
|
1269
|
+
* // $ npm install googleapis
|
|
1270
|
+
* // ```
|
|
1271
|
+
*
|
|
1272
|
+
* const {google} = require('googleapis');
|
|
1273
|
+
* const safebrowsing = google.safebrowsing('v4');
|
|
1274
|
+
*
|
|
1275
|
+
* async function main() {
|
|
1276
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1277
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1278
|
+
* scopes: [],
|
|
1279
|
+
* });
|
|
1280
|
+
*
|
|
1281
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1282
|
+
* const authClient = await auth.getClient();
|
|
1283
|
+
* google.options({auth: authClient});
|
|
1284
|
+
*
|
|
1285
|
+
* // Do the magic
|
|
1286
|
+
* const res = await safebrowsing.threatLists.list({});
|
|
1287
|
+
* console.log(res.data);
|
|
1288
|
+
*
|
|
1289
|
+
* // Example response
|
|
1290
|
+
* // {
|
|
1291
|
+
* // "threatLists": []
|
|
1292
|
+
* // }
|
|
1293
|
+
* }
|
|
1294
|
+
*
|
|
1295
|
+
* main().catch(e => {
|
|
1296
|
+
* console.error(e);
|
|
1297
|
+
* throw e;
|
|
1298
|
+
* });
|
|
1299
|
+
*
|
|
1300
|
+
* ```
|
|
1033
1301
|
*
|
|
1034
1302
|
* @param params - Parameters for request
|
|
1035
1303
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1039,11 +1307,13 @@ export namespace safebrowsing_v4 {
|
|
|
1039
1307
|
list(
|
|
1040
1308
|
params: Params$Resource$Threatlists$List,
|
|
1041
1309
|
options: StreamMethodOptions
|
|
1042
|
-
):
|
|
1310
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1043
1311
|
list(
|
|
1044
1312
|
params?: Params$Resource$Threatlists$List,
|
|
1045
1313
|
options?: MethodOptions
|
|
1046
|
-
):
|
|
1314
|
+
): Promise<
|
|
1315
|
+
GaxiosResponseWithHTTP2<Schema$GoogleSecuritySafebrowsingV4ListThreatListsResponse>
|
|
1316
|
+
>;
|
|
1047
1317
|
list(
|
|
1048
1318
|
params: Params$Resource$Threatlists$List,
|
|
1049
1319
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1078,8 +1348,10 @@ export namespace safebrowsing_v4 {
|
|
|
1078
1348
|
| BodyResponseCallback<Readable>
|
|
1079
1349
|
):
|
|
1080
1350
|
| void
|
|
1081
|
-
|
|
|
1082
|
-
|
|
1351
|
+
| Promise<
|
|
1352
|
+
GaxiosResponseWithHTTP2<Schema$GoogleSecuritySafebrowsingV4ListThreatListsResponse>
|
|
1353
|
+
>
|
|
1354
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1083
1355
|
let params = (paramsOrCallback || {}) as Params$Resource$Threatlists$List;
|
|
1084
1356
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
1085
1357
|
|
|
@@ -1133,6 +1405,59 @@ export namespace safebrowsing_v4 {
|
|
|
1133
1405
|
|
|
1134
1406
|
/**
|
|
1135
1407
|
* Fetches the most recent threat list updates. A client can request updates for multiple lists at once.
|
|
1408
|
+
* @example
|
|
1409
|
+
* ```js
|
|
1410
|
+
* // Before running the sample:
|
|
1411
|
+
* // - Enable the API at:
|
|
1412
|
+
* // https://console.developers.google.com/apis/api/safebrowsing.googleapis.com
|
|
1413
|
+
* // - Login into gcloud by running:
|
|
1414
|
+
* // ```sh
|
|
1415
|
+
* // $ gcloud auth application-default login
|
|
1416
|
+
* // ```
|
|
1417
|
+
* // - Install the npm module by running:
|
|
1418
|
+
* // ```sh
|
|
1419
|
+
* // $ npm install googleapis
|
|
1420
|
+
* // ```
|
|
1421
|
+
*
|
|
1422
|
+
* const {google} = require('googleapis');
|
|
1423
|
+
* const safebrowsing = google.safebrowsing('v4');
|
|
1424
|
+
*
|
|
1425
|
+
* async function main() {
|
|
1426
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1427
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1428
|
+
* scopes: [],
|
|
1429
|
+
* });
|
|
1430
|
+
*
|
|
1431
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1432
|
+
* const authClient = await auth.getClient();
|
|
1433
|
+
* google.options({auth: authClient});
|
|
1434
|
+
*
|
|
1435
|
+
* // Do the magic
|
|
1436
|
+
* const res = await safebrowsing.threatListUpdates.fetch({
|
|
1437
|
+
* // Request body metadata
|
|
1438
|
+
* requestBody: {
|
|
1439
|
+
* // request body parameters
|
|
1440
|
+
* // {
|
|
1441
|
+
* // "client": {},
|
|
1442
|
+
* // "listUpdateRequests": []
|
|
1443
|
+
* // }
|
|
1444
|
+
* },
|
|
1445
|
+
* });
|
|
1446
|
+
* console.log(res.data);
|
|
1447
|
+
*
|
|
1448
|
+
* // Example response
|
|
1449
|
+
* // {
|
|
1450
|
+
* // "listUpdateResponses": [],
|
|
1451
|
+
* // "minimumWaitDuration": "my_minimumWaitDuration"
|
|
1452
|
+
* // }
|
|
1453
|
+
* }
|
|
1454
|
+
*
|
|
1455
|
+
* main().catch(e => {
|
|
1456
|
+
* console.error(e);
|
|
1457
|
+
* throw e;
|
|
1458
|
+
* });
|
|
1459
|
+
*
|
|
1460
|
+
* ```
|
|
1136
1461
|
*
|
|
1137
1462
|
* @param params - Parameters for request
|
|
1138
1463
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1142,11 +1467,13 @@ export namespace safebrowsing_v4 {
|
|
|
1142
1467
|
fetch(
|
|
1143
1468
|
params: Params$Resource$Threatlistupdates$Fetch,
|
|
1144
1469
|
options: StreamMethodOptions
|
|
1145
|
-
):
|
|
1470
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1146
1471
|
fetch(
|
|
1147
1472
|
params?: Params$Resource$Threatlistupdates$Fetch,
|
|
1148
1473
|
options?: MethodOptions
|
|
1149
|
-
):
|
|
1474
|
+
): Promise<
|
|
1475
|
+
GaxiosResponseWithHTTP2<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>
|
|
1476
|
+
>;
|
|
1150
1477
|
fetch(
|
|
1151
1478
|
params: Params$Resource$Threatlistupdates$Fetch,
|
|
1152
1479
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1181,8 +1508,10 @@ export namespace safebrowsing_v4 {
|
|
|
1181
1508
|
| BodyResponseCallback<Readable>
|
|
1182
1509
|
):
|
|
1183
1510
|
| void
|
|
1184
|
-
|
|
|
1185
|
-
|
|
1511
|
+
| Promise<
|
|
1512
|
+
GaxiosResponseWithHTTP2<Schema$GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse>
|
|
1513
|
+
>
|
|
1514
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1186
1515
|
let params = (paramsOrCallback ||
|
|
1187
1516
|
{}) as Params$Resource$Threatlistupdates$Fetch;
|
|
1188
1517
|
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
@@ -1245,6 +1574,58 @@ export namespace safebrowsing_v4 {
|
|
|
1245
1574
|
|
|
1246
1575
|
/**
|
|
1247
1576
|
* Finds the threat entries that match the Safe Browsing lists.
|
|
1577
|
+
* @example
|
|
1578
|
+
* ```js
|
|
1579
|
+
* // Before running the sample:
|
|
1580
|
+
* // - Enable the API at:
|
|
1581
|
+
* // https://console.developers.google.com/apis/api/safebrowsing.googleapis.com
|
|
1582
|
+
* // - Login into gcloud by running:
|
|
1583
|
+
* // ```sh
|
|
1584
|
+
* // $ gcloud auth application-default login
|
|
1585
|
+
* // ```
|
|
1586
|
+
* // - Install the npm module by running:
|
|
1587
|
+
* // ```sh
|
|
1588
|
+
* // $ npm install googleapis
|
|
1589
|
+
* // ```
|
|
1590
|
+
*
|
|
1591
|
+
* const {google} = require('googleapis');
|
|
1592
|
+
* const safebrowsing = google.safebrowsing('v4');
|
|
1593
|
+
*
|
|
1594
|
+
* async function main() {
|
|
1595
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1596
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1597
|
+
* scopes: [],
|
|
1598
|
+
* });
|
|
1599
|
+
*
|
|
1600
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1601
|
+
* const authClient = await auth.getClient();
|
|
1602
|
+
* google.options({auth: authClient});
|
|
1603
|
+
*
|
|
1604
|
+
* // Do the magic
|
|
1605
|
+
* const res = await safebrowsing.threatMatches.find({
|
|
1606
|
+
* // Request body metadata
|
|
1607
|
+
* requestBody: {
|
|
1608
|
+
* // request body parameters
|
|
1609
|
+
* // {
|
|
1610
|
+
* // "client": {},
|
|
1611
|
+
* // "threatInfo": {}
|
|
1612
|
+
* // }
|
|
1613
|
+
* },
|
|
1614
|
+
* });
|
|
1615
|
+
* console.log(res.data);
|
|
1616
|
+
*
|
|
1617
|
+
* // Example response
|
|
1618
|
+
* // {
|
|
1619
|
+
* // "matches": []
|
|
1620
|
+
* // }
|
|
1621
|
+
* }
|
|
1622
|
+
*
|
|
1623
|
+
* main().catch(e => {
|
|
1624
|
+
* console.error(e);
|
|
1625
|
+
* throw e;
|
|
1626
|
+
* });
|
|
1627
|
+
*
|
|
1628
|
+
* ```
|
|
1248
1629
|
*
|
|
1249
1630
|
* @param params - Parameters for request
|
|
1250
1631
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1254,11 +1635,13 @@ export namespace safebrowsing_v4 {
|
|
|
1254
1635
|
find(
|
|
1255
1636
|
params: Params$Resource$Threatmatches$Find,
|
|
1256
1637
|
options: StreamMethodOptions
|
|
1257
|
-
):
|
|
1638
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
1258
1639
|
find(
|
|
1259
1640
|
params?: Params$Resource$Threatmatches$Find,
|
|
1260
1641
|
options?: MethodOptions
|
|
1261
|
-
):
|
|
1642
|
+
): Promise<
|
|
1643
|
+
GaxiosResponseWithHTTP2<Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesResponse>
|
|
1644
|
+
>;
|
|
1262
1645
|
find(
|
|
1263
1646
|
params: Params$Resource$Threatmatches$Find,
|
|
1264
1647
|
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
@@ -1293,8 +1676,10 @@ export namespace safebrowsing_v4 {
|
|
|
1293
1676
|
| BodyResponseCallback<Readable>
|
|
1294
1677
|
):
|
|
1295
1678
|
| void
|
|
1296
|
-
|
|
|
1297
|
-
|
|
1679
|
+
| Promise<
|
|
1680
|
+
GaxiosResponseWithHTTP2<Schema$GoogleSecuritySafebrowsingV4FindThreatMatchesResponse>
|
|
1681
|
+
>
|
|
1682
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
1298
1683
|
let params = (paramsOrCallback ||
|
|
1299
1684
|
{}) as Params$Resource$Threatmatches$Find;
|
|
1300
1685
|
let options = (optionsOrCallback || {}) as MethodOptions;
|