@usecortex_ai/node 0.1.2 → 0.2.0

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 (110) hide show
  1. package/dist/Client.d.ts +5 -11
  2. package/dist/Client.js +12 -63
  3. package/dist/api/resources/document/client/Client.d.ts +59 -0
  4. package/dist/api/resources/document/client/Client.js +128 -0
  5. package/dist/api/resources/document/client/index.d.ts +1 -0
  6. package/dist/api/resources/document/client/index.js +2 -0
  7. package/dist/api/resources/document/index.d.ts +1 -0
  8. package/dist/api/resources/document/index.js +17 -0
  9. package/dist/api/resources/embeddings/client/Client.d.ts +13 -38
  10. package/dist/api/resources/embeddings/client/Client.js +12 -41
  11. package/dist/api/resources/embeddings/client/requests/EmbeddingsCreateCollectionRequest.d.ts +1 -0
  12. package/dist/api/resources/embeddings/client/requests/EmbeddingsDeleteRequest.d.ts +3 -0
  13. package/dist/api/resources/embeddings/client/requests/EmbeddingsSearchRequest.d.ts +3 -0
  14. package/dist/api/resources/embeddings/client/requests/GetEmbeddingsBasedOnChunkIdsRequest.d.ts +3 -0
  15. package/dist/api/resources/fetch/client/Client.d.ts +3 -3
  16. package/dist/api/resources/fetch/client/Client.js +2 -6
  17. package/dist/api/resources/fetch/client/requests/FetchContentRequest.d.ts +5 -0
  18. package/dist/api/resources/index.d.ts +1 -0
  19. package/dist/api/resources/index.js +2 -1
  20. package/dist/api/resources/search/client/Client.d.ts +11 -38
  21. package/dist/api/resources/search/client/Client.js +10 -41
  22. package/dist/api/resources/search/client/requests/FullTextSearchRequest.d.ts +5 -0
  23. package/dist/api/resources/search/client/requests/QnARequest.d.ts +17 -0
  24. package/dist/api/resources/search/client/requests/SearchRequest.d.ts +9 -1
  25. package/dist/api/resources/sources/client/Client.d.ts +15 -35
  26. package/dist/api/resources/sources/client/Client.js +14 -97
  27. package/dist/api/resources/sources/client/requests/SourcesGetAllRequest.d.ts +2 -0
  28. package/dist/api/resources/sources/client/requests/index.d.ts +0 -1
  29. package/dist/api/resources/tenant/client/Client.d.ts +55 -5
  30. package/dist/api/resources/tenant/client/Client.js +173 -8
  31. package/dist/api/resources/tenant/client/requests/TenantDeleteSubTenantRequest.d.ts +14 -0
  32. package/dist/api/resources/tenant/client/requests/TenantDeleteSubTenantRequest.js +5 -0
  33. package/dist/api/resources/tenant/client/requests/TenantGetSubTenantIdsRequest.d.ts +12 -0
  34. package/dist/api/resources/tenant/client/requests/TenantGetSubTenantIdsRequest.js +5 -0
  35. package/dist/api/resources/tenant/client/requests/TenantStatsRequest.d.ts +2 -0
  36. package/dist/api/resources/tenant/client/requests/index.d.ts +2 -0
  37. package/dist/api/resources/upload/client/Client.d.ts +95 -10
  38. package/dist/api/resources/upload/client/Client.js +94 -25
  39. package/dist/api/resources/upload/client/requests/BodyBatchUpdateUploadBatchUpdatePatch.d.ts +17 -1
  40. package/dist/api/resources/upload/client/requests/BodyBatchUploadUploadBatchUploadPost.d.ts +16 -1
  41. package/dist/api/resources/upload/client/requests/BodyUpdateFileUploadUpdateDocumentPatch.d.ts +17 -1
  42. package/dist/api/resources/upload/client/requests/BodyUploadFilesUploadUploadDocumentPost.d.ts +16 -1
  43. package/dist/api/resources/upload/client/requests/EmbeddingsUpdateRequest.d.ts +3 -0
  44. package/dist/api/resources/upload/client/requests/EmbeddingsUploadRequest.d.ts +4 -0
  45. package/dist/api/resources/upload/client/requests/UploadScrapeWebpageRequest.d.ts +4 -0
  46. package/dist/api/resources/upload/client/requests/UploadUpdateMarkdownRequest.d.ts +3 -0
  47. package/dist/api/resources/upload/client/requests/UploadUpdateTextRequest.d.ts +3 -0
  48. package/dist/api/resources/upload/client/requests/UploadUpdateWebpageRequest.d.ts +4 -0
  49. package/dist/api/resources/upload/client/requests/UploadUploadAppSourcesRequest.d.ts +3 -0
  50. package/dist/api/resources/upload/client/requests/UploadUploadMarkdownRequest.d.ts +2 -0
  51. package/dist/api/resources/upload/client/requests/UploadUploadTextRequest.d.ts +2 -0
  52. package/dist/api/resources/upload/client/requests/UploadVerifyProcessingRequest.d.ts +2 -0
  53. package/dist/api/resources/user/client/Client.d.ts +9 -6
  54. package/dist/api/resources/user/client/Client.js +8 -9
  55. package/dist/api/resources/user/client/requests/BodyCreateTenantUserCreateTenantPost.d.ts +1 -0
  56. package/dist/api/resources/userMemory/client/Client.d.ts +89 -21
  57. package/dist/api/resources/userMemory/client/Client.js +183 -33
  58. package/dist/api/resources/userMemory/client/requests/AddUserMemoryRequest.d.ts +18 -0
  59. package/dist/api/resources/userMemory/client/requests/AddUserMemoryRequest.js +5 -0
  60. package/dist/api/resources/userMemory/client/requests/GenerateUserMemoryRequest.d.ts +21 -0
  61. package/dist/api/resources/userMemory/client/requests/GenerateUserMemoryRequest.js +5 -0
  62. package/dist/api/resources/userMemory/client/requests/RetrieveUserMemoryRequest.d.ts +20 -0
  63. package/dist/api/resources/userMemory/client/requests/RetrieveUserMemoryRequest.js +5 -0
  64. package/dist/api/resources/userMemory/client/requests/UserMemoryDeleteUserMemoryRequest.d.ts +5 -3
  65. package/dist/api/resources/userMemory/client/requests/UserMemoryListUserMemoriesRequest.d.ts +4 -3
  66. package/dist/api/resources/userMemory/client/requests/index.d.ts +3 -3
  67. package/dist/api/types/AddUserMemoryResponse.d.ts +14 -0
  68. package/dist/api/types/AddUserMemoryResponse.js +5 -0
  69. package/dist/api/types/AppSourcesUploadData.d.ts +3 -1
  70. package/dist/api/types/AttachmentModel.d.ts +7 -0
  71. package/dist/api/types/BatchUploadData.d.ts +3 -1
  72. package/dist/api/types/BodyScrapeWebpageUploadScrapeWebpagePost.d.ts +0 -1
  73. package/dist/api/types/BodyUpdateScrapeJobUploadUpdateWebpagePatch.d.ts +0 -1
  74. package/dist/api/types/ContentModel.d.ts +6 -0
  75. package/dist/api/types/DeleteMemoryRequest.d.ts +3 -0
  76. package/dist/api/types/DeleteSources.d.ts +7 -0
  77. package/dist/api/types/DeleteSources.js +5 -0
  78. package/dist/api/types/DeleteSubTenantData.d.ts +15 -0
  79. package/dist/api/types/DeleteSubTenantData.js +5 -0
  80. package/dist/api/types/DeleteUserMemoryResponse.d.ts +12 -0
  81. package/dist/api/types/DeleteUserMemoryResponse.js +5 -0
  82. package/dist/api/types/EmbeddingsCreateCollectionData.d.ts +4 -0
  83. package/dist/api/types/EmbeddingsDeleteData.d.ts +4 -0
  84. package/dist/api/types/EmbeddingsGetData.d.ts +4 -0
  85. package/dist/api/types/EmbeddingsSearchData.d.ts +4 -0
  86. package/dist/api/types/ErrorResponse.d.ts +0 -1
  87. package/dist/api/types/FetchContentData.d.ts +4 -1
  88. package/dist/api/types/FileUploadResult.d.ts +2 -0
  89. package/dist/api/types/GenerateUserMemoryResponse.d.ts +13 -0
  90. package/dist/api/types/GenerateUserMemoryResponse.js +5 -0
  91. package/dist/api/types/ListSourcesResponse.d.ts +3 -0
  92. package/dist/api/types/ListUserMemoriesResponse.d.ts +13 -0
  93. package/dist/api/types/ListUserMemoriesResponse.js +5 -0
  94. package/dist/api/types/MarkdownUploadRequest.d.ts +12 -2
  95. package/dist/api/types/ProcessingStatus.d.ts +3 -0
  96. package/dist/api/types/Relations.d.ts +2 -0
  97. package/dist/api/types/RetrieveUserMemoryResponse.d.ts +13 -0
  98. package/dist/api/types/RetrieveUserMemoryResponse.js +5 -0
  99. package/dist/api/types/SearchChunk.d.ts +11 -6
  100. package/dist/api/types/SingleUploadData.d.ts +3 -1
  101. package/dist/api/types/Source.d.ts +7 -8
  102. package/dist/api/types/SourceModel.d.ts +21 -2
  103. package/dist/api/types/SubTenantIdsData.d.ts +6 -1
  104. package/dist/api/types/TenantCreateData.d.ts +4 -0
  105. package/dist/api/types/TenantStats.d.ts +5 -0
  106. package/dist/api/types/UserMemory.d.ts +12 -0
  107. package/dist/api/types/UserMemory.js +5 -0
  108. package/dist/api/types/index.d.ts +8 -1
  109. package/dist/api/types/index.js +8 -1
  110. package/package.json +1 -1
