@superatomai/sdk-web 0.0.12 → 0.0.13
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.
- package/dist/index.cjs +73 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +70 -32
- package/dist/index.d.ts +70 -32
- package/dist/index.js +73 -48
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -826,6 +826,17 @@ declare const ComponentsSendMessageSchema: z.ZodObject<{
|
|
|
826
826
|
}, z.core.$strip>;
|
|
827
827
|
}, z.core.$strip>;
|
|
828
828
|
type ComponentsSendMessage = z.infer<typeof ComponentsSendMessageSchema>;
|
|
829
|
+
/**
|
|
830
|
+
* User query filters schema
|
|
831
|
+
* Synced with sdk-nodejs: UserQueryFiltersSchema
|
|
832
|
+
*/
|
|
833
|
+
declare const UserQueryFiltersSchema: z.ZodObject<{
|
|
834
|
+
username: z.ZodOptional<z.ZodString>;
|
|
835
|
+
email: z.ZodOptional<z.ZodString>;
|
|
836
|
+
role: z.ZodOptional<z.ZodString>;
|
|
837
|
+
fullname: z.ZodOptional<z.ZodString>;
|
|
838
|
+
}, z.core.$strip>;
|
|
839
|
+
type UserQueryFilters = z.infer<typeof UserQueryFiltersSchema>;
|
|
829
840
|
/**
|
|
830
841
|
* Dashboard query filters schema
|
|
831
842
|
* Synced with sdk-nodejs: DashboardQueryFiltersSchema
|
|
@@ -889,6 +900,16 @@ declare const BookmarkDataSchema: z.ZodObject<{
|
|
|
889
900
|
updated_at: z.ZodOptional<z.ZodString>;
|
|
890
901
|
}, z.core.$strip>;
|
|
891
902
|
type BookmarkData = z.infer<typeof BookmarkDataSchema>;
|
|
903
|
+
/**
|
|
904
|
+
* Bookmark query filters schema
|
|
905
|
+
* Synced with sdk-nodejs: BookmarkQueryFiltersSchema
|
|
906
|
+
*/
|
|
907
|
+
declare const BookmarkQueryFiltersSchema: z.ZodObject<{
|
|
908
|
+
userId: z.ZodOptional<z.ZodNumber>;
|
|
909
|
+
threadId: z.ZodOptional<z.ZodString>;
|
|
910
|
+
name: z.ZodOptional<z.ZodString>;
|
|
911
|
+
}, z.core.$strip>;
|
|
912
|
+
type BookmarkQueryFilters = z.infer<typeof BookmarkQueryFiltersSchema>;
|
|
892
913
|
/**
|
|
893
914
|
* Client configuration schema
|
|
894
915
|
*/
|
|
@@ -1123,6 +1144,28 @@ declare function getUser(client: SuperatomClient, username: string, timeout?: nu
|
|
|
1123
1144
|
user?: User;
|
|
1124
1145
|
message?: string;
|
|
1125
1146
|
}>;
|
|
1147
|
+
/**
|
|
1148
|
+
* Query users options
|
|
1149
|
+
*/
|
|
1150
|
+
interface QueryUsersOptions {
|
|
1151
|
+
filters?: UserQueryFilters;
|
|
1152
|
+
limit?: number;
|
|
1153
|
+
sort?: 'ASC' | 'DESC';
|
|
1154
|
+
}
|
|
1155
|
+
/**
|
|
1156
|
+
* Query users with filters, limit, and sort
|
|
1157
|
+
* @param client - SuperatomClient instance
|
|
1158
|
+
* @param options - Query options with filters, limit, and sort
|
|
1159
|
+
* @param timeout - Request timeout in milliseconds
|
|
1160
|
+
* @returns Server response with list of users
|
|
1161
|
+
*/
|
|
1162
|
+
declare function queryUsers(client: SuperatomClient, options?: QueryUsersOptions, timeout?: number): Promise<{
|
|
1163
|
+
success: boolean;
|
|
1164
|
+
error?: string;
|
|
1165
|
+
users?: User[];
|
|
1166
|
+
count?: number;
|
|
1167
|
+
message?: string;
|
|
1168
|
+
}>;
|
|
1126
1169
|
|
|
1127
1170
|
/**
|
|
1128
1171
|
* Dashboards Service
|
|
@@ -1500,28 +1543,21 @@ declare function getBookmark(client: SuperatomClient, id: number, timeout?: numb
|
|
|
1500
1543
|
message?: string;
|
|
1501
1544
|
}>;
|
|
1502
1545
|
/**
|
|
1503
|
-
*
|
|
1504
|
-
* @param client - SuperatomClient instance
|
|
1505
|
-
* @param userId - User ID to filter by
|
|
1506
|
-
* @param threadId - Optional thread ID to filter by
|
|
1507
|
-
* @param timeout - Request timeout in milliseconds
|
|
1508
|
-
* @returns Server response with list of bookmarks
|
|
1546
|
+
* Query bookmarks options
|
|
1509
1547
|
*/
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
message?: string;
|
|
1516
|
-
}>;
|
|
1548
|
+
interface QueryBookmarksOptions {
|
|
1549
|
+
filters?: BookmarkQueryFilters;
|
|
1550
|
+
limit?: number;
|
|
1551
|
+
sort?: 'ASC' | 'DESC';
|
|
1552
|
+
}
|
|
1517
1553
|
/**
|
|
1518
|
-
*
|
|
1554
|
+
* Query bookmarks with filters, limit, and sort
|
|
1519
1555
|
* @param client - SuperatomClient instance
|
|
1520
|
-
* @param
|
|
1556
|
+
* @param options - Query options with filters, limit, and sort
|
|
1521
1557
|
* @param timeout - Request timeout in milliseconds
|
|
1522
1558
|
* @returns Server response with list of bookmarks
|
|
1523
1559
|
*/
|
|
1524
|
-
declare function
|
|
1560
|
+
declare function queryBookmarks(client: SuperatomClient, options?: QueryBookmarksOptions, timeout?: number): Promise<{
|
|
1525
1561
|
success: boolean;
|
|
1526
1562
|
error?: string;
|
|
1527
1563
|
data?: BookmarkData[];
|
|
@@ -1726,11 +1762,13 @@ type index_Expression = Expression;
|
|
|
1726
1762
|
declare const index_ExpressionSchema: typeof ExpressionSchema;
|
|
1727
1763
|
type index_ForDirective = ForDirective;
|
|
1728
1764
|
declare const index_ForDirectiveSchema: typeof ForDirectiveSchema;
|
|
1765
|
+
type index_QueryBookmarksOptions = QueryBookmarksOptions;
|
|
1729
1766
|
type index_QueryDashboardsOptions = QueryDashboardsOptions;
|
|
1730
1767
|
type index_QueryReportsOptions = QueryReportsOptions;
|
|
1731
1768
|
type index_QuerySpec = QuerySpec;
|
|
1732
1769
|
declare const index_QuerySpecSchema: typeof QuerySpecSchema;
|
|
1733
1770
|
type index_QueryUIsOptions = QueryUIsOptions;
|
|
1771
|
+
type index_QueryUsersOptions = QueryUsersOptions;
|
|
1734
1772
|
type index_Report = Report;
|
|
1735
1773
|
type index_UI = UI;
|
|
1736
1774
|
type index_UIComponent = UIComponent;
|
|
@@ -1759,16 +1797,16 @@ declare const index_getAllReports: typeof getAllReports;
|
|
|
1759
1797
|
declare const index_getAllUIs: typeof getAllUIs;
|
|
1760
1798
|
declare const index_getAllUsers: typeof getAllUsers;
|
|
1761
1799
|
declare const index_getBookmark: typeof getBookmark;
|
|
1762
|
-
declare const index_getBookmarksByThread: typeof getBookmarksByThread;
|
|
1763
|
-
declare const index_getBookmarksByUser: typeof getBookmarksByUser;
|
|
1764
1800
|
declare const index_getComponentSuggestions: typeof getComponentSuggestions;
|
|
1765
1801
|
declare const index_getDashboard: typeof getDashboard;
|
|
1766
1802
|
declare const index_getReport: typeof getReport;
|
|
1767
1803
|
declare const index_getUI: typeof getUI;
|
|
1768
1804
|
declare const index_getUser: typeof getUser;
|
|
1805
|
+
declare const index_queryBookmarks: typeof queryBookmarks;
|
|
1769
1806
|
declare const index_queryDashboards: typeof queryDashboards;
|
|
1770
1807
|
declare const index_queryReports: typeof queryReports;
|
|
1771
1808
|
declare const index_queryUIs: typeof queryUIs;
|
|
1809
|
+
declare const index_queryUsers: typeof queryUsers;
|
|
1772
1810
|
declare const index_requestBundle: typeof requestBundle;
|
|
1773
1811
|
declare const index_requestData: typeof requestData;
|
|
1774
1812
|
declare const index_sendAuthLoginRequest: typeof sendAuthLoginRequest;
|
|
@@ -1782,7 +1820,7 @@ declare const index_updateReport: typeof updateReport;
|
|
|
1782
1820
|
declare const index_updateUI: typeof updateUI;
|
|
1783
1821
|
declare const index_updateUser: typeof updateUser;
|
|
1784
1822
|
declare namespace index {
|
|
1785
|
-
export { type index_Binding as Binding, index_BindingSchema as BindingSchema, type index_Bookmark as Bookmark, type index_CreateBookmarkOptions as CreateBookmarkOptions, type index_CreateDashboardOptions as CreateDashboardOptions, type index_CreateReportOptions as CreateReportOptions, type index_CreateUIOptions as CreateUIOptions, type DSLRendererProps$2 as DSLRendererProps, DSLRendererPropsSchema$2 as DSLRendererPropsSchema, type index_Dashboard as Dashboard, type index_Expression as Expression, index_ExpressionSchema as ExpressionSchema, type index_ForDirective as ForDirective, index_ForDirectiveSchema as ForDirectiveSchema, type index_QueryDashboardsOptions as QueryDashboardsOptions, type index_QueryReportsOptions as QueryReportsOptions, type index_QuerySpec as QuerySpec, index_QuerySpecSchema as QuerySpecSchema, type index_QueryUIsOptions as QueryUIsOptions, type index_Report as Report, type DSLRendererProps$1 as ReportDSLRendererProps, type index_UI as UI, type index_UIComponent as UIComponent, index_UIComponentSchema as UIComponentSchema, type DSLRendererProps as UIDSLRendererProps, type index_UIElement as UIElement, index_UIElementSchema as UIElementSchema, type index_UpdateBookmarkOptions as UpdateBookmarkOptions, type index_UpdateDashboardOptions as UpdateDashboardOptions, type index_UpdateReportOptions as UpdateReportOptions, type index_UpdateUIOptions as UpdateUIOptions, type index_User as User, index_createBookmark as createBookmark, index_createDashboard as createDashboard, index_createReport as createReport, index_createUI as createUI, index_createUser as createUser, index_deleteBookmark as deleteBookmark, index_deleteDashboard as deleteDashboard, index_deleteReport as deleteReport, index_deleteUI as deleteUI, index_deleteUser as deleteUser, index_getActions as getActions, index_getAllBookmarks as getAllBookmarks, index_getAllDashboards as getAllDashboards, index_getAllReports as getAllReports, index_getAllUIs as getAllUIs, index_getAllUsers as getAllUsers, index_getBookmark as getBookmark,
|
|
1823
|
+
export { type index_Binding as Binding, index_BindingSchema as BindingSchema, type index_Bookmark as Bookmark, type index_CreateBookmarkOptions as CreateBookmarkOptions, type index_CreateDashboardOptions as CreateDashboardOptions, type index_CreateReportOptions as CreateReportOptions, type index_CreateUIOptions as CreateUIOptions, type DSLRendererProps$2 as DSLRendererProps, DSLRendererPropsSchema$2 as DSLRendererPropsSchema, type index_Dashboard as Dashboard, type index_Expression as Expression, index_ExpressionSchema as ExpressionSchema, type index_ForDirective as ForDirective, index_ForDirectiveSchema as ForDirectiveSchema, type index_QueryBookmarksOptions as QueryBookmarksOptions, type index_QueryDashboardsOptions as QueryDashboardsOptions, type index_QueryReportsOptions as QueryReportsOptions, type index_QuerySpec as QuerySpec, index_QuerySpecSchema as QuerySpecSchema, type index_QueryUIsOptions as QueryUIsOptions, type index_QueryUsersOptions as QueryUsersOptions, type index_Report as Report, type DSLRendererProps$1 as ReportDSLRendererProps, type index_UI as UI, type index_UIComponent as UIComponent, index_UIComponentSchema as UIComponentSchema, type DSLRendererProps as UIDSLRendererProps, type index_UIElement as UIElement, index_UIElementSchema as UIElementSchema, type index_UpdateBookmarkOptions as UpdateBookmarkOptions, type index_UpdateDashboardOptions as UpdateDashboardOptions, type index_UpdateReportOptions as UpdateReportOptions, type index_UpdateUIOptions as UpdateUIOptions, type index_User as User, index_createBookmark as createBookmark, index_createDashboard as createDashboard, index_createReport as createReport, index_createUI as createUI, index_createUser as createUser, index_deleteBookmark as deleteBookmark, index_deleteDashboard as deleteDashboard, index_deleteReport as deleteReport, index_deleteUI as deleteUI, index_deleteUser as deleteUser, index_getActions as getActions, index_getAllBookmarks as getAllBookmarks, index_getAllDashboards as getAllDashboards, index_getAllReports as getAllReports, index_getAllUIs as getAllUIs, index_getAllUsers as getAllUsers, index_getBookmark as getBookmark, index_getComponentSuggestions as getComponentSuggestions, index_getDashboard as getDashboard, index_getReport as getReport, index_getUI as getUI, index_getUser as getUser, index_queryBookmarks as queryBookmarks, index_queryDashboards as queryDashboards, index_queryReports as queryReports, index_queryUIs as queryUIs, index_queryUsers as queryUsers, index_requestBundle as requestBundle, index_requestData as requestData, index_sendAuthLoginRequest as sendAuthLoginRequest, index_sendAuthVerifyRequest as sendAuthVerifyRequest, index_sendComponents as sendComponents, index_sendUserPromptRequest as sendUserPromptRequest, index_sendUserPromptSuggestionsRequest as sendUserPromptSuggestionsRequest, index_updateBookmark as updateBookmark, index_updateDashboard as updateDashboard, index_updateReport as updateReport, index_updateUI as updateUI, index_updateUser as updateUser };
|
|
1786
1824
|
}
|
|
1787
1825
|
|
|
1788
1826
|
type MessageHandler = (message: Message) => void;
|
|
@@ -2036,6 +2074,17 @@ declare class SuperatomClient {
|
|
|
2036
2074
|
user?: User;
|
|
2037
2075
|
message?: string;
|
|
2038
2076
|
}>;
|
|
2077
|
+
/**
|
|
2078
|
+
* Query users with filters, limit, and sort
|
|
2079
|
+
* Delegates to users service
|
|
2080
|
+
*/
|
|
2081
|
+
queryUsers(options?: QueryUsersOptions, timeout?: number): Promise<{
|
|
2082
|
+
success: boolean;
|
|
2083
|
+
error?: string;
|
|
2084
|
+
users?: User[];
|
|
2085
|
+
count?: number;
|
|
2086
|
+
message?: string;
|
|
2087
|
+
}>;
|
|
2039
2088
|
/**
|
|
2040
2089
|
* Create a new dashboard
|
|
2041
2090
|
* Delegates to dashboards service
|
|
@@ -2155,21 +2204,10 @@ declare class SuperatomClient {
|
|
|
2155
2204
|
message?: string;
|
|
2156
2205
|
}>;
|
|
2157
2206
|
/**
|
|
2158
|
-
*
|
|
2159
|
-
* Delegates to bookmarks service
|
|
2160
|
-
*/
|
|
2161
|
-
getBookmarksByUser(userId: number, threadId?: string, timeout?: number): Promise<{
|
|
2162
|
-
success: boolean;
|
|
2163
|
-
error?: string;
|
|
2164
|
-
data?: Bookmark[];
|
|
2165
|
-
count?: number;
|
|
2166
|
-
message?: string;
|
|
2167
|
-
}>;
|
|
2168
|
-
/**
|
|
2169
|
-
* Get bookmarks by thread ID
|
|
2207
|
+
* Query bookmarks with filters, limit, and sort
|
|
2170
2208
|
* Delegates to bookmarks service
|
|
2171
2209
|
*/
|
|
2172
|
-
|
|
2210
|
+
queryBookmarks(options?: QueryBookmarksOptions, timeout?: number): Promise<{
|
|
2173
2211
|
success: boolean;
|
|
2174
2212
|
error?: string;
|
|
2175
2213
|
data?: Bookmark[];
|
package/dist/index.d.ts
CHANGED
|
@@ -826,6 +826,17 @@ declare const ComponentsSendMessageSchema: z.ZodObject<{
|
|
|
826
826
|
}, z.core.$strip>;
|
|
827
827
|
}, z.core.$strip>;
|
|
828
828
|
type ComponentsSendMessage = z.infer<typeof ComponentsSendMessageSchema>;
|
|
829
|
+
/**
|
|
830
|
+
* User query filters schema
|
|
831
|
+
* Synced with sdk-nodejs: UserQueryFiltersSchema
|
|
832
|
+
*/
|
|
833
|
+
declare const UserQueryFiltersSchema: z.ZodObject<{
|
|
834
|
+
username: z.ZodOptional<z.ZodString>;
|
|
835
|
+
email: z.ZodOptional<z.ZodString>;
|
|
836
|
+
role: z.ZodOptional<z.ZodString>;
|
|
837
|
+
fullname: z.ZodOptional<z.ZodString>;
|
|
838
|
+
}, z.core.$strip>;
|
|
839
|
+
type UserQueryFilters = z.infer<typeof UserQueryFiltersSchema>;
|
|
829
840
|
/**
|
|
830
841
|
* Dashboard query filters schema
|
|
831
842
|
* Synced with sdk-nodejs: DashboardQueryFiltersSchema
|
|
@@ -889,6 +900,16 @@ declare const BookmarkDataSchema: z.ZodObject<{
|
|
|
889
900
|
updated_at: z.ZodOptional<z.ZodString>;
|
|
890
901
|
}, z.core.$strip>;
|
|
891
902
|
type BookmarkData = z.infer<typeof BookmarkDataSchema>;
|
|
903
|
+
/**
|
|
904
|
+
* Bookmark query filters schema
|
|
905
|
+
* Synced with sdk-nodejs: BookmarkQueryFiltersSchema
|
|
906
|
+
*/
|
|
907
|
+
declare const BookmarkQueryFiltersSchema: z.ZodObject<{
|
|
908
|
+
userId: z.ZodOptional<z.ZodNumber>;
|
|
909
|
+
threadId: z.ZodOptional<z.ZodString>;
|
|
910
|
+
name: z.ZodOptional<z.ZodString>;
|
|
911
|
+
}, z.core.$strip>;
|
|
912
|
+
type BookmarkQueryFilters = z.infer<typeof BookmarkQueryFiltersSchema>;
|
|
892
913
|
/**
|
|
893
914
|
* Client configuration schema
|
|
894
915
|
*/
|
|
@@ -1123,6 +1144,28 @@ declare function getUser(client: SuperatomClient, username: string, timeout?: nu
|
|
|
1123
1144
|
user?: User;
|
|
1124
1145
|
message?: string;
|
|
1125
1146
|
}>;
|
|
1147
|
+
/**
|
|
1148
|
+
* Query users options
|
|
1149
|
+
*/
|
|
1150
|
+
interface QueryUsersOptions {
|
|
1151
|
+
filters?: UserQueryFilters;
|
|
1152
|
+
limit?: number;
|
|
1153
|
+
sort?: 'ASC' | 'DESC';
|
|
1154
|
+
}
|
|
1155
|
+
/**
|
|
1156
|
+
* Query users with filters, limit, and sort
|
|
1157
|
+
* @param client - SuperatomClient instance
|
|
1158
|
+
* @param options - Query options with filters, limit, and sort
|
|
1159
|
+
* @param timeout - Request timeout in milliseconds
|
|
1160
|
+
* @returns Server response with list of users
|
|
1161
|
+
*/
|
|
1162
|
+
declare function queryUsers(client: SuperatomClient, options?: QueryUsersOptions, timeout?: number): Promise<{
|
|
1163
|
+
success: boolean;
|
|
1164
|
+
error?: string;
|
|
1165
|
+
users?: User[];
|
|
1166
|
+
count?: number;
|
|
1167
|
+
message?: string;
|
|
1168
|
+
}>;
|
|
1126
1169
|
|
|
1127
1170
|
/**
|
|
1128
1171
|
* Dashboards Service
|
|
@@ -1500,28 +1543,21 @@ declare function getBookmark(client: SuperatomClient, id: number, timeout?: numb
|
|
|
1500
1543
|
message?: string;
|
|
1501
1544
|
}>;
|
|
1502
1545
|
/**
|
|
1503
|
-
*
|
|
1504
|
-
* @param client - SuperatomClient instance
|
|
1505
|
-
* @param userId - User ID to filter by
|
|
1506
|
-
* @param threadId - Optional thread ID to filter by
|
|
1507
|
-
* @param timeout - Request timeout in milliseconds
|
|
1508
|
-
* @returns Server response with list of bookmarks
|
|
1546
|
+
* Query bookmarks options
|
|
1509
1547
|
*/
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
message?: string;
|
|
1516
|
-
}>;
|
|
1548
|
+
interface QueryBookmarksOptions {
|
|
1549
|
+
filters?: BookmarkQueryFilters;
|
|
1550
|
+
limit?: number;
|
|
1551
|
+
sort?: 'ASC' | 'DESC';
|
|
1552
|
+
}
|
|
1517
1553
|
/**
|
|
1518
|
-
*
|
|
1554
|
+
* Query bookmarks with filters, limit, and sort
|
|
1519
1555
|
* @param client - SuperatomClient instance
|
|
1520
|
-
* @param
|
|
1556
|
+
* @param options - Query options with filters, limit, and sort
|
|
1521
1557
|
* @param timeout - Request timeout in milliseconds
|
|
1522
1558
|
* @returns Server response with list of bookmarks
|
|
1523
1559
|
*/
|
|
1524
|
-
declare function
|
|
1560
|
+
declare function queryBookmarks(client: SuperatomClient, options?: QueryBookmarksOptions, timeout?: number): Promise<{
|
|
1525
1561
|
success: boolean;
|
|
1526
1562
|
error?: string;
|
|
1527
1563
|
data?: BookmarkData[];
|
|
@@ -1726,11 +1762,13 @@ type index_Expression = Expression;
|
|
|
1726
1762
|
declare const index_ExpressionSchema: typeof ExpressionSchema;
|
|
1727
1763
|
type index_ForDirective = ForDirective;
|
|
1728
1764
|
declare const index_ForDirectiveSchema: typeof ForDirectiveSchema;
|
|
1765
|
+
type index_QueryBookmarksOptions = QueryBookmarksOptions;
|
|
1729
1766
|
type index_QueryDashboardsOptions = QueryDashboardsOptions;
|
|
1730
1767
|
type index_QueryReportsOptions = QueryReportsOptions;
|
|
1731
1768
|
type index_QuerySpec = QuerySpec;
|
|
1732
1769
|
declare const index_QuerySpecSchema: typeof QuerySpecSchema;
|
|
1733
1770
|
type index_QueryUIsOptions = QueryUIsOptions;
|
|
1771
|
+
type index_QueryUsersOptions = QueryUsersOptions;
|
|
1734
1772
|
type index_Report = Report;
|
|
1735
1773
|
type index_UI = UI;
|
|
1736
1774
|
type index_UIComponent = UIComponent;
|
|
@@ -1759,16 +1797,16 @@ declare const index_getAllReports: typeof getAllReports;
|
|
|
1759
1797
|
declare const index_getAllUIs: typeof getAllUIs;
|
|
1760
1798
|
declare const index_getAllUsers: typeof getAllUsers;
|
|
1761
1799
|
declare const index_getBookmark: typeof getBookmark;
|
|
1762
|
-
declare const index_getBookmarksByThread: typeof getBookmarksByThread;
|
|
1763
|
-
declare const index_getBookmarksByUser: typeof getBookmarksByUser;
|
|
1764
1800
|
declare const index_getComponentSuggestions: typeof getComponentSuggestions;
|
|
1765
1801
|
declare const index_getDashboard: typeof getDashboard;
|
|
1766
1802
|
declare const index_getReport: typeof getReport;
|
|
1767
1803
|
declare const index_getUI: typeof getUI;
|
|
1768
1804
|
declare const index_getUser: typeof getUser;
|
|
1805
|
+
declare const index_queryBookmarks: typeof queryBookmarks;
|
|
1769
1806
|
declare const index_queryDashboards: typeof queryDashboards;
|
|
1770
1807
|
declare const index_queryReports: typeof queryReports;
|
|
1771
1808
|
declare const index_queryUIs: typeof queryUIs;
|
|
1809
|
+
declare const index_queryUsers: typeof queryUsers;
|
|
1772
1810
|
declare const index_requestBundle: typeof requestBundle;
|
|
1773
1811
|
declare const index_requestData: typeof requestData;
|
|
1774
1812
|
declare const index_sendAuthLoginRequest: typeof sendAuthLoginRequest;
|
|
@@ -1782,7 +1820,7 @@ declare const index_updateReport: typeof updateReport;
|
|
|
1782
1820
|
declare const index_updateUI: typeof updateUI;
|
|
1783
1821
|
declare const index_updateUser: typeof updateUser;
|
|
1784
1822
|
declare namespace index {
|
|
1785
|
-
export { type index_Binding as Binding, index_BindingSchema as BindingSchema, type index_Bookmark as Bookmark, type index_CreateBookmarkOptions as CreateBookmarkOptions, type index_CreateDashboardOptions as CreateDashboardOptions, type index_CreateReportOptions as CreateReportOptions, type index_CreateUIOptions as CreateUIOptions, type DSLRendererProps$2 as DSLRendererProps, DSLRendererPropsSchema$2 as DSLRendererPropsSchema, type index_Dashboard as Dashboard, type index_Expression as Expression, index_ExpressionSchema as ExpressionSchema, type index_ForDirective as ForDirective, index_ForDirectiveSchema as ForDirectiveSchema, type index_QueryDashboardsOptions as QueryDashboardsOptions, type index_QueryReportsOptions as QueryReportsOptions, type index_QuerySpec as QuerySpec, index_QuerySpecSchema as QuerySpecSchema, type index_QueryUIsOptions as QueryUIsOptions, type index_Report as Report, type DSLRendererProps$1 as ReportDSLRendererProps, type index_UI as UI, type index_UIComponent as UIComponent, index_UIComponentSchema as UIComponentSchema, type DSLRendererProps as UIDSLRendererProps, type index_UIElement as UIElement, index_UIElementSchema as UIElementSchema, type index_UpdateBookmarkOptions as UpdateBookmarkOptions, type index_UpdateDashboardOptions as UpdateDashboardOptions, type index_UpdateReportOptions as UpdateReportOptions, type index_UpdateUIOptions as UpdateUIOptions, type index_User as User, index_createBookmark as createBookmark, index_createDashboard as createDashboard, index_createReport as createReport, index_createUI as createUI, index_createUser as createUser, index_deleteBookmark as deleteBookmark, index_deleteDashboard as deleteDashboard, index_deleteReport as deleteReport, index_deleteUI as deleteUI, index_deleteUser as deleteUser, index_getActions as getActions, index_getAllBookmarks as getAllBookmarks, index_getAllDashboards as getAllDashboards, index_getAllReports as getAllReports, index_getAllUIs as getAllUIs, index_getAllUsers as getAllUsers, index_getBookmark as getBookmark,
|
|
1823
|
+
export { type index_Binding as Binding, index_BindingSchema as BindingSchema, type index_Bookmark as Bookmark, type index_CreateBookmarkOptions as CreateBookmarkOptions, type index_CreateDashboardOptions as CreateDashboardOptions, type index_CreateReportOptions as CreateReportOptions, type index_CreateUIOptions as CreateUIOptions, type DSLRendererProps$2 as DSLRendererProps, DSLRendererPropsSchema$2 as DSLRendererPropsSchema, type index_Dashboard as Dashboard, type index_Expression as Expression, index_ExpressionSchema as ExpressionSchema, type index_ForDirective as ForDirective, index_ForDirectiveSchema as ForDirectiveSchema, type index_QueryBookmarksOptions as QueryBookmarksOptions, type index_QueryDashboardsOptions as QueryDashboardsOptions, type index_QueryReportsOptions as QueryReportsOptions, type index_QuerySpec as QuerySpec, index_QuerySpecSchema as QuerySpecSchema, type index_QueryUIsOptions as QueryUIsOptions, type index_QueryUsersOptions as QueryUsersOptions, type index_Report as Report, type DSLRendererProps$1 as ReportDSLRendererProps, type index_UI as UI, type index_UIComponent as UIComponent, index_UIComponentSchema as UIComponentSchema, type DSLRendererProps as UIDSLRendererProps, type index_UIElement as UIElement, index_UIElementSchema as UIElementSchema, type index_UpdateBookmarkOptions as UpdateBookmarkOptions, type index_UpdateDashboardOptions as UpdateDashboardOptions, type index_UpdateReportOptions as UpdateReportOptions, type index_UpdateUIOptions as UpdateUIOptions, type index_User as User, index_createBookmark as createBookmark, index_createDashboard as createDashboard, index_createReport as createReport, index_createUI as createUI, index_createUser as createUser, index_deleteBookmark as deleteBookmark, index_deleteDashboard as deleteDashboard, index_deleteReport as deleteReport, index_deleteUI as deleteUI, index_deleteUser as deleteUser, index_getActions as getActions, index_getAllBookmarks as getAllBookmarks, index_getAllDashboards as getAllDashboards, index_getAllReports as getAllReports, index_getAllUIs as getAllUIs, index_getAllUsers as getAllUsers, index_getBookmark as getBookmark, index_getComponentSuggestions as getComponentSuggestions, index_getDashboard as getDashboard, index_getReport as getReport, index_getUI as getUI, index_getUser as getUser, index_queryBookmarks as queryBookmarks, index_queryDashboards as queryDashboards, index_queryReports as queryReports, index_queryUIs as queryUIs, index_queryUsers as queryUsers, index_requestBundle as requestBundle, index_requestData as requestData, index_sendAuthLoginRequest as sendAuthLoginRequest, index_sendAuthVerifyRequest as sendAuthVerifyRequest, index_sendComponents as sendComponents, index_sendUserPromptRequest as sendUserPromptRequest, index_sendUserPromptSuggestionsRequest as sendUserPromptSuggestionsRequest, index_updateBookmark as updateBookmark, index_updateDashboard as updateDashboard, index_updateReport as updateReport, index_updateUI as updateUI, index_updateUser as updateUser };
|
|
1786
1824
|
}
|
|
1787
1825
|
|
|
1788
1826
|
type MessageHandler = (message: Message) => void;
|
|
@@ -2036,6 +2074,17 @@ declare class SuperatomClient {
|
|
|
2036
2074
|
user?: User;
|
|
2037
2075
|
message?: string;
|
|
2038
2076
|
}>;
|
|
2077
|
+
/**
|
|
2078
|
+
* Query users with filters, limit, and sort
|
|
2079
|
+
* Delegates to users service
|
|
2080
|
+
*/
|
|
2081
|
+
queryUsers(options?: QueryUsersOptions, timeout?: number): Promise<{
|
|
2082
|
+
success: boolean;
|
|
2083
|
+
error?: string;
|
|
2084
|
+
users?: User[];
|
|
2085
|
+
count?: number;
|
|
2086
|
+
message?: string;
|
|
2087
|
+
}>;
|
|
2039
2088
|
/**
|
|
2040
2089
|
* Create a new dashboard
|
|
2041
2090
|
* Delegates to dashboards service
|
|
@@ -2155,21 +2204,10 @@ declare class SuperatomClient {
|
|
|
2155
2204
|
message?: string;
|
|
2156
2205
|
}>;
|
|
2157
2206
|
/**
|
|
2158
|
-
*
|
|
2159
|
-
* Delegates to bookmarks service
|
|
2160
|
-
*/
|
|
2161
|
-
getBookmarksByUser(userId: number, threadId?: string, timeout?: number): Promise<{
|
|
2162
|
-
success: boolean;
|
|
2163
|
-
error?: string;
|
|
2164
|
-
data?: Bookmark[];
|
|
2165
|
-
count?: number;
|
|
2166
|
-
message?: string;
|
|
2167
|
-
}>;
|
|
2168
|
-
/**
|
|
2169
|
-
* Get bookmarks by thread ID
|
|
2207
|
+
* Query bookmarks with filters, limit, and sort
|
|
2170
2208
|
* Delegates to bookmarks service
|
|
2171
2209
|
*/
|
|
2172
|
-
|
|
2210
|
+
queryBookmarks(options?: QueryBookmarksOptions, timeout?: number): Promise<{
|
|
2173
2211
|
success: boolean;
|
|
2174
2212
|
error?: string;
|
|
2175
2213
|
data?: Bookmark[];
|
package/dist/index.js
CHANGED
|
@@ -186,7 +186,7 @@ var DSLRendererPropsSchema2 = z.object({
|
|
|
186
186
|
context: z.record(z.string(), z.any()).optional()
|
|
187
187
|
});
|
|
188
188
|
|
|
189
|
-
// src/
|
|
189
|
+
// src/types.ts
|
|
190
190
|
var MessageParticipantSchema = z.object({
|
|
191
191
|
id: z.string().optional(),
|
|
192
192
|
type: z.string().optional()
|
|
@@ -429,14 +429,25 @@ var ComponentsSendMessageSchema = z.object({
|
|
|
429
429
|
to: MessageParticipantSchema.optional(),
|
|
430
430
|
payload: ComponentsSendPayloadSchema
|
|
431
431
|
});
|
|
432
|
+
var UserQueryFiltersSchema = z.object({
|
|
433
|
+
username: z.string().optional(),
|
|
434
|
+
email: z.string().optional(),
|
|
435
|
+
role: z.string().optional(),
|
|
436
|
+
fullname: z.string().optional()
|
|
437
|
+
});
|
|
432
438
|
var UsersRequestPayloadSchema = z.object({
|
|
433
|
-
operation: z.enum(["create", "update", "delete", "getAll", "getOne"]),
|
|
439
|
+
operation: z.enum(["create", "update", "delete", "getAll", "getOne", "query"]),
|
|
434
440
|
data: z.object({
|
|
441
|
+
id: z.number().optional(),
|
|
435
442
|
username: z.string().optional(),
|
|
436
443
|
email: z.string().email("Invalid email format").optional(),
|
|
437
444
|
password: z.string().optional(),
|
|
438
445
|
fullname: z.string().optional(),
|
|
439
|
-
role: z.string().optional()
|
|
446
|
+
role: z.string().optional(),
|
|
447
|
+
// Query operation fields
|
|
448
|
+
filters: UserQueryFiltersSchema.optional(),
|
|
449
|
+
limit: z.number().optional(),
|
|
450
|
+
sort: z.enum(["ASC", "DESC"]).optional()
|
|
440
451
|
}).optional()
|
|
441
452
|
});
|
|
442
453
|
var UsersRequestMessageSchema = z.object({
|
|
@@ -647,15 +658,24 @@ var BookmarkDataSchema = z.object({
|
|
|
647
658
|
created_at: z.string().optional(),
|
|
648
659
|
updated_at: z.string().optional()
|
|
649
660
|
});
|
|
661
|
+
var BookmarkQueryFiltersSchema = z.object({
|
|
662
|
+
userId: z.number().optional(),
|
|
663
|
+
threadId: z.string().optional(),
|
|
664
|
+
name: z.string().optional()
|
|
665
|
+
});
|
|
650
666
|
var BookmarksRequestPayloadSchema = z.object({
|
|
651
|
-
operation: z.enum(["create", "update", "delete", "getAll", "getOne", "
|
|
667
|
+
operation: z.enum(["create", "update", "delete", "getAll", "getOne", "query"]),
|
|
652
668
|
data: z.object({
|
|
653
669
|
id: z.number().optional(),
|
|
654
670
|
userId: z.number().optional(),
|
|
655
671
|
threadId: z.string().optional(),
|
|
656
672
|
name: z.string().optional(),
|
|
657
673
|
description: z.string().optional(),
|
|
658
|
-
uiblock: DBUIBlockSchema.optional()
|
|
674
|
+
uiblock: DBUIBlockSchema.optional(),
|
|
675
|
+
// Query operation fields
|
|
676
|
+
filters: BookmarkQueryFiltersSchema.optional(),
|
|
677
|
+
limit: z.number().optional(),
|
|
678
|
+
sort: z.enum(["ASC", "DESC"]).optional()
|
|
659
679
|
}).optional()
|
|
660
680
|
});
|
|
661
681
|
var BookmarksRequestMessageSchema = z.object({
|
|
@@ -721,16 +741,16 @@ __export(services_exports, {
|
|
|
721
741
|
getAllUIs: () => getAllUIs,
|
|
722
742
|
getAllUsers: () => getAllUsers,
|
|
723
743
|
getBookmark: () => getBookmark,
|
|
724
|
-
getBookmarksByThread: () => getBookmarksByThread,
|
|
725
|
-
getBookmarksByUser: () => getBookmarksByUser,
|
|
726
744
|
getComponentSuggestions: () => getComponentSuggestions,
|
|
727
745
|
getDashboard: () => getDashboard,
|
|
728
746
|
getReport: () => getReport,
|
|
729
747
|
getUI: () => getUI,
|
|
730
748
|
getUser: () => getUser,
|
|
749
|
+
queryBookmarks: () => queryBookmarks,
|
|
731
750
|
queryDashboards: () => queryDashboards,
|
|
732
751
|
queryReports: () => queryReports,
|
|
733
752
|
queryUIs: () => queryUIs,
|
|
753
|
+
queryUsers: () => queryUsers,
|
|
734
754
|
requestBundle: () => requestBundle,
|
|
735
755
|
requestData: () => requestData,
|
|
736
756
|
sendAuthLoginRequest: () => sendAuthLoginRequest,
|
|
@@ -1084,6 +1104,33 @@ async function getUser(client, username, timeout) {
|
|
|
1084
1104
|
message: payload.data?.message
|
|
1085
1105
|
};
|
|
1086
1106
|
}
|
|
1107
|
+
async function queryUsers(client, options = {}, timeout) {
|
|
1108
|
+
const { filters, limit, sort } = options;
|
|
1109
|
+
const messageId = `users_query_${Date.now()}`;
|
|
1110
|
+
const message = UsersRequestMessageSchema.parse({
|
|
1111
|
+
id: messageId,
|
|
1112
|
+
type: "USERS",
|
|
1113
|
+
from: { type: client.type },
|
|
1114
|
+
to: { type: "data-agent" },
|
|
1115
|
+
payload: {
|
|
1116
|
+
operation: "query",
|
|
1117
|
+
data: {
|
|
1118
|
+
filters,
|
|
1119
|
+
limit,
|
|
1120
|
+
sort
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
});
|
|
1124
|
+
const response = await client.sendWithResponse(message, timeout);
|
|
1125
|
+
const payload = response.payload;
|
|
1126
|
+
return {
|
|
1127
|
+
success: payload.success,
|
|
1128
|
+
error: payload.error,
|
|
1129
|
+
users: payload.data?.users,
|
|
1130
|
+
count: payload.data?.count,
|
|
1131
|
+
message: payload.data?.message
|
|
1132
|
+
};
|
|
1133
|
+
}
|
|
1087
1134
|
|
|
1088
1135
|
// src/services/dashboards/index.ts
|
|
1089
1136
|
async function createDashboard(client, options, timeout) {
|
|
@@ -1529,42 +1576,20 @@ async function getBookmark(client, id, timeout) {
|
|
|
1529
1576
|
message: payload.message
|
|
1530
1577
|
};
|
|
1531
1578
|
}
|
|
1532
|
-
async function
|
|
1533
|
-
const
|
|
1534
|
-
const
|
|
1535
|
-
id: messageId,
|
|
1536
|
-
type: "BOOKMARKS",
|
|
1537
|
-
from: { type: client.type },
|
|
1538
|
-
to: { type: "data-agent" },
|
|
1539
|
-
payload: {
|
|
1540
|
-
operation: "getByUser",
|
|
1541
|
-
data: {
|
|
1542
|
-
userId,
|
|
1543
|
-
threadId
|
|
1544
|
-
}
|
|
1545
|
-
}
|
|
1546
|
-
});
|
|
1547
|
-
const response = await client.sendWithResponse(message, timeout);
|
|
1548
|
-
const payload = response.payload;
|
|
1549
|
-
return {
|
|
1550
|
-
success: payload.success,
|
|
1551
|
-
error: payload.error,
|
|
1552
|
-
data: Array.isArray(payload.data) ? payload.data : payload.data ? [payload.data] : [],
|
|
1553
|
-
count: payload.count,
|
|
1554
|
-
message: payload.message
|
|
1555
|
-
};
|
|
1556
|
-
}
|
|
1557
|
-
async function getBookmarksByThread(client, threadId, timeout) {
|
|
1558
|
-
const messageId = `bookmarks_getbythread_${Date.now()}`;
|
|
1579
|
+
async function queryBookmarks(client, options = {}, timeout) {
|
|
1580
|
+
const { filters, limit, sort } = options;
|
|
1581
|
+
const messageId = `bookmarks_query_${Date.now()}`;
|
|
1559
1582
|
const message = BookmarksRequestMessageSchema.parse({
|
|
1560
1583
|
id: messageId,
|
|
1561
1584
|
type: "BOOKMARKS",
|
|
1562
1585
|
from: { type: client.type },
|
|
1563
1586
|
to: { type: "data-agent" },
|
|
1564
1587
|
payload: {
|
|
1565
|
-
operation: "
|
|
1588
|
+
operation: "query",
|
|
1566
1589
|
data: {
|
|
1567
|
-
|
|
1590
|
+
filters,
|
|
1591
|
+
limit,
|
|
1592
|
+
sort
|
|
1568
1593
|
}
|
|
1569
1594
|
}
|
|
1570
1595
|
});
|
|
@@ -2137,6 +2162,14 @@ var SuperatomClient = class {
|
|
|
2137
2162
|
this.log("info", "Fetching user:", username);
|
|
2138
2163
|
return getUser(this, username, timeout);
|
|
2139
2164
|
}
|
|
2165
|
+
/**
|
|
2166
|
+
* Query users with filters, limit, and sort
|
|
2167
|
+
* Delegates to users service
|
|
2168
|
+
*/
|
|
2169
|
+
async queryUsers(options = {}, timeout) {
|
|
2170
|
+
this.log("info", "Querying users with filters:", options.filters);
|
|
2171
|
+
return queryUsers(this, options, timeout);
|
|
2172
|
+
}
|
|
2140
2173
|
// ==================== Dashboard Management Methods ====================
|
|
2141
2174
|
// These methods delegate to dashboard service for admin dashboard CRUD operations
|
|
2142
2175
|
/**
|
|
@@ -2230,20 +2263,12 @@ var SuperatomClient = class {
|
|
|
2230
2263
|
return getBookmark(this, id, timeout);
|
|
2231
2264
|
}
|
|
2232
2265
|
/**
|
|
2233
|
-
*
|
|
2234
|
-
* Delegates to bookmarks service
|
|
2235
|
-
*/
|
|
2236
|
-
async getBookmarksByUser(userId, threadId, timeout) {
|
|
2237
|
-
this.log("info", "Fetching bookmarks for user:", userId);
|
|
2238
|
-
return getBookmarksByUser(this, userId, threadId, timeout);
|
|
2239
|
-
}
|
|
2240
|
-
/**
|
|
2241
|
-
* Get bookmarks by thread ID
|
|
2266
|
+
* Query bookmarks with filters, limit, and sort
|
|
2242
2267
|
* Delegates to bookmarks service
|
|
2243
2268
|
*/
|
|
2244
|
-
async
|
|
2245
|
-
this.log("info", "
|
|
2246
|
-
return
|
|
2269
|
+
async queryBookmarks(options = {}, timeout) {
|
|
2270
|
+
this.log("info", "Querying bookmarks with filters:", options.filters);
|
|
2271
|
+
return queryBookmarks(this, options, timeout);
|
|
2247
2272
|
}
|
|
2248
2273
|
// ==================== Report Management Methods ====================
|
|
2249
2274
|
// These methods delegate to report service for admin report CRUD operations
|