@usecortex_ai/node 0.1.2 → 0.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.
Files changed (111) hide show
  1. package/README.md +1 -44
  2. package/dist/Client.d.ts +5 -11
  3. package/dist/Client.js +12 -63
  4. package/dist/api/resources/document/client/Client.d.ts +59 -0
  5. package/dist/api/resources/document/client/Client.js +128 -0
  6. package/dist/api/resources/document/client/index.d.ts +1 -0
  7. package/dist/api/resources/document/client/index.js +2 -0
  8. package/dist/api/resources/document/index.d.ts +1 -0
  9. package/dist/api/resources/document/index.js +17 -0
  10. package/dist/api/resources/embeddings/client/Client.d.ts +13 -38
  11. package/dist/api/resources/embeddings/client/Client.js +12 -41
  12. package/dist/api/resources/embeddings/client/requests/EmbeddingsCreateCollectionRequest.d.ts +1 -0
  13. package/dist/api/resources/embeddings/client/requests/EmbeddingsDeleteRequest.d.ts +3 -0
  14. package/dist/api/resources/embeddings/client/requests/EmbeddingsSearchRequest.d.ts +3 -0
  15. package/dist/api/resources/embeddings/client/requests/GetEmbeddingsBasedOnChunkIdsRequest.d.ts +3 -0
  16. package/dist/api/resources/fetch/client/Client.d.ts +3 -3
  17. package/dist/api/resources/fetch/client/Client.js +2 -6
  18. package/dist/api/resources/fetch/client/requests/FetchContentRequest.d.ts +5 -0
  19. package/dist/api/resources/index.d.ts +1 -0
  20. package/dist/api/resources/index.js +2 -1
  21. package/dist/api/resources/search/client/Client.d.ts +11 -38
  22. package/dist/api/resources/search/client/Client.js +10 -41
  23. package/dist/api/resources/search/client/requests/FullTextSearchRequest.d.ts +5 -0
  24. package/dist/api/resources/search/client/requests/QnARequest.d.ts +17 -0
  25. package/dist/api/resources/search/client/requests/SearchRequest.d.ts +9 -1
  26. package/dist/api/resources/sources/client/Client.d.ts +15 -35
  27. package/dist/api/resources/sources/client/Client.js +14 -97
  28. package/dist/api/resources/sources/client/requests/SourcesGetAllRequest.d.ts +2 -0
  29. package/dist/api/resources/sources/client/requests/index.d.ts +0 -1
  30. package/dist/api/resources/tenant/client/Client.d.ts +55 -5
  31. package/dist/api/resources/tenant/client/Client.js +173 -8
  32. package/dist/api/resources/tenant/client/requests/TenantDeleteSubTenantRequest.d.ts +14 -0
  33. package/dist/api/resources/tenant/client/requests/TenantDeleteSubTenantRequest.js +5 -0
  34. package/dist/api/resources/tenant/client/requests/TenantGetSubTenantIdsRequest.d.ts +12 -0
  35. package/dist/api/resources/tenant/client/requests/TenantGetSubTenantIdsRequest.js +5 -0
  36. package/dist/api/resources/tenant/client/requests/TenantStatsRequest.d.ts +2 -0
  37. package/dist/api/resources/tenant/client/requests/index.d.ts +2 -0
  38. package/dist/api/resources/upload/client/Client.d.ts +95 -10
  39. package/dist/api/resources/upload/client/Client.js +94 -25
  40. package/dist/api/resources/upload/client/requests/BodyBatchUpdateUploadBatchUpdatePatch.d.ts +17 -1
  41. package/dist/api/resources/upload/client/requests/BodyBatchUploadUploadBatchUploadPost.d.ts +16 -1
  42. package/dist/api/resources/upload/client/requests/BodyUpdateFileUploadUpdateDocumentPatch.d.ts +17 -1
  43. package/dist/api/resources/upload/client/requests/BodyUploadFilesUploadUploadDocumentPost.d.ts +16 -1
  44. package/dist/api/resources/upload/client/requests/EmbeddingsUpdateRequest.d.ts +3 -0
  45. package/dist/api/resources/upload/client/requests/EmbeddingsUploadRequest.d.ts +4 -0
  46. package/dist/api/resources/upload/client/requests/UploadScrapeWebpageRequest.d.ts +4 -0
  47. package/dist/api/resources/upload/client/requests/UploadUpdateMarkdownRequest.d.ts +3 -0
  48. package/dist/api/resources/upload/client/requests/UploadUpdateTextRequest.d.ts +3 -0
  49. package/dist/api/resources/upload/client/requests/UploadUpdateWebpageRequest.d.ts +4 -0
  50. package/dist/api/resources/upload/client/requests/UploadUploadAppSourcesRequest.d.ts +3 -0
  51. package/dist/api/resources/upload/client/requests/UploadUploadMarkdownRequest.d.ts +2 -0
  52. package/dist/api/resources/upload/client/requests/UploadUploadTextRequest.d.ts +2 -0
  53. package/dist/api/resources/upload/client/requests/UploadVerifyProcessingRequest.d.ts +2 -0
  54. package/dist/api/resources/user/client/Client.d.ts +9 -6
  55. package/dist/api/resources/user/client/Client.js +8 -9
  56. package/dist/api/resources/user/client/requests/BodyCreateTenantUserCreateTenantPost.d.ts +1 -0
  57. package/dist/api/resources/userMemory/client/Client.d.ts +89 -21
  58. package/dist/api/resources/userMemory/client/Client.js +183 -33
  59. package/dist/api/resources/userMemory/client/requests/AddUserMemoryRequest.d.ts +18 -0
  60. package/dist/api/resources/userMemory/client/requests/AddUserMemoryRequest.js +5 -0
  61. package/dist/api/resources/userMemory/client/requests/GenerateUserMemoryRequest.d.ts +21 -0
  62. package/dist/api/resources/userMemory/client/requests/GenerateUserMemoryRequest.js +5 -0
  63. package/dist/api/resources/userMemory/client/requests/RetrieveUserMemoryRequest.d.ts +20 -0
  64. package/dist/api/resources/userMemory/client/requests/RetrieveUserMemoryRequest.js +5 -0
  65. package/dist/api/resources/userMemory/client/requests/UserMemoryDeleteUserMemoryRequest.d.ts +5 -3
  66. package/dist/api/resources/userMemory/client/requests/UserMemoryListUserMemoriesRequest.d.ts +4 -3
  67. package/dist/api/resources/userMemory/client/requests/index.d.ts +3 -3
  68. package/dist/api/types/AddUserMemoryResponse.d.ts +14 -0
  69. package/dist/api/types/AddUserMemoryResponse.js +5 -0
  70. package/dist/api/types/AppSourcesUploadData.d.ts +3 -1
  71. package/dist/api/types/AttachmentModel.d.ts +7 -0
  72. package/dist/api/types/BatchUploadData.d.ts +3 -1
  73. package/dist/api/types/BodyScrapeWebpageUploadScrapeWebpagePost.d.ts +0 -1
  74. package/dist/api/types/BodyUpdateScrapeJobUploadUpdateWebpagePatch.d.ts +0 -1
  75. package/dist/api/types/ContentModel.d.ts +6 -0
  76. package/dist/api/types/DeleteMemoryRequest.d.ts +3 -0
  77. package/dist/api/types/DeleteSources.d.ts +7 -0
  78. package/dist/api/types/DeleteSources.js +5 -0
  79. package/dist/api/types/DeleteSubTenantData.d.ts +15 -0
  80. package/dist/api/types/DeleteSubTenantData.js +5 -0
  81. package/dist/api/types/DeleteUserMemoryResponse.d.ts +12 -0
  82. package/dist/api/types/DeleteUserMemoryResponse.js +5 -0
  83. package/dist/api/types/EmbeddingsCreateCollectionData.d.ts +4 -0
  84. package/dist/api/types/EmbeddingsDeleteData.d.ts +4 -0
  85. package/dist/api/types/EmbeddingsGetData.d.ts +4 -0
  86. package/dist/api/types/EmbeddingsSearchData.d.ts +4 -0
  87. package/dist/api/types/ErrorResponse.d.ts +0 -1
  88. package/dist/api/types/FetchContentData.d.ts +4 -1
  89. package/dist/api/types/FileUploadResult.d.ts +2 -0
  90. package/dist/api/types/GenerateUserMemoryResponse.d.ts +13 -0
  91. package/dist/api/types/GenerateUserMemoryResponse.js +5 -0
  92. package/dist/api/types/ListSourcesResponse.d.ts +3 -0
  93. package/dist/api/types/ListUserMemoriesResponse.d.ts +13 -0
  94. package/dist/api/types/ListUserMemoriesResponse.js +5 -0
  95. package/dist/api/types/MarkdownUploadRequest.d.ts +12 -2
  96. package/dist/api/types/ProcessingStatus.d.ts +3 -0
  97. package/dist/api/types/Relations.d.ts +2 -0
  98. package/dist/api/types/RetrieveUserMemoryResponse.d.ts +13 -0
  99. package/dist/api/types/RetrieveUserMemoryResponse.js +5 -0
  100. package/dist/api/types/SearchChunk.d.ts +11 -6
  101. package/dist/api/types/SingleUploadData.d.ts +3 -1
  102. package/dist/api/types/Source.d.ts +7 -8
  103. package/dist/api/types/SourceModel.d.ts +21 -2
  104. package/dist/api/types/SubTenantIdsData.d.ts +6 -1
  105. package/dist/api/types/TenantCreateData.d.ts +4 -0
  106. package/dist/api/types/TenantStats.d.ts +5 -0
  107. package/dist/api/types/UserMemory.d.ts +12 -0
  108. package/dist/api/types/UserMemory.js +5 -0
  109. package/dist/api/types/index.d.ts +8 -1
  110. package/dist/api/types/index.js +8 -1
  111. package/package.json +1 -1
