ibm-cloud-sdk-core 4.1.5 → 4.2.1

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.
Files changed (44) hide show
  1. package/.secrets.baseline +57 -9
  2. package/Authentication.md +73 -0
  3. package/CHANGELOG.md +14 -0
  4. package/auth/authenticators/authenticator.d.ts +2 -1
  5. package/auth/authenticators/authenticator.js +1 -0
  6. package/auth/authenticators/index.d.ts +2 -0
  7. package/auth/authenticators/index.js +3 -1
  8. package/auth/authenticators/mcsp-authenticator.d.ts +57 -0
  9. package/auth/authenticators/mcsp-authenticator.js +82 -0
  10. package/auth/token-managers/index.d.ts +5 -2
  11. package/auth/token-managers/index.js +7 -3
  12. package/auth/token-managers/mcsp-token-manager.d.ts +59 -0
  13. package/auth/token-managers/mcsp-token-manager.js +94 -0
  14. package/auth/utils/get-authenticator-from-environment.js +3 -0
  15. package/build/docs/ibm-cloud-sdk-core.authenticator.authtype_mcsp.md +11 -0
  16. package/build/docs/ibm-cloud-sdk-core.authenticator.md +1 -0
  17. package/build/docs/ibm-cloud-sdk-core.mcspauthenticator._constructor_.md +24 -0
  18. package/build/docs/ibm-cloud-sdk-core.mcspauthenticator.authenticationtype.md +19 -0
  19. package/build/docs/ibm-cloud-sdk-core.mcspauthenticator.md +34 -0
  20. package/build/docs/ibm-cloud-sdk-core.mcspauthenticator.requiredoptions.md +11 -0
  21. package/build/docs/ibm-cloud-sdk-core.mcspauthenticator.tokenmanager.md +11 -0
  22. package/build/docs/ibm-cloud-sdk-core.mcsptokenmanager._constructor_.md +24 -0
  23. package/build/docs/ibm-cloud-sdk-core.mcsptokenmanager.md +35 -0
  24. package/build/docs/ibm-cloud-sdk-core.mcsptokenmanager.requesttoken.md +15 -0
  25. package/build/docs/ibm-cloud-sdk-core.mcsptokenmanager.requiredoptions.md +11 -0
  26. package/build/docs/ibm-cloud-sdk-core.md +2 -0
  27. package/docs/ibm-cloud-sdk-core.api.json +319 -1
  28. package/es/auth/authenticators/authenticator.d.ts +2 -1
  29. package/es/auth/authenticators/authenticator.js +1 -0
  30. package/es/auth/authenticators/index.d.ts +2 -0
  31. package/es/auth/authenticators/index.js +1 -0
  32. package/es/auth/authenticators/mcsp-authenticator.d.ts +57 -0
  33. package/es/auth/authenticators/mcsp-authenticator.js +60 -0
  34. package/es/auth/token-managers/index.d.ts +5 -2
  35. package/es/auth/token-managers/index.js +5 -2
  36. package/es/auth/token-managers/mcsp-token-manager.d.ts +59 -0
  37. package/es/auth/token-managers/mcsp-token-manager.js +69 -0
  38. package/es/auth/utils/get-authenticator-from-environment.js +4 -1
  39. package/es/tsdoc-metadata.json +1 -1
  40. package/etc/ibm-cloud-sdk-core.api.md +23 -0
  41. package/ibm-cloud-sdk-core.d.ts +79 -0
  42. package/package.json +2 -2
  43. package/temp/ibm-cloud-sdk-core.api.json +319 -1
  44. package/temp/ibm-cloud-sdk-core.api.md +23 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "metadata": {
3
3
  "toolPackage": "@microsoft/api-extractor",
4
- "toolVersion": "7.38.3",
4
+ "toolVersion": "7.39.0",
5
5
  "schemaVersion": 1011,
6
6
  "oldestForwardsCompatibleVersion": 1001,
7
7
  "tsdocConfig": {
@@ -569,6 +569,36 @@
569
569
  "isProtected": false,
570
570
  "isAbstract": false
571
571
  },
572
+ {
573
+ "kind": "Property",
574
+ "canonicalReference": "ibm-cloud-sdk-core!Authenticator.AUTHTYPE_MCSP:member",
575
+ "docComment": "",
576
+ "excerptTokens": [
577
+ {
578
+ "kind": "Content",
579
+ "text": "static AUTHTYPE_MCSP: "
580
+ },
581
+ {
582
+ "kind": "Content",
583
+ "text": "string"
584
+ },
585
+ {
586
+ "kind": "Content",
587
+ "text": ";"
588
+ }
589
+ ],
590
+ "isReadonly": false,
591
+ "isOptional": false,
592
+ "releaseTag": "Public",
593
+ "name": "AUTHTYPE_MCSP",
594
+ "propertyTypeTokenRange": {
595
+ "startIndex": 1,
596
+ "endIndex": 2
597
+ },
598
+ "isStatic": true,
599
+ "isProtected": false,
600
+ "isAbstract": false
601
+ },
572
602
  {
573
603
  "kind": "Property",
574
604
  "canonicalReference": "ibm-cloud-sdk-core!Authenticator.AUTHTYPE_NOAUTH:member",
@@ -5415,6 +5445,294 @@
5415
5445
  "endIndex": 2
5416
5446
  }
5417
5447
  },
