lemma-sdk 0.2.23 → 0.2.24

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 (54) hide show
  1. package/README.md +3 -3
  2. package/dist/auth.js +0 -1
  3. package/dist/browser/lemma-client.js +167 -104
  4. package/dist/namespaces/assistants.d.ts +21 -3
  5. package/dist/namespaces/assistants.js +13 -7
  6. package/dist/namespaces/files.d.ts +9 -4
  7. package/dist/namespaces/files.js +52 -14
  8. package/dist/namespaces/records.d.ts +10 -2
  9. package/dist/namespaces/records.js +15 -9
  10. package/dist/openapi_client/index.d.ts +6 -5
  11. package/dist/openapi_client/index.js +2 -2
  12. package/dist/openapi_client/models/CreateConversationRequest.d.ts +1 -1
  13. package/dist/openapi_client/models/CreateFolderRequest.d.ts +1 -2
  14. package/dist/openapi_client/models/CreateTriggerRequest.d.ts +0 -1
  15. package/dist/openapi_client/models/DatastoreFileUploadRequest.d.ts +1 -1
  16. package/dist/openapi_client/models/DatastoreQueryRequest.d.ts +9 -0
  17. package/dist/openapi_client/models/DatastoreQueryResponse.d.ts +7 -0
  18. package/dist/openapi_client/models/DirectoryTreeNode.d.ts +7 -0
  19. package/dist/openapi_client/models/DirectoryTreeResponse.d.ts +6 -0
  20. package/dist/openapi_client/models/DirectoryTreeResponse.js +1 -0
  21. package/dist/openapi_client/models/FileResponse.d.ts +4 -6
  22. package/dist/openapi_client/models/FileSearchRequest.d.ts +5 -3
  23. package/dist/openapi_client/models/FileSearchResultSchema.d.ts +1 -0
  24. package/dist/openapi_client/models/FileSearchScopeMode.d.ts +4 -0
  25. package/dist/openapi_client/models/FileSearchScopeMode.js +9 -0
  26. package/dist/openapi_client/models/TableResponse.d.ts +1 -1
  27. package/dist/openapi_client/models/TriggerResponse.d.ts +0 -1
  28. package/dist/openapi_client/models/update.d.ts +2 -2
  29. package/dist/openapi_client/services/ConversationsService.d.ts +3 -2
  30. package/dist/openapi_client/services/ConversationsService.js +5 -3
  31. package/dist/openapi_client/services/FilesService.d.ts +34 -25
  32. package/dist/openapi_client/services/FilesService.js +75 -47
  33. package/dist/openapi_client/services/QueryService.d.ts +14 -0
  34. package/dist/openapi_client/services/QueryService.js +26 -0
  35. package/dist/openapi_client/services/RecordsService.d.ts +7 -13
  36. package/dist/openapi_client/services/RecordsService.js +12 -26
  37. package/dist/react/components/AssistantEmbedded.d.ts +1 -1
  38. package/dist/react/components/AssistantEmbedded.js +2 -1
  39. package/dist/react/useAssistantController.d.ts +5 -1
  40. package/dist/react/useAssistantController.js +7 -3
  41. package/dist/react/useAssistantSession.d.ts +12 -0
  42. package/dist/react/useAssistantSession.js +24 -5
  43. package/dist/types.d.ts +10 -4
  44. package/package.json +1 -1
  45. package/dist/openapi_client/models/RecordFilter.d.ts +0 -15
  46. package/dist/openapi_client/models/RecordFilterOperator.d.ts +0 -10
  47. package/dist/openapi_client/models/RecordFilterOperator.js +0 -15
  48. package/dist/openapi_client/models/RecordQueryRequest.d.ts +0 -20
  49. package/dist/openapi_client/models/RecordSort.d.ts +0 -11
  50. package/dist/openapi_client/models/RecordSortDirection.d.ts +0 -4
  51. package/dist/openapi_client/models/RecordSortDirection.js +0 -9
  52. /package/dist/openapi_client/models/{RecordFilter.js → DatastoreQueryRequest.js} +0 -0
  53. /package/dist/openapi_client/models/{RecordQueryRequest.js → DatastoreQueryResponse.js} +0 -0
  54. /package/dist/openapi_client/models/{RecordSort.js → DirectoryTreeNode.js} +0 -0