@@ -0,0 +1,20 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * tenant_id: "tenant_id",
8
+ * query: "query"
9
+ * }
10
+ */
11
+ export interface RetrieveUserMemoryRequest {
12
+ /** Unique identifier for the tenant/organization */
13
+ tenant_id: string;
14
+ /** Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id */
15
+ sub_tenant_id?: string;
16
+ /** Maximum number of memories to return (default: 5) */
17
+ max_count?: number;
18
+ /** Search query to find relevant user memories */
19
+ query: string;
20
+ }
@@ -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 });
@@ -5,12 +5,14 @@
5
5
  * @example
6
6
  * {
7
7
  * tenant_id: "tenant_id",
8
- * memory_id: "memory_id",
9
- * sub_tenant_id: "sub_tenant_id"
8
+ * memory_id: "memory_id"
10
9
  * }
11
10
  */
12
11
  export interface UserMemoryDeleteUserMemoryRequest {
12
+ /** Unique identifier for the tenant/organization */
13
13
  tenant_id: string;
14
+ /** Unique identifier of the memory to delete */
14
15
  memory_id: string;
15
- sub_tenant_id: string;
16
+ /** Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id */
17
+ sub_tenant_id?: string;
16
18
  }
@@ -4,11 +4,12 @@
4
4
  /**
5
5
  * @example
6
6
  * {
7
- * tenant_id: "tenant_id",
8
- * sub_tenant_id: "sub_tenant_id"
7
+ * tenant_id: "tenant_id"
9
8
  * }
10
9
  */
