@valkey/valkey-glide 2.1.2 → 2.2.0-rc2

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.
@@ -112,8 +112,27 @@ export type ReturnTypeXinfoStream = Record<string, StreamEntries | Record<string
112
112
  * See {@link ReturnTypeXinfoStream}.
113
113
  */
114
114
  export type StreamEntries = GlideString | number | (GlideString | number | GlideString[])[][];
115
+ /** Represents the types of services that can be used for IAM authentication. */
116
+ export declare enum ServiceType {
117
+ Elasticache = "Elasticache",
118
+ MemoryDB = "MemoryDB"
119
+ }
120
+ /** Configuration settings for IAM authentication. */
121
+ export interface IamAuthConfig {
122
+ /** The name of the ElastiCache/MemoryDB cluster. */
123
+ clusterName: string;
124
+ /** The type of service being used (ElastiCache or MemoryDB). */
125
+ service: ServiceType;
126
+ /** The AWS region where the ElastiCache/MemoryDB cluster is located. */
127
+ region: string;
128
+ /**
129
+ * Optional refresh interval in seconds for renewing IAM authentication tokens.
130
+ * If not provided, defaults to 300 seconds (5 min).
131
+ */
132
+ refreshIntervalSeconds?: number;
133
+ }
115
134
  /** Represents the credentials for connecting to a server. */
116
- export interface ServerCredentials {
135
+ export type ServerCredentials = {
117
136
  /**
118
137
  * The username that will be used for authenticating connections to the Valkey servers.
119
138
  * If not supplied, "default" will be used.
@@ -121,9 +140,18 @@ export interface ServerCredentials {
121
140
  username?: string;
122
141
  /**
123
142
  * The password that will be used for authenticating connections to the Valkey servers.
143
+ * (mutually exclusive with iamConfig).
124
144
  */
125
145
  password: string;
126
- }
146
+ } | {
147
+ /** Username is REQUIRED for IAM (Valkey AUTH <username> <token>). */
148
+ username: string;
149
+ /**
150
+ * IAM config (mutually exclusive with password).
151
+ * The client will automatically generate and refresh the authentication token based on the provided configuration.
152
+ */
153
+ iamConfig: IamAuthConfig;
154
+ };
127
155
  /** Represents the client's read from strategy. */
128
156
  export type ReadFrom =
129
157
  /** Always get from primary, in order to get the freshest data.*/
@@ -453,6 +481,17 @@ export interface AdvancedBaseClientConfiguration {
453
481
  * - Default: false (verification is enforced).
454
482
  */
455
483
  insecure?: boolean;
484
+ /**
485
+ * Custom root certificate data for TLS connections.
486
+ *
487
+ * - When provided, these certificates will be used instead of the system's default trust store.
488
+ * If not provided, the system's default certificate trust store will be used.
489
+ *
490
+ * - The certificate data should be in PEM format as a string or Buffer.
491
+ *
492
+ * - This is useful when connecting to servers with self-signed certificates or custom certificate authorities.
493
+ */
494
+ rootCertificates?: string | Buffer;
456
495
  };
457
496
  }
458
497
  /**
@@ -505,6 +544,7 @@ export declare class BaseClient {
505
544
  private writeBufferedRequestsToSocket;
506
545
  protected ensureClientIsOpen(): void;
507
546
  protected createUpdateConnectionPasswordPromise(command: command_request.UpdateConnectionPassword): Promise<GlideString>;
547
+ protected createRefreshIamTokenPromise(command: command_request.RefreshIamToken): Promise<GlideString>;
508
548
  protected createScriptInvocationPromise<T = GlideString>(command: command_request.ScriptInvocation, options?: {
509
549
  keys?: GlideString[];
510
550
  args?: GlideString[];
@@ -6380,6 +6420,19 @@ export declare class BaseClient {
6380
6420
  * ```
6381
6421
  */
6382
6422
  updateConnectionPassword(password: string | null, immediateAuth?: boolean): Promise<GlideString>;
