@prostgles/app 2.3.6-dev.1791902951 → 2.3.6-dev.1792007925

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 (225) hide show
  1. package/client/build/js/733.bundle.js +1 -1
  2. package/client/build/js/main.bundle.js +2 -2
  3. package/dist/common/ColumnConfig/ColumnConfig.d.ts +1 -0
  4. package/dist/common/ColumnConfig/ColumnConfig.d.ts.map +1 -1
  5. package/dist/common/ColumnConfig/getComputedColumnSelect.d.ts +4 -0
  6. package/dist/common/ColumnConfig/getComputedColumnSelect.d.ts.map +1 -0
  7. package/dist/common/ColumnConfig/getComputedColumnSelect.js +39 -0
  8. package/dist/common/ColumnConfig/getComputedColumnSelect.js.map +1 -0
  9. package/dist/common/DBGeneratedSchema.d.ts +63 -235
  10. package/dist/common/DBGeneratedSchema.d.ts.map +1 -1
  11. package/dist/common/DashboardTypes.d.ts +2 -1
  12. package/dist/common/DashboardTypes.d.ts.map +1 -1
  13. package/dist/common/actionColumn.d.ts.map +1 -1
  14. package/dist/common/actionColumn.js.map +1 -1
  15. package/dist/common/columnDisplayFormat.schema.d.ts +22 -0
  16. package/dist/common/columnDisplayFormat.schema.d.ts.map +1 -1
  17. package/dist/common/columnDisplayFormat.schema.js +23 -0
  18. package/dist/common/columnDisplayFormat.schema.js.map +1 -1
  19. package/dist/common/createActionColumn.d.ts +1 -1
  20. package/dist/common/functionOptions.d.ts +1 -1
  21. package/dist/common/functionOptions.d.ts.map +1 -1
  22. package/dist/common/functionOptions.js +4 -2
  23. package/dist/common/functionOptions.js.map +1 -1
  24. package/dist/common/jobAction.d.ts.map +1 -1
  25. package/dist/common/jobAction.js +19 -11
  26. package/dist/common/jobAction.js.map +1 -1
  27. package/dist/common/llmUtils.d.ts.map +1 -1
  28. package/dist/common/managedTableSchema.d.ts +4 -0
  29. package/dist/common/managedTableSchema.d.ts.map +1 -1
  30. package/dist/common/managedTableSchema.js +12 -2
  31. package/dist/common/managedTableSchema.js.map +1 -1
  32. package/dist/common/mcp/tableOptionsJsonbSchema.d.ts +76 -6
  33. package/dist/common/mcp/tableOptionsJsonbSchema.d.ts.map +1 -1
  34. package/dist/common/mcp/tableOptionsJsonbSchema.js +19 -1
  35. package/dist/common/mcp/tableOptionsJsonbSchema.js.map +1 -1
  36. package/dist/common/mcp/ui.mcp.schema.d.ts +76 -6
  37. package/dist/common/mcp/ui.mcp.schema.d.ts.map +1 -1
  38. package/dist/common/prostglesApiTypes.d.ts +1 -1
  39. package/dist/common/prostglesApiTypes.d.ts.map +1 -1
  40. package/dist/common/prostglesApiTypes.js +5 -5
  41. package/dist/common/prostglesMcp.d.ts +76 -6
  42. package/dist/common/prostglesMcp.d.ts.map +1 -1
  43. package/dist/server/package.json +2 -2
  44. package/dist/server/src/Alerts/AlertTypes.d.ts +38 -0
  45. package/dist/server/src/Alerts/AlertTypes.d.ts.map +1 -0
  46. package/dist/server/src/Alerts/AlertTypes.js +7 -0
  47. package/dist/server/src/Alerts/AlertTypes.js.map +1 -0
  48. package/dist/server/src/Alerts/enqueueAlerts.d.ts +5 -0
  49. package/dist/server/src/Alerts/enqueueAlerts.d.ts.map +1 -0
  50. package/dist/server/src/Alerts/enqueueAlerts.js +37 -0
  51. package/dist/server/src/Alerts/enqueueAlerts.js.map +1 -0
  52. package/dist/server/src/Alerts/getAlertConfig.d.ts +5 -0
  53. package/dist/server/src/Alerts/getAlertConfig.d.ts.map +1 -0
  54. package/dist/server/src/Alerts/getAlertConfig.js +45 -0
  55. package/dist/server/src/Alerts/getAlertConfig.js.map +1 -0
  56. package/dist/server/src/Alerts/getAlertPublish.d.ts +5 -0
  57. package/dist/server/src/Alerts/getAlertPublish.d.ts.map +1 -0
  58. package/dist/server/src/Alerts/getAlertPublish.js +21 -0
  59. package/dist/server/src/Alerts/getAlertPublish.js.map +1 -0
  60. package/dist/server/src/Alerts/getAlertTables.d.ts +128 -0
  61. package/dist/server/src/Alerts/getAlertTables.d.ts.map +1 -0
  62. package/dist/server/src/Alerts/getAlertTables.js +109 -0
  63. package/dist/server/src/Alerts/getAlertTables.js.map +1 -0
  64. package/dist/server/src/Alerts/getAlertsPlugin.d.ts +4 -0
  65. package/dist/server/src/Alerts/getAlertsPlugin.d.ts.map +1 -0
  66. package/dist/server/src/Alerts/getAlertsPlugin.js +69 -0
  67. package/dist/server/src/Alerts/getAlertsPlugin.js.map +1 -0
  68. package/dist/server/src/Alerts/runAlertDelivery.d.ts +5 -0
  69. package/dist/server/src/Alerts/runAlertDelivery.d.ts.map +1 -0
  70. package/dist/server/src/Alerts/runAlertDelivery.js +68 -0
  71. package/dist/server/src/Alerts/runAlertDelivery.js.map +1 -0
  72. package/dist/server/src/BackupManager/BackupManager.d.ts +53 -1
  73. package/dist/server/src/BackupManager/BackupManager.d.ts.map +1 -1
  74. package/dist/server/src/ConnectionManager/ConnectionManager.d.ts +54 -1
  75. package/dist/server/src/ConnectionManager/ConnectionManager.d.ts.map +1 -1
  76. package/dist/server/src/ConnectionManager/ConnectionManager.js +3 -2
  77. package/dist/server/src/ConnectionManager/ConnectionManager.js.map +1 -1
  78. package/dist/server/src/ConnectionManager/getConnectionServerFunctions.d.ts.map +1 -1
  79. package/dist/server/src/ConnectionManager/getConnectionServerFunctions.js +5 -2
  80. package/dist/server/src/ConnectionManager/getConnectionServerFunctions.js.map +1 -1
  81. package/dist/server/src/ConnectionManager/getHotReloadConfigs.d.ts.map +1 -1
  82. package/dist/server/src/ConnectionManager/getHotReloadConfigs.js +3 -3
  83. package/dist/server/src/ConnectionManager/getHotReloadConfigs.js.map +1 -1
  84. package/dist/server/src/ConnectionManager/initConnectionManager.d.ts.map +1 -1
  85. package/dist/server/src/ConnectionManager/initConnectionManager.js +1 -3
  86. package/dist/server/src/ConnectionManager/initConnectionManager.js.map +1 -1
  87. package/dist/server/src/ConnectionManager/modifyClientFunctionSchema.d.ts.map +1 -1
  88. package/dist/server/src/ConnectionManager/modifyClientFunctionSchema.js.map +1 -1
  89. package/dist/server/src/ConnectionManager/modifyClientSchema.d.ts.map +1 -1
  90. package/dist/server/src/ConnectionManager/modifyClientSchema.js +14 -6
  91. package/dist/server/src/ConnectionManager/modifyClientSchema.js.map +1 -1
  92. package/dist/server/src/ConnectionManager/startConnection.d.ts.map +1 -1
  93. package/dist/server/src/ConnectionManager/startConnection.js +5 -2
  94. package/dist/server/src/ConnectionManager/startConnection.js.map +1 -1
  95. package/dist/server/src/ConnectionManager/syncSchemaConfig.d.ts.map +1 -1
  96. package/dist/server/src/ConnectionManager/syncSchemaConfig.js.map +1 -1
  97. package/dist/server/src/ConnectionManager/validateSchemaConfigActions.d.ts.map +1 -1
  98. package/dist/server/src/ConnectionManager/validateSchemaConfigActions.js +2 -1
  99. package/dist/server/src/ConnectionManager/validateSchemaConfigActions.js.map +1 -1
  100. package/dist/server/src/FileStorage/getAnnotationPageText.d.ts.map +1 -0
  101. package/dist/server/src/{ConnectionManager → FileStorage}/getAnnotationPageText.js +24 -10
  102. package/dist/server/src/FileStorage/getAnnotationPageText.js.map +1 -0
  103. package/dist/server/src/{ConnectionManager → FileStorage}/getAnnotationsTableHook.d.ts +1 -1
  104. package/dist/server/src/FileStorage/getAnnotationsTableHook.d.ts.map +1 -0
  105. package/dist/server/src/FileStorage/getAnnotationsTableHook.js.map +1 -0
  106. package/dist/server/src/FileStorage/getFilesPlugin.d.ts +6 -0
  107. package/dist/server/src/FileStorage/getFilesPlugin.d.ts.map +1 -0
  108. package/dist/server/src/FileStorage/getFilesPlugin.js +104 -0
  109. package/dist/server/src/FileStorage/getFilesPlugin.js.map +1 -0
  110. package/dist/server/src/{ConnectionManager → FileStorage}/getFilesTableHook.d.ts +4 -3
  111. package/dist/server/src/FileStorage/getFilesTableHook.d.ts.map +1 -0
  112. package/dist/server/src/{ConnectionManager → FileStorage}/getFilesTableHook.js +6 -8
  113. package/dist/server/src/FileStorage/getFilesTableHook.js.map +1 -0
  114. package/dist/server/src/{ConnectionManager/extractFileText.d.ts → FileStorage/getFilesTableJobs.d.ts} +2 -2
  115. package/dist/server/src/FileStorage/getFilesTableJobs.d.ts.map +1 -0
  116. package/dist/server/src/{ConnectionManager/extractFileText.js → FileStorage/getFilesTableJobs.js} +11 -7
  117. package/dist/server/src/FileStorage/getFilesTableJobs.js.map +1 -0
  118. package/dist/server/src/FileStorage/getFilesTableJobs.spec.d.ts +2 -0
  119. package/dist/server/src/FileStorage/getFilesTableJobs.spec.d.ts.map +1 -0
  120. package/dist/server/src/{ConnectionManager/extractFileText.spec.js → FileStorage/getFilesTableJobs.spec.js} +3 -3
  121. package/dist/server/src/FileStorage/getFilesTableJobs.spec.js.map +1 -0
  122. package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/definitionValidation/validateAgenticWorkflowDefinitions.d.ts.map +1 -1
  123. package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/proxyHandlers/createWorkflowExecutionHandlers.d.ts.map +1 -1
  124. package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/proxyHandlers/getAgentConfigWithDefaults.d.ts.map +1 -1
  125. package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Prostgles/agenticWorkflow/proxyHandlers/setupOrchestrationToolPermissions.d.ts.map +1 -1
  126. package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Ui.mcp.d.ts +76 -6
  127. package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Ui.mcp.d.ts.map +1 -1
  128. package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/WebDev/tools/getWebDevChatAndConnection.d.ts +53 -1
  129. package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/WebDev/tools/getWebDevChatAndConnection.d.ts.map +1 -1
  130. package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers.d.ts +152 -12
  131. package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers.d.ts.map +1 -1
  132. package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMcpHub.d.ts +152 -12
  133. package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMcpHub.d.ts.map +1 -1
  134. package/dist/server/src/Plugins/Plugins.d.ts +15 -0
  135. package/dist/server/src/Plugins/Plugins.d.ts.map +1 -0
  136. package/dist/server/src/Plugins/Plugins.js +3 -0
  137. package/dist/server/src/Plugins/Plugins.js.map +1 -0
  138. package/dist/server/src/{ConnectionManager/parseTableConfig.d.ts → Plugins/parsePlugins.d.ts} +8 -7
  139. package/dist/server/src/Plugins/parsePlugins.d.ts.map +1 -0
  140. package/dist/server/src/Plugins/parsePlugins.js +99 -0
  141. package/dist/server/src/Plugins/parsePlugins.js.map +1 -0
  142. package/dist/server/src/authConfig/emailProvider/getEmailSenderWithMockTest.d.ts +1 -1
  143. package/dist/server/src/authConfig/emailProvider/getEmailSenderWithMockTest.d.ts.map +1 -1
  144. package/dist/server/src/authConfig/emailProvider/getEmailSenderWithMockTest.js +1 -1
  145. package/dist/server/src/authConfig/emailProvider/getEmailSenderWithMockTest.js.map +1 -1
  146. package/dist/server/src/authConfig/getAuth.d.ts.map +1 -1
  147. package/dist/server/src/authConfig/sessionUtils.d.ts.map +1 -1
  148. package/dist/server/src/authConfig/subscribeToAuthSetupChanges.d.ts.map +1 -1
  149. package/dist/server/src/cli/cliTemplateFiles.js +30 -3
  150. package/dist/server/src/cli/cliTemplateFiles.js.map +1 -1
  151. package/dist/server/src/connectionPublish/getConnectionPublish.d.ts.map +1 -1
  152. package/dist/server/src/connectionPublish/getConnectionPublish.js +1 -5
  153. package/dist/server/src/connectionPublish/getConnectionPublish.js.map +1 -1
  154. package/dist/server/src/init/initUsers.d.ts.map +1 -1
  155. package/dist/server/src/publish/getPublishLLM.d.ts.map +1 -1
  156. package/dist/server/src/publish/getPublishLlmChats.d.ts.map +1 -1
  157. package/dist/server/src/publish/publish.d.ts.map +1 -1
  158. package/dist/server/src/publish/publish.js +10 -7
  159. package/dist/server/src/publish/publish.js.map +1 -1
  160. package/dist/server/src/schemaConfig.d.ts +12 -0
  161. package/dist/server/src/schemaConfig.d.ts.map +1 -1
  162. package/dist/server/src/schemaConfig.js +3 -1
  163. package/dist/server/src/schemaConfig.js.map +1 -1
  164. package/dist/server/src/serverFunctions/adminServerFunctions/agenticWorkflowFunctions.d.ts +2 -2
  165. package/dist/server/src/serverFunctions/adminServerFunctions/stateServerAdminFunctions.d.ts +108 -4
  166. package/dist/server/src/serverFunctions/adminServerFunctions/stateServerAdminFunctions.d.ts.map +1 -1
  167. package/dist/server/src/serverFunctions/adminServerFunctions/webApp/getTemplatedWebAppConnection.d.ts +53 -1
  168. package/dist/server/src/serverFunctions/adminServerFunctions/webApp/getTemplatedWebAppConnection.d.ts.map +1 -1
  169. package/dist/server/src/serverFunctions/applySampleSchema.d.ts +53 -1
  170. package/dist/server/src/serverFunctions/applySampleSchema.d.ts.map +1 -1
  171. package/dist/server/src/serverFunctions/askLLM/agentConstants.d.ts +1 -1
  172. package/dist/server/src/serverFunctions/askLLM/askLLM.d.ts.map +1 -1
  173. package/dist/server/src/serverFunctions/askLLM/getFullPrompt.d.ts.map +1 -1
  174. package/dist/server/src/serverFunctions/askLLM/getFullPrompt.js.map +1 -1
  175. package/dist/server/src/serverFunctions/askLLM/getPastMessages.d.ts.map +1 -1
  176. package/dist/server/src/serverFunctions/askLLM/getValidatedAskLLMChatOptions.d.ts.map +1 -1
  177. package/dist/server/src/serverFunctions/askLLM/handleToolUseResultConfirmation.d.ts.map +1 -1
  178. package/dist/server/src/serverFunctions/askLLM/prostglesLLMTools/getMCPServerTools.d.ts.map +1 -1
  179. package/dist/server/src/serverFunctions/askLLM/prostglesLLMTools/getMcpToolsWithDynamicDescription.d.ts.map +1 -1
  180. package/dist/server/src/serverFunctions/deleteConnection.d.ts +53 -1
  181. package/dist/server/src/serverFunctions/deleteConnection.d.ts.map +1 -1
  182. package/dist/server/src/serverFunctions/getConnectionAndDatabaseConfig.d.ts +53 -1
  183. package/dist/server/src/serverFunctions/getConnectionAndDatabaseConfig.d.ts.map +1 -1
  184. package/dist/server/src/serverFunctions/loadGeneratedWorkspaces/loadGeneratedTable.d.ts +2 -1
  185. package/dist/server/src/serverFunctions/loadGeneratedWorkspaces/loadGeneratedTable.d.ts.map +1 -1
  186. package/dist/server/src/serverFunctions/loadGeneratedWorkspaces/loadGeneratedTable.js +1 -0
  187. package/dist/server/src/serverFunctions/loadGeneratedWorkspaces/loadGeneratedTable.js.map +1 -1
  188. package/dist/server/src/serverFunctions/loadGeneratedWorkspaces/loadGeneratedWorkspaces.d.ts +1 -1
  189. package/dist/server/src/serverFunctions/loadGeneratedWorkspaces/loadGeneratedWorkspaces.d.ts.map +1 -1
  190. package/dist/server/src/serverFunctions/loadGeneratedWorkspaces/loadGeneratedWorkspacesFunction.d.ts +1 -1
  191. package/dist/server/src/serverFunctions/loadGeneratedWorkspaces/loadGeneratedWorkspacesFunction.d.ts.map +1 -1
  192. package/dist/server/src/serverFunctions/stateServerFunctions.d.ts +109 -5
  193. package/dist/server/src/serverFunctions/stateServerFunctions.d.ts.map +1 -1
  194. package/dist/server/src/tableHooks/llm_credentials.tableHooks.d.ts.map +1 -1
  195. package/dist/server/src/tableHooks/tableHooks.d.ts +170 -14
  196. package/dist/server/src/tableHooks/tableHooks.d.ts.map +1 -1
  197. package/dist/server/src/tableHooks/users.tableHooks.d.ts +58 -6
  198. package/dist/server/src/tableHooks/users.tableHooks.d.ts.map +1 -1
  199. package/dist/server/src/testing/createTestDeployment.d.ts +2 -2
  200. package/dist/server/src/testing/createTestDeployment.d.ts.map +1 -1
  201. package/dist/server/src/testing/createTestDeployment.js.map +1 -1
  202. package/dist/server/src/upsertConnection.d.ts +53 -1
  203. package/dist/server/src/upsertConnection.d.ts.map +1 -1
  204. package/package.json +2 -2
  205. package/sample_schemas/food_delivery/dist/connection.js +1008 -0
  206. package/sample_schemas/food_delivery/dist/databaseConfig.js +116 -0
  207. package/sample_schemas/food_delivery/dist/index.js +17 -0
  208. package/sample_schemas/food_delivery/dist/onMount.js +132 -0
  209. package/sample_schemas/food_delivery/dist/workspaceConfig.js +56 -0
  210. package/dist/server/src/ConnectionManager/extractFileText.d.ts.map +0 -1
  211. package/dist/server/src/ConnectionManager/extractFileText.js.map +0 -1
  212. package/dist/server/src/ConnectionManager/extractFileText.spec.d.ts +0 -2
  213. package/dist/server/src/ConnectionManager/extractFileText.spec.d.ts.map +0 -1
  214. package/dist/server/src/ConnectionManager/extractFileText.spec.js.map +0 -1
  215. package/dist/server/src/ConnectionManager/getAnnotationPageText.d.ts.map +0 -1
  216. package/dist/server/src/ConnectionManager/getAnnotationPageText.js.map +0 -1
  217. package/dist/server/src/ConnectionManager/getAnnotationsTableHook.d.ts.map +0 -1
  218. package/dist/server/src/ConnectionManager/getAnnotationsTableHook.js.map +0 -1
  219. package/dist/server/src/ConnectionManager/getFilesTableHook.d.ts.map +0 -1
  220. package/dist/server/src/ConnectionManager/getFilesTableHook.js.map +0 -1
  221. package/dist/server/src/ConnectionManager/parseTableConfig.d.ts.map +0 -1
  222. package/dist/server/src/ConnectionManager/parseTableConfig.js +0 -136
  223. package/dist/server/src/ConnectionManager/parseTableConfig.js.map +0 -1
  224. /package/dist/server/src/{ConnectionManager → FileStorage}/getAnnotationPageText.d.ts +0 -0
  225. /package/dist/server/src/{ConnectionManager → FileStorage}/getAnnotationsTableHook.js +0 -0