11
10
  export interface UserMemoryListUserMemoriesRequest {
11
+ /** Unique identifier for the tenant/organization */
12
12
  tenant_id: string;
13
- sub_tenant_id: string;
13
+ /** Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id */
14
+ sub_tenant_id?: string;
14
15
  }
@@ -1,5 +1,5 @@
1
1
  export { type UserMemoryListUserMemoriesRequest } from "./UserMemoryListUserMemoriesRequest.js";
2
2
  export { type UserMemoryDeleteUserMemoryRequest } from "./UserMemoryDeleteUserMemoryRequest.js";
3
- export { type UserMemoryRetrieveUserMemoryRequest } from "./UserMemoryRetrieveUserMemoryRequest.js";
4
- export { type UserMemoryGenerateUserMemoryRequest } from "./UserMemoryGenerateUserMemoryRequest.js";
5
- export { type UserMemoryAddUserMemoryRequest } from "./UserMemoryAddUserMemoryRequest.js";
3
+ export { type RetrieveUserMemoryRequest } from "./RetrieveUserMemoryRequest.js";
4
+ export { type GenerateUserMemoryRequest } from "./GenerateUserMemoryRequest.js";
5
+ export { type AddUserMemoryRequest } from "./AddUserMemoryRequest.js";
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Response model for adding a new user memory.
6
+ */
7
+ export interface AddUserMemoryResponse {
8
+ /** Indicates whether the memory addition operation was successful */
9
+ success: boolean;
10
+ /** Confirms whether the memory was successfully stored in the system */
11
+ user_memory_added: boolean;
12
+ /** Unique identifier assigned to the newly created memory */
13
+ memory_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 });
@@ -3,7 +3,9 @@
3
3
  */
