lemma-sdk 0.2.23 → 0.2.25

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 (75) hide show
  1. package/README.md +156 -511
  2. package/dist/auth.js +0 -1
  3. package/dist/browser/lemma-client.js +196 -112
  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 +7 -7
  11. package/dist/openapi_client/index.js +2 -4
  12. package/dist/openapi_client/models/ColumnSchema.d.ts +4 -0
  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/CreateTableRequest.d.ts +1 -1
  16. package/dist/openapi_client/models/CreateTriggerRequest.d.ts +0 -1
  17. package/dist/openapi_client/models/DatastoreFileUploadRequest.d.ts +1 -1
  18. package/dist/openapi_client/models/DatastoreQueryRequest.d.ts +9 -0
  19. package/dist/openapi_client/models/DatastoreQueryResponse.d.ts +7 -0
  20. package/dist/openapi_client/models/DirectoryTreeNode.d.ts +7 -0
  21. package/dist/openapi_client/models/DirectoryTreeResponse.d.ts +6 -0
  22. package/dist/openapi_client/models/DirectoryTreeResponse.js +1 -0
  23. package/dist/openapi_client/models/FileResponse.d.ts +4 -6
  24. package/dist/openapi_client/models/FileSearchRequest.d.ts +5 -3
  25. package/dist/openapi_client/models/FileSearchResultSchema.d.ts +1 -0
  26. package/dist/openapi_client/models/FileSearchScopeMode.d.ts +4 -0
  27. package/dist/openapi_client/models/FileSearchScopeMode.js +9 -0
  28. package/dist/openapi_client/models/PodCreateRequest.d.ts +0 -4
  29. package/dist/openapi_client/models/PodMemberDetailResponse.d.ts +14 -0
  30. package/dist/openapi_client/models/PodMemberDetailResponse.js +1 -0
  31. package/dist/openapi_client/models/PodMemberResponse.d.ts +3 -3
  32. package/dist/openapi_client/models/PodResponse.d.ts +0 -5
  33. package/dist/openapi_client/models/PodUpdateRequest.d.ts +0 -4
  34. package/dist/openapi_client/models/TableResponse.d.ts +1 -1
  35. package/dist/openapi_client/models/TriggerResponse.d.ts +0 -1
  36. package/dist/openapi_client/models/update.d.ts +2 -2
  37. package/dist/openapi_client/services/ConversationsService.d.ts +3 -2
  38. package/dist/openapi_client/services/ConversationsService.js +5 -3
  39. package/dist/openapi_client/services/FilesService.d.ts +34 -25
  40. package/dist/openapi_client/services/FilesService.js +75 -47
  41. package/dist/openapi_client/services/PodMembersService.d.ts +14 -4
  42. package/dist/openapi_client/services/PodMembersService.js +29 -8
  43. package/dist/openapi_client/services/QueryService.d.ts +14 -0
  44. package/dist/openapi_client/services/QueryService.js +26 -0
  45. package/dist/openapi_client/services/RecordsService.d.ts +7 -13
  46. package/dist/openapi_client/services/RecordsService.js +12 -26
  47. package/dist/react/components/AssistantEmbedded.d.ts +1 -1
  48. package/dist/react/components/AssistantEmbedded.js +2 -1
  49. package/dist/react/index.d.ts +0 -2
  50. package/dist/react/index.js +0 -1
  51. package/dist/react/useAssistantController.d.ts +5 -1
  52. package/dist/react/useAssistantController.js +7 -3
  53. package/dist/react/useAssistantSession.d.ts +12 -0
  54. package/dist/react/useAssistantSession.js +24 -5
  55. package/dist/react/useTaskSession.js +145 -73
  56. package/dist/task-events.d.ts +2 -1
  57. package/dist/task-events.js +38 -1
  58. package/dist/types.d.ts +10 -4
  59. package/package.json +1 -1
  60. package/dist/openapi_client/models/PodStatus.d.ts +0 -4
  61. package/dist/openapi_client/models/PodStatus.js +0 -9
  62. package/dist/openapi_client/models/PodType.d.ts +0 -6
  63. package/dist/openapi_client/models/PodType.js +0 -11
  64. package/dist/openapi_client/models/RecordFilter.d.ts +0 -15
  65. package/dist/openapi_client/models/RecordFilterOperator.d.ts +0 -10
  66. package/dist/openapi_client/models/RecordFilterOperator.js +0 -15
  67. package/dist/openapi_client/models/RecordQueryRequest.d.ts +0 -20
  68. package/dist/openapi_client/models/RecordSort.d.ts +0 -11
  69. package/dist/openapi_client/models/RecordSortDirection.d.ts +0 -4
  70. package/dist/openapi_client/models/RecordSortDirection.js +0 -9
  71. package/dist/react/useAgentRun.d.ts +0 -17
  72. package/dist/react/useAgentRun.js +0 -66
  73. /package/dist/openapi_client/models/{RecordFilter.js → DatastoreQueryRequest.js} +0 -0
  74. /package/dist/openapi_client/models/{RecordQueryRequest.js → DatastoreQueryResponse.js} +0 -0
  75. /package/dist/openapi_client/models/{RecordSort.js → DirectoryTreeNode.js} +0 -0