6423
+ /**
6424
+ * Manually refresh the IAM token for the current connection.
6425
+ *
6426
+ * This method is only available if the client was created with IAM authentication.
6427
+ * It triggers an immediate refresh of the IAM token and updates the connection.
6428
+ *
6429
+ * @throws ConfigurationError if the client is not using IAM authentication.
6430
+ * @example
6431
+ * ```typescript
6432
+ * await client.refreshToken();
6433
+ * ```
6434
+ */
6435
+ refreshIamToken(): Promise<GlideString>;
6383
6436
  /**
6384
6437
  * Return a statistics
6385
6438
  *
@@ -39,7 +39,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
39
39
  return (mod && mod.__esModule) ? mod : { "default": mod };
40
40
  };
41
41
  Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.BaseClient = exports.ObjectType = exports.Decoder = exports.ProtocolVersion = void 0;
42
+ exports.BaseClient = exports.ObjectType = exports.ServiceType = exports.Decoder = exports.ProtocolVersion = void 0;
43
43
  exports.convertGlideRecord = convertGlideRecord;
44
44
  exports.convertGlideRecordToRecord = convertGlideRecordToRecord;
45
45
  exports.isGlideRecord = isGlideRecord;
@@ -159,6 +159,12 @@ class PointerResponse {
159
159
  this.low = low;
160
160
  }
161
161
  }
162
+ /** Represents the types of services that can be used for IAM authentication. */
163
+ var ServiceType;
164
+ (function (ServiceType) {
165
+ ServiceType["Elasticache"] = "Elasticache";
166
+ ServiceType["MemoryDB"] = "MemoryDB";
167
+ })(ServiceType || (exports.ServiceType = ServiceType = {}));
162
168
  /**
163
169
  * Enum of Valkey data types
164
170
  * `STRING`
@@ -513,6 +519,19 @@ class BaseClient {
513
519
  });
514
520
  });
515
521
  }
522
+ createRefreshIamTokenPromise(command) {
523
+ this.ensureClientIsOpen();
524
+ return new Promise((resolve, reject) => {
525
+ const callbackIdx = this.getCallbackIndex();
526
+ this.promiseCallbackFunctions[callbackIdx] = [resolve, reject];
527
+ this.writeOrBufferRequest(new ProtobufMessage_1.command_request.CommandRequest({
528
+ callbackIdx,
529
+ refreshIamToken: command,
530
+ }), (message, writer) => {
531
+ ProtobufMessage_1.command_request.CommandRequest.encodeDelimited(message, writer);
532
+ });
533
+ });
534
+ }
516
535
  createScriptInvocationPromise(command, options = {}) {
517
536
  this.ensureClientIsOpen();
518
537
  return new Promise((resolve, reject) => {
@@ -6942,13 +6961,42 @@ class BaseClient {
6942
6961
  const readFrom = options.readFrom
6943
6962
  ? this.MAP_READ_FROM_STRATEGY[options.readFrom]
6944
6963
  : ProtobufMessage_1.connection_request.ReadFrom.Primary;
6945
- const authenticationInfo = options.credentials !== undefined &&
6946
- "password" in options.credentials
6947
- ? {
6948
- password: options.credentials.password,
6949
- username: options.credentials.username,
6964
+ const creds = options.credentials;
6965
+ // Build a protobuf AuthenticationInfo
6966
+ let authenticationInfo;
6967
+ if (creds) {
6968
+ if ("iamConfig" in creds) {
6969
+ if (!creds.username) {
6970
+ throw new _1.ConfigurationError("IAM authentication requires a username.");
6971
+ }
6972
+ const iamCredentials = ProtobufMessage_1.connection_request.IamCredentials.create({
6973
+ clusterName: creds.iamConfig.clusterName,
6974
+ region: creds.iamConfig.region,
6975
+ serviceType: creds.iamConfig.service === ServiceType.Elasticache
6976
+ ? ProtobufMessage_1.connection_request.ServiceType.ELASTICACHE
6977
+ : ProtobufMessage_1.connection_request.ServiceType.MEMORYDB,
6978
+ // leave undefined if not provided (optional field)
6979
+ refreshIntervalSeconds: creds.iamConfig.refreshIntervalSeconds,
6980
+ });
6981
+ authenticationInfo =
6982
+ ProtobufMessage_1.connection_request.AuthenticationInfo.create({
6983
+ username: creds.username, // REQUIRED for IAM
6984
+ iamCredentials,
6985
+ // do NOT set password in IAM mode
6986
+ });
6987
+ }
6988
+ else if ("password" in creds) {
6989
+ // Password branch
6990
+ authenticationInfo =
6991
+ ProtobufMessage_1.connection_request.AuthenticationInfo.create({
6992
+ username: creds.username ?? "", // optional
6993
+ password: creds.password ?? "", // empty means “no password”
6994
+ });
6950
6995
  }
6951
- : undefined;
6996
+ else {
6997
+ authenticationInfo = undefined;
6998
+ }
6999
+ }
6952
7000
  const protocol = options.protocol;
6953
7001
  // Validate that clientAz is set when using AZ affinity strategies
6954
7002
  if ((options.readFrom === "AZAffinity" ||
@@ -6982,12 +7030,21 @@ class BaseClient {
6982
7030
  options.connectionTimeout ??
6983
7031
  _1.DEFAULT_CONNECTION_TIMEOUT_IN_MILLISECONDS;
6984
7032
  // Apply TLS configuration if present
6985
- if (options.tlsAdvancedConfiguration?.insecure) {
6986
- if (request.tlsMode === ProtobufMessage_1.connection_request.TlsMode.SecureTls) {
7033
+ if (options.tlsAdvancedConfiguration) {
7034
+ // request.tlsMode is either SecureTls or InsecureTls here
7035
+ if (request.tlsMode === ProtobufMessage_1.connection_request.TlsMode.NoTls) {
7036
+ throw new _1.ConfigurationError("TLS advanced configuration cannot be set when useTLS is disabled.");
7037
+ }
7038
+ // If options.tlsAdvancedConfiguration.insecure is true then use InsecureTls mode
7039
+ if (options.tlsAdvancedConfiguration.insecure) {
6987
7040
  request.tlsMode = ProtobufMessage_1.connection_request.TlsMode.InsecureTls;
6988
7041
  }
6989
- else if (request.tlsMode === ProtobufMessage_1.connection_request.TlsMode.NoTls) {
6990
- throw new _1.ConfigurationError("InsecureTls cannot be enabled when useTLS is disabled.");
7042
+ if (options.tlsAdvancedConfiguration.rootCertificates) {
7043
+ const certData = typeof options.tlsAdvancedConfiguration.rootCertificates ===
7044
+ "string"
7045
+ ? Buffer.from(options.tlsAdvancedConfiguration.rootCertificates, "utf-8")
7046
+ : options.tlsAdvancedConfiguration.rootCertificates;
7047
+ request.rootCerts = [new Uint8Array(certData)];
6991
7048
  }
6992
7049
  }
6993
7050
  }
@@ -7029,8 +7086,10 @@ class BaseClient {
7029
7086
  */
7030
7087
  static async __createClientInternal(options, connectedSocket, constructor) {
7031
7088
  const connection = constructor(connectedSocket, options);
7089
+ const connectStart = Date.now();
7032
7090
  await connection.connectToServer(options);
7033
- _1.Logger.log("info", "Client lifetime", "connected to server");
7091
+ const connectTime = Date.now() - connectStart;
7092
+ _1.Logger.log("info", "Client lifetime", `connected to server in ${connectTime}ms`);
7034
7093
  return connection;
7035
7094
  }
7036
7095
  /**
@@ -7049,10 +7108,17 @@ class BaseClient {
7049
7108
  * @internal
7050
7109
  */