4
4
  import * as CortexAI from "../index.js";
5
5
  export interface AppSourcesUploadData {
6
+ /** List of successfully uploaded app source for indexing */
6
7
  uploaded: CortexAI.FileUploadResult[];
8
+ /** Status message indicating app sources upload scheduled */
9
+ message: string;
7
10
  success?: boolean;
8
- message?: string;
9
11
  }
@@ -3,11 +3,18 @@
3
3
  */
4
4
  import * as CortexAI from "../index.js";
5
5
  export interface AttachmentModel {
6
+ /** Unique identifier for the attachment. */
6
7
  id?: string;
8
+ /** Public or internal URL referencing the attachment resource. */
7
9
  url?: string;
10
+ /** Human-readable title or filename of the attachment. */
8
11
  title?: string;
12
+ /** MIME type of the attachment (e.g., application/pdf). */
9
13
  content_type?: string;
14
+ /** Direct URL for content retrieval when different from the reference URL. */
10
15
  content_url?: string;
16
+ /** Additional attachment attributes defined by the tenant (free-form). */
11
17
  misc?: Record<string, unknown>;
18
+ /** Structured content payload for the attachment when available. */
12
19
  content?: CortexAI.ContentModel;
13
20
  }
@@ -3,7 +3,9 @@
3
3
  */
4
4
  import * as CortexAI from "../index.js";
5
5
  export interface BatchUploadData {
6
+ /** List of successfully uploaded files for processing */
6
7
  uploaded: CortexAI.FileUploadResult[];
8
+ /** Status message indicating batch document parsing scheduled */
9
+ message: string;
7
10
  success?: boolean;
8
- message?: string;
9
11
  }
@@ -2,5 +2,4 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface BodyScrapeWebpageUploadScrapeWebpagePost {
5
- relations?: string;
6
5
  }
@@ -2,5 +2,4 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface BodyUpdateScrapeJobUploadUpdateWebpagePatch {
5
- relations?: string;
6
5
  }
@@ -2,10 +2,16 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface ContentModel {
5
+ /** Plain text content extracted or provided for indexing. */
5
6
  text?: string;
7
+ /** Base64-encoded HTML content preserving structure and formatting. */
6
8
  html_base64?: string;
9
+ /** Base64-encoded CSV data for tabular content ingestion. */
7
10
  csv_base64?: string;
11
+ /** Raw Markdown content to be indexed as rich text. */
8
12
  markdown?: string;
13
+ /** List of file descriptors associated with the source (e.g., filenames, sizes). */
9
14
  files?: Record<string, unknown>[];
15
+ /** Optional layout metadata such as sections or blocks to guide chunking. */
10
16
  layout?: Record<string, unknown>[];
11
17
  }
@@ -2,7 +2,10 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface DeleteMemoryRequest {
5
+ /** Unique identifier for the tenant/organization */
5
6
  tenant_id: string;
7
+ /** List of source IDs to delete */
6
8
  source_ids: string[];
9
+ /** Optional sub-tenant identifier for organizing data within a tenant. If not provided, defaults to tenant_id */
7
10
  sub_tenant_id?: string;
8
11
  }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface DeleteSources {
5
+ success?: boolean;
6
+ message?: string;
7
+ }
@@ -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,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface DeleteSubTenantData {
5
+ /** The status of the deletion operation. */
6
+ status: string;
7
+ /** The tenant ID from which the sub-tenant was deleted. */
8
+ tenant_id: string;
9
+ /** The ID of the sub-tenant that was deleted. */
10
+ sub_tenant_id: string;
11
+ /** Indicates whether the sub-tenant deletion was successful. */
12
+ success?: boolean;
13
+ /** Response message describing the operation result. */
14
+ message?: string;
15
+ }
@@ -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
+ * Response model for deleting a user memory.
6
+ */
7
+ export interface DeleteUserMemoryResponse {
8
+ /** Indicates whether the memory deletion operation was successful */
9
+ success: boolean;
10
+ /** Confirms whether the specific memory was successfully deleted */
11
+ user_memory_deleted: boolean;
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 });
@@ -2,8 +2,12 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface EmbeddingsCreateCollectionData {
5
+ /** Identifier for the tenant/organization */
5
6
  tenant_id: string;
7
+ /** Identifier for the sub-tenant within the tenant */
6
8
  sub_tenant_id: string;
9
+ /** Indicates whether the embeddings tenant creation completed successfully */
7
10
  success?: boolean;
11
+ /** Status message about the tenant creation operation */
8
12
  message?: string;
9
13
  }