@@ -33,13 +33,17 @@ const CortexAI = __importStar(require("../../../index.js"));
33
33
  const headers_js_1 = require("../../../../core/headers.js");
34
34
  const errors = __importStar(require("../../../../errors/index.js"));
35
35
  class Tenant {
36
- constructor(_options = {}) {
36
+ constructor(_options) {
37
37
  this._options = _options;
38
38
  }
39
39
  /**
40
- * Get tenant stats.
40
+ * Retrieve usage stats for your tenant.
41
41
  *
42
- * This endpoint returns stats for tenant.
42
+ * Use this endpoint to check whether a tenant exists and view core metrics like total indexed objects and vector dimension. This helps you validate setup and monitor ingestion.
43
+ *
44
+ * Expected outcome
45
+ * - You receive the current object count and vector dimension for the tenant.
46
+ * - If the tenant does not exist, you get a not-found error.
43
47
  *
44
48
  * @param {CortexAI.TenantStatsRequest} request
45
49
  * @param {Tenant.RequestOptions} requestOptions - Request-specific configuration.
@@ -121,12 +125,173 @@ class Tenant {
121
125
  });
122
126
  }
123
127
  }
124
- async _getAuthorizationHeader() {
125
- const bearer = await core.Supplier.get(this._options.token);
126
- if (bearer != null) {
127
- return `Bearer ${bearer}`;
128
+ /**
129
+ * Retrieve all sub-tenant IDs contained within a specific tenant. Fetches the sub-tenant IDs directly from the underlying data store.
130
+ *
131
+ * @param {CortexAI.TenantGetSubTenantIdsRequest} request
132
+ * @param {Tenant.RequestOptions} requestOptions - Request-specific configuration.
133
+ *
134
+ * @throws {@link CortexAI.BadRequestError}
135
+ * @throws {@link CortexAI.UnauthorizedError}
136
+ * @throws {@link CortexAI.ForbiddenError}
137
+ * @throws {@link CortexAI.NotFoundError}
138
+ * @throws {@link CortexAI.UnprocessableEntityError}
139
+ * @throws {@link CortexAI.InternalServerError}
140
+ * @throws {@link CortexAI.ServiceUnavailableError}
141
+ *
142
+ * @example
143
+ * await client.tenant.getSubTenantIds({
144
+ * tenant_id: "tenant_id"
145
+ * })
146
+ */
147
+ getSubTenantIds(request, requestOptions) {
148
+ return core.HttpResponsePromise.fromPromise(this.__getSubTenantIds(request, requestOptions));
149
+ }
150
+ async __getSubTenantIds(request, requestOptions) {
151
+ var _a, _b, _c;
152
+ const { tenant_id: tenantId } = request;
153
+ const _queryParams = {};
154
+ _queryParams["tenant_id"] = tenantId;
155
+ 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);
156
+ const _response = await core.fetcher({
157
+ 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, "tenant/sub_tenant_ids"),
158
+ method: "GET",
159
+ headers: _headers,
160
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
161
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
162
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
163
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
164
+ });
165
+ if (_response.ok) {
166
+ return { data: _response.body, rawResponse: _response.rawResponse };
167
+ }
168
+ if (_response.error.reason === "status-code") {
169
+ switch (_response.error.statusCode) {
170
+ case 400:
171
+ throw new CortexAI.BadRequestError(_response.error.body, _response.rawResponse);
172
+ case 401:
173
+ throw new CortexAI.UnauthorizedError(_response.error.body, _response.rawResponse);
174
+ case 403:
175
+ throw new CortexAI.ForbiddenError(_response.error.body, _response.rawResponse);
176
+ case 404:
177
+ throw new CortexAI.NotFoundError(_response.error.body, _response.rawResponse);
178
+ case 422:
179
+ throw new CortexAI.UnprocessableEntityError(_response.error.body, _response.rawResponse);
180
+ case 500:
181
+ throw new CortexAI.InternalServerError(_response.error.body, _response.rawResponse);
182
+ case 503:
183
+ throw new CortexAI.ServiceUnavailableError(_response.error.body, _response.rawResponse);
184
+ default:
185
+ throw new errors.CortexAIError({
186
+ statusCode: _response.error.statusCode,
187
+ body: _response.error.body,
188
+ rawResponse: _response.rawResponse,
189
+ });
190
+ }
191
+ }
192
+ switch (_response.error.reason) {
193
+ case "non-json":
194
+ throw new errors.CortexAIError({
195
+ statusCode: _response.error.statusCode,
196
+ body: _response.error.rawBody,
197
+ rawResponse: _response.rawResponse,
198
+ });
199
+ case "timeout":
200
+ throw new errors.CortexAITimeoutError("Timeout exceeded when calling GET /tenant/sub_tenant_ids.");
201
+ case "unknown":
202
+ throw new errors.CortexAIError({
203
+ message: _response.error.errorMessage,
204
+ rawResponse: _response.rawResponse,
205
+ });
206
+ }
207
+ }
208
+ /**
209
+ * Delete a sub-tenant from a given tenant.
210
+ *
211
+ * This endpoint deletes a specific sub-tenant from the specified tenant.
212
+ * It validates that the sub-tenant is not the primary/default sub-tenant before deletion.
213
+ *
214
+ * @param {CortexAI.TenantDeleteSubTenantRequest} request
215
+ * @param {Tenant.RequestOptions} requestOptions - Request-specific configuration.
216
+ *
217
+ * @throws {@link CortexAI.BadRequestError}
218
+ * @throws {@link CortexAI.UnauthorizedError}
219
+ * @throws {@link CortexAI.ForbiddenError}
220
+ * @throws {@link CortexAI.NotFoundError}
221
+ * @throws {@link CortexAI.UnprocessableEntityError}
222
+ * @throws {@link CortexAI.InternalServerError}
223
+ * @throws {@link CortexAI.ServiceUnavailableError}
224
+ *
225
+ * @example
226
+ * await client.tenant.deleteSubTenant({
227
+ * tenant_id: "tenant_id",
228
+ * sub_tenant_id: "sub_tenant_id"
229
+ * })
230
+ */
231
+ deleteSubTenant(request, requestOptions) {
232
+ return core.HttpResponsePromise.fromPromise(this.__deleteSubTenant(request, requestOptions));
233
+ }
234
+ async __deleteSubTenant(request, requestOptions) {
235
+ var _a, _b, _c;
236
+ const { tenant_id: tenantId, sub_tenant_id: subTenantId } = request;
237
+ const _queryParams = {};
238
+ _queryParams["tenant_id"] = tenantId;
239
+ _queryParams["sub_tenant_id"] = subTenantId;
240
+ 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);
241
+ const _response = await core.fetcher({
242
+ 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, "tenant/delete_sub_tenant"),
243
+ method: "DELETE",
244
+ headers: _headers,
245
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
246
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
247
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
248
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
249
+ });
250
+ if (_response.ok) {
251
+ return { data: _response.body, rawResponse: _response.rawResponse };
252
+ }
253
+ if (_response.error.reason === "status-code") {
254
+ switch (_response.error.statusCode) {
255
+ case 400:
256
+ throw new CortexAI.BadRequestError(_response.error.body, _response.rawResponse);
257
+ case 401:
258
+ throw new CortexAI.UnauthorizedError(_response.error.body, _response.rawResponse);
259
+ case 403:
260
+ throw new CortexAI.ForbiddenError(_response.error.body, _response.rawResponse);
261
+ case 404:
262
+ throw new CortexAI.NotFoundError(_response.error.body, _response.rawResponse);
263
+ case 422:
264
+ throw new CortexAI.UnprocessableEntityError(_response.error.body, _response.rawResponse);
265
+ case 500:
266
+ throw new CortexAI.InternalServerError(_response.error.body, _response.rawResponse);
267
+ case 503:
268
+ throw new CortexAI.ServiceUnavailableError(_response.error.body, _response.rawResponse);
269
+ default:
270
+ throw new errors.CortexAIError({
271
+ statusCode: _response.error.statusCode,
272
+ body: _response.error.body,
273
+ rawResponse: _response.rawResponse,
274
+ });
275
+ }
276
+ }
277
+ switch (_response.error.reason) {
278
+ case "non-json":
279
+ throw new errors.CortexAIError({
280
+ statusCode: _response.error.statusCode,
281
+ body: _response.error.rawBody,
282
+ rawResponse: _response.rawResponse,
283
+ });
284
+ case "timeout":
285
+ throw new errors.CortexAITimeoutError("Timeout exceeded when calling DELETE /tenant/delete_sub_tenant.");
286
+ case "unknown":
287
+ throw new errors.CortexAIError({
288
+ message: _response.error.errorMessage,
289
+ rawResponse: _response.rawResponse,
290
+ });
128
291
  }