@@ -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';
@@ -141,23 +146,17 @@ export type { PodCreateRequest } from './models/PodCreateRequest.js';
141
146
  export type { PodFlowConfigItem } from './models/PodFlowConfigItem.js';
142
147
  export type { PodListResponse } from './models/PodListResponse.js';
143
148
  export type { PodMemberAddRequest } from './models/PodMemberAddRequest.js';
149
+ export type { PodMemberDetailResponse } from './models/PodMemberDetailResponse.js';
144
150
  export type { PodMemberListResponse } from './models/PodMemberListResponse.js';
145
151
  export type { PodMemberResponse } from './models/PodMemberResponse.js';
146
152
  export type { PodMemberUpdateRoleRequest } from './models/PodMemberUpdateRoleRequest.js';
147
153
  export type { PodPermissionsResponse } from './models/PodPermissionsResponse.js';
148
154
  export type { PodResponse } from './models/PodResponse.js';
149
155
  export { PodRole } from './models/PodRole.js';
150
- export { PodStatus } from './models/PodStatus.js';
151
- export { PodType } from './models/PodType.js';
152
156
  export type { PodUpdateRequest } from './models/PodUpdateRequest.js';
153
157
  export type { RecentUsageResponse } from './models/RecentUsageResponse.js';
154
- export type { RecordFilter } from './models/RecordFilter.js';
155
- export { RecordFilterOperator } from './models/RecordFilterOperator.js';
156
158
  export type { RecordListResponse } from './models/RecordListResponse.js';
157
- export type { RecordQueryRequest } from './models/RecordQueryRequest.js';
158
159
  export type { RecordResponse } from './models/RecordResponse.js';
159
- export type { RecordSort } from './models/RecordSort.js';
160
- export { RecordSortDirection } from './models/RecordSortDirection.js';
161
160
  export type { ResourceFileListResponse } from './models/ResourceFileListResponse.js';
162
161
  export { ResourceType } from './models/ResourceType.js';
163
162
  export type { ScheduledFlowStart } from './models/ScheduledFlowStart.js';
@@ -245,6 +244,7 @@ export { OrganizationsService } from './services/OrganizationsService.js';
245
244
  export { PodMembersService } from './services/PodMembersService.js';
246
245
  export { PodsService } from './services/PodsService.js';
247
246
  export { PublicDesksService } from './services/PublicDesksService.js';
247
+ export { QueryService } from './services/QueryService.js';
248
248
  export { RecordsService } from './services/RecordsService.js';
249
249
  export { TablesService } from './services/TablesService.js';
250
250
  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';
@@ -23,10 +24,6 @@ export { OrganizationInvitationStatus } from './models/OrganizationInvitationSta
23
24
  export { OrganizationRole } from './models/OrganizationRole.js';
24
25
  export { PodAppMode } from './models/PodAppMode.js';
25
26
  export { PodRole } from './models/PodRole.js';
26
- export { PodStatus } from './models/PodStatus.js';
27
- export { PodType } from './models/PodType.js';
28
- export { RecordFilterOperator } from './models/RecordFilterOperator.js';
29
- export { RecordSortDirection } from './models/RecordSortDirection.js';
30
27
  export { ResourceType } from './models/ResourceType.js';
31
28
  export { SearchMethod } from './models/SearchMethod.js';