@@ -2,8 +2,12 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface EmbeddingsDeleteData {
5
+ /** Total number of embeddings that were successfully deleted */
5
6
  total_deleted: number;
7
+ /** Dictionary mapping chunk IDs to their deletion status (true if deleted successfully). Example: {'chunk_1234': true} */
6
8
  status: Record<string, boolean>;
9
+ /** Indicates whether the embeddings deletion operation completed successfully */
7
10
  success?: boolean;
11
+ /** Status message about the deletion operation */
8
12
  message?: string;
9
13
  }
@@ -2,8 +2,12 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface EmbeddingsGetData {
5
+ /** Dictionary mapping chunk IDs to their embedding vectors (lists of float values) */
5
6
  embeddings: Record<string, number[]>;
7
+ /** List of chunk IDs that were not found in the embeddings collection */
6
8
  not_found_chunk_ids: string[];
9
+ /** Indicates whether the embeddings retrieval operation completed successfully */
7
10
  success?: boolean;
11
+ /** Status message about the retrieval operation */
8
12
  message?: string;
9
13
  }
@@ -2,8 +2,12 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface EmbeddingsSearchData {
5
+ /** List of chunk IDs that match the search query */
5
6
  chunk_ids: string[];
7
+ /** Similarity scores for each matching chunk (higher is more similar) */
6
8
  scores: number[];
9
+ /** Indicates whether the embeddings search operation completed successfully */
7
10
  success?: boolean;
11
+ /** Status message about the search operation */
8
12
  message?: string;
9
13
  }
@@ -5,5 +5,4 @@ export interface ErrorResponse {
5
5
  success?: boolean;
6
6
  message?: string;
7
7
  error_code?: string;
8
- data?: Record<string, unknown>;
9
8
  }
@@ -2,9 +2,12 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface FetchContentData {
5
+ /** Unique identifier for the file being fetched */
5
6
  file_id: string;
6
- url: string;
7
+ /** Content of the fetched file */
7
8
  file_content?: string;
9
+ /** Indicates whether the fetch operation completed successfully */
8
10
  success?: boolean;
11
+ /** Status message about the fetch operation */
9
12
  message?: string;
10
13
  }
@@ -2,6 +2,8 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface FileUploadResult {
5
+ /** Unique identifier for the file being processed */
5
6
  file_id: string;
7
+ /** Name of the uploaded file, if provided */
6
8
  filename?: string;
7
9
  }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as CortexAI from "../index.js";
5
+ /**
6
+ * Response model for AI-generated user memories.
7
+ */
8
+ export interface GenerateUserMemoryResponse {
9
+ /** Indicates whether the memory generation operation was successful */
10
+ success: boolean;
11
+ /** Array of AI-generated memories based on your query and user context */
12
+ generated_user_memories?: CortexAI.UserMemory[];
13
+ }
@@ -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 });
@@ -3,7 +3,10 @@
3
3
  */
4
4
  import * as CortexAI from "../index.js";
5
5
  export interface ListSourcesResponse {
6
+ /** List of source documents retrieved */
6
7
  sources: (CortexAI.Source | undefined)[];
8
+ /** Indicates whether the request was successful */
7
9
  success?: boolean;
10
+ /** Response message describing the operation result */
8
11
  message?: string;
9
12
  }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as CortexAI from "../index.js";
