@zilliz/milvus2-sdk-node 2.4.5 → 2.4.6

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.
@@ -1,5 +1,5 @@
1
1
  import { BaseClient } from './BaseClient';
2
- import { CreateDatabaseRequest, ListDatabasesRequest, ListDatabasesResponse, DropDatabasesRequest, DescribeDatabaseRequest, DescribeDatabaseResponse, ResStatus } from '../';
2
+ import { CreateDatabaseRequest, ListDatabasesRequest, ListDatabasesResponse, DropDatabasesRequest, DescribeDatabaseRequest, DescribeDatabaseResponse, AlterDatabaseRequest, ResStatus } from '../';
3
3
  export declare class Database extends BaseClient {
4
4
  /**
5
5
  * Creates a new database.
@@ -76,4 +76,26 @@ export declare class Database extends BaseClient {
76
76
  * ```
77
77
  */
78
78
  dropDatabase(data: DropDatabasesRequest): Promise<ResStatus>;
79
+ /**
80
+ * Modifies database properties.
81
+ *
82
+ * @param {AlterDatabaseRequest} data - The request parameters.
83
+ * @param {string} data.db_name - The name of the database to modify.
84
+ * @param {Object} data.properties - The properties to modify. For example, to change the TTL, use {"database.replica.number": 18000}.
85
+ * @param {number} [data.timeout] - An optional duration of time in milliseconds to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined.
86
+ *
87
+ * @returns {Promise<ResStatus>} The response status of the operation.
88
+ * @returns {string} status.error_code - The error code of the operation.
89
+ * @returns {string} status.reason - The reason for the error, if any.
90
+ *
91
+ * @example
92
+ * ```
93
+ * const milvusClient = new milvusClient(MILUVS_ADDRESS);
94
+ * const resStatus = await milvusClient.alterDatabase({
95
+ * database: 'my-db',
96
+ * properties: {"database.replica.number": 18000}
97
+ * });
98
+ * ```
99
+ */
100
+ alterDatabase(data: AlterDatabaseRequest): Promise<ResStatus>;
79
101
  }
@@ -124,6 +124,36 @@ class Database extends BaseClient_1.BaseClient {
124
124
  return promise;
125
125
  });
126
126
  }
127
+ /**
128
+ * Modifies database properties.
129
+ *
130
+ * @param {AlterDatabaseRequest} data - The request parameters.
131
+ * @param {string} data.db_name - The name of the database to modify.
132
+ * @param {Object} data.properties - The properties to modify. For example, to change the TTL, use {"database.replica.number": 18000}.
133
+ * @param {number} [data.timeout] - An optional duration of time in milliseconds to allow for the RPC. If it is set to undefined, the client keeps waiting until the server responds or error occurs. Default is undefined.
134
+ *
135
+ * @returns {Promise<ResStatus>} The response status of the operation.
136
+ * @returns {string} status.error_code - The error code of the operation.
137
+ * @returns {string} status.reason - The reason for the error, if any.
138
+ *
139
+ * @example
140
+ * ```
141
+ * const milvusClient = new milvusClient(MILUVS_ADDRESS);
142
+ * const resStatus = await milvusClient.alterDatabase({
143
+ * database: 'my-db',
144
+ * properties: {"database.replica.number": 18000}
145
+ * });
146
+ * ```
147
+ */
148
+ alterDatabase(data) {
149
+ return __awaiter(this, void 0, void 0, function* () {
150
+ const promise = yield (0, __1.promisify)(this.channelPool, 'AlterDatabase', {
151
+ db_name: data.db_name,
152
+ properties: (0, __1.parseToKeyValue)(data.properties),
153
+ }, (data === null || data === void 0 ? void 0 : data.timeout) || this.timeout);
154
+ return promise;
155
+ });
156
+ }
127
157
  }
128
158
  exports.Database = Database;