@@ -1,5 +1,34 @@
1
1
  import { SearchMethod } from "../openapi_client/models/SearchMethod.js";
2
2
  import { FilesService } from "../openapi_client/services/FilesService.js";
3
+ function joinDatastorePath(basePath, leaf) {
4
+ const normalizedLeaf = leaf.replace(/^\/+/, "");
5
+ const trimmedBase = (basePath ?? "/").trim();
6
+ const normalizedBase = trimmedBase.length > 0 ? trimmedBase : "/";
7
+ if (normalizedBase === "/") {
8
+ return `/${normalizedLeaf}`;
9
+ }
10
+ return `${normalizedBase.replace(/\/+$/, "")}/${normalizedLeaf}`;
11
+ }
12
+ function getDirectoryPath(path) {
13
+ const normalized = path.trim();
14
+ if (!normalized || normalized === "/") {
15
+ return "/";
16
+ }
17
+ const withoutTrailing = normalized.replace(/\/+$/, "");
18
+ const index = withoutTrailing.lastIndexOf("/");
19
+ if (index <= 0) {
20
+ return "/";
21
+ }
22
+ return withoutTrailing.slice(0, index);
23
+ }
24
+ function getBaseName(path) {
25
+ const normalized = path.trim().replace(/\/+$/, "");
26
+ const index = normalized.lastIndexOf("/");
27
+ if (index === -1) {
28
+ return normalized;
29
+ }
30
+ return normalized.slice(index + 1);
31
+ }
3
32
  export class FilesNamespace {
4
33
  client;
5
34
  http;
@@ -10,13 +39,14 @@ export class FilesNamespace {
10
39
  this.podId = podId;
11
40
  }
12
41
  list(options = {}) {
13
- return this.client.request(() => FilesService.fileList(this.podId(), options.parentId, options.limit ?? 100, options.pageToken));
42
+ const directoryPath = options.directoryPath ?? options.parentId ?? "/";
43
+ return this.client.request(() => FilesService.fileList(this.podId(), directoryPath, options.limit ?? 100, options.pageToken));
14
44
  }
15
- get(fileId) {
16
- return this.client.request(() => FilesService.fileGet(this.podId(), fileId));
45
+ get(path) {
46
+ return this.client.request(() => FilesService.fileGet(this.podId(), path));
17
47
  }
18
- delete(fileId) {
19
- return this.client.request(() => FilesService.fileDelete(this.podId(), fileId));
48
+ delete(path) {
49
+ return this.client.request(() => FilesService.fileDelete(this.podId(), path));
20
50
  }
21
51
  search(query, options = {}) {
22
52
  return this.client.request(() => FilesService.fileSearch(this.podId(), {
@@ -25,35 +55,43 @@ export class FilesNamespace {
25
55
  search_method: options.searchMethod ?? SearchMethod.HYBRID,
26
56
  }));
27
57
  }
28
- download(fileId) {
29
- return this.http.requestBytes("GET", `/pods/${this.podId()}/datastore/files/${fileId}/download`);
58
+ download(path) {
59
+ const encodedPath = encodeURIComponent(path);
60
+ return this.http.requestBytes("GET", `/pods/${this.podId()}/datastore/files/download?path=${encodedPath}`);
30
61
  }
31
62
  upload(file, options = {}) {
32
63
  const payload = {
33
64
  data: file,
34
65
  name: options.name ?? (file instanceof File ? file.name : undefined),
35
66
  description: options.description,
36
- parent_id: options.parentId,
67
+ directory_path: options.directoryPath ?? options.parentId ?? "/",
37
68
  search_enabled: options.searchEnabled ?? true,
38
69
  };
39
70
  return this.client.request(() => FilesService.fileUpload(this.podId(), payload));
40
71
  }
41
- update(fileId, options = {}) {
72
+ update(path, options = {}) {
73
+ const targetDirectory = options.directoryPath ?? options.parentId;
74
+ const resolvedNewPath = options.newPath
75
+ ?? (options.name
76
+ ? joinDatastorePath(targetDirectory ?? getDirectoryPath(path), options.name)
77
+ : undefined)
78
+ ?? (targetDirectory
79
+ ? joinDatastorePath(targetDirectory, getBaseName(path))
80
+ : undefined);
42
81
  const payload = {
82
+ path,
43
83
  data: options.file,
44
- name: options.name,
45
84
  description: options.description,
46
- parent_id: options.parentId,
85
+ new_path: resolvedNewPath,
47
86
  search_enabled: options.searchEnabled,
48
87
  };
49
- return this.client.request(() => FilesService.fileUpdate(this.podId(), fileId, payload));
88
+ return this.client.request(() => FilesService.fileUpdate(this.podId(), payload));
50
89
  }
51
90
  folder = {
52
91
  create: (name, options = {}) => {
53
92
  const payload = {
54
- name,
93
+ path: joinDatastorePath(options.directoryPath ?? options.parentId, name),
55
94
  description: options.description,
56
- parent_id: options.parentId,
57
95
  };
58
96
  return this.client.request(() => FilesService.fileFolderCreate(this.podId(), payload));
59
97
  },
@@ -1,8 +1,16 @@
1
1
  import type { GeneratedClientAdapter } from "../generated.js";
2
2
  import type { HttpClient } from "../http.js";
3
3
  import type { RecordListResponse } from "../openapi_client/models/RecordListResponse.js";
4
- import type { RecordQueryRequest } from "../openapi_client/models/RecordQueryRequest.js";
5
- import type { ListRecordsOptions } from "../types.js";
4
+ import type { ListRecordsOptions, RecordFilter, RecordSort } from "../types.js";
5
+ export interface RecordQueryRequest {
6
+ filters?: RecordFilter[];
7
+ sort?: RecordSort[];
8
+ limit?: number;
9
+ page_token?: string;
10
+ offset?: number;
11
+ sort_by?: string;
12
+ order?: "asc" | "desc" | string;
13
+ }
6
14
  export declare class RecordsNamespace {
7
15
  private readonly client;
8
16
  private readonly http;
@@ -2,6 +2,18 @@ import { RecordsService } from "../openapi_client/services/RecordsService.js";
2
2
  function getRecordsPath(podId, table) {
3
3
  return `/pods/${encodeURIComponent(podId)}/datastore/tables/${encodeURIComponent(table)}/records`;
4
4
  }
5
+ function serializeFilters(filters) {
6
+ if (!filters || filters.length === 0) {
7
+ return undefined;
8
+ }
9
+ return filters.map((filter) => JSON.stringify(filter));
10
+ }
11
+ function serializeSort(sort) {
12
+ if (!sort || sort.length === 0) {
13
+ return undefined;
14
+ }
15
+ return sort.map((entry) => JSON.stringify(entry));
16
+ }
5
17
  export class RecordsNamespace {
6
18
  client;
7
19
  http;
@@ -14,13 +26,7 @@ export class RecordsNamespace {
14
26
  list(table, options = {}) {
15
27
  const { filters, sort, limit, pageToken, offset, sortBy, order, params } = options;
16
28
  if (filters || sort) {
17
- const payload = {
18
- filters,
19
- sort,
20
- limit,
21
- page_token: pageToken,
22
- };
23
- return this.client.request(() => RecordsService.recordQuery(this.podId(), table, payload));
29
+ return this.client.request(() => RecordsService.recordList(this.podId(), table, limit ?? 20, offset, sortBy ?? undefined, order ?? "asc", serializeFilters(filters), serializeSort(sort), pageToken));
24
30
  }
25
31
  const hasCustomParams = typeof offset === "number" ||
26
32
  typeof sortBy === "string" ||
@@ -38,7 +44,7 @@ export class RecordsNamespace {
38
44
  },
39
45
  });
40
46
  }
41
- return this.client.request(() => RecordsService.recordList(this.podId(), table, limit ?? 20, pageToken));
47
+ return this.client.request(() => RecordsService.recordList(this.podId(), table, limit ?? 20, offset, sortBy ?? undefined, order ?? "asc", undefined, undefined, pageToken));
42
48
  }
43
49
  listWithParams(table, params) {
44
50
  return this.http.request("GET", getRecordsPath(this.podId(), table), {
@@ -58,7 +64,7 @@ export class RecordsNamespace {
58
64
  return this.client.request(() => RecordsService.recordDelete(this.podId(), table, recordId));
59
65
  }
60
66
  query(table, payload) {
61
- return this.client.request(() => RecordsService.recordQuery(this.podId(), table, payload));
67
+ return this.client.request(() => RecordsService.recordList(this.podId(), table, payload.limit ?? 20, payload.offset, payload.sort_by ?? undefined, payload.order ?? "asc", serializeFilters(payload.filters), serializeSort(payload.sort), payload.page_token));
62
68
  }
63
69
  bulk = {
64
70
  create: (table, records) => {
@@ -60,6 +60,8 @@ export { DatastoreDataType } from './models/DatastoreDataType.js';
60
60
  export type { DatastoreFileUploadRequest } from './models/DatastoreFileUploadRequest.js';
61
61
  export type { DataStoreFlowStart } from './models/DataStoreFlowStart.js';
62
62
  export type { DatastoreMessageResponse } from './models/DatastoreMessageResponse.js';
63
+ export type { DatastoreQueryRequest } from './models/DatastoreQueryRequest.js';
64
+ export type { DatastoreQueryResponse } from './models/DatastoreQueryResponse.js';
63
65
  export type { DecisionNode } from './models/DecisionNode.js';
64
66
  export type { DecisionNodeConfig } from './models/DecisionNodeConfig.js';
65
67
  export type { DecisionNodeResponse } from './models/DecisionNodeResponse.js';
@@ -70,6 +72,8 @@ export type { DeskListResponse } from './models/DeskListResponse.js';
70
72
  export type { DeskMessageResponse } from './models/DeskMessageResponse.js';
71
73
  export type { DeskResponse } from './models/DeskResponse.js';
72
74
  export { DeskStatus } from './models/DeskStatus.js';
75
+ export type { DirectoryTreeNode } from './models/DirectoryTreeNode.js';
76
+ export type { DirectoryTreeResponse } from './models/DirectoryTreeResponse.js';
73
77
  export type { EmailSurfaceConfigCreate } from './models/EmailSurfaceConfigCreate.js';
74
78
  export type { EndNode } from './models/EndNode.js';
75
79
  export type { EndNodeConfig } from './models/EndNodeConfig.js';
@@ -83,6 +87,7 @@ export type { FileResponse } from './models/FileResponse.js';
83
87
  export type { FileSearchRequest } from './models/FileSearchRequest.js';
84
88
  export type { FileSearchResponse } from './models/FileSearchResponse.js';
85
89
  export type { FileSearchResultSchema } from './models/FileSearchResultSchema.js';
90
+ export { FileSearchScopeMode } from './models/FileSearchScopeMode.js';
86
91
  export type { FileUploadResponse } from './models/FileUploadResponse.js';
87
92
  export { FileVisibility } from './models/FileVisibility.js';
88
93
  export type { FlowInstallEntity } from './models/FlowInstallEntity.js';
@@ -151,13 +156,8 @@ export { PodStatus } from './models/PodStatus.js';
151
156
  export { PodType } from './models/PodType.js';
152
157
  export type { PodUpdateRequest } from './models/PodUpdateRequest.js';
153
158
  export type { RecentUsageResponse } from './models/RecentUsageResponse.js';
154
- export type { RecordFilter } from './models/RecordFilter.js';
155
- export { RecordFilterOperator } from './models/RecordFilterOperator.js';
156
159
  export type { RecordListResponse } from './models/RecordListResponse.js';
157
- export type { RecordQueryRequest } from './models/RecordQueryRequest.js';
158
160
  export type { RecordResponse } from './models/RecordResponse.js';
159
- export type { RecordSort } from './models/RecordSort.js';
160
- export { RecordSortDirection } from './models/RecordSortDirection.js';
161
161
  export type { ResourceFileListResponse } from './models/ResourceFileListResponse.js';
162
162
  export { ResourceType } from './models/ResourceType.js';
163
163
  export type { ScheduledFlowStart } from './models/ScheduledFlowStart.js';
@@ -245,6 +245,7 @@ export { OrganizationsService } from './services/OrganizationsService.js';
245
245
  export { PodMembersService } from './services/PodMembersService.js';
246
246
  export { PodsService } from './services/PodsService.js';
247
247
  export { PublicDesksService } from './services/PublicDesksService.js';
248
+ export { QueryService } from './services/QueryService.js';
248
249
  export { RecordsService } from './services/RecordsService.js';
249
250
  export { TablesService } from './services/TablesService.js';
250
251
  export { TasksService } from './services/TasksService.js';
@@ -13,6 +13,7 @@ export { CredentialTypes } from './models/CredentialTypes.js';
13
13
  export { DatastoreDataType } from './models/DatastoreDataType.js';
14
14
  export { DeskStatus } from './models/DeskStatus.js';
15
15
  export { FileInfo } from './models/FileInfo.js';
16
+ export { FileSearchScopeMode } from './models/FileSearchScopeMode.js';
16
17
  export { FileVisibility } from './models/FileVisibility.js';
17
18
  export { FlowRunStatus } from './models/FlowRunStatus.js';
18
19
  export { FlowStartType } from './models/FlowStartType.js';
@@ -25,8 +26,6 @@ export { PodAppMode } from './models/PodAppMode.js';
25
26
  export { PodRole } from './models/PodRole.js';
26
27
  export { PodStatus } from './models/PodStatus.js';
27
28
  export { PodType } from './models/PodType.js';
28
- export { RecordFilterOperator } from './models/RecordFilterOperator.js';
29
- export { RecordSortDirection } from './models/RecordSortDirection.js';
30
29
  export { ResourceType } from './models/ResourceType.js';
31
30
  export { SearchMethod } from './models/SearchMethod.js';
32
31
  export { SubscriptionStatus } from './models/SubscriptionStatus.js';
@@ -56,6 +55,7 @@ export { OrganizationsService } from './services/OrganizationsService.js';
56
55
  export { PodMembersService } from './services/PodMembersService.js';
57
56
  export { PodsService } from './services/PodsService.js';
58
57
  export { PublicDesksService } from './services/PublicDesksService.js';
58
+ export { QueryService } from './services/QueryService.js';
59
59
  export { RecordsService } from './services/RecordsService.js';
60
60
  export { TablesService } from './services/TablesService.js';
61
61
  export { TasksService } from './services/TasksService.js';
@@ -3,7 +3,7 @@ import type { AvailableModels } from './AvailableModels.js';
3
3
  * Request to create a conversation.
4
4
  */
5
5
  export type CreateConversationRequest = {
6
- assistant_id?: (string | null);
6
+ assistant_name?: (string | null);
7
7
  model?: (AvailableModels | null);
8
8
  organization_id?: (string | null);
9
9
  pod_id?: (string | null);
@@ -1,8 +1,7 @@
1
1
  import type { FileVisibility } from './FileVisibility.js';
2
2
  export type CreateFolderRequest = {
3
3
  description?: (string | null);
4
- name: string;
5
- parent_id?: (string | null);
4
+ path: string;
6
5
  /**
7
6
  * Optional visibility override for the new folder.
8
7
  */
@@ -6,7 +6,6 @@ export type CreateTriggerRequest = {
6
6
  account_id?: (string | null);
7
7
  application_trigger_id?: (string | null);
8
8
  config?: Record<string, any>;
9
- datastore_id?: (string | null);
10
9
  filter_instruction?: (string | null);
11
10
  filter_output_schema?: (Record<string, any> | null);
12
11
  pod_id?: (string | null);
@@ -2,8 +2,8 @@ import type { FileVisibility } from './FileVisibility.js';
2
2
  export type DatastoreFileUploadRequest = {
3
3
  data: string;
4
4
  description?: (string | null);
5
+ directory_path?: string;
5
6
  name?: (string | null);
6
- parent_id?: (string | null);
7
7
  search_enabled?: boolean;
8
8
  visibility?: (FileVisibility | null);
9
9
  };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Schema for executing read-only SQL within a datastore.
3
+ */
4
+ export type DatastoreQueryRequest = {
5
+ /**
6
+ * Read-only SQL query executed inside this datastore schema. Only SELECT-style queries are allowed; mutating statements are blocked. Write queries such as INSERT, UPDATE, DELETE, ALTER, DROP, CREATE, and TRUNCATE are rejected. Example: `SELECT id, amount FROM expenses WHERE amount > 100 ORDER BY created_at DESC LIMIT 20`.
7
+ */
8
+ query: string;
9
+ };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Schema for read-only datastore query results.
3
+ */
4
+ export type DatastoreQueryResponse = {
5
+ items: Array<Record<string, any>>;
6
+ total: number;
7
+ };
@@ -0,0 +1,7 @@
1
+ export type DirectoryTreeNode = {
2
+ children?: Array<DirectoryTreeNode>;
3
+ has_more_files?: boolean;
4
+ kind: string;
5
+ name: string;
6
+ path: string;
7
+ };
@@ -0,0 +1,6 @@
1
+ import type { DirectoryTreeNode } from './DirectoryTreeNode.js';
2
+ export type DirectoryTreeResponse = {
3
+ files_per_directory: number;
4
+ root_path: string;
5
+ tree: DirectoryTreeNode;
6
+ };
@@ -1,19 +1,17 @@
1
1
  import type { FileVisibility } from './FileVisibility.js';
2
2
  export type FileResponse = {
3
- content_hash: (string | null);
4
3
  created_at: string;
5
- datastore_id: string;
6
4
  description: (string | null);
7
- file_path: (string | null);
8
- graph_status?: string;
9
5
  id: string;
6
+ indexed_at?: (string | null);
10
7
  kind: string;
8
+ last_processing_error?: (string | null);
11
9
  metadata?: (Record<string, any> | null);
12
10
  mime_type?: (string | null);
13
11
  name: string;
14
12
  owner_user_id?: (string | null);
15
- parent_id?: (string | null);
16
- permissions_inherit?: boolean;
13
+ path: string;
14
+ pod_id: string;
17
15
  search_enabled?: boolean;
18
16
  size_bytes?: number;
19
17
  status: string;
@@ -1,10 +1,12 @@
1
+ import type { FileSearchScopeMode } from './FileSearchScopeMode.js';
1
2
  import type { SearchMethod } from './SearchMethod.js';
2
3
  export type FileSearchRequest = {
3
4
  limit?: number;
5
+ query: string;
6
+ scope_mode?: FileSearchScopeMode;
4
7
  /**
5
- * Optional folder id to scope search results to that folder subtree.
8
+ * Optional folder path to scope search results.
6
9
  */
7
- parent_id?: (string | null);
8
- query: string;
10
+ scope_path?: (string | null);
9
11
  search_method?: SearchMethod;
10
12
  };
@@ -3,5 +3,6 @@ export type FileSearchResultSchema = {
3
3
  content: string;
4
4
  file_id: string;
5
5
  metadata?: (Record<string, any> | null);
6
+ path: string;
6
7
  score: number;
7
8
  };
@@ -0,0 +1,4 @@
1
+ export declare enum FileSearchScopeMode {
2
+ DIRECT = "DIRECT",
3
+ SUBTREE = "SUBTREE"
4
+ }
@@ -0,0 +1,9 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ export var FileSearchScopeMode;
6
+ (function (FileSearchScopeMode) {
7
+ FileSearchScopeMode["DIRECT"] = "DIRECT";
8
+ FileSearchScopeMode["SUBTREE"] = "SUBTREE";
9
+ })(FileSearchScopeMode || (FileSearchScopeMode = {}));
@@ -6,10 +6,10 @@ export type TableResponse = {
6
6
  columns: Array<ColumnSchema>;
7
7
  config: (Record<string, any> | null);
8
8
  created_at: string;
9
- datastore_id: string;
10
9
  enable_rls: boolean;
11
10
  id: string;
12
11
  name: string;
12
+ pod_id: string;
13
13
  primary_key_column: string;
14
14
  updated_at: string;
15
15
  };
@@ -7,7 +7,6 @@ export type TriggerResponse = {
7
7
  application_trigger_id: (string | null);
8
8
  config: Record<string, any>;
9
9
  created_at: string;
10
- datastore_id: (string | null);
11
10
  filter_instruction: (string | null);
12
11
  filter_output_schema: (Record<string, any> | null);
13
12
  id: string;
@@ -2,8 +2,8 @@ import type { FileVisibility } from './FileVisibility.js';
2
2
  export type update = {
3
3
  data?: (string | null);
4
4
  description?: (string | null);
5
- name?: (string | null);
6
- parent_id?: (string | null);
5
+ new_path?: (string | null);
6
+ path: string;
7
7
  search_enabled?: (boolean | null);
8
8
  visibility?: (FileVisibility | null);
9
9
  };
@@ -9,15 +9,16 @@ import type { CancelablePromise } from '../core/CancelablePromise.js';
9
9
  export declare class ConversationsService {
10
10
  /**
11
11
  * List Conversations
12
- * @param assistantId
12
+ * @param assistantName
13
13
  * @param podId
14
14
  * @param organizationId
15
+ * @param globalOnly
15
16
  * @param pageToken
16
17
  * @param limit
17
18
  * @returns ConversationListResponse Successful Response
18
19
  * @throws ApiError
19
20
  */
20
- static conversationList(assistantId?: (string | null), podId?: (string | null), organizationId?: (string | null), pageToken?: (string | null), limit?: number): CancelablePromise<ConversationListResponse>;
21
+ static conversationList(assistantName?: (string | null), podId?: (string | null), organizationId?: (string | null), globalOnly?: boolean, pageToken?: (string | null), limit?: number): CancelablePromise<ConversationListResponse>;
21
22
  /**
22
23
  * Create Conversation
23
24
  * @param requestBody
@@ -3,22 +3,24 @@ import { request as __request } from '../core/request.js';
3
3
  export class ConversationsService {
4
4
  /**
5
5
  * List Conversations
6
- * @param assistantId
6
+ * @param assistantName
7
7
  * @param podId
8
8
  * @param organizationId
9
+ * @param globalOnly
9
10
  * @param pageToken
10
11
  * @param limit
11
12
  * @returns ConversationListResponse Successful Response
12
13
  * @throws ApiError
13
14
  */
14
- static conversationList(assistantId, podId, organizationId, pageToken, limit = 20) {
15
+ static conversationList(assistantName, podId, organizationId, globalOnly = false, pageToken, limit = 20) {
15
16
  return __request(OpenAPI, {
16
17
  method: 'GET',
17
18
  url: '/conversations',
18
19
  query: {
19
- 'assistant_id': assistantId,
20
+ 'assistant_name': assistantName,
20
21
  'pod_id': podId,
21
22
  'organization_id': organizationId,
23
+ 'global_only': globalOnly,
22
24
  'page_token': pageToken,
23
25
  'limit': limit,
24
26
  },
@@ -1,6 +1,7 @@
1
1
  import type { CreateFolderRequest } from '../models/CreateFolderRequest.js';
2
2
  import type { DatastoreFileUploadRequest } from '../models/DatastoreFileUploadRequest.js';
3
3
  import type { DatastoreMessageResponse } from '../models/DatastoreMessageResponse.js';
4
+ import type { DirectoryTreeResponse } from '../models/DirectoryTreeResponse.js';
4
5
  import type { FileListResponse } from '../models/FileListResponse.js';
5
6
  import type { FileResponse } from '../models/FileResponse.js';
6
7
  import type { FileSearchRequest } from '../models/FileSearchRequest.js';
@@ -11,13 +12,13 @@ export declare class FilesService {
11
12
  /**
12
13
  * List Files
13
14
  * @param podId
14
- * @param parentId
15
+ * @param directoryPath
15
16
  * @param limit
16
17
  * @param pageToken
17
18
  * @returns FileListResponse Successful Response
18
19
  * @throws ApiError
19
20
  */
20
- static fileList(podId: string, parentId?: (string | null), limit?: number, pageToken?: (string | null)): CancelablePromise<FileListResponse>;
21
+ static fileList(podId: string, directoryPath?: string, limit?: number, pageToken?: (string | null)): CancelablePromise<FileListResponse>;
21
22
  /**
22
23
  * Upload File
23
24
  * @param podId
@@ -27,52 +28,60 @@ export declare class FilesService {
27
28
  */
28
29
  static fileUpload(podId: string, formData: DatastoreFileUploadRequest): CancelablePromise<FileResponse>;
29
30
  /**
30
- * Create Folder
31
+ * Delete File
31
32
  * @param podId
32
- * @param requestBody
33
+ * @param path
34
+ * @returns DatastoreMessageResponse Successful Response
35
+ * @throws ApiError
36
+ */
37
+ static fileDelete(podId: string, path: string): CancelablePromise<DatastoreMessageResponse>;
38
+ /**
39
+ * Get File
40
+ * @param podId
41
+ * @param path
33
42
  * @returns FileResponse Successful Response
34
43
  * @throws ApiError
35
44
  */
36
- static fileFolderCreate(podId: string, requestBody: CreateFolderRequest): CancelablePromise<FileResponse>;
45
+ static fileGet(podId: string, path: string): CancelablePromise<FileResponse>;
37
46
  /**
38
- * Search Files
47
+ * Update File
39
48
  * @param podId
40
- * @param requestBody
41
- * @returns FileSearchResponse Successful Response
49
+ * @param formData
50
+ * @returns FileResponse Successful Response
42
51
  * @throws ApiError
43
52
  */
44
- static fileSearch(podId: string, requestBody: FileSearchRequest): CancelablePromise<FileSearchResponse>;
53
+ static fileUpdate(podId: string, formData: update): CancelablePromise<FileResponse>;
45
54
  /**
46
- * Delete File
55
+ * Download File
47
56
  * @param podId
48
- * @param fileId
49
- * @returns DatastoreMessageResponse Successful Response
57
+ * @param path
58
+ * @returns any Successful Response
50
59
  * @throws ApiError
51
60
  */
52
- static fileDelete(podId: string, fileId: string): CancelablePromise<DatastoreMessageResponse>;
61
+ static fileDownload(podId: string, path: string): CancelablePromise<any>;
53
62
  /**
54
- * Get File
63
+ * Create Folder
55
64
  * @param podId
56
- * @param fileId
65
+ * @param requestBody
57
66
  * @returns FileResponse Successful Response
58
67
  * @throws ApiError
59
68
  */
60
- static fileGet(podId: string, fileId: string): CancelablePromise<FileResponse>;
69
+ static fileFolderCreate(podId: string, requestBody: CreateFolderRequest): CancelablePromise<FileResponse>;
61
70
  /**
62
- * Update File
71
+ * Search Files
63
72
  * @param podId
64
- * @param fileId
65
- * @param formData
66
- * @returns FileResponse Successful Response
73
+ * @param requestBody
74
+ * @returns FileSearchResponse Successful Response
67
75
  * @throws ApiError
68
76
  */
69
- static fileUpdate(podId: string, fileId: string, formData?: update): CancelablePromise<FileResponse>;
77
+ static fileSearch(podId: string, requestBody: FileSearchRequest): CancelablePromise<FileSearchResponse>;
70
78
  /**
71
- * Download File
79
+ * Get Directory Tree
72
80
  * @param podId
73
- * @param fileId
74
- * @returns any Successful Response
81
+ * @param rootPath
82
+ * @param filesPerDirectory
83
+ * @returns DirectoryTreeResponse Successful Response
75
84
  * @throws ApiError
76
85
  */
77
- static fileDownload(podId: string, fileId: string): CancelablePromise<any>;
86
+ static fileTree(podId: string, rootPath?: string, filesPerDirectory?: number): CancelablePromise<DirectoryTreeResponse>;
78
87
  }