@google-cloud/apikeys 1.2.0 → 1.3.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.3.1](https://github.com/googleapis/google-cloud-node/compare/apikeys-v1.3.0...apikeys-v1.3.1) (2025-02-12)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * [Many APIs] finalize fixing typings for headers in generator ([#6011](https://github.com/googleapis/google-cloud-node/issues/6011)) ([ee865ff](https://github.com/googleapis/google-cloud-node/commit/ee865ff34a696fbd657e4cfb6cc4be2f6651f77a))
9
+
10
+ ## [1.3.0](https://github.com/googleapis/google-cloud-node/compare/apikeys-v1.2.0...apikeys-v1.3.0) (2024-05-21)
11
+
12
+
13
+ ### Features
14
+
15
+ * [Many APIs] update Nodejs generator to send API versions in headers for GAPICs ([#5350](https://github.com/googleapis/google-cloud-node/issues/5350)) ([6c03873](https://github.com/googleapis/google-cloud-node/commit/6c038731de1f36456042e6b4ecf2a9686be662c7))
16
+ * [Many APIs] update Nodejs generator to send API versions in headers for GAPICs ([#5351](https://github.com/googleapis/google-cloud-node/issues/5351)) ([01f48fc](https://github.com/googleapis/google-cloud-node/commit/01f48fce63ec4ddf801d59ee2b8c0db9f6fb8372))
17
+ * [Many APIs] update Nodejs generator to send API versions in headers for GAPICs ([#5354](https://github.com/googleapis/google-cloud-node/issues/5354)) ([a9784ed](https://github.com/googleapis/google-cloud-node/commit/a9784ed3db6ee96d171762308bbbcd57390b6866))
18
+
3
19
  ## [1.2.0](https://github.com/googleapis/google-cloud-node/compare/apikeys-v1.1.0...apikeys-v1.2.0) (2024-04-16)
4
20
 
5
21
 
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # [API Keys API: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-api-apikeys)
6
6
 
7
- [![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
7
+ [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
8
8
  [![npm version](https://img.shields.io/npm/v/@google-cloud/apikeys.svg)](https://www.npmjs.org/package/@google-cloud/apikeys)
9
9
 
10
10
 
@@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
44
44
  1. [Select or create a Cloud Platform project][projects].
45
45
  1. [Enable billing for your project][billing].
46
46
  1. [Enable the API Keys API API][enable_api].
47
- 1. [Set up authentication with a service account][auth] so you can access the
47
+ 1. [Set up authentication][auth] so you can access the
48
48
  API from your local workstation.
49
49
 
50
50
  ### Installing the client library
@@ -154,13 +154,14 @@ This library follows [Semantic Versioning](http://semver.org/).
154
154
 
155
155
 
156
156
 
157
+ This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways
158
+ unless absolutely necessary (e.g. because of critical security issues) or with
159
+ an extensive deprecation period. Issues and requests against **stable** libraries
160
+ are addressed with the highest priority.
157
161
 
158
162
 
159
163
 
160
164
 
161
- This library is considered to be in **preview**. This means it is still a
162
- work-in-progress and under active development. Any release is subject to
163
- backwards-incompatible changes at any time.
164
165
 
165
166
 
166
167
  More Information: [Google Cloud Platform Launch Stages][launch_stages]
@@ -189,4 +190,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
189
190
  [projects]: https://console.cloud.google.com/project
190
191
  [billing]: https://support.google.com/cloud/answer/6293499#enable-billing
191
192
  [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=apikeys.googleapis.com
192
- [auth]: https://cloud.google.com/docs/authentication/getting-started
193
+ [auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
@@ -1,4 +1,4 @@
1
- // Copyright 2023 Google LLC
1
+ // Copyright 2024 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2023 Google LLC
1
+ // Copyright 2024 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Google LLC
1
+ // Copyright 2025 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2024 Google LLC
1
+ // Copyright 2025 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,7 @@
1
1
  {
2
+ "options": {
3
+ "syntax": "proto3"
4
+ },
2
5
  "nested": {
3
6
  "google": {
4
7
  "nested": {
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // Copyright 2024 Google LLC
2
+ // Copyright 2025 Google LLC
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License");
5
5
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type * as gax from 'google-gax';
3
2
  import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback } from 'google-gax';
4
3
  import { Transform } from 'stream';
@@ -423,7 +422,7 @@ export declare class ApiKeysClient {
423
422
  listKeys(request: protos.google.api.apikeys.v2.IListKeysRequest, options: CallOptions, callback: PaginationCallback<protos.google.api.apikeys.v2.IListKeysRequest, protos.google.api.apikeys.v2.IListKeysResponse | null | undefined, protos.google.api.apikeys.v2.IKey>): void;
424
423
  listKeys(request: protos.google.api.apikeys.v2.IListKeysRequest, callback: PaginationCallback<protos.google.api.apikeys.v2.IListKeysRequest, protos.google.api.apikeys.v2.IListKeysResponse | null | undefined, protos.google.api.apikeys.v2.IKey>): void;
425
424
  /**
426
- * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
425
+ * Equivalent to `listKeys`, but returns a NodeJS Stream object.
427
426
  * @param {Object} request
428
427
  * The request object that will be sent.
429
428
  * @param {string} request.parent
@@ -505,7 +504,7 @@ export declare class ApiKeysClient {
505
504
  * // doThingsWith(response)
506
505
  * ```
507
506
  */
508
- getOperation(request: protos.google.longrunning.GetOperationRequest, options?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;
507
+ getOperation(request: protos.google.longrunning.GetOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;
509
508
  /**
510
509
  * Lists operations that match the specified filter in the request. If the
511
510
  * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object.
@@ -568,7 +567,7 @@ export declare class ApiKeysClient {
568
567
  * await client.cancelOperation({name: ''});
569
568
  * ```
570
569
  */
571
- cancelOperation(request: protos.google.longrunning.CancelOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;
570
+ cancelOperation(request: protos.google.longrunning.CancelOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;
572
571
  /**
573
572
  * Deletes a long-running operation. This method indicates that the client is
574
573
  * no longer interested in the operation result. It does not cancel the
@@ -594,7 +593,7 @@ export declare class ApiKeysClient {
594
593
  * await client.deleteOperation({name: ''});
595
594
  * ```
596
595
  */
597
- deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;
596
+ deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;
598
597
  /**
599
598
  * Return a fully-qualified key resource name string.
600
599
  *
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // Copyright 2024 Google LLC
2
+ // Copyright 2025 Google LLC
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License");
5
5
  // you may not use this file except in compliance with the License.
@@ -548,7 +548,7 @@ class ApiKeysClient {
548
548
  return this.innerApiCalls.listKeys(request, options, callback);
549
549
  }
550
550
  /**
551
- * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
551
+ * Equivalent to `listKeys`, but returns a NodeJS Stream object.
552
552
  * @param {Object} request
553
553
  * The request object that will be sent.
554
554
  * @param {string} request.parent
@@ -658,7 +658,23 @@ class ApiKeysClient {
658
658
  * // doThingsWith(response)
659
659
  * ```
660
660
  */
661
- getOperation(request, options, callback) {
661
+ getOperation(request, optionsOrCallback, callback) {
662
+ var _a;
663
+ let options;
664
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
665
+ callback = optionsOrCallback;
666
+ options = {};
667
+ }
668
+ else {
669
+ options = optionsOrCallback;
670
+ }
671
+ options = options || {};
672
+ options.otherArgs = options.otherArgs || {};
673
+ options.otherArgs.headers = options.otherArgs.headers || {};
674
+ options.otherArgs.headers['x-goog-request-params'] =
675
+ this._gaxModule.routingHeader.fromParams({
676
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
677
+ });
662
678
  return this.operationsClient.getOperation(request, options, callback);
663
679
  }
664
680
  /**
@@ -692,6 +708,14 @@ class ApiKeysClient {
692
708
  * ```
693
709
  */
694
710
  listOperationsAsync(request, options) {
711
+ var _a;
712
+ options = options || {};
713
+ options.otherArgs = options.otherArgs || {};
714
+ options.otherArgs.headers = options.otherArgs.headers || {};
715
+ options.otherArgs.headers['x-goog-request-params'] =
716
+ this._gaxModule.routingHeader.fromParams({
717
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
718
+ });
695
719
  return this.operationsClient.listOperationsAsync(request, options);
696
720
  }
697
721
  /**
@@ -725,7 +749,23 @@ class ApiKeysClient {
725
749
  * await client.cancelOperation({name: ''});
726
750
  * ```
727
751
  */
728
- cancelOperation(request, options, callback) {
752
+ cancelOperation(request, optionsOrCallback, callback) {
753
+ var _a;
754
+ let options;
755
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
756
+ callback = optionsOrCallback;
757
+ options = {};
758
+ }
759
+ else {
760
+ options = optionsOrCallback;
761
+ }
762
+ options = options || {};
763
+ options.otherArgs = options.otherArgs || {};
764
+ options.otherArgs.headers = options.otherArgs.headers || {};
765
+ options.otherArgs.headers['x-goog-request-params'] =
766
+ this._gaxModule.routingHeader.fromParams({
767
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
768
+ });
729
769
  return this.operationsClient.cancelOperation(request, options, callback);
730
770
  }
731
771
  /**
@@ -753,7 +793,23 @@ class ApiKeysClient {
753
793
  * await client.deleteOperation({name: ''});
754
794
  * ```
755
795
  */
756
- deleteOperation(request, options, callback) {
796
+ deleteOperation(request, optionsOrCallback, callback) {
797
+ var _a;
798
+ let options;
799
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
800
+ callback = optionsOrCallback;
801
+ options = {};
802
+ }
803
+ else {
804
+ options = optionsOrCallback;
805
+ }
806
+ options = options || {};
807
+ options.otherArgs = options.otherArgs || {};
808
+ options.otherArgs.headers = options.otherArgs.headers || {};
809
+ options.otherArgs.headers['x-goog-request-params'] =
810
+ this._gaxModule.routingHeader.fromParams({
811
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
812
+ });
757
813
  return this.operationsClient.deleteOperation(request, options, callback);
758
814
  }
759
815
  // --------------------
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // Copyright 2024 Google LLC
2
+ // Copyright 2025 Google LLC
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License");
5
5
  // you may not use this file except in compliance with the License.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@google-cloud/apikeys",
3
- "version": "1.2.0",
3
+ "version": "1.3.1",
4
4
  "description": "API Keys API client for Node.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -50,7 +50,7 @@
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/mocha": "^9.0.0",
53
- "@types/node": "^20.4.5",
53
+ "@types/node": "^22.0.0",
54
54
  "@types/sinon": "^17.0.0",
55
55
  "c8": "^9.0.0",
56
56
  "gapic-tools": "^0.4.0",
@@ -62,7 +62,7 @@
62
62
  "long": "^5.2.3",
63
63
  "mocha": "^9.2.2",
64
64
  "pack-n-play": "^2.0.0",
65
- "sinon": "^17.0.0",
65
+ "sinon": "^18.0.0",
66
66
  "typescript": "^5.1.6"
67
67
  },
68
68
  "engines": {