chromadb 2.2.0 → 2.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.
@@ -1,28 +1,7 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __commonJS = (cb, mod) => function __require() {
8
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
19
- // If the importer is in node compatibility mode or this is not an ESM
20
- // file that has been converted to a CommonJS file using a Babel-
21
- // compatible transform (i.e. "__esModule" has not been set), then set
22
- // "default" to the CommonJS "module.exports" for node compatibility.
23
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
24
- mod
25
- ));
1
+ import {
2
+ __commonJS,
3
+ __toESM
4
+ } from "./chunk-MJPHVYKR.mjs";
26
5
 
27
6
  // ../../node_modules/.pnpm/ajv@8.16.0/node_modules/ajv/dist/compile/codegen/code.js
28
7
  var require_code = __commonJS({
@@ -6793,7 +6772,7 @@ var require_ajv = __commonJS({
6793
6772
  });
6794
6773
 
6795
6774
  // ../chromadb-core/package.json
6796
- var version = "2.2.0";
6775
+ var version = "2.2.1";
6797
6776
 
6798
6777
  // ../chromadb-core/src/generated/runtime.ts
6799
6778
  import "isomorphic-fetch";
@@ -6822,24 +6801,49 @@ var RequiredError = class _RequiredError extends Error {
6822
6801
  var ApiApiFetchParamCreator = function(configuration) {
6823
6802
  return {
6824
6803
  /**
6825
- * @summary Add V1
6804
+ * @summary Adds records to a collection.
6805
+ * @param {string} tenant
6806
+ * @param {string} database
6826
6807
  * @param {string} collectionId
6827
- * @param {Api.AddV1V1Request} request
6808
+ * @param {Api.AddCollectionRecordsPayload} request
6828
6809
  * @param {RequestInit} [options] Override http request option.
6829
6810
  * @throws {RequiredError}
6830
6811
  */
6831
- addV1V1(collectionId, request, options = {}) {
6812
+ collectionAdd(tenant, database, collectionId, request, options = {}) {
6813
+ if (tenant === null || tenant === void 0) {
6814
+ throw new RequiredError(
6815
+ "tenant",
6816
+ "Required parameter tenant was null or undefined when calling collectionAdd."
6817
+ );
6818
+ }
6819
+ if (database === null || database === void 0) {
6820
+ throw new RequiredError(
6821
+ "database",
6822
+ "Required parameter database was null or undefined when calling collectionAdd."
6823
+ );
6824
+ }
6832
6825
  if (collectionId === null || collectionId === void 0) {
6833
- throw new RequiredError("collectionId", "Required parameter collectionId was null or undefined when calling addV1V1.");
6826
+ throw new RequiredError(
6827
+ "collectionId",
6828
+ "Required parameter collectionId was null or undefined when calling collectionAdd."
6829
+ );
6834
6830
  }
6835
6831
  if (request === null || request === void 0) {
6836
- throw new RequiredError("request", "Required parameter request was null or undefined when calling addV1V1.");
6832
+ throw new RequiredError(
6833
+ "request",
6834
+ "Required parameter request was null or undefined when calling collectionAdd."
6835
+ );
6837
6836
  }
6838
- let localVarPath = `/api/v1/collections/{collection_id}/add`.replace("{collection_id}", encodeURIComponent(String(collectionId)));
6837
+ let localVarPath = `/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/add`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database}", encodeURIComponent(String(database))).replace("{collection_id}", encodeURIComponent(String(collectionId)));
6839
6838
  const localVarPathQueryStart = localVarPath.indexOf("?");
6840
- const localVarRequestOptions = Object.assign({ method: "POST" }, options);
6839
+ const localVarRequestOptions = Object.assign(
6840
+ { method: "POST" },
6841
+ options
6842
+ );
6841
6843
  const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
6842
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
6844
+ const localVarQueryParameter = new URLSearchParams(
6845
+ localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : ""
6846
+ );
6843
6847
  if (localVarPathQueryStart !== -1) {
6844
6848
  localVarPath = localVarPath.substring(0, localVarPathQueryStart);
6845
6849
  }
@@ -6858,40 +6862,46 @@ var ApiApiFetchParamCreator = function(configuration) {
6858
6862
  };
6859
6863
  },
6860
6864
  /**
6861
- * @summary Add
6862
- * @param {string} tenant
6863
- * @param {string} databaseName
6864
- * @param {string} collectionId
6865
- * @param {Api.AddV2Request} request
6865
+ * @summary Retrieves the number of records in a collection.
6866
+ * @param {string} tenant <p>Tenant ID for the collection</p>
6867
+ * @param {string} database <p>Database containing this collection</p>
6868
+ * @param {string} collectionId <p>Collection ID whose records are counted</p>
6866
6869
  * @param {RequestInit} [options] Override http request option.
6867
6870
  * @throws {RequiredError}
6868
6871
  */
6869
- addV2(tenant, databaseName, collectionId, request, options = {}) {
6872
+ collectionCount(tenant, database, collectionId, options = {}) {
6870
6873
  if (tenant === null || tenant === void 0) {
6871
- throw new RequiredError("tenant", "Required parameter tenant was null or undefined when calling addV2.");
6874
+ throw new RequiredError(
6875
+ "tenant",
6876
+ "Required parameter tenant was null or undefined when calling collectionCount."
6877
+ );
6872
6878
  }
6873
- if (databaseName === null || databaseName === void 0) {
6874
- throw new RequiredError("databaseName", "Required parameter databaseName was null or undefined when calling addV2.");
6879
+ if (database === null || database === void 0) {
6880
+ throw new RequiredError(
6881
+ "database",
6882
+ "Required parameter database was null or undefined when calling collectionCount."
6883
+ );
6875
6884
  }
6876
6885
  if (collectionId === null || collectionId === void 0) {
6877
- throw new RequiredError("collectionId", "Required parameter collectionId was null or undefined when calling addV2.");
6878
- }
6879
- if (request === null || request === void 0) {
6880
- throw new RequiredError("request", "Required parameter request was null or undefined when calling addV2.");
6886
+ throw new RequiredError(
6887
+ "collectionId",
6888
+ "Required parameter collectionId was null or undefined when calling collectionCount."
6889
+ );
6881
6890
  }
6882
- let localVarPath = `/api/v2/tenants/{tenant}/databases/{database_name}/collections/{collection_id}/add`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database_name}", encodeURIComponent(String(databaseName))).replace("{collection_id}", encodeURIComponent(String(collectionId)));
6891
+ let localVarPath = `/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/count`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database}", encodeURIComponent(String(database))).replace("{collection_id}", encodeURIComponent(String(collectionId)));
6883
6892
  const localVarPathQueryStart = localVarPath.indexOf("?");
6884
- const localVarRequestOptions = Object.assign({ method: "POST" }, options);
6893
+ const localVarRequestOptions = Object.assign(
6894
+ { method: "GET" },
6895
+ options
6896
+ );
6885
6897
  const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
6886
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
6898
+ const localVarQueryParameter = new URLSearchParams(
6899
+ localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : ""
6900
+ );
6887
6901
  if (localVarPathQueryStart !== -1) {
6888
6902
  localVarPath = localVarPath.substring(0, localVarPathQueryStart);
6889
6903
  }
6890
- localVarHeaderParameter.set("Content-Type", "application/json");
6891
6904
  localVarRequestOptions.headers = localVarHeaderParameter;
6892
- if (request !== void 0) {
6893
- localVarRequestOptions.body = JSON.stringify(request || {});
6894
- }
6895
6905
  const localVarQueryParameterString = localVarQueryParameter.toString();
6896
6906
  if (localVarQueryParameterString) {
6897
6907
  localVarPath += "?" + localVarQueryParameterString;
@@ -6902,28 +6912,57 @@ var ApiApiFetchParamCreator = function(configuration) {
6902
6912
  };
6903
6913
  },
6904
6914
  /**
6905
- * @summary Count Collections V1
6906
- * @param {string} [tenant]
6907
- * @param {string} [database]
6915
+ * @summary Deletes records in a collection. Can filter by IDs or metadata.
6916
+ * @param {string} tenant <p>Tenant ID</p>
6917
+ * @param {string} database <p>Database name</p>
6918
+ * @param {string} collectionId <p>Collection ID</p>
6919
+ * @param {Api.DeleteCollectionRecordsPayload} request
6908
6920
  * @param {RequestInit} [options] Override http request option.
6909
6921
  * @throws {RequiredError}
6910
6922
  */
6911
- countCollectionsV1V1(tenant, database, options = {}) {
6912
- let localVarPath = `/api/v1/count_collections`;
6923
+ collectionDelete(tenant, database, collectionId, request, options = {}) {
6924
+ if (tenant === null || tenant === void 0) {
6925
+ throw new RequiredError(
6926
+ "tenant",
6927
+ "Required parameter tenant was null or undefined when calling collectionDelete."
6928
+ );
6929
+ }
6930
+ if (database === null || database === void 0) {
6931
+ throw new RequiredError(
6932
+ "database",
6933
+ "Required parameter database was null or undefined when calling collectionDelete."
6934
+ );
6935
+ }
6936
+ if (collectionId === null || collectionId === void 0) {
6937
+ throw new RequiredError(
6938
+ "collectionId",
6939
+ "Required parameter collectionId was null or undefined when calling collectionDelete."
6940
+ );
6941
+ }
6942
+ if (request === null || request === void 0) {
6943
+ throw new RequiredError(
6944
+ "request",
6945
+ "Required parameter request was null or undefined when calling collectionDelete."
6946
+ );
6947
+ }
6948
+ let localVarPath = `/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/delete`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database}", encodeURIComponent(String(database))).replace("{collection_id}", encodeURIComponent(String(collectionId)));
6913
6949
  const localVarPathQueryStart = localVarPath.indexOf("?");
6914
- const localVarRequestOptions = Object.assign({ method: "GET" }, options);
6950
+ const localVarRequestOptions = Object.assign(
6951
+ { method: "POST" },
6952
+ options
6953
+ );
6915
6954
  const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
6916
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
6955
+ const localVarQueryParameter = new URLSearchParams(
6956
+ localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : ""
6957
+ );
6917
6958
  if (localVarPathQueryStart !== -1) {
6918
6959
  localVarPath = localVarPath.substring(0, localVarPathQueryStart);
6919
6960
  }
6920
- if (tenant !== void 0) {
6921
- localVarQueryParameter.append("tenant", String(tenant));
6922
- }
6923
- if (database !== void 0) {
6924
- localVarQueryParameter.append("database", String(database));
6925
- }
6961
+ localVarHeaderParameter.set("Content-Type", "application/json");
6926
6962
  localVarRequestOptions.headers = localVarHeaderParameter;
6963
+ if (request !== void 0) {
6964
+ localVarRequestOptions.body = JSON.stringify(request || {});
6965
+ }
6927
6966
  const localVarQueryParameterString = localVarQueryParameter.toString();
6928
6967
  if (localVarQueryParameterString) {
6929
6968
  localVarPath += "?" + localVarQueryParameterString;
@@ -6934,28 +6973,57 @@ var ApiApiFetchParamCreator = function(configuration) {
6934
6973
  };
6935
6974
  },
6936
6975
  /**
6937
- * @summary Count Collections
6938
- * @param {string} tenant
6939
- * @param {string} databaseName
6976
+ * @summary Retrieves records from a collection by ID or metadata filter.
6977
+ * @param {string} tenant <p>Tenant ID</p>
6978
+ * @param {string} database <p>Database name for the collection</p>
6979
+ * @param {string} collectionId <p>Collection ID to fetch records from</p>
6980
+ * @param {Api.GetRequestPayload} request
6940
6981
  * @param {RequestInit} [options] Override http request option.
6941
6982
  * @throws {RequiredError}
6942
6983
  */
6943
- countCollectionsV2(tenant, databaseName, options = {}) {
6984
+ collectionGet(tenant, database, collectionId, request, options = {}) {
6944
6985
  if (tenant === null || tenant === void 0) {
6945
- throw new RequiredError("tenant", "Required parameter tenant was null or undefined when calling countCollectionsV2.");
6986
+ throw new RequiredError(
6987
+ "tenant",
6988
+ "Required parameter tenant was null or undefined when calling collectionGet."
6989
+ );
6990
+ }
6991
+ if (database === null || database === void 0) {
6992
+ throw new RequiredError(
6993
+ "database",
6994
+ "Required parameter database was null or undefined when calling collectionGet."
6995
+ );
6996
+ }
6997
+ if (collectionId === null || collectionId === void 0) {
6998
+ throw new RequiredError(
6999
+ "collectionId",
7000
+ "Required parameter collectionId was null or undefined when calling collectionGet."
7001
+ );
6946
7002
  }
6947
- if (databaseName === null || databaseName === void 0) {
6948
- throw new RequiredError("databaseName", "Required parameter databaseName was null or undefined when calling countCollectionsV2.");
7003
+ if (request === null || request === void 0) {
7004
+ throw new RequiredError(
7005
+ "request",
7006
+ "Required parameter request was null or undefined when calling collectionGet."
7007
+ );
6949
7008
  }
6950
- let localVarPath = `/api/v2/tenants/{tenant}/databases/{database_name}/collections_count`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database_name}", encodeURIComponent(String(databaseName)));
7009
+ let localVarPath = `/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/get`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database}", encodeURIComponent(String(database))).replace("{collection_id}", encodeURIComponent(String(collectionId)));
6951
7010
  const localVarPathQueryStart = localVarPath.indexOf("?");
6952
- const localVarRequestOptions = Object.assign({ method: "GET" }, options);
7011
+ const localVarRequestOptions = Object.assign(
7012
+ { method: "POST" },
7013
+ options
7014
+ );
6953
7015
  const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
6954
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7016
+ const localVarQueryParameter = new URLSearchParams(
7017
+ localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : ""
7018
+ );
6955
7019
  if (localVarPathQueryStart !== -1) {
6956
7020
  localVarPath = localVarPath.substring(0, localVarPathQueryStart);
6957
7021
  }
7022
+ localVarHeaderParameter.set("Content-Type", "application/json");
6958
7023
  localVarRequestOptions.headers = localVarHeaderParameter;
7024
+ if (request !== void 0) {
7025
+ localVarRequestOptions.body = JSON.stringify(request || {});
7026
+ }
6959
7027
  const localVarQueryParameterString = localVarQueryParameter.toString();
6960
7028
  if (localVarQueryParameterString) {
6961
7029
  localVarPath += "?" + localVarQueryParameterString;
@@ -6966,24 +7034,65 @@ var ApiApiFetchParamCreator = function(configuration) {
6966
7034
  };
6967
7035
  },
6968
7036
  /**
6969
- * @summary Count V1
6970
- * @param {string} collectionId
7037
+ * @summary Query a collection in a variety of ways, including vector search, metadata filtering, and full-text search
7038
+ * @param {string} tenant <p>Tenant ID</p>
7039
+ * @param {string} database <p>Database name containing the collection</p>
7040
+ * @param {string} collectionId <p>Collection ID to query</p>
7041
+ * @param {number} [limit] <p>Limit for pagination</p>
7042
+ * @param {number} [offset] <p>Offset for pagination</p>
7043
+ * @param {Api.QueryRequestPayload} request
6971
7044
  * @param {RequestInit} [options] Override http request option.
6972
7045
  * @throws {RequiredError}
6973
7046
  */
6974
- countV1V1(collectionId, options = {}) {
7047
+ collectionQuery(tenant, database, collectionId, limit, offset, request, options = {}) {
7048
+ if (tenant === null || tenant === void 0) {
7049
+ throw new RequiredError(
7050
+ "tenant",
7051
+ "Required parameter tenant was null or undefined when calling collectionQuery."
7052
+ );
7053
+ }
7054
+ if (database === null || database === void 0) {
7055
+ throw new RequiredError(
7056
+ "database",
7057
+ "Required parameter database was null or undefined when calling collectionQuery."
7058
+ );
7059
+ }
6975
7060
  if (collectionId === null || collectionId === void 0) {
6976
- throw new RequiredError("collectionId", "Required parameter collectionId was null or undefined when calling countV1V1.");
7061
+ throw new RequiredError(
7062
+ "collectionId",
7063
+ "Required parameter collectionId was null or undefined when calling collectionQuery."
7064
+ );
7065
+ }
7066
+ if (request === null || request === void 0) {
7067
+ throw new RequiredError(
7068
+ "request",
7069
+ "Required parameter request was null or undefined when calling collectionQuery."
7070
+ );
6977
7071
  }
6978
- let localVarPath = `/api/v1/collections/{collection_id}/count`.replace("{collection_id}", encodeURIComponent(String(collectionId)));
7072
+ let localVarPath = `/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/query`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database}", encodeURIComponent(String(database))).replace("{collection_id}", encodeURIComponent(String(collectionId)));
6979
7073
  const localVarPathQueryStart = localVarPath.indexOf("?");
6980
- const localVarRequestOptions = Object.assign({ method: "GET" }, options);
7074
+ const localVarRequestOptions = Object.assign(
7075
+ { method: "POST" },
7076
+ options
7077
+ );
6981
7078
  const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
6982
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7079
+ const localVarQueryParameter = new URLSearchParams(
7080
+ localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : ""
7081
+ );
6983
7082
  if (localVarPathQueryStart !== -1) {
6984
7083
  localVarPath = localVarPath.substring(0, localVarPathQueryStart);
6985
7084
  }
7085
+ if (limit !== void 0) {
7086
+ localVarQueryParameter.append("limit", String(limit));
7087
+ }
7088
+ if (offset !== void 0) {
7089
+ localVarQueryParameter.append("offset", String(offset));
7090
+ }
7091
+ localVarHeaderParameter.set("Content-Type", "application/json");
6986
7092
  localVarRequestOptions.headers = localVarHeaderParameter;
7093
+ if (request !== void 0) {
7094
+ localVarRequestOptions.body = JSON.stringify(request || {});
7095
+ }
6987
7096
  const localVarQueryParameterString = localVarQueryParameter.toString();
6988
7097
  if (localVarQueryParameterString) {
6989
7098
  localVarPath += "?" + localVarQueryParameterString;
@@ -6994,32 +7103,57 @@ var ApiApiFetchParamCreator = function(configuration) {
6994
7103
  };
6995
7104
  },
6996
7105
  /**
6997
- * @summary Count
7106
+ * @summary Updates records in a collection by ID.
6998
7107
  * @param {string} tenant
6999
- * @param {string} databaseName
7108
+ * @param {string} database
7000
7109
  * @param {string} collectionId
7110
+ * @param {Api.UpdateCollectionRecordsPayload} request
7001
7111
  * @param {RequestInit} [options] Override http request option.
7002
7112
  * @throws {RequiredError}
7003
7113
  */
7004
- countV2(tenant, databaseName, collectionId, options = {}) {
7114
+ collectionUpdate(tenant, database, collectionId, request, options = {}) {
7005
7115
  if (tenant === null || tenant === void 0) {
7006
- throw new RequiredError("tenant", "Required parameter tenant was null or undefined when calling countV2.");
7116
+ throw new RequiredError(
7117
+ "tenant",
7118
+ "Required parameter tenant was null or undefined when calling collectionUpdate."
7119
+ );
7007
7120
  }
7008
- if (databaseName === null || databaseName === void 0) {
7009
- throw new RequiredError("databaseName", "Required parameter databaseName was null or undefined when calling countV2.");
7121
+ if (database === null || database === void 0) {
7122
+ throw new RequiredError(
7123
+ "database",
7124
+ "Required parameter database was null or undefined when calling collectionUpdate."
7125
+ );
7010
7126
  }
7011
7127
  if (collectionId === null || collectionId === void 0) {
7012
- throw new RequiredError("collectionId", "Required parameter collectionId was null or undefined when calling countV2.");
7128
+ throw new RequiredError(
7129
+ "collectionId",
7130
+ "Required parameter collectionId was null or undefined when calling collectionUpdate."
7131
+ );
7132
+ }
7133
+ if (request === null || request === void 0) {
7134
+ throw new RequiredError(
7135
+ "request",
7136
+ "Required parameter request was null or undefined when calling collectionUpdate."
7137
+ );
7013
7138
  }
7014
- let localVarPath = `/api/v2/tenants/{tenant}/databases/{database_name}/collections/{collection_id}/count`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database_name}", encodeURIComponent(String(databaseName))).replace("{collection_id}", encodeURIComponent(String(collectionId)));
7139
+ let localVarPath = `/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/update`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database}", encodeURIComponent(String(database))).replace("{collection_id}", encodeURIComponent(String(collectionId)));
7015
7140
  const localVarPathQueryStart = localVarPath.indexOf("?");
7016
- const localVarRequestOptions = Object.assign({ method: "GET" }, options);
7141
+ const localVarRequestOptions = Object.assign(
7142
+ { method: "POST" },
7143
+ options
7144
+ );
7017
7145
  const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7018
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7146
+ const localVarQueryParameter = new URLSearchParams(
7147
+ localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : ""
7148
+ );
7019
7149
  if (localVarPathQueryStart !== -1) {
7020
7150
  localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7021
7151
  }
7152
+ localVarHeaderParameter.set("Content-Type", "application/json");
7022
7153
  localVarRequestOptions.headers = localVarHeaderParameter;
7154
+ if (request !== void 0) {
7155
+ localVarRequestOptions.body = JSON.stringify(request || {});
7156
+ }
7023
7157
  const localVarQueryParameterString = localVarQueryParameter.toString();
7024
7158
  if (localVarQueryParameterString) {
7025
7159
  localVarPath += "?" + localVarQueryParameterString;
@@ -7030,31 +7164,52 @@ var ApiApiFetchParamCreator = function(configuration) {
7030
7164
  };
7031
7165
  },
7032
7166
  /**
7033
- * @summary Create Collection V1
7034
- * @param {string} [tenant]
7035
- * @param {string} [database]
7036
- * @param {Api.CreateCollectionV1V1Request} request
7167
+ * @summary Upserts records in a collection (create if not exists, otherwise update).
7168
+ * @param {string} tenant <p>Tenant ID</p>
7169
+ * @param {string} database <p>Database name</p>
7170
+ * @param {string} collectionId <p>Collection ID</p>
7171
+ * @param {Api.UpsertCollectionRecordsPayload} request
7037
7172
  * @param {RequestInit} [options] Override http request option.
7038
7173
  * @throws {RequiredError}
7039
7174
  */
7040
- createCollectionV1V1(tenant, database, request, options = {}) {
7175
+ collectionUpsert(tenant, database, collectionId, request, options = {}) {
7176
+ if (tenant === null || tenant === void 0) {
7177
+ throw new RequiredError(
7178
+ "tenant",
7179
+ "Required parameter tenant was null or undefined when calling collectionUpsert."
7180
+ );
7181
+ }
7182
+ if (database === null || database === void 0) {
7183
+ throw new RequiredError(
7184
+ "database",
7185
+ "Required parameter database was null or undefined when calling collectionUpsert."
7186
+ );
7187
+ }
7188
+ if (collectionId === null || collectionId === void 0) {
7189
+ throw new RequiredError(
7190
+ "collectionId",
7191
+ "Required parameter collectionId was null or undefined when calling collectionUpsert."
7192
+ );
7193
+ }
7041
7194
  if (request === null || request === void 0) {
7042
- throw new RequiredError("request", "Required parameter request was null or undefined when calling createCollectionV1V1.");
7195
+ throw new RequiredError(
7196
+ "request",
7197
+ "Required parameter request was null or undefined when calling collectionUpsert."
7198
+ );
7043
7199
  }
7044
- let localVarPath = `/api/v1/collections`;
7200
+ let localVarPath = `/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/upsert`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database}", encodeURIComponent(String(database))).replace("{collection_id}", encodeURIComponent(String(collectionId)));
7045
7201
  const localVarPathQueryStart = localVarPath.indexOf("?");
7046
- const localVarRequestOptions = Object.assign({ method: "POST" }, options);
7202
+ const localVarRequestOptions = Object.assign(
7203
+ { method: "POST" },
7204
+ options
7205
+ );
7047
7206
  const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7048
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7207
+ const localVarQueryParameter = new URLSearchParams(
7208
+ localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : ""
7209
+ );
7049
7210
  if (localVarPathQueryStart !== -1) {
7050
7211
  localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7051
7212
  }
7052
- if (tenant !== void 0) {
7053
- localVarQueryParameter.append("tenant", String(tenant));
7054
- }
7055
- if (database !== void 0) {
7056
- localVarQueryParameter.append("database", String(database));
7057
- }
7058
7213
  localVarHeaderParameter.set("Content-Type", "application/json");
7059
7214
  localVarRequestOptions.headers = localVarHeaderParameter;
7060
7215
  if (request !== void 0) {
@@ -7070,36 +7225,39 @@ var ApiApiFetchParamCreator = function(configuration) {
7070
7225
  };
7071
7226
  },
7072
7227
  /**
7073
- * @summary Create Collection
7074
- * @param {string} tenant
7075
- * @param {string} databaseName
7076
- * @param {Api.CreateCollectionV2Request} request
7228
+ * @summary Retrieves the total number of collections in a given database.
7229
+ * @param {string} tenant <p>Tenant ID</p>
7230
+ * @param {string} database <p>Database name to count collections from</p>
7077
7231
  * @param {RequestInit} [options] Override http request option.
7078
7232
  * @throws {RequiredError}
7079
7233
  */
7080
- createCollectionV2(tenant, databaseName, request, options = {}) {
7234
+ countCollections(tenant, database, options = {}) {
7081
7235
  if (tenant === null || tenant === void 0) {
7082
- throw new RequiredError("tenant", "Required parameter tenant was null or undefined when calling createCollectionV2.");
7083
- }
7084
- if (databaseName === null || databaseName === void 0) {
7085
- throw new RequiredError("databaseName", "Required parameter databaseName was null or undefined when calling createCollectionV2.");
7236
+ throw new RequiredError(
7237
+ "tenant",
7238
+ "Required parameter tenant was null or undefined when calling countCollections."
7239
+ );
7086
7240
  }
7087
- if (request === null || request === void 0) {
7088
- throw new RequiredError("request", "Required parameter request was null or undefined when calling createCollectionV2.");
7241
+ if (database === null || database === void 0) {
7242
+ throw new RequiredError(
7243
+ "database",
7244
+ "Required parameter database was null or undefined when calling countCollections."
7245
+ );
7089
7246
  }
7090
- let localVarPath = `/api/v2/tenants/{tenant}/databases/{database_name}/collections`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database_name}", encodeURIComponent(String(databaseName)));
7247
+ let localVarPath = `/api/v2/tenants/{tenant}/databases/{database}/collections_count`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database}", encodeURIComponent(String(database)));
7091
7248
  const localVarPathQueryStart = localVarPath.indexOf("?");
7092
- const localVarRequestOptions = Object.assign({ method: "POST" }, options);
7249
+ const localVarRequestOptions = Object.assign(
7250
+ { method: "GET" },
7251
+ options
7252
+ );
7093
7253
  const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7094
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7254
+ const localVarQueryParameter = new URLSearchParams(
7255
+ localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : ""
7256
+ );
7095
7257
  if (localVarPathQueryStart !== -1) {
7096
7258
  localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7097
7259
  }
7098
- localVarHeaderParameter.set("Content-Type", "application/json");
7099
7260
  localVarRequestOptions.headers = localVarHeaderParameter;
7100
- if (request !== void 0) {
7101
- localVarRequestOptions.body = JSON.stringify(request || {});
7102
- }
7103
7261
  const localVarQueryParameterString = localVarQueryParameter.toString();
7104
7262
  if (localVarQueryParameterString) {
7105
7263
  localVarPath += "?" + localVarQueryParameterString;
@@ -7110,27 +7268,45 @@ var ApiApiFetchParamCreator = function(configuration) {
7110
7268
  };
7111
7269
  },
7112
7270
  /**
7113
- * @summary Create Database V1
7114
- * @param {string} [tenant]
7115
- * @param {Api.CreateDatabaseV1V1Request} request
7271
+ * @summary Creates a new collection under the specified database.
7272
+ * @param {string} tenant <p>Tenant ID</p>
7273
+ * @param {string} database <p>Database name containing the new collection</p>
7274
+ * @param {Api.CreateCollectionPayload} request
7116
7275
  * @param {RequestInit} [options] Override http request option.
7117
7276
  * @throws {RequiredError}
7118
7277
  */
7119
- createDatabaseV1V1(tenant, request, options = {}) {
7278
+ createCollection(tenant, database, request, options = {}) {
7279
+ if (tenant === null || tenant === void 0) {
7280
+ throw new RequiredError(
7281
+ "tenant",
7282
+ "Required parameter tenant was null or undefined when calling createCollection."
7283
+ );
7284
+ }
7285
+ if (database === null || database === void 0) {
7286
+ throw new RequiredError(
7287
+ "database",
7288
+ "Required parameter database was null or undefined when calling createCollection."
7289
+ );
7290
+ }
7120
7291
  if (request === null || request === void 0) {
7121
- throw new RequiredError("request", "Required parameter request was null or undefined when calling createDatabaseV1V1.");
7292
+ throw new RequiredError(
7293
+ "request",
7294
+ "Required parameter request was null or undefined when calling createCollection."
7295
+ );
7122
7296
  }
7123
- let localVarPath = `/api/v1/databases`;
7297
+ let localVarPath = `/api/v2/tenants/{tenant}/databases/{database}/collections`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database}", encodeURIComponent(String(database)));
7124
7298
  const localVarPathQueryStart = localVarPath.indexOf("?");
7125
- const localVarRequestOptions = Object.assign({ method: "POST" }, options);
7299
+ const localVarRequestOptions = Object.assign(
7300
+ { method: "POST" },
7301
+ options
7302
+ );
7126
7303
  const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7127
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7304
+ const localVarQueryParameter = new URLSearchParams(
7305
+ localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : ""
7306
+ );
7128
7307
  if (localVarPathQueryStart !== -1) {
7129
7308
  localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7130
7309
  }
7131
- if (tenant !== void 0) {
7132
- localVarQueryParameter.append("tenant", String(tenant));
7133
- }
7134
7310
  localVarHeaderParameter.set("Content-Type", "application/json");
7135
7311
  localVarRequestOptions.headers = localVarHeaderParameter;
7136
7312
  if (request !== void 0) {
@@ -7146,24 +7322,38 @@ var ApiApiFetchParamCreator = function(configuration) {
7146
7322
  };
7147
7323
  },
7148
7324
  /**
7149
- * @summary Create Database
7150
- * @param {string} tenant
7151
- * @param {Api.CreateDatabaseV2Request} request
7325
+ * @summary Creates a new database for a given tenant.
7326
+ * @param {string} tenant <p>Tenant ID to associate with the new database</p>
7327
+ * @param {Api.CreateDatabasePayload} request
7152
7328
  * @param {RequestInit} [options] Override http request option.
7153
7329
  * @throws {RequiredError}
7154
7330
  */
7155
- createDatabaseV2(tenant, request, options = {}) {
7331
+ createDatabase(tenant, request, options = {}) {
7156
7332
  if (tenant === null || tenant === void 0) {
7157
- throw new RequiredError("tenant", "Required parameter tenant was null or undefined when calling createDatabaseV2.");
7333
+ throw new RequiredError(
7334
+ "tenant",
7335
+ "Required parameter tenant was null or undefined when calling createDatabase."
7336
+ );
7158
7337
  }
7159
7338
  if (request === null || request === void 0) {
7160
- throw new RequiredError("request", "Required parameter request was null or undefined when calling createDatabaseV2.");
7339
+ throw new RequiredError(
7340
+ "request",
7341
+ "Required parameter request was null or undefined when calling createDatabase."
7342
+ );
7161
7343
  }
7162
- let localVarPath = `/api/v2/tenants/{tenant}/databases`.replace("{tenant}", encodeURIComponent(String(tenant)));
7344
+ let localVarPath = `/api/v2/tenants/{tenant}/databases`.replace(
7345
+ "{tenant}",
7346
+ encodeURIComponent(String(tenant))
7347
+ );
7163
7348
  const localVarPathQueryStart = localVarPath.indexOf("?");
7164
- const localVarRequestOptions = Object.assign({ method: "POST" }, options);
7349
+ const localVarRequestOptions = Object.assign(
7350
+ { method: "POST" },
7351
+ options
7352
+ );
7165
7353
  const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7166
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7354
+ const localVarQueryParameter = new URLSearchParams(
7355
+ localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : ""
7356
+ );
7167
7357
  if (localVarPathQueryStart !== -1) {
7168
7358
  localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7169
7359
  }
@@ -7182,20 +7372,28 @@ var ApiApiFetchParamCreator = function(configuration) {
7182
7372
  };
7183
7373
  },
7184
7374
  /**
7185
- * @summary Create Tenant V1
7186
- * @param {Api.CreateTenantV1V1Request} request
7375
+ * @summary Creates a new tenant.
7376
+ * @param {Api.CreateTenantPayload} request
7187
7377
  * @param {RequestInit} [options] Override http request option.
7188
7378
  * @throws {RequiredError}
7189
7379
  */
7190
- createTenantV1V1(request, options = {}) {
7380
+ createTenant(request, options = {}) {
7191
7381
  if (request === null || request === void 0) {
7192
- throw new RequiredError("request", "Required parameter request was null or undefined when calling createTenantV1V1.");
7382
+ throw new RequiredError(
7383
+ "request",
7384
+ "Required parameter request was null or undefined when calling createTenant."
7385
+ );
7193
7386
  }
7194
- let localVarPath = `/api/v1/tenants`;
7387
+ let localVarPath = `/api/v2/tenants`;
7195
7388
  const localVarPathQueryStart = localVarPath.indexOf("?");
7196
- const localVarRequestOptions = Object.assign({ method: "POST" }, options);
7389
+ const localVarRequestOptions = Object.assign(
7390
+ { method: "POST" },
7391
+ options
7392
+ );
7197
7393
  const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7198
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7394
+ const localVarQueryParameter = new URLSearchParams(
7395
+ localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : ""
7396
+ );
7199
7397
  if (localVarPathQueryStart !== -1) {
7200
7398
  localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7201
7399
  }
@@ -7214,28 +7412,46 @@ var ApiApiFetchParamCreator = function(configuration) {
7214
7412
  };
7215
7413
  },
7216
7414
  /**
7217
- * @summary Create Tenant
7218
- * @param {Api.CreateTenantV2Request} request
7415
+ * @summary Deletes a collection in a given database.
7416
+ * @param {string} tenant <p>Tenant ID</p>
7417
+ * @param {string} database <p>Database name</p>
7418
+ * @param {string} collectionId <p>UUID of the collection to delete</p>
7219
7419
  * @param {RequestInit} [options] Override http request option.
7220
7420
  * @throws {RequiredError}
7221
7421
  */
7222
- createTenantV2(request, options = {}) {
7223
- if (request === null || request === void 0) {
7224
- throw new RequiredError("request", "Required parameter request was null or undefined when calling createTenantV2.");
7422
+ deleteCollection(tenant, database, collectionId, options = {}) {
7423
+ if (tenant === null || tenant === void 0) {
7424
+ throw new RequiredError(
7425
+ "tenant",
7426
+ "Required parameter tenant was null or undefined when calling deleteCollection."
7427
+ );
7225
7428
  }
7226
- let localVarPath = `/api/v2/tenants`;
7429
+ if (database === null || database === void 0) {
7430
+ throw new RequiredError(
7431
+ "database",
7432
+ "Required parameter database was null or undefined when calling deleteCollection."
7433
+ );
7434
+ }
7435
+ if (collectionId === null || collectionId === void 0) {
7436
+ throw new RequiredError(
7437
+ "collectionId",
7438
+ "Required parameter collectionId was null or undefined when calling deleteCollection."
7439
+ );
7440
+ }
7441
+ let localVarPath = `/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database}", encodeURIComponent(String(database))).replace("{collection_id}", encodeURIComponent(String(collectionId)));
7227
7442
  const localVarPathQueryStart = localVarPath.indexOf("?");
7228
- const localVarRequestOptions = Object.assign({ method: "POST" }, options);
7443
+ const localVarRequestOptions = Object.assign(
7444
+ { method: "DELETE" },
7445
+ options
7446
+ );
7229
7447
  const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7230
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7448
+ const localVarQueryParameter = new URLSearchParams(
7449
+ localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : ""
7450
+ );
7231
7451
  if (localVarPathQueryStart !== -1) {
7232
7452
  localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7233
7453
  }
7234
- localVarHeaderParameter.set("Content-Type", "application/json");
7235
7454
  localVarRequestOptions.headers = localVarHeaderParameter;
7236
- if (request !== void 0) {
7237
- localVarRequestOptions.body = JSON.stringify(request || {});
7238
- }
7239
7455
  const localVarQueryParameterString = localVarQueryParameter.toString();
7240
7456
  if (localVarQueryParameterString) {
7241
7457
  localVarPath += "?" + localVarQueryParameterString;
@@ -7246,31 +7462,38 @@ var ApiApiFetchParamCreator = function(configuration) {
7246
7462
  };
7247
7463
  },
7248
7464
  /**
7249
- * @summary Delete Collection V1
7250
- * @param {string} collectionName
7251
- * @param {string} [tenant]
7252
- * @param {string} [database]
7465
+ * @summary Deletes a specific database.
7466
+ * @param {string} tenant <p>Tenant ID</p>
7467
+ * @param {string} database <p>Name of the database to delete</p>
7253
7468
  * @param {RequestInit} [options] Override http request option.
7254
7469
  * @throws {RequiredError}
7255
7470
  */
7256
- deleteCollectionV1V1(collectionName, tenant, database, options = {}) {
7257
- if (collectionName === null || collectionName === void 0) {
7258
- throw new RequiredError("collectionName", "Required parameter collectionName was null or undefined when calling deleteCollectionV1V1.");
7471
+ deleteDatabase(tenant, database, options = {}) {
7472
+ if (tenant === null || tenant === void 0) {
7473
+ throw new RequiredError(
7474
+ "tenant",
7475
+ "Required parameter tenant was null or undefined when calling deleteDatabase."
7476
+ );
7477
+ }
7478
+ if (database === null || database === void 0) {
7479
+ throw new RequiredError(
7480
+ "database",
7481
+ "Required parameter database was null or undefined when calling deleteDatabase."
7482
+ );
7259
7483
  }
7260
- let localVarPath = `/api/v1/collections/{collection_name}`.replace("{collection_name}", encodeURIComponent(String(collectionName)));
7484
+ let localVarPath = `/api/v2/tenants/{tenant}/databases/{database}`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database}", encodeURIComponent(String(database)));
7261
7485
  const localVarPathQueryStart = localVarPath.indexOf("?");
7262
- const localVarRequestOptions = Object.assign({ method: "DELETE" }, options);
7486
+ const localVarRequestOptions = Object.assign(
7487
+ { method: "DELETE" },
7488
+ options
7489
+ );
7263
7490
  const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7264
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7491
+ const localVarQueryParameter = new URLSearchParams(
7492
+ localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : ""
7493
+ );
7265
7494
  if (localVarPathQueryStart !== -1) {
7266
7495
  localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7267
7496
  }
7268
- if (tenant !== void 0) {
7269
- localVarQueryParameter.append("tenant", String(tenant));
7270
- }
7271
- if (database !== void 0) {
7272
- localVarQueryParameter.append("database", String(database));
7273
- }
7274
7497
  localVarRequestOptions.headers = localVarHeaderParameter;
7275
7498
  const localVarQueryParameterString = localVarQueryParameter.toString();
7276
7499
  if (localVarQueryParameterString) {
@@ -7282,28 +7505,42 @@ var ApiApiFetchParamCreator = function(configuration) {
7282
7505
  };
7283
7506
  },
7284
7507
  /**
7285
- * @summary Delete Collection
7286
- * @param {string} collectionName
7287
- * @param {string} tenant
7288
- * @param {string} databaseName
7508
+ * @summary Retrieves a collection by ID or name.
7509
+ * @param {string} tenant <p>Tenant ID</p>
7510
+ * @param {string} database <p>Database name</p>
7511
+ * @param {string} collectionId <p>UUID of the collection</p>
7289
7512
  * @param {RequestInit} [options] Override http request option.
7290
7513
  * @throws {RequiredError}
7291
7514
  */
7292
- deleteCollectionV2(collectionName, tenant, databaseName, options = {}) {
7293
- if (collectionName === null || collectionName === void 0) {
7294
- throw new RequiredError("collectionName", "Required parameter collectionName was null or undefined when calling deleteCollectionV2.");
7295
- }
7515
+ getCollection(tenant, database, collectionId, options = {}) {
7296
7516
  if (tenant === null || tenant === void 0) {
7297
- throw new RequiredError("tenant", "Required parameter tenant was null or undefined when calling deleteCollectionV2.");
7517
+ throw new RequiredError(
7518
+ "tenant",
7519
+ "Required parameter tenant was null or undefined when calling getCollection."
7520
+ );
7298
7521
  }
7299
- if (databaseName === null || databaseName === void 0) {
7300
- throw new RequiredError("databaseName", "Required parameter databaseName was null or undefined when calling deleteCollectionV2.");
7522
+ if (database === null || database === void 0) {
7523
+ throw new RequiredError(
7524
+ "database",
7525
+ "Required parameter database was null or undefined when calling getCollection."
7526
+ );
7527
+ }
7528
+ if (collectionId === null || collectionId === void 0) {
7529
+ throw new RequiredError(
7530
+ "collectionId",
7531
+ "Required parameter collectionId was null or undefined when calling getCollection."
7532
+ );
7301
7533
  }
7302
- let localVarPath = `/api/v2/tenants/{tenant}/databases/{database_name}/collections/{collection_name}`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database_name}", encodeURIComponent(String(databaseName))).replace("{collection_name}", encodeURIComponent(String(collectionName)));
7534
+ let localVarPath = `/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database}", encodeURIComponent(String(database))).replace("{collection_id}", encodeURIComponent(String(collectionId)));
7303
7535
  const localVarPathQueryStart = localVarPath.indexOf("?");
7304
- const localVarRequestOptions = Object.assign({ method: "DELETE" }, options);
7536
+ const localVarRequestOptions = Object.assign(
7537
+ { method: "GET" },
7538
+ options
7539
+ );
7305
7540
  const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7306
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7541
+ const localVarQueryParameter = new URLSearchParams(
7542
+ localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : ""
7543
+ );
7307
7544
  if (localVarPathQueryStart !== -1) {
7308
7545
  localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7309
7546
  }
@@ -7318,24 +7555,35 @@ var ApiApiFetchParamCreator = function(configuration) {
7318
7555
  };
7319
7556
  },
7320
7557
  /**
7321
- * @summary Delete Database
7322
- * @param {string} databaseName
7323
- * @param {string} tenant
7558
+ * @summary Retrieves a specific database by name.
7559
+ * @param {string} tenant <p>Tenant ID</p>
7560
+ * @param {string} database <p>Name of the database to retrieve</p>
7324
7561
  * @param {RequestInit} [options] Override http request option.
7325
7562
  * @throws {RequiredError}
7326
7563
  */
7327
- deleteDatabaseV2(databaseName, tenant, options = {}) {
7328
- if (databaseName === null || databaseName === void 0) {
7329
- throw new RequiredError("databaseName", "Required parameter databaseName was null or undefined when calling deleteDatabaseV2.");
7330
- }
7564
+ getDatabase(tenant, database, options = {}) {
7331
7565
  if (tenant === null || tenant === void 0) {
7332
- throw new RequiredError("tenant", "Required parameter tenant was null or undefined when calling deleteDatabaseV2.");
7566
+ throw new RequiredError(
7567
+ "tenant",
7568
+ "Required parameter tenant was null or undefined when calling getDatabase."
7569
+ );
7570
+ }
7571
+ if (database === null || database === void 0) {
7572
+ throw new RequiredError(
7573
+ "database",
7574
+ "Required parameter database was null or undefined when calling getDatabase."
7575
+ );
7333
7576
  }
7334
- let localVarPath = `/api/v2/tenants/{tenant}/databases/{database_name}`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database_name}", encodeURIComponent(String(databaseName)));
7577
+ let localVarPath = `/api/v2/tenants/{tenant}/databases/{database}`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database}", encodeURIComponent(String(database)));
7335
7578
  const localVarPathQueryStart = localVarPath.indexOf("?");
7336
- const localVarRequestOptions = Object.assign({ method: "DELETE" }, options);
7579
+ const localVarRequestOptions = Object.assign(
7580
+ { method: "GET" },
7581
+ options
7582
+ );
7337
7583
  const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7338
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7584
+ const localVarQueryParameter = new URLSearchParams(
7585
+ localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : ""
7586
+ );
7339
7587
  if (localVarPathQueryStart !== -1) {
7340
7588
  localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7341
7589
  }
@@ -7350,32 +7598,35 @@ var ApiApiFetchParamCreator = function(configuration) {
7350
7598
  };
7351
7599
  },
7352
7600
  /**
7353
- * @summary Delete V1
7354
- * @param {string} collectionId
7355
- * @param {Api.DeleteV1V1Request} request
7601
+ * @summary Returns an existing tenant by name.
7602
+ * @param {string} tenantName <p>Tenant name or ID to retrieve</p>
7356
7603
  * @param {RequestInit} [options] Override http request option.
7357
7604
  * @throws {RequiredError}
7358
7605
  */
7359
- deleteV1V1(collectionId, request, options = {}) {
7360
- if (collectionId === null || collectionId === void 0) {
7361
- throw new RequiredError("collectionId", "Required parameter collectionId was null or undefined when calling deleteV1V1.");
7362
- }
7363
- if (request === null || request === void 0) {
7364
- throw new RequiredError("request", "Required parameter request was null or undefined when calling deleteV1V1.");
7606
+ getTenant(tenantName, options = {}) {
7607
+ if (tenantName === null || tenantName === void 0) {
7608
+ throw new RequiredError(
7609
+ "tenantName",
7610
+ "Required parameter tenantName was null or undefined when calling getTenant."
7611
+ );
7365
7612
  }
7366
- let localVarPath = `/api/v1/collections/{collection_id}/delete`.replace("{collection_id}", encodeURIComponent(String(collectionId)));
7613
+ let localVarPath = `/api/v2/tenants/{tenant_name}`.replace(
7614
+ "{tenant_name}",
7615
+ encodeURIComponent(String(tenantName))
7616
+ );
7367
7617
  const localVarPathQueryStart = localVarPath.indexOf("?");
7368
- const localVarRequestOptions = Object.assign({ method: "POST" }, options);
7618
+ const localVarRequestOptions = Object.assign(
7619
+ { method: "GET" },
7620
+ options
7621
+ );
7369
7622
  const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7370
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7623
+ const localVarQueryParameter = new URLSearchParams(
7624
+ localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : ""
7625
+ );
7371
7626
  if (localVarPathQueryStart !== -1) {
7372
7627
  localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7373
7628
  }
7374
- localVarHeaderParameter.set("Content-Type", "application/json");
7375
7629
  localVarRequestOptions.headers = localVarHeaderParameter;
7376
- if (request !== void 0) {
7377
- localVarRequestOptions.body = JSON.stringify(request || {});
7378
- }
7379
7630
  const localVarQueryParameterString = localVarQueryParameter.toString();
7380
7631
  if (localVarQueryParameterString) {
7381
7632
  localVarPath += "?" + localVarQueryParameterString;
@@ -7386,40 +7637,25 @@ var ApiApiFetchParamCreator = function(configuration) {
7386
7637
  };
7387
7638
  },
7388
7639
  /**
7389
- * @summary Delete
7390
- * @param {string} collectionId
7391
- * @param {string} tenant
7392
- * @param {string} databaseName
7393
- * @param {Api.DeleteV2Request} request
7640
+ * @summary Retrieves the current user's identity, tenant, and databases.
7394
7641
  * @param {RequestInit} [options] Override http request option.
7395
7642
  * @throws {RequiredError}
7396
7643
  */
7397
- deleteV2(collectionId, tenant, databaseName, request, options = {}) {
7398
- if (collectionId === null || collectionId === void 0) {
7399
- throw new RequiredError("collectionId", "Required parameter collectionId was null or undefined when calling deleteV2.");
7400
- }
7401
- if (tenant === null || tenant === void 0) {
7402
- throw new RequiredError("tenant", "Required parameter tenant was null or undefined when calling deleteV2.");
7403
- }
7404
- if (databaseName === null || databaseName === void 0) {
7405
- throw new RequiredError("databaseName", "Required parameter databaseName was null or undefined when calling deleteV2.");
7406
- }
7407
- if (request === null || request === void 0) {
7408
- throw new RequiredError("request", "Required parameter request was null or undefined when calling deleteV2.");
7409
- }
7410
- let localVarPath = `/api/v2/tenants/{tenant}/databases/{database_name}/collections/{collection_id}/delete`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database_name}", encodeURIComponent(String(databaseName))).replace("{collection_id}", encodeURIComponent(String(collectionId)));
7644
+ getUserIdentity(options = {}) {
7645
+ let localVarPath = `/api/v2/auth/identity`;
7411
7646
  const localVarPathQueryStart = localVarPath.indexOf("?");
7412
- const localVarRequestOptions = Object.assign({ method: "POST" }, options);
7647
+ const localVarRequestOptions = Object.assign(
7648
+ { method: "GET" },
7649
+ options
7650
+ );
7413
7651
  const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7414
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7652
+ const localVarQueryParameter = new URLSearchParams(
7653
+ localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : ""
7654
+ );
7415
7655
  if (localVarPathQueryStart !== -1) {
7416
7656
  localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7417
7657
  }
7418
- localVarHeaderParameter.set("Content-Type", "application/json");
7419
7658
  localVarRequestOptions.headers = localVarHeaderParameter;
7420
- if (request !== void 0) {
7421
- localVarRequestOptions.body = JSON.stringify(request || {});
7422
- }
7423
7659
  const localVarQueryParameterString = localVarQueryParameter.toString();
7424
7660
  if (localVarQueryParameterString) {
7425
7661
  localVarPath += "?" + localVarQueryParameterString;
@@ -7430,31 +7666,24 @@ var ApiApiFetchParamCreator = function(configuration) {
7430
7666
  };
7431
7667
  },
7432
7668
  /**
7433
- * @summary Get Collection V1
7434
- * @param {string} collectionName
7435
- * @param {string} [tenant]
7436
- * @param {string} [database]
7669
+ * @summary Health check endpoint that returns 200 if the server and executor are ready
7437
7670
  * @param {RequestInit} [options] Override http request option.
7438
7671
  * @throws {RequiredError}
7439
7672
  */
7440
- getCollectionV1V1(collectionName, tenant, database, options = {}) {
7441
- if (collectionName === null || collectionName === void 0) {
7442
- throw new RequiredError("collectionName", "Required parameter collectionName was null or undefined when calling getCollectionV1V1.");
7443
- }
7444
- let localVarPath = `/api/v1/collections/{collection_name}`.replace("{collection_name}", encodeURIComponent(String(collectionName)));
7673
+ healthcheck(options = {}) {
7674
+ let localVarPath = `/api/v2/healthcheck`;
7445
7675
  const localVarPathQueryStart = localVarPath.indexOf("?");
7446
- const localVarRequestOptions = Object.assign({ method: "GET" }, options);
7676
+ const localVarRequestOptions = Object.assign(
7677
+ { method: "GET" },
7678
+ options
7679
+ );
7447
7680
  const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7448
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7681
+ const localVarQueryParameter = new URLSearchParams(
7682
+ localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : ""
7683
+ );
7449
7684
  if (localVarPathQueryStart !== -1) {
7450
7685
  localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7451
7686
  }
7452
- if (tenant !== void 0) {
7453
- localVarQueryParameter.append("tenant", String(tenant));
7454
- }
7455
- if (database !== void 0) {
7456
- localVarQueryParameter.append("database", String(database));
7457
- }
7458
7687
  localVarRequestOptions.headers = localVarHeaderParameter;
7459
7688
  const localVarQueryParameterString = localVarQueryParameter.toString();
7460
7689
  if (localVarQueryParameterString) {
@@ -7466,28 +7695,21 @@ var ApiApiFetchParamCreator = function(configuration) {
7466
7695
  };
7467
7696
  },
7468
7697
  /**
7469
- * @summary Get Collection
7470
- * @param {string} tenant
7471
- * @param {string} databaseName
7472
- * @param {string} collectionName
7698
+ * @summary Heartbeat endpoint that returns a nanosecond timestamp of the current time.
7473
7699
  * @param {RequestInit} [options] Override http request option.
7474
7700
  * @throws {RequiredError}
7475
7701
  */
7476
- getCollectionV2(tenant, databaseName, collectionName, options = {}) {
7477
- if (tenant === null || tenant === void 0) {
7478
- throw new RequiredError("tenant", "Required parameter tenant was null or undefined when calling getCollectionV2.");
7479
- }
7480
- if (databaseName === null || databaseName === void 0) {
7481
- throw new RequiredError("databaseName", "Required parameter databaseName was null or undefined when calling getCollectionV2.");
7482
- }
7483
- if (collectionName === null || collectionName === void 0) {
7484
- throw new RequiredError("collectionName", "Required parameter collectionName was null or undefined when calling getCollectionV2.");
7485
- }
7486
- let localVarPath = `/api/v2/tenants/{tenant}/databases/{database_name}/collections/{collection_name}`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database_name}", encodeURIComponent(String(databaseName))).replace("{collection_name}", encodeURIComponent(String(collectionName)));
7702
+ heartbeat(options = {}) {
7703
+ let localVarPath = `/api/v2/heartbeat`;
7487
7704
  const localVarPathQueryStart = localVarPath.indexOf("?");
7488
- const localVarRequestOptions = Object.assign({ method: "GET" }, options);
7705
+ const localVarRequestOptions = Object.assign(
7706
+ { method: "GET" },
7707
+ options
7708
+ );
7489
7709
  const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7490
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7710
+ const localVarQueryParameter = new URLSearchParams(
7711
+ localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : ""
7712
+ );
7491
7713
  if (localVarPathQueryStart !== -1) {
7492
7714
  localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7493
7715
  }
@@ -7502,26 +7724,45 @@ var ApiApiFetchParamCreator = function(configuration) {
7502
7724
  };
7503
7725
  },
7504
7726
  /**
7505
- * @summary Get Database V1
7506
- * @param {string} database
7507
- * @param {string} [tenant]
7727
+ * @summary Lists all collections in the specified database.
7728
+ * @param {string} tenant <p>Tenant ID</p>
7729
+ * @param {string} database <p>Database name to list collections from</p>
7730
+ * @param {number} [limit] <p>Limit for pagination</p>
7731
+ * @param {number} [offset] <p>Offset for pagination</p>
7508
7732
  * @param {RequestInit} [options] Override http request option.
7509
7733
  * @throws {RequiredError}
7510
7734
  */
7511
- getDatabaseV1V1(database, tenant, options = {}) {
7735
+ listCollections(tenant, database, limit, offset, options = {}) {
7736
+ if (tenant === null || tenant === void 0) {
7737
+ throw new RequiredError(
7738
+ "tenant",
7739
+ "Required parameter tenant was null or undefined when calling listCollections."
7740
+ );
7741
+ }
7512
7742
  if (database === null || database === void 0) {
7513
- throw new RequiredError("database", "Required parameter database was null or undefined when calling getDatabaseV1V1.");
7743
+ throw new RequiredError(
7744
+ "database",
7745
+ "Required parameter database was null or undefined when calling listCollections."
7746
+ );
7514
7747
  }
7515
- let localVarPath = `/api/v1/databases/{database}`.replace("{database}", encodeURIComponent(String(database)));
7748
+ let localVarPath = `/api/v2/tenants/{tenant}/databases/{database}/collections`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database}", encodeURIComponent(String(database)));
7516
7749
  const localVarPathQueryStart = localVarPath.indexOf("?");
7517
- const localVarRequestOptions = Object.assign({ method: "GET" }, options);
7750
+ const localVarRequestOptions = Object.assign(
7751
+ { method: "GET" },
7752
+ options
7753
+ );
7518
7754
  const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7519
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7755
+ const localVarQueryParameter = new URLSearchParams(
7756
+ localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : ""
7757
+ );
7520
7758
  if (localVarPathQueryStart !== -1) {
7521
7759
  localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7522
7760
  }
7523
- if (tenant !== void 0) {
7524
- localVarQueryParameter.append("tenant", String(tenant));
7761
+ if (limit !== void 0) {
7762
+ localVarQueryParameter.append("limit", String(limit));
7763
+ }
7764
+ if (offset !== void 0) {
7765
+ localVarQueryParameter.append("offset", String(offset));
7525
7766
  }
7526
7767
  localVarRequestOptions.headers = localVarHeaderParameter;
7527
7768
  const localVarQueryParameterString = localVarQueryParameter.toString();
@@ -7534,27 +7775,42 @@ var ApiApiFetchParamCreator = function(configuration) {
7534
7775
  };
7535
7776
  },
7536
7777
  /**
7537
- * @summary Get Database
7538
- * @param {string} databaseName
7539
- * @param {string} tenant
7778
+ * @summary Lists all databases for a given tenant.
7779
+ * @param {string} tenant <p>Tenant ID to list databases for</p>
7780
+ * @param {number} [limit] <p>Limit for pagination</p>
7781
+ * @param {number} [offset] <p>Offset for pagination</p>
7540
7782
  * @param {RequestInit} [options] Override http request option.
7541
7783
  * @throws {RequiredError}
7542
7784
  */
7543
- getDatabaseV2(databaseName, tenant, options = {}) {
7544
- if (databaseName === null || databaseName === void 0) {
7545
- throw new RequiredError("databaseName", "Required parameter databaseName was null or undefined when calling getDatabaseV2.");
7546
- }
7785
+ listDatabases(tenant, limit, offset, options = {}) {
7547
7786
  if (tenant === null || tenant === void 0) {
7548
- throw new RequiredError("tenant", "Required parameter tenant was null or undefined when calling getDatabaseV2.");
7787
+ throw new RequiredError(
7788
+ "tenant",
7789
+ "Required parameter tenant was null or undefined when calling listDatabases."
7790
+ );
7549
7791
  }
7550
- let localVarPath = `/api/v2/tenants/{tenant}/databases/{database_name}`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database_name}", encodeURIComponent(String(databaseName)));
7792
+ let localVarPath = `/api/v2/tenants/{tenant}/databases`.replace(
7793
+ "{tenant}",
7794
+ encodeURIComponent(String(tenant))
7795
+ );
7551
7796
  const localVarPathQueryStart = localVarPath.indexOf("?");
7552
- const localVarRequestOptions = Object.assign({ method: "GET" }, options);
7797
+ const localVarRequestOptions = Object.assign(
7798
+ { method: "GET" },
7799
+ options
7800
+ );
7553
7801
  const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7554
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7802
+ const localVarQueryParameter = new URLSearchParams(
7803
+ localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : ""
7804
+ );
7555
7805
  if (localVarPathQueryStart !== -1) {
7556
7806
  localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7557
7807
  }
7808
+ if (limit !== void 0) {
7809
+ localVarQueryParameter.append("limit", String(limit));
7810
+ }
7811
+ if (offset !== void 0) {
7812
+ localVarQueryParameter.append("offset", String(offset));
7813
+ }
7558
7814
  localVarRequestOptions.headers = localVarHeaderParameter;
7559
7815
  const localVarQueryParameterString = localVarQueryParameter.toString();
7560
7816
  if (localVarQueryParameterString) {
@@ -7566,704 +7822,25 @@ var ApiApiFetchParamCreator = function(configuration) {
7566
7822
  };
7567
7823
  },
7568
7824
  /**
7569
- * @summary Get Nearest Neighbors V1
7570
- * @param {string} collectionId
7571
- * @param {Api.GetNearestNeighborsV1V1Request} request
7572
- * @param {RequestInit} [options] Override http request option.
7573
- * @throws {RequiredError}
7574
- */
7575
- getNearestNeighborsV1V1(collectionId, request, options = {}) {
7576
- if (collectionId === null || collectionId === void 0) {
7577
- throw new RequiredError("collectionId", "Required parameter collectionId was null or undefined when calling getNearestNeighborsV1V1.");
7578
- }
7579
- if (request === null || request === void 0) {
7580
- throw new RequiredError("request", "Required parameter request was null or undefined when calling getNearestNeighborsV1V1.");
7581
- }
7582
- let localVarPath = `/api/v1/collections/{collection_id}/query`.replace("{collection_id}", encodeURIComponent(String(collectionId)));
7583
- const localVarPathQueryStart = localVarPath.indexOf("?");
7584
- const localVarRequestOptions = Object.assign({ method: "POST" }, options);
7585
- const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7586
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7587
- if (localVarPathQueryStart !== -1) {
7588
- localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7589
- }
7590
- localVarHeaderParameter.set("Content-Type", "application/json");
7591
- localVarRequestOptions.headers = localVarHeaderParameter;
7592
- if (request !== void 0) {
7593
- localVarRequestOptions.body = JSON.stringify(request || {});
7594
- }
7595
- const localVarQueryParameterString = localVarQueryParameter.toString();
7596
- if (localVarQueryParameterString) {
7597
- localVarPath += "?" + localVarQueryParameterString;
7598
- }
7599
- return {
7600
- url: localVarPath,
7601
- options: localVarRequestOptions
7602
- };
7603
- },
7604
- /**
7605
- * @summary Get Nearest Neighbors
7606
- * @param {string} tenant
7607
- * @param {string} databaseName
7608
- * @param {string} collectionId
7609
- * @param {Api.GetNearestNeighborsV2Request} request
7610
- * @param {RequestInit} [options] Override http request option.
7611
- * @throws {RequiredError}
7612
- */
7613
- getNearestNeighborsV2(tenant, databaseName, collectionId, request, options = {}) {
7614
- if (tenant === null || tenant === void 0) {
7615
- throw new RequiredError("tenant", "Required parameter tenant was null or undefined when calling getNearestNeighborsV2.");
7616
- }
7617
- if (databaseName === null || databaseName === void 0) {
7618
- throw new RequiredError("databaseName", "Required parameter databaseName was null or undefined when calling getNearestNeighborsV2.");
7619
- }
7620
- if (collectionId === null || collectionId === void 0) {
7621
- throw new RequiredError("collectionId", "Required parameter collectionId was null or undefined when calling getNearestNeighborsV2.");
7622
- }
7623
- if (request === null || request === void 0) {
7624
- throw new RequiredError("request", "Required parameter request was null or undefined when calling getNearestNeighborsV2.");
7625
- }
7626
- let localVarPath = `/api/v2/tenants/{tenant}/databases/{database_name}/collections/{collection_id}/query`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database_name}", encodeURIComponent(String(databaseName))).replace("{collection_id}", encodeURIComponent(String(collectionId)));
7627
- const localVarPathQueryStart = localVarPath.indexOf("?");
7628
- const localVarRequestOptions = Object.assign({ method: "POST" }, options);
7629
- const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7630
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7631
- if (localVarPathQueryStart !== -1) {
7632
- localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7633
- }
7634
- localVarHeaderParameter.set("Content-Type", "application/json");
7635
- localVarRequestOptions.headers = localVarHeaderParameter;
7636
- if (request !== void 0) {
7637
- localVarRequestOptions.body = JSON.stringify(request || {});
7638
- }
7639
- const localVarQueryParameterString = localVarQueryParameter.toString();
7640
- if (localVarQueryParameterString) {
7641
- localVarPath += "?" + localVarQueryParameterString;
7642
- }
7643
- return {
7644
- url: localVarPath,
7645
- options: localVarRequestOptions
7646
- };
7647
- },
7648
- /**
7649
- * @summary Get Tenant V1
7650
- * @param {string} tenant
7651
- * @param {RequestInit} [options] Override http request option.
7652
- * @throws {RequiredError}
7653
- */
7654
- getTenantV1V1(tenant, options = {}) {
7655
- if (tenant === null || tenant === void 0) {
7656
- throw new RequiredError("tenant", "Required parameter tenant was null or undefined when calling getTenantV1V1.");
7657
- }
7658
- let localVarPath = `/api/v1/tenants/{tenant}`.replace("{tenant}", encodeURIComponent(String(tenant)));
7659
- const localVarPathQueryStart = localVarPath.indexOf("?");
7660
- const localVarRequestOptions = Object.assign({ method: "GET" }, options);
7661
- const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7662
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7663
- if (localVarPathQueryStart !== -1) {
7664
- localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7665
- }
7666
- localVarRequestOptions.headers = localVarHeaderParameter;
7667
- const localVarQueryParameterString = localVarQueryParameter.toString();
7668
- if (localVarQueryParameterString) {
7669
- localVarPath += "?" + localVarQueryParameterString;
7670
- }
7671
- return {
7672
- url: localVarPath,
7673
- options: localVarRequestOptions
7674
- };
7675
- },
7676
- /**
7677
- * @summary Get Tenant
7678
- * @param {string} tenant
7679
- * @param {RequestInit} [options] Override http request option.
7680
- * @throws {RequiredError}
7681
- */
7682
- getTenantV2(tenant, options = {}) {
7683
- if (tenant === null || tenant === void 0) {
7684
- throw new RequiredError("tenant", "Required parameter tenant was null or undefined when calling getTenantV2.");
7685
- }
7686
- let localVarPath = `/api/v2/tenants/{tenant}`.replace("{tenant}", encodeURIComponent(String(tenant)));
7687
- const localVarPathQueryStart = localVarPath.indexOf("?");
7688
- const localVarRequestOptions = Object.assign({ method: "GET" }, options);
7689
- const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7690
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7691
- if (localVarPathQueryStart !== -1) {
7692
- localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7693
- }
7694
- localVarRequestOptions.headers = localVarHeaderParameter;
7695
- const localVarQueryParameterString = localVarQueryParameter.toString();
7696
- if (localVarQueryParameterString) {
7697
- localVarPath += "?" + localVarQueryParameterString;
7698
- }
7699
- return {
7700
- url: localVarPath,
7701
- options: localVarRequestOptions
7702
- };
7703
- },
7704
- /**
7705
- * @summary Get User Identity
7706
- * @param {RequestInit} [options] Override http request option.
7707
- * @throws {RequiredError}
7708
- */
7709
- getUserIdentityV2(options = {}) {
7710
- let localVarPath = `/api/v2/auth/identity`;
7711
- const localVarPathQueryStart = localVarPath.indexOf("?");
7712
- const localVarRequestOptions = Object.assign({ method: "GET" }, options);
7713
- const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7714
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7715
- if (localVarPathQueryStart !== -1) {
7716
- localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7717
- }
7718
- localVarRequestOptions.headers = localVarHeaderParameter;
7719
- const localVarQueryParameterString = localVarQueryParameter.toString();
7720
- if (localVarQueryParameterString) {
7721
- localVarPath += "?" + localVarQueryParameterString;
7722
- }
7723
- return {
7724
- url: localVarPath,
7725
- options: localVarRequestOptions
7726
- };
7727
- },
7728
- /**
7729
- * @summary Get V1
7730
- * @param {string} collectionId
7731
- * @param {Api.GetV1V1Request} request
7732
- * @param {RequestInit} [options] Override http request option.
7733
- * @throws {RequiredError}
7734
- */
7735
- getV1V1(collectionId, request, options = {}) {
7736
- if (collectionId === null || collectionId === void 0) {
7737
- throw new RequiredError("collectionId", "Required parameter collectionId was null or undefined when calling getV1V1.");
7738
- }
7739
- if (request === null || request === void 0) {
7740
- throw new RequiredError("request", "Required parameter request was null or undefined when calling getV1V1.");
7741
- }
7742
- let localVarPath = `/api/v1/collections/{collection_id}/get`.replace("{collection_id}", encodeURIComponent(String(collectionId)));
7743
- const localVarPathQueryStart = localVarPath.indexOf("?");
7744
- const localVarRequestOptions = Object.assign({ method: "POST" }, options);
7745
- const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7746
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7747
- if (localVarPathQueryStart !== -1) {
7748
- localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7749
- }
7750
- localVarHeaderParameter.set("Content-Type", "application/json");
7751
- localVarRequestOptions.headers = localVarHeaderParameter;
7752
- if (request !== void 0) {
7753
- localVarRequestOptions.body = JSON.stringify(request || {});
7754
- }
7755
- const localVarQueryParameterString = localVarQueryParameter.toString();
7756
- if (localVarQueryParameterString) {
7757
- localVarPath += "?" + localVarQueryParameterString;
7758
- }
7759
- return {
7760
- url: localVarPath,
7761
- options: localVarRequestOptions
7762
- };
7763
- },
7764
- /**
7765
- * @summary Get
7766
- * @param {string} collectionId
7767
- * @param {string} tenant
7768
- * @param {string} databaseName
7769
- * @param {Api.GetV2Request} request
7770
- * @param {RequestInit} [options] Override http request option.
7771
- * @throws {RequiredError}
7772
- */
7773
- getV2(collectionId, tenant, databaseName, request, options = {}) {
7774
- if (collectionId === null || collectionId === void 0) {
7775
- throw new RequiredError("collectionId", "Required parameter collectionId was null or undefined when calling getV2.");
7776
- }
7777
- if (tenant === null || tenant === void 0) {
7778
- throw new RequiredError("tenant", "Required parameter tenant was null or undefined when calling getV2.");
7779
- }
7780
- if (databaseName === null || databaseName === void 0) {
7781
- throw new RequiredError("databaseName", "Required parameter databaseName was null or undefined when calling getV2.");
7782
- }
7783
- if (request === null || request === void 0) {
7784
- throw new RequiredError("request", "Required parameter request was null or undefined when calling getV2.");
7785
- }
7786
- let localVarPath = `/api/v2/tenants/{tenant}/databases/{database_name}/collections/{collection_id}/get`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database_name}", encodeURIComponent(String(databaseName))).replace("{collection_id}", encodeURIComponent(String(collectionId)));
7787
- const localVarPathQueryStart = localVarPath.indexOf("?");
7788
- const localVarRequestOptions = Object.assign({ method: "POST" }, options);
7789
- const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7790
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7791
- if (localVarPathQueryStart !== -1) {
7792
- localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7793
- }
7794
- localVarHeaderParameter.set("Content-Type", "application/json");
7795
- localVarRequestOptions.headers = localVarHeaderParameter;
7796
- if (request !== void 0) {
7797
- localVarRequestOptions.body = JSON.stringify(request || {});
7798
- }
7799
- const localVarQueryParameterString = localVarQueryParameter.toString();
7800
- if (localVarQueryParameterString) {
7801
- localVarPath += "?" + localVarQueryParameterString;
7802
- }
7803
- return {
7804
- url: localVarPath,
7805
- options: localVarRequestOptions
7806
- };
7807
- },
7808
- /**
7809
- * @summary Heartbeat
7810
- * @param {RequestInit} [options] Override http request option.
7811
- * @throws {RequiredError}
7812
- */
7813
- heartbeatV1(options = {}) {
7814
- let localVarPath = `/api/v1/heartbeat`;
7815
- const localVarPathQueryStart = localVarPath.indexOf("?");
7816
- const localVarRequestOptions = Object.assign({ method: "GET" }, options);
7817
- const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7818
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7819
- if (localVarPathQueryStart !== -1) {
7820
- localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7821
- }
7822
- localVarRequestOptions.headers = localVarHeaderParameter;
7823
- const localVarQueryParameterString = localVarQueryParameter.toString();
7824
- if (localVarQueryParameterString) {
7825
- localVarPath += "?" + localVarQueryParameterString;
7826
- }
7827
- return {
7828
- url: localVarPath,
7829
- options: localVarRequestOptions
7830
- };
7831
- },
7832
- /**
7833
- * @summary Heartbeat
7834
- * @param {RequestInit} [options] Override http request option.
7835
- * @throws {RequiredError}
7836
- */
7837
- heartbeatV2(options = {}) {
7838
- let localVarPath = `/api/v2/heartbeat`;
7839
- const localVarPathQueryStart = localVarPath.indexOf("?");
7840
- const localVarRequestOptions = Object.assign({ method: "GET" }, options);
7841
- const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7842
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7843
- if (localVarPathQueryStart !== -1) {
7844
- localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7845
- }
7846
- localVarRequestOptions.headers = localVarHeaderParameter;
7847
- const localVarQueryParameterString = localVarQueryParameter.toString();
7848
- if (localVarQueryParameterString) {
7849
- localVarPath += "?" + localVarQueryParameterString;
7850
- }
7851
- return {
7852
- url: localVarPath,
7853
- options: localVarRequestOptions
7854
- };
7855
- },
7856
- /**
7857
- * @summary List Collections V1
7858
- * @param {number | null} [limit]
7859
- * @param {number | null} [offset]
7860
- * @param {string} [tenant]
7861
- * @param {string} [database]
7862
- * @param {RequestInit} [options] Override http request option.
7863
- * @throws {RequiredError}
7864
- */
7865
- listCollectionsV1V1(limit, offset, tenant, database, options = {}) {
7866
- let localVarPath = `/api/v1/collections`;
7867
- const localVarPathQueryStart = localVarPath.indexOf("?");
7868
- const localVarRequestOptions = Object.assign({ method: "GET" }, options);
7869
- const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7870
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7871
- if (localVarPathQueryStart !== -1) {
7872
- localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7873
- }
7874
- if (limit !== void 0) {
7875
- localVarQueryParameter.append("limit", String(limit));
7876
- }
7877
- if (offset !== void 0) {
7878
- localVarQueryParameter.append("offset", String(offset));
7879
- }
7880
- if (tenant !== void 0) {
7881
- localVarQueryParameter.append("tenant", String(tenant));
7882
- }
7883
- if (database !== void 0) {
7884
- localVarQueryParameter.append("database", String(database));
7885
- }
7886
- localVarRequestOptions.headers = localVarHeaderParameter;
7887
- const localVarQueryParameterString = localVarQueryParameter.toString();
7888
- if (localVarQueryParameterString) {
7889
- localVarPath += "?" + localVarQueryParameterString;
7890
- }
7891
- return {
7892
- url: localVarPath,
7893
- options: localVarRequestOptions
7894
- };
7895
- },
7896
- /**
7897
- * @summary List Collections
7898
- * @param {string} tenant
7899
- * @param {string} databaseName
7900
- * @param {number | null} [limit]
7901
- * @param {number | null} [offset]
7902
- * @param {RequestInit} [options] Override http request option.
7903
- * @throws {RequiredError}
7904
- */
7905
- listCollectionsV2(tenant, databaseName, limit, offset, options = {}) {
7906
- if (tenant === null || tenant === void 0) {
7907
- throw new RequiredError("tenant", "Required parameter tenant was null or undefined when calling listCollectionsV2.");
7908
- }
7909
- if (databaseName === null || databaseName === void 0) {
7910
- throw new RequiredError("databaseName", "Required parameter databaseName was null or undefined when calling listCollectionsV2.");
7911
- }
7912
- let localVarPath = `/api/v2/tenants/{tenant}/databases/{database_name}/collections`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database_name}", encodeURIComponent(String(databaseName)));
7913
- const localVarPathQueryStart = localVarPath.indexOf("?");
7914
- const localVarRequestOptions = Object.assign({ method: "GET" }, options);
7915
- const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7916
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7917
- if (localVarPathQueryStart !== -1) {
7918
- localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7919
- }
7920
- if (limit !== void 0) {
7921
- localVarQueryParameter.append("limit", String(limit));
7922
- }
7923
- if (offset !== void 0) {
7924
- localVarQueryParameter.append("offset", String(offset));
7925
- }
7926
- localVarRequestOptions.headers = localVarHeaderParameter;
7927
- const localVarQueryParameterString = localVarQueryParameter.toString();
7928
- if (localVarQueryParameterString) {
7929
- localVarPath += "?" + localVarQueryParameterString;
7930
- }
7931
- return {
7932
- url: localVarPath,
7933
- options: localVarRequestOptions
7934
- };
7935
- },
7936
- /**
7937
- * @summary List Databases
7938
- * @param {string} tenant
7939
- * @param {number | null} [limit]
7940
- * @param {number | null} [offset]
7941
- * @param {RequestInit} [options] Override http request option.
7942
- * @throws {RequiredError}
7943
- */
7944
- listDatabasesV2(tenant, limit, offset, options = {}) {
7945
- if (tenant === null || tenant === void 0) {
7946
- throw new RequiredError("tenant", "Required parameter tenant was null or undefined when calling listDatabasesV2.");
7947
- }
7948
- let localVarPath = `/api/v2/tenants/{tenant}/databases`.replace("{tenant}", encodeURIComponent(String(tenant)));
7949
- const localVarPathQueryStart = localVarPath.indexOf("?");
7950
- const localVarRequestOptions = Object.assign({ method: "GET" }, options);
7951
- const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7952
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7953
- if (localVarPathQueryStart !== -1) {
7954
- localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7955
- }
7956
- if (limit !== void 0) {
7957
- localVarQueryParameter.append("limit", String(limit));
7958
- }
7959
- if (offset !== void 0) {
7960
- localVarQueryParameter.append("offset", String(offset));
7961
- }
7962
- localVarRequestOptions.headers = localVarHeaderParameter;
7963
- const localVarQueryParameterString = localVarQueryParameter.toString();
7964
- if (localVarQueryParameterString) {
7965
- localVarPath += "?" + localVarQueryParameterString;
7966
- }
7967
- return {
7968
- url: localVarPath,
7969
- options: localVarRequestOptions
7970
- };
7971
- },
7972
- /**
7973
- * @summary Pre Flight Checks
7974
- * @param {RequestInit} [options] Override http request option.
7975
- * @throws {RequiredError}
7976
- */
7977
- preFlightChecksV1(options = {}) {
7978
- let localVarPath = `/api/v1/pre-flight-checks`;
7979
- const localVarPathQueryStart = localVarPath.indexOf("?");
7980
- const localVarRequestOptions = Object.assign({ method: "GET" }, options);
7981
- const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
7982
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7983
- if (localVarPathQueryStart !== -1) {
7984
- localVarPath = localVarPath.substring(0, localVarPathQueryStart);
7985
- }
7986
- localVarRequestOptions.headers = localVarHeaderParameter;
7987
- const localVarQueryParameterString = localVarQueryParameter.toString();
7988
- if (localVarQueryParameterString) {
7989
- localVarPath += "?" + localVarQueryParameterString;
7990
- }
7991
- return {
7992
- url: localVarPath,
7993
- options: localVarRequestOptions
7994
- };
7995
- },
7996
- /**
7997
- * @summary Pre Flight Checks
7998
- * @param {RequestInit} [options] Override http request option.
7999
- * @throws {RequiredError}
8000
- */
8001
- preFlightChecksV2(options = {}) {
8002
- let localVarPath = `/api/v2/pre-flight-checks`;
8003
- const localVarPathQueryStart = localVarPath.indexOf("?");
8004
- const localVarRequestOptions = Object.assign({ method: "GET" }, options);
8005
- const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
8006
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
8007
- if (localVarPathQueryStart !== -1) {
8008
- localVarPath = localVarPath.substring(0, localVarPathQueryStart);
8009
- }
8010
- localVarRequestOptions.headers = localVarHeaderParameter;
8011
- const localVarQueryParameterString = localVarQueryParameter.toString();
8012
- if (localVarQueryParameterString) {
8013
- localVarPath += "?" + localVarQueryParameterString;
8014
- }
8015
- return {
8016
- url: localVarPath,
8017
- options: localVarRequestOptions
8018
- };
8019
- },
8020
- /**
8021
- * @summary Reset
8022
- * @param {RequestInit} [options] Override http request option.
8023
- * @throws {RequiredError}
8024
- */
8025
- resetV1(options = {}) {
8026
- let localVarPath = `/api/v1/reset`;
8027
- const localVarPathQueryStart = localVarPath.indexOf("?");
8028
- const localVarRequestOptions = Object.assign({ method: "POST" }, options);
8029
- const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
8030
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
8031
- if (localVarPathQueryStart !== -1) {
8032
- localVarPath = localVarPath.substring(0, localVarPathQueryStart);
8033
- }
8034
- localVarRequestOptions.headers = localVarHeaderParameter;
8035
- const localVarQueryParameterString = localVarQueryParameter.toString();
8036
- if (localVarQueryParameterString) {
8037
- localVarPath += "?" + localVarQueryParameterString;
8038
- }
8039
- return {
8040
- url: localVarPath,
8041
- options: localVarRequestOptions
8042
- };
8043
- },
8044
- /**
8045
- * @summary Reset
8046
- * @param {RequestInit} [options] Override http request option.
8047
- * @throws {RequiredError}
8048
- */
8049
- resetV2(options = {}) {
8050
- let localVarPath = `/api/v2/reset`;
8051
- const localVarPathQueryStart = localVarPath.indexOf("?");
8052
- const localVarRequestOptions = Object.assign({ method: "POST" }, options);
8053
- const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
8054
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
8055
- if (localVarPathQueryStart !== -1) {
8056
- localVarPath = localVarPath.substring(0, localVarPathQueryStart);
8057
- }
8058
- localVarRequestOptions.headers = localVarHeaderParameter;
8059
- const localVarQueryParameterString = localVarQueryParameter.toString();
8060
- if (localVarQueryParameterString) {
8061
- localVarPath += "?" + localVarQueryParameterString;
8062
- }
8063
- return {
8064
- url: localVarPath,
8065
- options: localVarRequestOptions
8066
- };
8067
- },
8068
- /**
8069
- * @summary Root
8070
- * @param {RequestInit} [options] Override http request option.
8071
- * @throws {RequiredError}
8072
- */
8073
- rootV1(options = {}) {
8074
- let localVarPath = `/api/v1`;
8075
- const localVarPathQueryStart = localVarPath.indexOf("?");
8076
- const localVarRequestOptions = Object.assign({ method: "GET" }, options);
8077
- const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
8078
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
8079
- if (localVarPathQueryStart !== -1) {
8080
- localVarPath = localVarPath.substring(0, localVarPathQueryStart);
8081
- }
8082
- localVarRequestOptions.headers = localVarHeaderParameter;
8083
- const localVarQueryParameterString = localVarQueryParameter.toString();
8084
- if (localVarQueryParameterString) {
8085
- localVarPath += "?" + localVarQueryParameterString;
8086
- }
8087
- return {
8088
- url: localVarPath,
8089
- options: localVarRequestOptions
8090
- };
8091
- },
8092
- /**
8093
- * @summary Root
8094
- * @param {RequestInit} [options] Override http request option.
8095
- * @throws {RequiredError}
8096
- */
8097
- rootV2(options = {}) {
8098
- let localVarPath = `/api/v2`;
8099
- const localVarPathQueryStart = localVarPath.indexOf("?");
8100
- const localVarRequestOptions = Object.assign({ method: "GET" }, options);
8101
- const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
8102
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
8103
- if (localVarPathQueryStart !== -1) {
8104
- localVarPath = localVarPath.substring(0, localVarPathQueryStart);
8105
- }
8106
- localVarRequestOptions.headers = localVarHeaderParameter;
8107
- const localVarQueryParameterString = localVarQueryParameter.toString();
8108
- if (localVarQueryParameterString) {
8109
- localVarPath += "?" + localVarQueryParameterString;
8110
- }
8111
- return {
8112
- url: localVarPath,
8113
- options: localVarRequestOptions
8114
- };
8115
- },
8116
- /**
8117
- * @summary Update Collection V1
8118
- * @param {string} collectionId
8119
- * @param {Api.UpdateCollectionV1V1Request} request
8120
- * @param {RequestInit} [options] Override http request option.
8121
- * @throws {RequiredError}
8122
- */
8123
- updateCollectionV1V1(collectionId, request, options = {}) {
8124
- if (collectionId === null || collectionId === void 0) {
8125
- throw new RequiredError("collectionId", "Required parameter collectionId was null or undefined when calling updateCollectionV1V1.");
8126
- }
8127
- if (request === null || request === void 0) {
8128
- throw new RequiredError("request", "Required parameter request was null or undefined when calling updateCollectionV1V1.");
8129
- }
8130
- let localVarPath = `/api/v1/collections/{collection_id}`.replace("{collection_id}", encodeURIComponent(String(collectionId)));
8131
- const localVarPathQueryStart = localVarPath.indexOf("?");
8132
- const localVarRequestOptions = Object.assign({ method: "PUT" }, options);
8133
- const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
8134
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
8135
- if (localVarPathQueryStart !== -1) {
8136
- localVarPath = localVarPath.substring(0, localVarPathQueryStart);
8137
- }
8138
- localVarHeaderParameter.set("Content-Type", "application/json");
8139
- localVarRequestOptions.headers = localVarHeaderParameter;
8140
- if (request !== void 0) {
8141
- localVarRequestOptions.body = JSON.stringify(request || {});
8142
- }
8143
- const localVarQueryParameterString = localVarQueryParameter.toString();
8144
- if (localVarQueryParameterString) {
8145
- localVarPath += "?" + localVarQueryParameterString;
8146
- }
8147
- return {
8148
- url: localVarPath,
8149
- options: localVarRequestOptions
8150
- };
8151
- },
8152
- /**
8153
- * @summary Update Collection
8154
- * @param {string} tenant
8155
- * @param {string} databaseName
8156
- * @param {string} collectionId
8157
- * @param {Api.UpdateCollectionV2Request} request
8158
- * @param {RequestInit} [options] Override http request option.
8159
- * @throws {RequiredError}
8160
- */
8161
- updateCollectionV2(tenant, databaseName, collectionId, request, options = {}) {
8162
- if (tenant === null || tenant === void 0) {
8163
- throw new RequiredError("tenant", "Required parameter tenant was null or undefined when calling updateCollectionV2.");
8164
- }
8165
- if (databaseName === null || databaseName === void 0) {
8166
- throw new RequiredError("databaseName", "Required parameter databaseName was null or undefined when calling updateCollectionV2.");
8167
- }
8168
- if (collectionId === null || collectionId === void 0) {
8169
- throw new RequiredError("collectionId", "Required parameter collectionId was null or undefined when calling updateCollectionV2.");
8170
- }
8171
- if (request === null || request === void 0) {
8172
- throw new RequiredError("request", "Required parameter request was null or undefined when calling updateCollectionV2.");
8173
- }
8174
- let localVarPath = `/api/v2/tenants/{tenant}/databases/{database_name}/collections/{collection_id}`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database_name}", encodeURIComponent(String(databaseName))).replace("{collection_id}", encodeURIComponent(String(collectionId)));
8175
- const localVarPathQueryStart = localVarPath.indexOf("?");
8176
- const localVarRequestOptions = Object.assign({ method: "PUT" }, options);
8177
- const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
8178
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
8179
- if (localVarPathQueryStart !== -1) {
8180
- localVarPath = localVarPath.substring(0, localVarPathQueryStart);
8181
- }
8182
- localVarHeaderParameter.set("Content-Type", "application/json");
8183
- localVarRequestOptions.headers = localVarHeaderParameter;
8184
- if (request !== void 0) {
8185
- localVarRequestOptions.body = JSON.stringify(request || {});
8186
- }
8187
- const localVarQueryParameterString = localVarQueryParameter.toString();
8188
- if (localVarQueryParameterString) {
8189
- localVarPath += "?" + localVarQueryParameterString;
8190
- }
8191
- return {
8192
- url: localVarPath,
8193
- options: localVarRequestOptions
8194
- };
8195
- },
8196
- /**
8197
- * @summary Update V1
8198
- * @param {string} collectionId
8199
- * @param {Api.UpdateV1V1Request} request
8200
- * @param {RequestInit} [options] Override http request option.
8201
- * @throws {RequiredError}
8202
- */
8203
- updateV1V1(collectionId, request, options = {}) {
8204
- if (collectionId === null || collectionId === void 0) {
8205
- throw new RequiredError("collectionId", "Required parameter collectionId was null or undefined when calling updateV1V1.");
8206
- }
8207
- if (request === null || request === void 0) {
8208
- throw new RequiredError("request", "Required parameter request was null or undefined when calling updateV1V1.");
8209
- }
8210
- let localVarPath = `/api/v1/collections/{collection_id}/update`.replace("{collection_id}", encodeURIComponent(String(collectionId)));
8211
- const localVarPathQueryStart = localVarPath.indexOf("?");
8212
- const localVarRequestOptions = Object.assign({ method: "POST" }, options);
8213
- const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
8214
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
8215
- if (localVarPathQueryStart !== -1) {
8216
- localVarPath = localVarPath.substring(0, localVarPathQueryStart);
8217
- }
8218
- localVarHeaderParameter.set("Content-Type", "application/json");
8219
- localVarRequestOptions.headers = localVarHeaderParameter;
8220
- if (request !== void 0) {
8221
- localVarRequestOptions.body = JSON.stringify(request || {});
8222
- }
8223
- const localVarQueryParameterString = localVarQueryParameter.toString();
8224
- if (localVarQueryParameterString) {
8225
- localVarPath += "?" + localVarQueryParameterString;
8226
- }
8227
- return {
8228
- url: localVarPath,
8229
- options: localVarRequestOptions
8230
- };
8231
- },
8232
- /**
8233
- * @summary Update
8234
- * @param {string} tenant
8235
- * @param {string} databaseName
8236
- * @param {string} collectionId
8237
- * @param {Api.UpdateV2Request} request
7825
+ * @summary Pre-flight checks endpoint reporting basic readiness info.
8238
7826
  * @param {RequestInit} [options] Override http request option.
8239
7827
  * @throws {RequiredError}
8240
7828
  */
8241
- updateV2(tenant, databaseName, collectionId, request, options = {}) {
8242
- if (tenant === null || tenant === void 0) {
8243
- throw new RequiredError("tenant", "Required parameter tenant was null or undefined when calling updateV2.");
8244
- }
8245
- if (databaseName === null || databaseName === void 0) {
8246
- throw new RequiredError("databaseName", "Required parameter databaseName was null or undefined when calling updateV2.");
8247
- }
8248
- if (collectionId === null || collectionId === void 0) {
8249
- throw new RequiredError("collectionId", "Required parameter collectionId was null or undefined when calling updateV2.");
8250
- }
8251
- if (request === null || request === void 0) {
8252
- throw new RequiredError("request", "Required parameter request was null or undefined when calling updateV2.");
8253
- }
8254
- let localVarPath = `/api/v2/tenants/{tenant}/databases/{database_name}/collections/{collection_id}/update`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database_name}", encodeURIComponent(String(databaseName))).replace("{collection_id}", encodeURIComponent(String(collectionId)));
7829
+ preFlightChecks(options = {}) {
7830
+ let localVarPath = `/api/v2/pre-flight-checks`;
8255
7831
  const localVarPathQueryStart = localVarPath.indexOf("?");
8256
- const localVarRequestOptions = Object.assign({ method: "POST" }, options);
7832
+ const localVarRequestOptions = Object.assign(
7833
+ { method: "GET" },
7834
+ options
7835
+ );
8257
7836
  const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
8258
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7837
+ const localVarQueryParameter = new URLSearchParams(
7838
+ localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : ""
7839
+ );
8259
7840
  if (localVarPathQueryStart !== -1) {
8260
7841
  localVarPath = localVarPath.substring(0, localVarPathQueryStart);
8261
7842
  }
8262
- localVarHeaderParameter.set("Content-Type", "application/json");
8263
7843
  localVarRequestOptions.headers = localVarHeaderParameter;
8264
- if (request !== void 0) {
8265
- localVarRequestOptions.body = JSON.stringify(request || {});
8266
- }
8267
7844
  const localVarQueryParameterString = localVarQueryParameter.toString();
8268
7845
  if (localVarQueryParameterString) {
8269
7846
  localVarPath += "?" + localVarQueryParameterString;
@@ -8274,32 +7851,25 @@ var ApiApiFetchParamCreator = function(configuration) {
8274
7851
  };
8275
7852
  },
8276
7853
  /**
8277
- * @summary Upsert V1
8278
- * @param {string} collectionId
8279
- * @param {Api.UpsertV1V1Request} request
7854
+ * @summary Reset endpoint allowing authorized users to reset the database.
8280
7855
  * @param {RequestInit} [options] Override http request option.
8281
7856
  * @throws {RequiredError}
8282
7857
  */
8283
- upsertV1V1(collectionId, request, options = {}) {
8284
- if (collectionId === null || collectionId === void 0) {
8285
- throw new RequiredError("collectionId", "Required parameter collectionId was null or undefined when calling upsertV1V1.");
8286
- }
8287
- if (request === null || request === void 0) {
8288
- throw new RequiredError("request", "Required parameter request was null or undefined when calling upsertV1V1.");
8289
- }
8290
- let localVarPath = `/api/v1/collections/{collection_id}/upsert`.replace("{collection_id}", encodeURIComponent(String(collectionId)));
7858
+ reset(options = {}) {
7859
+ let localVarPath = `/api/v2/reset`;
8291
7860
  const localVarPathQueryStart = localVarPath.indexOf("?");
8292
- const localVarRequestOptions = Object.assign({ method: "POST" }, options);
7861
+ const localVarRequestOptions = Object.assign(
7862
+ { method: "POST" },
7863
+ options
7864
+ );
8293
7865
  const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
8294
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7866
+ const localVarQueryParameter = new URLSearchParams(
7867
+ localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : ""
7868
+ );
8295
7869
  if (localVarPathQueryStart !== -1) {
8296
7870
  localVarPath = localVarPath.substring(0, localVarPathQueryStart);
8297
7871
  }
8298
- localVarHeaderParameter.set("Content-Type", "application/json");
8299
7872
  localVarRequestOptions.headers = localVarHeaderParameter;
8300
- if (request !== void 0) {
8301
- localVarRequestOptions.body = JSON.stringify(request || {});
8302
- }
8303
7873
  const localVarQueryParameterString = localVarQueryParameter.toString();
8304
7874
  if (localVarQueryParameterString) {
8305
7875
  localVarPath += "?" + localVarQueryParameterString;
@@ -8310,32 +7880,49 @@ var ApiApiFetchParamCreator = function(configuration) {
8310
7880
  };
8311
7881
  },
8312
7882
  /**
8313
- * @summary Upsert
8314
- * @param {string} tenant
8315
- * @param {string} databaseName
8316
- * @param {string} collectionId
8317
- * @param {Api.UpsertV2Request} request
7883
+ * @summary Updates an existing collection's name or metadata.
7884
+ * @param {string} tenant <p>Tenant ID</p>
7885
+ * @param {string} database <p>Database name</p>
7886
+ * @param {string} collectionId <p>UUID of the collection to update</p>
7887
+ * @param {Api.UpdateCollectionPayload} request
8318
7888
  * @param {RequestInit} [options] Override http request option.
8319
7889
  * @throws {RequiredError}
8320
7890
  */
8321
- upsertV2(tenant, databaseName, collectionId, request, options = {}) {
7891
+ updateCollection(tenant, database, collectionId, request, options = {}) {
8322
7892
  if (tenant === null || tenant === void 0) {
8323
- throw new RequiredError("tenant", "Required parameter tenant was null or undefined when calling upsertV2.");
7893
+ throw new RequiredError(
7894
+ "tenant",
7895
+ "Required parameter tenant was null or undefined when calling updateCollection."
7896
+ );
8324
7897
  }
8325
- if (databaseName === null || databaseName === void 0) {
8326
- throw new RequiredError("databaseName", "Required parameter databaseName was null or undefined when calling upsertV2.");
7898
+ if (database === null || database === void 0) {
7899
+ throw new RequiredError(
7900
+ "database",
7901
+ "Required parameter database was null or undefined when calling updateCollection."
7902
+ );
8327
7903
  }
8328
7904
  if (collectionId === null || collectionId === void 0) {
8329
- throw new RequiredError("collectionId", "Required parameter collectionId was null or undefined when calling upsertV2.");
7905
+ throw new RequiredError(
7906
+ "collectionId",
7907
+ "Required parameter collectionId was null or undefined when calling updateCollection."
7908
+ );
8330
7909
  }
8331
7910
  if (request === null || request === void 0) {
8332
- throw new RequiredError("request", "Required parameter request was null or undefined when calling upsertV2.");
7911
+ throw new RequiredError(
7912
+ "request",
7913
+ "Required parameter request was null or undefined when calling updateCollection."
7914
+ );
8333
7915
  }
8334
- let localVarPath = `/api/v2/tenants/{tenant}/databases/{database_name}/collections/{collection_id}/upsert`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database_name}", encodeURIComponent(String(databaseName))).replace("{collection_id}", encodeURIComponent(String(collectionId)));
7916
+ let localVarPath = `/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}`.replace("{tenant}", encodeURIComponent(String(tenant))).replace("{database}", encodeURIComponent(String(database))).replace("{collection_id}", encodeURIComponent(String(collectionId)));
8335
7917
  const localVarPathQueryStart = localVarPath.indexOf("?");
8336
- const localVarRequestOptions = Object.assign({ method: "POST" }, options);
7918
+ const localVarRequestOptions = Object.assign(
7919
+ { method: "PUT" },
7920
+ options
7921
+ );
8337
7922
  const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
8338
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7923
+ const localVarQueryParameter = new URLSearchParams(
7924
+ localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : ""
7925
+ );
8339
7926
  if (localVarPathQueryStart !== -1) {
8340
7927
  localVarPath = localVarPath.substring(0, localVarPathQueryStart);
8341
7928
  }
@@ -8354,40 +7941,21 @@ var ApiApiFetchParamCreator = function(configuration) {
8354
7941
  };
8355
7942
  },
8356
7943
  /**
8357
- * @summary Version
8358
- * @param {RequestInit} [options] Override http request option.
8359
- * @throws {RequiredError}
8360
- */
8361
- versionV1(options = {}) {
8362
- let localVarPath = `/api/v1/version`;
8363
- const localVarPathQueryStart = localVarPath.indexOf("?");
8364
- const localVarRequestOptions = Object.assign({ method: "GET" }, options);
8365
- const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
8366
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
8367
- if (localVarPathQueryStart !== -1) {
8368
- localVarPath = localVarPath.substring(0, localVarPathQueryStart);
8369
- }
8370
- localVarRequestOptions.headers = localVarHeaderParameter;
8371
- const localVarQueryParameterString = localVarQueryParameter.toString();
8372
- if (localVarQueryParameterString) {
8373
- localVarPath += "?" + localVarQueryParameterString;
8374
- }
8375
- return {
8376
- url: localVarPath,
8377
- options: localVarRequestOptions
8378
- };
8379
- },
8380
- /**
8381
- * @summary Version
7944
+ * @summary Returns the version of the server.
8382
7945
  * @param {RequestInit} [options] Override http request option.
8383
7946
  * @throws {RequiredError}
8384
7947
  */
8385
- versionV2(options = {}) {
7948
+ version(options = {}) {
8386
7949
  let localVarPath = `/api/v2/version`;
8387
7950
  const localVarPathQueryStart = localVarPath.indexOf("?");
8388
- const localVarRequestOptions = Object.assign({ method: "GET" }, options);
7951
+ const localVarRequestOptions = Object.assign(
7952
+ { method: "GET" },
7953
+ options
7954
+ );
8389
7955
  const localVarHeaderParameter = options.headers ? new Headers(options.headers) : new Headers();
8390
- const localVarQueryParameter = new URLSearchParams(localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : "");
7956
+ const localVarQueryParameter = new URLSearchParams(
7957
+ localVarPathQueryStart !== -1 ? localVarPath.substring(localVarPathQueryStart + 1) : ""
7958
+ );
8391
7959
  if (localVarPathQueryStart !== -1) {
8392
7960
  localVarPath = localVarPath.substring(0, localVarPathQueryStart);
8393
7961
  }
@@ -8406,281 +7974,55 @@ var ApiApiFetchParamCreator = function(configuration) {
8406
7974
  var ApiApiFp = function(configuration) {
8407
7975
  return {
8408
7976
  /**
8409
- * @summary Add V1
8410
- * @param {string} collectionId
8411
- * @param {Api.AddV1V1Request} request
8412
- * @param {RequestInit} [options] Override http request option.
8413
- * @throws {RequiredError}
8414
- */
8415
- addV1V1(collectionId, request, options) {
8416
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).addV1V1(collectionId, request, options);
8417
- return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
8418
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8419
- const contentType = response.headers.get("Content-Type");
8420
- const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
8421
- if (response.status === 201) {
8422
- if (mimeType === "application/json") {
8423
- return response.json();
8424
- }
8425
- throw response;
8426
- }
8427
- if (response.status === 422) {
8428
- if (mimeType === "application/json") {
8429
- throw response;
8430
- }
8431
- throw response;
8432
- }
8433
- throw response;
8434
- });
8435
- };
8436
- },
8437
- /**
8438
- * @summary Add
8439
- * @param {string} tenant
8440
- * @param {string} databaseName
8441
- * @param {string} collectionId
8442
- * @param {Api.AddV2Request} request
8443
- * @param {RequestInit} [options] Override http request option.
8444
- * @throws {RequiredError}
8445
- */
8446
- addV2(tenant, databaseName, collectionId, request, options) {
8447
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).addV2(tenant, databaseName, collectionId, request, options);
8448
- return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
8449
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8450
- const contentType = response.headers.get("Content-Type");
8451
- const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
8452
- if (response.status === 201) {
8453
- if (mimeType === "application/json") {
8454
- return response.json();
8455
- }
8456
- throw response;
8457
- }
8458
- if (response.status === 422) {
8459
- if (mimeType === "application/json") {
8460
- throw response;
8461
- }
8462
- throw response;
8463
- }
8464
- throw response;
8465
- });
8466
- };
8467
- },
8468
- /**
8469
- * @summary Count Collections V1
8470
- * @param {string} [tenant]
8471
- * @param {string} [database]
8472
- * @param {RequestInit} [options] Override http request option.
8473
- * @throws {RequiredError}
8474
- */
8475
- countCollectionsV1V1(tenant, database, options) {
8476
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).countCollectionsV1V1(tenant, database, options);
8477
- return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
8478
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8479
- const contentType = response.headers.get("Content-Type");
8480
- const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
8481
- if (response.status === 200) {
8482
- if (mimeType === "application/json") {
8483
- return response.json();
8484
- }
8485
- throw response;
8486
- }
8487
- if (response.status === 422) {
8488
- if (mimeType === "application/json") {
8489
- throw response;
8490
- }
8491
- throw response;
8492
- }
8493
- throw response;
8494
- });
8495
- };
8496
- },
8497
- /**
8498
- * @summary Count Collections
8499
- * @param {string} tenant
8500
- * @param {string} databaseName
8501
- * @param {RequestInit} [options] Override http request option.
8502
- * @throws {RequiredError}
8503
- */
8504
- countCollectionsV2(tenant, databaseName, options) {
8505
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).countCollectionsV2(tenant, databaseName, options);
8506
- return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
8507
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8508
- const contentType = response.headers.get("Content-Type");
8509
- const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
8510
- if (response.status === 200) {
8511
- if (mimeType === "application/json") {
8512
- return response.json();
8513
- }
8514
- throw response;
8515
- }
8516
- if (response.status === 422) {
8517
- if (mimeType === "application/json") {
8518
- throw response;
8519
- }
8520
- throw response;
8521
- }
8522
- throw response;
8523
- });
8524
- };
8525
- },
8526
- /**
8527
- * @summary Count V1
8528
- * @param {string} collectionId
8529
- * @param {RequestInit} [options] Override http request option.
8530
- * @throws {RequiredError}
8531
- */
8532
- countV1V1(collectionId, options) {
8533
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).countV1V1(collectionId, options);
8534
- return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
8535
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8536
- const contentType = response.headers.get("Content-Type");
8537
- const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
8538
- if (response.status === 200) {
8539
- if (mimeType === "application/json") {
8540
- return response.json();
8541
- }
8542
- throw response;
8543
- }
8544
- if (response.status === 422) {
8545
- if (mimeType === "application/json") {
8546
- throw response;
8547
- }
8548
- throw response;
8549
- }
8550
- throw response;
8551
- });
8552
- };
8553
- },
8554
- /**
8555
- * @summary Count
8556
- * @param {string} tenant
8557
- * @param {string} databaseName
8558
- * @param {string} collectionId
8559
- * @param {RequestInit} [options] Override http request option.
8560
- * @throws {RequiredError}
8561
- */
8562
- countV2(tenant, databaseName, collectionId, options) {
8563
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).countV2(tenant, databaseName, collectionId, options);
8564
- return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
8565
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8566
- const contentType = response.headers.get("Content-Type");
8567
- const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
8568
- if (response.status === 200) {
8569
- if (mimeType === "application/json") {
8570
- return response.json();
8571
- }
8572
- throw response;
8573
- }
8574
- if (response.status === 422) {
8575
- if (mimeType === "application/json") {
8576
- throw response;
8577
- }
8578
- throw response;
8579
- }
8580
- throw response;
8581
- });
8582
- };
8583
- },
8584
- /**
8585
- * @summary Create Collection V1
8586
- * @param {string} [tenant]
8587
- * @param {string} [database]
8588
- * @param {Api.CreateCollectionV1V1Request} request
8589
- * @param {RequestInit} [options] Override http request option.
8590
- * @throws {RequiredError}
8591
- */
8592
- createCollectionV1V1(tenant, database, request, options) {
8593
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).createCollectionV1V1(tenant, database, request, options);
8594
- return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
8595
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8596
- const contentType = response.headers.get("Content-Type");
8597
- const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
8598
- if (response.status === 200) {
8599
- if (mimeType === "application/json") {
8600
- return response.json();
8601
- }
8602
- throw response;
8603
- }
8604
- if (response.status === 422) {
8605
- if (mimeType === "application/json") {
8606
- throw response;
8607
- }
8608
- throw response;
8609
- }
8610
- throw response;
8611
- });
8612
- };
8613
- },
8614
- /**
8615
- * @summary Create Collection
7977
+ * @summary Adds records to a collection.
8616
7978
  * @param {string} tenant
8617
- * @param {string} databaseName
8618
- * @param {Api.CreateCollectionV2Request} request
8619
- * @param {RequestInit} [options] Override http request option.
8620
- * @throws {RequiredError}
8621
- */
8622
- createCollectionV2(tenant, databaseName, request, options) {
8623
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).createCollectionV2(tenant, databaseName, request, options);
8624
- return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
8625
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8626
- const contentType = response.headers.get("Content-Type");
8627
- const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
8628
- if (response.status === 200) {
8629
- if (mimeType === "application/json") {
8630
- return response.json();
8631
- }
8632
- throw response;
8633
- }
8634
- if (response.status === 422) {
8635
- if (mimeType === "application/json") {
8636
- throw response;
8637
- }
8638
- throw response;
8639
- }
8640
- throw response;
8641
- });
8642
- };
8643
- },
8644
- /**
8645
- * @summary Create Database V1
8646
- * @param {string} [tenant]
8647
- * @param {Api.CreateDatabaseV1V1Request} request
7979
+ * @param {string} database
7980
+ * @param {string} collectionId
7981
+ * @param {Api.AddCollectionRecordsPayload} request
8648
7982
  * @param {RequestInit} [options] Override http request option.
8649
7983
  * @throws {RequiredError}
8650
7984
  */