129
- return undefined;
292
+ }
293
+ async _getAuthorizationHeader() {
294
+ return `Bearer ${await core.Supplier.get(this._options.token)}`;
130
295
  }
131
296
  }
132
297
  exports.Tenant = Tenant;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * tenant_id: "tenant_id",
8
+ * sub_tenant_id: "sub_tenant_id"
9
+ * }
10
+ */
11
+ export interface TenantDeleteSubTenantRequest {
12
+ tenant_id: string;
13
+ sub_tenant_id: string;
14
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * tenant_id: "tenant_id"
8
+ * }
9
+ */
10
+ export interface TenantGetSubTenantIdsRequest {
11
+ tenant_id: string;
12
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -8,6 +8,8 @@
8
8
  * }
9
9
  */
10
10
  export interface TenantStatsRequest {
11
+ /** Unique identifier for the tenant/organization */
11
12
  tenant_id: string;
13
+ /** Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id */
12
14
  sub_tenant_id?: string;
13
15
  }
@@ -1 +1,3 @@
1
1
  export { type TenantStatsRequest } from "./TenantStatsRequest.js";
2
+ export { type TenantGetSubTenantIdsRequest } from "./TenantGetSubTenantIdsRequest.js";
3
+ export { type TenantDeleteSubTenantRequest } from "./TenantDeleteSubTenantRequest.js";
@@ -9,7 +9,7 @@ export declare namespace Upload {
9
9
  environment?: core.Supplier<environments.CortexAIEnvironment | string>;
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
- token?: core.Supplier<core.BearerToken | undefined>;
12
+ token: core.Supplier<core.BearerToken>;
13
13
  /** Additional headers to include in requests. */
14
14
  headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
15
15
  }