32
29
  export { SubscriptionStatus } from './models/SubscriptionStatus.js';
@@ -56,6 +53,7 @@ export { OrganizationsService } from './services/OrganizationsService.js';
56
53
  export { PodMembersService } from './services/PodMembersService.js';
57
54
  export { PodsService } from './services/PodsService.js';
58
55
  export { PublicDesksService } from './services/PublicDesksService.js';
56
+ export { QueryService } from './services/QueryService.js';
59
57
  export { RecordsService } from './services/RecordsService.js';
60
58
  export { TablesService } from './services/TablesService.js';
61
59
  export { TasksService } from './services/TasksService.js';
@@ -44,6 +44,10 @@ export type ColumnSchema = {
44
44
  * Whether the column is required (NOT NULL)
45
45
  */
46
46
  required?: boolean;
47
+ /**
48
+ * Whether the column is system-managed by the backend.
49
+ */
50
+ system?: boolean;
47
51
  /**
48
52
  * Column data type
49
53
  */
@@ -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
  */
@@ -4,7 +4,7 @@ import type { ColumnSchema } from './ColumnSchema.js';
4
4
  */
5
5
  export type CreateTableRequest = {
6
6
  /**
7
- * Table column definitions. Each column name must be unique. Use `type`, `required`, `default`, `foreign_key`, and `computed` as needed.
7
+ * Table column definitions. Each column name must be unique. Use `type`, `required`, `default`, `foreign_key`, and `computed` as needed. The backend also materializes physical system columns so table metadata reflects the real schema: `id` when omitted as the primary key, `created_at`, `updated_at`, and `user_id` when RLS is enabled.
8
8
  */
9
9
  columns: Array<ColumnSchema>;
10
10
  /**
@@ -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. Queries against RLS-enabled tables are rejected; use table-scoped record APIs instead. 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 = {}));
@@ -1,5 +1,3 @@
1
- import type { PodStatus } from './PodStatus.js';
2
- import type { PodType } from './PodType.js';
3
1
  /**
4
2
  * Pod creation request schema.
5
3
  */
@@ -8,6 +6,4 @@ export type PodCreateRequest = {
8
6
  icon_url?: (string | null);
9
7
  name: string;
10
8
  organization_id: string;
11
- status?: PodStatus;
12
- type?: PodType;
13
9
  };
@@ -0,0 +1,14 @@
1
+ import type { PodRole } from './PodRole.js';
2
+ import type { UserResponse } from './UserResponse.js';
3
+ /**
4
+ * Pod member detail response schema.
5
+ */
6
+ export type PodMemberDetailResponse = {
7
+ created_at: string;
8
+ role: PodRole;
9
+ updated_at: string;
10
+ user?: (UserResponse | null);
11
+ user_email: string;
12
+ user_id: string;
13
+ user_name?: (string | null);
14
+ };
@@ -4,9 +4,9 @@ import type { PodRole } from './PodRole.js';
4
4
  */
5
5
  export type PodMemberResponse = {
6
6
  created_at: string;
7
- id: string;
8
- organization_member_id: string;
9
- pod_id: string;
10
7
  role: PodRole;
11
8
  updated_at: string;
9
+ user_email: string;
10
+ user_id: string;
11
+ user_name?: (string | null);
12
12
  };
@@ -1,5 +1,3 @@
1
- import type { PodStatus } from './PodStatus.js';
2
- import type { PodType } from './PodType.js';
3
1
  /**
4
2
  * Pod response schema.
5
3
  */
@@ -10,9 +8,6 @@ export type PodResponse = {
10
8
  id: string;
11
9
  name: string;
12
10
  organization_id: string;
13
- slug: string;
14
- status: PodStatus;
15
- type: PodType;
16
11
  updated_at: string;
17
12
  user_id: string;
18
13
  };
@@ -1,5 +1,3 @@
1
- import type { PodStatus } from './PodStatus.js';
2
- import type { PodType } from './PodType.js';
3
1
  /**
4
2
  * Pod update request schema.
5
3
  */
@@ -7,6 +5,4 @@ export type PodUpdateRequest = {
7
5
  description?: (string | null);
8
6
  icon_url?: (string | null);
9
7
  name?: (string | null);
10
- status?: (PodStatus | null);
11
- type?: (PodType | null);
12
8
  };
@@ -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
  },