5
+ /**
6
+ * Response model for listing all user memories.
7
+ */
8
+ export interface ListUserMemoriesResponse {
9
+ /** Indicates whether the memory listing operation was successful */
10
+ success: boolean;
11
+ /** Array of all user memories associated with your tenant */
12
+ user_memories?: CortexAI.UserMemory[];
13
+ }
@@ -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 });
@@ -1,10 +1,20 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as CortexAI from "../index.js";
5
4
  export interface MarkdownUploadRequest {
5
+ /** The text or markdown content to upload */
6
6
  content: string;
7
+ /**
8
+ * JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
9
+ *
10
+ * Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
11
+ */
7
12
  tenant_metadata?: Record<string, unknown>;
13
+ /**
14
+ * JSON string containing document-specific metadata (e.g., title, author, file_id). If file_id is not provided, the system will generate an ID automatically.
15
+ *
16
+ * Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
17
+ *
18
+ */
8
19
  document_metadata?: Record<string, unknown>;
9
- relations?: CortexAI.Relations;
10
20
  }
@@ -2,8 +2,11 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface ProcessingStatus {
5
+ /** Identifier for the file whose status is being retrieved */
5
6
  file_id: string;
7
+ /** Current status of the file. Possible values are 'queued', 'processing', 'completed', 'failed' */
6
8
  indexing_status: string;
7
9
  success?: boolean;
10
+ /** Detailed status message about the processing operation */
8
11
  message?: string;
9
12
  }
@@ -2,6 +2,8 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface Relations {
5
+ /** List of cortex source IDs to directly relate with */
5
6
  cortex_source_ids?: string[];
7
+ /** Key value pairs to allow cortex to automatically discover relations */
6
8
  auto_discovery?: Record<string, unknown>;
7
9
  }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as CortexAI from "../index.js";
5
+ /**
6
+ * Response model for retrieving user memories through semantic search.
7
+ */
8
+ export interface RetrieveUserMemoryResponse {
9
+ /** Indicates whether the memory retrieval operation was successful */
10
+ success: boolean;
11
+ /** Array of user memories ranked by relevance to your search query */
12
+ retrieved_user_memories?: CortexAI.UserMemory[];
13
+ }
@@ -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 });
@@ -1,22 +1,27 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as CortexAI from "../index.js";
5
4
  export interface SearchChunk {
5
+ /** Unique identifier for this content chunk */
6
6
  chunk_uuid: string;
7
+ /** Unique identifier for the source document */
7
8
  source_id: string;
9
+ /** The actual text content of this chunk */
8
10
  chunk_content: string;
11
+ /** Type of the source document (file, webpage, etc.) */
9
12
  source_type?: string;
13
+ /** When the source document was originally uploaded */
10
14
  source_upload_time?: string;
15
+ /** Title or name of the source document */
11
16
  source_title?: string;
17
+ /** When the source document was last modified */
12
18
  source_last_updated_time?: string;
13
- source_collection?: string[];
19
+ /** Layout of the chunk in original document. You will generally receive a stringified dict with 2 keys, `offsets` and `page`(optional). Offsets will have `document_level_start_index` and `page_level_start_index`(optional) */
14
20
  layout?: string;
15
- source_url?: string;
16
- version?: string;
21
+ /** Score indicating how relevant this chunk is to your search query, with higher values indicating better matches */
17
22
  relevancy_score?: number;
18
- cortex_metadata?: Record<string, unknown>;
23
+ /** Metadata extracted from the source document */
19
24
  document_metadata?: Record<string, unknown>;
25
+ /** Custom metadata associated with your tenant */
20
26
  tenant_metadata?: Record<string, unknown>;
21
- extra_context?: CortexAI.ExtendedContext;
22
27
  }
@@ -2,7 +2,9 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface SingleUploadData {
5
+ /** Unique identifier for the file being processed */
5
6
  file_id: string;
7
+ /** Status message indicating document parsing scheduled or update completed */
8
+ message: string;
6
9
  success?: boolean;
7
- message?: string;
8
10
  }