@@ -28,8 +28,14 @@ export declare namespace Upload {
28
28
  }
29
29
  export declare class Upload {
30
30
  protected readonly _options: Upload.Options;
31
- constructor(_options?: Upload.Options);
31
+ constructor(_options: Upload.Options);
32
32
  /**
33
+ * Upload multiple documents simultaneously for efficient bulk processing.
34
+ *
35
+ * This endpoint allows you to upload several files at once, which is ideal for large document collections or periodic data imports. Each file gets processed asynchronously, and you can track the progress of individual files using their returned file IDs.
36
+ *
37
+ * The system automatically handles file parsing, content extraction, and indexing across all uploaded documents. You'll receive confirmation once all files are queued for processing.
38
+ *
33
39
  * @param {CortexAI.BodyBatchUploadUploadBatchUploadPost} request
34
40
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
35
41
  *
@@ -51,6 +57,12 @@ export declare class Upload {
51
57
  batchUpload(request: CortexAI.BodyBatchUploadUploadBatchUploadPost, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.BatchUploadData>;
52
58
  private __batchUpload;
53
59
  /**
60
+ * Update multiple existing documents with new content and metadata.
61
+ *
62
+ * Use this endpoint when you need to replace or modify several documents that are already in your knowledge base. Each file must correspond to an existing source ID, ensuring that updates are applied to the correct documents.
63
+ *
64
+ * The system processes updates asynchronously, allowing you to continue working while your documents are re-indexed. Track the progress using the returned file IDs to know when updates are complete.
65
+ *
54
66
  * @param {CortexAI.BodyBatchUpdateUploadBatchUpdatePatch} request
55
67
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
56
68
  *
@@ -72,6 +84,12 @@ export declare class Upload {
72
84
  batchUpdate(request: CortexAI.BodyBatchUpdateUploadBatchUpdatePatch, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.BatchUploadData>;
73
85
  private __batchUpdate;
74
86
  /**
87
+ * Upload a single document for processing and indexing into your knowledge base.
88
+ *
89
+ * This endpoint accepts documents in various formats and processes them for search and retrieval. You can include custom metadata to help organize and categorize your content.
90
+ *
91
+ * The system extracts text content, processes it asynchronously, and makes it available for search queries. You can track the processing status using the returned file ID.
92
+ *
75
93
  * @param {CortexAI.BodyUploadFilesUploadUploadDocumentPost} request
76
94
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
77
95
  *
@@ -93,6 +111,12 @@ export declare class Upload {
93
111
  uploadDocument(request: CortexAI.BodyUploadFilesUploadUploadDocumentPost, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.SingleUploadData>;
94
112
  private __uploadDocument;
95
113
  /**
114
+ * Replace an existing document with updated content.
115
+ *
116
+ * This endpoint allows you to update a specific document that's already in your knowledge base. Provide the source ID of the document you want to modify, along with the new file content.
117
+ *
118
+ * The system will process your update asynchronously and re-index the document with the new content. You can monitor the progress using the returned file ID.
119
+ *
96
120
  * @param {CortexAI.BodyUpdateFileUploadUpdateDocumentPatch} request
97
121
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
98
122
  *
@@ -115,6 +139,12 @@ export declare class Upload {
115
139
  updateDocument(request: CortexAI.BodyUpdateFileUploadUpdateDocumentPatch, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.SingleUploadData>;
116
140
  private __updateDocument;
117
141
  /**
142
+ * Upload structured data from applications or APIs for indexing.
143
+ *
144
+ * This endpoint is designed for importing data from applications. If you are specifically using Cortex to provide search to an application, you should prefer this endpoint. It accepts structured source objects and allows you to clearly define contents of attachments
145
+ *
146
+ * The system processes each source asynchronously and makes the content available for search and retrieval. Use this when you need to integrate search and indexing from data in your applications into your knowledge base.
147
+ *
118
148
  * @param {CortexAI.UploadUploadAppSourcesRequest} request
119
149
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
120
150
  *
@@ -135,8 +165,11 @@ export declare class Upload {
135
165
  uploadAppSources(request: CortexAI.UploadUploadAppSourcesRequest, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.AppSourcesUploadData>;
136
166
  private __uploadAppSources;
137
167
  /**
138
- * Upload markdown content. If request.document_metadata contains a 'file_id' key (non-empty), it will be used as the file ID;
139
- * otherwise, a new file_id will be generated for that file. This allows file-specific IDs to be set directly in the metadata.
168
+ * Upload text or markdown content directly for processing.
169
+ *
170
+ * This endpoint accepts plain text or markdown-formatted content that you want to add to your knowledge base. It's perfect for notes, documentation, articles, or any text-based content you want to make searchable.
171
+ *
172
+ * You can include custom metadata to help organize and categorize your content. You can track the processing status using the returned file ID.
140
173
  *
141
174
  * @param {CortexAI.UploadUploadMarkdownRequest} request
142
175
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
@@ -160,8 +193,11 @@ export declare class Upload {
160
193
  uploadMarkdown(request: CortexAI.UploadUploadMarkdownRequest, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.SingleUploadData>;
161
194
  private __uploadMarkdown;
162
195
  /**
163
- * Upload markdown content. If request.document_metadata contains a 'file_id' key (non-empty), it will be used as the file ID;
164
- * otherwise, a new file_id will be generated for that file. This allows file-specific IDs to be set directly in the metadata.
196
+ * Upload text or markdown content directly for processing.
197
+ *
198
+ * This endpoint accepts plain text or markdown-formatted content that you want to add to your knowledge base. It's perfect for notes, documentation, articles, or any text-based content you want to make searchable.
199
+ *
200
+ * You can include custom metadata to help organize and categorize your content. You can track the processing status using the returned file ID.
165
201
  *
166
202
  * @param {CortexAI.UploadUploadTextRequest} request
167
203
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
@@ -185,6 +221,12 @@ export declare class Upload {
185
221
  uploadText(request: CortexAI.UploadUploadTextRequest, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.SingleUploadData>;
186
222
  private __uploadText;
187
223
  /**
224
+ * Update existing text or markdown content with new information.
225
+ *
226
+ * This endpoint allows you to modify text or markdown content that's already in your knowledge base. Provide the source ID of the content you want to update, along with the new text.
227
+ *
228
+ * The system will reprocess and re-index the updated content asynchronously. Use this when you need to correct information, add details, or refresh existing documentation.
229
+ *
188
230
  * @param {CortexAI.UploadUpdateMarkdownRequest} request
189
231
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
190
232
  *
@@ -208,6 +250,12 @@ export declare class Upload {
208
250
  updateMarkdown(request: CortexAI.UploadUpdateMarkdownRequest, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.SingleUploadData>;
209
251
  private __updateMarkdown;
210
252
  /**
253
+ * Update existing text or markdown content with new information.
254
+ *
255
+ * This endpoint allows you to modify text or markdown content that's already in your knowledge base. Provide the source ID of the content you want to update, along with the new text.
256
+ *
257
+ * The system will reprocess and re-index the updated content asynchronously. Use this when you need to correct information, add details, or refresh existing documentation.
258
+ *
211
259
  * @param {CortexAI.UploadUpdateTextRequest} request
212
260
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
213
261
  *
@@ -231,6 +279,12 @@ export declare class Upload {
231
279
  updateText(request: CortexAI.UploadUpdateTextRequest, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.SingleUploadData>;
232
280
  private __updateText;
233
281
  /**
282
+ * Upload pre-computed embeddings for advanced similarity search.
283
+ *
284
+ * This endpoint accepts vector embeddings that you've generated externally, allowing you to integrate with custom embedding models or existing vector databases. The embeddings represent chunks of your content as numerical vectors.
285
+ *
286
+ * The system stores these embeddings and makes them available for semantic search and similarity matching. Use this when you want to leverage specialized embedding models or have existing vector representations.
287
+ *
234
288
  * @param {CortexAI.EmbeddingsUploadRequest} request
235
289
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
236
290
  *
@@ -251,6 +305,12 @@ export declare class Upload {
251
305
  uploadEmbeddings(request: CortexAI.EmbeddingsUploadRequest, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.SingleUploadData>;
252
306
  private __uploadEmbeddings;
253
307
  /**
308
+ * Update existing embeddings with new vector representations.
309
+ *
310
+ * This endpoint allows you to modify embeddings that are already stored in your knowledge base. Provide updated vector representations for specific chunks of content, identified by their chunk IDs.
311
+ *
312
+ * The system will replace the existing embeddings with your new ones, ensuring that similarity searches reflect the most current vector representations. Use this when you need to update embeddings due to model improvements or content changes.
313
+ *
254
314
  * @param {CortexAI.EmbeddingsUpdateRequest} request
255
315
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
256
316
  *
@@ -270,6 +330,12 @@ export declare class Upload {
270
330
  updateEmbeddings(request: CortexAI.EmbeddingsUpdateRequest, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.SingleUploadData>;
271
331
  private __updateEmbeddings;
272
332
  /**
333
+ * Extract and index content from web pages automatically.
334
+ *
335
+ * This endpoint initiates web scraping for the specified URL, extracting the main content, text, and structure from the webpage. It's perfect for capturing articles, documentation, or any web content you want to include in your knowledge base.
336
+ *
337
+ * The system processes the webpage content asynchronously, cleaning and structuring the information for optimal search and retrieval. Use this when you need to add web content without manual copying and pasting.
338
+ *
273
339
  * @param {CortexAI.UploadScrapeWebpageRequest} request
274
340
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
275
341
  *
@@ -291,6 +357,12 @@ export declare class Upload {
291
357
  scrapeWebpage(request: CortexAI.UploadScrapeWebpageRequest, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.SingleUploadData>;
292
358
  private __scrapeWebpage;
293
359
  /**
360
+ * Update web scraping content with fresh data from the source URL.
361
+ *
362
+ * This endpoint refreshes the content for an existing web scraping job. Provide the source ID of the webpage content you want to update, and the system will re-scrape the URL to capture any changes.
363
+ *
364
+ * The updated content gets processed asynchronously and re-indexed in your knowledge base. Use this to keep web content current when the source pages are frequently updated.
365
+ *
294
366
  * @param {CortexAI.UploadUpdateWebpageRequest} request
295
367
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
296
368
  *
@@ -313,6 +385,12 @@ export declare class Upload {
313
385
  updateWebpage(request: CortexAI.UploadUpdateWebpageRequest, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.SingleUploadData>;
314
386
  private __updateWebpage;
315
387
  /**
388
+ * Remove documents and content from your knowledge base.
389
+ *
390
+ * This endpoint permanently deletes the specified sources from your knowledge base. Once deleted, the content will no longer be available for search or retrieval.
391
+ *
392
+ * Use this carefully as the action cannot be undone. The system will confirm successful deletion of each source ID you specify.
393
+ *
316
394
  * @param {CortexAI.DeleteMemoryRequest} request
317
395
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
318
396
  *
@@ -327,6 +405,12 @@ export declare class Upload {
327
405
  deleteSource(request: CortexAI.DeleteMemoryRequest, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<unknown>;
328
406
  private __deleteSource;
329
407
  /**
408
+ * Remove documents and content from your knowledge base.
409
+ *
410
+ * This endpoint permanently deletes the specified sources from your knowledge base. Once deleted, the content will no longer be available for search or retrieval.
411
+ *
412
+ * Use this carefully as the action cannot be undone. The system will confirm successful deletion of each source ID you specify.
413
+ *
330
414
  * @param {CortexAI.DeleteMemoryRequest} request
331
415
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
332
416
  *
@@ -341,10 +425,11 @@ export declare class Upload {
341
425
  deleteMemory(request: CortexAI.DeleteMemoryRequest, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<unknown>;
342
426
  private __deleteMemory;
343
427
  /**
344
- * Verify the processing status of an uploaded file.
428
+ * Check the current processing status of your uploaded content.
429
+ *
430
+ * This endpoint allows you to monitor the progress of documents, text, or other content you've uploaded. Simply provide the file ID to see whether processing is complete, still in progress, or if any errors occurred.
345
431
  *
346
- * Returns:
347
- * ProcessingStatusResponse: Processing status information
432
+ * Use this to determine when your content is ready for search and retrieval, or to troubleshoot any processing issues.
348
433
  *
349
434
  * @param {CortexAI.UploadVerifyProcessingRequest} request
350
435
  * @param {Upload.RequestOptions} requestOptions - Request-specific configuration.
@@ -364,5 +449,5 @@ export declare class Upload {
364
449
  */
365
450
  verifyProcessing(request: CortexAI.UploadVerifyProcessingRequest, requestOptions?: Upload.RequestOptions): core.HttpResponsePromise<CortexAI.ProcessingStatus>;
366
451
  private __verifyProcessing;
367
- protected _getAuthorizationHeader(): Promise<string | undefined>;
452
+ protected _getAuthorizationHeader(): Promise<string>;
368
453
  }