@googleapis/verifiedaccess 0.2.0 → 0.3.3

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 CHANGED
@@ -1,5 +1,40 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.3](https://github.com/googleapis/google-api-nodejs-client/compare/verifiedaccess-v0.3.2...verifiedaccess-v0.3.3) (2022-07-04)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **verifiedaccess:** update the API ([b61d46f](https://github.com/googleapis/google-api-nodejs-client/commit/b61d46f9facc2c4082430786c9455c108fc077c2))
9
+
10
+ ## [0.3.2](https://github.com/googleapis/google-api-nodejs-client/compare/verifiedaccess-v0.3.1...verifiedaccess-v0.3.2) (2022-06-21)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **verifiedaccess:** update the API ([60e41a2](https://github.com/googleapis/google-api-nodejs-client/commit/60e41a204aeb8678188f166da2f10386fa48a538))
16
+
17
+ ## [0.3.1](https://github.com/googleapis/google-api-nodejs-client/compare/verifiedaccess-v0.3.0...verifiedaccess-v0.3.1) (2022-06-13)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **verifiedaccess:** update the API ([dc5e29a](https://github.com/googleapis/google-api-nodejs-client/commit/dc5e29aa85f34013a54e22cb4af48a000f7030b6))
23
+
24
+ ## [0.3.0](https://www.github.com/googleapis/google-api-nodejs-client/compare/verifiedaccess-v0.2.0...verifiedaccess-v0.3.0) (2021-09-14)
25
+
26
+
27
+ ### Features
28
+
29
+ * **auth:** adds support workload identity federation ([#2517](https://www.github.com/googleapis/google-api-nodejs-client/issues/2517)) ([a10707c](https://www.github.com/googleapis/google-api-nodejs-client/commit/a10707c477759e7c9ef6360a2fe800856fb600c1))
30
+
31
+
32
+ ### Bug Fixes
33
+
34
+ * **deps:** update dependency googleapis-common to v5 ([#2497](https://www.github.com/googleapis/google-api-nodejs-client/issues/2497)) ([fec087a](https://www.github.com/googleapis/google-api-nodejs-client/commit/fec087abcf3d994dd41c3ffa0a0c12b1f9f09dae))
35
+ * upgrade webpack from 4 to 5 ([#2524](https://www.github.com/googleapis/google-api-nodejs-client/issues/2524)) ([ecfd8bf](https://www.github.com/googleapis/google-api-nodejs-client/commit/ecfd8bfcd06e1beabff7ec9a8c4000222379eb8d))
36
+ * **verifiedaccess:** update the API ([c70964d](https://www.github.com/googleapis/google-api-nodejs-client/commit/c70964d9ab7fabe75c58aa69185e1078a657c447))
37
+
3
38
  ## [0.2.0](https://www.github.com/googleapis/google-api-nodejs-client/compare/verifiedaccess-v0.1.0...verifiedaccess-v0.2.0) (2021-03-18)
4
39
 
5
40
 
package/README.md CHANGED
@@ -7,37 +7,18 @@
7
7
  ## Installation
8
8
 
9
9
  ```sh
10
- $ npm install googleapis
10
+ $ npm install @googleapis/verifiedaccess
11
11
  ```
12
12
 
13
13
  ## Usage
14
14
  All documentation and usage information can be found on [GitHub](https://github.com/googleapis/google-api-nodejs-client).
15
-
16
- ## Building a browser bundle
17
-
18
- This library can be used in a browser. To prepare a single file bundle, clone the
19
- [repository](https://github.com/googleapis/google-api-nodejs-client) and run
20
-
21
- ```sh
22
- $ cd src/apis/verifiedaccess
23
- $ npm install
24
- $ npm run webpack
25
- ```
26
-
27
- The generated bundle will be written to `dist/verifiedaccess.min.js`. Use it from your HTML file:
28
-
29
- ```html
30
- <script src="/path/to/verifiedaccess.min.js"></script>
31
- <script>
32
- const { verifiedaccess, auth } = Verifiedaccess;
33
- </script>
34
- ```
15
+ Information on classes can be found in [Googleapis Documentation](https://googleapis.dev/nodejs/googleapis/latest/verifiedaccess/classes/Verifiedaccess.html).
35
16
 
36
17
  ## License
37
- This library is licensed under Apache 2.0. Full license text is available in [LICENSE](https://github.com/googleapis/google-api-nodejs-client/blob/master/LICENSE).
18
+ This library is licensed under Apache 2.0. Full license text is available in [LICENSE](https://github.com/googleapis/google-api-nodejs-client/blob/main/LICENSE).
38
19
 
39
20
  ## Contributing
40
- We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING](https://github.com/google/google-api-nodejs-client/blob/master/.github/CONTRIBUTING.md).
21
+ We love contributions! Before submitting a Pull Request, it's always good to start with a new issue first. To learn more, see [CONTRIBUTING](https://github.com/google/google-api-nodejs-client/blob/main/.github/CONTRIBUTING.md).
41
22
 
42
23
  ## Questions/problems?
43
24
  * Ask your development related questions on [StackOverflow](http://stackoverflow.com/questions/tagged/google-api-nodejs-client).
package/build/index.d.ts CHANGED
@@ -1,12 +1,17 @@
1
1
  /*! THIS FILE IS AUTO-GENERATED */
2
2
  import { AuthPlus } from 'googleapis-common';
3
3
  import { verifiedaccess_v1 } from './v1';
4
+ import { verifiedaccess_v2 } from './v2';
4
5
  export declare const VERSIONS: {
5
6
  v1: typeof verifiedaccess_v1.Verifiedaccess;
7
+ v2: typeof verifiedaccess_v2.Verifiedaccess;
6
8
  };
7
9
  export declare function verifiedaccess(version: 'v1'): verifiedaccess_v1.Verifiedaccess;
8
10
  export declare function verifiedaccess(options: verifiedaccess_v1.Options): verifiedaccess_v1.Verifiedaccess;
11
+ export declare function verifiedaccess(version: 'v2'): verifiedaccess_v2.Verifiedaccess;
12
+ export declare function verifiedaccess(options: verifiedaccess_v2.Options): verifiedaccess_v2.Verifiedaccess;
9
13
  declare const auth: AuthPlus;
10
14
  export { auth };
11
15
  export { verifiedaccess_v1 };
16
+ export { verifiedaccess_v2 };
12
17
  export { AuthPlus, GlobalOptions, APIRequestContext, GoogleConfigurable, StreamMethodOptions, GaxiosPromise, MethodOptions, BodyResponseCallback, } from 'googleapis-common';
package/build/index.js CHANGED
@@ -16,8 +16,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
16
16
  const googleapis_common_1 = require("googleapis-common");
17
17
  const v1_1 = require("./v1");
18
18
  exports.verifiedaccess_v1 = v1_1.verifiedaccess_v1;
19
+ const v2_1 = require("./v2");
20
+ exports.verifiedaccess_v2 = v2_1.verifiedaccess_v2;
19
21
  exports.VERSIONS = {
20
22
  v1: v1_1.verifiedaccess_v1.Verifiedaccess,
23
+ v2: v2_1.verifiedaccess_v2.Verifiedaccess,
21
24
  };
22
25
  function verifiedaccess(versionOrOptions) {
23
26
  return googleapis_common_1.getAPI('verifiedaccess', versionOrOptions, exports.VERSIONS, this);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.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,kCAAkC;AAElC,yDAAuE;AACvE,6BAAuC;AAmB/B,4BAnBA,sBAAiB,CAmBA;AAjBZ,QAAA,QAAQ,GAAG;IACtB,EAAE,EAAE,sBAAiB,CAAC,cAAc;CACrC,CAAC;AAMF,SAAgB,cAAc,CAE5B,gBAAkD;IAElD,OAAO,0BAAM,CAAI,gBAAgB,EAAE,gBAAgB,EAAE,gBAAQ,EAAE,IAAI,CAAC,CAAC;AACvE,CAAC;AALD,wCAKC;AAED,MAAM,IAAI,GAAG,IAAI,4BAAQ,EAAE,CAAC;AACpB,oBAAI;AAEZ,uDAS2B;AARzB,uCAAA,QAAQ,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.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,kCAAkC;AAElC,yDAAuE;AACvE,6BAAuC;AA+B/B,4BA/BA,sBAAiB,CA+BA;AA9BzB,6BAAuC;AA+B/B,4BA/BA,sBAAiB,CA+BA;AA7BZ,QAAA,QAAQ,GAAG;IACtB,EAAE,EAAE,sBAAiB,CAAC,cAAc;IACpC,EAAE,EAAE,sBAAiB,CAAC,cAAc;CACrC,CAAC;AAUF,SAAgB,cAAc,CAI5B,gBAI6B;IAE7B,OAAO,0BAAM,CAAI,gBAAgB,EAAE,gBAAgB,EAAE,gBAAQ,EAAE,IAAI,CAAC,CAAC;AACvE,CAAC;AAXD,wCAWC;AAED,MAAM,IAAI,GAAG,IAAI,4BAAQ,EAAE,CAAC;AACpB,oBAAI;AAGZ,uDAS2B;AARzB,uCAAA,QAAQ,CAAA"}
package/build/v1.d.ts CHANGED
@@ -85,7 +85,7 @@ export declare namespace verifiedaccess_v1 {
85
85
  challenge?: Schema$SignedData;
86
86
  }
87
87
  /**
88
- * A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \} The JSON representation for `Empty` is empty JSON object `{\}`.
88
+ * A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \}
89
89
  */
90
90
  export interface Schema$Empty {
91
91
  }
package/build/v1.js CHANGED
@@ -13,7 +13,6 @@
13
13
  // limitations under the License.
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  /* eslint-disable @typescript-eslint/no-explicit-any */
16
- /* eslint-disable @typescript-eslint/class-name-casing */
17
16
  /* eslint-disable @typescript-eslint/no-unused-vars */
18
17
  /* eslint-disable @typescript-eslint/no-empty-interface */
19
18
  /* eslint-disable @typescript-eslint/no-namespace */
package/build/v1.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"v1.js","sourceRoot":"","sources":["../v1.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEA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AM,UAAU,GAAG;gBACjB,OAAO,EAAE,MAAM,CAAC,MAAM,CACpB;oBACE,GAAG,EAAE,CAAC,OAAO,GAAG,sBAAsB,CAAC,CAAC,OAAO,CAC7C,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,oCAAgB,CACd,UAAU,EACV,QAAyC,CAC1C,CAAC;aACH;iBAAM;gBACL,OAAO,oCAAgB,CACrB,UAAU,CACX,CAAC;aACH;QACH,CAAC;KACF;IA1RY,oCAAkB,qBA0R9B,CAAA;AAcH,CAAC,EAlcgB,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAkcjC"}
package/build/v2.d.ts ADDED
@@ -0,0 +1,268 @@
1
+ /// <reference types="node" />
2
+ import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
3
+ import { Readable } from 'stream';
4
+ export declare namespace verifiedaccess_v2 {
5
+ export interface Options extends GlobalOptions {
6
+ version: 'v2';
7
+ }
8
+ interface StandardParameters {
9
+ /**
10
+ * Auth client or API Key for the request
11
+ */
12
+ auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth;
13
+ /**
14
+ * V1 error format.
15
+ */
16
+ '$.xgafv'?: string;
17
+ /**
18
+ * OAuth access token.
19
+ */
20
+ access_token?: string;
21
+ /**
22
+ * Data format for response.
23
+ */
24
+ alt?: string;
25
+ /**
26
+ * JSONP
27
+ */
28
+ callback?: string;
29
+ /**
30
+ * Selector specifying which fields to include in a partial response.
31
+ */
32
+ fields?: string;
33
+ /**
34
+ * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
35
+ */
36
+ key?: string;
37
+ /**
38
+ * OAuth 2.0 token for the current user.
39
+ */
40
+ oauth_token?: string;
41
+ /**
42
+ * Returns response with indentations and line breaks.
43
+ */
44
+ prettyPrint?: boolean;
45
+ /**
46
+ * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
47
+ */
48
+ quotaUser?: string;
49
+ /**
50
+ * Legacy upload protocol for media (e.g. "media", "multipart").
51
+ */
52
+ uploadType?: string;
53
+ /**
54
+ * Upload protocol for media (e.g. "raw", "multipart").
55
+ */
56
+ upload_protocol?: string;
57
+ }
58
+ /**
59
+ * Chrome Verified Access API
60
+ *
61
+ * API for Verified Access chrome extension to provide credential verification for chrome devices connecting to an enterprise network
62
+ *
63
+ * @example
64
+ * ```js
65
+ * const {google} = require('googleapis');
66
+ * const verifiedaccess = google.verifiedaccess('v2');
67
+ * ```
68
+ */
69
+ export class Verifiedaccess {
70
+ context: APIRequestContext;
71
+ challenge: Resource$Challenge;
72
+ constructor(options: GlobalOptions, google?: GoogleConfigurable);
73
+ }
74
+ /**
75
+ * Result message for VerifiedAccess.CreateChallenge.
76
+ */
77
+ export interface Schema$Challenge {
78
+ /**
79
+ * Challenge generated with the old signing key, the bytes representation of SignedData (this will only be present during key rotation).
80
+ */
81
+ alternativeChallenge?: string | null;
82
+ /**
83
+ * Generated challenge, the bytes representation of SignedData.
84
+ */
85
+ challenge?: string | null;
86
+ }
87
+ /**
88
+ * A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \}
89
+ */
90
+ export interface Schema$Empty {
91
+ }
92
+ /**
93
+ * Signed ChallengeResponse.
94
+ */
95
+ export interface Schema$VerifyChallengeResponseRequest {
96
+ /**
97
+ * Required. The generated response to the challenge, the bytes representation of SignedData.
98
+ */
99
+ challengeResponse?: string | null;
100
+ /**
101
+ * Optional. Service can optionally provide identity information about the device or user associated with the key. For an EMK, this value is the enrolled domain. For an EUK, this value is the user's email address. If present, this value will be checked against contents of the response, and verification will fail if there is no match.
102
+ */
103
+ expectedIdentity?: string | null;
104
+ }
105
+ /**
106
+ * Result message for VerifiedAccess.VerifyChallengeResponse.
107
+ */
108
+ export interface Schema$VerifyChallengeResponseResult {
109
+ /**
110
+ * Device permanent id is returned in this field (for the machine response only).
111
+ */
112
+ devicePermanentId?: string | null;
113
+ /**
114
+ * Device signal in json string representation.
115
+ */
116
+ deviceSignal?: string | null;
117
+ /**
118
+ * Device attested key trust level.
119
+ */
120
+ keyTrustLevel?: string | null;
121
+ /**
122
+ * Certificate Signing Request (in the SPKAC format, base64 encoded) is returned in this field. This field will be set only if device has included CSR in its challenge response. (the option to include CSR is now available for both user and machine responses)
123
+ */
124
+ signedPublicKeyAndChallenge?: string | null;
125
+ }
126
+ export class Resource$Challenge {
127
+ context: APIRequestContext;
128
+ constructor(context: APIRequestContext);
129
+ /**
130
+ * Generates a new challenge.
131
+ * @example
132
+ * ```js
133
+ * // Before running the sample:
134
+ * // - Enable the API at:
135
+ * // https://console.developers.google.com/apis/api/verifiedaccess.googleapis.com
136
+ * // - Login into gcloud by running:
137
+ * // `$ gcloud auth application-default login`
138
+ * // - Install the npm module by running:
139
+ * // `$ npm install googleapis`
140
+ *
141
+ * const {google} = require('googleapis');
142
+ * const verifiedaccess = google.verifiedaccess('v2');
143
+ *
144
+ * async function main() {
145
+ * const auth = new google.auth.GoogleAuth({
146
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
147
+ * scopes: ['https://www.googleapis.com/auth/verifiedaccess'],
148
+ * });
149
+ *
150
+ * // Acquire an auth client, and bind it to all future calls
151
+ * const authClient = await auth.getClient();
152
+ * google.options({auth: authClient});
153
+ *
154
+ * // Do the magic
155
+ * const res = await verifiedaccess.challenge.generate({
156
+ * // Request body metadata
157
+ * requestBody: {
158
+ * // request body parameters
159
+ * // {}
160
+ * },
161
+ * });
162
+ * console.log(res.data);
163
+ *
164
+ * // Example response
165
+ * // {
166
+ * // "alternativeChallenge": "my_alternativeChallenge",
167
+ * // "challenge": "my_challenge"
168
+ * // }
169
+ * }
170
+ *
171
+ * main().catch(e => {
172
+ * console.error(e);
173
+ * throw e;
174
+ * });
175
+ *
176
+ * ```
177
+ *
178
+ * @param params - Parameters for request
179
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
180
+ * @param callback - Optional callback that handles the response.
181
+ * @returns A promise if used with async/await, or void if used with a callback.
182
+ */
183
+ generate(params: Params$Resource$Challenge$Generate, options: StreamMethodOptions): GaxiosPromise<Readable>;
184
+ generate(params?: Params$Resource$Challenge$Generate, options?: MethodOptions): GaxiosPromise<Schema$Challenge>;
185
+ generate(params: Params$Resource$Challenge$Generate, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
186
+ generate(params: Params$Resource$Challenge$Generate, options: MethodOptions | BodyResponseCallback<Schema$Challenge>, callback: BodyResponseCallback<Schema$Challenge>): void;
187
+ generate(params: Params$Resource$Challenge$Generate, callback: BodyResponseCallback<Schema$Challenge>): void;
188
+ generate(callback: BodyResponseCallback<Schema$Challenge>): void;
189
+ /**
190
+ * Verifies the challenge response.
191
+ * @example
192
+ * ```js
193
+ * // Before running the sample:
194
+ * // - Enable the API at:
195
+ * // https://console.developers.google.com/apis/api/verifiedaccess.googleapis.com
196
+ * // - Login into gcloud by running:
197
+ * // `$ gcloud auth application-default login`
198
+ * // - Install the npm module by running:
199
+ * // `$ npm install googleapis`
200
+ *
201
+ * const {google} = require('googleapis');
202
+ * const verifiedaccess = google.verifiedaccess('v2');
203
+ *
204
+ * async function main() {
205
+ * const auth = new google.auth.GoogleAuth({
206
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
207
+ * scopes: ['https://www.googleapis.com/auth/verifiedaccess'],
208
+ * });
209
+ *
210
+ * // Acquire an auth client, and bind it to all future calls
211
+ * const authClient = await auth.getClient();
212
+ * google.options({auth: authClient});
213
+ *
214
+ * // Do the magic
215
+ * const res = await verifiedaccess.challenge.verify({
216
+ * // Request body metadata
217
+ * requestBody: {
218
+ * // request body parameters
219
+ * // {
220
+ * // "challengeResponse": "my_challengeResponse",
221
+ * // "expectedIdentity": "my_expectedIdentity"
222
+ * // }
223
+ * },
224
+ * });
225
+ * console.log(res.data);
226
+ *
227
+ * // Example response
228
+ * // {
229
+ * // "devicePermanentId": "my_devicePermanentId",
230
+ * // "deviceSignal": "my_deviceSignal",
231
+ * // "keyTrustLevel": "my_keyTrustLevel",
232
+ * // "signedPublicKeyAndChallenge": "my_signedPublicKeyAndChallenge"
233
+ * // }
234
+ * }
235
+ *
236
+ * main().catch(e => {
237
+ * console.error(e);
238
+ * throw e;
239
+ * });
240
+ *
241
+ * ```
242
+ *
243
+ * @param params - Parameters for request
244
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
245
+ * @param callback - Optional callback that handles the response.
246
+ * @returns A promise if used with async/await, or void if used with a callback.
247
+ */
248
+ verify(params: Params$Resource$Challenge$Verify, options: StreamMethodOptions): GaxiosPromise<Readable>;
249
+ verify(params?: Params$Resource$Challenge$Verify, options?: MethodOptions): GaxiosPromise<Schema$VerifyChallengeResponseResult>;
250
+ verify(params: Params$Resource$Challenge$Verify, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
251
+ verify(params: Params$Resource$Challenge$Verify, options: MethodOptions | BodyResponseCallback<Schema$VerifyChallengeResponseResult>, callback: BodyResponseCallback<Schema$VerifyChallengeResponseResult>): void;
252
+ verify(params: Params$Resource$Challenge$Verify, callback: BodyResponseCallback<Schema$VerifyChallengeResponseResult>): void;
253
+ verify(callback: BodyResponseCallback<Schema$VerifyChallengeResponseResult>): void;
254
+ }
255
+ export interface Params$Resource$Challenge$Generate extends StandardParameters {
256
+ /**
257
+ * Request body metadata
258
+ */
259
+ requestBody?: Schema$Empty;
260
+ }
261
+ export interface Params$Resource$Challenge$Verify extends StandardParameters {
262
+ /**
263
+ * Request body metadata
264
+ */
265
+ requestBody?: Schema$VerifyChallengeResponseRequest;
266
+ }
267
+ export {};
268
+ }
package/build/v2.js ADDED
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ // Copyright 2020 Google LLC
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ /* eslint-disable @typescript-eslint/no-explicit-any */
16
+ /* eslint-disable @typescript-eslint/no-unused-vars */
17
+ /* eslint-disable @typescript-eslint/no-empty-interface */
18
+ /* eslint-disable @typescript-eslint/no-namespace */
19
+ /* eslint-disable no-irregular-whitespace */
20
+ const googleapis_common_1 = require("googleapis-common");
21
+ var verifiedaccess_v2;
22
+ (function (verifiedaccess_v2) {
23
+ /**
24
+ * Chrome Verified Access API
25
+ *
26
+ * API for Verified Access chrome extension to provide credential verification for chrome devices connecting to an enterprise network
27
+ *
28
+ * @example
29
+ * ```js
30
+ * const {google} = require('googleapis');
31
+ * const verifiedaccess = google.verifiedaccess('v2');
32
+ * ```
33
+ */
34
+ class Verifiedaccess {
35
+ constructor(options, google) {
36
+ this.context = {
37
+ _options: options || {},
38
+ google,
39
+ };
40
+ this.challenge = new Resource$Challenge(this.context);
41
+ }
42
+ }
43
+ verifiedaccess_v2.Verifiedaccess = Verifiedaccess;
44
+ class Resource$Challenge {
45
+ constructor(context) {
46
+ this.context = context;
47
+ }
48
+ generate(paramsOrCallback, optionsOrCallback, callback) {
49
+ let params = (paramsOrCallback ||
50
+ {});
51
+ let options = (optionsOrCallback || {});
52
+ if (typeof paramsOrCallback === 'function') {
53
+ callback = paramsOrCallback;
54
+ params = {};
55
+ options = {};
56
+ }
57
+ if (typeof optionsOrCallback === 'function') {
58
+ callback = optionsOrCallback;
59
+ options = {};
60
+ }
61
+ const rootUrl = options.rootUrl || 'https://verifiedaccess.googleapis.com/';
62
+ const parameters = {
63
+ options: Object.assign({
64
+ url: (rootUrl + '/v2/challenge:generate').replace(/([^:]\/)\/+/g, '$1'),
65
+ method: 'POST',
66
+ }, options),
67
+ params,
68
+ requiredParams: [],
69
+ pathParams: [],
70
+ context: this.context,
71
+ };
72
+ if (callback) {
73
+ googleapis_common_1.createAPIRequest(parameters, callback);
74
+ }
75
+ else {
76
+ return googleapis_common_1.createAPIRequest(parameters);
77
+ }
78
+ }
79
+ verify(paramsOrCallback, optionsOrCallback, callback) {
80
+ let params = (paramsOrCallback || {});
81
+ let options = (optionsOrCallback || {});
82
+ if (typeof paramsOrCallback === 'function') {
83
+ callback = paramsOrCallback;
84
+ params = {};
85
+ options = {};
86
+ }
87
+ if (typeof optionsOrCallback === 'function') {
88
+ callback = optionsOrCallback;
89
+ options = {};
90
+ }
91
+ const rootUrl = options.rootUrl || 'https://verifiedaccess.googleapis.com/';
92
+ const parameters = {
93
+ options: Object.assign({
94
+ url: (rootUrl + '/v2/challenge:verify').replace(/([^:]\/)\/+/g, '$1'),
95
+ method: 'POST',
96
+ }, options),
97
+ params,
98
+ requiredParams: [],
99
+ pathParams: [],
100
+ context: this.context,
101
+ };
102
+ if (callback) {
103
+ googleapis_common_1.createAPIRequest(parameters, callback);
104
+ }
105
+ else {
106
+ return googleapis_common_1.createAPIRequest(parameters);
107
+ }
108
+ }
109
+ }
110
+ verifiedaccess_v2.Resource$Challenge = Resource$Challenge;
111
+ })(verifiedaccess_v2 = exports.verifiedaccess_v2 || (exports.verifiedaccess_v2 = {}));
112
+ //# sourceMappingURL=v2.js.map
@@ -0,0 +1 @@
1
+ {"version":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AAM;gBACN,cAAc,EAAE,EAAE;gBAClB,UAAU,EAAE,EAAE;gBACd,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC;YACF,IAAI,QAAQ,EAAE;gBACZ,oCAAgB,CACd,UAAU,EACV,QAAyC,CAC1C,CAAC;aACH;iBAAM;gBACL,OAAO,oCAAgB,CACrB,UAAU,CACX,CAAC;aACH;QACH,CAAC;KACF;IA9RY,oCAAkB,qBA8R9B,CAAA;AAeH,CAAC,EA1bgB,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QA0bjC"}
package/index.ts CHANGED
@@ -15,18 +15,30 @@
15
15
 
16
16
  import {AuthPlus, getAPI, GoogleConfigurable} from 'googleapis-common';
17
17
  import {verifiedaccess_v1} from './v1';
18
+ import {verifiedaccess_v2} from './v2';
18
19
 
19
20
  export const VERSIONS = {
20
21
  v1: verifiedaccess_v1.Verifiedaccess,
22
+ v2: verifiedaccess_v2.Verifiedaccess,
21
23
  };
22
24
 
23
25
  export function verifiedaccess(version: 'v1'): verifiedaccess_v1.Verifiedaccess;
24
26
  export function verifiedaccess(
25
27
  options: verifiedaccess_v1.Options
26
28
  ): verifiedaccess_v1.Verifiedaccess;
27
- export function verifiedaccess<T = verifiedaccess_v1.Verifiedaccess>(
29
+ export function verifiedaccess(version: 'v2'): verifiedaccess_v2.Verifiedaccess;
30
+ export function verifiedaccess(
31
+ options: verifiedaccess_v2.Options
32
+ ): verifiedaccess_v2.Verifiedaccess;
33
+ export function verifiedaccess<
34
+ T = verifiedaccess_v1.Verifiedaccess | verifiedaccess_v2.Verifiedaccess
35
+ >(
28
36
  this: GoogleConfigurable,
29
- versionOrOptions: 'v1' | verifiedaccess_v1.Options
37
+ versionOrOptions:
38
+ | 'v1'
39
+ | verifiedaccess_v1.Options
40
+ | 'v2'
41
+ | verifiedaccess_v2.Options
30
42
  ) {
31
43
  return getAPI<T>('verifiedaccess', versionOrOptions, VERSIONS, this);
32
44
  }
@@ -34,6 +46,7 @@ export function verifiedaccess<T = verifiedaccess_v1.Verifiedaccess>(
34
46
  const auth = new AuthPlus();
35
47
  export {auth};
36
48
  export {verifiedaccess_v1};
49
+ export {verifiedaccess_v2};
37
50
  export {
38
51
  AuthPlus,
39
52
  GlobalOptions,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@googleapis/verifiedaccess",
3
- "version": "0.2.0",
3
+ "version": "0.3.3",
4
4
  "description": "verifiedaccess",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -35,7 +35,7 @@
35
35
  "@microsoft/api-extractor": "^7.8.10",
36
36
  "gts": "^2.0.0",
37
37
  "null-loader": "^4.0.0",
38
- "ts-loader": "^8.0.0",
38
+ "ts-loader": "^9.0.0",
39
39
  "typescript": "~3.7.0",
40
40
  "webpack": "^5.0.0",
41
41
  "webpack-cli": "^4.0.0"
package/v1.ts CHANGED
@@ -12,7 +12,6 @@
12
12
  // limitations under the License.
13
13
 
14
14
  /* eslint-disable @typescript-eslint/no-explicit-any */
15
- /* eslint-disable @typescript-eslint/class-name-casing */
16
15
  /* eslint-disable @typescript-eslint/no-unused-vars */
17
16
  /* eslint-disable @typescript-eslint/no-empty-interface */
18
17
  /* eslint-disable @typescript-eslint/no-namespace */
@@ -139,7 +138,7 @@ export namespace verifiedaccess_v1 {
139
138
  challenge?: Schema$SignedData;
140
139
  }
141
140
  /**
142
- * A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \} The JSON representation for `Empty` is empty JSON object `{\}`.
141
+ * A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \}
143
142
  */
144
143
  export interface Schema$Empty {}
145
144
  /**
package/v2.ts ADDED
@@ -0,0 +1,480 @@
1
+ // Copyright 2020 Google LLC
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+
14
+ /* eslint-disable @typescript-eslint/no-explicit-any */
15
+ /* eslint-disable @typescript-eslint/no-unused-vars */
16
+ /* eslint-disable @typescript-eslint/no-empty-interface */
17
+ /* eslint-disable @typescript-eslint/no-namespace */
18
+ /* eslint-disable no-irregular-whitespace */
19
+
20
+ import {
21
+ OAuth2Client,
22
+ JWT,
23
+ Compute,
24
+ UserRefreshClient,
25
+ BaseExternalAccountClient,
26
+ GaxiosPromise,
27
+ GoogleConfigurable,
28
+ createAPIRequest,
29
+ MethodOptions,
30
+ StreamMethodOptions,
31
+ GlobalOptions,
32
+ GoogleAuth,
33
+ BodyResponseCallback,
34
+ APIRequestContext,
35
+ } from 'googleapis-common';
36
+ import {Readable} from 'stream';
37
+
38
+ export namespace verifiedaccess_v2 {
39
+ export interface Options extends GlobalOptions {
40
+ version: 'v2';
41
+ }
42
+
43
+ interface StandardParameters {
44
+ /**
45
+ * Auth client or API Key for the request
46
+ */
47
+ auth?:
48
+ | string
49
+ | OAuth2Client
50
+ | JWT
51
+ | Compute
52
+ | UserRefreshClient
53
+ | BaseExternalAccountClient
54
+ | GoogleAuth;
55
+
56
+ /**
57
+ * V1 error format.
58
+ */
59
+ '$.xgafv'?: string;
60
+ /**
61
+ * OAuth access token.
62
+ */
63
+ access_token?: string;
64
+ /**
65
+ * Data format for response.
66
+ */
67
+ alt?: string;
68
+ /**
69
+ * JSONP
70
+ */
71
+ callback?: string;
72
+ /**
73
+ * Selector specifying which fields to include in a partial response.
74
+ */
75
+ fields?: string;
76
+ /**
77
+ * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
78
+ */
79
+ key?: string;
80
+ /**
81
+ * OAuth 2.0 token for the current user.
82
+ */
83
+ oauth_token?: string;
84
+ /**
85
+ * Returns response with indentations and line breaks.
86
+ */
87
+ prettyPrint?: boolean;
88
+ /**
89
+ * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
90
+ */
91
+ quotaUser?: string;
92
+ /**
93
+ * Legacy upload protocol for media (e.g. "media", "multipart").
94
+ */
95
+ uploadType?: string;
96
+ /**
97
+ * Upload protocol for media (e.g. "raw", "multipart").
98
+ */
99
+ upload_protocol?: string;
100
+ }
101
+
102
+ /**
103
+ * Chrome Verified Access API
104
+ *
105
+ * API for Verified Access chrome extension to provide credential verification for chrome devices connecting to an enterprise network
106
+ *
107
+ * @example
108
+ * ```js
109
+ * const {google} = require('googleapis');
110
+ * const verifiedaccess = google.verifiedaccess('v2');
111
+ * ```
112
+ */
113
+ export class Verifiedaccess {
114
+ context: APIRequestContext;
115
+ challenge: Resource$Challenge;
116
+
117
+ constructor(options: GlobalOptions, google?: GoogleConfigurable) {
118
+ this.context = {
119
+ _options: options || {},
120
+ google,
121
+ };
122
+
123
+ this.challenge = new Resource$Challenge(this.context);
124
+ }
125
+ }
126
+
127
+ /**
128
+ * Result message for VerifiedAccess.CreateChallenge.
129
+ */
130
+ export interface Schema$Challenge {
131
+ /**
132
+ * Challenge generated with the old signing key, the bytes representation of SignedData (this will only be present during key rotation).
133
+ */
134
+ alternativeChallenge?: string | null;
135
+ /**
136
+ * Generated challenge, the bytes representation of SignedData.
137
+ */
138
+ challenge?: string | null;
139
+ }
140
+ /**
141
+ * A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \}
142
+ */
143
+ export interface Schema$Empty {}
144
+ /**
145
+ * Signed ChallengeResponse.
146
+ */
147
+ export interface Schema$VerifyChallengeResponseRequest {
148
+ /**
149
+ * Required. The generated response to the challenge, the bytes representation of SignedData.
150
+ */
151
+ challengeResponse?: string | null;
152
+ /**
153
+ * Optional. Service can optionally provide identity information about the device or user associated with the key. For an EMK, this value is the enrolled domain. For an EUK, this value is the user's email address. If present, this value will be checked against contents of the response, and verification will fail if there is no match.
154
+ */
155
+ expectedIdentity?: string | null;
156
+ }
157
+ /**
158
+ * Result message for VerifiedAccess.VerifyChallengeResponse.
159
+ */
160
+ export interface Schema$VerifyChallengeResponseResult {
161
+ /**
162
+ * Device permanent id is returned in this field (for the machine response only).
163
+ */
164
+ devicePermanentId?: string | null;
165
+ /**
166
+ * Device signal in json string representation.
167
+ */
168
+ deviceSignal?: string | null;
169
+ /**
170
+ * Device attested key trust level.
171
+ */
172
+ keyTrustLevel?: string | null;
173
+ /**
174
+ * Certificate Signing Request (in the SPKAC format, base64 encoded) is returned in this field. This field will be set only if device has included CSR in its challenge response. (the option to include CSR is now available for both user and machine responses)
175
+ */
176
+ signedPublicKeyAndChallenge?: string | null;
177
+ }
178
+
179
+ export class Resource$Challenge {
180
+ context: APIRequestContext;
181
+ constructor(context: APIRequestContext) {
182
+ this.context = context;
183
+ }
184
+
185
+ /**
186
+ * Generates a new challenge.
187
+ * @example
188
+ * ```js
189
+ * // Before running the sample:
190
+ * // - Enable the API at:
191
+ * // https://console.developers.google.com/apis/api/verifiedaccess.googleapis.com
192
+ * // - Login into gcloud by running:
193
+ * // `$ gcloud auth application-default login`
194
+ * // - Install the npm module by running:
195
+ * // `$ npm install googleapis`
196
+ *
197
+ * const {google} = require('googleapis');
198
+ * const verifiedaccess = google.verifiedaccess('v2');
199
+ *
200
+ * async function main() {
201
+ * const auth = new google.auth.GoogleAuth({
202
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
203
+ * scopes: ['https://www.googleapis.com/auth/verifiedaccess'],
204
+ * });
205
+ *
206
+ * // Acquire an auth client, and bind it to all future calls
207
+ * const authClient = await auth.getClient();
208
+ * google.options({auth: authClient});
209
+ *
210
+ * // Do the magic
211
+ * const res = await verifiedaccess.challenge.generate({
212
+ * // Request body metadata
213
+ * requestBody: {
214
+ * // request body parameters
215
+ * // {}
216
+ * },
217
+ * });
218
+ * console.log(res.data);
219
+ *
220
+ * // Example response
221
+ * // {
222
+ * // "alternativeChallenge": "my_alternativeChallenge",
223
+ * // "challenge": "my_challenge"
224
+ * // }
225
+ * }
226
+ *
227
+ * main().catch(e => {
228
+ * console.error(e);
229
+ * throw e;
230
+ * });
231
+ *
232
+ * ```
233
+ *
234
+ * @param params - Parameters for request
235
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
236
+ * @param callback - Optional callback that handles the response.
237
+ * @returns A promise if used with async/await, or void if used with a callback.
238
+ */
239
+ generate(
240
+ params: Params$Resource$Challenge$Generate,
241
+ options: StreamMethodOptions
242
+ ): GaxiosPromise<Readable>;
243
+ generate(
244
+ params?: Params$Resource$Challenge$Generate,
245
+ options?: MethodOptions
246
+ ): GaxiosPromise<Schema$Challenge>;
247
+ generate(
248
+ params: Params$Resource$Challenge$Generate,
249
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
250
+ callback: BodyResponseCallback<Readable>
251
+ ): void;
252
+ generate(
253
+ params: Params$Resource$Challenge$Generate,
254
+ options: MethodOptions | BodyResponseCallback<Schema$Challenge>,
255
+ callback: BodyResponseCallback<Schema$Challenge>
256
+ ): void;
257
+ generate(
258
+ params: Params$Resource$Challenge$Generate,
259
+ callback: BodyResponseCallback<Schema$Challenge>
260
+ ): void;
261
+ generate(callback: BodyResponseCallback<Schema$Challenge>): void;
262
+ generate(
263
+ paramsOrCallback?:
264
+ | Params$Resource$Challenge$Generate
265
+ | BodyResponseCallback<Schema$Challenge>
266
+ | BodyResponseCallback<Readable>,
267
+ optionsOrCallback?:
268
+ | MethodOptions
269
+ | StreamMethodOptions
270
+ | BodyResponseCallback<Schema$Challenge>
271
+ | BodyResponseCallback<Readable>,
272
+ callback?:
273
+ | BodyResponseCallback<Schema$Challenge>
274
+ | BodyResponseCallback<Readable>
275
+ ): void | GaxiosPromise<Schema$Challenge> | GaxiosPromise<Readable> {
276
+ let params = (paramsOrCallback ||
277
+ {}) as Params$Resource$Challenge$Generate;
278
+ let options = (optionsOrCallback || {}) as MethodOptions;
279
+
280
+ if (typeof paramsOrCallback === 'function') {
281
+ callback = paramsOrCallback;
282
+ params = {} as Params$Resource$Challenge$Generate;
283
+ options = {};
284
+ }
285
+
286
+ if (typeof optionsOrCallback === 'function') {
287
+ callback = optionsOrCallback;
288
+ options = {};
289
+ }
290
+
291
+ const rootUrl =
292
+ options.rootUrl || 'https://verifiedaccess.googleapis.com/';
293
+ const parameters = {
294
+ options: Object.assign(
295
+ {
296
+ url: (rootUrl + '/v2/challenge:generate').replace(
297
+ /([^:]\/)\/+/g,
298
+ '$1'
299
+ ),
300
+ method: 'POST',
301
+ },
302
+ options
303
+ ),
304
+ params,
305
+ requiredParams: [],
306
+ pathParams: [],
307
+ context: this.context,
308
+ };
309
+ if (callback) {
310
+ createAPIRequest<Schema$Challenge>(
311
+ parameters,
312
+ callback as BodyResponseCallback<unknown>
313
+ );
314
+ } else {
315
+ return createAPIRequest<Schema$Challenge>(parameters);
316
+ }
317
+ }
318
+
319
+ /**
320
+ * Verifies the challenge response.
321
+ * @example
322
+ * ```js
323
+ * // Before running the sample:
324
+ * // - Enable the API at:
325
+ * // https://console.developers.google.com/apis/api/verifiedaccess.googleapis.com
326
+ * // - Login into gcloud by running:
327
+ * // `$ gcloud auth application-default login`
328
+ * // - Install the npm module by running:
329
+ * // `$ npm install googleapis`
330
+ *
331
+ * const {google} = require('googleapis');
332
+ * const verifiedaccess = google.verifiedaccess('v2');
333
+ *
334
+ * async function main() {
335
+ * const auth = new google.auth.GoogleAuth({
336
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
337
+ * scopes: ['https://www.googleapis.com/auth/verifiedaccess'],
338
+ * });
339
+ *
340
+ * // Acquire an auth client, and bind it to all future calls
341
+ * const authClient = await auth.getClient();
342
+ * google.options({auth: authClient});
343
+ *
344
+ * // Do the magic
345
+ * const res = await verifiedaccess.challenge.verify({
346
+ * // Request body metadata
347
+ * requestBody: {
348
+ * // request body parameters
349
+ * // {
350
+ * // "challengeResponse": "my_challengeResponse",
351
+ * // "expectedIdentity": "my_expectedIdentity"
352
+ * // }
353
+ * },
354
+ * });
355
+ * console.log(res.data);
356
+ *
357
+ * // Example response
358
+ * // {
359
+ * // "devicePermanentId": "my_devicePermanentId",
360
+ * // "deviceSignal": "my_deviceSignal",
361
+ * // "keyTrustLevel": "my_keyTrustLevel",
362
+ * // "signedPublicKeyAndChallenge": "my_signedPublicKeyAndChallenge"
363
+ * // }
364
+ * }
365
+ *
366
+ * main().catch(e => {
367
+ * console.error(e);
368
+ * throw e;
369
+ * });
370
+ *
371
+ * ```
372
+ *
373
+ * @param params - Parameters for request
374
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
375
+ * @param callback - Optional callback that handles the response.
376
+ * @returns A promise if used with async/await, or void if used with a callback.
377
+ */
378
+ verify(
379
+ params: Params$Resource$Challenge$Verify,
380
+ options: StreamMethodOptions
381
+ ): GaxiosPromise<Readable>;
382
+ verify(
383
+ params?: Params$Resource$Challenge$Verify,
384
+ options?: MethodOptions
385
+ ): GaxiosPromise<Schema$VerifyChallengeResponseResult>;
386
+ verify(
387
+ params: Params$Resource$Challenge$Verify,
388
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
389
+ callback: BodyResponseCallback<Readable>
390
+ ): void;
391
+ verify(
392
+ params: Params$Resource$Challenge$Verify,
393
+ options:
394
+ | MethodOptions
395
+ | BodyResponseCallback<Schema$VerifyChallengeResponseResult>,
396
+ callback: BodyResponseCallback<Schema$VerifyChallengeResponseResult>
397
+ ): void;
398
+ verify(
399
+ params: Params$Resource$Challenge$Verify,
400
+ callback: BodyResponseCallback<Schema$VerifyChallengeResponseResult>
401
+ ): void;
402
+ verify(
403
+ callback: BodyResponseCallback<Schema$VerifyChallengeResponseResult>
404
+ ): void;
405
+ verify(
406
+ paramsOrCallback?:
407
+ | Params$Resource$Challenge$Verify
408
+ | BodyResponseCallback<Schema$VerifyChallengeResponseResult>
409
+ | BodyResponseCallback<Readable>,
410
+ optionsOrCallback?:
411
+ | MethodOptions
412
+ | StreamMethodOptions
413
+ | BodyResponseCallback<Schema$VerifyChallengeResponseResult>
414
+ | BodyResponseCallback<Readable>,
415
+ callback?:
416
+ | BodyResponseCallback<Schema$VerifyChallengeResponseResult>
417
+ | BodyResponseCallback<Readable>
418
+ ):
419
+ | void
420
+ | GaxiosPromise<Schema$VerifyChallengeResponseResult>
421
+ | GaxiosPromise<Readable> {
422
+ let params = (paramsOrCallback || {}) as Params$Resource$Challenge$Verify;
423
+ let options = (optionsOrCallback || {}) as MethodOptions;
424
+
425
+ if (typeof paramsOrCallback === 'function') {
426
+ callback = paramsOrCallback;
427
+ params = {} as Params$Resource$Challenge$Verify;
428
+ options = {};
429
+ }
430
+
431
+ if (typeof optionsOrCallback === 'function') {
432
+ callback = optionsOrCallback;
433
+ options = {};
434
+ }
435
+
436
+ const rootUrl =
437
+ options.rootUrl || 'https://verifiedaccess.googleapis.com/';
438
+ const parameters = {
439
+ options: Object.assign(
440
+ {
441
+ url: (rootUrl + '/v2/challenge:verify').replace(
442
+ /([^:]\/)\/+/g,
443
+ '$1'
444
+ ),
445
+ method: 'POST',
446
+ },
447
+ options
448
+ ),
449
+ params,
450
+ requiredParams: [],
451
+ pathParams: [],
452
+ context: this.context,
453
+ };
454
+ if (callback) {
455
+ createAPIRequest<Schema$VerifyChallengeResponseResult>(
456
+ parameters,
457
+ callback as BodyResponseCallback<unknown>
458
+ );
459
+ } else {
460
+ return createAPIRequest<Schema$VerifyChallengeResponseResult>(
461
+ parameters
462
+ );
463
+ }
464
+ }
465
+ }
466
+
467
+ export interface Params$Resource$Challenge$Generate
468
+ extends StandardParameters {
469
+ /**
470
+ * Request body metadata
471
+ */
472
+ requestBody?: Schema$Empty;
473
+ }
474
+ export interface Params$Resource$Challenge$Verify extends StandardParameters {
475
+ /**
476
+ * Request body metadata
477
+ */
478
+ requestBody?: Schema$VerifyChallengeResponseRequest;
479
+ }
480
+ }