5448
+ {
5449
+ "kind": "Class",
5450
+ "canonicalReference": "ibm-cloud-sdk-core!McspAuthenticator:class",
5451
+ "docComment": "/**\n * The McspAuthenticator uses an apikey to obtain an access token from the MCSP token server. When the access token expires, a new access token is obtained from the token server. The access token will be added to outbound requests via the Authorization header of the form: \"Authorization: Bearer <access-token>\"\n */\n",
5452
+ "excerptTokens": [
5453
+ {
5454
+ "kind": "Content",
5455
+ "text": "export declare class McspAuthenticator extends "
5456
+ },
5457
+ {
5458
+ "kind": "Reference",
5459
+ "text": "TokenRequestBasedAuthenticator",
5460
+ "canonicalReference": "ibm-cloud-sdk-core!TokenRequestBasedAuthenticator:class"
5461
+ },
5462
+ {
5463
+ "kind": "Content",
5464
+ "text": " "
5465
+ }
5466
+ ],
5467
+ "fileUrlPath": "dist/es/auth/authenticators/mcsp-authenticator.d.ts",
5468
+ "releaseTag": "Public",
5469
+ "isAbstract": false,
5470
+ "name": "McspAuthenticator",
5471
+ "preserveMemberOrder": false,
5472
+ "members": [
5473
+ {
5474
+ "kind": "Constructor",
5475
+ "canonicalReference": "ibm-cloud-sdk-core!McspAuthenticator:constructor(1)",
5476
+ "docComment": "/**\n * Create a new McspAuthenticator instance.\n *\n * @param options - Configuration options for CloudPakForData authentication. This should be an object containing these fields: - url: (required) the endpoint URL for the CloudPakForData token service - username: (required) the username used to obtain a bearer token - password: (optional) the password used to obtain a bearer token (required if apikey is not specified) - apikey: (optional) the API key used to obtain a bearer token (required if password is not specified) - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate should be disabled or not - headers: (optional) a set of HTTP headers to be sent with each request to the token service\n *\n * @throws\n *\n * Error: the username, password, and/or url are not valid, or unspecified, for Cloud Pak For Data token requests.\n */\n",
5477
+ "excerptTokens": [
5478
+ {
5479
+ "kind": "Content",
5480
+ "text": "constructor(options: "
5481
+ },
5482
+ {
5483
+ "kind": "Reference",
5484
+ "text": "Options",
5485
+ "canonicalReference": "ibm-cloud-sdk-core!~Options_12:interface"
5486
+ },
5487
+ {
5488
+ "kind": "Content",
5489
+ "text": ");"
5490
+ }
5491
+ ],
5492
+ "releaseTag": "Public",
5493
+ "isProtected": false,
5494
+ "overloadIndex": 1,
5495
+ "parameters": [
5496
+ {
5497
+ "parameterName": "options",
5498
+ "parameterTypeTokenRange": {
5499
+ "startIndex": 1,
5500
+ "endIndex": 2
5501
+ },
5502
+ "isOptional": false
5503
+ }
5504
+ ]
5505
+ },
5506
+ {
5507
+ "kind": "Method",
5508
+ "canonicalReference": "ibm-cloud-sdk-core!McspAuthenticator#authenticationType:member(1)",
5509
+ "docComment": "/**\n * Returns the authenticator's type ('cp4d').\n *\n * @returns a string that indicates the authenticator's type\n */\n",
5510
+ "excerptTokens": [
5511
+ {
5512
+ "kind": "Content",
5513
+ "text": "authenticationType(): "
5514
+ },
5515
+ {
5516
+ "kind": "Content",
5517
+ "text": "string"
5518
+ },
5519
+ {
5520
+ "kind": "Content",
5521
+ "text": ";"
5522
+ }
5523
+ ],
5524
+ "isStatic": false,
5525
+ "returnTypeTokenRange": {
5526
+ "startIndex": 1,
5527
+ "endIndex": 2
5528
+ },
5529
+ "releaseTag": "Public",
5530
+ "isProtected": false,
5531
+ "overloadIndex": 1,
5532
+ "parameters": [],
5533
+ "isOptional": false,
5534
+ "isAbstract": false,
5535
+ "name": "authenticationType"
5536
+ },
5537
+ {
5538
+ "kind": "Property",
5539
+ "canonicalReference": "ibm-cloud-sdk-core!McspAuthenticator#requiredOptions:member",
5540
+ "docComment": "",
5541
+ "excerptTokens": [
5542
+ {
5543
+ "kind": "Content",
5544
+ "text": "protected requiredOptions: "
5545
+ },
5546
+ {
5547
+ "kind": "Content",
5548
+ "text": "string[]"
5549
+ },
5550
+ {
5551
+ "kind": "Content",
5552
+ "text": ";"
5553
+ }
5554
+ ],
5555
+ "isReadonly": false,
5556
+ "isOptional": false,
5557
+ "releaseTag": "Public",
5558
+ "name": "requiredOptions",
5559
+ "propertyTypeTokenRange": {
5560
+ "startIndex": 1,
5561
+ "endIndex": 2
5562
+ },
5563
+ "isStatic": false,
5564
+ "isProtected": true,
5565
+ "isAbstract": false
5566
+ },
5567
+ {
5568
+ "kind": "Property",
5569
+ "canonicalReference": "ibm-cloud-sdk-core!McspAuthenticator#tokenManager:member",
5570
+ "docComment": "",
5571
+ "excerptTokens": [
5572
+ {
5573
+ "kind": "Content",
5574
+ "text": "protected tokenManager: "
5575
+ },
5576
+ {
5577
+ "kind": "Reference",
5578
+ "text": "McspTokenManager",
5579
+ "canonicalReference": "ibm-cloud-sdk-core!McspTokenManager:class"
5580
+ },
5581
+ {
5582
+ "kind": "Content",
5583
+ "text": ";"
5584
+ }
5585
+ ],
5586
+ "isReadonly": false,
5587
+ "isOptional": false,
5588
+ "releaseTag": "Public",
5589
+ "name": "tokenManager",
5590
+ "propertyTypeTokenRange": {
5591
+ "startIndex": 1,
5592
+ "endIndex": 2
5593
+ },
5594
+ "isStatic": false,
5595
+ "isProtected": true,
5596
+ "isAbstract": false
5597
+ }
5598
+ ],
5599
+ "extendsTokenRange": {
5600
+ "startIndex": 1,
5601
+ "endIndex": 2
5602
+ },
5603
+ "implementsTokenRanges": []
5604
+ },
5605
+ {
5606
+ "kind": "Class",
5607
+ "canonicalReference": "ibm-cloud-sdk-core!McspTokenManager:class",
5608
+ "docComment": "/**\n * Token Manager for Multi-Cloud Saas Platform (MCSP) authenticator.\n *\n * The Token Manager will invoke the MCSP token service's 'POST /siusermgr/api/1.0/apikeys/token' operation to obtain an MCSP access token for a user-supplied apikey.\n */\n",
5609
+ "excerptTokens": [
5610
+ {
5611
+ "kind": "Content",
5612
+ "text": "export declare class McspTokenManager extends "
5613
+ },
5614
+ {
5615
+ "kind": "Reference",
5616
+ "text": "JwtTokenManager",
5617
+ "canonicalReference": "ibm-cloud-sdk-core!JwtTokenManager:class"
5618
+ },
5619
+ {
5620
+ "kind": "Content",
5621
+ "text": " "
5622
+ }
5623
+ ],
5624
+ "fileUrlPath": "dist/es/auth/token-managers/mcsp-token-manager.d.ts",
5625
+ "releaseTag": "Public",
5626
+ "isAbstract": false,
5627
+ "name": "McspTokenManager",
5628
+ "preserveMemberOrder": false,
5629
+ "members": [
5630
+ {
5631
+ "kind": "Constructor",
5632
+ "canonicalReference": "ibm-cloud-sdk-core!McspTokenManager:constructor(1)",
5633
+ "docComment": "/**\n * Create a new McspTokenManager instance.\n *\n * @param options - Configuration options This should be an object containing these fields: - url: (required) the base endpoint URL for the MCSP token service - apikey: (required) the API key used to obtain the MCSP access token. - disableSslVerification: (optional) a flag that indicates whether verification of the token server's SSL certificate should be disabled or not - headers: (optional) a set of HTTP headers to be sent with each request to the token service\n *\n * @throws\n *\n * Error: the configuration options were invalid.\n */\n",
5634
+ "excerptTokens": [
5635
+ {
5636
+ "kind": "Content",
5637
+ "text": "constructor(options: "
5638
+ },
5639
+ {
5640
+ "kind": "Reference",
5641
+ "text": "Options",
5642
+ "canonicalReference": "ibm-cloud-sdk-core!~Options_11:interface"
5643
+ },
5644
+ {
5645
+ "kind": "Content",
5646
+ "text": ");"
5647
+ }
5648
+ ],
5649
+ "releaseTag": "Public",
5650
+ "isProtected": false,
5651
+ "overloadIndex": 1,
5652
+ "parameters": [
5653
+ {
5654
+ "parameterName": "options",
5655
+ "parameterTypeTokenRange": {
5656
+ "startIndex": 1,
5657
+ "endIndex": 2
5658
+ },
5659
+ "isOptional": false
5660
+ }
5661
+ ]
5662
+ },
5663
+ {
5664
+ "kind": "Method",
5665
+ "canonicalReference": "ibm-cloud-sdk-core!McspTokenManager#requestToken:member(1)",
5666
+ "docComment": "",
5667
+ "excerptTokens": [
5668
+ {
5669
+ "kind": "Content",
5670
+ "text": "protected requestToken(): "
5671
+ },
5672
+ {
5673
+ "kind": "Reference",
5674
+ "text": "Promise",
5675
+ "canonicalReference": "!Promise:interface"
5676
+ },
5677
+ {
5678
+ "kind": "Content",
5679
+ "text": "<any>"
5680
+ },
5681
+ {
5682
+ "kind": "Content",
5683
+ "text": ";"
5684
+ }
5685
+ ],
5686
+ "isStatic": false,
5687
+ "returnTypeTokenRange": {
5688
+ "startIndex": 1,
5689
+ "endIndex": 3
5690
+ },
5691
+ "releaseTag": "Public",
5692
+ "isProtected": true,
5693
+ "overloadIndex": 1,
5694
+ "parameters": [],
5695
+ "isOptional": false,
5696
+ "isAbstract": false,
5697
+ "name": "requestToken"
5698
+ },
5699
+ {
5700
+ "kind": "Property",
5701
+ "canonicalReference": "ibm-cloud-sdk-core!McspTokenManager#requiredOptions:member",
5702
+ "docComment": "",
5703
+ "excerptTokens": [
5704
+ {
5705
+ "kind": "Content",
5706
+ "text": "protected requiredOptions: "
5707
+ },
5708
+ {
5709
+ "kind": "Content",
5710
+ "text": "string[]"
5711
+ },
5712
+ {
5713
+ "kind": "Content",
5714
+ "text": ";"
5715
+ }
5716
+ ],
5717
+ "isReadonly": false,
5718
+ "isOptional": false,
5719
+ "releaseTag": "Public",
5720
+ "name": "requiredOptions",
5721
+ "propertyTypeTokenRange": {
5722
+ "startIndex": 1,
5723
+ "endIndex": 2
5724
+ },
5725
+ "isStatic": false,
5726
+ "isProtected": true,
5727
+ "isAbstract": false
5728
+ }
5729
+ ],
5730
+ "extendsTokenRange": {
5731
+ "startIndex": 1,
5732
+ "endIndex": 2
5733
+ },
5734
+ "implementsTokenRanges": []
5735
+ },
5418
5736
  {
5419
5737
  "kind": "Class",
5420
5738
  "canonicalReference": "ibm-cloud-sdk-core!NoAuthAuthenticator:class",
@@ -34,6 +34,8 @@ export class Authenticator implements AuthenticatorInterface {
34
34
  // (undocumented)
35
35
  static AUTHTYPE_IAM: string;
36
36
  // (undocumented)
37
+ static AUTHTYPE_MCSP: string;
38
+ // (undocumented)
37
39
  static AUTHTYPE_NOAUTH: string;
38
40
  // (undocumented)
39
41
  static AUTHTYPE_UNKNOWN: string;
@@ -329,6 +331,27 @@ export class JwtTokenManager extends TokenManager {
329
331
  // @public
330
332
  export type JwtTokenManagerOptions = TokenManagerOptions;
331
333
 
334
+ // @public
335
+ export class McspAuthenticator extends TokenRequestBasedAuthenticator {
336
+ // Warning: (ae-forgotten-export) The symbol "Options_12" needs to be exported by the entry point index.d.ts
337
+ constructor(options: Options_12);
338
+ authenticationType(): string;
339
+ // (undocumented)
340
+ protected requiredOptions: string[];
341
+ // (undocumented)
342
+ protected tokenManager: McspTokenManager;
343
+ }
344
+
345
+ // @public
346
+ export class McspTokenManager extends JwtTokenManager {
347
+ // Warning: (ae-forgotten-export) The symbol "Options_11" needs to be exported by the entry point index.d.ts
348
+ constructor(options: Options_11);
349
+ // (undocumented)
350
+ protected requestToken(): Promise<any>;
351
+ // (undocumented)
352
+ protected requiredOptions: string[];
353
+ }
354
+
332
355
  // @public
333
356
  export class NoAuthAuthenticator extends Authenticator {
334
357
  // (undocumented)