Skip to content

Commit

Permalink
feat: add RetrieveLegacySecretKey method (#411)
Browse files Browse the repository at this point in the history
* feat: add RetrieveLegacySecretKey method
feat: add annotation reasons REFUND, REFUND_FRAUD, TRANSACTION_ACCEPTED, TRANSACTION_DECLINED and SOCIAL_SPAM

PiperOrigin-RevId: 480357575

Source-Link: googleapis/googleapis@cbd4501

Source-Link: googleapis/googleapis-gen@7155b97
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzE1NWI5N2Q5ODM2MWYzZmM0NGNjOGNiNTM2Njc0OTg3MzZhOWJkZSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Oct 13, 2022
1 parent e8848ff commit 0df934c
Show file tree
Hide file tree
Showing 15 changed files with 2,683 additions and 1,526 deletions.

Large diffs are not rendered by default.

452 changes: 336 additions & 116 deletions packages/google-cloud-recaptchaenterprise/protos/protos.d.ts

Large diffs are not rendered by default.

2,798 changes: 1,636 additions & 1,162 deletions packages/google-cloud-recaptchaenterprise/protos/protos.js

Large diffs are not rendered by default.

111 changes: 77 additions & 34 deletions packages/google-cloud-recaptchaenterprise/protos/protos.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,18 @@ function main(name) {
*/
// const name = 'abc123'
/**
* Optional. The annotation that will be assigned to the Event. This field can
* be left empty to provide reasons that apply to an event without concluding
* whether the event is legitimate or fraudulent.
* Optional. The annotation that will be assigned to the Event. This field can be left
* empty to provide reasons that apply to an event without concluding whether
* the event is legitimate or fraudulent.
*/
// const annotation = {}
/**
* Optional. Optional reasons for the annotation that will be assigned to the
* Event.
* Optional. Optional reasons for the annotation that will be assigned to the Event.
*/
// const reasons = 1234
/**
* Optional. Optional unique stable hashed user identifier to apply to the
* assessment. This is an alternative to setting the hashed_account_id in
* Optional. Unique stable hashed user identifier to apply to the assessment.
* This is an alternative to setting the hashed_account_id in
* CreateAssessment, for example when the account identifier is not yet known
* in the initial request. It is recommended that the identifier is hashed
* using hmac-sha256 with stable secret.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ function main(parent) {
*/
// const parent = 'abc123'
/**
* Optional. The maximum number of accounts to return. The service may return
* fewer than this value. If unspecified, at most 50 accounts will be
* returned. The maximum value is 1000; values above 1000 will be coerced to
* 1000.
* Optional. The maximum number of accounts to return. The service might return fewer
* than this value.
* If unspecified, at most 50 accounts are returned.
* The maximum value is 1000; values above 1000 are coerced to 1000.
*/
// const pageSize = 1234
/**
* Optional. A page token, received from a previous
* `ListRelatedAccountGroupMemberships` call.
* Optional. A page token, received from a previous `ListRelatedAccountGroupMemberships`
* call.
* When paginating, all other parameters provided to
* `ListRelatedAccountGroupMemberships` must match the call that provided the
* page token.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,20 @@ function main(parent) {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the project to list related account groups from, in
* the format "projects/{project}".
* Required. The name of the project to list related account groups from, in the format
* "projects/{project}".
*/
// const parent = 'abc123'
/**
* Optional. The maximum number of groups to return. The service may return
* fewer than this value. If unspecified, at most 50 groups will be returned.
* The maximum value is 1000; values above 1000 will be coerced to 1000.
* Optional. The maximum number of groups to return. The service might return fewer than
* this value.
* If unspecified, at most 50 groups are returned.
* The maximum value is 1000; values above 1000 are coerced to 1000.
*/
// const pageSize = 1234
/**
* Optional. A page token, received from a previous `ListRelatedAccountGroups`
* call. Provide this to retrieve the subsequent page.
* Optional. A page token, received from a previous `ListRelatedAccountGroups` call.
* Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to
* `ListRelatedAccountGroups` must match the call that provided the page
* token.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **



'use strict';

function main(key) {
// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_RetrieveLegacySecretKey_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The public key name linked to the requested secret key in the format
* "projects/{project}/keys/{key}".
*/
// const key = 'abc123'

// Imports the Recaptchaenterprise library
const {RecaptchaEnterpriseServiceClient} = require('@google-cloud/recaptcha-enterprise').v1;

// Instantiates a client
const recaptchaenterpriseClient = new RecaptchaEnterpriseServiceClient();

async function callRetrieveLegacySecretKey() {
// Construct request
const request = {
key,
};

// Run request
const response = await recaptchaenterpriseClient.retrieveLegacySecretKey(request);
console.log(response);
}

callRetrieveLegacySecretKey();
// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_RetrieveLegacySecretKey_async]
}

process.on('unhandledRejection', err => {
console.error(err.message);
process.exitCode = 1;
});
main(...process.argv.slice(2));
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,21 @@ function main(project) {
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the project to search related account group
* memberships from, in the format "projects/{project}".
* Required. The name of the project to search related account group memberships from.
* Specify the project name in the following format: "projects/{project}".
*/
// const project = 'my-project'
/**
* Optional. The unique stable hashed user identifier we should search
* connections to. The identifier should correspond to a `hashed_account_id`
* provided in a previous CreateAssessment or AnnotateAssessment call.
* Optional. The unique stable hashed user identifier we should search connections to.
* The identifier should correspond to a `hashed_account_id` provided in a
* previous `CreateAssessment` or `AnnotateAssessment` call.
*/
// const hashedAccountId = 'Buffer.from('string')'
/**
* Optional. The maximum number of groups to return. The service may return
* fewer than this value. If unspecified, at most 50 groups will be returned.
* The maximum value is 1000; values above 1000 will be coerced to 1000.
* Optional. The maximum number of groups to return. The service might return fewer than
* this value.
* If unspecified, at most 50 groups are returned.
* The maximum value is 1000; values above 1000 are coerced to 1000.
*/
// const pageSize = 1234
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ function main(key) {
*/
// const key = {}
/**
* Optional. The mask to control which fields of the key get updated. If the
* mask is not present, all fields will be updated.
* Optional. The mask to control which fields of the key get updated. If the mask is not
* present, all fields will be updated.
*/
// const updateMask = {}

Expand Down
Loading

0 comments on commit 0df934c

Please sign in to comment.