8651
- createDatabaseV1V1(tenant, request, options) {
8652
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).createDatabaseV1V1(tenant, request, options);
7985
+ collectionAdd(tenant, database, collectionId, request, options) {
7986
+ const localVarFetchArgs = ApiApiFetchParamCreator(
7987
+ configuration
7988
+ ).collectionAdd(tenant, database, collectionId, request, options);
8653
7989
  return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
8654
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
7990
+ return fetch2(
7991
+ basePath + localVarFetchArgs.url,
7992
+ localVarFetchArgs.options
7993
+ ).then((response) => {
8655
7994
  const contentType = response.headers.get("Content-Type");
8656
7995
  const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
8657
- if (response.status === 200) {
7996
+ if (response.status === 201) {
8658
7997
  if (mimeType === "application/json") {
8659
7998
  return response.json();
8660
7999
  }
8661
8000
  throw response;
8662
8001
  }
8663
- if (response.status === 422) {
8664
- if (mimeType === "application/json") {
8665
- throw response;
8666
- }
8667
- throw response;
8002
+ if (response.status === 400) {
8003
+ return response;
8668
8004
  }
8669
8005
  throw response;
8670
8006
  });
8671
8007
  };
8672
8008
  },
8673
8009
  /**
8674
- * @summary Create Database
8675
- * @param {string} tenant
8676
- * @param {Api.CreateDatabaseV2Request} request
8010
+ * @summary Retrieves the number of records in a collection.
8011
+ * @param {string} tenant <p>Tenant ID for the collection</p>
8012
+ * @param {string} database <p>Database containing this collection</p>
8013
+ * @param {string} collectionId <p>Collection ID whose records are counted</p>
8677
8014
  * @param {RequestInit} [options] Override http request option.
8678
8015
  * @throws {RequiredError}
8679
8016
  */
8680
- createDatabaseV2(tenant, request, options) {
8681
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).createDatabaseV2(tenant, request, options);
8017
+ collectionCount(tenant, database, collectionId, options) {
8018
+ const localVarFetchArgs = ApiApiFetchParamCreator(
8019
+ configuration
8020
+ ).collectionCount(tenant, database, collectionId, options);
8682
8021
  return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
8683
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8022
+ return fetch2(
8023
+ basePath + localVarFetchArgs.url,
8024
+ localVarFetchArgs.options
8025
+ ).then((response) => {
8684
8026
  const contentType = response.headers.get("Content-Type");
8685
8027
  const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
8686
8028
  if (response.status === 200) {
@@ -8689,53 +8031,21 @@ var ApiApiFp = function(configuration) {
8689
8031
  }
8690
8032
  throw response;
8691
8033
  }
8692
- if (response.status === 422) {
8034
+ if (response.status === 401) {
8693
8035
  if (mimeType === "application/json") {
8694
8036
  throw response;
8695
8037
  }
8696
8038
  throw response;
8697
8039
  }
8698
- throw response;
8699
- });
8700
- };
8701
- },
8702
- /**
8703
- * @summary Create Tenant V1
8704
- * @param {Api.CreateTenantV1V1Request} request
8705
- * @param {RequestInit} [options] Override http request option.
8706
- * @throws {RequiredError}
8707
- */
8708
- createTenantV1V1(request, options) {
8709
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).createTenantV1V1(request, options);
8710
- return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
8711
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8712
- const contentType = response.headers.get("Content-Type");
8713
- const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
8714
- if (response.status === 200) {
8040
+ if (response.status === 404) {
8715
8041
  if (mimeType === "application/json") {
8716
- return response.json();
8042
+ throw response;
8717
8043
  }
8718
8044
  throw response;
8719
8045
  }
8720
- throw response;
8721
- });
8722
- };
8723
- },
8724
- /**
8725
- * @summary Create Tenant
8726
- * @param {Api.CreateTenantV2Request} request
8727
- * @param {RequestInit} [options] Override http request option.
8728
- * @throws {RequiredError}
8729
- */
8730
- createTenantV2(request, options) {
8731
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).createTenantV2(request, options);
8732
- return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
8733
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8734
- const contentType = response.headers.get("Content-Type");
8735
- const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
8736
- if (response.status === 200) {
8046
+ if (response.status === 500) {
8737
8047
  if (mimeType === "application/json") {
8738
- return response.json();
8048
+ throw response;
8739
8049
  }
8740
8050
  throw response;
8741
8051
  }
@@ -8744,17 +8054,23 @@ var ApiApiFp = function(configuration) {
8744
8054
  };
8745
8055
  },