7051
7110
  static async createClientInternal(options, constructor) {
7111
+ const overallStart = Date.now();
7052
7112
  const path = await (0, _1.StartSocketConnection)();
7113
+ const socketStart = Date.now();
7053
7114
  const socket = await this.GetSocket(path);
7115
+ const socketTime = Date.now() - socketStart;
7116
+ _1.Logger.log("info", "Client lifetime", `socket connection established in ${socketTime}ms`);
7054
7117
  try {
7055
- return await this.__createClientInternal(options, socket, constructor);
7118
+ const client = await this.__createClientInternal(options, socket, constructor);
7119
+ const totalTime = Date.now() - overallStart;
7120
+ _1.Logger.log("info", "Client lifetime", `total client creation time: ${totalTime}ms`);
7121
+ return client;
7056
7122
  }
7057
7123
  catch (err) {
7058
7124
  // Ensure socket is closed
@@ -7081,6 +7147,12 @@ class BaseClient {
7081
7147
  * ```
7082
7148
  */
7083
7149
  async updateConnectionPassword(password, immediateAuth = false) {
7150
+ // If we’re on IAM, forbid password updates to avoid confusion.
7151
+ const creds = this.config?.credentials;
7152
+ const usingIam = !!creds && "iamConfig" in creds;
7153
+ if (usingIam) {
7154
+ throw new _1.ConfigurationError("updateConnectionPassword is not supported when IAM authentication is enabled.");
7155
+ }
7084
7156
  const updateConnectionPassword = ProtobufMessage_1.command_request.UpdateConnectionPassword.create({
7085
7157
  password,
7086
7158
  immediateAuth,
@@ -7097,6 +7169,27 @@ class BaseClient {
7097
7169
  }
7098
7170
  return response;
7099
7171
  }
7172
+ /**
7173
+ * Manually refresh the IAM token for the current connection.
7174
+ *
7175
+ * This method is only available if the client was created with IAM authentication.
7176
+ * It triggers an immediate refresh of the IAM token and updates the connection.
7177
+ *
7178
+ * @throws ConfigurationError if the client is not using IAM authentication.
7179
+ * @example
7180
+ * ```typescript
7181
+ * await client.refreshToken();
7182
+ * ```
7183
+ */
7184
+ async refreshIamToken() {
7185
+ if (!this.config?.credentials ||
7186
+ !("iamConfig" in this.config.credentials)) {
7187
+ throw new _1.ConfigurationError("refreshIamToken is only available when IAM authentication is enabled.");
7188
+ }
7189
+ const refresh = ProtobufMessage_1.command_request.RefreshIamToken.create({});
7190
+ const response = await this.createRefreshIamTokenPromise(refresh);
7191
+ return response; // "OK"
7192
+ }
7100
7193
  /**
7101
7194
  * Return a statistics
7102
7195
  *
@@ -142,10 +142,22 @@ export type GlideClusterClientConfiguration = BaseClientConfiguration & {
142
142
  * tlsAdvancedConfiguration: {
143
143
  * insecure: true, // Skip TLS certificate verification (use only in development)
144
144
  * },
145
+ * refreshTopologyFromInitialNodes: true, // Refresh topology from initial seed nodes
145
146
  * };
146
147
  * ```
147
148
  */
148
- export type AdvancedGlideClusterClientConfiguration = AdvancedBaseClientConfiguration & {};
149
+ export type AdvancedGlideClusterClientConfiguration = AdvancedBaseClientConfiguration & {
150
+ /**
151
+ * Enables refreshing the cluster topology using only the initial nodes.
152
+ *
153
+ * When this option is enabled, all topology updates (both the periodic checks and on-demand
154
+ * refreshes triggered by topology changes) will query only the initial nodes provided when
155
+ * creating the client, rather than using the internal cluster view.
156
+ *
157
+ * If not set, defaults to `false` (uses internal cluster view for topology refresh).
158
+ */
159
+ refreshTopologyFromInitialNodes?: boolean;
160
+ };
149
161
  /**
150
162
  * If the command's routing is to one node we will get T as a response type,
151
163
  * otherwise, we will get a dictionary of address: nodeResponse, address is of type string and nodeResponse is of type T.
@@ -80,6 +80,12 @@ class GlideClusterClient extends BaseClient_1.BaseClient {
80
80
  this.configurePubsub(options, configuration);
81
81
  if (options.advancedConfiguration) {
82
82
  this.configureAdvancedConfigurationBase(options.advancedConfiguration, configuration);
83
+ // Set refresh topology from initial nodes
84
+ if (options.advancedConfiguration
85
+ .refreshTopologyFromInitialNodes !== undefined) {
86
+ configuration.refreshTopologyFromInitialNodes =
87
+ options.advancedConfiguration.refreshTopologyFromInitialNodes;
88
+ }
83
89
  }
84
90
  return configuration;
85
91
  }
@@ -1338,6 +1338,69 @@ export namespace command_request {
1338
1338
  public static getTypeUrl(typeUrlPrefix?: string): string;
1339
1339
  }
1340
1340
 
1341
+ /** Properties of a RefreshIamToken. */
1342
+ interface IRefreshIamToken {
1343
+ }
1344
+
1345
+ /** Represents a RefreshIamToken. */
1346
+ class RefreshIamToken implements IRefreshIamToken {
1347
+
1348
+ /**
1349
+ * Constructs a new RefreshIamToken.
1350
+ * @param [properties] Properties to set
1351
+ */
1352
+ constructor(properties?: command_request.IRefreshIamToken);
1353
+
1354
+ /**
1355
+ * Creates a new RefreshIamToken instance using the specified properties.
1356
+ * @param [properties] Properties to set
1357
+ * @returns RefreshIamToken instance
1358
+ */
1359
+ public static create(properties?: command_request.IRefreshIamToken): command_request.RefreshIamToken;
1360
+
1361
+ /**
1362
+ * Encodes the specified RefreshIamToken message. Does not implicitly {@link command_request.RefreshIamToken.verify|verify} messages.
1363
+ * @param message RefreshIamToken message or plain object to encode
1364
+ * @param [writer] Writer to encode to
1365
+ * @returns Writer
1366
+ */
1367
+ public static encode(message: command_request.IRefreshIamToken, writer?: $protobuf.Writer): $protobuf.Writer;
1368
+
1369
+ /**
1370
+ * Encodes the specified RefreshIamToken message, length delimited. Does not implicitly {@link command_request.RefreshIamToken.verify|verify} messages.
1371
+ * @param message RefreshIamToken message or plain object to encode
1372
+ * @param [writer] Writer to encode to
1373
+ * @returns Writer
1374
+ */
1375
+ public static encodeDelimited(message: command_request.IRefreshIamToken, writer?: $protobuf.Writer): $protobuf.Writer;
1376
+
1377
+ /**
1378
+ * Decodes a RefreshIamToken message from the specified reader or buffer.
1379
+ * @param reader Reader or buffer to decode from
1380
+ * @param [length] Message length if known beforehand
1381
+ * @returns RefreshIamToken
1382
+ * @throws {Error} If the payload is not a reader or valid buffer
1383
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1384
+ */
1385
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): command_request.RefreshIamToken;
1386
+
1387
+ /**
1388
+ * Decodes a RefreshIamToken message from the specified reader or buffer, length delimited.
1389
+ * @param reader Reader or buffer to decode from
1390
+ * @returns RefreshIamToken
1391
+ * @throws {Error} If the payload is not a reader or valid buffer
1392
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1393
+ */
1394
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): command_request.RefreshIamToken;
1395
+
1396
+ /**
1397
+ * Gets the default type url for RefreshIamToken
1398
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
1399
+ * @returns The default type url
1400
+ */
1401
+ public static getTypeUrl(typeUrlPrefix?: string): string;
1402
+ }
1403
+
1341
1404
  /** Properties of a CommandRequest. */
1342
1405
  interface ICommandRequest {
1343
1406
 
@@ -1362,6 +1425,9 @@ export namespace command_request {
1362
1425
  /** CommandRequest updateConnectionPassword */
1363
1426
  updateConnectionPassword?: (command_request.IUpdateConnectionPassword|null);
1364
1427
 
1428
+ /** CommandRequest refreshIamToken */
1429
+ refreshIamToken?: (command_request.IRefreshIamToken|null);
1430
+
1365
1431
  /** CommandRequest route */
1366
1432
  route?: (command_request.IRoutes|null);
1367
1433
 
@@ -1399,6 +1465,9 @@ export namespace command_request {
1399
1465
  /** CommandRequest updateConnectionPassword. */
1400
1466
  public updateConnectionPassword?: (command_request.IUpdateConnectionPassword|null);
1401
1467
 
1468
+ /** CommandRequest refreshIamToken. */
1469
+ public refreshIamToken?: (command_request.IRefreshIamToken|null);
1470
+
1402
1471
  /** CommandRequest route. */
1403
1472
  public route?: (command_request.IRoutes|null);
1404
1473
 
@@ -1406,7 +1475,7 @@ export namespace command_request {
1406
1475
  public rootSpanPtr?: (number|Long|null);
1407
1476
 
1408
1477
  /** CommandRequest command. */
1409
- public command?: ("singleCommand"|"batch"|"scriptInvocation"|"scriptInvocationPointers"|"clusterScan"|"updateConnectionPassword");
1478
+ public command?: ("singleCommand"|"batch"|"scriptInvocation"|"scriptInvocationPointers"|"clusterScan"|"updateConnectionPassword"|"refreshIamToken");
1410
1479
 
1411
1480
  /** CommandRequest _rootSpanPtr. */
1412
1481
  public _rootSpanPtr?: "rootSpanPtr";
@@ -1564,6 +1633,9 @@ export namespace connection_request {
1564
1633
 
1565
1634
  /** AuthenticationInfo username */
1566
1635
  username?: (string|null);
1636
+
1637
+ /** AuthenticationInfo iamCredentials */
1638
+ iamCredentials?: (connection_request.IIamCredentials|null);
1567
1639
  }
1568
1640
 
1569
1641
  /** Represents an AuthenticationInfo. */
@@ -1581,6 +1653,12 @@ export namespace connection_request {
1581
1653
  /** AuthenticationInfo username. */
1582
1654
  public username: string;
1583
1655
 
1656
+ /** AuthenticationInfo iamCredentials. */
1657
+ public iamCredentials?: (connection_request.IIamCredentials|null);
1658
+
1659
+ /** AuthenticationInfo _iamCredentials. */
1660
+ public _iamCredentials?: "iamCredentials";
1661
+
1584
1662
  /**
1585
1663
  * Creates a new AuthenticationInfo instance using the specified properties.
1586
1664
  * @param [properties] Properties to set
@@ -1631,6 +1709,102 @@ export namespace connection_request {
1631
1709
  public static getTypeUrl(typeUrlPrefix?: string): string;
1632
1710
  }
1633
1711
 
1712
+ /** ServiceType enum. */
1713
+ enum ServiceType {
1714
+ ELASTICACHE = 0,
1715
+ MEMORYDB = 1
1716
+ }
1717
+
1718
+ /** Properties of an IamCredentials. */
1719
+ interface IIamCredentials {
1720
+
1721
+ /** IamCredentials clusterName */
1722
+ clusterName?: (string|null);
1723
+
1724
+ /** IamCredentials region */
1725
+ region?: (string|null);
1726
+
1727
+ /** IamCredentials serviceType */
1728
+ serviceType?: (connection_request.ServiceType|null);
1729
+
1730
+ /** IamCredentials refreshIntervalSeconds */
1731
+ refreshIntervalSeconds?: (number|null);
1732
+ }
1733
+
1734
+ /** Represents an IamCredentials. */
1735
+ class IamCredentials implements IIamCredentials {
1736
+
1737
+ /**
1738
+ * Constructs a new IamCredentials.
1739
+ * @param [properties] Properties to set
1740
+ */
1741
+ constructor(properties?: connection_request.IIamCredentials);
1742
+
1743
+ /** IamCredentials clusterName. */
1744
+ public clusterName: string;
1745
+
1746
+ /** IamCredentials region. */
1747
+ public region: string;
1748
+
1749
+ /** IamCredentials serviceType. */
1750
+ public serviceType: connection_request.ServiceType;
1751
+
1752
+ /** IamCredentials refreshIntervalSeconds. */
1753
+ public refreshIntervalSeconds?: (number|null);
1754
+
1755
+ /** IamCredentials _refreshIntervalSeconds. */
1756
+ public _refreshIntervalSeconds?: "refreshIntervalSeconds";
1757
+
1758
+ /**
1759
+ * Creates a new IamCredentials instance using the specified properties.
1760
+ * @param [properties] Properties to set
1761
+ * @returns IamCredentials instance
1762
+ */
1763
+ public static create(properties?: connection_request.IIamCredentials): connection_request.IamCredentials;
1764
+
1765
+ /**
1766
+ * Encodes the specified IamCredentials message. Does not implicitly {@link connection_request.IamCredentials.verify|verify} messages.
1767
+ * @param message IamCredentials message or plain object to encode
1768
+ * @param [writer] Writer to encode to
1769
+ * @returns Writer
1770
+ */
1771
+ public static encode(message: connection_request.IIamCredentials, writer?: $protobuf.Writer): $protobuf.Writer;
1772
+
1773
+ /**
1774
+ * Encodes the specified IamCredentials message, length delimited. Does not implicitly {@link connection_request.IamCredentials.verify|verify} messages.
1775
+ * @param message IamCredentials message or plain object to encode
1776
+ * @param [writer] Writer to encode to
1777
+ * @returns Writer
1778
+ */
1779
+ public static encodeDelimited(message: connection_request.IIamCredentials, writer?: $protobuf.Writer): $protobuf.Writer;
1780
+
1781
+ /**
1782
+ * Decodes an IamCredentials message from the specified reader or buffer.
1783
+ * @param reader Reader or buffer to decode from
1784
+ * @param [length] Message length if known beforehand
1785
+ * @returns IamCredentials
1786
+ * @throws {Error} If the payload is not a reader or valid buffer
1787
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1788
+ */
1789
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): connection_request.IamCredentials;
1790
+
1791
+ /**
1792
+ * Decodes an IamCredentials message from the specified reader or buffer, length delimited.
1793
+ * @param reader Reader or buffer to decode from
1794
+ * @returns IamCredentials
1795
+ * @throws {Error} If the payload is not a reader or valid buffer
1796
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1797
+ */
1798
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): connection_request.IamCredentials;
1799
+
1800
+ /**
1801
+ * Gets the default type url for IamCredentials
1802
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
1803
+ * @returns The default type url
1804
+ */
1805
+ public static getTypeUrl(typeUrlPrefix?: string): string;
1806
+ }
1807
+
1634
1808
  /** ProtocolVersion enum. */
1635
1809
  enum ProtocolVersion {
1636
1810
  RESP3 = 0,
@@ -1967,6 +2141,15 @@ export namespace connection_request {
1967
2141
 
1968
2142
  /** ConnectionRequest lazyConnect */
1969
2143
  lazyConnect?: (boolean|null);
2144
+
2145
+ /** ConnectionRequest refreshTopologyFromInitialNodes */
2146
+ refreshTopologyFromInitialNodes?: (boolean|null);
2147
+
2148
+ /** ConnectionRequest libName */
2149
+ libName?: (string|null);
2150
+
2151
+ /** ConnectionRequest rootCerts */
2152
+ rootCerts?: (Uint8Array[]|null);
1970
2153
  }
1971
2154
 
1972
2155
  /** Represents a ConnectionRequest. */
@@ -2029,6 +2212,15 @@ export namespace connection_request {
2029
2212
  /** ConnectionRequest lazyConnect. */
2030
2213
  public lazyConnect: boolean;
2031
2214
 
2215
+ /** ConnectionRequest refreshTopologyFromInitialNodes. */
2216
+ public refreshTopologyFromInitialNodes: boolean;
2217
+
2218
+ /** ConnectionRequest libName. */
2219
+ public libName: string;
2220
+
2221
+ /** ConnectionRequest rootCerts. */
2222
+ public rootCerts: Uint8Array[];
2223
+
2032
2224
  /** ConnectionRequest periodicChecks. */
2033
2225
  public periodicChecks?: ("periodicChecksManualInterval"|"periodicChecksDisabled");
2034
2226
 
@@ -2870,6 +2870,131 @@ $root.command_request = (function() {
2870
2870
  return UpdateConnectionPassword;
2871
2871
  })();
2872
2872
 
2873
+ command_request.RefreshIamToken = (function() {
2874
+
2875
+ /**
2876
+ * Properties of a RefreshIamToken.
2877
+ * @memberof command_request
2878
+ * @interface IRefreshIamToken
2879
+ */
2880
+
2881
+ /**
2882
+ * Constructs a new RefreshIamToken.
2883
+ * @memberof command_request
2884
+ * @classdesc Represents a RefreshIamToken.
2885
+ * @implements IRefreshIamToken
2886
+ * @constructor
2887
+ * @param {command_request.IRefreshIamToken=} [properties] Properties to set
2888
+ */
2889
+ function RefreshIamToken(properties) {
2890
+ if (properties)
2891
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
2892
+ if (properties[keys[i]] != null)
2893
+ this[keys[i]] = properties[keys[i]];
2894
+ }
2895
+
2896
+ /**
2897
+ * Creates a new RefreshIamToken instance using the specified properties.
2898
+ * @function create
2899
+ * @memberof command_request.RefreshIamToken
2900
+ * @static
2901
+ * @param {command_request.IRefreshIamToken=} [properties] Properties to set
2902
+ * @returns {command_request.RefreshIamToken} RefreshIamToken instance
2903
+ */
2904
+ RefreshIamToken.create = function create(properties) {
2905
+ return new RefreshIamToken(properties);
2906
+ };
2907
+
2908
+ /**
2909
+ * Encodes the specified RefreshIamToken message. Does not implicitly {@link command_request.RefreshIamToken.verify|verify} messages.
2910
+ * @function encode
2911
+ * @memberof command_request.RefreshIamToken
2912
+ * @static
2913
+ * @param {command_request.IRefreshIamToken} message RefreshIamToken message or plain object to encode
2914
+ * @param {$protobuf.Writer} [writer] Writer to encode to
2915
+ * @returns {$protobuf.Writer} Writer
2916
+ */
2917
+ RefreshIamToken.encode = function encode(message, writer) {
2918
+ if (!writer)
2919
+ writer = $Writer.create();
2920
+ return writer;
2921
+ };
2922
+
2923
+ /**
2924
+ * Encodes the specified RefreshIamToken message, length delimited. Does not implicitly {@link command_request.RefreshIamToken.verify|verify} messages.
2925
+ * @function encodeDelimited
2926
+ * @memberof command_request.RefreshIamToken
2927
+ * @static
2928
+ * @param {command_request.IRefreshIamToken} message RefreshIamToken message or plain object to encode
2929
+ * @param {$protobuf.Writer} [writer] Writer to encode to
2930
+ * @returns {$protobuf.Writer} Writer
2931
+ */
2932
+ RefreshIamToken.encodeDelimited = function encodeDelimited(message, writer) {
2933
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
2934
+ };
2935
+
2936
+ /**
2937
+ * Decodes a RefreshIamToken message from the specified reader or buffer.
2938
+ * @function decode
2939
+ * @memberof command_request.RefreshIamToken
2940
+ * @static
2941
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2942
+ * @param {number} [length] Message length if known beforehand
2943
+ * @returns {command_request.RefreshIamToken} RefreshIamToken
2944
+ * @throws {Error} If the payload is not a reader or valid buffer
2945
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2946
+ */
2947
+ RefreshIamToken.decode = function decode(reader, length, error) {
2948
+ if (!(reader instanceof $Reader))
2949
+ reader = $Reader.create(reader);
2950
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.command_request.RefreshIamToken();
2951
+ while (reader.pos < end) {
2952
+ var tag = reader.uint32();
2953
+ if (tag === error)
2954
+ break;
2955
+ switch (tag >>> 3) {
2956
+ default:
2957
+ reader.skipType(tag & 7);
2958
+ break;
2959
+ }
2960
+ }
2961
+ return message;
2962
+ };
2963
+
2964
+ /**
2965
+ * Decodes a RefreshIamToken message from the specified reader or buffer, length delimited.
2966
+ * @function decodeDelimited
2967
+ * @memberof command_request.RefreshIamToken
2968
+ * @static
2969
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2970
+ * @returns {command_request.RefreshIamToken} RefreshIamToken
2971
+ * @throws {Error} If the payload is not a reader or valid buffer
2972
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2973
+ */
2974
+ RefreshIamToken.decodeDelimited = function decodeDelimited(reader) {
2975
+ if (!(reader instanceof $Reader))
2976
+ reader = new $Reader(reader);
2977
+ return this.decode(reader, reader.uint32());
2978
+ };
2979
+
2980
+ /**
2981
+ * Gets the default type url for RefreshIamToken
2982
+ * @function getTypeUrl
2983
+ * @memberof command_request.RefreshIamToken
2984
+ * @static
2985
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
2986
+ * @returns {string} The default type url
2987
+ */
2988
+ RefreshIamToken.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
2989
+ if (typeUrlPrefix === undefined) {
2990
+ typeUrlPrefix = "type.googleapis.com";
2991
+ }
2992
+ return typeUrlPrefix + "/command_request.RefreshIamToken";
2993
+ };
2994
+
2995
+ return RefreshIamToken;
2996
+ })();
2997
+
2873
2998
  command_request.CommandRequest = (function() {
2874
2999
 
2875
3000
  /**
@@ -2883,6 +3008,7 @@ $root.command_request = (function() {
2883
3008
  * @property {command_request.IScriptInvocationPointers|null} [scriptInvocationPointers] CommandRequest scriptInvocationPointers
2884
3009
  * @property {command_request.IClusterScan|null} [clusterScan] CommandRequest clusterScan
2885
3010
  * @property {command_request.IUpdateConnectionPassword|null} [updateConnectionPassword] CommandRequest updateConnectionPassword
3011
+ * @property {command_request.IRefreshIamToken|null} [refreshIamToken] CommandRequest refreshIamToken
2886
3012
  * @property {command_request.IRoutes|null} [route] CommandRequest route
2887
3013
  * @property {number|Long|null} [rootSpanPtr] CommandRequest rootSpanPtr
2888
3014
  */
@@ -2958,6 +3084,14 @@ $root.command_request = (function() {
2958
3084
  */
2959
3085
  CommandRequest.prototype.updateConnectionPassword = null;
2960
3086
 
3087
+ /**
3088
+ * CommandRequest refreshIamToken.
3089
+ * @member {command_request.IRefreshIamToken|null|undefined} refreshIamToken
3090
+ * @memberof command_request.CommandRequest
3091
+ * @instance
3092
+ */
3093
+ CommandRequest.prototype.refreshIamToken = null;
3094
+
2961
3095
  /**
2962
3096
  * CommandRequest route.
2963
3097
  * @member {command_request.IRoutes|null|undefined} route
@@ -2979,12 +3113,12 @@ $root.command_request = (function() {
2979
3113
 
2980
3114
  /**
2981
3115
  * CommandRequest command.
2982
- * @member {"singleCommand"|"batch"|"scriptInvocation"|"scriptInvocationPointers"|"clusterScan"|"updateConnectionPassword"|undefined} command
3116
+ * @member {"singleCommand"|"batch"|"scriptInvocation"|"scriptInvocationPointers"|"clusterScan"|"updateConnectionPassword"|"refreshIamToken"|undefined} command
2983
3117
  * @memberof command_request.CommandRequest
2984
3118
  * @instance
2985
3119
  */
2986
3120
  Object.defineProperty(CommandRequest.prototype, "command", {
2987
- get: $util.oneOfGetter($oneOfFields = ["singleCommand", "batch", "scriptInvocation", "scriptInvocationPointers", "clusterScan", "updateConnectionPassword"]),
3121
+ get: $util.oneOfGetter($oneOfFields = ["singleCommand", "batch", "scriptInvocation", "scriptInvocationPointers", "clusterScan", "updateConnectionPassword", "refreshIamToken"]),
2988
3122
  set: $util.oneOfSetter($oneOfFields)
2989
3123
  });
2990
3124
 
@@ -3037,10 +3171,12 @@ $root.command_request = (function() {
3037
3171
  $root.command_request.ClusterScan.encode(message.clusterScan, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
3038
3172
  if (message.updateConnectionPassword != null && Object.hasOwnProperty.call(message, "updateConnectionPassword"))
3039
3173
  $root.command_request.UpdateConnectionPassword.encode(message.updateConnectionPassword, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
3174
+ if (message.refreshIamToken != null && Object.hasOwnProperty.call(message, "refreshIamToken"))
3175
+ $root.command_request.RefreshIamToken.encode(message.refreshIamToken, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
3040
3176
  if (message.route != null && Object.hasOwnProperty.call(message, "route"))
3041
- $root.command_request.Routes.encode(message.route, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
3177
+ $root.command_request.Routes.encode(message.route, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
3042
3178
  if (message.rootSpanPtr != null && Object.hasOwnProperty.call(message, "rootSpanPtr"))
3043
- writer.uint32(/* id 9, wireType 0 =*/72).uint64(message.rootSpanPtr);
3179
+ writer.uint32(/* id 10, wireType 0 =*/80).uint64(message.rootSpanPtr);
3044
3180
  return writer;
3045
3181
  };
3046
3182
 
@@ -3106,10 +3242,14 @@ $root.command_request = (function() {
3106
3242
  break;
3107
3243
  }
3108
3244
  case 8: {
3109
- message.route = $root.command_request.Routes.decode(reader, reader.uint32());
3245
+ message.refreshIamToken = $root.command_request.RefreshIamToken.decode(reader, reader.uint32());
3110
3246
  break;
3111
3247
  }
3112
3248
  case 9: {
3249
+ message.route = $root.command_request.Routes.decode(reader, reader.uint32());
3250
+ break;
3251
+ }
3252
+ case 10: {
3113
3253
  message.rootSpanPtr = reader.uint64();
3114
3254
  break;
3115
3255
  }
@@ -3366,6 +3506,7 @@ $root.connection_request = (function() {
3366
3506
  * @interface IAuthenticationInfo
3367
3507
  * @property {string|null} [password] AuthenticationInfo password
3368
3508
  * @property {string|null} [username] AuthenticationInfo username
3509
+ * @property {connection_request.IIamCredentials|null} [iamCredentials] AuthenticationInfo iamCredentials
3369
3510
  */
3370
3511
 
3371
3512
  /**
@@ -3399,6 +3540,28 @@ $root.connection_request = (function() {
3399
3540
  */
3400
3541
  AuthenticationInfo.prototype.username = "";
3401
3542
 
3543
+ /**
3544
+ * AuthenticationInfo iamCredentials.
3545
+ * @member {connection_request.IIamCredentials|null|undefined} iamCredentials
3546
+ * @memberof connection_request.AuthenticationInfo
3547
+ * @instance
3548
+ */
3549
+ AuthenticationInfo.prototype.iamCredentials = null;
3550
+
3551
+ // OneOf field names bound to virtual getters and setters
3552
+ var $oneOfFields;
3553
+
3554
+ /**
3555
+ * AuthenticationInfo _iamCredentials.
3556
+ * @member {"iamCredentials"|undefined} _iamCredentials
3557
+ * @memberof connection_request.AuthenticationInfo
3558
+ * @instance
3559
+ */
3560
+ Object.defineProperty(AuthenticationInfo.prototype, "_iamCredentials", {
3561
+ get: $util.oneOfGetter($oneOfFields = ["iamCredentials"]),
3562
+ set: $util.oneOfSetter($oneOfFields)
3563
+ });
3564
+
3402
3565
  /**
3403
3566
  * Creates a new AuthenticationInfo instance using the specified properties.
3404
3567
  * @function create
@@ -3427,6 +3590,8 @@ $root.connection_request = (function() {
3427
3590
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.password);
3428
3591
  if (message.username != null && Object.hasOwnProperty.call(message, "username"))
3429
3592
  writer.uint32(/* id 2, wireType 2 =*/18).string(message.username);
3593
+ if (message.iamCredentials != null && Object.hasOwnProperty.call(message, "iamCredentials"))
3594
+ $root.connection_request.IamCredentials.encode(message.iamCredentials, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
3430
3595
  return writer;
3431
3596
  };
3432
3597
 
@@ -3471,6 +3636,10 @@ $root.connection_request = (function() {
3471
3636
  message.username = reader.string();
3472
3637
  break;
3473
3638
  }
3639
+ case 3: {
3640
+ message.iamCredentials = $root.connection_request.IamCredentials.decode(reader, reader.uint32());
3641
+ break;
3642
+ }
3474
3643
  default:
3475
3644
  reader.skipType(tag & 7);
3476
3645
  break;
@@ -3513,6 +3682,219 @@ $root.connection_request = (function() {
3513
3682
  return AuthenticationInfo;
3514
3683
  })();
3515
3684
 
3685
+ /**
3686
+ * ServiceType enum.
3687
+ * @name connection_request.ServiceType
3688
+ * @enum {number}
3689
+ * @property {number} ELASTICACHE=0 ELASTICACHE value
3690
+ * @property {number} MEMORYDB=1 MEMORYDB value
3691
+ */
3692
+ connection_request.ServiceType = (function() {
3693
+ var valuesById = {}, values = Object.create(valuesById);
3694
+ values[valuesById[0] = "ELASTICACHE"] = 0;
3695
+ values[valuesById[1] = "MEMORYDB"] = 1;
3696
+ return values;
3697
+ })();
3698
+
3699
+ connection_request.IamCredentials = (function() {
3700
+
3701
+ /**
3702
+ * Properties of an IamCredentials.
3703
+ * @memberof connection_request
3704
+ * @interface IIamCredentials
3705
+ * @property {string|null} [clusterName] IamCredentials clusterName
3706
+ * @property {string|null} [region] IamCredentials region
3707
+ * @property {connection_request.ServiceType|null} [serviceType] IamCredentials serviceType
3708
+ * @property {number|null} [refreshIntervalSeconds] IamCredentials refreshIntervalSeconds
3709
+ */
3710
+
3711
+ /**
3712
+ * Constructs a new IamCredentials.
3713
+ * @memberof connection_request
3714
+ * @classdesc Represents an IamCredentials.
3715
+ * @implements IIamCredentials
3716
+ * @constructor
3717
+ * @param {connection_request.IIamCredentials=} [properties] Properties to set
3718
+ */
3719
+ function IamCredentials(properties) {
3720
+ if (properties)
3721
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3722
+ if (properties[keys[i]] != null)
3723
+ this[keys[i]] = properties[keys[i]];
3724
+ }
3725
+
3726
+ /**
3727
+ * IamCredentials clusterName.
3728
+ * @member {string} clusterName
3729
+ * @memberof connection_request.IamCredentials
3730
+ * @instance
3731
+ */
3732
+ IamCredentials.prototype.clusterName = "";
3733
+
3734
+ /**
3735
+ * IamCredentials region.
3736
+ * @member {string} region
3737
+ * @memberof connection_request.IamCredentials
3738
+ * @instance
3739
+ */
3740
+ IamCredentials.prototype.region = "";
3741
+
3742
+ /**
3743
+ * IamCredentials serviceType.
3744
+ * @member {connection_request.ServiceType} serviceType
3745
+ * @memberof connection_request.IamCredentials
3746
+ * @instance
3747
+ */
3748
+ IamCredentials.prototype.serviceType = 0;
3749
+
3750
+ /**
3751
+ * IamCredentials refreshIntervalSeconds.
3752
+ * @member {number|null|undefined} refreshIntervalSeconds
3753
+ * @memberof connection_request.IamCredentials
3754
+ * @instance
3755
+ */
3756
+ IamCredentials.prototype.refreshIntervalSeconds = null;
3757
+
3758
+ // OneOf field names bound to virtual getters and setters
3759
+ var $oneOfFields;
3760
+
3761
+ /**
3762
+ * IamCredentials _refreshIntervalSeconds.
3763
+ * @member {"refreshIntervalSeconds"|undefined} _refreshIntervalSeconds
3764
+ * @memberof connection_request.IamCredentials
3765
+ * @instance
3766
+ */
3767
+ Object.defineProperty(IamCredentials.prototype, "_refreshIntervalSeconds", {
3768
+ get: $util.oneOfGetter($oneOfFields = ["refreshIntervalSeconds"]),
3769
+ set: $util.oneOfSetter($oneOfFields)
3770
+ });
3771
+
3772
+ /**
3773
+ * Creates a new IamCredentials instance using the specified properties.
3774
+ * @function create
3775
+ * @memberof connection_request.IamCredentials
3776
+ * @static
3777
+ * @param {connection_request.IIamCredentials=} [properties] Properties to set
3778
+ * @returns {connection_request.IamCredentials} IamCredentials instance
3779
+ */
3780
+ IamCredentials.create = function create(properties) {
3781
+ return new IamCredentials(properties);
3782
+ };
3783
+
3784
+ /**
3785
+ * Encodes the specified IamCredentials message. Does not implicitly {@link connection_request.IamCredentials.verify|verify} messages.
3786
+ * @function encode
3787
+ * @memberof connection_request.IamCredentials
3788
+ * @static
3789
+ * @param {connection_request.IIamCredentials} message IamCredentials message or plain object to encode
3790
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3791
+ * @returns {$protobuf.Writer} Writer
3792
+ */
3793
+ IamCredentials.encode = function encode(message, writer) {
3794
+ if (!writer)
3795
+ writer = $Writer.create();
3796
+ if (message.clusterName != null && Object.hasOwnProperty.call(message, "clusterName"))
3797
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.clusterName);
3798
+ if (message.region != null && Object.hasOwnProperty.call(message, "region"))
3799
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.region);
3800
+ if (message.serviceType != null && Object.hasOwnProperty.call(message, "serviceType"))
3801
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.serviceType);
3802
+ if (message.refreshIntervalSeconds != null && Object.hasOwnProperty.call(message, "refreshIntervalSeconds"))
3803
+ writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.refreshIntervalSeconds);
3804
+ return writer;
3805
+ };
3806
+
3807
+ /**
3808
+ * Encodes the specified IamCredentials message, length delimited. Does not implicitly {@link connection_request.IamCredentials.verify|verify} messages.
3809
+ * @function encodeDelimited
3810
+ * @memberof connection_request.IamCredentials
3811
+ * @static
3812
+ * @param {connection_request.IIamCredentials} message IamCredentials message or plain object to encode
3813
+ * @param {$protobuf.Writer} [writer] Writer to encode to
3814
+ * @returns {$protobuf.Writer} Writer
3815
+ */
3816
+ IamCredentials.encodeDelimited = function encodeDelimited(message, writer) {
3817
+ return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
3818
+ };
3819
+
3820
+ /**
3821
+ * Decodes an IamCredentials message from the specified reader or buffer.
3822
+ * @function decode
3823
+ * @memberof connection_request.IamCredentials
3824
+ * @static
3825
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3826
+ * @param {number} [length] Message length if known beforehand
3827
+ * @returns {connection_request.IamCredentials} IamCredentials
3828
+ * @throws {Error} If the payload is not a reader or valid buffer
3829
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3830
+ */
3831
+ IamCredentials.decode = function decode(reader, length, error) {
3832
+ if (!(reader instanceof $Reader))
3833
+ reader = $Reader.create(reader);
3834
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.connection_request.IamCredentials();
3835
+ while (reader.pos < end) {
3836
+ var tag = reader.uint32();
3837
+ if (tag === error)
3838
+ break;
3839
+ switch (tag >>> 3) {
3840
+ case 1: {
3841
+ message.clusterName = reader.string();
3842
+ break;
3843
+ }
3844
+ case 2: {
3845
+ message.region = reader.string();
3846
+ break;
3847
+ }
3848
+ case 3: {
3849
+ message.serviceType = reader.int32();
3850
+ break;
3851
+ }
3852
+ case 4: {
3853
+ message.refreshIntervalSeconds = reader.uint32();
3854
+ break;
3855
+ }
3856
+ default:
3857
+ reader.skipType(tag & 7);
3858
+ break;
3859
+ }
3860
+ }
3861
+ return message;
3862
+ };
3863
+
3864
+ /**
3865
+ * Decodes an IamCredentials message from the specified reader or buffer, length delimited.
3866
+ * @function decodeDelimited
3867
+ * @memberof connection_request.IamCredentials
3868
+ * @static
3869
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
3870
+ * @returns {connection_request.IamCredentials} IamCredentials
3871
+ * @throws {Error} If the payload is not a reader or valid buffer
3872
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
3873
+ */
3874
+ IamCredentials.decodeDelimited = function decodeDelimited(reader) {
3875
+ if (!(reader instanceof $Reader))
3876
+ reader = new $Reader(reader);
3877
+ return this.decode(reader, reader.uint32());
3878
+ };
3879
+
3880
+ /**
3881
+ * Gets the default type url for IamCredentials
3882
+ * @function getTypeUrl
3883
+ * @memberof connection_request.IamCredentials
3884
+ * @static
3885
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
3886
+ * @returns {string} The default type url
3887
+ */
3888
+ IamCredentials.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
3889
+ if (typeUrlPrefix === undefined) {
3890
+ typeUrlPrefix = "type.googleapis.com";
3891
+ }
3892
+ return typeUrlPrefix + "/connection_request.IamCredentials";
3893
+ };
3894
+
3895
+ return IamCredentials;
3896
+ })();
3897
+
3516
3898
  /**
3517
3899
  * ProtocolVersion enum.
3518
3900
  * @name connection_request.ProtocolVersion
@@ -4138,6 +4520,9 @@ $root.connection_request = (function() {
4138
4520
  * @property {string|null} [clientAz] ConnectionRequest clientAz
4139
4521
  * @property {number|null} [connectionTimeout] ConnectionRequest connectionTimeout
4140
4522
  * @property {boolean|null} [lazyConnect] ConnectionRequest lazyConnect
4523
+ * @property {boolean|null} [refreshTopologyFromInitialNodes] ConnectionRequest refreshTopologyFromInitialNodes
4524
+ * @property {string|null} [libName] ConnectionRequest libName
4525
+ * @property {Array.<Uint8Array>|null} [rootCerts] ConnectionRequest rootCerts
4141
4526
  */
4142
4527
 
4143
4528
  /**
@@ -4150,6 +4535,7 @@ $root.connection_request = (function() {
4150
4535
  */
4151
4536
  function ConnectionRequest(properties) {
4152
4537
  this.addresses = [];
4538
+ this.rootCerts = [];
4153
4539
  if (properties)
4154
4540
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
4155
4541
  if (properties[keys[i]] != null)
@@ -4292,6 +4678,30 @@ $root.connection_request = (function() {
4292
4678
  */
4293
4679
  ConnectionRequest.prototype.lazyConnect = false;
4294
4680
 
4681
+ /**
4682
+ * ConnectionRequest refreshTopologyFromInitialNodes.
4683
+ * @member {boolean} refreshTopologyFromInitialNodes
4684
+ * @memberof connection_request.ConnectionRequest
4685
+ * @instance
4686
+ */
4687
+ ConnectionRequest.prototype.refreshTopologyFromInitialNodes = false;
4688
+
4689
+ /**
4690
+ * ConnectionRequest libName.
4691
+ * @member {string} libName
4692
+ * @memberof connection_request.ConnectionRequest
4693
+ * @instance
4694
+ */
4695
+ ConnectionRequest.prototype.libName = "";
4696
+
4697
+ /**
4698
+ * ConnectionRequest rootCerts.
4699
+ * @member {Array.<Uint8Array>} rootCerts
4700
+ * @memberof connection_request.ConnectionRequest
4701
+ * @instance
4702
+ */
4703
+ ConnectionRequest.prototype.rootCerts = $util.emptyArray;
4704
+
4295
4705
  // OneOf field names bound to virtual getters and setters
4296
4706
  var $oneOfFields;
4297
4707
 
@@ -4365,6 +4775,13 @@ $root.connection_request = (function() {
4365
4775
  writer.uint32(/* id 16, wireType 0 =*/128).uint32(message.connectionTimeout);
4366
4776
  if (message.lazyConnect != null && Object.hasOwnProperty.call(message, "lazyConnect"))
4367
4777
  writer.uint32(/* id 17, wireType 0 =*/136).bool(message.lazyConnect);
4778
+ if (message.refreshTopologyFromInitialNodes != null && Object.hasOwnProperty.call(message, "refreshTopologyFromInitialNodes"))
4779
+ writer.uint32(/* id 18, wireType 0 =*/144).bool(message.refreshTopologyFromInitialNodes);
4780
+ if (message.libName != null && Object.hasOwnProperty.call(message, "libName"))
4781
+ writer.uint32(/* id 19, wireType 2 =*/154).string(message.libName);
4782
+ if (message.rootCerts != null && message.rootCerts.length)
4783
+ for (var i = 0; i < message.rootCerts.length; ++i)
4784
+ writer.uint32(/* id 20, wireType 2 =*/162).bytes(message.rootCerts[i]);
4368
4785
  return writer;
4369
4786
  };
4370
4787
 
@@ -4471,6 +4888,20 @@ $root.connection_request = (function() {
4471
4888
  message.lazyConnect = reader.bool();
4472
4889
  break;
4473
4890
  }
4891
+ case 18: {
4892
+ message.refreshTopologyFromInitialNodes = reader.bool();
4893
+ break;
4894
+ }
4895
+ case 19: {
4896
+ message.libName = reader.string();
4897
+ break;
4898
+ }
4899
+ case 20: {
4900
+ if (!(message.rootCerts && message.rootCerts.length))
4901
+ message.rootCerts = [];
4902
+ message.rootCerts.push(reader.bytes());
4903
+ break;
4904
+ }
4474
4905
  default:
4475
4906
  reader.skipType(tag & 7);
4476
4907
  break;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "main": "build-ts/index.js",
5
5
  "module": "build-ts/index.js",
6
6
  "types": "build-ts/index.d.ts",
7
- "version": "2.1.2",
7
+ "version": "2.2.0-rc2",
8
8
  "exports": {
9
9
  ".": {
10
10
  "import": {
@@ -89,7 +89,7 @@
89
89
  "@types/jest": "29",
90
90
  "@types/minimist": "1",
91
91
  "@types/semver": "7",
92
- "@types/uuid": "10",
92
+ "@types/uuid": "11",
93
93
  "find-free-port": "2",
94
94
  "lint-staged": "16",
95
95
  "jest": "29",
@@ -134,11 +134,11 @@
134
134
  }
135
135
  },
136
136
  "optionalDependencies": {
137
- "@valkey/valkey-glide-darwin-x64": "2.1.2",
138
- "@valkey/valkey-glide-darwin-arm64": "2.1.2",
139
- "@valkey/valkey-glide-linux-x64-gnu": "2.1.2",
140
- "@valkey/valkey-glide-linux-arm64-gnu": "2.1.2",
141
- "@valkey/valkey-glide-linux-x64-musl": "2.1.2",
142
- "@valkey/valkey-glide-linux-arm64-musl": "2.1.2"
137
+ "@valkey/valkey-glide-darwin-x64": "2.2.0-rc2",
138
+ "@valkey/valkey-glide-darwin-arm64": "2.2.0-rc2",
139
+ "@valkey/valkey-glide-linux-x64-gnu": "2.2.0-rc2",
140
+ "@valkey/valkey-glide-linux-arm64-gnu": "2.2.0-rc2",
141
+ "@valkey/valkey-glide-linux-x64-musl": "2.2.0-rc2",
142
+ "@valkey/valkey-glide-linux-arm64-musl": "2.2.0-rc2"
143
143
  }
144
144
  }