lemma-sdk 0.2.22 → 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 (55) hide show
  1. package/README.md +3 -3
  2. package/dist/auth.d.ts +1 -0
  3. package/dist/auth.js +12 -12
  4. package/dist/browser/lemma-client.js +179 -115
  5. package/dist/namespaces/assistants.d.ts +21 -3
  6. package/dist/namespaces/assistants.js +13 -7
  7. package/dist/namespaces/files.d.ts +9 -4
  8. package/dist/namespaces/files.js +52 -14
  9. package/dist/namespaces/records.d.ts +10 -2
  10. package/dist/namespaces/records.js +15 -9
  11. package/dist/openapi_client/index.d.ts +6 -5
  12. package/dist/openapi_client/index.js +2 -2
  13. package/dist/openapi_client/models/CreateConversationRequest.d.ts +1 -1
  14. package/dist/openapi_client/models/CreateFolderRequest.d.ts +1 -2
  15. package/dist/openapi_client/models/CreateTriggerRequest.d.ts +0 -1
  16. package/dist/openapi_client/models/DatastoreFileUploadRequest.d.ts +1 -1
  17. package/dist/openapi_client/models/DatastoreQueryRequest.d.ts +9 -0
  18. package/dist/openapi_client/models/DatastoreQueryResponse.d.ts +7 -0
  19. package/dist/openapi_client/models/DirectoryTreeNode.d.ts +7 -0
  20. package/dist/openapi_client/models/DirectoryTreeResponse.d.ts +6 -0
  21. package/dist/openapi_client/models/DirectoryTreeResponse.js +1 -0
  22. package/dist/openapi_client/models/FileResponse.d.ts +4 -6
  23. package/dist/openapi_client/models/FileSearchRequest.d.ts +5 -3
  24. package/dist/openapi_client/models/FileSearchResultSchema.d.ts +1 -0
  25. package/dist/openapi_client/models/FileSearchScopeMode.d.ts +4 -0
  26. package/dist/openapi_client/models/FileSearchScopeMode.js +9 -0
  27. package/dist/openapi_client/models/TableResponse.d.ts +1 -1
  28. package/dist/openapi_client/models/TriggerResponse.d.ts +0 -1
  29. package/dist/openapi_client/models/update.d.ts +2 -2
  30. package/dist/openapi_client/services/ConversationsService.d.ts +3 -2
  31. package/dist/openapi_client/services/ConversationsService.js +5 -3
  32. package/dist/openapi_client/services/FilesService.d.ts +34 -25
  33. package/dist/openapi_client/services/FilesService.js +75 -47
  34. package/dist/openapi_client/services/QueryService.d.ts +14 -0
  35. package/dist/openapi_client/services/QueryService.js +26 -0
  36. package/dist/openapi_client/services/RecordsService.d.ts +7 -13
  37. package/dist/openapi_client/services/RecordsService.js +12 -26
  38. package/dist/react/components/AssistantEmbedded.d.ts +1 -1
  39. package/dist/react/components/AssistantEmbedded.js +2 -1
  40. package/dist/react/useAssistantController.d.ts +5 -1
  41. package/dist/react/useAssistantController.js +7 -3
  42. package/dist/react/useAssistantSession.d.ts +12 -0
  43. package/dist/react/useAssistantSession.js +24 -5
  44. package/dist/types.d.ts +10 -4
  45. package/package.json +1 -1
  46. package/dist/openapi_client/models/RecordFilter.d.ts +0 -15
  47. package/dist/openapi_client/models/RecordFilterOperator.d.ts +0 -10
  48. package/dist/openapi_client/models/RecordFilterOperator.js +0 -15
  49. package/dist/openapi_client/models/RecordQueryRequest.d.ts +0 -20
  50. package/dist/openapi_client/models/RecordSort.d.ts +0 -11
  51. package/dist/openapi_client/models/RecordSortDirection.d.ts +0 -4
  52. package/dist/openapi_client/models/RecordSortDirection.js +0 -9
  53. /package/dist/openapi_client/models/{RecordFilter.js → DatastoreQueryRequest.js} +0 -0
  54. /package/dist/openapi_client/models/{RecordQueryRequest.js → DatastoreQueryResponse.js} +0 -0
  55. /package/dist/openapi_client/models/{RecordSort.js → DirectoryTreeNode.js} +0 -0
