@resolveio/server-lib 20.14.44 → 20.14.46

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.
@@ -3,11 +3,12 @@ export type AiAssistantMongoReadInput = {
3
3
  collection?: string;
4
4
  query?: Record<string, any>;
5
5
  options?: {
6
- projection?: Record<string, number>;
6
+ projection?: Record<string, number | boolean>;
7
7
  sort?: Record<string, any>;
8
8
  limit?: number;
9
9
  skip?: number;
10
10
  includeTotal?: boolean;
11
+ includeIds?: boolean;
11
12
  };
12
13
  permissionView?: string;
13
14
  id_client?: string;
@@ -27,6 +28,7 @@ export type AiAssistantMongoAggregateInput = {
27
28
  allowDiskUse?: boolean;
28
29
  maxTimeMS?: number;
29
30
  limit?: number;
31
+ includeIds?: boolean;
30
32
  };
31
33
  permissionView?: string;
32
34
  id_client?: string;
@@ -37,6 +39,31 @@ export type AiAssistantMongoAggregateInput = {
37
39
  readonly?: boolean;
38
40
  };
39
41
  };
42
+ type AiAssistantDisplayTable = {
43
+ columns: string[];
44
+ rows: Array<Record<string, any>>;
45
+ rowCount: number;
46
+ total?: number | null;
47
+ truncated?: boolean;
48
+ includeIds?: boolean;
49
+ };
50
+ type AssistantMongoDirective = {
51
+ type: 'read' | 'aggregate';
52
+ payload: Record<string, any> | null;
53
+ cleaned: string;
54
+ rawLine: string;
55
+ };
40
56
  export declare function loadAiTerminalMethods(methodManager: any): void;
41
57
  export declare function executeAiAssistantMongoRead(payload: AiAssistantMongoReadInput, context: any): Promise<any>;
42
58
  export declare function executeAiAssistantMongoAggregate(payload: AiAssistantMongoAggregateInput, context: any): Promise<any>;
59
+ export declare function extractAssistantMongoDirective(content: string): AssistantMongoDirective | null;
60
+ export declare function serializeMongoValue(value: any, maxLength?: number): string | number | boolean | null;
61
+ export declare function flattenForTable(doc: any): Record<string, any>;
62
+ export declare function buildDisplayTable(docs: any[], options?: {
63
+ maxColumns?: number;
64
+ maxRows?: number;
65
+ includeIds?: boolean;
66
+ priorityFields?: string[];
67
+ }): AiAssistantDisplayTable;
68
+ export declare function formatDisplayTableMarkdown(display: AiAssistantDisplayTable): string;
69
+ export {};