129
159
  //# sourceMappingURL=Database.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Database.js","sourceRoot":"","sources":["../../../milvus/grpc/Database.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA0C;AAC1C,2BASa;AAEb,MAAa,QAAS,SAAQ,uBAAU;IACtC;;;;;;;;;;;;;;;;OAgBG;IACG,cAAc,CAAC,IAA2B;;YAC9C,sBAAsB;YACtB,MAAM,IAAI,CAAC,kBAAkB,CAAC;gBAC5B,OAAO,EAAE,4DAA4D;aACtE,CAAC,CAAC;YAEH,MAAM,OAAO,GAAG,MAAM,IAAA,aAAS,EAC7B,IAAI,CAAC,WAAW,EAChB,gBAAgB,EAChB,IAAI,EACJ,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAC7B,CAAC;YACF,O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AM,IAAI,CAAC,kBAAkB,CAAC;gBAC5B,OAAO,EAAE,0DAA0D;aACpE,CAAC,CAAC;YAEH,MAAM,OAAO,GAAG,MAAM,IAAA,aAAS,EAC7B,IAAI,CAAC,WAAW,EAChB,cAAc,EACd,IAAI,EACJ,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAC7B,CAAC;YACF,OAAO,OAAO,CAAC;QACjB,CAAC;KAAA;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACG,aAAa,CAAC,IAA0B;;YAC5C,MAAM,OAAO,GAAG,MAAM,IAAA,aAAS,EAC7B,IAAI,CAAC,WAAW,EAChB,eAAe,EACf;gBACE,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,UAAU,EAAE,IAAA,mBAAe,EAAC,IAAI,CAAC,UAAU,CAAC;aAC7C,EACD,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,KAAI,IAAI,CAAC,OAAO,CAC9B,CAAC;YAEF,OAAO,OAAO,CAAC;QACjB,CAAC;KAAA;CACF;AA1KD,4BA0KC"}
@@ -1,4 +1,5 @@
1
1
  import { GrpcTimeOut, resStatusResponse, KeyValuePair } from './Common';
2
+ import { Properties } from './';
2
3
  export interface databaseReq extends GrpcTimeOut {
3
4
  db_name: string;
4
5
  }
@@ -19,3 +20,10 @@ export interface DescribeDatabaseResponse extends resStatusResponse {
19
20
  created_timestamp: number;
20
21
  properties: KeyValuePair[];
21
22
  }
23
+ export interface AlterDatabaseRequest extends GrpcTimeOut {
24
+ db_name: string;
25
+ db_id?: string;
26
+ properties: Properties;
27
+ }
28
+ export interface AlterDatabaseResponse extends resStatusResponse {
29
+ }
@@ -1433,6 +1433,8 @@ message DropRoleRequest {
1433
1433
  common.MsgBase base = 1;
1434
1434
  // role name
1435
1435
  string role_name = 2;
1436
+ // force to drop the role even if there is permission binding
1437
+ bool force_drop = 3;
1436
1438
  }
1437
1439
 
1438
1440
  enum OperateUserRoleType {
@@ -1620,7 +1622,7 @@ message RestoreRBACMetaRequest {
1620
1622
  message GetLoadingProgressRequest {
1621
1623
  option (common.privilege_ext_obj) = {
1622
1624
  object_type: Collection
1623
- object_privilege: PrivilegeLoad
1625
+ object_privilege: PrivilegeGetLoadState
1624
1626
  object_name_index: 2
1625
1627
  };
1626
1628
  // Not useful for now
@@ -1639,7 +1641,7 @@ message GetLoadingProgressResponse {
1639
1641
  message GetLoadStateRequest {
1640
1642
  option (common.privilege_ext_obj) = {
1641
1643
  object_type: Collection
1642
- object_privilege: PrivilegeLoad
1644
+ object_privilege: PrivilegeGetLoadState
1643
1645
  object_name_index: 2
1644
1646
  };
1645
1647
  // Not useful for now
package/dist/sdk.json CHANGED
@@ -1 +1 @@
1
- {"version":"2.4.5","milvusVersion":"v2.4.8"}
1
+ {"version":"2.4.6","milvusVersion":"v2.4.8"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zilliz/milvus2-sdk-node",
3
3
  "author": "ued@zilliz.com",
4
- "version": "2.4.5",
4
+ "version": "2.4.6",
5
5
  "milvusVersion": "v2.4.8",
6
6
  "main": "dist/milvus",
7
7
  "files": [