Skip to content

Commit e192a1f

Browse files
authored
docs: fix tsdoc comments to avoid warnings (#219)
* docs: fix tsdoc comments to avoid warnings This commit contains changes to avoid all the tsdoc-related warnings that occur during the build of the project. * build: bump api-extractor/api-documenter to latest versions Signed-off-by: Phil Adams <[email protected]>
1 parent bb91462 commit e192a1f

32 files changed

+2789
-2336
lines changed

.secrets.baseline

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files": "package-lock.json|^.secrets.baseline$",
44
"lines": null
55
},
6-
"generated_at": "2022-04-04T16:42:23Z",
6+
"generated_at": "2022-12-20T17:56:56Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"
@@ -91,32 +91,32 @@
9191
"verified_result": null
9292
}
9393
],
94-
"MIGRATION-V1.md": [
94+
"README.md": [
9595
{
96-
"hashed_secret": "a00eada80f974d9446d54719567f67349cdc2d34",
96+
"hashed_secret": "32e8612d8ca77c7ea8374aa7918db8e5df9252ed",
9797
"is_secret": false,
9898
"is_verified": false,
99-
"line_number": 19,
99+
"line_number": 61,
100100
"type": "Secret Keyword",
101101
"verified_result": null
102102
}
103103
],
104-
"README.md": [
104+
"auth/authenticators/authenticator.ts": [
105105
{
106-
"hashed_secret": "32e8612d8ca77c7ea8374aa7918db8e5df9252ed",
106+
"hashed_secret": "fdee05598fdd57ff8e9ae29e92c25a04f2c52fa6",
107107
"is_secret": false,
108108
"is_verified": false,
109-
"line_number": 61,
109+
"line_number": 39,
110110
"type": "Secret Keyword",
111111
"verified_result": null
112112
}
113113
],
114-
"auth/authenticators/authenticator.ts": [
114+
"auth/authenticators/basic-authenticator.ts": [
115115
{
116-
"hashed_secret": "fdee05598fdd57ff8e9ae29e92c25a04f2c52fa6",
116+
"hashed_secret": "bbccdf2efb33b52e6c9d0a14dd70b2d415fbea6e",
117117
"is_secret": false,
118118
"is_verified": false,
119-
"line_number": 39,
119+
"line_number": 52,
120120
"type": "Secret Keyword",
121121
"verified_result": null
122122
}
@@ -162,15 +162,15 @@
162162
"hashed_secret": "45c43fe97e3a06ab078b0eeff6fbe622cc417a25",
163163
"is_secret": false,
164164
"is_verified": false,
165-
"line_number": 91,
165+
"line_number": 89,
166166
"type": "Secret Keyword",
167167
"verified_result": null
168168
},
169169
{
170170
"hashed_secret": "99833a8b234b57b886a9aef1dba187fdd7ceece8",
171171
"is_secret": false,
172172
"is_verified": false,
173-
"line_number": 93,
173+
"line_number": 91,
174174
"type": "Secret Keyword",
175175
"verified_result": null
176176
}
@@ -224,23 +224,23 @@
224224
"hashed_secret": "f84f793e0af9ade37c8b927bc5091e98f35bf821",
225225
"is_secret": false,
226226
"is_verified": false,
227-
"line_number": 83,
227+
"line_number": 84,
228228
"type": "Secret Keyword",
229229
"verified_result": null
230230
},
231231
{
232232
"hashed_secret": "45c43fe97e3a06ab078b0eeff6fbe622cc417a25",
233233
"is_secret": false,
234234
"is_verified": false,
235-
"line_number": 120,
235+
"line_number": 118,
236236
"type": "Secret Keyword",
237237
"verified_result": null
238238
},
239239
{
240240
"hashed_secret": "99833a8b234b57b886a9aef1dba187fdd7ceece8",
241241
"is_secret": false,
242242
"is_verified": false,
243-
"line_number": 122,
243+
"line_number": 120,
244244
"type": "Secret Keyword",
245245
"verified_result": null
246246
}
@@ -250,23 +250,23 @@
250250
"hashed_secret": "8f4bfc22c4fd7cb884f94ec175ff4a3284a174a1",
251251
"is_secret": false,
252252
"is_verified": false,
253-
"line_number": 58,
253+
"line_number": 59,
254254
"type": "Secret Keyword",
255255
"verified_result": null
256256
},
257257
{
258258
"hashed_secret": "0358c67856fb6a21c4767daf02fcb8fe4dc0a318",
259259
"is_secret": false,
260260
"is_verified": false,
261-
"line_number": 61,
261+
"line_number": 62,
262262
"type": "Secret Keyword",
263263
"verified_result": null
264264
},
265265
{
266266
"hashed_secret": "dbb19b8ae3b78f908e1467721fe4c9f0b0529d9b",
267267
"is_secret": false,
268268
"is_verified": false,
269-
"line_number": 62,
269+
"line_number": 63,
270270
"type": "Secret Keyword",
271271
"verified_result": null
272272
}
@@ -296,21 +296,11 @@
296296
"hashed_secret": "45c43fe97e3a06ab078b0eeff6fbe622cc417a25",
297297
"is_secret": false,
298298
"is_verified": false,
299-
"line_number": 273,
299+
"line_number": 278,
300300
"type": "Secret Keyword",
301301
"verified_result": null
302302
}
303303
],
304-
"scripts/jsdoc/generate_index_html.sh": [
305-
{
306-
"hashed_secret": "973f71aa51bf4dcef6aa10f52089747a85c64a73",
307-
"is_secret": false,
308-
"is_verified": false,
309-
"line_number": 19,
310-
"type": "Base64 High Entropy String",
311-
"verified_result": null
312-
}
313-
],
314304
"test/resources/ibm-credentials.env": [
315305
{
316306
"hashed_secret": "5c5a15a8b0b3e154d77746945e563ba40100681b",
@@ -534,7 +524,7 @@
534524
}
535525
]
536526
},
537-
"version": "0.13.1+ibm.47.dss",
527+
"version": "0.13.1+ibm.55.dss",
538528
"word_list": {
539529
"file": null,
540530
"hash": null

auth/authenticators/authenticator-interface.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corp. 2019, 2021.
2+
* (C) Copyright IBM Corp. 2019, 2022.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -40,9 +40,8 @@ export interface AuthenticatorInterface {
4040
/**
4141
* Add authentication information to the specified request.
4242
*
43-
* @param {object} requestOptions The request to augment with authentication information.
44-
* @param {object.<string, string>} requestOptions.headers The headers the
45-
* authentication information will be added to.
43+
* @param requestOptions - The request to which authentication information is added
44+
* (in the headers field).
4645
*/
4746
authenticate(requestOptions: AuthenticateOptions): Promise<void>;
4847

auth/authenticators/authenticator.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable @typescript-eslint/no-unused-vars, class-methods-use-this */
22

33
/**
4-
* (C) Copyright IBM Corp. 2019, 2021.
4+
* (C) Copyright IBM Corp. 2019, 2022.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -45,8 +45,7 @@ export class Authenticator implements AuthenticatorInterface {
4545
/**
4646
* Create a new Authenticator instance.
4747
*
48-
* @throws {Error} The `new` keyword was not used to create construct the
49-
* authenticator.
48+
* @throws Error: the "new" keyword was not used to construct the authenticator.
5049
*/
5150
constructor() {
5251
if (!(this instanceof Authenticator)) {
@@ -57,11 +56,8 @@ export class Authenticator implements AuthenticatorInterface {
5756
/**
5857
* Augment the request with authentication information.
5958
*
60-
* @param {object} requestOptions - The request to augment with authentication information.
61-
* @param {object.<string, string>} requestOptions.headers - The headers the
62-
* authentication information will be added too.
63-
* @throws {Error} - The authenticate method was not implemented by a
64-
* subclass.
59+
* @param requestOptions - The request to augment with authentication information.
60+
* @throws Error: The authenticate method was not implemented by a subclass.
6561
*/
6662
public authenticate(requestOptions: AuthenticateOptions): Promise<void> {
6763
const error = new Error('Should be implemented by subclass!');
@@ -72,7 +68,7 @@ export class Authenticator implements AuthenticatorInterface {
7268
* Retrieves the authenticator's type.
7369
* The returned value will be the same string that is used
7470
* when configuring an instance of the authenticator with the
75-
* "<service_name>_AUTH_TYPE" configuration property
71+
* \<service_name\>_AUTH_TYPE configuration property
7672
* (e.g. "basic", "iam", etc.).
7773
* This function should be overridden in each authenticator
7874
* implementation class that extends this class.

auth/authenticators/basic-authenticator.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corp. 2019, 2021.
2+
* (C) Copyright IBM Corp. 2019, 2022.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@ export type Options = {
3333
*
3434
* Basic Authorization will be sent as an Authorization header in the form:
3535
*
36-
* Authorization: Basic <encoded username and password>
36+
* Authorization: Basic \<encoded username and password\>
3737
*
3838
*/
3939
export class BasicAuthenticator extends Authenticator {
@@ -46,10 +46,12 @@ export class BasicAuthenticator extends Authenticator {
4646
/**
4747
* Create a new BasicAuthenticator instance.
4848
*
49-
* @param {object} options Configuration options for basic authentication.
50-
* @param {string} options.username The username portion of basic authentication.
51-
* @param {string} options.password The password portion of basic authentication.
52-
* @throws {Error} The configuration options are not valid.
49+
* @param options - Configuration options for basic authentication.
50+
* This should be an object containing these fields:
51+
* - username: the username portion of basic authentication
52+
* - password: the password portion of basic authentication
53+
*
54+
* @throws Error: the configuration options are not valid.
5355
*/
5456
constructor(options: Options) {
5557
super();
@@ -60,14 +62,12 @@ export class BasicAuthenticator extends Authenticator {
6062
}
6163

6264
/**
63-
* Add basic authentication information to `request`. The basic authentication information
64-
* will be set in the Authorization property of`request.headers` in the form:
65+
* Add basic authentication information to `requestOptions`. The basic authentication information
66+
* will be set in the Authorization property of `requestOptions.headers` in the form:
6567
*
66-
* Authorization: Basic <encoded username and password>
68+
* Authorization: Basic \<encoded username and password\>
6769
*
68-
* @param {object} requestOptions - The request to augment with authentication information.
69-
* @param {object.<string, string>} requestOptions.headers - The headers the
70-
* authentication information will be added too.
70+
* @param requestOptions - The request to augment with authentication information.
7171
*/
7272
public authenticate(requestOptions: AuthenticateOptions): Promise<void> {
7373
return new Promise((resolve) => {

auth/authenticators/bearer-token-authenticator.ts

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corp. 2019, 2021.
2+
* (C) Copyright IBM Corp. 2019, 2022.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -31,7 +31,7 @@ export type Options = {
3131
*
3232
* The bearer token will be sent as an Authorization header in the form:
3333
*
34-
* Authorization: Bearer <bearer-token>
34+
* Authorization: Bearer \<bearer-token\>
3535
*/
3636
export class BearerTokenAuthenticator extends Authenticator {
3737
protected requiredOptions = ['bearerToken'];
@@ -41,10 +41,10 @@ export class BearerTokenAuthenticator extends Authenticator {
4141
/**
4242
* Create a new BearerTokenAuthenticator instance.
4343
*
44-
* @param {object} options Configuration options for bearer authentication.
45-
* @param {string} options.bearerToken The bearer token to be added
46-
* to requests.
47-
* @throws {Error} The configuration bearerToken is not valid, or unspecified.
44+
* @param options - Configuration options for bearer authentication.
45+
* This should be an object containing the "bearerToken" field.
46+
*
47+
* @throws Error: the options.bearerToken field is not valid, or unspecified
4848
*/
4949
constructor(options: Options) {
5050
super();
@@ -57,23 +57,20 @@ export class BearerTokenAuthenticator extends Authenticator {
5757
/**
5858
* Set a new bearer token to be sent in subsequent requests.
5959
*
60-
* @param {string} bearerToken The bearer token that will be sent in service
60+
* @param bearerToken - The bearer token that will be sent in service
6161
* requests.
6262
*/
6363
public setBearerToken(bearerToken: string): void {
6464
this.bearerToken = bearerToken;
6565
}
6666

6767
/**
68-
* Add a bearer token to the `request`. The bearer token information
69-
* will be set in the Authorization property of`request.headers` in the form:
68+
* Add a bearer token to `requestOptions`. The bearer token information
69+
* will be set in the Authorization property of "requestOptions.headers" in the form:
7070
*
71-
* Authorization: Bearer <bearer-token>
71+
* Authorization: Bearer \<bearer-token\>
7272
*
73-
* @param {object} requestOptions - The request to augment with authentication
74-
* information.
75-
* @param {object.<string, string>} requestOptions.headers - The headers the
76-
* authentication information will be added to.
73+
* @param requestOptions - The request to augment with authentication information.
7774
*/
7875
public authenticate(requestOptions: AuthenticateOptions): Promise<void> {
7976
return new Promise((resolve) => {

auth/authenticators/cloud-pak-for-data-authenticator.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright IBM Corp. 2019, 2021.
2+
* (C) Copyright IBM Corp. 2019, 2022.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -31,12 +31,12 @@ export interface Options extends BaseOptions {
3131
}
3232

3333
/**
34-
* The [[CloudPakForDataAuthenticator]] will either use a username/password pair or a username/apikey pair to obtain
34+
* The CloudPakForDataAuthenticator will either use a username/password pair or a username/apikey pair to obtain
3535
* a bearer token from a token server. When the bearer token expires, a new token is obtained from the token server.
3636
*
3737
* The bearer token will be sent as an Authorization header in the form:
3838
*
39-
* Authorization: Bearer <bearer-token>
39+
* Authorization: Bearer \<bearer-token\>
4040
*/
4141
export class CloudPakForDataAuthenticator extends TokenRequestBasedAuthenticator {
4242
protected requiredOptions = ['username', 'url'];
@@ -50,19 +50,19 @@ export class CloudPakForDataAuthenticator extends TokenRequestBasedAuthenticator
5050
private apikey: string;
5151

5252
/**
53-
* Create a new [[CloudPakForDataAuthenticator]] instance.
53+
* Create a new CloudPakForDataAuthenticator instance.
5454
*
55-
* @param {object} options Configuration options for CloudPakForData authentication.
56-
* @param {string} options.url For HTTP token requests.
57-
* @param {string} options.username The username used to obtain a bearer token.
58-
* @param {string} [options.password] The password used to obtain a bearer token [required if apikey not specified].
59-
* @param {string} [options.apikey] The API key used to obtain a bearer token [required if password not specified].
60-
* @param {boolean} [options.disableSslVerification] A flag that indicates
61-
* whether verification of the token server's SSL certificate should be
62-
* disabled or not
63-
* @param {object<string, string>} [options.headers] to be sent with every.
64-
* @throws `Error` The username, password, and/or url are not valid, or unspecified, for Cloud Pak For Data token
65-
* requests.
55+
* @param options - Configuration options for CloudPakForData authentication.
56+
* This should be an object containing these fields:
57+
* - url: (required) the endpoint URL for the CloudPakForData token service
58+
* - username: (required) the username used to obtain a bearer token
59+
* - password: (optional) the password used to obtain a bearer token (required if apikey is not specified)
60+
* - apikey: (optional) the API key used to obtain a bearer token (required if password is not specified)
61+
* - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate
62+
* should be disabled or not
63+
* - headers: (optional) a set of HTTP headers to be sent with each request to the token service
64+
*
65+
* @throws Error: the username, password, and/or url are not valid, or unspecified, for Cloud Pak For Data token requests.
6666
*/
6767
constructor(options: Options) {
6868
super(options);

0 commit comments

Comments
 (0)