@usecortex_ai/node 0.4.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/Client.d.ts +0 -2
  2. package/dist/Client.js +0 -2
  3. package/dist/api/index.d.ts +1 -1
  4. package/dist/api/index.js +1 -1
  5. package/dist/api/resources/dashboard/client/Client.d.ts +2 -16
  6. package/dist/api/resources/dashboard/client/Client.js +2 -16
  7. package/dist/api/resources/dashboard/client/requests/ListSourcesDashboardSourcesGetRequest.d.ts +2 -2
  8. package/dist/api/resources/embeddings/client/Client.d.ts +20 -33
  9. package/dist/api/resources/embeddings/client/Client.js +28 -41
  10. package/dist/api/resources/embeddings/client/requests/BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost.d.ts +2 -2
  11. package/dist/api/resources/embeddings/client/requests/BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost.d.ts +15 -3
  12. package/dist/api/resources/embeddings/client/requests/BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost.d.ts +2 -2
  13. package/dist/api/resources/embeddings/client/requests/EmbeddingsDeleteRequest.d.ts +1 -1
  14. package/dist/api/resources/fetch/client/Client.d.ts +9 -60
  15. package/dist/api/resources/fetch/client/Client.js +16 -129
  16. package/dist/api/resources/fetch/client/requests/FetchGraphRelationsBySourceIdRequest.d.ts +2 -1
  17. package/dist/api/resources/fetch/client/requests/ListContentRequest.d.ts +20 -0
  18. package/dist/api/resources/fetch/client/requests/SourceFetchRequest.d.ts +2 -2
  19. package/dist/api/resources/fetch/client/requests/index.d.ts +1 -2
  20. package/dist/api/resources/fetch/index.d.ts +1 -0
  21. package/dist/api/resources/fetch/index.js +1 -0
  22. package/dist/api/resources/fetch/types/FetchListKnowledgeResponse.d.ts +5 -0
  23. package/dist/api/resources/fetch/types/index.d.ts +1 -0
  24. package/dist/api/resources/fetch/types/index.js +17 -0
  25. package/dist/api/resources/index.d.ts +2 -1
  26. package/dist/api/resources/index.js +3 -2
  27. package/dist/api/resources/search/client/Client.d.ts +6 -40
  28. package/dist/api/resources/search/client/Client.js +12 -46
  29. package/dist/api/resources/search/client/requests/FullTextSearchRequest.d.ts +3 -3
  30. package/dist/api/resources/search/client/requests/HybridSearchRequest.d.ts +7 -7
  31. package/dist/api/resources/search/client/requests/QnASearchRequest.d.ts +2 -2
  32. package/dist/api/resources/sources/client/Client.d.ts +2 -9
  33. package/dist/api/resources/sources/client/Client.js +4 -11
  34. package/dist/api/resources/sources/client/requests/SourceDeleteRequest.d.ts +2 -2
  35. package/dist/api/resources/tenant/client/Client.d.ts +2 -54
  36. package/dist/api/resources/tenant/client/Client.js +4 -56
  37. package/dist/api/resources/tenant/client/requests/TenantCreateRequest.d.ts +1 -1
  38. package/dist/api/resources/tenant/client/requests/TenantStatsRequest.d.ts +1 -1
  39. package/dist/api/resources/upload/client/Client.d.ts +9 -73
  40. package/dist/api/resources/upload/client/Client.js +22 -140
  41. package/dist/api/resources/upload/client/requests/BodyAddMemoryMemoriesAddMemoryPost.d.ts +1 -1
  42. package/dist/api/resources/upload/client/requests/{BodyUploadDocumentIngestionUploadDocumentPost.d.ts → BodyUploadKnowledgeIngestionUploadKnowledgePost.d.ts} +7 -5
  43. package/dist/api/resources/upload/client/requests/UploadDeleteMemoryRequest.d.ts +2 -2
  44. package/dist/api/resources/upload/client/requests/UploadVerifyProcessingRequest.d.ts +2 -1
  45. package/dist/api/resources/upload/client/requests/index.d.ts +1 -2
  46. package/dist/api/types/ForcefulRelationsPayload.d.ts +9 -0
  47. package/dist/api/types/ListContentKind.d.ts +8 -0
  48. package/dist/api/types/ListContentKind.js +10 -0
  49. package/dist/api/types/ListUserMemoriesResponse.d.ts +13 -0
  50. package/dist/api/types/MemoryItem.d.ts +3 -1
  51. package/dist/api/types/RetrievalResult.d.ts +2 -0
  52. package/dist/api/types/RetrieveMode.d.ts +2 -2
  53. package/dist/api/types/RetrieveMode.js +1 -1
  54. package/dist/api/types/UserMemory.d.ts +12 -0
  55. package/dist/api/types/UserMemory.js +5 -0
  56. package/dist/api/types/VectorStoreChunk.d.ts +2 -0
  57. package/dist/api/types/index.d.ts +4 -1
  58. package/dist/api/types/index.js +4 -1
  59. package/package.json +33 -30
  60. package/dist/api/resources/fetch/client/requests/FetchSourcesRequest.d.ts +0 -15
  61. package/dist/api/resources/fetch/client/requests/ListSourcesByIdRequest.d.ts +0 -18
  62. package/dist/api/resources/upload/client/requests/BodyUploadAppIngestionUploadAppPost.d.ts +0 -31
  63. package/dist/api/types/AppSourcesUploadData.d.ts +0 -17
  64. /package/dist/api/resources/fetch/client/requests/{FetchSourcesRequest.js → ListContentRequest.js} +0 -0
  65. /package/dist/api/resources/fetch/{client/requests/ListSourcesByIdRequest.js → types/FetchListKnowledgeResponse.js} +0 -0
  66. /package/dist/api/resources/upload/client/requests/{BodyUploadAppIngestionUploadAppPost.js → BodyUploadKnowledgeIngestionUploadKnowledgePost.js} +0 -0
  67. /package/dist/api/{resources/upload/client/requests/BodyUploadDocumentIngestionUploadDocumentPost.js → types/ForcefulRelationsPayload.js} +0 -0
  68. /package/dist/api/types/{AppSourcesUploadData.js → ListUserMemoriesResponse.js} +0 -0