@@ -30,21 +30,39 @@ export declare class ConversationsNamespace {
30
30
  private resolvePodId;
31
31
  private requirePodId;
32
32
  list(options?: {
33
+ assistant_name?: string;
34
+ /**
35
+ * @deprecated Use assistant_name instead.
36
+ */
33
37
  assistant_id?: string;
34
38
  pod_id?: string;
35
39
  organization_id?: string;
40
+ global_only?: boolean;
36
41
  limit?: number;
37
42
  page_token?: string;
38
43
  }): Promise<ConversationListResponse>;
39
- listByAssistant(assistantId: string, options?: {
44
+ listByAssistant(assistantName: string, options?: {
40
45
  pod_id?: string;
41
46
  organization_id?: string;
47
+ global_only?: boolean;
48
+ limit?: number;
49
+ page_token?: string;
50
+ }): Promise<ConversationListResponse>;
51
+ listByAssistantName(assistantName: string, options?: {
52
+ pod_id?: string;
53
+ organization_id?: string;
54
+ global_only?: boolean;
42
55
  limit?: number;
43
56
  page_token?: string;
44
57
  }): Promise<ConversationListResponse>;
45
58
  listModels(): Promise<AvailableModelsListResponse>;
46
- create(payload: CreateConversationRequest): Promise<ConversationResponse>;
47
- createForAssistant(assistantId: string, payload?: Omit<CreateConversationRequest, "assistant_id">): Promise<ConversationResponse>;
59
+ create(payload: CreateConversationRequest & {
60
+ /**
61
+ * @deprecated Use assistant_name instead.
62
+ */
63
+ assistant_id?: string | null;
64
+ }): Promise<ConversationResponse>;
65
+ createForAssistant(assistantName: string, payload?: Omit<CreateConversationRequest, "assistant_name">): Promise<ConversationResponse>;
48
66
  get(conversationId: string, options?: {
49
67
  pod_id?: string;
50
68
  }): Promise<ConversationResponse>;
@@ -56,32 +56,38 @@ export class ConversationsNamespace {
56
56
  list(options = {}) {
57
57
  return this.http.request("GET", "/conversations", {
58
58
  params: {
59
- assistant_id: options.assistant_id,
59
+ assistant_name: options.assistant_name ?? options.assistant_id,
60
60
  pod_id: this.resolvePodId(options.pod_id),
61
61
  organization_id: options.organization_id,
62
+ global_only: options.global_only ?? false,
62
63
  limit: options.limit ?? 20,
63
64
  page_token: options.page_token,
64
65
  },
65
66
  });
66
67
  }
67
- listByAssistant(assistantId, options = {}) {
68
- return this.list({ ...options, assistant_id: assistantId });
68
+ listByAssistant(assistantName, options = {}) {
69
+ return this.list({ ...options, assistant_name: assistantName });
70
+ }
71
+ listByAssistantName(assistantName, options = {}) {
72
+ return this.listByAssistant(assistantName, options);
69
73
  }
70
74
  listModels() {
71
75
  return this.http.request("GET", "/models");
72
76
  }
73
77
  create(payload) {
78
+ const { assistant_id, ...requestBody } = payload;
74
79
  return this.http.request("POST", "/conversations", {
75
80
  body: {
76
- ...payload,
77
- pod_id: this.resolvePodId(payload.pod_id),
81
+ ...requestBody,
82
+ pod_id: this.resolvePodId(requestBody.pod_id),
83
+ assistant_name: requestBody.assistant_name ?? assistant_id,
78
84
  },
79
85
  });
80
86
  }
81
- createForAssistant(assistantId, payload = {}) {
87
+ createForAssistant(assistantName, payload = {}) {
82
88
  return this.create({
83
89
  ...payload,
84
- assistant_id: assistantId,
90
+ assistant_name: assistantName,
85
91
  });
86
92
  }
87
93
  get(conversationId, options = {}) {
@@ -9,30 +9,35 @@ export declare class FilesNamespace {
9
9
  list(options?: {
10
10
  limit?: number;
11
11
  pageToken?: string;
12
+ directoryPath?: string;
12
13
  parentId?: string;
13
14
  }): Promise<import("../types.js").FileListResponse>;
14
- get(fileId: string): Promise<import("../types.js").FileResponse>;
15
- delete(fileId: string): Promise<import("../types.js").DatastoreMessageResponse>;
15
+ get(path: string): Promise<import("../types.js").FileResponse>;
16
+ delete(path: string): Promise<import("../types.js").DatastoreMessageResponse>;
16
17
  search(query: string, options?: {
17
18
  limit?: number;
18
19
  searchMethod?: SearchMethod;
19
20
  }): Promise<import("../types.js").FileSearchResponse>;
20
- download(fileId: string): Promise<Blob>;
21
+ download(path: string): Promise<Blob>;
21
22
  upload(file: Blob, options?: {
22
23
  name?: string;
24
+ directoryPath?: string;
23
25
  parentId?: string;
24
26
  searchEnabled?: boolean;
25
27
  description?: string;
26
28
  }): Promise<import("../types.js").FileResponse>;
27
- update(fileId: string, options?: {
29
+ update(path: string, options?: {
28
30
  file?: Blob;
29
31
  name?: string;
30
32
  description?: string;
33
+ directoryPath?: string;
31
34
  parentId?: string;
35
+ newPath?: string;
32
36
  searchEnabled?: boolean;
33
37
  }): Promise<import("../types.js").FileResponse>;
34
38
  readonly folder: {
35
39
  create: (name: string, options?: {
40
+ directoryPath?: string;
36
41
  parentId?: string;
37
42
  description?: string;
38
43
  }) => Promise<import("../types.js").FileResponse>;
@@ -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
  },