@@ -1240,6 +1240,28 @@ export declare const uiMcpSchema: {
1240
1240
  };
1241
1241
  }];
1242
1242
  };
1243
+ }, {
1244
+ readonly type: {
1245
+ readonly enum: readonly ["Avatar"];
1246
+ readonly title: "Format";
1247
+ readonly description: "Name initials in a circle. Set colors in column styles.";
1248
+ };
1249
+ readonly params: {
1250
+ readonly optional: true;
1251
+ readonly type: {
1252
+ readonly firstNameColumn: {
1253
+ readonly type: "string";
1254
+ readonly optional: true;
1255
+ readonly title: "First name column";
1256
+ readonly description: "Leave name columns unset to use this column's full name.";
1257
+ };
1258
+ readonly lastNameColumn: {
1259
+ readonly type: "string";
1260
+ readonly optional: true;
1261
+ readonly title: "Last name column";
1262
+ };
1263
+ };
1264
+ };
1243
1265
  }, {
1244
1266
  readonly type: {
1245
1267
  readonly enum: readonly ["Metric Prefix"];
@@ -1377,9 +1399,42 @@ export declare const uiMcpSchema: {
1377
1399
  readonly optional: true;
1378
1400
  readonly oneOf: readonly [{
1379
1401
  readonly type: {
1402
+ readonly fontWeight: {
1403
+ readonly enum: readonly ["normal", "bold"];
1404
+ readonly optional: true;
1405
+ };
1380
1406
  readonly type: {
1381
- readonly enum: readonly ["Conditional"];
1407
+ readonly enum: readonly ["None"];
1408
+ };
1409
+ };
1410
+ }, {
1411
+ readonly type: {
1412
+ readonly textColor: {
1413
+ readonly type: "string";
1414
+ readonly optional: true;
1415
+ };
1416
+ readonly chipColor: {
1417
+ readonly type: "string";
1418
+ readonly optional: true;
1419
+ };
1420
+ readonly cellColor: {
1421
+ readonly type: "string";
1422
+ readonly optional: true;
1382
1423
  };
1424
+ readonly borderColor: {
1425
+ readonly type: "string";
1426
+ readonly optional: true;
1427
+ };
1428
+ readonly fontWeight: {
1429
+ readonly enum: readonly ["normal", "bold"];
1430
+ readonly optional: true;
1431
+ };
1432
+ readonly type: {
1433
+ readonly enum: readonly ["Fixed"];
1434
+ };
1435
+ };
1436
+ }, {
1437
+ readonly type: {
1383
1438
  readonly column: {
1384
1439
  readonly type: "string";
1385
1440
  readonly optional: true;
@@ -1456,23 +1511,38 @@ export declare const uiMcpSchema: {
1456
1511
  };
1457
1512
  };
1458
1513
  };
1514
+ readonly fontWeight: {
1515
+ readonly enum: readonly ["normal", "bold"];
1516
+ readonly optional: true;
1517
+ };
1518
+ readonly type: {
1519
+ readonly enum: readonly ["Conditional"];
1520
+ };
1459
1521
  };
1460
1522
  }, {
1461
1523
  readonly type: {
1462
- readonly type: {
1463
- readonly enum: readonly ["Scale"];
1464
- };
1465
1524
  readonly textColor: "string";
1466
1525
  readonly minColor: "string";
1467
1526
  readonly maxColor: "string";
1527
+ readonly fontWeight: {
1528
+ readonly enum: readonly ["normal", "bold"];
1529
+ readonly optional: true;
1530
+ };
1531
+ readonly type: {
1532
+ readonly enum: readonly ["Scale"];
1533
+ };
1468
1534
  };
1469
1535
  }, {
1470
1536
  readonly type: {
1537
+ readonly barColor: "string";
1538
+ readonly textColor: "string";
1539
+ readonly fontWeight: {
1540
+ readonly enum: readonly ["normal", "bold"];
1541
+ readonly optional: true;
1542
+ };
1471
1543
  readonly type: {
1472
1544
  readonly enum: readonly ["Barchart"];
1473
1545
  };
1474
- readonly barColor: "string";
1475
- readonly textColor: "string";
1476
1546
  };
1477
1547
  }];
1478
1548
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ui.mcp.schema.d.ts","sourceRoot":"","sources":["../../../../common/mcp/ui.mcp.schema.ts"],"names":[],"mappings":"AAUA,QAAA,MAAyB,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACN,CAAC;AAE5C,OAAO,EAAE,wBAAwB,EAAE,CAAC;AAIpC,eAAO,MAAM,uBAAuB,qKACgI,CAAC;AAErK,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;gDAgVU,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2I9D,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * Generated file. Do not edit.
3
3
  */
4
- export declare const prostglesApiTypes = "/**\n * Data fetching and manipulation methods for interacting with the database\n */\n/**\n * List of fields to include or exclude\n */\nexport type FieldFilter<T extends AnyObject = AnyObject> = SelectTyped<T>;\nexport type AscOrDesc = 1 | -1 | boolean;\nexport type OrderByDetailed<T> = {\n key: keyof T;\n asc?: AscOrDesc | null;\n nulls?: \"last\" | \"first\" | null;\n nullEmpty?: boolean | null;\n};\n/**\n * `{ product_name: -1 }` -> SORT BY product_name DESC\n * [{ field_name: (1 | -1 | boolean) }]\n * true | 1 -> ascending\n * false | -1 -> descending\n * Array order is maintained\n * if nullEmpty is true then empty text will be replaced to null (so nulls sorting takes effect on it)\n */\nexport type OrderByTyped<T extends AnyObject> = {\n [K in keyof Partial<T>]: AscOrDesc;\n} | {\n [K in keyof Partial<T>]: AscOrDesc;\n}[] | OrderByDetailed<T> | OrderByDetailed<T>[] | Array<keyof T> | keyof T;\nexport type OrderBy<T extends AnyObject | void = void> = T extends AnyObject ? OrderByTyped<T> : OrderByTyped<AnyObject>;\nexport type CommonSelect = \"*\" | \"\" | {\n \"*\": 1;\n};\nexport type SelectTyped<T extends AnyObject> = {\n [K in keyof Partial<T>]: 1 | true;\n} | {\n [K in keyof Partial<T>]: 0 | false;\n} | (keyof T)[] | CommonSelect;\nexport declare const JOIN_KEYS: readonly [\"$innerJoin\", \"$leftJoin\"];\nexport declare const JOIN_PARAMS: [\"select\", \"filter\", \"offset\", \"limit\", \"orderBy\", \"having\"];\nexport type JoinCondition = {\n column: string;\n rootColumn: string;\n} | ComplexFilter;\nexport type JoinPath = {\n table: string;\n /**\n * {\n * leftColumn: \"rightColumn\"\n * }\n */\n on?: Record<string, string>[];\n};\n/**\n * Can be either the target table name, or the sequence of tables to join through with the target table at the end.\n */\nexport type RawJoinPath = string | (JoinPath | string)[];\nexport type DetailedJoinSelect = Partial<Record<(typeof JOIN_KEYS)[number], RawJoinPath>> & {\n select: Select;\n filter?: FullFilter<void, void>;\n having?: FullFilter<void, void>;\n offset?: number;\n limit?: number;\n orderBy?: OrderBy;\n};\nexport type SimpleJoinSelect = \"*\"\n/** Aliased Shorthand join: table_name: { ...select } */\n | Record<string, 1 | \"*\" | true | FunctionSelect> | Record<string, 0 | false>;\nexport type JoinSelect = SimpleJoinSelect | DetailedJoinSelect;\n/**\n * Functions that take one column argument can be applied to the selected field by specifying the function name.\n * Example: { field: { funcName: [\"field\"] } }\n * Can be written as { field: \"funcName\" } if the field is the same as the argument\n */\ntype FunctionShorthand = FunctionName;\n/**\n * Common functions:\n * - Aggregation functions: $count, $sum, $avg, $min, $max\n * - String functions: $upper, $lower\n * - Date functions: $age, $date_part\n * - JSON functions: $merge\n * Aggregate functions also accept $filter and $orderBy options.\n */\ntype FunctionFull<T extends AnyObject = AnyObject> = {\n [Name in FunctionName]: {\n [K in Name]: any[] | readonly any[];\n };\n}[FunctionName] & {\n $filter?: FullFilter<void, void>;\n $orderBy?: OrderBy<T>;\n};\nexport type CaseSelect = {\n $case: readonly (readonly [condition: AnyObject, result: unknown])[];\n $else?: unknown;\n};\ntype FunctionSelect = FunctionShorthand | FunctionFull | CaseSelect;\ntype InclusiveSelect = true | 1 | FunctionSelect | JoinSelect;\ntype TypedShorthandJoinSelect<T extends AnyObject> = \"*\" | {\n [K in keyof T]?: 0 | false | 1 | true | FunctionSelect;\n};\ntype SchemaJoinSelect<T extends AnyObject, S extends DBSchema | void> = S extends DBSchema ? string extends keyof S ? {} : {\n [K in keyof S]?: K extends keyof T ? InclusiveSelect : TypedShorthandJoinSelect<S[K][\"columns\"]> | FunctionFull | CaseSelect | DetailedJoinSelect;\n} : {};\nexport declare const ROW_ACTIONS_COLUMN = \"$prostgles_actions\";\ntype RowActionsColumn = {\n [ROW_ACTIONS_COLUMN]: string[];\n};\ntype SelectWithFunctions<T extends AnyObject = AnyObject, IsTyped = false, S extends DBSchema | void = void> = (IsTyped extends true ? {\n [K in keyof T]?: InclusiveSelect;\n} & SchemaJoinSelect<T, S> & Record<string, FunctionFull | CaseSelect | JoinSelect> : Record<string, InclusiveSelect>) | {\n [K in keyof T]?: true | 1 | FunctionShorthand;\n} | {\n [K in keyof T]?: 0 | false;\n} | CommonSelect | (keyof T)[];\n/** S param is needed to ensure the non typed select works fine */\nexport type Select<T extends AnyObject | void = void, S extends DBSchema | void = void> = {\n t: T;\n s: S;\n} extends {\n t: AnyObject;\n s: DBSchema;\n} ? SelectWithFunctions<T & {\n $rowhash: string;\n} & RowActionsColumn, true, S> : SelectWithFunctions<AnyObject & {\n $rowhash: string;\n} & RowActionsColumn, false>;\nexport type SelectBasic = {\n [key: string]: any;\n} | {} | undefined | \"\" | \"*\";\n/**\n * Will return the first row as an object. Will throw an error if more than a row is returned. Use limit: 1 to avoid error.\n */\ntype ReturnTypeRow = \"row\";\ntype CommonSelectParams = {\n /**\n * Max number of rows to return. Defaults to 1000\n * - On client publish rules can affect this behaviour: cannot request more than the maxLimit (if present)\n */\n limit?: number | null;\n /**\n * Number of rows to skip\n */\n offset?: number;\n /**\n * Will group by all non aggregated fields specified in select (or all fields by default)\n */\n groupBy?: boolean;\n /**\n * Result data structure/type:\n * - **row**: the first row as an object\n * - **value**: the first value from of first field\n * - **values**: array of values from the selected field\n * - **statement**: sql statement\n * - **statement-no-rls**: sql statement without row level security\n * - **statement-where**: sql statement where condition\n */\n returnType?: ReturnTypeRow\n /**\n * Will return the first value from the selected field\n */\n | \"value\"\n /**\n * Will return an array of values from the selected field. Similar to array_agg(field).\n */\n | \"values\"\n /**\n * Will return the sql statement. Requires publishRawSQL privileges if called by client\n */\n | \"statement\"\n /**\n * Will return the sql statement excluding the user header. Requires publishRawSQL privileges if called by client\n */\n | \"statement-no-rls\"\n /**\n * Will return the sql statement where condition. Requires publishRawSQL privileges if called by client\n */\n | \"statement-where\";\n};\nexport type SelectParams<T extends AnyObject | void = void, S extends DBSchema | void = void> = CommonSelectParams & {\n /**\n * Fields/expressions/linked data to select\n * - `\"*\"` or undefined will return all fields\n * - `{ field: 0 }` - all fields except the specified field will be selected. Cannot be combined with inclusive selects (1, true, function or join selects)\n * - `{ field: 1 }` - only the specified field will be selected\n * - `{ field: { $funcName: [...args] } }` - the field will be selected with the specified function applied\n * - `{ field: 1, referencedTable: \"*\" }` - field together with all fields from referencedTable will be returned (as an array). The referencedTable must have a reference to the current table through foreign keys for this to work\n * - `{ linkedData: { $leftJoin: [\"lookupTable\", \"targetTable\"], select: { field: 1 } } }` - linkedData will contain the linked/joined records from referencedTable as an array of objects.\n */\n select?: Select<T, S>;\n /**\n * Order by options\n * - Order is maintained in arrays\n * - `[{ key: \"field\", asc: true, nulls: \"last\" }]`\n */\n orderBy?: OrderBy<S extends DBSchema ? T : void>;\n /**\n * Filter applied after any aggregations (group by)\n */\n having?: FullFilter<T, S>;\n abortSignal?: AbortSignal;\n};\ntype SubscribeActions = \"insert\" | \"delete\" | \"update\";\nexport type SubscribeOptions = {\n /**\n * If true then the first value will not be emitted\n * */\n skipFirst?: boolean;\n /**\n * Controls which actions will trigger the subscription.\n * If not provided then all actions will be triggered\n */\n actions?: Partial<Record<SubscribeActions, true> | Record<SubscribeActions, false>>;\n /**\n * If true then the subscription will be triggered without first checking if selected column values have changed\n * @default false\n */\n skipChangedColumnsCheck?: boolean;\n /**\n * If provided then the subscription will be throttled to the provided number of milliseconds\n */\n throttle?: number;\n throttleOpts?: {\n /**\n * False by default.\n * If true then the first value will be emitted at the end of the interval. Instant otherwise\n * */\n skipFirst?: boolean;\n };\n};\nexport type SubscribeParams<T extends AnyObject | void = void, S extends DBSchema | void = void> = SelectParams<T, S> & SubscribeOptions;\nexport type InsertParams<T extends AnyObject | void = void, S extends DBSchema | void = void> = {\n /**\n * If defined will returns the specified fields of the updated record(s)\n */\n returning?: Select<T, S>;\n /**\n * By default the insert may fail due to a unique/exclusion constraint violation error. To control this:\n * - DoNothing: will ignore the error and do nothing\n * - DoUpdate: will update all non primary key columns of the conflicting row\n */\n onConflict?: \"DoNothing\" | \"DoUpdate\" | {\n action: \"DoNothing\" | \"DoUpdate\";\n conflictColumns: string[];\n };\n /**\n * Used for sync.\n * If true then only valid and allowed fields will be inserted\n */\n removeDisallowedFields?: boolean;\n} & Pick<CommonSelectParams, \"returnType\">;\ntype CollapseNumberIfStringPresent<T> = [\n Extract<T, string>\n] extends [never] ? T : Exclude<T, number>;\n/**\n * Numeric columns that serialize to strings keep the numeric type as well to allow:\n * - inserting numeric values as either numbers or strings\n * - reading numeric values as strings\n */\nexport type NormalizedRow<T extends Record<string, unknown>> = Required<{\n [K in keyof T]: CollapseNumberIfStringPresent<T[K]>;\n}>;\nexport type DBSchemaNormalized<S extends DBSchema> = {\n [K in keyof S]: NormalizedRow<S[K][\"columns\"]>;\n};\ntype JoinTarget<P> = P extends string ? P : P extends readonly [...unknown[], infer Last] ? Last extends string ? Last : Last extends {\n table: infer T;\n} ? T : never : never;\ntype ExplicitJoinResult<J, S extends DBSchema | void, P> = [\n JoinTarget<P>\n] extends [never] ? any[] : S extends DBSchema ? JoinTarget<P> extends infer T extends keyof S ? J extends {\n select: infer Sel extends Select;\n} ? SelectDataType<S, {\n select: Sel;\n}, S[T][\"columns\"]>[] : any[] : any[] : any[];\ntype ShorthandJoinResult<J, S extends DBSchema | void, TableName extends PropertyKey> = S extends DBSchema ? TableName extends keyof S ? J extends \"*\" | Record<string, any> ? SelectDataType<S, {\n select: J;\n}, S[TableName][\"columns\"]>[] : any[] : any[] : any[];\n/** ParseSelect must check joins first because FunctionFull structurally matches objects without `$` keys. */\nexport type SelectFunction = FunctionFull | CaseSelect;\ntype CaseResult<F> = F extends ({\n $case: readonly (readonly [unknown, infer Result])[];\n}) ? Result | (F extends {\n $else: infer ElseResult;\n} ? ElseResult : null) : never;\ntype ParseSelect<Select extends SelectParams<TD>[\"select\"], TD extends AnyObject, S extends DBSchema | void> = (Select extends {\n \"*\": 1;\n} ? NormalizedRow<TD> : {}) & {\n [Key in keyof Omit<Select, \"*\"> & string]: Select[Key] extends 1 | true ? Key extends keyof RowActionsColumn ? RowActionsColumn[Key] : NormalizedRow<TD>[Key] : Select[Key] extends CaseSelect ? CaseResult<Select[Key]> : Select[Key] extends ({\n $leftJoin: infer P extends RawJoinPath;\n select: unknown;\n }) ? ExplicitJoinResult<Select[Key], S, P> : Select[Key] extends ({\n $innerJoin: infer P extends RawJoinPath;\n select: unknown;\n }) ? ExplicitJoinResult<Select[Key], S, P> : Select[Key] extends JoinSelect ? ShorthandJoinResult<Select[Key], S, Key> : Select[Key] extends SelectFunction | FunctionShorthand ? GetFunctionReturnType<Select[Key], TD, Key> : any;\n};\ntype SelectDataType<S extends DBSchema | void, O, TD extends AnyObject> = O extends {\n returnType: \"value\";\n} ? any : O extends {\n returnType: \"values\";\n select: Record<string, 1>;\n} ? ValueOf<Pick<NormalizedRow<TD> & RowActionsColumn, keyof O[\"select\"]>> : O extends {\n returnType: \"values\";\n} ? any : O extends {\n select: \"*\";\n} ? NormalizedRow<TD> : O extends {\n select: \"\";\n} ? Record<string, never> : O extends {\n select: readonly (keyof TD | keyof RowActionsColumn)[];\n} ? (TD extends unknown ? Pick<NormalizedRow<TD> & RowActionsColumn, O[\"select\"][number]> : never) : O extends {\n select: Record<string, 0 | false>;\n} ? (TD extends unknown ? Omit<NormalizedRow<TD>, keyof O[\"select\"]> : never) : O extends {\n select: Record<string, any>;\n} ? (TD extends unknown ? ParseSelect<O[\"select\"], NormalizedRow<TD>, S> : never) : NormalizedRow<TD>;\nexport type SelectReturnType<S extends DBSchema | void, O extends SelectParams<TD, S>, TD extends AnyObject, isMulti extends boolean> = O extends {\n returnType: \"statement\";\n} ? string : isMulti extends true ? SelectDataType<S, O, TD>[] : SelectDataType<S, O, TD>;\nexport type UpdateParams<T extends AnyObject | void = void, S extends DBSchema | void = void> = {\n /**\n * If defined will returns the specified fields of the updated record(s)\n */\n returning?: Select<T, S>;\n /**\n * Used for sync.\n * If true then only valid and allowed fields will be updated\n */\n removeDisallowedFields?: boolean;\n /**\n * true by default.\n * When set to false the update will throw an error if more than one row is updated (but the update will commit).\n * */\n multi?: boolean;\n} & Pick<CommonSelectParams, \"returnType\">;\ntype GetReturningReturnType<O extends UpdateParams<TD, S>, TD extends AnyObject, S extends DBSchema | void = void> = O extends {\n returning: \"*\";\n} ? NormalizedRow<TD> : O extends {\n returning: \"\";\n} ? Record<string, never> : O extends {\n returning: Record<string, 1>;\n} ? (TD extends unknown ? Pick<NormalizedRow<TD>, keyof O[\"returning\"]> : never) : O extends {\n returning: Record<string, 0>;\n} ? (TD extends unknown ? Omit<NormalizedRow<TD>, keyof O[\"returning\"]> : never) : void;\n/**\n *\n * Nothing is returned by default.\n * `returning` must be specified to return the updated records.\n */\nexport type UpdateReturnType<O extends UpdateParams<TD, S>, TD extends AnyObject, S extends DBSchema | void = void> = O extends {\n multi: false;\n} ? GetReturningReturnType<O, TD, S> : GetReturningReturnType<O, TD, S>[];\n/**\n * Nothing is returned by default.\n * `returning` must be specified to return the updated records.\n * If an array of records is inserted then an array of records will be returned\n * otherwise a single record will be returned.\n */\nexport type InsertReturnType<Data extends AnyObject, O extends UpdateParams<TD, S>, TD extends AnyObject, S extends DBSchema | void = void> = Data extends any[] | readonly any[] ? GetReturningReturnType<O, TD, S>[] : GetReturningReturnType<O, TD, S>;\nexport type SubscriptionHandler = {\n unsubscribe: () => Promise<void>;\n filter: FullFilter<void, void> | {};\n};\n/**\n * Callback fired once after subscribing and then every time the data matching the filter changes\n */\ntype SubscribeCallback<ItemsDataType> = (items: ItemsDataType, \n/**\n * Error due to schema changes or other post subscribe issues\n * Column or filter issues are thrown during the subscribe call\n */\nerror?: unknown) => void | Promise<void>;\n/**\n * Callback fired once after subscribing and then every time the data matching the filter changes\n */\ntype SubscribeOneCallback<ItemDataType> = (item: ItemDataType) => void | Promise<void>;\nexport type AllowedTSType = string | number | boolean | Date | unknown;\nexport type CastFromTSToPG<T extends AllowedTSType> = T extends number ? T | string : T extends string ? T | number | Date : T extends boolean ? T | string : T extends Date ? T | string : T;\nexport type UpsertDataToPGCast<TD extends AnyObject> = {\n [K in keyof TD]: CastFromTSToPG<TD[K]> | JSONMerge<TD[K]>;\n};\ntype JSONMerge<T> = T extends Record<string, unknown> ? Record<\"$merge\", unknown[]> : never;\nexport type PartialLax<T = AnyObject> = Partial<T>;\ntype UpsertDataToPGCastLax<T extends AnyObject> = {\n [K in keyof T]?: CastFromTSToPG<T[K]> | JSONMerge<T[K]>;\n};\nexport type DeleteParams<T extends AnyObject | void = void, S extends DBSchema | void = void> = {\n returning?: Select<T, S>;\n} & Pick<CommonSelectParams, \"returnType\">;\n/**\n * TODO: pick only joined tables from schema AND exclude parent fkey columns from the nested data\n */\nexport type InsertDataWithNested<TD extends AnyObject, S extends DBSchema | void, TName extends PropertyKey = never> = InsertColumnsWithReferences<GetInsertColumns<TD, S, TName>, S, TName> & (S extends DBSchema ? string extends keyof S ? {} : {\n [TableName in keyof S]?: Partial<InsertDataWithNested<S[TableName][\"columns\"], S, TableName>>[];\n} : {});\ntype GetInsertColumns<TD extends AnyObject, S, TName extends PropertyKey> = [\n TName\n] extends [never] ? TD : S extends (Record<TName, {\n insertColumns: infer Columns extends AnyObject;\n}>) ? Columns : TD;\ntype GetUpdateData<TD extends AnyObject, S, TName extends PropertyKey> = S extends Record<TName, {\n updateColumns: infer Columns extends AnyObject;\n}> ? UpsertDataToPGCastLax<Columns> : UpsertDataToPGCastLax<TD>;\n/**\n * Methods for interacting with a table/view\n * - On client-side some methods are restricted (and undefined) based on publish rules on the server\n */\ntype TableHandlerBase<\n/**\n * TODO: check if: \"deriving it directly throughout raised type instantiations from roughly 95.6k to 104k.\"\n */\nTD extends AnyObject, S extends DBSchema | void, TName extends PropertyKey> = {\n /**\n * Retrieves the table/view info\n */\n getInfo(\n /**\n * Language code for i18n data. \"en\" by default\n */\n lang?: string): Promise<TableInfo>;\n /**\n * Retrieves columns metadata of the table/view\n */\n getColumns(\n /**\n * Language code for i18n data. \"en\" by default\n */\n lang?: string, params?: GetColumnsParams): Promise<ValidatedColumnInfo[]>;\n /**\n * Retrieves a list of matching records from the view/table\n */\n find<const P extends SelectParams<TD, S>>(\n /**\n * A filter for a table, defined as a MongoDB-like query object.\n * Supported operators:\n * - Comparison: $eq, $ne, $gt, $gte, $lt, $lte\n * - Logical: $and, $or\n * - Evaluation: $like, $ilike\n * - Array: $in, $nin\n * - Joins: $existsJoined: { [tableName]: TableFilter }\n * @example\n * {\n $and: [\n {\n $or: [\n { topic: { $in: [\"Prostgles\", \"Postgres\"] } },\n { summary: { $ilike: \"%postgres%\" } },\n { id: { $gt: 5 } },\n ]\n },\n { summary: { $ne: null } }\n ]\n }\n */\n filter?: FullFilter<TD, S>, \n /**\n * @example\n * {\n * select: {\n * field1: 1,\n * field2: 1,\n * referencedTable: \"*\", // all fields from the referenced table will be included in an array under the \"referencedTable\" key\n * },\n * orderBy: { field1: -1 },\n * limit: 10,\n * }\n */\n selectParams?: P): Promise<SelectReturnType<S, P, TD, true>>;\n /**\n * Retrieves a record from the view/table\n */\n findOne<const P extends SelectParams<TD, S>>(filter?: FullFilter<TD, S>, selectParams?: P): Promise<undefined | SelectReturnType<S, P, TD, false>>;\n /**\n * Retrieves a list of matching records from the view/table and subscribes to changes\n */\n subscribe<const P extends SubscribeParams<TD, S>>(filter: FullFilter<TD, S>, params: P, onData: SubscribeCallback<SelectReturnType<S, P, TD, true>>): Promise<SubscriptionHandler>;\n /**\n * Retrieves first matching record from the view/table and subscribes to changes\n */\n subscribeOne<const P extends SubscribeParams<TD, S>>(filter: FullFilter<TD, S>, params: P, onData: SubscribeOneCallback<SelectReturnType<S, P, TD, false> | undefined>): Promise<SubscriptionHandler>;\n /**\n * Returns the number of rows that match the filter\n */\n count<P extends SelectParams<TD, S>>(filter?: FullFilter<TD, S>, selectParams?: P): Promise<number>;\n /**\n * Returns result size in bits\n */\n size<P extends SelectParams<TD, S>>(filter?: FullFilter<TD, S>, selectParams?: P): Promise<string>;\n /**\n * Updates a record in the table based on the specified filter criteria\n * - Use { multi: false } to ensure no more than one row is updated\n */\n update<P extends UpdateParams<TD, S>>(filter: FullFilter<TD, S>, newData: GetUpdateData<TD, S, TName>, params?: P): Promise<UpdateReturnType<P, TD, S> | undefined>;\n /**\n * Updates multiple records in the table in a batch operation.\n * - Each item in the `data` array contains a filter and the corresponding data to update.\n */\n updateBatch<P extends UpdateParams<TD, S>>(data: [FullFilter<TD, S>, GetUpdateData<TD, S, TName>][], params?: P): Promise<null>;\n /**\n * Inserts a new record into the table.\n */\n insert<P extends InsertParams<TD, S>>(data: InsertDataWithNested<TD, S, TName>, params?: P): Promise<GetReturningReturnType<P, TD, S>>;\n /**\n * Inserts new records into the table.\n */\n insertMany<P extends InsertParams<TD, S>>(data: InsertDataWithNested<TD, S, TName>[], params?: P): Promise<GetReturningReturnType<P, TD, S>[]>;\n /**\n * Inserts or updates a record in the table.\n * - If a record matching the `filter` exists, it updates the record.\n * - If no matching record exists, it inserts a new record.\n */\n upsert<P extends UpdateParams<TD, S>>(filter: FullFilter<TD, S>, newData: UpsertDataToPGCastLax<TD>, params?: P): Promise<GetReturningReturnType<P, TD, S>>;\n /**\n * Deletes records from the table based on the specified filter criteria.\n * - If no filter is provided, all records may be deleted (use with caution).\n */\n delete<P extends DeleteParams<TD, S>>(filter?: FullFilter<TD, S>, params?: P): Promise<GetReturningReturnType<P, TD, S>[]>;\n};\ntype TableHandlerData<S, TName> = S extends DBSchema ? TName extends keyof S ? S[TName][\"columns\"] : never : never;\ntype TableHandlerSchema<S extends DBSchema> = DBSchema extends S ? void : S;\nexport type TableHandler<S extends DBSchema = DBSchema, TName extends keyof S = keyof S> = TableHandlerBase<TableHandlerData<S, TName>, TableHandlerSchema<S>, TName>;\nexport type TableHandlerForColumns<T extends AnyObject = AnyObject> = TableHandler<{\n _: {\n columns: T;\n };\n}, \"_\">;\nexport type AsyncResult<T> = {\n data?: undefined;\n isLoading: true;\n error?: undefined;\n} | {\n data: T;\n isLoading: boolean;\n error?: unknown;\n};\nexport type HookOptions = {\n /**\n * Used to prevent the hook from fetching data\n */\n skip?: boolean;\n /**\n * Used to trigger re-fetching\n */\n deps?: any[];\n};\nexport type TableHandlerClientMethods<T extends AnyObject = AnyObject, S extends DBSchema | void = void> = {\n /**\n * Retrieves rows matching the filter and keeps them in sync\n * - use { handlesOnData: true } to get optimistic updates method: $update\n * - any changes to the row using the $update method will be reflected instantly\n * to all sync subscribers that were initiated with the same syncOptions\n */\n useSync?: <TD extends T = T, Opts extends SyncOptions = SyncOptions>(basicFilter: EqualityFilter<NoInfer<TD>>, syncOptions: Opts, hookOptions?: HookOptions) => AsyncResult<SyncDataItem<Required<TD>, Opts>[] | undefined>;\n sync?: <TD extends T, Opts extends SyncOptions>(basicFilter: EqualityFilter<TD>, options: Opts, onChange: OnChange<TD, Opts>, onError?: OnErrorHandler) => Promise<SyncHandler<TD>>;\n syncOne?: <TD extends T, Opts extends SyncOneOptions>(basicFilter: EqualityFilter<TD>, options: Opts, onChange: OnChangeOne<TD, Opts>, onError?: OnErrorHandler) => Promise<SingleSyncHandles<TD, Opts[\"handlesOnData\"]>>;\n /**\n * Retrieves the first row matching the filter and keeps it in sync\n * - use { handlesOnData: true } to get optimistic updates method: $update\n * - any changes to the row using the $update method will be reflected instantly\n * to all sync subscribers that were initiated with the same syncOptions\n */\n useSyncOne?: <TD extends T = T, Opts extends SyncOneOptions = SyncOneOptions>(basicFilter: EqualityFilter<NoInfer<TD>>, syncOptions: Opts, hookOptions?: HookOptions) => AsyncResult<SyncDataItem<Required<TD>, Opts> | undefined>;\n /**\n * Used internally to setup sync\n */\n _sync?: (filter: EqualityFilter<AnyObject> | undefined, selectParams: {\n select: FieldFilter;\n }, triggers: ClientSyncHandles) => Promise<DbTableSync>;\n _syncInfo?: SyncTableInfo;\n /**\n * Retrieves a list of matching records from the view/table and subscribes to changes\n */\n useSubscribe: <SubParams extends SubscribeParams<T, S>>(filter?: FullFilter<T, S>, options?: SubParams, hookOptions?: HookOptions) => AsyncResult<SelectReturnType<S, SubParams, T, true> | undefined>;\n /**\n * Retrieves a matching record from the view/table and subscribes to changes\n */\n useSubscribeOne: <SubParams extends SubscribeParams<T, S>>(filter?: FullFilter<T, S>, options?: SubParams, hookOptions?: HookOptions) => AsyncResult<SelectReturnType<S, SubParams, T, false> | undefined>;\n /**\n * Retrieves a list of matching records from the view/table\n */\n useFind: <P extends SelectParams<T, S>>(filter?: FullFilter<T, S>, selectParams?: P, hookOptions?: HookOptions) => AsyncResult<SelectReturnType<S, P, T, true> | undefined>;\n /**\n * Retrieves first matching record from the view/table\n */\n useFindOne: <P extends SelectParams<T, S>>(filter?: FullFilter<T, S>, selectParams?: P, hookOptions?: HookOptions) => AsyncResult<SelectReturnType<S, P, T, false> | undefined>;\n /**\n * Returns the total number of rows matching the filter\n */\n useCount: <P extends SelectParams<T, S>>(filter?: FullFilter<T, S>, selectParams?: P, hookOptions?: HookOptions) => AsyncResult<number | undefined>;\n /**\n * Returns result size in bits matching the filter and selectParams\n */\n useSize: <P extends SelectParams<T, S>>(filter?: FullFilter<T, S>, selectParams?: P, hookOptions?: HookOptions) => AsyncResult<string | undefined>;\n};\nexport type TableHandlerClient<S extends DBSchema = DBSchema, TName extends keyof S = keyof S> = TableHandler<S, TName> & TableHandlerClientMethods<S[TName][\"columns\"], DBSchema extends S ? void : S>;\nexport type TableHandlerClientForColumns<T extends AnyObject = AnyObject> = TableHandlerClient<{\n _: {\n columns: T;\n };\n}, \"_\">;\nexport type DBHandlerClient<Schema = void> = Schema extends DBSchema ? {\n [tov_name in keyof Schema]: TableHandlerClient<Schema, tov_name> | (Schema[tov_name] extends {\n optional: true;\n } ? undefined : never);\n} : Record<string, Partial<TableHandler & TableHandlerClientMethods>>;\nexport type ClientOnReadyParams<DBSchema = void, FunctionHandler extends ClientFunctionHandler = ClientFunctionHandler, U extends UserLike = UserLike> = {\n /**\n * The database handler object.\n * Only allowed tables and table methods are defined\n */\n db: Partial<DBHandlerClient<DBSchema>>;\n sql: SQLHandler | undefined;\n /**\n * Server-side TS function handlers\n * Only allowed methods are defined\n */\n methods: FunctionHandler | undefined;\n methodSchema: ServerFunctionHandler | undefined;\n /**\n * Table schema with column permission details the client has access to\n */\n tableSchema: DBSchemaTable[] | undefined;\n auth: AuthHandler<U>;\n isReconnect: boolean;\n socket: Socket;\n};\nexport\n";
4
+ export declare const prostglesApiTypes = "/**\n * Data fetching and manipulation methods for interacting with the database\n */\n/**\n * List of fields to include or exclude\n */\nexport type FieldFilter<T extends AnyObject = AnyObject> = SelectTyped<T>;\nexport type AscOrDesc = 1 | -1 | boolean;\nexport type OrderByDetailed<T> = {\n key: keyof T;\n asc?: AscOrDesc | null;\n nulls?: \"last\" | \"first\" | null;\n nullEmpty?: boolean | null;\n};\n/**\n * `{ product_name: -1 }` -> SORT BY product_name DESC\n * [{ field_name: (1 | -1 | boolean) }]\n * true | 1 -> ascending\n * false | -1 -> descending\n * Array order is maintained\n * if nullEmpty is true then empty text will be replaced to null (so nulls sorting takes effect on it)\n */\nexport type OrderByTyped<T extends AnyObject> = {\n [K in keyof Partial<T>]: AscOrDesc;\n} | {\n [K in keyof Partial<T>]: AscOrDesc;\n}[] | OrderByDetailed<T> | OrderByDetailed<T>[] | Array<keyof T> | keyof T;\nexport type OrderBy<T extends AnyObject | void = void> = T extends AnyObject ? OrderByTyped<T> : OrderByTyped<AnyObject>;\nexport type CommonSelect = \"*\" | \"\" | {\n \"*\": 1;\n};\nexport type SelectTyped<T extends AnyObject> = {\n [K in keyof Partial<T>]: 1 | true;\n} | {\n [K in keyof Partial<T>]: 0 | false;\n} | (keyof T)[] | CommonSelect;\nexport declare const JOIN_KEYS: readonly [\"$innerJoin\", \"$leftJoin\"];\nexport declare const JOIN_PARAMS: [\"select\", \"filter\", \"offset\", \"limit\", \"orderBy\", \"having\"];\nexport type JoinCondition = {\n column: string;\n rootColumn: string;\n} | ComplexFilter;\nexport type JoinPath = {\n table: string;\n /**\n * {\n * leftColumn: \"rightColumn\"\n * }\n */\n on?: Record<string, string>[];\n};\n/**\n * Can be either the target table name, or the sequence of tables to join through with the target table at the end.\n */\nexport type RawJoinPath = string | (JoinPath | string)[];\nexport type DetailedJoinSelect = Partial<Record<(typeof JOIN_KEYS)[number], RawJoinPath>> & {\n select: Select;\n filter?: FullFilter<void, void>;\n having?: FullFilter<void, void>;\n offset?: number;\n limit?: number;\n orderBy?: OrderBy;\n};\nexport type SimpleJoinSelect = \"*\"\n/** Aliased Shorthand join: table_name: { ...select } */\n | Record<string, 1 | \"*\" | true | FunctionSelect> | Record<string, 0 | false>;\nexport type JoinSelect = SimpleJoinSelect | DetailedJoinSelect;\n/**\n * Functions that take one column argument can be applied to the selected field by specifying the function name.\n * Example: { field: { funcName: [\"field\"] } }\n * Can be written as { field: \"funcName\" } if the field is the same as the argument\n */\ntype FunctionShorthand = FunctionName;\n/**\n * Common functions:\n * - Aggregation functions: $count, $sum, $avg, $min, $max\n * - String functions: $upper, $lower\n * - Date functions: $age, $date_part\n * - JSON functions: $merge\n * Aggregate functions also accept $filter and $orderBy options.\n */\ntype FunctionFull<T extends AnyObject = AnyObject> = {\n [Name in FunctionName]: {\n [K in Name]: any[] | readonly any[];\n };\n}[FunctionName] & {\n $filter?: FullFilter<void, void>;\n $orderBy?: OrderBy<T>;\n};\nexport type CaseSelect = {\n $case: readonly (readonly [condition: AnyObject, result: unknown])[];\n $else?: unknown;\n};\ntype FunctionSelect = FunctionShorthand | FunctionFull | CaseSelect;\ntype InclusiveSelect = true | 1 | FunctionSelect | JoinSelect;\ntype TypedShorthandJoinSelect<T extends AnyObject> = \"*\" | {\n [K in keyof T]?: 0 | false | 1 | true | FunctionSelect;\n};\ntype SchemaJoinSelect<T extends AnyObject, S extends DBSchema | void> = S extends DBSchema ? string extends keyof S ? {} : {\n [K in keyof S]?: K extends keyof T ? InclusiveSelect : TypedShorthandJoinSelect<S[K][\"columns\"]> | FunctionFull | CaseSelect | DetailedJoinSelect;\n} : {};\nexport declare const ROW_ACTIONS_COLUMN = \"$prostgles_actions\";\ntype RowActionsColumn = {\n [ROW_ACTIONS_COLUMN]: string[];\n};\ntype SelectWithFunctions<T extends AnyObject = AnyObject, IsTyped = false, S extends DBSchema | void = void> = (IsTyped extends true ? {\n [K in keyof T]?: InclusiveSelect;\n} & SchemaJoinSelect<T, S> & Record<string, FunctionFull | CaseSelect | JoinSelect> : Record<string, InclusiveSelect>) | {\n [K in keyof T]?: true | 1 | FunctionShorthand;\n} | {\n [K in keyof T]?: 0 | false;\n} | CommonSelect | (keyof T)[];\n/** S param is needed to ensure the non typed select works fine */\nexport type Select<T extends AnyObject | void = void, S extends DBSchema | void = void> = {\n t: T;\n s: S;\n} extends {\n t: AnyObject;\n s: DBSchema;\n} ? SelectWithFunctions<T & {\n $rowhash: string;\n} & RowActionsColumn, true, S> : SelectWithFunctions<AnyObject & {\n $rowhash: string;\n} & RowActionsColumn, false>;\nexport type SelectBasic = {\n [key: string]: any;\n} | {} | undefined | \"\" | \"*\";\n/**\n * Will return the first row as an object. Will throw an error if more than a row is returned. Use limit: 1 to avoid error.\n */\ntype ReturnTypeRow = \"row\";\ntype CommonSelectParams = {\n /**\n * Max number of rows to return. Defaults to 1000\n * - On client publish rules can affect this behaviour: cannot request more than the maxLimit (if present)\n */\n limit?: number | null;\n /**\n * Number of rows to skip\n */\n offset?: number;\n /**\n * Will group by all non aggregated fields specified in select (or all fields by default)\n */\n groupBy?: boolean;\n /**\n * Result data structure/type:\n * - **row**: the first row as an object\n * - **value**: the first value from of first field\n * - **values**: array of values from the selected field\n * - **statement**: sql statement\n * - **statement-no-rls**: sql statement without row level security\n * - **statement-where**: sql statement where condition\n */\n returnType?: ReturnTypeRow\n /**\n * Will return the first value from the selected field\n */\n | \"value\"\n /**\n * Will return an array of values from the selected field. Similar to array_agg(field).\n */\n | \"values\"\n /**\n * Will return the sql statement. Requires publishRawSQL privileges if called by client\n */\n | \"statement\"\n /**\n * Will return the sql statement excluding the user header. Requires publishRawSQL privileges if called by client\n */\n | \"statement-no-rls\"\n /**\n * Will return the sql statement where condition. Requires publishRawSQL privileges if called by client\n */\n | \"statement-where\";\n};\nexport type SelectParams<T extends AnyObject | void = void, S extends DBSchema | void = void> = CommonSelectParams & {\n /**\n * Fields/expressions/linked data to select\n * - `\"*\"` or undefined will return all fields\n * - `{ field: 0 }` - all fields except the specified field will be selected. Cannot be combined with inclusive selects (1, true, function or join selects)\n * - `{ field: 1 }` - only the specified field will be selected\n * - `{ field: { $funcName: [...args] } }` - the field will be selected with the specified function applied\n * - `{ field: 1, referencedTable: \"*\" }` - field together with all fields from referencedTable will be returned (as an array). The referencedTable must have a reference to the current table through foreign keys for this to work\n * - `{ linkedData: { $leftJoin: [\"lookupTable\", \"targetTable\"], select: { field: 1 } } }` - linkedData will contain the linked/joined records from referencedTable as an array of objects.\n */\n select?: Select<T, S>;\n /**\n * Order by options\n * - Order is maintained in arrays\n * - `[{ key: \"field\", asc: true, nulls: \"last\" }]`\n */\n orderBy?: OrderBy<S extends DBSchema ? T : void>;\n /**\n * Filter applied after any aggregations (group by)\n */\n having?: FullFilter<T, S>;\n abortSignal?: AbortSignal;\n};\ntype SubscribeActions = \"insert\" | \"delete\" | \"update\";\nexport type SubscribeOptions = {\n /**\n * If true then the first value will not be emitted\n * */\n skipFirst?: boolean;\n /**\n * Controls which actions will trigger the subscription.\n * If not provided then all actions will be triggered\n */\n actions?: Partial<Record<SubscribeActions, true> | Record<SubscribeActions, false>>;\n /**\n * If true then the subscription will be triggered without first checking if selected column values have changed\n * @default false\n */\n skipChangedColumnsCheck?: boolean;\n /**\n * If provided then the subscription will be throttled to the provided number of milliseconds\n */\n throttle?: number;\n throttleOpts?: {\n /**\n * False by default.\n * If true then the first value will be emitted at the end of the interval. Instant otherwise\n * */\n skipFirst?: boolean;\n };\n};\nexport type SubscribeParams<T extends AnyObject | void = void, S extends DBSchema | void = void> = SelectParams<T, S> & SubscribeOptions;\nexport type InsertParams<T extends AnyObject | void = void, S extends DBSchema | void = void> = {\n /**\n * If defined will returns the specified fields of the updated record(s)\n */\n returning?: Select<T, S>;\n /**\n * By default the insert may fail due to a unique/exclusion constraint violation error. To control this:\n * - DoNothing: will ignore the error and do nothing\n * - DoUpdate: will update all non primary key columns of the conflicting row\n */\n onConflict?: \"DoNothing\" | \"DoUpdate\" | {\n action: \"DoNothing\" | \"DoUpdate\";\n conflictColumns: string[];\n };\n /**\n * Used for sync.\n * If true then only valid and allowed fields will be inserted\n */\n removeDisallowedFields?: boolean;\n} & Pick<CommonSelectParams, \"returnType\">;\ntype CollapseNumberIfStringPresent<T> = [\n Extract<T, string>\n] extends [never] ? T : Exclude<T, number>;\n/**\n * Numeric columns that serialize to strings keep the numeric type as well to allow:\n * - inserting numeric values as either numbers or strings\n * - reading numeric values as strings\n */\nexport type NormalizedRow<T extends Record<string, unknown>> = Required<{\n [K in keyof T]: CollapseNumberIfStringPresent<T[K]>;\n}>;\nexport type DBSchemaNormalized<S extends DBSchema> = {\n [K in keyof S]: NormalizedRow<S[K][\"columns\"]>;\n};\ntype JoinTarget<P> = P extends string ? P : P extends readonly [...unknown[], infer Last] ? Last extends string ? Last : Last extends {\n table: infer T;\n} ? T : never : never;\ntype ExplicitJoinResult<J, S extends DBSchema | void, P> = [\n JoinTarget<P>\n] extends [never] ? any[] : S extends DBSchema ? JoinTarget<P> extends infer T extends keyof S ? J extends {\n select: infer Sel extends Select;\n} ? SelectDataType<S, {\n select: Sel;\n}, S[T][\"columns\"]>[] : any[] : any[] : any[];\ntype ShorthandJoinResult<J, S extends DBSchema | void, TableName extends PropertyKey> = S extends DBSchema ? TableName extends keyof S ? J extends \"*\" | Record<string, any> ? SelectDataType<S, {\n select: J;\n}, S[TableName][\"columns\"]>[] : any[] : any[] : any[];\n/** ParseSelect must check joins first because FunctionFull structurally matches objects without `$` keys. */\nexport type SelectFunction = FunctionFull | CaseSelect;\ntype CaseResult<F> = F extends ({\n $case: readonly (readonly [unknown, infer Result])[];\n}) ? Result | (F extends {\n $else: infer ElseResult;\n} ? ElseResult : null) : never;\ntype ParseSelect<Select extends SelectParams<TD>[\"select\"], TD extends AnyObject, S extends DBSchema | void> = (Select extends {\n \"*\": 1;\n} ? NormalizedRow<TD> : {}) & {\n [Key in keyof Omit<Select, \"*\"> & string]: Select[Key] extends 1 | true ? Key extends keyof RowActionsColumn ? RowActionsColumn[Key] : NormalizedRow<TD>[Key] : Select[Key] extends CaseSelect ? CaseResult<Select[Key]> : Select[Key] extends ({\n $leftJoin: infer P extends RawJoinPath;\n select: unknown;\n }) ? ExplicitJoinResult<Select[Key], S, P> : Select[Key] extends ({\n $innerJoin: infer P extends RawJoinPath;\n select: unknown;\n }) ? ExplicitJoinResult<Select[Key], S, P> : Select[Key] extends JoinSelect ? ShorthandJoinResult<Select[Key], S, Key> : Select[Key] extends SelectFunction | FunctionShorthand ? GetFunctionReturnType<Select[Key], TD, Key> : any;\n};\ntype SelectDataType<S extends DBSchema | void, O, TD extends AnyObject> = O extends {\n returnType: \"value\";\n} ? any : O extends {\n returnType: \"values\";\n select: Record<string, 1>;\n} ? ValueOf<Pick<NormalizedRow<TD> & RowActionsColumn, keyof O[\"select\"]>> : O extends {\n returnType: \"values\";\n} ? any : O extends {\n select: \"*\";\n} ? NormalizedRow<TD> : O extends {\n select: \"\";\n} ? Record<string, never> : O extends {\n select: readonly (keyof TD | keyof RowActionsColumn)[];\n} ? TD extends unknown ? Pick<NormalizedRow<TD> & RowActionsColumn, O[\"select\"][number]> : never : O extends {\n select: Record<string, 0 | false>;\n} ? TD extends unknown ? Omit<NormalizedRow<TD>, keyof O[\"select\"]> : never : O extends {\n select: Record<string, any>;\n} ? TD extends unknown ? ParseSelect<O[\"select\"], NormalizedRow<TD>, S> : never : NormalizedRow<TD>;\nexport type SelectReturnType<S extends DBSchema | void, O extends SelectParams<TD, S>, TD extends AnyObject, isMulti extends boolean> = O extends {\n returnType: \"statement\";\n} ? string : isMulti extends true ? SelectDataType<S, O, TD>[] : SelectDataType<S, O, TD>;\nexport type UpdateParams<T extends AnyObject | void = void, S extends DBSchema | void = void> = {\n /**\n * If defined will returns the specified fields of the updated record(s)\n */\n returning?: Select<T, S>;\n /**\n * Used for sync.\n * If true then only valid and allowed fields will be updated\n */\n removeDisallowedFields?: boolean;\n /**\n * true by default.\n * When set to false the update will throw an error if more than one row is updated (but the update will commit).\n * */\n multi?: boolean;\n} & Pick<CommonSelectParams, \"returnType\">;\ntype GetReturningReturnType<O extends UpdateParams<TD, S>, TD extends AnyObject, S extends DBSchema | void = void> = O extends {\n returning: \"*\";\n} ? NormalizedRow<TD> : O extends {\n returning: \"\";\n} ? Record<string, never> : O extends {\n returning: Record<string, 1>;\n} ? TD extends unknown ? Pick<NormalizedRow<TD>, keyof O[\"returning\"]> : never : O extends {\n returning: Record<string, 0>;\n} ? TD extends unknown ? Omit<NormalizedRow<TD>, keyof O[\"returning\"]> : never : void;\n/**\n *\n * Nothing is returned by default.\n * `returning` must be specified to return the updated records.\n */\nexport type UpdateReturnType<O extends UpdateParams<TD, S>, TD extends AnyObject, S extends DBSchema | void = void> = O extends {\n multi: false;\n} ? GetReturningReturnType<O, TD, S> : GetReturningReturnType<O, TD, S>[];\n/**\n * Nothing is returned by default.\n * `returning` must be specified to return the updated records.\n * If an array of records is inserted then an array of records will be returned\n * otherwise a single record will be returned.\n */\nexport type InsertReturnType<Data extends AnyObject, O extends UpdateParams<TD, S>, TD extends AnyObject, S extends DBSchema | void = void> = Data extends any[] | readonly any[] ? GetReturningReturnType<O, TD, S>[] : GetReturningReturnType<O, TD, S>;\nexport type SubscriptionHandler = {\n unsubscribe: () => Promise<void>;\n filter: FullFilter<void, void> | {};\n};\n/**\n * Callback fired once after subscribing and then every time the data matching the filter changes\n */\ntype SubscribeCallback<ItemsDataType> = (items: ItemsDataType, \n/**\n * Error due to schema changes or other post subscribe issues\n * Column or filter issues are thrown during the subscribe call\n */\nerror?: unknown) => void | Promise<void>;\n/**\n * Callback fired once after subscribing and then every time the data matching the filter changes\n */\ntype SubscribeOneCallback<ItemDataType> = (item: ItemDataType) => void | Promise<void>;\nexport type AllowedTSType = string | number | boolean | Date | unknown;\nexport type CastFromTSToPG<T extends AllowedTSType> = T extends number ? T | string : T extends string ? T | number | Date : T extends boolean ? T | string : T extends Date ? T | string : T;\nexport type UpsertDataToPGCast<TD extends AnyObject> = {\n [K in keyof TD]: CastFromTSToPG<TD[K]> | JSONMerge<TD[K]>;\n};\ntype JSONMerge<T> = T extends Record<string, unknown> ? Record<\"$merge\", unknown[]> : never;\nexport type PartialLax<T = AnyObject> = Partial<T>;\ntype UpsertDataToPGCastLax<T extends AnyObject> = {\n [K in keyof T]?: CastFromTSToPG<T[K]> | JSONMerge<T[K]>;\n};\nexport type DeleteParams<T extends AnyObject | void = void, S extends DBSchema | void = void> = {\n returning?: Select<T, S>;\n} & Pick<CommonSelectParams, \"returnType\">;\n/**\n * TODO: pick only joined tables from schema AND exclude parent fkey columns from the nested data\n */\nexport type InsertDataWithNested<TD extends AnyObject, S extends DBSchema | void, TName extends PropertyKey = never> = InsertColumnsWithReferences<GetInsertColumns<TD, S, TName>, S, TName> & (S extends DBSchema ? string extends keyof S ? {} : {\n [TableName in keyof S]?: Partial<InsertDataWithNested<S[TableName][\"columns\"], S, TableName>>[];\n} : {});\ntype GetInsertColumns<TD extends AnyObject, S, TName extends PropertyKey> = [\n TName\n] extends [never] ? TD : S extends (Record<TName, {\n insertColumns: infer Columns extends AnyObject;\n}>) ? Columns : TD;\ntype GetUpdateData<TD extends AnyObject, S, TName extends PropertyKey> = S extends Record<TName, {\n updateColumns: infer Columns extends AnyObject;\n}> ? UpsertDataToPGCastLax<Columns> : UpsertDataToPGCastLax<TD>;\n/**\n * Methods for interacting with a table/view\n * - On client-side some methods are restricted (and undefined) based on publish rules on the server\n */\ntype TableHandlerBase<\n/**\n * TODO: check if: \"deriving it directly throughout raised type instantiations from roughly 95.6k to 104k.\"\n */\nTD extends AnyObject, S extends DBSchema | void, TName extends PropertyKey> = {\n /**\n * Retrieves the table/view info\n */\n getInfo(\n /**\n * Language code for i18n data. \"en\" by default\n */\n lang?: string): Promise<TableInfo>;\n /**\n * Retrieves columns metadata of the table/view\n */\n getColumns(\n /**\n * Language code for i18n data. \"en\" by default\n */\n lang?: string, params?: GetColumnsParams): Promise<ValidatedColumnInfo[]>;\n /**\n * Retrieves a list of matching records from the view/table\n */\n find<const P extends SelectParams<TD, S>>(\n /**\n * A filter for a table, defined as a MongoDB-like query object.\n * Supported operators:\n * - Comparison: $eq, $ne, $gt, $gte, $lt, $lte\n * - Logical: $and, $or\n * - Evaluation: $like, $ilike\n * - Array: $in, $nin\n * - Joins: $existsJoined: { [tableName]: TableFilter }\n * @example\n * {\n $and: [\n {\n $or: [\n { topic: { $in: [\"Prostgles\", \"Postgres\"] } },\n { summary: { $ilike: \"%postgres%\" } },\n { id: { $gt: 5 } },\n ]\n },\n { summary: { $ne: null } }\n ]\n }\n */\n filter?: FullFilter<TD, S>, \n /**\n * @example\n * {\n * select: {\n * field1: 1,\n * field2: 1,\n * referencedTable: \"*\", // all fields from the referenced table will be included in an array under the \"referencedTable\" key\n * },\n * orderBy: { field1: -1 },\n * limit: 10,\n * }\n */\n selectParams?: P): Promise<SelectReturnType<S, P, TD, true>>;\n /**\n * Retrieves a record from the view/table\n */\n findOne<const P extends SelectParams<TD, S>>(filter?: FullFilter<TD, S>, selectParams?: P): Promise<undefined | SelectReturnType<S, P, TD, false>>;\n /**\n * Retrieves a list of matching records from the view/table and subscribes to changes\n */\n subscribe<const P extends SubscribeParams<TD, S>>(filter: FullFilter<TD, S>, params: P, onData: SubscribeCallback<SelectReturnType<S, P, TD, true>>): Promise<SubscriptionHandler>;\n /**\n * Retrieves first matching record from the view/table and subscribes to changes\n */\n subscribeOne<const P extends SubscribeParams<TD, S>>(filter: FullFilter<TD, S>, params: P, onData: SubscribeOneCallback<SelectReturnType<S, P, TD, false> | undefined>): Promise<SubscriptionHandler>;\n /**\n * Returns the number of rows that match the filter\n */\n count<P extends SelectParams<TD, S>>(filter?: FullFilter<TD, S>, selectParams?: P): Promise<number>;\n /**\n * Returns result size in bits\n */\n size<P extends SelectParams<TD, S>>(filter?: FullFilter<TD, S>, selectParams?: P): Promise<string>;\n /**\n * Updates a record in the table based on the specified filter criteria\n * - Use { multi: false } to ensure no more than one row is updated\n */\n update<P extends UpdateParams<TD, S>>(filter: FullFilter<TD, S>, newData: GetUpdateData<TD, S, TName>, params?: P): Promise<UpdateReturnType<P, TD, S> | undefined>;\n /**\n * Updates multiple records in the table in a batch operation.\n * - Each item in the `data` array contains a filter and the corresponding data to update.\n */\n updateBatch<P extends UpdateParams<TD, S>>(data: [FullFilter<TD, S>, GetUpdateData<TD, S, TName>][], params?: P): Promise<null>;\n /**\n * Inserts a new record into the table.\n */\n insert<P extends InsertParams<TD, S>>(data: InsertDataWithNested<TD, S, TName>, params?: P): Promise<GetReturningReturnType<P, TD, S>>;\n /**\n * Inserts new records into the table.\n */\n insertMany<P extends InsertParams<TD, S>>(data: InsertDataWithNested<TD, S, TName>[], params?: P): Promise<GetReturningReturnType<P, TD, S>[]>;\n /**\n * Inserts or updates a record in the table.\n * - If a record matching the `filter` exists, it updates the record.\n * - If no matching record exists, it inserts a new record.\n */\n upsert<P extends UpdateParams<TD, S>>(filter: FullFilter<TD, S>, newData: UpsertDataToPGCastLax<TD>, params?: P): Promise<GetReturningReturnType<P, TD, S>>;\n /**\n * Deletes records from the table based on the specified filter criteria.\n * - If no filter is provided, all records may be deleted (use with caution).\n */\n delete<P extends DeleteParams<TD, S>>(filter?: FullFilter<TD, S>, params?: P): Promise<GetReturningReturnType<P, TD, S>[]>;\n};\ntype TableHandlerData<S, TName> = S extends DBSchema ? TName extends keyof S ? S[TName][\"columns\"] : never : never;\ntype TableHandlerSchema<S extends DBSchema> = DBSchema extends S ? void : S;\nexport type TableHandler<S extends DBSchema = DBSchema, TName extends keyof S = keyof S> = TableHandlerBase<TableHandlerData<S, TName>, TableHandlerSchema<S>, TName>;\nexport type TableHandlerForColumns<T extends AnyObject = AnyObject> = TableHandler<{\n _: {\n columns: T;\n };\n}, \"_\">;\nexport type AsyncResult<T> = {\n data?: undefined;\n isLoading: true;\n error?: undefined;\n} | {\n data: T;\n isLoading: boolean;\n error?: unknown;\n};\nexport type HookOptions = {\n /**\n * Used to prevent the hook from fetching data\n */\n skip?: boolean;\n /**\n * Used to trigger re-fetching\n */\n deps?: any[];\n};\nexport type TableHandlerClientMethods<T extends AnyObject = AnyObject, S extends DBSchema | void = void> = {\n /**\n * Retrieves rows matching the filter and keeps them in sync\n * - use { handlesOnData: true } to get optimistic updates method: $update\n * - any changes to the row using the $update method will be reflected instantly\n * to all sync subscribers that were initiated with the same syncOptions\n */\n useSync?: <TD extends T = T, Opts extends SyncOptions = SyncOptions>(basicFilter: EqualityFilter<NoInfer<TD>>, syncOptions: Opts, hookOptions?: HookOptions) => AsyncResult<SyncDataItem<Required<TD>, Opts>[] | undefined>;\n sync?: <TD extends T, Opts extends SyncOptions>(basicFilter: EqualityFilter<TD>, options: Opts, onChange: OnChange<TD, Opts>, onError?: OnErrorHandler) => Promise<SyncHandler<TD>>;\n syncOne?: <TD extends T, Opts extends SyncOneOptions>(basicFilter: EqualityFilter<TD>, options: Opts, onChange: OnChangeOne<TD, Opts>, onError?: OnErrorHandler) => Promise<SingleSyncHandles<TD, Opts[\"handlesOnData\"]>>;\n /**\n * Retrieves the first row matching the filter and keeps it in sync\n * - use { handlesOnData: true } to get optimistic updates method: $update\n * - any changes to the row using the $update method will be reflected instantly\n * to all sync subscribers that were initiated with the same syncOptions\n */\n useSyncOne?: <TD extends T = T, Opts extends SyncOneOptions = SyncOneOptions>(basicFilter: EqualityFilter<NoInfer<TD>>, syncOptions: Opts, hookOptions?: HookOptions) => AsyncResult<SyncDataItem<Required<TD>, Opts> | undefined>;\n /**\n * Used internally to setup sync\n */\n _sync?: (filter: EqualityFilter<AnyObject> | undefined, selectParams: {\n select: FieldFilter;\n }, triggers: ClientSyncHandles) => Promise<DbTableSync>;\n _syncInfo?: SyncTableInfo;\n /**\n * Retrieves a list of matching records from the view/table and subscribes to changes\n */\n useSubscribe: <SubParams extends SubscribeParams<T, S>>(filter?: FullFilter<T, S>, options?: SubParams, hookOptions?: HookOptions) => AsyncResult<SelectReturnType<S, SubParams, T, true> | undefined>;\n /**\n * Retrieves a matching record from the view/table and subscribes to changes\n */\n useSubscribeOne: <SubParams extends SubscribeParams<T, S>>(filter?: FullFilter<T, S>, options?: SubParams, hookOptions?: HookOptions) => AsyncResult<SelectReturnType<S, SubParams, T, false> | undefined>;\n /**\n * Retrieves a list of matching records from the view/table\n */\n useFind: <P extends SelectParams<T, S>>(filter?: FullFilter<T, S>, selectParams?: P, hookOptions?: HookOptions) => AsyncResult<SelectReturnType<S, P, T, true> | undefined>;\n /**\n * Retrieves first matching record from the view/table\n */\n useFindOne: <P extends SelectParams<T, S>>(filter?: FullFilter<T, S>, selectParams?: P, hookOptions?: HookOptions) => AsyncResult<SelectReturnType<S, P, T, false> | undefined>;\n /**\n * Returns the total number of rows matching the filter\n */\n useCount: <P extends SelectParams<T, S>>(filter?: FullFilter<T, S>, selectParams?: P, hookOptions?: HookOptions) => AsyncResult<number | undefined>;\n /**\n * Returns result size in bits matching the filter and selectParams\n */\n useSize: <P extends SelectParams<T, S>>(filter?: FullFilter<T, S>, selectParams?: P, hookOptions?: HookOptions) => AsyncResult<string | undefined>;\n};\nexport type TableHandlerClient<S extends DBSchema = DBSchema, TName extends keyof S = keyof S> = TableHandler<S, TName> & TableHandlerClientMethods<S[TName][\"columns\"], DBSchema extends S ? void : S>;\nexport type TableHandlerClientForColumns<T extends AnyObject = AnyObject> = TableHandlerClient<{\n _: {\n columns: T;\n };\n}, \"_\">;\nexport type DBHandlerClient<Schema = void> = Schema extends DBSchema ? {\n [tov_name in keyof Schema]: TableHandlerClient<Schema, tov_name> | (Schema[tov_name] extends {\n optional: true;\n } ? undefined : never);\n} : Record<string, Partial<TableHandler & TableHandlerClientMethods>>;\nexport type ClientOnReadyParams<DBSchema = void, FunctionHandler extends ClientFunctionHandler = ClientFunctionHandler, U extends UserLike = UserLike> = {\n /**\n * The database handler object.\n * Only allowed tables and table methods are defined\n */\n db: Partial<DBHandlerClient<DBSchema>>;\n sql: SQLHandler | undefined;\n /**\n * Server-side TS function handlers\n * Only allowed methods are defined\n */\n methods: FunctionHandler | undefined;\n methodSchema: ServerFunctionHandler | undefined;\n /**\n * Table schema with column permission details the client has access to\n */\n tableSchema: DBSchemaTable[] | undefined;\n auth: AuthHandler<U>;\n isReconnect: boolean;\n socket: Socket;\n};\nexport\n";
5
5
  //# sourceMappingURL=prostglesApiTypes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prostglesApiTypes.d.ts","sourceRoot":"","sources":["../../../common/prostglesApiTypes.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,iBAAiB,8y4BA8mB7B,CAAC"}
1
+ {"version":3,"file":"prostglesApiTypes.d.ts","sourceRoot":"","sources":["../../../common/prostglesApiTypes.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,iBAAiB,oy4BA8mB7B,CAAC"}
@@ -310,11 +310,11 @@ type SelectDataType<S extends DBSchema | void, O, TD extends AnyObject> = O exte
310
310
  select: "";
311
311
  } ? Record<string, never> : O extends {
312
312
  select: readonly (keyof TD | keyof RowActionsColumn)[];
313
- } ? (TD extends unknown ? Pick<NormalizedRow<TD> & RowActionsColumn, O["select"][number]> : never) : O extends {
313
+ } ? TD extends unknown ? Pick<NormalizedRow<TD> & RowActionsColumn, O["select"][number]> : never : O extends {
314
314
  select: Record<string, 0 | false>;
315
- } ? (TD extends unknown ? Omit<NormalizedRow<TD>, keyof O["select"]> : never) : O extends {
315
+ } ? TD extends unknown ? Omit<NormalizedRow<TD>, keyof O["select"]> : never : O extends {
316
316
  select: Record<string, any>;
317
- } ? (TD extends unknown ? ParseSelect<O["select"], NormalizedRow<TD>, S> : never) : NormalizedRow<TD>;
317
+ } ? TD extends unknown ? ParseSelect<O["select"], NormalizedRow<TD>, S> : never : NormalizedRow<TD>;
318
318
  export type SelectReturnType<S extends DBSchema | void, O extends SelectParams<TD, S>, TD extends AnyObject, isMulti extends boolean> = O extends {
319
319
  returnType: "statement";
320
320
  } ? string : isMulti extends true ? SelectDataType<S, O, TD>[] : SelectDataType<S, O, TD>;
@@ -340,9 +340,9 @@ type GetReturningReturnType<O extends UpdateParams<TD, S>, TD extends AnyObject,
340
340
  returning: "";
341
341
  } ? Record<string, never> : O extends {
342
342
  returning: Record<string, 1>;
343
- } ? (TD extends unknown ? Pick<NormalizedRow<TD>, keyof O["returning"]> : never) : O extends {
343
+ } ? TD extends unknown ? Pick<NormalizedRow<TD>, keyof O["returning"]> : never : O extends {
344
344
  returning: Record<string, 0>;
345
- } ? (TD extends unknown ? Omit<NormalizedRow<TD>, keyof O["returning"]> : never) : void;
345
+ } ? TD extends unknown ? Omit<NormalizedRow<TD>, keyof O["returning"]> : never : void;
346
346
  /**
347
347
  *
348
348
  * Nothing is returned by default.
@@ -1577,6 +1577,28 @@ export declare const PROSTGLES_MCP_SERVERS_AND_TOOLS: {
1577
1577
  };
1578
1578
  }];
1579
1579
  };
1580
+ }, {
1581
+ readonly type: {
1582
+ readonly enum: readonly ["Avatar"];
1583
+ readonly title: "Format";
1584
+ readonly description: "Name initials in a circle. Set colors in column styles.";
1585
+ };
1586
+ readonly params: {
1587
+ readonly optional: true;
1588
+ readonly type: {
1589
+ readonly firstNameColumn: {
1590
+ readonly type: "string";
1591
+ readonly optional: true;
1592
+ readonly title: "First name column";
1593
+ readonly description: "Leave name columns unset to use this column's full name.";
1594
+ };
1595
+ readonly lastNameColumn: {
1596
+ readonly type: "string";
1597
+ readonly optional: true;
1598
+ readonly title: "Last name column";
1599
+ };
1600
+ };
1601
+ };
1580
1602
  }, {
1581
1603
  readonly type: {
1582
1604
  readonly enum: readonly ["Metric Prefix"];
@@ -1714,9 +1736,42 @@ export declare const PROSTGLES_MCP_SERVERS_AND_TOOLS: {
1714
1736
  readonly optional: true;
1715
1737
  readonly oneOf: readonly [{
1716
1738
  readonly type: {
1739
+ readonly fontWeight: {
1740
+ readonly enum: readonly ["normal", "bold"];
1741
+ readonly optional: true;
1742
+ };
1717
1743
  readonly type: {
1718
- readonly enum: readonly ["Conditional"];
1744
+ readonly enum: readonly ["None"];
1745
+ };
1746
+ };
1747
+ }, {
1748
+ readonly type: {
1749
+ readonly textColor: {
1750
+ readonly type: "string";
1751
+ readonly optional: true;
1752
+ };
1753
+ readonly chipColor: {
1754
+ readonly type: "string";
1755
+ readonly optional: true;
1756
+ };
1757
+ readonly cellColor: {
1758
+ readonly type: "string";
1759
+ readonly optional: true;
1719
1760
  };
1761
+ readonly borderColor: {
1762
+ readonly type: "string";
1763
+ readonly optional: true;
1764
+ };
1765
+ readonly fontWeight: {
1766
+ readonly enum: readonly ["normal", "bold"];
1767
+ readonly optional: true;
1768
+ };
1769
+ readonly type: {
1770
+ readonly enum: readonly ["Fixed"];
1771
+ };
1772
+ };
1773
+ }, {
1774
+ readonly type: {
1720
1775
  readonly column: {
1721
1776
  readonly type: "string";
1722
1777
  readonly optional: true;
@@ -1793,23 +1848,38 @@ export declare const PROSTGLES_MCP_SERVERS_AND_TOOLS: {
1793
1848
  };
1794
1849
  };
1795
1850
  };
1851
+ readonly fontWeight: {
1852
+ readonly enum: readonly ["normal", "bold"];
1853
+ readonly optional: true;
1854
+ };
1855
+ readonly type: {
1856
+ readonly enum: readonly ["Conditional"];
1857
+ };
1796
1858
  };
1797
1859
  }, {
1798
1860
  readonly type: {
1799
- readonly type: {
1800
- readonly enum: readonly ["Scale"];
1801
- };
1802
1861
  readonly textColor: "string";
1803
1862
  readonly minColor: "string";
1804
1863
  readonly maxColor: "string";
1864
+ readonly fontWeight: {
1865
+ readonly enum: readonly ["normal", "bold"];
1866
+ readonly optional: true;
1867
+ };
1868
+ readonly type: {
1869
+ readonly enum: readonly ["Scale"];
1870
+ };
1805
1871
  };
1806
1872
  }, {
1807
1873
  readonly type: {
1874
+ readonly barColor: "string";
1875
+ readonly textColor: "string";
1876
+ readonly fontWeight: {
1877
+ readonly enum: readonly ["normal", "bold"];
1878
+ readonly optional: true;
1879
+ };
1808
1880
  readonly type: {
1809
1881
  readonly enum: readonly ["Barchart"];
1810
1882
  };
1811
- readonly barColor: "string";
1812
- readonly textColor: "string";
1813
1883
  };
1814
1884
  }];
1815
1885
  };
@@ -1 +1 @@
1
- {"version":3,"file":"prostglesMcp.d.ts","sourceRoot":"","sources":["../../../common/prostglesMcp.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;CAE/B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prostgles/app",
3
- "version": "2.3.6-dev.1791902951",
3
+ "version": "2.3.6-dev.1792007925",
4
4
  "description": "Prostgles UI runtime and configurable PostgreSQL dashboard",
5
5
  "main": "dist/server/src/schemaConfig.js",
6
6
  "bin": {
@@ -59,7 +59,7 @@
59
59
  "pidusage": "^4.0.1",
60
60
  "prettier": "^3.9.9",
61
61
  "prostgles-client": "^4.0.413",
62
- "prostgles-server": "^4.2.665",
62
+ "prostgles-server": "^4.2.670",
63
63
  "qrcode": "^1.5.4",
64
64
  "smtp-server": "^3.19.18",
65
65
  "socket.io": "^4.8.4",
@@ -0,0 +1,38 @@
1
+ import type { JSONB, MaybePromise } from "prostgles-types";
2
+ import type { DBHandlerServerRestricted } from "prostgles-server";
3
+ import type { PermissionScope } from "prostgles-server/dist/PublishParser/publishTypesAndUtils";
4
+ export type AlertMessage = {
5
+ title: string;
6
+ body: string;
7
+ };
8
+ export type AlertType<S = void, P extends JSONB.ObjectType["type"] = JSONB.ObjectType["type"]> = {
9
+ params: P;
10
+ permissionScope?: (recipientId: string) => PermissionScope;
11
+ prepare: (context: {
12
+ clientDb: DBHandlerServerRestricted<S>;
13
+ params: JSONB.GetObjectType<P>;
14
+ recipientId: string;
15
+ localDate: string;
16
+ signal: AbortSignal;
17
+ }) => Promise<AlertMessage | null>;
18
+ };
19
+ /** Register reusable behaviour. Individual alerts and recipients live in managed tables. */
20
+ export declare const createAlertDefiner: <S = void>() => <const P extends JSONB.ObjectType["type"]>(definition: AlertType<S, P>) => AlertType<S, P>;
21
+ export type AlertChannel = {
22
+ /** At-least-once delivery: use idempotencyKey when supported. Re-resolve the destination and honour signal. */
23
+ send: (context: {
24
+ recipientId: string;
25
+ message: AlertMessage;
26
+ idempotencyKey: string;
27
+ signal: AbortSignal;
28
+ }) => MaybePromise<{
29
+ providerId: string | null;
30
+ }>;
31
+ };
32
+ export type AlertsOptions<S = void> = {
33
+ /** Defaults to alerts; also manages <tableName>_recipients and <tableName>_deliveries. */
34
+ tableName?: string;
35
+ types: Record<string, AlertType<S, any>>;
36
+ channels: Record<string, AlertChannel>;
37
+ };
38
+ //# sourceMappingURL=AlertTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertTypes.d.ts","sourceRoot":"","sources":["../../../../src/Alerts/AlertTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0DAA0D,CAAC;AAEhG,MAAM,MAAM,YAAY,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAC3D,MAAM,MAAM,SAAS,CACnB,CAAC,GAAG,IAAI,EACR,CAAC,SAAS,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,IAC3D;IACF,MAAM,EAAE,CAAC,CAAC;IACV,eAAe,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,eAAe,CAAC;IAC3D,OAAO,EAAE,CAAC,OAAO,EAAE;QACjB,QAAQ,EAAE,yBAAyB,CAAC,CAAC,CAAC,CAAC;QACvC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QAC/B,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,WAAW,CAAC;KACrB,KAAK,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;CACpC,CAAC;AAEF,4FAA4F;AAC5F,eAAO,MAAM,kBAAkB,GAC5B,CAAC,GAAG,IAAI,QACR,KAAK,CAAC,CAAC,SAAS,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,YAAY,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,oBAC1D,CAAC;AAEf,MAAM,MAAM,YAAY,GAAG;IACzB,+GAA+G;IAC/G,IAAI,EAAE,CAAC,OAAO,EAAE;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,OAAO,EAAE,YAAY,CAAC;QACtB,cAAc,EAAE,MAAM,CAAC;QACvB,MAAM,EAAE,WAAW,CAAC;KACrB,KAAK,YAAY,CAAC;QAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;CACnD,CAAC;AAEF,MAAM,MAAM,aAAa,CAAC,CAAC,GAAG,IAAI,IAAI;IACpC,0FAA0F;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;IACzC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;CACxC,CAAC"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createAlertDefiner = void 0;
4
+ /** Register reusable behaviour. Individual alerts and recipients live in managed tables. */
5
+ const createAlertDefiner = () => (definition) => definition;
6
+ exports.createAlertDefiner = createAlertDefiner;
7
+ //# sourceMappingURL=AlertTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertTypes.js","sourceRoot":"","sources":["../../../../src/Alerts/AlertTypes.ts"],"names":[],"mappings":";;;AAoBA,4FAA4F;AACrF,MAAM,kBAAkB,GAC7B,GAAa,EAAE,CACf,CAA2C,UAA2B,EAAE,EAAE,CACxE,UAAU,CAAC;AAHF,QAAA,kBAAkB,sBAGhB"}
@@ -0,0 +1,5 @@
1
+ import type { DBHandlerServer } from "prostgles-server";
2
+ import type { AlertsOptions } from "./AlertTypes";
3
+ /** Poll persisted schedules. Missed occurrences while workers are stopped are not replayed. */
4
+ export declare const enqueueAlerts: (dbo: DBHandlerServer, options: AlertsOptions) => Promise<void>;
5
+ //# sourceMappingURL=enqueueAlerts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enqueueAlerts.d.ts","sourceRoot":"","sources":["../../../../src/Alerts/enqueueAlerts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAGlD,+FAA+F;AAC/F,eAAO,MAAM,aAAa,GACxB,KAAK,eAAe,EACpB,SAAS,aAAa,kBAoCvB,CAAC"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.enqueueAlerts = void 0;
4
+ const cronSchedule_1 = require("prostgles-server/dist/Jobs/cronSchedule");
5
+ const getAlertTables_1 = require("./getAlertTables");
6
+ /** Poll persisted schedules. Missed occurrences while workers are stopped are not replayed. */
7
+ const enqueueAlerts = async (dbo, options) => {
8
+ const now = new Date();
9
+ const alerts = await (0, getAlertTables_1.getAlertDb)(dbo, options).alerts.find({ enabled: true }, { limit: null });
10
+ for (const alert of alerts) {
11
+ const occurrence = (0, cronSchedule_1.parseCronSchedule)({
12
+ type: "schedule",
13
+ ...alert.schedule,
14
+ })(now);
15
+ if (!occurrence)
16
+ continue;
17
+ await dbo.tx(async (dbx) => {
18
+ const tables = (0, getAlertTables_1.getAlertDb)(dbx, options);
19
+ const recipients = await tables.recipients.find({ alert_id: alert.id, enabled: true }, { limit: null });
20
+ if (!recipients.length)
21
+ return;
22
+ // The unique constraint arbitrates between workers. Row hooks queue delivery jobs in this transaction.
23
+ await tables.deliveries.insertMany(recipients.map((recipient) => ({
24
+ alert_id: alert.id,
25
+ recipient_id: recipient.id,
26
+ user_id: recipient.user_id,
27
+ channel: recipient.channel,
28
+ occurrence: occurrence.toISOString(),
29
+ definition: alert.definition,
30
+ revision: alert.revision,
31
+ outcome: "pending",
32
+ })), { onConflict: "DoNothing" });
33
+ });
34
+ }
35
+ };
36
+ exports.enqueueAlerts = enqueueAlerts;
37
+ //# sourceMappingURL=enqueueAlerts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enqueueAlerts.js","sourceRoot":"","sources":["../../../../src/Alerts/enqueueAlerts.ts"],"names":[],"mappings":";;;AACA,0EAA4E;AAE5E,qDAA8C;AAE9C,+FAA+F;AACxF,MAAM,aAAa,GAAG,KAAK,EAChC,GAAoB,EACpB,OAAsB,EACtB,EAAE;IACF,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;IACvB,MAAM,MAAM,GAAG,MAAM,IAAA,2BAAU,EAAC,GAAG,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,IAAI,CACvD,EAAE,OAAO,EAAE,IAAI,EAAE,EACjB,EAAE,KAAK,EAAE,IAAI,EAAE,CAChB,CAAC;IACF,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,MAAM,UAAU,GAAG,IAAA,gCAAiB,EAAC;YACnC,IAAI,EAAE,UAAU;YAChB,GAAG,KAAK,CAAC,QAAQ;SAClB,CAAC,CAAC,GAAG,CAAC,CAAC;QACR,IAAI,CAAC,UAAU;YAAE,SAAS;QAC1B,MAAM,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;YACzB,MAAM,MAAM,GAAG,IAAA,2BAAU,EAAC,GAAG,EAAE,OAAO,CAAC,CAAC;YACxC,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,IAAI,CAC7C,EAAE,QAAQ,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EACrC,EAAE,KAAK,EAAE,IAAI,EAAE,CAChB,CAAC;YACF,IAAI,CAAC,UAAU,CAAC,MAAM;gBAAE,OAAO;YAC/B,uGAAuG;YACvG,MAAM,MAAM,CAAC,UAAU,CAAC,UAAU,CAChC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;gBAC7B,QAAQ,EAAE,KAAK,CAAC,EAAE;gBAClB,YAAY,EAAE,SAAS,CAAC,EAAE;gBAC1B,OAAO,EAAE,SAAS,CAAC,OAAO;gBAC1B,OAAO,EAAE,SAAS,CAAC,OAAO;gBAC1B,UAAU,EAAE,UAAU,CAAC,WAAW,EAAE;gBACpC,UAAU,EAAE,KAAK,CAAC,UAAU;gBAC5B,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,OAAO,EAAE,SAAS;aACnB,CAAC,CAAC,EACH,EAAE,UAAU,EAAE,WAAW,EAAE,CAC5B,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC;AAtCW,QAAA,aAAa,iBAsCxB"}
@@ -0,0 +1,5 @@
1
+ import type { AlertsOptions } from "./AlertTypes";
2
+ import type { DBS, DatabaseConfigs } from "..";
3
+ import type { SchemaConfigAlerts } from "../schemaConfig";
4
+ export declare const getAlertConfig: (alerts: SchemaConfigAlerts | undefined, dbs: DBS, authProviders: DatabaseConfigs["auth_providers"]) => AlertsOptions | undefined;
5
+ //# sourceMappingURL=getAlertConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAlertConfig.d.ts","sourceRoot":"","sources":["../../../../src/Alerts/getAlertConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,aAAa,EAAE,MAAM,cAAc,CAAC;AAEhE,OAAO,KAAK,EAAE,GAAG,EAAE,eAAe,EAAE,MAAM,IAAI,CAAC;AAC/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAG1D,eAAO,MAAM,cAAc,GACzB,QAAQ,kBAAkB,GAAG,SAAS,EACtC,KAAK,GAAG,EACR,eAAe,eAAe,CAAC,gBAAgB,CAAC,KAC/C,aAAa,GAAG,SA0ClB,CAAC"}