8746
8056
  /**
8747
- * @summary Delete Collection V1
8748
- * @param {string} collectionName
8749
- * @param {string} [tenant]
8750
- * @param {string} [database]
8057
+ * @summary Deletes records in a collection. Can filter by IDs or metadata.
8058
+ * @param {string} tenant <p>Tenant ID</p>
8059
+ * @param {string} database <p>Database name</p>
8060
+ * @param {string} collectionId <p>Collection ID</p>
8061
+ * @param {Api.DeleteCollectionRecordsPayload} request
8751
8062
  * @param {RequestInit} [options] Override http request option.
8752
8063
  * @throws {RequiredError}
8753
8064
  */
8754
- deleteCollectionV1V1(collectionName, tenant, database, options) {
8755
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).deleteCollectionV1V1(collectionName, tenant, database, options);
8065
+ collectionDelete(tenant, database, collectionId, request, options) {
8066
+ const localVarFetchArgs = ApiApiFetchParamCreator(
8067
+ configuration
8068
+ ).collectionDelete(tenant, database, collectionId, request, options);
8756
8069
  return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
8757
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8070
+ return fetch2(
8071
+ basePath + localVarFetchArgs.url,
8072
+ localVarFetchArgs.options
8073
+ ).then((response) => {
8758
8074
  const contentType = response.headers.get("Content-Type");
8759
8075
  const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
8760
8076
  if (response.status === 200) {
@@ -8763,37 +8079,19 @@ var ApiApiFp = function(configuration) {
8763
8079
  }
8764
8080
  throw response;
8765
8081
  }
8766
- if (response.status === 422) {
8082
+ if (response.status === 401) {
8767
8083
  if (mimeType === "application/json") {
8768
8084
  throw response;
8769
8085
  }
8770
8086
  throw response;
8771
8087
  }
8772
- throw response;
8773
- });
8774
- };
8775
- },
8776
- /**
8777
- * @summary Delete Collection
8778
- * @param {string} collectionName
8779
- * @param {string} tenant
8780
- * @param {string} databaseName
8781
- * @param {RequestInit} [options] Override http request option.
8782
- * @throws {RequiredError}
8783
- */
8784
- deleteCollectionV2(collectionName, tenant, databaseName, options) {
8785
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).deleteCollectionV2(collectionName, tenant, databaseName, options);
8786
- return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
8787
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8788
- const contentType = response.headers.get("Content-Type");
8789
- const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
8790
- if (response.status === 200) {
8088
+ if (response.status === 404) {
8791
8089
  if (mimeType === "application/json") {
8792
- return response.json();
8090
+ throw response;
8793
8091
  }
8794
8092
  throw response;
8795
8093
  }
8796
- if (response.status === 422) {
8094
+ if (response.status === 500) {
8797
8095
  if (mimeType === "application/json") {
8798
8096
  throw response;
8799
8097
  }
@@ -8804,16 +8102,23 @@ var ApiApiFp = function(configuration) {
8804
8102
  };
8805
8103
  },
8806
8104
  /**
8807
- * @summary Delete Database
8808
- * @param {string} databaseName
8809
- * @param {string} tenant
8105
+ * @summary Retrieves records from a collection by ID or metadata filter.
8106
+ * @param {string} tenant <p>Tenant ID</p>
8107
+ * @param {string} database <p>Database name for the collection</p>
8108
+ * @param {string} collectionId <p>Collection ID to fetch records from</p>
8109
+ * @param {Api.GetRequestPayload} request
8810
8110
  * @param {RequestInit} [options] Override http request option.
8811
8111
  * @throws {RequiredError}
8812
8112
  */
8813
- deleteDatabaseV2(databaseName, tenant, options) {
8814
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).deleteDatabaseV2(databaseName, tenant, options);
8113
+ collectionGet(tenant, database, collectionId, request, options) {
8114
+ const localVarFetchArgs = ApiApiFetchParamCreator(
8115
+ configuration
8116
+ ).collectionGet(tenant, database, collectionId, request, options);
8815
8117
  return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
8816
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8118
+ return fetch2(
8119
+ basePath + localVarFetchArgs.url,
8120
+ localVarFetchArgs.options
8121
+ ).then((response) => {
8817
8122
  const contentType = response.headers.get("Content-Type");
8818
8123
  const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
8819
8124
  if (response.status === 200) {
@@ -8822,36 +8127,19 @@ var ApiApiFp = function(configuration) {
8822
8127
  }
8823
8128
  throw response;
8824
8129
  }
8825
- if (response.status === 422) {
8130
+ if (response.status === 401) {
8826
8131
  if (mimeType === "application/json") {
8827
8132
  throw response;
8828
8133
  }
8829
8134
  throw response;
8830
8135
  }
8831
- throw response;
8832
- });
8833
- };
8834
- },
8835
- /**
8836
- * @summary Delete V1
8837
- * @param {string} collectionId
8838
- * @param {Api.DeleteV1V1Request} request
8839
- * @param {RequestInit} [options] Override http request option.
8840
- * @throws {RequiredError}
8841
- */
8842
- deleteV1V1(collectionId, request, options) {
8843
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).deleteV1V1(collectionId, request, options);
8844
- return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
8845
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8846
- const contentType = response.headers.get("Content-Type");
8847
- const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
8848
- if (response.status === 200) {
8136
+ if (response.status === 404) {
8849
8137
  if (mimeType === "application/json") {
8850
- return response.json();
8138
+ throw response;
8851
8139
  }
8852
8140
  throw response;
8853
8141
  }
8854
- if (response.status === 422) {
8142
+ if (response.status === 500) {
8855
8143
  if (mimeType === "application/json") {
8856
8144
  throw response;
8857
8145
  }
@@ -8862,18 +8150,33 @@ var ApiApiFp = function(configuration) {
8862
8150
  };
8863
8151
  },
8864
8152
  /**
8865
- * @summary Delete
8866
- * @param {string} collectionId
8867
- * @param {string} tenant
8868
- * @param {string} databaseName
8869
- * @param {Api.DeleteV2Request} request
8153
+ * @summary Query a collection in a variety of ways, including vector search, metadata filtering, and full-text search
8154
+ * @param {string} tenant <p>Tenant ID</p>
8155
+ * @param {string} database <p>Database name containing the collection</p>
8156
+ * @param {string} collectionId <p>Collection ID to query</p>
8157
+ * @param {number} [limit] <p>Limit for pagination</p>
8158
+ * @param {number} [offset] <p>Offset for pagination</p>
8159
+ * @param {Api.QueryRequestPayload} request
8870
8160
  * @param {RequestInit} [options] Override http request option.
8871
8161
  * @throws {RequiredError}
8872
8162
  */
8873
- deleteV2(collectionId, tenant, databaseName, request, options) {
8874
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).deleteV2(collectionId, tenant, databaseName, request, options);
8163
+ collectionQuery(tenant, database, collectionId, limit, offset, request, options) {
8164
+ const localVarFetchArgs = ApiApiFetchParamCreator(
8165
+ configuration
8166
+ ).collectionQuery(
8167
+ tenant,
8168
+ database,
8169
+ collectionId,
8170
+ limit,
8171
+ offset,
8172
+ request,
8173
+ options
8174
+ );
8875
8175
  return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
8876
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8176
+ return fetch2(
8177
+ basePath + localVarFetchArgs.url,
8178
+ localVarFetchArgs.options
8179
+ ).then((response) => {
8877
8180
  const contentType = response.headers.get("Content-Type");
8878
8181
  const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
8879
8182
  if (response.status === 200) {
@@ -8882,37 +8185,19 @@ var ApiApiFp = function(configuration) {
8882
8185
  }
8883
8186
  throw response;
8884
8187
  }
8885
- if (response.status === 422) {
8188
+ if (response.status === 401) {
8886
8189
  if (mimeType === "application/json") {
8887
8190
  throw response;
8888
8191
  }
8889
8192
  throw response;
8890
8193
  }
8891
- throw response;
8892
- });
8893
- };
8894
- },
8895
- /**
8896
- * @summary Get Collection V1
8897
- * @param {string} collectionName
8898
- * @param {string} [tenant]
8899
- * @param {string} [database]
8900
- * @param {RequestInit} [options] Override http request option.
8901
- * @throws {RequiredError}
8902
- */
8903
- getCollectionV1V1(collectionName, tenant, database, options) {
8904
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).getCollectionV1V1(collectionName, tenant, database, options);
8905
- return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
8906
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8907
- const contentType = response.headers.get("Content-Type");
8908
- const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
8909
- if (response.status === 200) {
8194
+ if (response.status === 404) {
8910
8195
  if (mimeType === "application/json") {
8911
- return response.json();
8196
+ throw response;
8912
8197
  }
8913
8198
  throw response;
8914
8199
  }
8915
- if (response.status === 422) {
8200
+ if (response.status === 500) {
8916
8201
  if (mimeType === "application/json") {
8917
8202
  throw response;
8918
8203
  }
@@ -8923,17 +8208,23 @@ var ApiApiFp = function(configuration) {
8923
8208
  };
8924
8209
  },
8925
8210
  /**
8926
- * @summary Get Collection
8211
+ * @summary Updates records in a collection by ID.
8927
8212
  * @param {string} tenant
8928
- * @param {string} databaseName
8929
- * @param {string} collectionName
8213
+ * @param {string} database
8214
+ * @param {string} collectionId
8215
+ * @param {Api.UpdateCollectionRecordsPayload} request
8930
8216
  * @param {RequestInit} [options] Override http request option.
8931
8217
  * @throws {RequiredError}
8932
8218
  */
8933
- getCollectionV2(tenant, databaseName, collectionName, options) {
8934
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).getCollectionV2(tenant, databaseName, collectionName, options);
8219
+ collectionUpdate(tenant, database, collectionId, request, options) {
8220
+ const localVarFetchArgs = ApiApiFetchParamCreator(
8221
+ configuration
8222
+ ).collectionUpdate(tenant, database, collectionId, request, options);
8935
8223
  return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
8936
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8224
+ return fetch2(
8225
+ basePath + localVarFetchArgs.url,
8226
+ localVarFetchArgs.options
8227
+ ).then((response) => {
8937
8228
  const contentType = response.headers.get("Content-Type");
8938
8229
  const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
8939
8230
  if (response.status === 200) {
@@ -8942,27 +8233,31 @@ var ApiApiFp = function(configuration) {
8942
8233
  }
8943
8234
  throw response;
8944
8235
  }
8945
- if (response.status === 422) {
8946
- if (mimeType === "application/json") {
8947
- throw response;
8948
- }
8949
- throw response;
8236
+ if (response.status === 404) {
8237
+ return response;
8950
8238
  }
8951
8239
  throw response;
8952
8240
  });
8953
8241
  };
8954
8242
  },
8955
8243
  /**
8956
- * @summary Get Database V1
8957
- * @param {string} database
8958
- * @param {string} [tenant]
8244
+ * @summary Upserts records in a collection (create if not exists, otherwise update).
8245
+ * @param {string} tenant <p>Tenant ID</p>
8246
+ * @param {string} database <p>Database name</p>
8247
+ * @param {string} collectionId <p>Collection ID</p>
8248
+ * @param {Api.UpsertCollectionRecordsPayload} request
8959
8249
  * @param {RequestInit} [options] Override http request option.
8960
8250
  * @throws {RequiredError}
8961
8251
  */
8962
- getDatabaseV1V1(database, tenant, options) {
8963
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).getDatabaseV1V1(database, tenant, options);
8252
+ collectionUpsert(tenant, database, collectionId, request, options) {
8253
+ const localVarFetchArgs = ApiApiFetchParamCreator(
8254
+ configuration
8255
+ ).collectionUpsert(tenant, database, collectionId, request, options);
8964
8256
  return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
8965
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8257
+ return fetch2(
8258
+ basePath + localVarFetchArgs.url,
8259
+ localVarFetchArgs.options
8260
+ ).then((response) => {
8966
8261
  const contentType = response.headers.get("Content-Type");
8967
8262
  const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
8968
8263
  if (response.status === 200) {
@@ -8971,36 +8266,19 @@ var ApiApiFp = function(configuration) {
8971
8266
  }
8972
8267
  throw response;
8973
8268
  }
8974
- if (response.status === 422) {
8269
+ if (response.status === 401) {
8975
8270
  if (mimeType === "application/json") {
8976
8271
  throw response;
8977
8272
  }
8978
8273
  throw response;
8979
8274
  }
8980
- throw response;
8981
- });
8982
- };
8983
- },
8984
- /**
8985
- * @summary Get Database
8986
- * @param {string} databaseName
8987
- * @param {string} tenant
8988
- * @param {RequestInit} [options] Override http request option.
8989
- * @throws {RequiredError}
8990
- */
8991
- getDatabaseV2(databaseName, tenant, options) {
8992
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).getDatabaseV2(databaseName, tenant, options);
8993
- return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
8994
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8995
- const contentType = response.headers.get("Content-Type");
8996
- const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
8997
- if (response.status === 200) {
8275
+ if (response.status === 404) {
8998
8276
  if (mimeType === "application/json") {
8999
- return response.json();
8277
+ throw response;
9000
8278
  }
9001
8279
  throw response;
9002
8280
  }
9003
- if (response.status === 422) {
8281
+ if (response.status === 500) {
9004
8282
  if (mimeType === "application/json") {
9005
8283
  throw response;
9006
8284
  }
@@ -9011,16 +8289,21 @@ var ApiApiFp = function(configuration) {
9011
8289
  };
9012
8290
  },
9013
8291
  /**
9014
- * @summary Get Nearest Neighbors V1
9015
- * @param {string} collectionId
9016
- * @param {Api.GetNearestNeighborsV1V1Request} request
8292
+ * @summary Retrieves the total number of collections in a given database.
8293
+ * @param {string} tenant <p>Tenant ID</p>
8294
+ * @param {string} database <p>Database name to count collections from</p>
9017
8295
  * @param {RequestInit} [options] Override http request option.
9018
8296
  * @throws {RequiredError}
9019
8297
  */
9020
- getNearestNeighborsV1V1(collectionId, request, options) {
9021
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).getNearestNeighborsV1V1(collectionId, request, options);
8298
+ countCollections(tenant, database, options) {
8299
+ const localVarFetchArgs = ApiApiFetchParamCreator(
8300
+ configuration
8301
+ ).countCollections(tenant, database, options);
9022
8302
  return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
9023
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8303
+ return fetch2(
8304
+ basePath + localVarFetchArgs.url,
8305
+ localVarFetchArgs.options
8306
+ ).then((response) => {
9024
8307
  const contentType = response.headers.get("Content-Type");
9025
8308
  const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
9026
8309
  if (response.status === 200) {
@@ -9029,7 +8312,13 @@ var ApiApiFp = function(configuration) {
9029
8312
  }
9030
8313
  throw response;
9031
8314
  }
9032
- if (response.status === 422) {
8315
+ if (response.status === 401) {
8316
+ if (mimeType === "application/json") {
8317
+ throw response;
8318
+ }
8319
+ throw response;
8320
+ }
8321
+ if (response.status === 500) {
9033
8322
  if (mimeType === "application/json") {
9034
8323
  throw response;
9035
8324
  }
@@ -9040,18 +8329,22 @@ var ApiApiFp = function(configuration) {
9040
8329
  };
9041
8330
  },
9042
8331
  /**
9043
- * @summary Get Nearest Neighbors
9044
- * @param {string} tenant
9045
- * @param {string} databaseName
9046
- * @param {string} collectionId
9047
- * @param {Api.GetNearestNeighborsV2Request} request
8332
+ * @summary Creates a new collection under the specified database.
8333
+ * @param {string} tenant <p>Tenant ID</p>
8334
+ * @param {string} database <p>Database name containing the new collection</p>
8335
+ * @param {Api.CreateCollectionPayload} request
9048
8336
  * @param {RequestInit} [options] Override http request option.
9049
8337
  * @throws {RequiredError}
9050
8338
  */
9051
- getNearestNeighborsV2(tenant, databaseName, collectionId, request, options) {
9052
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).getNearestNeighborsV2(tenant, databaseName, collectionId, request, options);
8339
+ createCollection(tenant, database, request, options) {
8340
+ const localVarFetchArgs = ApiApiFetchParamCreator(
8341
+ configuration
8342
+ ).createCollection(tenant, database, request, options);
9053
8343
  return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
9054
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8344
+ return fetch2(
8345
+ basePath + localVarFetchArgs.url,
8346
+ localVarFetchArgs.options
8347
+ ).then((response) => {
9055
8348
  const contentType = response.headers.get("Content-Type");
9056
8349
  const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
9057
8350
  if (response.status === 200) {
@@ -9060,7 +8353,13 @@ var ApiApiFp = function(configuration) {
9060
8353
  }
9061
8354
  throw response;
9062
8355
  }
9063
- if (response.status === 422) {
8356
+ if (response.status === 401) {
8357
+ if (mimeType === "application/json") {
8358
+ throw response;
8359
+ }
8360
+ throw response;
8361
+ }
8362
+ if (response.status === 500) {
9064
8363
  if (mimeType === "application/json") {
9065
8364
  throw response;
9066
8365
  }
@@ -9071,15 +8370,21 @@ var ApiApiFp = function(configuration) {
9071
8370
  };
9072
8371
  },
9073
8372
  /**
9074
- * @summary Get Tenant V1
9075
- * @param {string} tenant
8373
+ * @summary Creates a new database for a given tenant.
8374
+ * @param {string} tenant <p>Tenant ID to associate with the new database</p>
8375
+ * @param {Api.CreateDatabasePayload} request
9076
8376
  * @param {RequestInit} [options] Override http request option.
9077
8377
  * @throws {RequiredError}
9078
8378
  */
9079
- getTenantV1V1(tenant, options) {
9080
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).getTenantV1V1(tenant, options);
8379
+ createDatabase(tenant, request, options) {
8380
+ const localVarFetchArgs = ApiApiFetchParamCreator(
8381
+ configuration
8382
+ ).createDatabase(tenant, request, options);
9081
8383
  return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
9082
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8384
+ return fetch2(
8385
+ basePath + localVarFetchArgs.url,
8386
+ localVarFetchArgs.options
8387
+ ).then((response) => {
9083
8388
  const contentType = response.headers.get("Content-Type");
9084
8389
  const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
9085
8390
  if (response.status === 200) {
@@ -9088,7 +8393,13 @@ var ApiApiFp = function(configuration) {
9088
8393
  }
9089
8394
  throw response;
9090
8395
  }
9091
- if (response.status === 422) {
8396
+ if (response.status === 401) {
8397
+ if (mimeType === "application/json") {
8398
+ throw response;
8399
+ }
8400
+ throw response;
8401
+ }
8402
+ if (response.status === 500) {
9092
8403
  if (mimeType === "application/json") {
9093
8404
  throw response;
9094
8405
  }
@@ -9099,15 +8410,20 @@ var ApiApiFp = function(configuration) {
9099
8410
  };
9100
8411
  },
9101
8412
  /**
9102
- * @summary Get Tenant
9103
- * @param {string} tenant
8413
+ * @summary Creates a new tenant.
8414
+ * @param {Api.CreateTenantPayload} request
9104
8415
  * @param {RequestInit} [options] Override http request option.
9105
8416
  * @throws {RequiredError}
9106
8417
  */
9107
- getTenantV2(tenant, options) {
9108
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).getTenantV2(tenant, options);
8418
+ createTenant(request, options) {
8419
+ const localVarFetchArgs = ApiApiFetchParamCreator(
8420
+ configuration
8421
+ ).createTenant(request, options);
9109
8422
  return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
9110
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8423
+ return fetch2(
8424
+ basePath + localVarFetchArgs.url,
8425
+ localVarFetchArgs.options
8426
+ ).then((response) => {
9111
8427
  const contentType = response.headers.get("Content-Type");
9112
8428
  const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
9113
8429
  if (response.status === 200) {
@@ -9116,30 +8432,15 @@ var ApiApiFp = function(configuration) {
9116
8432
  }
9117
8433
  throw response;
9118
8434
  }
9119
- if (response.status === 422) {
8435
+ if (response.status === 401) {
9120
8436
  if (mimeType === "application/json") {
9121
8437
  throw response;
9122
8438
  }
9123
8439
  throw response;
9124
8440
  }
9125
- throw response;
9126
- });
9127
- };
9128
- },
9129
- /**
9130
- * @summary Get User Identity
9131
- * @param {RequestInit} [options] Override http request option.
9132
- * @throws {RequiredError}
9133
- */
9134
- getUserIdentityV2(options) {
9135
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).getUserIdentityV2(options);
9136
- return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
9137
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
9138
- const contentType = response.headers.get("Content-Type");
9139
- const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
9140
- if (response.status === 200) {
8441
+ if (response.status === 500) {
9141
8442
  if (mimeType === "application/json") {
9142
- return response.json();
8443
+ throw response;
9143
8444
  }
9144
8445
  throw response;
9145
8446
  }
@@ -9148,16 +8449,22 @@ var ApiApiFp = function(configuration) {
9148
8449
  };
9149
8450
  },
9150
8451
  /**
9151
- * @summary Get V1
9152
- * @param {string} collectionId
9153
- * @param {Api.GetV1V1Request} request
8452
+ * @summary Deletes a collection in a given database.
8453
+ * @param {string} tenant <p>Tenant ID</p>
8454
+ * @param {string} database <p>Database name</p>
8455
+ * @param {string} collectionId <p>UUID of the collection to delete</p>
9154
8456
  * @param {RequestInit} [options] Override http request option.
9155
8457
  * @throws {RequiredError}
9156
8458
  */
9157
- getV1V1(collectionId, request, options) {
9158
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).getV1V1(collectionId, request, options);
8459
+ deleteCollection(tenant, database, collectionId, options) {
8460
+ const localVarFetchArgs = ApiApiFetchParamCreator(
8461
+ configuration
8462
+ ).deleteCollection(tenant, database, collectionId, options);
9159
8463
  return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
9160
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8464
+ return fetch2(
8465
+ basePath + localVarFetchArgs.url,
8466
+ localVarFetchArgs.options
8467
+ ).then((response) => {
9161
8468
  const contentType = response.headers.get("Content-Type");
9162
8469
  const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
9163
8470
  if (response.status === 200) {
@@ -9166,38 +8473,19 @@ var ApiApiFp = function(configuration) {
9166
8473
  }
9167
8474
  throw response;
9168
8475
  }
9169
- if (response.status === 422) {
8476
+ if (response.status === 401) {
9170
8477
  if (mimeType === "application/json") {
9171
8478
  throw response;
9172
8479
  }
9173
8480
  throw response;
9174
8481
  }
9175
- throw response;
9176
- });
9177
- };
9178
- },
9179
- /**
9180
- * @summary Get
9181
- * @param {string} collectionId
9182
- * @param {string} tenant
9183
- * @param {string} databaseName
9184
- * @param {Api.GetV2Request} request
9185
- * @param {RequestInit} [options] Override http request option.
9186
- * @throws {RequiredError}
9187
- */
9188
- getV2(collectionId, tenant, databaseName, request, options) {
9189
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).getV2(collectionId, tenant, databaseName, request, options);
9190
- return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
9191
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
9192
- const contentType = response.headers.get("Content-Type");
9193
- const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
9194
- if (response.status === 200) {
8482
+ if (response.status === 404) {
9195
8483
  if (mimeType === "application/json") {
9196
- return response.json();
8484
+ throw response;
9197
8485
  }
9198
8486
  throw response;
9199
8487
  }
9200
- if (response.status === 422) {
8488
+ if (response.status === 500) {
9201
8489
  if (mimeType === "application/json") {
9202
8490
  throw response;
9203
8491
  }
@@ -9208,14 +8496,21 @@ var ApiApiFp = function(configuration) {
9208
8496
  };
9209
8497
  },
9210
8498
  /**
9211
- * @summary Heartbeat
8499
+ * @summary Deletes a specific database.
8500
+ * @param {string} tenant <p>Tenant ID</p>
8501
+ * @param {string} database <p>Name of the database to delete</p>
9212
8502
  * @param {RequestInit} [options] Override http request option.
9213
8503
  * @throws {RequiredError}
9214
8504
  */
9215
- heartbeatV1(options) {
9216
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).heartbeatV1(options);
8505
+ deleteDatabase(tenant, database, options) {
8506
+ const localVarFetchArgs = ApiApiFetchParamCreator(
8507
+ configuration
8508
+ ).deleteDatabase(tenant, database, options);
9217
8509
  return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
9218
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8510
+ return fetch2(
8511
+ basePath + localVarFetchArgs.url,
8512
+ localVarFetchArgs.options
8513
+ ).then((response) => {
9219
8514
  const contentType = response.headers.get("Content-Type");
9220
8515
  const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
9221
8516
  if (response.status === 200) {
@@ -9224,53 +8519,19 @@ var ApiApiFp = function(configuration) {
9224
8519
  }
9225
8520
  throw response;
9226
8521
  }
9227
- throw response;
9228
- });
9229
- };
9230
- },
9231
- /**
9232
- * @summary Heartbeat
9233
- * @param {RequestInit} [options] Override http request option.
9234
- * @throws {RequiredError}
9235
- */
9236
- heartbeatV2(options) {
9237
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).heartbeatV2(options);
9238
- return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
9239
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
9240
- const contentType = response.headers.get("Content-Type");
9241
- const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
9242
- if (response.status === 200) {
8522
+ if (response.status === 401) {
9243
8523
  if (mimeType === "application/json") {
9244
- return response.json();
8524
+ throw response;
9245
8525
  }
9246
8526
  throw response;
9247
8527
  }
9248
- throw response;
9249
- });
9250
- };
9251
- },
9252
- /**
9253
- * @summary List Collections V1
9254
- * @param {number | null} [limit]
9255
- * @param {number | null} [offset]
9256
- * @param {string} [tenant]
9257
- * @param {string} [database]
9258
- * @param {RequestInit} [options] Override http request option.
9259
- * @throws {RequiredError}
9260
- */
9261
- listCollectionsV1V1(limit, offset, tenant, database, options) {
9262
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).listCollectionsV1V1(limit, offset, tenant, database, options);
9263
- return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
9264
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
9265
- const contentType = response.headers.get("Content-Type");
9266
- const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
9267
- if (response.status === 200) {
8528
+ if (response.status === 404) {
9268
8529
  if (mimeType === "application/json") {
9269
- return response.json();
8530
+ throw response;
9270
8531
  }
9271
8532
  throw response;
9272
8533
  }
9273
- if (response.status === 422) {
8534
+ if (response.status === 500) {
9274
8535
  if (mimeType === "application/json") {
9275
8536
  throw response;
9276
8537
  }
@@ -9281,18 +8542,22 @@ var ApiApiFp = function(configuration) {
9281
8542
  };
9282
8543
  },
9283
8544
  /**
9284
- * @summary List Collections
9285
- * @param {string} tenant
9286
- * @param {string} databaseName
9287
- * @param {number | null} [limit]
9288
- * @param {number | null} [offset]
8545
+ * @summary Retrieves a collection by ID or name.
8546
+ * @param {string} tenant <p>Tenant ID</p>
8547
+ * @param {string} database <p>Database name</p>
8548
+ * @param {string} collectionId <p>UUID of the collection</p>
9289
8549
  * @param {RequestInit} [options] Override http request option.
9290
8550
  * @throws {RequiredError}
9291
8551
  */
9292
- listCollectionsV2(tenant, databaseName, limit, offset, options) {
9293
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).listCollectionsV2(tenant, databaseName, limit, offset, options);
8552
+ getCollection(tenant, database, collectionId, options) {
8553
+ const localVarFetchArgs = ApiApiFetchParamCreator(
8554
+ configuration
8555
+ ).getCollection(tenant, database, collectionId, options);
9294
8556
  return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
9295
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8557
+ return fetch2(
8558
+ basePath + localVarFetchArgs.url,
8559
+ localVarFetchArgs.options
8560
+ ).then((response) => {
9296
8561
  const contentType = response.headers.get("Content-Type");
9297
8562
  const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
9298
8563
  if (response.status === 200) {
@@ -9301,37 +8566,19 @@ var ApiApiFp = function(configuration) {
9301
8566
  }
9302
8567
  throw response;
9303
8568
  }
9304
- if (response.status === 422) {
8569
+ if (response.status === 401) {
9305
8570
  if (mimeType === "application/json") {
9306
8571
  throw response;
9307
8572
  }
9308
8573
  throw response;
9309
8574
  }
9310
- throw response;
9311
- });
9312
- };
9313
- },
9314
- /**
9315
- * @summary List Databases
9316
- * @param {string} tenant
9317
- * @param {number | null} [limit]
9318
- * @param {number | null} [offset]
9319
- * @param {RequestInit} [options] Override http request option.
9320
- * @throws {RequiredError}
9321
- */
9322
- listDatabasesV2(tenant, limit, offset, options) {
9323
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).listDatabasesV2(tenant, limit, offset, options);
9324
- return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
9325
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
9326
- const contentType = response.headers.get("Content-Type");
9327
- const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
9328
- if (response.status === 200) {
8575
+ if (response.status === 404) {
9329
8576
  if (mimeType === "application/json") {
9330
- return response.json();
8577
+ throw response;
9331
8578
  }
9332
8579
  throw response;
9333
8580
  }
9334
- if (response.status === 422) {
8581
+ if (response.status === 500) {
9335
8582
  if (mimeType === "application/json") {
9336
8583
  throw response;
9337
8584
  }
@@ -9342,14 +8589,21 @@ var ApiApiFp = function(configuration) {
9342
8589
  };
9343
8590
  },
9344
8591
  /**
9345
- * @summary Pre Flight Checks
8592
+ * @summary Retrieves a specific database by name.
8593
+ * @param {string} tenant <p>Tenant ID</p>
8594
+ * @param {string} database <p>Name of the database to retrieve</p>
9346
8595
  * @param {RequestInit} [options] Override http request option.
9347
8596
  * @throws {RequiredError}
9348
8597
  */
9349
- preFlightChecksV1(options) {
9350
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).preFlightChecksV1(options);
8598
+ getDatabase(tenant, database, options) {
8599
+ const localVarFetchArgs = ApiApiFetchParamCreator(
8600
+ configuration
8601
+ ).getDatabase(tenant, database, options);
9351
8602
  return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
9352
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8603
+ return fetch2(
8604
+ basePath + localVarFetchArgs.url,
8605
+ localVarFetchArgs.options
8606
+ ).then((response) => {
9353
8607
  const contentType = response.headers.get("Content-Type");
9354
8608
  const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
9355
8609
  if (response.status === 200) {
@@ -9358,45 +8612,21 @@ var ApiApiFp = function(configuration) {
9358
8612
  }
9359
8613
  throw response;
9360
8614
  }
9361
- throw response;
9362
- });
9363
- };
9364
- },
9365
- /**
9366
- * @summary Pre Flight Checks
9367
- * @param {RequestInit} [options] Override http request option.
9368
- * @throws {RequiredError}
9369
- */
9370
- preFlightChecksV2(options) {
9371
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).preFlightChecksV2(options);
9372
- return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
9373
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
9374
- const contentType = response.headers.get("Content-Type");
9375
- const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
9376
- if (response.status === 200) {
8615
+ if (response.status === 401) {
9377
8616
  if (mimeType === "application/json") {
9378
- return response.json();
8617
+ throw response;
9379
8618
  }
9380
8619
  throw response;
9381
8620
  }
9382
- throw response;
9383
- });
9384
- };
9385
- },
9386
- /**
9387
- * @summary Reset
9388
- * @param {RequestInit} [options] Override http request option.
9389
- * @throws {RequiredError}
9390
- */
9391
- resetV1(options) {
9392
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).resetV1(options);
9393
- return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
9394
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
9395
- const contentType = response.headers.get("Content-Type");
9396
- const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
9397
- if (response.status === 200) {
8621
+ if (response.status === 404) {
9398
8622
  if (mimeType === "application/json") {
9399
- return response.json();
8623
+ throw response;
8624
+ }
8625
+ throw response;
8626
+ }
8627
+ if (response.status === 500) {
8628
+ if (mimeType === "application/json") {
8629
+ throw response;
9400
8630
  }
9401
8631
  throw response;
9402
8632
  }
@@ -9405,14 +8635,20 @@ var ApiApiFp = function(configuration) {
9405
8635
  };
9406
8636
  },
9407
8637
  /**
9408
- * @summary Reset
8638
+ * @summary Returns an existing tenant by name.
8639
+ * @param {string} tenantName <p>Tenant name or ID to retrieve</p>
9409
8640
  * @param {RequestInit} [options] Override http request option.
9410
8641
  * @throws {RequiredError}
9411
8642
  */
9412
- resetV2(options) {
9413
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).resetV2(options);
8643
+ getTenant(tenantName, options) {
8644
+ const localVarFetchArgs = ApiApiFetchParamCreator(
8645
+ configuration
8646
+ ).getTenant(tenantName, options);
9414
8647
  return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
9415
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8648
+ return fetch2(
8649
+ basePath + localVarFetchArgs.url,
8650
+ localVarFetchArgs.options
8651
+ ).then((response) => {
9416
8652
  const contentType = response.headers.get("Content-Type");
9417
8653
  const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
9418
8654
  if (response.status === 200) {
@@ -9421,24 +8657,21 @@ var ApiApiFp = function(configuration) {
9421
8657
  }
9422
8658
  throw response;
9423
8659
  }
9424
- throw response;
9425
- });
9426
- };
9427
- },
9428
- /**
9429
- * @summary Root
9430
- * @param {RequestInit} [options] Override http request option.
9431
- * @throws {RequiredError}
9432
- */
9433
- rootV1(options) {
9434
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).rootV1(options);
9435
- return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
9436
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
9437
- const contentType = response.headers.get("Content-Type");
9438
- const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
9439
- if (response.status === 200) {
8660
+ if (response.status === 401) {
8661
+ if (mimeType === "application/json") {
8662
+ throw response;
8663
+ }
8664
+ throw response;
8665
+ }
8666
+ if (response.status === 404) {
8667
+ if (mimeType === "application/json") {
8668
+ throw response;
8669
+ }
8670
+ throw response;
8671
+ }
8672
+ if (response.status === 500) {
9440
8673
  if (mimeType === "application/json") {
9441
- return response.json();
8674
+ throw response;
9442
8675
  }
9443
8676
  throw response;
9444
8677
  }
@@ -9447,14 +8680,17 @@ var ApiApiFp = function(configuration) {
9447
8680
  };
9448
8681
  },
9449
8682
  /**
9450
- * @summary Root
8683
+ * @summary Retrieves the current user's identity, tenant, and databases.
9451
8684
  * @param {RequestInit} [options] Override http request option.
9452
8685
  * @throws {RequiredError}
9453
8686
  */
9454
- rootV2(options) {
9455
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).rootV2(options);
8687
+ getUserIdentity(options) {
8688
+ const localVarFetchArgs = ApiApiFetchParamCreator(configuration).getUserIdentity(options);
9456
8689
  return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
9457
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8690
+ return fetch2(
8691
+ basePath + localVarFetchArgs.url,
8692
+ localVarFetchArgs.options
8693
+ ).then((response) => {
9458
8694
  const contentType = response.headers.get("Content-Type");
9459
8695
  const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
9460
8696
  if (response.status === 200) {
@@ -9463,21 +8699,28 @@ var ApiApiFp = function(configuration) {
9463
8699
  }
9464
8700
  throw response;
9465
8701
  }
8702
+ if (response.status === 500) {
8703
+ if (mimeType === "application/json") {
8704
+ throw response;
8705
+ }
8706
+ throw response;
8707
+ }
9466
8708
  throw response;
9467
8709
  });
9468
8710
  };
9469
8711
  },
9470
8712
  /**
9471
- * @summary Update Collection V1
9472
- * @param {string} collectionId
9473
- * @param {Api.UpdateCollectionV1V1Request} request
8713
+ * @summary Health check endpoint that returns 200 if the server and executor are ready
9474
8714
  * @param {RequestInit} [options] Override http request option.
9475
8715
  * @throws {RequiredError}
9476
8716
  */
9477
- updateCollectionV1V1(collectionId, request, options) {
9478
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).updateCollectionV1V1(collectionId, request, options);
8717
+ healthcheck(options) {
8718
+ const localVarFetchArgs = ApiApiFetchParamCreator(configuration).healthcheck(options);
9479
8719
  return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
9480
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8720
+ return fetch2(
8721
+ basePath + localVarFetchArgs.url,
8722
+ localVarFetchArgs.options
8723
+ ).then((response) => {
9481
8724
  const contentType = response.headers.get("Content-Type");
9482
8725
  const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
9483
8726
  if (response.status === 200) {
@@ -9486,7 +8729,7 @@ var ApiApiFp = function(configuration) {
9486
8729
  }
9487
8730
  throw response;
9488
8731
  }
9489
- if (response.status === 422) {
8732
+ if (response.status === 503) {
9490
8733
  if (mimeType === "application/json") {
9491
8734
  throw response;
9492
8735
  }
@@ -9497,18 +8740,17 @@ var ApiApiFp = function(configuration) {
9497
8740
  };
9498
8741
  },
9499
8742
  /**
9500
- * @summary Update Collection
9501
- * @param {string} tenant
9502
- * @param {string} databaseName
9503
- * @param {string} collectionId
9504
- * @param {Api.UpdateCollectionV2Request} request
8743
+ * @summary Heartbeat endpoint that returns a nanosecond timestamp of the current time.
9505
8744
  * @param {RequestInit} [options] Override http request option.
9506
8745
  * @throws {RequiredError}
9507
8746
  */
9508
- updateCollectionV2(tenant, databaseName, collectionId, request, options) {
9509
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).updateCollectionV2(tenant, databaseName, collectionId, request, options);
8747
+ heartbeat(options) {
8748
+ const localVarFetchArgs = ApiApiFetchParamCreator(configuration).heartbeat(options);
9510
8749
  return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
9511
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8750
+ return fetch2(
8751
+ basePath + localVarFetchArgs.url,
8752
+ localVarFetchArgs.options
8753
+ ).then((response) => {
9512
8754
  const contentType = response.headers.get("Content-Type");
9513
8755
  const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
9514
8756
  if (response.status === 200) {
@@ -9517,7 +8759,7 @@ var ApiApiFp = function(configuration) {
9517
8759
  }
9518
8760
  throw response;
9519
8761
  }
9520
- if (response.status === 422) {
8762
+ if (response.status === 500) {
9521
8763
  if (mimeType === "application/json") {
9522
8764
  throw response;
9523
8765
  }
@@ -9528,16 +8770,23 @@ var ApiApiFp = function(configuration) {
9528
8770
  };
9529
8771
  },
9530
8772
  /**
9531
- * @summary Update V1
9532
- * @param {string} collectionId
9533
- * @param {Api.UpdateV1V1Request} request
8773
+ * @summary Lists all collections in the specified database.
8774
+ * @param {string} tenant <p>Tenant ID</p>
8775
+ * @param {string} database <p>Database name to list collections from</p>
8776
+ * @param {number} [limit] <p>Limit for pagination</p>
8777
+ * @param {number} [offset] <p>Offset for pagination</p>
9534
8778
  * @param {RequestInit} [options] Override http request option.
9535
8779
  * @throws {RequiredError}
9536
8780
  */
9537
- updateV1V1(collectionId, request, options) {
9538
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).updateV1V1(collectionId, request, options);
8781
+ listCollections(tenant, database, limit, offset, options) {
8782
+ const localVarFetchArgs = ApiApiFetchParamCreator(
8783
+ configuration
8784
+ ).listCollections(tenant, database, limit, offset, options);
9539
8785
  return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
9540
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8786
+ return fetch2(
8787
+ basePath + localVarFetchArgs.url,
8788
+ localVarFetchArgs.options
8789
+ ).then((response) => {
9541
8790
  const contentType = response.headers.get("Content-Type");
9542
8791
  const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
9543
8792
  if (response.status === 200) {
@@ -9546,7 +8795,13 @@ var ApiApiFp = function(configuration) {
9546
8795
  }
9547
8796
  throw response;
9548
8797
  }
9549
- if (response.status === 422) {
8798
+ if (response.status === 401) {
8799
+ if (mimeType === "application/json") {
8800
+ throw response;
8801
+ }
8802
+ throw response;
8803
+ }
8804
+ if (response.status === 500) {
9550
8805
  if (mimeType === "application/json") {
9551
8806
  throw response;
9552
8807
  }
@@ -9557,18 +8812,22 @@ var ApiApiFp = function(configuration) {
9557
8812
  };
9558
8813
  },
9559
8814
  /**
9560
- * @summary Update
9561
- * @param {string} tenant
9562
- * @param {string} databaseName
9563
- * @param {string} collectionId
9564
- * @param {Api.UpdateV2Request} request
8815
+ * @summary Lists all databases for a given tenant.
8816
+ * @param {string} tenant <p>Tenant ID to list databases for</p>
8817
+ * @param {number} [limit] <p>Limit for pagination</p>
8818
+ * @param {number} [offset] <p>Offset for pagination</p>
9565
8819
  * @param {RequestInit} [options] Override http request option.
9566
8820
  * @throws {RequiredError}
9567
8821
  */
9568
- updateV2(tenant, databaseName, collectionId, request, options) {
9569
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).updateV2(tenant, databaseName, collectionId, request, options);
8822
+ listDatabases(tenant, limit, offset, options) {
8823
+ const localVarFetchArgs = ApiApiFetchParamCreator(
8824
+ configuration
8825
+ ).listDatabases(tenant, limit, offset, options);
9570
8826
  return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
9571
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8827
+ return fetch2(
8828
+ basePath + localVarFetchArgs.url,
8829
+ localVarFetchArgs.options
8830
+ ).then((response) => {
9572
8831
  const contentType = response.headers.get("Content-Type");
9573
8832
  const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
9574
8833
  if (response.status === 200) {
@@ -9577,7 +8836,13 @@ var ApiApiFp = function(configuration) {
9577
8836
  }
9578
8837
  throw response;
9579
8838
  }
9580
- if (response.status === 422) {
8839
+ if (response.status === 401) {
8840
+ if (mimeType === "application/json") {
8841
+ throw response;
8842
+ }
8843
+ throw response;
8844
+ }
8845
+ if (response.status === 500) {
9581
8846
  if (mimeType === "application/json") {
9582
8847
  throw response;
9583
8848
  }
@@ -9588,16 +8853,17 @@ var ApiApiFp = function(configuration) {
9588
8853
  };
9589
8854
  },
9590
8855
  /**
9591
- * @summary Upsert V1
9592
- * @param {string} collectionId
9593
- * @param {Api.UpsertV1V1Request} request
8856
+ * @summary Pre-flight checks endpoint reporting basic readiness info.
9594
8857
  * @param {RequestInit} [options] Override http request option.
9595
8858
  * @throws {RequiredError}
9596
8859
  */
9597
- upsertV1V1(collectionId, request, options) {
9598
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).upsertV1V1(collectionId, request, options);
8860
+ preFlightChecks(options) {
8861
+ const localVarFetchArgs = ApiApiFetchParamCreator(configuration).preFlightChecks(options);
9599
8862
  return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
9600
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8863
+ return fetch2(
8864
+ basePath + localVarFetchArgs.url,
8865
+ localVarFetchArgs.options
8866
+ ).then((response) => {
9601
8867
  const contentType = response.headers.get("Content-Type");
9602
8868
  const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
9603
8869
  if (response.status === 200) {
@@ -9606,7 +8872,7 @@ var ApiApiFp = function(configuration) {
9606
8872
  }
9607
8873
  throw response;
9608
8874
  }
9609
- if (response.status === 422) {
8875
+ if (response.status === 500) {
9610
8876
  if (mimeType === "application/json") {
9611
8877
  throw response;
9612
8878
  }
@@ -9617,18 +8883,17 @@ var ApiApiFp = function(configuration) {
9617
8883
  };
9618
8884
  },
9619
8885
  /**
9620
- * @summary Upsert
9621
- * @param {string} tenant
9622
- * @param {string} databaseName
9623
- * @param {string} collectionId
9624
- * @param {Api.UpsertV2Request} request
8886
+ * @summary Reset endpoint allowing authorized users to reset the database.
9625
8887
  * @param {RequestInit} [options] Override http request option.
9626
8888
  * @throws {RequiredError}
9627
8889
  */
9628
- upsertV2(tenant, databaseName, collectionId, request, options) {
9629
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).upsertV2(tenant, databaseName, collectionId, request, options);
8890
+ reset(options) {
8891
+ const localVarFetchArgs = ApiApiFetchParamCreator(configuration).reset(options);
9630
8892
  return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
9631
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8893
+ return fetch2(
8894
+ basePath + localVarFetchArgs.url,
8895
+ localVarFetchArgs.options
8896
+ ).then((response) => {
9632
8897
  const contentType = response.headers.get("Content-Type");
9633
8898
  const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
9634
8899
  if (response.status === 200) {
@@ -9637,7 +8902,13 @@ var ApiApiFp = function(configuration) {
9637
8902
  }
9638
8903
  throw response;
9639
8904
  }
9640
- if (response.status === 422) {
8905
+ if (response.status === 401) {
8906
+ if (mimeType === "application/json") {
8907
+ throw response;
8908
+ }
8909
+ throw response;
8910
+ }
8911
+ if (response.status === 500) {
9641
8912
  if (mimeType === "application/json") {
9642
8913
  throw response;
9643
8914
  }
@@ -9648,14 +8919,23 @@ var ApiApiFp = function(configuration) {
9648
8919
  };
9649
8920
  },
9650
8921
  /**
9651
- * @summary Version
8922
+ * @summary Updates an existing collection's name or metadata.
8923
+ * @param {string} tenant <p>Tenant ID</p>
8924
+ * @param {string} database <p>Database name</p>
8925
+ * @param {string} collectionId <p>UUID of the collection to update</p>
8926
+ * @param {Api.UpdateCollectionPayload} request
9652
8927
  * @param {RequestInit} [options] Override http request option.
9653
8928
  * @throws {RequiredError}
9654
8929
  */
9655
- versionV1(options) {
9656
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).versionV1(options);
8930
+ updateCollection(tenant, database, collectionId, request, options) {
8931
+ const localVarFetchArgs = ApiApiFetchParamCreator(
8932
+ configuration
8933
+ ).updateCollection(tenant, database, collectionId, request, options);
9657
8934
  return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
9658
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8935
+ return fetch2(
8936
+ basePath + localVarFetchArgs.url,
8937
+ localVarFetchArgs.options
8938
+ ).then((response) => {
9659
8939
  const contentType = response.headers.get("Content-Type");
9660
8940
  const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
9661
8941
  if (response.status === 200) {
@@ -9664,19 +8944,40 @@ var ApiApiFp = function(configuration) {
9664
8944
  }
9665
8945
  throw response;
9666
8946
  }
8947
+ if (response.status === 401) {
8948
+ if (mimeType === "application/json") {
8949
+ throw response;
8950
+ }
8951
+ throw response;
8952
+ }
8953
+ if (response.status === 404) {
8954
+ if (mimeType === "application/json") {
8955
+ throw response;
8956
+ }
8957
+ throw response;
8958
+ }
8959
+ if (response.status === 500) {
8960
+ if (mimeType === "application/json") {
8961
+ throw response;
8962
+ }
8963
+ throw response;
8964
+ }
9667
8965
  throw response;
9668
8966
  });
9669
8967
  };
9670
8968
  },
9671
8969
  /**
9672
- * @summary Version
8970
+ * @summary Returns the version of the server.
9673
8971
  * @param {RequestInit} [options] Override http request option.
9674
8972
  * @throws {RequiredError}
9675
8973
  */
9676
- versionV2(options) {
9677
- const localVarFetchArgs = ApiApiFetchParamCreator(configuration).versionV2(options);
8974
+ version(options) {
8975
+ const localVarFetchArgs = ApiApiFetchParamCreator(configuration).version(options);
9678
8976
  return (fetch2 = defaultFetch, basePath = BASE_PATH) => {
9679
- return fetch2(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
8977
+ return fetch2(
8978
+ basePath + localVarFetchArgs.url,
8979
+ localVarFetchArgs.options
8980
+ ).then((response) => {
9680
8981
  const contentType = response.headers.get("Content-Type");
9681
8982
  const mimeType = contentType ? contentType.replace(/;.*/, "") : void 0;
9682
8983
  if (response.status === 200) {
@@ -9693,488 +8994,415 @@ var ApiApiFp = function(configuration) {
9693
8994
  };
9694
8995
  var ApiApi = class extends BaseAPI {
9695
8996
  /**
9696
- * @summary Add V1
9697
- * @param {string} collectionId
9698
- * @param {Api.AddV1V1Request} request
9699
- * @param {RequestInit} [options] Override http request option.
9700
- * @throws {RequiredError}
9701
- */
9702
- addV1V1(collectionId, request, options) {
9703
- return ApiApiFp(this.configuration).addV1V1(collectionId, request, options)(this.fetch, this.basePath);
9704
- }
9705
- /**
9706
- * @summary Add
9707
- * @param {string} tenant
9708
- * @param {string} databaseName
9709
- * @param {string} collectionId
9710
- * @param {Api.AddV2Request} request
9711
- * @param {RequestInit} [options] Override http request option.
9712
- * @throws {RequiredError}
9713
- */
9714
- addV2(tenant, databaseName, collectionId, request, options) {
9715
- return ApiApiFp(this.configuration).addV2(tenant, databaseName, collectionId, request, options)(this.fetch, this.basePath);
9716
- }
9717
- /**
9718
- * @summary Count Collections V1
9719
- * @param {string} [tenant]
9720
- * @param {string} [database]
9721
- * @param {RequestInit} [options] Override http request option.
9722
- * @throws {RequiredError}
9723
- */
9724
- countCollectionsV1V1(tenant, database, options) {
9725
- return ApiApiFp(this.configuration).countCollectionsV1V1(tenant, database, options)(this.fetch, this.basePath);
9726
- }
9727
- /**
9728
- * @summary Count Collections
9729
- * @param {string} tenant
9730
- * @param {string} databaseName
9731
- * @param {RequestInit} [options] Override http request option.
9732
- * @throws {RequiredError}
9733
- */
9734
- countCollectionsV2(tenant, databaseName, options) {
9735
- return ApiApiFp(this.configuration).countCollectionsV2(tenant, databaseName, options)(this.fetch, this.basePath);
9736
- }
9737
- /**
9738
- * @summary Count V1
9739
- * @param {string} collectionId
9740
- * @param {RequestInit} [options] Override http request option.
9741
- * @throws {RequiredError}
9742
- */
9743
- countV1V1(collectionId, options) {
9744
- return ApiApiFp(this.configuration).countV1V1(collectionId, options)(this.fetch, this.basePath);
9745
- }
9746
- /**
9747
- * @summary Count
8997
+ * @summary Adds records to a collection.
9748
8998
  * @param {string} tenant
9749
- * @param {string} databaseName
8999
+ * @param {string} database
9750
9000
  * @param {string} collectionId
9001
+ * @param {Api.AddCollectionRecordsPayload} request
9751
9002
  * @param {RequestInit} [options] Override http request option.
9752
9003
  * @throws {RequiredError}
9753
9004
  */
9754
- countV2(tenant, databaseName, collectionId, options) {
9755
- return ApiApiFp(this.configuration).countV2(tenant, databaseName, collectionId, options)(this.fetch, this.basePath);
9756
- }
9757
- /**
9758
- * @summary Create Collection V1
9759
- * @param {string} [tenant]
9760
- * @param {string} [database]
9761
- * @param {Api.CreateCollectionV1V1Request} request
9762
- * @param {RequestInit} [options] Override http request option.
9763
- * @throws {RequiredError}
9764
- */
9765
- createCollectionV1V1(tenant, database, request, options) {
9766
- return ApiApiFp(this.configuration).createCollectionV1V1(tenant, database, request, options)(this.fetch, this.basePath);
9767
- }
9768
- /**
9769
- * @summary Create Collection
9770
- * @param {string} tenant
9771
- * @param {string} databaseName
9772
- * @param {Api.CreateCollectionV2Request} request
9773
- * @param {RequestInit} [options] Override http request option.
9774
- * @throws {RequiredError}
9775
- */
9776
- createCollectionV2(tenant, databaseName, request, options) {
9777
- return ApiApiFp(this.configuration).createCollectionV2(tenant, databaseName, request, options)(this.fetch, this.basePath);
9778
- }
9779
- /**
9780
- * @summary Create Database V1
9781
- * @param {string} [tenant]
9782
- * @param {Api.CreateDatabaseV1V1Request} request
9783
- * @param {RequestInit} [options] Override http request option.
9784
- * @throws {RequiredError}
9785
- */
9786
- createDatabaseV1V1(tenant, request, options) {
9787
- return ApiApiFp(this.configuration).createDatabaseV1V1(tenant, request, options)(this.fetch, this.basePath);
9788
- }
9789
- /**
9790
- * @summary Create Database
9791
- * @param {string} tenant
9792
- * @param {Api.CreateDatabaseV2Request} request
9793
- * @param {RequestInit} [options] Override http request option.
9794
- * @throws {RequiredError}
9795
- */
9796
- createDatabaseV2(tenant, request, options) {
9797
- return ApiApiFp(this.configuration).createDatabaseV2(tenant, request, options)(this.fetch, this.basePath);
9798
- }
9799
- /**
9800
- * @summary Create Tenant V1
9801
- * @param {Api.CreateTenantV1V1Request} request
9802
- * @param {RequestInit} [options] Override http request option.
9803
- * @throws {RequiredError}
9804
- */
9805
- createTenantV1V1(request, options) {
9806
- return ApiApiFp(this.configuration).createTenantV1V1(request, options)(this.fetch, this.basePath);
9807
- }
9808
- /**
9809
- * @summary Create Tenant
9810
- * @param {Api.CreateTenantV2Request} request
9811
- * @param {RequestInit} [options] Override http request option.
9812
- * @throws {RequiredError}
9813
- */
9814
- createTenantV2(request, options) {
9815
- return ApiApiFp(this.configuration).createTenantV2(request, options)(this.fetch, this.basePath);
9816
- }
9817
- /**
9818
- * @summary Delete Collection V1
9819
- * @param {string} collectionName
9820
- * @param {string} [tenant]
9821
- * @param {string} [database]
9822
- * @param {RequestInit} [options] Override http request option.
9823
- * @throws {RequiredError}
9824
- */
9825
- deleteCollectionV1V1(collectionName, tenant, database, options) {
9826
- return ApiApiFp(this.configuration).deleteCollectionV1V1(collectionName, tenant, database, options)(this.fetch, this.basePath);
9827
- }
9828
- /**
9829
- * @summary Delete Collection
9830
- * @param {string} collectionName
9831
- * @param {string} tenant
9832
- * @param {string} databaseName
9833
- * @param {RequestInit} [options] Override http request option.
9834
- * @throws {RequiredError}
9835
- */
9836
- deleteCollectionV2(collectionName, tenant, databaseName, options) {
9837
- return ApiApiFp(this.configuration).deleteCollectionV2(collectionName, tenant, databaseName, options)(this.fetch, this.basePath);
9005
+ collectionAdd(tenant, database, collectionId, request, options) {
9006
+ return ApiApiFp(this.configuration).collectionAdd(
9007
+ tenant,
9008
+ database,
9009
+ collectionId,
9010
+ request,
9011
+ options
9012
+ )(this.fetch, this.basePath);
9838
9013
  }
9839
9014
  /**
9840
- * @summary Delete Database
9841
- * @param {string} databaseName
9842
- * @param {string} tenant
9015
+ * @summary Retrieves the number of records in a collection.
9016
+ * @param {string} tenant <p>Tenant ID for the collection</p>
9017
+ * @param {string} database <p>Database containing this collection</p>
9018
+ * @param {string} collectionId <p>Collection ID whose records are counted</p>
9843
9019
  * @param {RequestInit} [options] Override http request option.
9844
9020
  * @throws {RequiredError}
9845
9021
  */
9846
- deleteDatabaseV2(databaseName, tenant, options) {
9847
- return ApiApiFp(this.configuration).deleteDatabaseV2(databaseName, tenant, options)(this.fetch, this.basePath);
9022
+ collectionCount(tenant, database, collectionId, options) {
9023
+ return ApiApiFp(this.configuration).collectionCount(
9024
+ tenant,
9025
+ database,
9026
+ collectionId,
9027
+ options
9028
+ )(this.fetch, this.basePath);
9848
9029
  }
9849
9030
  /**
9850
- * @summary Delete V1
9851
- * @param {string} collectionId
9852
- * @param {Api.DeleteV1V1Request} request
9031
+ * @summary Deletes records in a collection. Can filter by IDs or metadata.
9032
+ * @param {string} tenant <p>Tenant ID</p>
9033
+ * @param {string} database <p>Database name</p>
9034
+ * @param {string} collectionId <p>Collection ID</p>
9035
+ * @param {Api.DeleteCollectionRecordsPayload} request
9853
9036
  * @param {RequestInit} [options] Override http request option.
9854
9037
  * @throws {RequiredError}
9855
9038
  */
9856
- deleteV1V1(collectionId, request, options) {
9857
- return ApiApiFp(this.configuration).deleteV1V1(collectionId, request, options)(this.fetch, this.basePath);
9039
+ collectionDelete(tenant, database, collectionId, request, options) {
9040
+ return ApiApiFp(this.configuration).collectionDelete(
9041
+ tenant,
9042
+ database,
9043
+ collectionId,
9044
+ request,
9045
+ options
9046
+ )(this.fetch, this.basePath);
9858
9047
  }
9859
9048
  /**
9860
- * @summary Delete
9861
- * @param {string} collectionId
9862
- * @param {string} tenant
9863
- * @param {string} databaseName
9864
- * @param {Api.DeleteV2Request} request
9049
+ * @summary Retrieves records from a collection by ID or metadata filter.
9050
+ * @param {string} tenant <p>Tenant ID</p>
9051
+ * @param {string} database <p>Database name for the collection</p>
9052
+ * @param {string} collectionId <p>Collection ID to fetch records from</p>
9053
+ * @param {Api.GetRequestPayload} request
9865
9054
  * @param {RequestInit} [options] Override http request option.
9866
9055
  * @throws {RequiredError}
9867
9056
  */
9868
- deleteV2(collectionId, tenant, databaseName, request, options) {
9869
- return ApiApiFp(this.configuration).deleteV2(collectionId, tenant, databaseName, request, options)(this.fetch, this.basePath);
9057
+ collectionGet(tenant, database, collectionId, request, options) {
9058
+ return ApiApiFp(this.configuration).collectionGet(
9059
+ tenant,
9060
+ database,
9061
+ collectionId,
9062
+ request,
9063
+ options
9064
+ )(this.fetch, this.basePath);
9870
9065
  }
9871
9066
  /**
9872
- * @summary Get Collection V1
9873
- * @param {string} collectionName
9874
- * @param {string} [tenant]
9875
- * @param {string} [database]
9067
+ * @summary Query a collection in a variety of ways, including vector search, metadata filtering, and full-text search
9068
+ * @param {string} tenant <p>Tenant ID</p>
9069
+ * @param {string} database <p>Database name containing the collection</p>
9070
+ * @param {string} collectionId <p>Collection ID to query</p>
9071
+ * @param {number} [limit] <p>Limit for pagination</p>
9072
+ * @param {number} [offset] <p>Offset for pagination</p>
9073
+ * @param {Api.QueryRequestPayload} request
9876
9074
  * @param {RequestInit} [options] Override http request option.
9877
9075
  * @throws {RequiredError}
9878
9076
  */
9879
- getCollectionV1V1(collectionName, tenant, database, options) {
9880
- return ApiApiFp(this.configuration).getCollectionV1V1(collectionName, tenant, database, options)(this.fetch, this.basePath);
9077
+ collectionQuery(tenant, database, collectionId, limit, offset, request, options) {
9078
+ return ApiApiFp(this.configuration).collectionQuery(
9079
+ tenant,
9080
+ database,
9081
+ collectionId,
9082
+ limit,
9083
+ offset,
9084
+ request,
9085
+ options
9086
+ )(this.fetch, this.basePath);
9881
9087
  }
9882
9088
  /**
9883
- * @summary Get Collection
9089
+ * @summary Updates records in a collection by ID.
9884
9090
  * @param {string} tenant
9885
- * @param {string} databaseName
9886
- * @param {string} collectionName
9887
- * @param {RequestInit} [options] Override http request option.
9888
- * @throws {RequiredError}
9889
- */
9890
- getCollectionV2(tenant, databaseName, collectionName, options) {
9891
- return ApiApiFp(this.configuration).getCollectionV2(tenant, databaseName, collectionName, options)(this.fetch, this.basePath);
9892
- }
9893
- /**
9894
- * @summary Get Database V1
9895
9091
  * @param {string} database
9896
- * @param {string} [tenant]
9897
- * @param {RequestInit} [options] Override http request option.
9898
- * @throws {RequiredError}
9899
- */
9900
- getDatabaseV1V1(database, tenant, options) {
9901
- return ApiApiFp(this.configuration).getDatabaseV1V1(database, tenant, options)(this.fetch, this.basePath);
9902
- }
9903
- /**
9904
- * @summary Get Database
9905
- * @param {string} databaseName
9906
- * @param {string} tenant
9907
- * @param {RequestInit} [options] Override http request option.
9908
- * @throws {RequiredError}
9909
- */
9910
- getDatabaseV2(databaseName, tenant, options) {
9911
- return ApiApiFp(this.configuration).getDatabaseV2(databaseName, tenant, options)(this.fetch, this.basePath);
9912
- }
9913
- /**
9914
- * @summary Get Nearest Neighbors V1
9915
- * @param {string} collectionId
9916
- * @param {Api.GetNearestNeighborsV1V1Request} request
9917
- * @param {RequestInit} [options] Override http request option.
9918
- * @throws {RequiredError}
9919
- */
9920
- getNearestNeighborsV1V1(collectionId, request, options) {
9921
- return ApiApiFp(this.configuration).getNearestNeighborsV1V1(collectionId, request, options)(this.fetch, this.basePath);
9922
- }
9923
- /**
9924
- * @summary Get Nearest Neighbors
9925
- * @param {string} tenant
9926
- * @param {string} databaseName
9927
- * @param {string} collectionId
9928
- * @param {Api.GetNearestNeighborsV2Request} request
9929
- * @param {RequestInit} [options] Override http request option.
9930
- * @throws {RequiredError}
9931
- */
9932
- getNearestNeighborsV2(tenant, databaseName, collectionId, request, options) {
9933
- return ApiApiFp(this.configuration).getNearestNeighborsV2(tenant, databaseName, collectionId, request, options)(this.fetch, this.basePath);
9934
- }
9935
- /**
9936
- * @summary Get Tenant V1
9937
- * @param {string} tenant
9938
- * @param {RequestInit} [options] Override http request option.
9939
- * @throws {RequiredError}
9940
- */
9941
- getTenantV1V1(tenant, options) {
9942
- return ApiApiFp(this.configuration).getTenantV1V1(tenant, options)(this.fetch, this.basePath);
9943
- }
9944
- /**
9945
- * @summary Get Tenant
9946
- * @param {string} tenant
9947
- * @param {RequestInit} [options] Override http request option.
9948
- * @throws {RequiredError}
9949
- */
9950
- getTenantV2(tenant, options) {
9951
- return ApiApiFp(this.configuration).getTenantV2(tenant, options)(this.fetch, this.basePath);
9952
- }
9953
- /**
9954
- * @summary Get User Identity
9955
- * @param {RequestInit} [options] Override http request option.
9956
- * @throws {RequiredError}
9957
- */
9958
- getUserIdentityV2(options) {
9959
- return ApiApiFp(this.configuration).getUserIdentityV2(options)(this.fetch, this.basePath);
9960
- }
9961
- /**
9962
- * @summary Get V1
9963
9092
  * @param {string} collectionId
9964
- * @param {Api.GetV1V1Request} request
9093
+ * @param {Api.UpdateCollectionRecordsPayload} request
9965
9094
  * @param {RequestInit} [options] Override http request option.
9966
9095
  * @throws {RequiredError}
9967
9096
  */
9968
- getV1V1(collectionId, request, options) {
9969
- return ApiApiFp(this.configuration).getV1V1(collectionId, request, options)(this.fetch, this.basePath);
9970
- }
9971
- /**
9972
- * @summary Get
9973
- * @param {string} collectionId
9974
- * @param {string} tenant
9975
- * @param {string} databaseName
9976
- * @param {Api.GetV2Request} request
9977
- * @param {RequestInit} [options] Override http request option.
9978
- * @throws {RequiredError}
9979
- */
9980
- getV2(collectionId, tenant, databaseName, request, options) {
9981
- return ApiApiFp(this.configuration).getV2(collectionId, tenant, databaseName, request, options)(this.fetch, this.basePath);
9097
+ collectionUpdate(tenant, database, collectionId, request, options) {
9098
+ return ApiApiFp(this.configuration).collectionUpdate(
9099
+ tenant,
9100
+ database,
9101
+ collectionId,
9102
+ request,
9103
+ options
9104
+ )(this.fetch, this.basePath);
9982
9105
  }
9983
9106
  /**
9984
- * @summary Heartbeat
9107
+ * @summary Upserts records in a collection (create if not exists, otherwise update).
9108
+ * @param {string} tenant <p>Tenant ID</p>
9109
+ * @param {string} database <p>Database name</p>
9110
+ * @param {string} collectionId <p>Collection ID</p>
9111
+ * @param {Api.UpsertCollectionRecordsPayload} request
9985
9112
  * @param {RequestInit} [options] Override http request option.
9986
9113
  * @throws {RequiredError}
9987
9114
  */
9988
- heartbeatV1(options) {
9989
- return ApiApiFp(this.configuration).heartbeatV1(options)(this.fetch, this.basePath);
9115
+ collectionUpsert(tenant, database, collectionId, request, options) {
9116
+ return ApiApiFp(this.configuration).collectionUpsert(
9117
+ tenant,
9118
+ database,
9119
+ collectionId,
9120
+ request,
9121
+ options
9122
+ )(this.fetch, this.basePath);
9990
9123
  }
9991
9124
  /**
9992
- * @summary Heartbeat
9125
+ * @summary Retrieves the total number of collections in a given database.
9126
+ * @param {string} tenant <p>Tenant ID</p>
9127
+ * @param {string} database <p>Database name to count collections from</p>
9993
9128
  * @param {RequestInit} [options] Override http request option.
9994
9129
  * @throws {RequiredError}
9995
9130
  */
9996
- heartbeatV2(options) {
9997
- return ApiApiFp(this.configuration).heartbeatV2(options)(this.fetch, this.basePath);
9131
+ countCollections(tenant, database, options) {
9132
+ return ApiApiFp(this.configuration).countCollections(
9133
+ tenant,
9134
+ database,
9135
+ options
9136
+ )(this.fetch, this.basePath);
9998
9137
  }
9999
9138
  /**
10000
- * @summary List Collections V1
10001
- * @param {number | null} [limit]
10002
- * @param {number | null} [offset]
10003
- * @param {string} [tenant]
10004
- * @param {string} [database]
9139
+ * @summary Creates a new collection under the specified database.
9140
+ * @param {string} tenant <p>Tenant ID</p>
9141
+ * @param {string} database <p>Database name containing the new collection</p>
9142
+ * @param {Api.CreateCollectionPayload} request
10005
9143
  * @param {RequestInit} [options] Override http request option.
10006
9144
  * @throws {RequiredError}
10007
9145
  */
10008
- listCollectionsV1V1(limit, offset, tenant, database, options) {
10009
- return ApiApiFp(this.configuration).listCollectionsV1V1(limit, offset, tenant, database, options)(this.fetch, this.basePath);
9146
+ createCollection(tenant, database, request, options) {
9147
+ return ApiApiFp(this.configuration).createCollection(
9148
+ tenant,
9149
+ database,
9150
+ request,
9151
+ options
9152
+ )(this.fetch, this.basePath);
10010
9153
  }
10011
9154
  /**
10012
- * @summary List Collections
10013
- * @param {string} tenant
10014
- * @param {string} databaseName
10015
- * @param {number | null} [limit]
10016
- * @param {number | null} [offset]
9155
+ * @summary Creates a new database for a given tenant.
9156
+ * @param {string} tenant <p>Tenant ID to associate with the new database</p>
9157
+ * @param {Api.CreateDatabasePayload} request
10017
9158
  * @param {RequestInit} [options] Override http request option.
10018
9159
  * @throws {RequiredError}
10019
9160
  */
10020
- listCollectionsV2(tenant, databaseName, limit, offset, options) {
10021
- return ApiApiFp(this.configuration).listCollectionsV2(tenant, databaseName, limit, offset, options)(this.fetch, this.basePath);
9161
+ createDatabase(tenant, request, options) {
9162
+ return ApiApiFp(this.configuration).createDatabase(
9163
+ tenant,
9164
+ request,
9165
+ options
9166
+ )(this.fetch, this.basePath);
10022
9167
  }
10023
9168
  /**
10024
- * @summary List Databases
10025
- * @param {string} tenant
10026
- * @param {number | null} [limit]
10027
- * @param {number | null} [offset]
9169
+ * @summary Creates a new tenant.
9170
+ * @param {Api.CreateTenantPayload} request
10028
9171
  * @param {RequestInit} [options] Override http request option.
10029
9172
  * @throws {RequiredError}
10030
9173
  */
10031
- listDatabasesV2(tenant, limit, offset, options) {
10032
- return ApiApiFp(this.configuration).listDatabasesV2(tenant, limit, offset, options)(this.fetch, this.basePath);
9174
+ createTenant(request, options) {
9175
+ return ApiApiFp(this.configuration).createTenant(request, options)(
9176
+ this.fetch,
9177
+ this.basePath
9178
+ );
10033
9179
  }
10034
9180
  /**
10035
- * @summary Pre Flight Checks
9181
+ * @summary Deletes a collection in a given database.
9182
+ * @param {string} tenant <p>Tenant ID</p>
9183
+ * @param {string} database <p>Database name</p>
9184
+ * @param {string} collectionId <p>UUID of the collection to delete</p>
10036
9185
  * @param {RequestInit} [options] Override http request option.
10037
9186
  * @throws {RequiredError}
10038
9187
  */
10039
- preFlightChecksV1(options) {
10040
- return ApiApiFp(this.configuration).preFlightChecksV1(options)(this.fetch, this.basePath);
9188
+ deleteCollection(tenant, database, collectionId, options) {
9189
+ return ApiApiFp(this.configuration).deleteCollection(
9190
+ tenant,
9191
+ database,
9192
+ collectionId,
9193
+ options
9194
+ )(this.fetch, this.basePath);
10041
9195
  }
10042
9196
  /**
10043
- * @summary Pre Flight Checks
9197
+ * @summary Deletes a specific database.
9198
+ * @param {string} tenant <p>Tenant ID</p>
9199
+ * @param {string} database <p>Name of the database to delete</p>
10044
9200
  * @param {RequestInit} [options] Override http request option.
10045
9201
  * @throws {RequiredError}
10046
9202
  */
10047
- preFlightChecksV2(options) {
10048
- return ApiApiFp(this.configuration).preFlightChecksV2(options)(this.fetch, this.basePath);
9203
+ deleteDatabase(tenant, database, options) {
9204
+ return ApiApiFp(this.configuration).deleteDatabase(
9205
+ tenant,
9206
+ database,
9207
+ options
9208
+ )(this.fetch, this.basePath);
10049
9209
  }
10050
9210
  /**
10051
- * @summary Reset
9211
+ * @summary Retrieves a collection by ID or name.
9212
+ * @param {string} tenant <p>Tenant ID</p>
9213
+ * @param {string} database <p>Database name</p>
9214
+ * @param {string} collectionId <p>UUID of the collection</p>
10052
9215
  * @param {RequestInit} [options] Override http request option.
10053
9216
  * @throws {RequiredError}
10054
9217
  */
10055
- resetV1(options) {
10056
- return ApiApiFp(this.configuration).resetV1(options)(this.fetch, this.basePath);
9218
+ getCollection(tenant, database, collectionId, options) {
9219
+ return ApiApiFp(this.configuration).getCollection(
9220
+ tenant,
9221
+ database,
9222
+ collectionId,
9223
+ options
9224
+ )(this.fetch, this.basePath);
10057
9225
  }
10058
9226
  /**
10059
- * @summary Reset
9227
+ * @summary Retrieves a specific database by name.
9228
+ * @param {string} tenant <p>Tenant ID</p>
9229
+ * @param {string} database <p>Name of the database to retrieve</p>
10060
9230
  * @param {RequestInit} [options] Override http request option.
10061
9231
  * @throws {RequiredError}
10062
9232
  */
10063
- resetV2(options) {
10064
- return ApiApiFp(this.configuration).resetV2(options)(this.fetch, this.basePath);
9233
+ getDatabase(tenant, database, options) {
9234
+ return ApiApiFp(this.configuration).getDatabase(
9235
+ tenant,
9236
+ database,
9237
+ options
9238
+ )(this.fetch, this.basePath);
10065
9239
  }
10066
9240
  /**
10067
- * @summary Root
9241
+ * @summary Returns an existing tenant by name.
9242
+ * @param {string} tenantName <p>Tenant name or ID to retrieve</p>
10068
9243
  * @param {RequestInit} [options] Override http request option.
10069
9244
  * @throws {RequiredError}
10070
9245
  */
10071
- rootV1(options) {
10072
- return ApiApiFp(this.configuration).rootV1(options)(this.fetch, this.basePath);
9246
+ getTenant(tenantName, options) {
9247
+ return ApiApiFp(this.configuration).getTenant(tenantName, options)(
9248
+ this.fetch,
9249
+ this.basePath
9250
+ );
10073
9251
  }
10074
9252
  /**
10075
- * @summary Root
9253
+ * @summary Retrieves the current user's identity, tenant, and databases.
10076
9254
  * @param {RequestInit} [options] Override http request option.
10077
9255
  * @throws {RequiredError}
10078
9256
  */
10079
- rootV2(options) {
10080
- return ApiApiFp(this.configuration).rootV2(options)(this.fetch, this.basePath);
9257
+ getUserIdentity(options) {
9258
+ return ApiApiFp(this.configuration).getUserIdentity(options)(
9259
+ this.fetch,
9260
+ this.basePath
9261
+ );
10081
9262
  }
10082
9263
  /**
10083
- * @summary Update Collection V1
10084
- * @param {string} collectionId
10085
- * @param {Api.UpdateCollectionV1V1Request} request
9264
+ * @summary Health check endpoint that returns 200 if the server and executor are ready
10086
9265
  * @param {RequestInit} [options] Override http request option.
10087
9266
  * @throws {RequiredError}
10088
9267
  */
10089
- updateCollectionV1V1(collectionId, request, options) {
10090
- return ApiApiFp(this.configuration).updateCollectionV1V1(collectionId, request, options)(this.fetch, this.basePath);
9268
+ healthcheck(options) {
9269
+ return ApiApiFp(this.configuration).healthcheck(options)(
9270
+ this.fetch,
9271
+ this.basePath
9272
+ );
10091
9273
  }
10092
9274
  /**
10093
- * @summary Update Collection
10094
- * @param {string} tenant
10095
- * @param {string} databaseName
10096
- * @param {string} collectionId
10097
- * @param {Api.UpdateCollectionV2Request} request
9275
+ * @summary Heartbeat endpoint that returns a nanosecond timestamp of the current time.
10098
9276
  * @param {RequestInit} [options] Override http request option.
10099
9277
  * @throws {RequiredError}
10100
9278
  */
10101
- updateCollectionV2(tenant, databaseName, collectionId, request, options) {
10102
- return ApiApiFp(this.configuration).updateCollectionV2(tenant, databaseName, collectionId, request, options)(this.fetch, this.basePath);
9279
+ heartbeat(options) {
9280
+ return ApiApiFp(this.configuration).heartbeat(options)(
9281
+ this.fetch,
9282
+ this.basePath
9283
+ );
10103
9284
  }
10104
9285
  /**
10105
- * @summary Update V1
10106
- * @param {string} collectionId
10107
- * @param {Api.UpdateV1V1Request} request
9286
+ * @summary Lists all collections in the specified database.
9287
+ * @param {string} tenant <p>Tenant ID</p>
9288
+ * @param {string} database <p>Database name to list collections from</p>
9289
+ * @param {number} [limit] <p>Limit for pagination</p>
9290
+ * @param {number} [offset] <p>Offset for pagination</p>
10108
9291
  * @param {RequestInit} [options] Override http request option.
10109
9292
  * @throws {RequiredError}
10110
9293
  */
10111
- updateV1V1(collectionId, request, options) {
10112
- return ApiApiFp(this.configuration).updateV1V1(collectionId, request, options)(this.fetch, this.basePath);
9294
+ listCollections(tenant, database, limit, offset, options) {
9295
+ return ApiApiFp(this.configuration).listCollections(
9296
+ tenant,
9297
+ database,
9298
+ limit,
9299
+ offset,
9300
+ options
9301
+ )(this.fetch, this.basePath);
10113
9302
  }
10114
9303
  /**
10115
- * @summary Update
10116
- * @param {string} tenant
10117
- * @param {string} databaseName
10118
- * @param {string} collectionId
10119
- * @param {Api.UpdateV2Request} request
9304
+ * @summary Lists all databases for a given tenant.
9305
+ * @param {string} tenant <p>Tenant ID to list databases for</p>
9306
+ * @param {number} [limit] <p>Limit for pagination</p>
9307
+ * @param {number} [offset] <p>Offset for pagination</p>
10120
9308
  * @param {RequestInit} [options] Override http request option.
10121
9309
  * @throws {RequiredError}
10122
9310
  */
10123
- updateV2(tenant, databaseName, collectionId, request, options) {
10124
- return ApiApiFp(this.configuration).updateV2(tenant, databaseName, collectionId, request, options)(this.fetch, this.basePath);
9311
+ listDatabases(tenant, limit, offset, options) {
9312
+ return ApiApiFp(this.configuration).listDatabases(
9313
+ tenant,
9314
+ limit,
9315
+ offset,
9316
+ options
9317
+ )(this.fetch, this.basePath);
10125
9318
  }
10126
9319
  /**
10127
- * @summary Upsert V1
10128
- * @param {string} collectionId
10129
- * @param {Api.UpsertV1V1Request} request
9320
+ * @summary Pre-flight checks endpoint reporting basic readiness info.
10130
9321
  * @param {RequestInit} [options] Override http request option.
10131
9322
  * @throws {RequiredError}
10132
9323
  */
10133
- upsertV1V1(collectionId, request, options) {
10134
- return ApiApiFp(this.configuration).upsertV1V1(collectionId, request, options)(this.fetch, this.basePath);
9324
+ preFlightChecks(options) {
9325
+ return ApiApiFp(this.configuration).preFlightChecks(options)(
9326
+ this.fetch,
9327
+ this.basePath
9328
+ );
10135
9329
  }
10136
9330
  /**
10137
- * @summary Upsert
10138
- * @param {string} tenant
10139
- * @param {string} databaseName
10140
- * @param {string} collectionId
10141
- * @param {Api.UpsertV2Request} request
9331
+ * @summary Reset endpoint allowing authorized users to reset the database.
10142
9332
  * @param {RequestInit} [options] Override http request option.
10143
9333
  * @throws {RequiredError}
10144
9334
  */
10145
- upsertV2(tenant, databaseName, collectionId, request, options) {
10146
- return ApiApiFp(this.configuration).upsertV2(tenant, databaseName, collectionId, request, options)(this.fetch, this.basePath);
9335
+ reset(options) {
9336
+ return ApiApiFp(this.configuration).reset(options)(
9337
+ this.fetch,
9338
+ this.basePath
9339
+ );
10147
9340
  }
10148
9341
  /**
10149
- * @summary Version
9342
+ * @summary Updates an existing collection's name or metadata.
9343
+ * @param {string} tenant <p>Tenant ID</p>
9344
+ * @param {string} database <p>Database name</p>
9345
+ * @param {string} collectionId <p>UUID of the collection to update</p>
9346
+ * @param {Api.UpdateCollectionPayload} request
10150
9347
  * @param {RequestInit} [options] Override http request option.
10151
9348
  * @throws {RequiredError}
10152
9349
  */
10153
- versionV1(options) {
10154
- return ApiApiFp(this.configuration).versionV1(options)(this.fetch, this.basePath);
9350
+ updateCollection(tenant, database, collectionId, request, options) {
9351
+ return ApiApiFp(this.configuration).updateCollection(
9352
+ tenant,
9353
+ database,
9354
+ collectionId,
9355
+ request,
9356
+ options
9357
+ )(this.fetch, this.basePath);
10155
9358
  }
10156
9359
  /**
10157
- * @summary Version
9360
+ * @summary Returns the version of the server.
10158
9361
  * @param {RequestInit} [options] Override http request option.
10159
9362
  * @throws {RequiredError}
10160
9363
  */
10161
- versionV2(options) {
10162
- return ApiApiFp(this.configuration).versionV2(options)(this.fetch, this.basePath);
9364
+ version(options) {
9365
+ return ApiApiFp(this.configuration).version(options)(
9366
+ this.fetch,
9367
+ this.basePath
9368
+ );
10163
9369
  }
10164
9370
  };
10165
9371
 
10166
9372
  // ../chromadb-core/src/generated/models.ts
10167
9373
  var Api;
10168
9374
  ((Api2) => {
10169
- let IncludeEnum2;
10170
- ((IncludeEnum3) => {
10171
- IncludeEnum3["Documents"] = "documents";
10172
- IncludeEnum3["Embeddings"] = "embeddings";
10173
- IncludeEnum3["Metadatas"] = "metadatas";
10174
- IncludeEnum3["Distances"] = "distances";
10175
- IncludeEnum3["Uris"] = "uris";
10176
- IncludeEnum3["Data"] = "data";
10177
- })(IncludeEnum2 = Api2.IncludeEnum || (Api2.IncludeEnum = {}));
9375
+ let EmbeddingFunctionConfiguration;
9376
+ ((EmbeddingFunctionConfiguration2) => {
9377
+ let ObjectValue;
9378
+ ((ObjectValue2) => {
9379
+ let TypeEnum;
9380
+ ((TypeEnum2) => {
9381
+ TypeEnum2["Legacy"] = "legacy";
9382
+ })(TypeEnum = ObjectValue2.TypeEnum || (ObjectValue2.TypeEnum = {}));
9383
+ })(ObjectValue = EmbeddingFunctionConfiguration2.ObjectValue || (EmbeddingFunctionConfiguration2.ObjectValue = {}));
9384
+ let AllofValue;
9385
+ ((AllofValue2) => {
9386
+ let TypeEnum;
9387
+ ((TypeEnum2) => {
9388
+ TypeEnum2["Known"] = "known";
9389
+ })(TypeEnum = AllofValue2.TypeEnum || (AllofValue2.TypeEnum = {}));
9390
+ })(AllofValue = EmbeddingFunctionConfiguration2.AllofValue || (EmbeddingFunctionConfiguration2.AllofValue = {}));
9391
+ })(EmbeddingFunctionConfiguration = Api2.EmbeddingFunctionConfiguration || (Api2.EmbeddingFunctionConfiguration = {}));
9392
+ let HnswSpace;
9393
+ ((HnswSpace2) => {
9394
+ HnswSpace2["L2"] = "l2";
9395
+ HnswSpace2["Cosine"] = "cosine";
9396
+ HnswSpace2["Ip"] = "ip";
9397
+ })(HnswSpace = Api2.HnswSpace || (Api2.HnswSpace = {}));
9398
+ let Include;
9399
+ ((Include2) => {
9400
+ Include2["Distances"] = "distances";
9401
+ Include2["Documents"] = "documents";
9402
+ Include2["Embeddings"] = "embeddings";
9403
+ Include2["Metadatas"] = "metadatas";
9404
+ Include2["Uris"] = "uris";
9405
+ })(Include = Api2.Include || (Api2.Include = {}));
10178
9406
  })(Api || (Api = {}));
10179
9407
 
10180
9408
  // ../chromadb-core/src/generated/configuration.ts
@@ -10310,7 +9538,7 @@ var Collection = class {
10310
9538
  */
10311
9539
  async add(params) {
10312
9540
  await this.client.init();
10313
- await this.client.api.addV2(
9541
+ await this.client.api.collectionAdd(
10314
9542
  this.client.tenant,
10315
9543
  this.client.database,
10316
9544
  this.id,
@@ -10343,7 +9571,7 @@ var Collection = class {
10343
9571
  */
10344
9572
  async upsert(params) {
10345
9573
  await this.client.init();
10346
- await this.client.api.upsertV2(
9574
+ await this.client.api.collectionUpsert(
10347
9575
  this.client.tenant,
10348
9576
  this.client.database,
10349
9577
  this.id,
@@ -10366,7 +9594,7 @@ var Collection = class {
10366
9594
  */
10367
9595
  async count() {
10368
9596
  await this.client.init();
10369
- return await this.client.api.countV2(
9597
+ return await this.client.api.collectionCount(
10370
9598
  this.client.tenant,
10371
9599
  this.client.database,
10372
9600
  this.id,
@@ -10392,7 +9620,7 @@ var Collection = class {
10392
9620
  * limit: 10,
10393
9621
  * offset: 0,
10394
9622
  * include: ["embeddings", "metadatas", "documents"],
10395
- * whereDocument: { $contains: "value" },
9623
+ * whereDocument: { "$contains": "value" },
10396
9624
  * });
10397
9625
  * ```
10398
9626
  */
@@ -10406,10 +9634,10 @@ var Collection = class {
10406
9634
  } = {}) {
10407
9635
  await this.client.init();
10408
9636
  const idsArray = ids ? toArray(ids) : void 0;
10409
- const resp = await this.client.api.getV2(
10410
- this.id,
9637
+ const resp = await this.client.api.collectionGet(
10411
9638
  this.client.tenant,
10412
9639
  this.client.database,
9640
+ this.id,
10413
9641
  {
10414
9642
  ids: idsArray,
10415
9643
  where,
@@ -10443,7 +9671,7 @@ var Collection = class {
10443
9671
  */
10444
9672
  async update(params) {
10445
9673
  await this.client.init();
10446
- await this.client.api.updateV2(
9674
+ await this.client.api.collectionUpdate(
10447
9675
  this.client.tenant,
10448
9676
  this.client.database,
10449
9677
  this.id,
@@ -10504,10 +9732,12 @@ var Collection = class {
10504
9732
  "You must provide either queryEmbeddings or queryTexts"
10505
9733
  );
10506
9734
  }
10507
- const resp = await this.client.api.getNearestNeighborsV2(
9735
+ const resp = await this.client.api.collectionQuery(
10508
9736
  this.client.tenant,
10509
9737
  this.client.database,
10510
9738
  this.id,
9739
+ nResults,
9740
+ void 0,
10511
9741
  {
10512
9742
  query_embeddings: embeddings,
10513
9743
  n_results: nResults,
@@ -10539,7 +9769,7 @@ var Collection = class {
10539
9769
  metadata
10540
9770
  }) {
10541
9771
  await this.client.init();
10542
- const resp = await this.client.api.updateCollectionV2(
9772
+ const resp = await this.client.api.updateCollection(
10543
9773
  this.client.tenant,
10544
9774
  this.client.database,
10545
9775
  this.id,
@@ -10573,10 +9803,10 @@ var Collection = class {
10573
9803
  */
10574
9804
  async peek({ limit = 10 } = {}) {
10575
9805
  await this.client.init();
10576
- return await this.client.api.getV2(
10577
- this.id,
9806
+ return await this.client.api.collectionGet(
10578
9807
  this.client.tenant,
10579
9808
  this.client.database,
9809
+ this.id,
10580
9810
  {
10581
9811
  limit
10582
9812
  },
@@ -10608,10 +9838,10 @@ var Collection = class {
10608
9838
  } = {}) {
10609
9839
  await this.client.init();
10610
9840
  const idsArray = ids ? toArray(ids) : void 0;
10611
- await this.client.api.deleteV2(
10612
- this.id,
9841
+ await this.client.api.collectionDelete(
10613
9842
  this.client.tenant,
10614
9843
  this.client.database,
9844
+ this.id,
10615
9845
  {
10616
9846
  ids: idsArray,
10617
9847
  where,
@@ -10977,7 +10207,7 @@ var AdminClient = class {
10977
10207
  * ```
10978
10208
  */
10979
10209
  async createTenant({ name }) {
10980
- await this.api.createTenantV2({ name }, this.api.options);
10210
+ await this.api.createTenant({ name }, this.api.options);
10981
10211
  return { name };
10982
10212
  }
10983
10213
  /**
@@ -10997,7 +10227,7 @@ var AdminClient = class {
10997
10227
  * ```
10998
10228
  */
10999
10229
  async getTenant({ name }) {
11000
- const getTenant = await this.api.getTenantV2(
10230
+ const getTenant = await this.api.getTenant(
11001
10231
  name,
11002
10232
  this.api.options
11003
10233
  );
@@ -11025,7 +10255,7 @@ var AdminClient = class {
11025
10255
  name,
11026
10256
  tenantName
11027
10257
  }) {
11028
- await this.api.createDatabaseV2(tenantName, { name }, this.api.options);
10258
+ await this.api.createDatabase(tenantName, { name }, this.api.options);
11029
10259
  return { name };
11030
10260
  }
11031
10261
  /**
@@ -11050,9 +10280,9 @@ var AdminClient = class {
11050
10280
  name,
11051
10281
  tenantName
11052
10282
  }) {
11053
- const result = await this.api.getDatabaseV2(
11054
- name,
10283
+ const result = await this.api.getDatabase(
11055
10284
  tenantName,
10285
+ name,
11056
10286
  this.api.options
11057
10287
  );
11058
10288
  return result;
@@ -11071,7 +10301,7 @@ var AdminClient = class {
11071
10301
  name,
11072
10302
  tenantName
11073
10303
  }) {
11074
- await this.api.deleteDatabaseV2(name, tenantName, this.api.options);
10304
+ await this.api.deleteDatabase(tenantName, name, this.api.options);
11075
10305
  return;
11076
10306
  }
11077
10307
  /**
@@ -11089,7 +10319,7 @@ var AdminClient = class {
11089
10319
  offset,
11090
10320
  tenantName
11091
10321
  }) {
11092
- const response = await this.api.listDatabasesV2(
10322
+ const response = await this.api.listDatabases(
11093
10323
  tenantName,
11094
10324
  limit,
11095
10325
  offset,
@@ -11926,7 +11156,7 @@ var ChromaClient = class {
11926
11156
  *
11927
11157
  */
11928
11158
  async getUserIdentity() {
11929
- const user_identity = await this.api.getUserIdentityV2(
11159
+ const user_identity = await this.api.getUserIdentity(
11930
11160
  this.api.options
11931
11161
  );
11932
11162
  const user_tenant = user_identity.tenant;
@@ -11952,7 +11182,7 @@ var ChromaClient = class {
11952
11182
  */
11953
11183
  async reset() {
11954
11184
  await this.init();
11955
- return await this.api.resetV2(this.api.options);
11185
+ return await this.api.reset(this.api.options);
11956
11186
  }
11957
11187
  /**
11958
11188
  * Returns the version of the Chroma API.
@@ -11965,7 +11195,7 @@ var ChromaClient = class {
11965
11195
  * ```
11966
11196
  */
11967
11197
  async version() {
11968
- return await this.api.versionV2(this.api.options);
11198
+ return await this.api.version(this.api.options);
11969
11199
  }
11970
11200
  /**
11971
11201
  * Returns a heartbeat from the Chroma API.
@@ -11978,7 +11208,7 @@ var ChromaClient = class {
11978
11208
  * ```
11979
11209
  */
11980
11210
  async heartbeat() {
11981
- const response = await this.api.heartbeatV2(this.api.options);
11211
+ const response = await this.api.heartbeat(this.api.options);
11982
11212
  return response["nanosecond heartbeat"];
11983
11213
  }
11984
11214
  /**
@@ -12009,7 +11239,7 @@ var ChromaClient = class {
12009
11239
  embeddingFunction = new DefaultEmbeddingFunction()
12010
11240
  }) {
12011
11241
  await this.init();
12012
- const newCollection = await this.api.createCollectionV2(
11242
+ const newCollection = await this.api.createCollection(
12013
11243
  this.tenant,
12014
11244
  this.database,
12015
11245
  {
@@ -12055,7 +11285,7 @@ var ChromaClient = class {
12055
11285
  embeddingFunction = new DefaultEmbeddingFunction()
12056
11286
  }) {
12057
11287
  await this.init();
12058
- const newCollection = await this.api.createCollectionV2(
11288
+ const newCollection = await this.api.createCollection(
12059
11289
  this.tenant,
12060
11290
  this.database,
12061
11291
  {
@@ -12093,7 +11323,7 @@ var ChromaClient = class {
12093
11323
  */
12094
11324
  async listCollections({ limit, offset } = {}) {
12095
11325
  await this.init();
12096
- const response = await this.api.listCollectionsV2(
11326
+ const response = await this.api.listCollections(
12097
11327
  this.tenant,
12098
11328
  this.database,
12099
11329
  limit,
@@ -12122,7 +11352,7 @@ var ChromaClient = class {
12122
11352
  offset
12123
11353
  } = {}) {
12124
11354
  await this.init();
12125
- const results = await this.api.listCollectionsV2(
11355
+ const results = await this.api.listCollections(
12126
11356
  this.tenant,
12127
11357
  this.database,
12128
11358
  limit,
@@ -12144,7 +11374,7 @@ var ChromaClient = class {
12144
11374
  */
12145
11375
  async countCollections() {
12146
11376
  await this.init();
12147
- const response = await this.api.countCollectionsV2(
11377
+ const response = await this.api.countCollections(
12148
11378
  this.tenant,
12149
11379
  this.database,
12150
11380
  this.api.options
@@ -12171,7 +11401,7 @@ var ChromaClient = class {
12171
11401
  embeddingFunction
12172
11402
  }) {
12173
11403
  await this.init();
12174
- const response = await this.api.getCollectionV2(
11404
+ const response = await this.api.getCollection(
12175
11405
  this.tenant,
12176
11406
  this.database,
12177
11407
  name,
@@ -12200,10 +11430,10 @@ var ChromaClient = class {
12200
11430
  */
12201
11431
  async deleteCollection({ name }) {
12202
11432
  await this.init();
12203
- await this.api.deleteCollectionV2(
12204
- name,
11433
+ await this.api.deleteCollection(
12205
11434
  this.tenant,
12206
11435
  this.database,
11436
+ name,
12207
11437
  this.api.options
12208
11438
  );
12209
11439
  }
@@ -12280,19 +11510,31 @@ var CohereAISDK7 = class {
12280
11510
  }
12281
11511
  async createEmbedding(params) {
12282
11512
  await this.loadClient();
12283
- return await this.cohereClient.embed({ texts: params.input, model: params.model }).then((response) => {
12284
- return response.embeddings;
12285
- });
11513
+ if (params.isImage) {
11514
+ return await this.cohereClient.embed({ images: params.input, model: params.model }).then((response) => {
11515
+ return response.embeddings;
11516
+ });
11517
+ } else {
11518
+ return await this.cohereClient.embed({ texts: params.input, model: params.model }).then((response) => {
11519
+ return response.embeddings;
11520
+ });
11521
+ }
12286
11522
  }
12287
11523
  };
12288
11524
  var CohereEmbeddingFunction = class _CohereEmbeddingFunction {
12289
11525
  constructor({
12290
11526
  cohere_api_key,
12291
11527
  model = "large",
12292
- cohere_api_key_env_var = "CHROMA_COHERE_API_KEY"
11528
+ cohere_api_key_env_var = "CHROMA_COHERE_API_KEY",
11529
+ /**
11530
+ * If true, the input texts passed to `generate` are expected to be
11531
+ * base64 encoded PNG data URIs.
11532
+ */
11533
+ isImage = false
12293
11534
  }) {
12294
11535
  this.name = "cohere";
12295
11536
  this.model = model;
11537
+ this.isImage = isImage;
12296
11538
  const apiKey = cohere_api_key ?? process.env[cohere_api_key_env_var];
12297
11539
  if (!apiKey) {
12298
11540
  throw new Error(
@@ -12326,7 +11568,8 @@ var CohereEmbeddingFunction = class _CohereEmbeddingFunction {
12326
11568
  await this.initCohereClient();
12327
11569
  return await this.cohereAiApi.createEmbedding({
12328
11570
  model: this.model,
12329
- input: texts
11571
+ input: texts,
11572
+ isImage: this.isImage
12330
11573
  });
12331
11574
  }
12332
11575
  buildFromConfig(config) {
@@ -12976,6 +12219,7 @@ var IncludeEnum = /* @__PURE__ */ ((IncludeEnum2) => {
12976
12219
  IncludeEnum2["Embeddings"] = "embeddings";
12977
12220
  IncludeEnum2["Metadatas"] = "metadatas";
12978
12221
  IncludeEnum2["Distances"] = "distances";
12222
+ IncludeEnum2["Uris"] = "uris";
12979
12223
  return IncludeEnum2;
12980
12224
  })(IncludeEnum || {});
12981
12225
  export {