package/dist/Client.d.ts CHANGED
@@ -50,8 +50,6 @@ export declare class CortexAIClient {
50
50
  get search(): Search;
51
51
  get dashboard(): Dashboard;
52
52
  /**
53
- * Endpoint that serves Prometheus metrics.
54
- *
55
53
  * @param {CortexAIClient.RequestOptions} requestOptions - Request-specific configuration.
56
54
  *
57
55
  * @example
package/dist/Client.js CHANGED
@@ -75,8 +75,6 @@ class CortexAIClient {
75
75
  return ((_a = this._dashboard) !== null && _a !== void 0 ? _a : (this._dashboard = new Client_js_7.Dashboard(this._options)));
76
76
  }
77
77
  /**
78
- * Endpoint that serves Prometheus metrics.
79
- *
80
78
  * @param {CortexAIClient.RequestOptions} requestOptions - Request-specific configuration.
81
79
  *
82
80
  * @example
@@ -1,3 +1,3 @@
1
+ export * from "./resources/index.js";
1
2
  export * from "./types/index.js";
2
3
  export * from "./errors/index.js";
3
- export * from "./resources/index.js";
package/dist/api/index.js CHANGED
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./resources/index.js"), exports);
17
18
  __exportStar(require("./types/index.js"), exports);
18
19
  __exportStar(require("./errors/index.js"), exports);
19
- __exportStar(require("./resources/index.js"), exports);
@@ -30,11 +30,6 @@ export declare class Dashboard {
30
30
  protected readonly _options: Dashboard.Options;
31
31
  constructor(_options?: Dashboard.Options);
32
32
  /**
33
- * List all API keys for dashboard view.
34
- *
35
- * Uses Firebase authentication to identify the user and returns API keys
36
- * associated with that user.
37
- *
38
33
  * @param {Dashboard.RequestOptions} requestOptions - Request-specific configuration.
39
34
  *
40
35
  * @throws {@link CortexAI.BadRequestError}
@@ -51,10 +46,6 @@ export declare class Dashboard {
51
46
  listApis(requestOptions?: Dashboard.RequestOptions): core.HttpResponsePromise<CortexAI.DashboardApisResponse>;
52
47
  private __listApis;
53
48
  /**
54
- * List all sources for a tenant/sub-tenant combination.
55
- *
56
- * Uses the same logic as the existing get_sources function.
57
- *
58
49
  * @param {CortexAI.ListSourcesDashboardSourcesGetRequest} request
59
50
  * @param {Dashboard.RequestOptions} requestOptions - Request-specific configuration.
60
51
  *
@@ -68,18 +59,13 @@ export declare class Dashboard {
68
59
  *
69
60
  * @example
70
61
  * await client.dashboard.listSources({
71
- * tenant_id: "tenant_id",
72
- * sub_tenant_id: "sub_tenant_id"
62
+ * tenant_id: "tenant_1234",
63
+ * sub_tenant_id: "sub_tenant_4567"
73
64
  * })
74
65
  */
75
66
  listSources(request: CortexAI.ListSourcesDashboardSourcesGetRequest, requestOptions?: Dashboard.RequestOptions): core.HttpResponsePromise<CortexAI.DashboardSourcesResponse>;
76
67
  private __listSources;
77
68
  /**
78
- * List all tenants for dashboard view.
79
- *
80
- * Uses Firebase authentication to identify the user and returns tenant
81
- * mappings associated with that user's organization.
82
- *
83
69
  * @param {Dashboard.RequestOptions} requestOptions - Request-specific configuration.
84
70
  *
85
71
  * @throws {@link CortexAI.BadRequestError}
@@ -37,11 +37,6 @@ class Dashboard {
37
37
  this._options = _options;
38
38
  }
39
39
  /**
40
- * List all API keys for dashboard view.
41
- *
42
- * Uses Firebase authentication to identify the user and returns API keys
43
- * associated with that user.
44
- *
45
40
  * @param {Dashboard.RequestOptions} requestOptions - Request-specific configuration.
46
41
  *
47
42
  * @throws {@link CortexAI.BadRequestError}
@@ -114,10 +109,6 @@ class Dashboard {
114
109
  }
115
110
  }
116
111
  /**
117
- * List all sources for a tenant/sub-tenant combination.
118
- *
119
- * Uses the same logic as the existing get_sources function.
120
- *
121
112
  * @param {CortexAI.ListSourcesDashboardSourcesGetRequest} request
122
113
  * @param {Dashboard.RequestOptions} requestOptions - Request-specific configuration.
123
114
  *
@@ -131,8 +122,8 @@ class Dashboard {
131
122
  *
132
123
  * @example
133
124
  * await client.dashboard.listSources({
134
- * tenant_id: "tenant_id",
135
- * sub_tenant_id: "sub_tenant_id"
125
+ * tenant_id: "tenant_1234",
126
+ * sub_tenant_id: "sub_tenant_4567"
136
127
  * })
137
128
  */
138
129
  listSources(request, requestOptions) {
@@ -198,11 +189,6 @@ class Dashboard {
198
189
  }
199
190
  }
200
191
  /**
201
- * List all tenants for dashboard view.
202
- *
203
- * Uses Firebase authentication to identify the user and returns tenant
204
- * mappings associated with that user's organization.
205
- *
206
192
  * @param {Dashboard.RequestOptions} requestOptions - Request-specific configuration.
207
193
  *
208
194
  * @throws {@link CortexAI.BadRequestError}
@@ -4,8 +4,8 @@
4
4
  /**
5
5
  * @example
6
6
  * {
7
- * tenant_id: "tenant_id",
8
- * sub_tenant_id: "sub_tenant_id"
7
+ * tenant_id: "tenant_1234",
8
+ * sub_tenant_id: "sub_tenant_4567"
9
9
  * }
10
10
  */
11
11
  export interface ListSourcesDashboardSourcesGetRequest {
@@ -30,16 +30,6 @@ export declare class Embeddings {
30
30
  protected readonly _options: Embeddings.Options;
31
31
  constructor(_options?: Embeddings.Options);
32
32
  /**
33
- * Upload pre-computed embeddings for advanced similarity search.
34
- *
35
- * This endpoint accepts vector embeddings that you’ve generated externally,
36
- * allowing you to integrate with custom embedding models or existing vector databases.
37
- * The embeddings represent chunks of your content as numerical vectors.
38
- *
39
- * The system stores these embeddings and makes them available for semantic search and similarity matching.
40
- * Use this when you want to leverage specialized embedding models or have existing vector representations.
41
- * When upsert=True, existing embeddings with the same chunk_id will be updated.
42
- *
43
33
  * @param {CortexAI.BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost} request
44
34
  * @param {Embeddings.RequestOptions} requestOptions - Request-specific configuration.
45
35
  *
@@ -53,11 +43,23 @@ export declare class Embeddings {
53
43
  *
54
44
  * @example
55
45
  * await client.embeddings.insert({
56
- * tenant_id: "tenant_id",
46
+ * tenant_id: "tenant_1234",
57
47
  * embeddings: [{
58
- * source_id: "source_id",
48
+ * source_id: "<source_id>",
49
+ * embeddings: [{
50
+ * chunk_id: "<chunk_id>",
51
+ * embedding: [1.1]
52
+ * }, {
53
+ * chunk_id: "<chunk_id>",
54
+ * embedding: [1.1]
55
+ * }]
56
+ * }, {
57
+ * source_id: "<source_id>",
59
58
  * embeddings: [{
60
- * chunk_id: "chunk_id",
59
+ * chunk_id: "<chunk_id>",
60
+ * embedding: [1.1]
61
+ * }, {
62
+ * chunk_id: "<chunk_id>",
61
63
  * embedding: [1.1]
62
64
  * }]
63
65
  * }]
@@ -66,13 +68,6 @@ export declare class Embeddings {
66
68
  insert(request: CortexAI.BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost, requestOptions?: Embeddings.RequestOptions): core.HttpResponsePromise<CortexAI.InsertResult>;
67
69
  private __insert;
68
70
  /**
69
- * Find similar chunks using an embedding vector.
70
- *
71
- * Use this to retrieve the most similar chunk IDs to a single query embedding.
72
- *
73
- * Expected outcome:
74
- * - You receive the closest chunk IDs with optional similarity scores.
75
- *
76
71
  * @param {CortexAI.BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost} request
77
72
  * @param {Embeddings.RequestOptions} requestOptions - Request-specific configuration.
78
73
  *
@@ -86,17 +81,14 @@ export declare class Embeddings {
86
81
  *
87
82
  * @example
88
83
  * await client.embeddings.search({
89
- * tenant_id: "tenant_id",
90
- * sub_tenant_id: "sub_tenant_id",
84
+ * tenant_id: "tenant_1234",
85
+ * sub_tenant_id: "sub_tenant_4567",
91
86
  * query_embedding: [1.1]
92
87
  * })
93
88
  */
94
89
  search(request: CortexAI.BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost, requestOptions?: Embeddings.RequestOptions): core.HttpResponsePromise<CortexAI.RawEmbeddingSearchResult[]>;
95
90
  private __search;
96
91
  /**
97
- * Retrieve embeddings for specific chunk IDs.
98
- * Use this when you already know the chunk IDs and need their corresponding embeddings.
99
- *
100
92
  * @param {CortexAI.BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost} request
101
93
  * @param {Embeddings.RequestOptions} requestOptions - Request-specific configuration.
102
94
  *
@@ -110,18 +102,13 @@ export declare class Embeddings {
110
102
  *
111
103
  * @example
112
104
  * await client.embeddings.filter({
113
- * tenant_id: "tenant_id",
114
- * sub_tenant_id: "sub_tenant_id"
105
+ * tenant_id: "tenant_1234",
106
+ * sub_tenant_id: "sub_tenant_4567"
115
107
  * })
116
108
  */
117
109
  filter(request: CortexAI.BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost, requestOptions?: Embeddings.RequestOptions): core.HttpResponsePromise<CortexAI.RawEmbeddingSearchResult[]>;
118
110
  private __filter;
119
111
  /**
120
- * Delete embedding chunks by chunk ID.
121
- *
122
- * Use this to remove specific chunks from your embeddings index when they are no longer
123
- * valid or should not appear in results.
124
- *
125
112
  * @param {CortexAI.EmbeddingsDeleteRequest} request
126
113
  * @param {Embeddings.RequestOptions} requestOptions - Request-specific configuration.
127
114
  *
@@ -135,7 +122,7 @@ export declare class Embeddings {
135
122
  *
136
123
  * @example
137
124
  * await client.embeddings.delete({
138
- * tenant_id: "tenant_id"
125
+ * tenant_id: "tenant_1234"
139
126
  * })
140
127
  */
141
128
  delete(request: CortexAI.EmbeddingsDeleteRequest, requestOptions?: Embeddings.RequestOptions): core.HttpResponsePromise<CortexAI.DeleteResult>;
@@ -37,16 +37,6 @@ class Embeddings {
37
37
  this._options = _options;
38
38
  }
39
39
  /**
40
- * Upload pre-computed embeddings for advanced similarity search.
41
- *
42
- * This endpoint accepts vector embeddings that you’ve generated externally,
43
- * allowing you to integrate with custom embedding models or existing vector databases.
44
- * The embeddings represent chunks of your content as numerical vectors.
45
- *
46
- * The system stores these embeddings and makes them available for semantic search and similarity matching.
47
- * Use this when you want to leverage specialized embedding models or have existing vector representations.
48
- * When upsert=True, existing embeddings with the same chunk_id will be updated.
49
- *
50
40
  * @param {CortexAI.BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost} request
51
41
  * @param {Embeddings.RequestOptions} requestOptions - Request-specific configuration.
52
42
  *
@@ -60,11 +50,23 @@ class Embeddings {
60
50
  *
61
51
  * @example
62
52
  * await client.embeddings.insert({
63
- * tenant_id: "tenant_id",
53
+ * tenant_id: "tenant_1234",
64
54
  * embeddings: [{
65
- * source_id: "source_id",
55
+ * source_id: "<source_id>",
56
+ * embeddings: [{
57
+ * chunk_id: "<chunk_id>",
58
+ * embedding: [1.1]
59
+ * }, {
60
+ * chunk_id: "<chunk_id>",
61
+ * embedding: [1.1]
62
+ * }]
63
+ * }, {
64
+ * source_id: "<source_id>",
66
65
  * embeddings: [{
67
- * chunk_id: "chunk_id",
66
+ * chunk_id: "<chunk_id>",
67
+ * embedding: [1.1]
68
+ * }, {
69
+ * chunk_id: "<chunk_id>",
68
70
  * embedding: [1.1]
69
71
  * }]
70
72
  * }]
@@ -77,7 +79,7 @@ class Embeddings {
77
79
  var _a, _b, _c;
78
80
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: await this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
79
81
  const _response = await core.fetcher({
80
- url: core.url.join((_c = (_b = (await core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (await core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CortexAIEnvironment.CortexProd, "embeddings/insert-raw-embeddings"),
82
+ url: core.url.join((_c = (_b = (await core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (await core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CortexAIEnvironment.CortexProd, "embeddings/insert_raw_embeddings"),
81
83
  method: "POST",
82
84
  headers: _headers,
83
85
  contentType: "application/json",
@@ -123,7 +125,7 @@ class Embeddings {
123
125
  rawResponse: _response.rawResponse,
124
126
  });
125
127
  case "timeout":
126
- throw new errors.CortexAITimeoutError("Timeout exceeded when calling POST /embeddings/insert-raw-embeddings.");
128
+ throw new errors.CortexAITimeoutError("Timeout exceeded when calling POST /embeddings/insert_raw_embeddings.");
127
129
  case "unknown":
128
130
  throw new errors.CortexAIError({
129
131
  message: _response.error.errorMessage,
@@ -132,13 +134,6 @@ class Embeddings {
132
134
  }
133
135
  }
134
136
  /**
135
- * Find similar chunks using an embedding vector.
136
- *
137
- * Use this to retrieve the most similar chunk IDs to a single query embedding.
138
- *
139
- * Expected outcome:
140
- * - You receive the closest chunk IDs with optional similarity scores.
141
- *
142
137
  * @param {CortexAI.BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost} request
143
138
  * @param {Embeddings.RequestOptions} requestOptions - Request-specific configuration.
144
139
  *
@@ -152,8 +147,8 @@ class Embeddings {
152
147
  *
153
148
  * @example
154
149
  * await client.embeddings.search({
155
- * tenant_id: "tenant_id",
156
- * sub_tenant_id: "sub_tenant_id",
150
+ * tenant_id: "tenant_1234",
151
+ * sub_tenant_id: "sub_tenant_4567",
157
152
  * query_embedding: [1.1]
158
153
  * })
159
154
  */
@@ -164,7 +159,7 @@ class Embeddings {
164
159
  var _a, _b, _c;
165
160
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: await this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
166
161
  const _response = await core.fetcher({
167
- url: core.url.join((_c = (_b = (await core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (await core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CortexAIEnvironment.CortexProd, "embeddings/search-raw-embeddings"),
162
+ url: core.url.join((_c = (_b = (await core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (await core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CortexAIEnvironment.CortexProd, "embeddings/search_raw_embeddings"),
168
163
  method: "POST",
169
164
  headers: _headers,
170
165
  contentType: "application/json",
@@ -210,7 +205,7 @@ class Embeddings {
210
205
  rawResponse: _response.rawResponse,
211
206
  });
212
207
  case "timeout":
213
- throw new errors.CortexAITimeoutError("Timeout exceeded when calling POST /embeddings/search-raw-embeddings.");
208
+ throw new errors.CortexAITimeoutError("Timeout exceeded when calling POST /embeddings/search_raw_embeddings.");
214
209
  case "unknown":
215
210
  throw new errors.CortexAIError({
216
211
  message: _response.error.errorMessage,
@@ -219,9 +214,6 @@ class Embeddings {
219
214
  }
220
215
  }
221
216
  /**
222
- * Retrieve embeddings for specific chunk IDs.
223
- * Use this when you already know the chunk IDs and need their corresponding embeddings.
224
- *
225
217
  * @param {CortexAI.BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost} request
226
218
  * @param {Embeddings.RequestOptions} requestOptions - Request-specific configuration.
227
219
  *
@@ -235,8 +227,8 @@ class Embeddings {
235
227
  *
236
228
  * @example
237
229
  * await client.embeddings.filter({
238
- * tenant_id: "tenant_id",
239
- * sub_tenant_id: "sub_tenant_id"
230
+ * tenant_id: "tenant_1234",
231
+ * sub_tenant_id: "sub_tenant_4567"
240
232
  * })
241
233
  */
242
234
  filter(request, requestOptions) {
@@ -246,7 +238,7 @@ class Embeddings {
246
238
  var _a, _b, _c;
247
239
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: await this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
248
240
  const _response = await core.fetcher({
249
- url: core.url.join((_c = (_b = (await core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (await core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CortexAIEnvironment.CortexProd, "embeddings/filter-raw-embeddings"),
241
+ url: core.url.join((_c = (_b = (await core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (await core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CortexAIEnvironment.CortexProd, "embeddings/filter_raw_embeddings"),
250
242
  method: "POST",
251
243
  headers: _headers,
252
244
  contentType: "application/json",
@@ -292,7 +284,7 @@ class Embeddings {
292
284
  rawResponse: _response.rawResponse,
293
285
  });
294
286
  case "timeout":
295
- throw new errors.CortexAITimeoutError("Timeout exceeded when calling POST /embeddings/filter-raw-embeddings.");
287
+ throw new errors.CortexAITimeoutError("Timeout exceeded when calling POST /embeddings/filter_raw_embeddings.");
296
288
  case "unknown":
297
289
  throw new errors.CortexAIError({
298
290
  message: _response.error.errorMessage,
@@ -301,11 +293,6 @@ class Embeddings {
301
293
  }
302
294
  }
303
295
  /**
304
- * Delete embedding chunks by chunk ID.
305
- *
306
- * Use this to remove specific chunks from your embeddings index when they are no longer
307
- * valid or should not appear in results.
308
- *
309
296
  * @param {CortexAI.EmbeddingsDeleteRequest} request
310
297
  * @param {Embeddings.RequestOptions} requestOptions - Request-specific configuration.
311
298
  *
@@ -319,7 +306,7 @@ class Embeddings {
319
306
  *
320
307
  * @example
321
308
  * await client.embeddings.delete({
322
- * tenant_id: "tenant_id"
309
+ * tenant_id: "tenant_1234"
323
310
  * })
324
311
  */
325
312
  delete(request, requestOptions) {
@@ -346,7 +333,7 @@ class Embeddings {
346
333
  }
347
334
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: await this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
348
335
  const _response = await core.fetcher({
349
- url: core.url.join((_c = (_b = (await core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (await core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CortexAIEnvironment.CortexProd, "embeddings/delete-raw-embeddings"),
336
+ url: core.url.join((_c = (_b = (await core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (await core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CortexAIEnvironment.CortexProd, "embeddings/delete_raw_embeddings"),
350
337
  method: "DELETE",
351
338
  headers: _headers,
352
339
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -389,7 +376,7 @@ class Embeddings {
389
376
  rawResponse: _response.rawResponse,
390
377
  });
391
378
  case "timeout":
392
- throw new errors.CortexAITimeoutError("Timeout exceeded when calling DELETE /embeddings/delete-raw-embeddings.");
379
+ throw new errors.CortexAITimeoutError("Timeout exceeded when calling DELETE /embeddings/delete_raw_embeddings.");
393
380
  case "unknown":
394
381
  throw new errors.CortexAIError({
395
382
  message: _response.error.errorMessage,
@@ -4,8 +4,8 @@
4
4
  /**
5
5
  * @example
6
6
  * {
7
- * tenant_id: "tenant_id",
8
- * sub_tenant_id: "sub_tenant_id"
7
+ * tenant_id: "tenant_1234",
8
+ * sub_tenant_id: "sub_tenant_4567"
9
9
  * }
10
10
  */
11
11
  export interface BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost {
@@ -5,11 +5,23 @@ import * as CortexAI from "../../../../index.js";
5
5
  /**
6
6
  * @example
7
7
  * {
8
- * tenant_id: "tenant_id",
8
+ * tenant_id: "tenant_1234",
9
9
  * embeddings: [{
10
- * source_id: "source_id",
10
+ * source_id: "<source_id>",
11
11
  * embeddings: [{
12
- * chunk_id: "chunk_id",
12
+ * chunk_id: "<chunk_id>",
13
+ * embedding: [1.1]
14
+ * }, {
15
+ * chunk_id: "<chunk_id>",
16
+ * embedding: [1.1]
17
+ * }]
18
+ * }, {
19
+ * source_id: "<source_id>",
20
+ * embeddings: [{
21
+ * chunk_id: "<chunk_id>",
22
+ * embedding: [1.1]
23
+ * }, {
24
+ * chunk_id: "<chunk_id>",
13
25
  * embedding: [1.1]
14
26
  * }]
15
27
  * }]
@@ -4,8 +4,8 @@
4
4
  /**
5
5
  * @example
6
6
  * {
7
- * tenant_id: "tenant_id",
8
- * sub_tenant_id: "sub_tenant_id",
7
+ * tenant_id: "tenant_1234",
8
+ * sub_tenant_id: "sub_tenant_4567",
9
9
  * query_embedding: [1.1]
10
10
  * }
11
11
  */
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * @example
6
6
  * {
7
- * tenant_id: "tenant_id"
7
+ * tenant_id: "tenant_1234"
8
8
  * }
9
9
  */
10
10
  export interface EmbeddingsDeleteRequest {
@@ -30,16 +30,7 @@ export declare class Fetch {
30
30
  protected readonly _options: Fetch.Options;
31
31
  constructor(_options?: Fetch.Options);
32
32
  /**
33
- * Retrieve all sources for a specific tenant and subtenant combination.
34
- *
35
- * Use this endpoint to fetch a complete list of all sources associated
36
- * with your tenant. This includes documents, files, and other content
37
- * you've uploaded for processing.
38
- *
39
- * You can optionally specify a sub-tenant to narrow down the results to
40
- * sources within that specific sub-tenant scope.
41
- *
42
- * @param {CortexAI.FetchSourcesRequest} request
33
+ * @param {CortexAI.ListContentRequest} request
43
34
  * @param {Fetch.RequestOptions} requestOptions - Request-specific configuration.
44
35
  *
45
36
  * @throws {@link CortexAI.BadRequestError}
@@ -51,49 +42,13 @@ export declare class Fetch {
51
42
  * @throws {@link CortexAI.ServiceUnavailableError}
52
43
  *
53
44
  * @example
54
- * await client.fetch.sources({
55
- * tenant_id: "tenant_id"
45
+ * await client.fetch.listKnowledge({
46
+ * tenant_id: "tenant_1234"
56
47
  * })
57
48
  */
58
- sources(request: CortexAI.FetchSourcesRequest, requestOptions?: Fetch.RequestOptions): core.HttpResponsePromise<CortexAI.SourceListResponse>;
59
- private __sources;
49
+ listKnowledge(request: CortexAI.ListContentRequest, requestOptions?: Fetch.RequestOptions): core.HttpResponsePromise<CortexAI.FetchListKnowledgeResponse>;
50
+ private __listKnowledge;
60
51
  /**
61
- * Retrieve specific sources by their IDs.
62
- *
63
- * Use this endpoint to fetch one or more sources by providing their
64
- * unique identifiers. This is useful when you need detailed information
65
- * about specific documents or content you've previously uploaded.
66
- *
67
- * Provide the source IDs in the request body along with your tenant
68
- * information to get the exact sources you need.
69
- *
70
- * @param {CortexAI.ListSourcesByIdRequest} request
71
- * @param {Fetch.RequestOptions} requestOptions - Request-specific configuration.
72
- *
73
- * @throws {@link CortexAI.BadRequestError}
74
- * @throws {@link CortexAI.UnauthorizedError}
75
- * @throws {@link CortexAI.ForbiddenError}
76
- * @throws {@link CortexAI.NotFoundError}
77
- * @throws {@link CortexAI.UnprocessableEntityError}
78
- * @throws {@link CortexAI.InternalServerError}
79
- * @throws {@link CortexAI.ServiceUnavailableError}
80
- *
81
- * @example
82
- * await client.fetch.sourceByIds({
83
- * source_ids: ["source_ids"],
84
- * tenant_id: "tenant_id"
85
- * })
86
- */
87
- sourceByIds(request: CortexAI.ListSourcesByIdRequest, requestOptions?: Fetch.RequestOptions): core.HttpResponsePromise<CortexAI.SourceListResponse>;
88
- private __sourceByIds;
89
- /**
90
- * Retrieve relations for a specific source.
91
- *
92
- * Use this endpoint to fetch all relations associated with a specific source.
93
- * This is useful when you need to understand the relationships between entities within a source.
94
- *
95
- * Provide the source ID in the request body along with your tenant information to get the relations for that source.
96
- *
97
52
  * @param {CortexAI.FetchGraphRelationsBySourceIdRequest} request
98
53
  * @param {Fetch.RequestOptions} requestOptions - Request-specific configuration.
99
54
  *
@@ -107,19 +62,13 @@ export declare class Fetch {
107
62
  *
108
63
  * @example
109
64
  * await client.fetch.graphRelationsBySourceId({
110
- * source_id: "source_id"
65
+ * source_id: "<str>",
66
+ * tenant_id: "tenant_1234"
111
67
  * })
112
68
  */
113
69
  graphRelationsBySourceId(request: CortexAI.FetchGraphRelationsBySourceIdRequest, requestOptions?: Fetch.RequestOptions): core.HttpResponsePromise<CortexAI.SourceGraphRelationsResponse>;
114
70
  private __graphRelationsBySourceId;
115
71
  /**
116
- * Fetch the content of a source ingested.
117
- *
118
- * This endpoint can return:
119
- * - File content directly (as string or base64)
120
- * - A presigned URL to access the file
121
- * - Both content and presigned URL
122
- *
123
72
  * @param {CortexAI.SourceFetchRequest} request
124
73
  * @param {Fetch.RequestOptions} requestOptions - Request-specific configuration.
125
74
  *
@@ -133,8 +82,8 @@ export declare class Fetch {
133
82
  *
134
83
  * @example
135
84
  * await client.fetch.sourceContent({
136
- * tenant_id: "tenant_id",
137
- * source_id: "source_id"
85
+ * tenant_id: "tenant_1234",
86
+ * source_id: "<source_id>"
138
87
  * })
139
88
  */
140
89
  sourceContent(request: CortexAI.SourceFetchRequest, requestOptions?: Fetch.RequestOptions): core.HttpResponsePromise<CortexAI.SourceFetchResponse>;