@@ -1,20 +1,19 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as CortexAI from "../index.js";
5
4
  export interface Source {
5
+ /** Unique identifier for the source document */
6
6
  id: string;
7
+ /** Display title of the source document */
7
8
  title: string;
9
+ /** Type of content (document, file, text, etc.) */
8
10
  type: string;
11
+ /** When the source was originally created or uploaded */
9
12
  timestamp: string;
10
- content: CortexAI.SourceContent;
11
- collections?: string[];
13
+ /** Brief summary or description of the source content */
12
14
  description?: string;
13
- note?: string;
14
- url?: string;
15
- cortex_metadata?: Record<string, unknown>;
15
+ /** Additional metadata specific to the document */
16
16
  document_metadata?: Record<string, unknown>;
17
+ /** Metadata related to the tenant and organizational context */
17
18
  tenant_metadata?: Record<string, unknown>;
18
- meta?: Record<string, unknown>;
19
- attachments?: unknown[];
20
19
  }
@@ -3,18 +3,37 @@
3
3
  */
4
4
  import * as CortexAI from "../index.js";
5
5
  export interface SourceModel {
6
- collections?: string[];
6
+ /** Stable, unique identifier for the source. If omitted, one may be generated upstream. */
7
7
  id?: string;
8
+ /** Short human-readable title for the source. */
8
9
  title?: string;
10
+ /** High-level category of the source (e.g., document, email, ticket). */
9
11
  type?: string;
12
+ /** Optional long-form description providing additional context. */
10
13
  description?: string;
14
+ /** Free-form notes for internal use or ingestion hints. */
11
15
  note?: string;
16
+ /** Canonical URL or reference link associated with the source. */
12
17
  url?: string;
18
+ /** Creation or last-updated timestamp of the source in ISO-8601 format. */
13
19
  timestamp?: string;
20
+ /** Primary content payload used for indexing and retrieval. */
14
21
  content?: CortexAI.ContentModel;
15
- cortex_metadata?: Record<string, unknown>;
22
+ /**
23
+ * JSON string containing tenant-level document metadata (e.g., department, compliance_tag)
24
+ *
25
+ * Example: > "{"department":"Finance","compliance_tag":"GDPR"}"
26
+ */
16
27
  tenant_metadata?: Record<string, unknown>;
28
+ /**
29
+ * JSON string containing document-specific metadata (e.g., title, author, file_id). If file_id is not provided, the system will generate an ID automatically.
30
+ *
31
+ * Example: > "{"title":"Q1 Report.pdf","author":"Alice Smith","file_id":"custom_file_123"}"
32
+ *
33
+ */
17
34
  document_metadata?: Record<string, unknown>;
35
+ /** System-provided attributes (e.g., app_name, local file size) not intended for search filtering. */
18
36
  meta?: Record<string, unknown>;
37
+ /** Attachments related to the source such as images, PDFs, or supplemental files. */
19
38
  attachments?: CortexAI.AttachmentModel[];
20
39
  }
@@ -2,9 +2,14 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface SubTenantIdsData {
5
- collection_name: string;
5
+ /** The tenant ID that was queried */
6
+ tenant_id: string;
7
+ /** Array of all sub-tenant IDs within the tenant */
6
8
  sub_tenant_ids: string[];
9
+ /** Total number of sub-tenants found */
7
10
  count: number;
11
+ /** Indicates whether the sub-tenant retrieval was successful */
8
12
  success?: boolean;
13
+ /** Response message describing the operation result */
9
14
  message?: string;
10
15
  }
@@ -2,8 +2,12 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface TenantCreateData {
5
+ /** Current status of the tenant creation process */
5
6
  status: string;
7
+ /** Unique identifier assigned to the new tenant */
6
8
  tenant_id: string;
9
+ /** Indicates whether the tenant creation was successful */
7
10
  success?: boolean;
11
+ /** Response message describing the creation result */
8
12
  message?: string;
9
13
  }
@@ -2,9 +2,14 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface TenantStats {
5
+ /** Total number of objects stored for this tenant */
5
6
  object_count: number;
7
+ /** Name identifier for the tenant */
6
8
  tenant_name: string;
9
+ /** Dimensions of the vector embeddings used for this tenant. Null when the tenant is empty. */
7
10
  vector_dimension?: number;
11
+ /** Indicates whether the stats retrieval was successful */
8
12
  success?: boolean;
13
+ /** Response message describing the operation result */
9
14
  message?: string;
10
15
  }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Represents a user memory stored in the system.
6
+ */
7
+ export interface UserMemory {
8
+ /** Unique identifier for the user memory */
9
+ memory_id: string;
10
+ /** The actual memory content text that was stored */
11
+ memory_content: 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 });