Skip to content

Commit 49aad9a

Browse files
fix(verifiedaccess): update the API
1 parent 0743db7 commit 49aad9a

File tree

2 files changed

+219
-0
lines changed

2 files changed

+219
-0
lines changed

src/apis/verifiedaccess/v1.ts

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,56 @@ export namespace verifiedaccess_v1 {
201201

202202
/**
203203
* CreateChallenge API
204+
* @example
205+
* ```js
206+
* // Before running the sample:
207+
* // - Enable the API at:
208+
* // https://console.developers.google.com/apis/api/verifiedaccess.googleapis.com
209+
* // - Login into gcloud by running:
210+
* // ```sh
211+
* // $ gcloud auth application-default login
212+
* // ```
213+
* // - Install the npm module by running:
214+
* // ```sh
215+
* // $ npm install googleapis
216+
* // ```
217+
*
218+
* const {google} = require('googleapis');
219+
* const verifiedaccess = google.verifiedaccess('v1');
220+
*
221+
* async function main() {
222+
* const auth = new google.auth.GoogleAuth({
223+
* // Scopes can be specified either as an array or as a single, space-delimited string.
224+
* scopes: ['https://www.googleapis.com/auth/verifiedaccess'],
225+
* });
226+
*
227+
* // Acquire an auth client, and bind it to all future calls
228+
* const authClient = await auth.getClient();
229+
* google.options({auth: authClient});
230+
*
231+
* // Do the magic
232+
* const res = await verifiedaccess.challenge.create({
233+
* // Request body metadata
234+
* requestBody: {
235+
* // request body parameters
236+
* // {}
237+
* },
238+
* });
239+
* console.log(res.data);
240+
*
241+
* // Example response
242+
* // {
243+
* // "alternativeChallenge": {},
244+
* // "challenge": {}
245+
* // }
246+
* }
247+
*
248+
* main().catch(e => {
249+
* console.error(e);
250+
* throw e;
251+
* });
252+
*
253+
* ```
204254
*
205255
* @param params - Parameters for request
206256
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -289,6 +339,62 @@ export namespace verifiedaccess_v1 {
289339

290340
/**
291341
* VerifyChallengeResponse API
342+
* @example
343+
* ```js
344+
* // Before running the sample:
345+
* // - Enable the API at:
346+
* // https://console.developers.google.com/apis/api/verifiedaccess.googleapis.com
347+
* // - Login into gcloud by running:
348+
* // ```sh
349+
* // $ gcloud auth application-default login
350+
* // ```
351+
* // - Install the npm module by running:
352+
* // ```sh
353+
* // $ npm install googleapis
354+
* // ```
355+
*
356+
* const {google} = require('googleapis');
357+
* const verifiedaccess = google.verifiedaccess('v1');
358+
*
359+
* async function main() {
360+
* const auth = new google.auth.GoogleAuth({
361+
* // Scopes can be specified either as an array or as a single, space-delimited string.
362+
* scopes: ['https://www.googleapis.com/auth/verifiedaccess'],
363+
* });
364+
*
365+
* // Acquire an auth client, and bind it to all future calls
366+
* const authClient = await auth.getClient();
367+
* google.options({auth: authClient});
368+
*
369+
* // Do the magic
370+
* const res = await verifiedaccess.challenge.verify({
371+
* // Request body metadata
372+
* requestBody: {
373+
* // request body parameters
374+
* // {
375+
* // "challengeResponse": {},
376+
* // "expectedIdentity": "my_expectedIdentity"
377+
* // }
378+
* },
379+
* });
380+
* console.log(res.data);
381+
*
382+
* // Example response
383+
* // {
384+
* // "attestedDeviceId": "my_attestedDeviceId",
385+
* // "deviceEnrollmentId": "my_deviceEnrollmentId",
386+
* // "devicePermanentId": "my_devicePermanentId",
387+
* // "signedPublicKeyAndChallenge": "my_signedPublicKeyAndChallenge",
388+
* // "verificationOutput": "my_verificationOutput"
389+
* // }
390+
* }
391+
*
392+
* main().catch(e => {
393+
* console.error(e);
394+
* throw e;
395+
* });
396+
*
397+
* ```
292398
*
293399
* @param params - Parameters for request
294400
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.

src/apis/verifiedaccess/v2.ts

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,55 @@ export namespace verifiedaccess_v2 {
375375

376376
/**
377377
* Generates a new challenge.
378+
* @example
379+
* ```js
380+
* // Before running the sample:
381+
* // - Enable the API at:
382+
* // https://console.developers.google.com/apis/api/verifiedaccess.googleapis.com
383+
* // - Login into gcloud by running:
384+
* // ```sh
385+
* // $ gcloud auth application-default login
386+
* // ```
387+
* // - Install the npm module by running:
388+
* // ```sh
389+
* // $ npm install googleapis
390+
* // ```
391+
*
392+
* const {google} = require('googleapis');
393+
* const verifiedaccess = google.verifiedaccess('v2');
394+
*
395+
* async function main() {
396+
* const auth = new google.auth.GoogleAuth({
397+
* // Scopes can be specified either as an array or as a single, space-delimited string.
398+
* scopes: ['https://www.googleapis.com/auth/verifiedaccess'],
399+
* });
400+
*
401+
* // Acquire an auth client, and bind it to all future calls
402+
* const authClient = await auth.getClient();
403+
* google.options({auth: authClient});
404+
*
405+
* // Do the magic
406+
* const res = await verifiedaccess.challenge.generate({
407+
* // Request body metadata
408+
* requestBody: {
409+
* // request body parameters
410+
* // {}
411+
* },
412+
* });
413+
* console.log(res.data);
414+
*
415+
* // Example response
416+
* // {
417+
* // "challenge": "my_challenge"
418+
* // }
419+
* }
420+
*
421+
* main().catch(e => {
422+
* console.error(e);
423+
* throw e;
424+
* });
425+
*
426+
* ```
378427
*
379428
* @param params - Parameters for request
380429
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -467,6 +516,70 @@ export namespace verifiedaccess_v2 {
467516

468517
/**
469518
* Verifies the challenge response.
519+
* @example
520+
* ```js
521+
* // Before running the sample:
522+
* // - Enable the API at:
523+
* // https://console.developers.google.com/apis/api/verifiedaccess.googleapis.com
524+
* // - Login into gcloud by running:
525+
* // ```sh
526+
* // $ gcloud auth application-default login
527+
* // ```
528+
* // - Install the npm module by running:
529+
* // ```sh
530+
* // $ npm install googleapis
531+
* // ```
532+
*
533+
* const {google} = require('googleapis');
534+
* const verifiedaccess = google.verifiedaccess('v2');
535+
*
536+
* async function main() {
537+
* const auth = new google.auth.GoogleAuth({
538+
* // Scopes can be specified either as an array or as a single, space-delimited string.
539+
* scopes: ['https://www.googleapis.com/auth/verifiedaccess'],
540+
* });
541+
*
542+
* // Acquire an auth client, and bind it to all future calls
543+
* const authClient = await auth.getClient();
544+
* google.options({auth: authClient});
545+
*
546+
* // Do the magic
547+
* const res = await verifiedaccess.challenge.verify({
548+
* // Request body metadata
549+
* requestBody: {
550+
* // request body parameters
551+
* // {
552+
* // "challengeResponse": "my_challengeResponse",
553+
* // "expectedIdentity": "my_expectedIdentity"
554+
* // }
555+
* },
556+
* });
557+
* console.log(res.data);
558+
*
559+
* // Example response
560+
* // {
561+
* // "attestedDeviceId": "my_attestedDeviceId",
562+
* // "customerId": "my_customerId",
563+
* // "deviceEnrollmentId": "my_deviceEnrollmentId",
564+
* // "devicePermanentId": "my_devicePermanentId",
565+
* // "deviceSignal": "my_deviceSignal",
566+
* // "deviceSignals": {},
567+
* // "keyTrustLevel": "my_keyTrustLevel",
568+
* // "profileCustomerId": "my_profileCustomerId",
569+
* // "profileKeyTrustLevel": "my_profileKeyTrustLevel",
570+
* // "profilePermanentId": "my_profilePermanentId",
571+
* // "signedPublicKeyAndChallenge": "my_signedPublicKeyAndChallenge",
572+
* // "virtualDeviceId": "my_virtualDeviceId",
573+
* // "virtualProfileId": "my_virtualProfileId"
574+
* // }
575+
* }
576+
*
577+
* main().catch(e => {
578+
* console.error(e);
579+
* throw e;
580+
* });
581+
*
582+
* ```
470583
*
471584
* @param params - Parameters for request
472585
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.

0 commit comments

Comments
 (0)