-
Notifications
You must be signed in to change notification settings - Fork 10
samples: update sample to use protos, until typing can be fixed #311
Conversation
Warning: This pull request is touching the following templated files:
|
This is a bug in our generated types. We want to be able to accept the stringified versions of the enums which are more friendly. Filed googleapis/gax-nodejs#1205 on our types generator |
Thanks @chingor13. In the meantime, I think it makes sense to update the sample. @juffalow, the README is generated from the quickstart. Could you make these changes to samples/quickstart, and the changes will propagate to the README? Thanks. |
Thank @sofisl! I updated the code in |
Sorry, one more request, would you mind adding a TODO comment on the sample like so (above the START tag): |
Hi @sofisl! I added there the comment. Hope this is the place you mentioned. |
@juffalow thank you for the contribution 👏 |
Function
searchUris
takes an object withuri
field which is a string and athreatTypes
field which is array of numbers, not strings.If strings are used, it will show error:
Because
searchUris
first parameters is of typeprotos.google.cloud.webrisk.v1.ISearchUrisRequest
:And
google.cloud.webrisk.v1.ThreatType
is:Even in web_risk_service_client.ts it is declared as: