@objectstack/runtime 1.0.10 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -221,11 +221,26 @@ declare class HttpDispatcher {
221
221
  routes: {
222
222
  data: string;
223
223
  metadata: string;
224
+ packages: string;
224
225
  auth: string;
226
+ ui: string;
225
227
  graphql: string | undefined;
226
228
  storage: string | undefined;
227
229
  analytics: string | undefined;
228
230
  hub: string | undefined;
231
+ automation: string;
232
+ };
233
+ endpoints: {
234
+ data: string;
235
+ metadata: string;
236
+ packages: string;
237
+ auth: string;
238
+ ui: string;
239
+ graphql: string | undefined;
240
+ storage: string | undefined;
241
+ analytics: string | undefined;
242
+ hub: string | undefined;
243
+ automation: string;
229
244
  };
230
245
  features: {
231
246
  graphql: boolean;
@@ -258,7 +273,7 @@ declare class HttpDispatcher {
258
273
  * Standard: /metadata/:type/:name
259
274
  * Fallback for backward compat: /metadata (all objects), /metadata/:objectName (get object)
260
275
  */
261
- handleMetadata(path: string, context: HttpProtocolContext, method?: string, body?: any): Promise<HttpDispatcherResult>;
276
+ handleMetadata(path: string, context: HttpProtocolContext, method?: string, body?: any, query?: any): Promise<HttpDispatcherResult>;
262
277
  /**
263
278
  * Handles Data requests
264
279
  * path: sub-path after /data/ (e.g. "contacts", "contacts/123", "contacts/query")
@@ -269,6 +284,25 @@ declare class HttpDispatcher {
269
284
  * path: sub-path after /analytics/
270
285
  */
271
286
  handleAnalytics(path: string, method: string, body: any, context: HttpProtocolContext): Promise<HttpDispatcherResult>;
287
+ /**
288
+ * Handles Package Management requests
289
+ *
290
+ * REST Endpoints:
291
+ * - GET /packages → list all installed packages
292
+ * - GET /packages/:id → get a specific package
293
+ * - POST /packages → install a new package
294
+ * - DELETE /packages/:id → uninstall a package
295
+ * - PATCH /packages/:id/enable → enable a package
296
+ * - PATCH /packages/:id/disable → disable a package
297
+ *
298
+ * Uses ObjectQL SchemaRegistry directly (via the 'objectql' service)
299
+ * with broker fallback for backward compatibility.
300
+ */
301
+ handlePackages(path: string, method: string, body: any, query: any, context: HttpProtocolContext): Promise<HttpDispatcherResult>;
302
+ /**
303
+ * Fallback: handle packages via broker (for backward compatibility)
304
+ */
305
+ private handlePackagesViaBroker;
272
306
  /**
273
307
  * Handles Hub requests
274
308
  * path: sub-path after /hub/
@@ -279,6 +313,11 @@ declare class HttpDispatcher {
279
313
  * path: sub-path after /storage/
280
314
  */
281
315
  handleStorage(path: string, method: string, file: any, context: HttpProtocolContext): Promise<HttpDispatcherResult>;
316
+ /**
317
+ * Handles UI requests
318
+ * path: sub-path after /ui/
319
+ */
320
+ handleUi(path: string, query: any, _context: HttpProtocolContext): Promise<HttpDispatcherResult>;
282
321
  /**
283
322
  * Handles Automation requests
284
323
  * path: sub-path after /automation/
@@ -286,6 +325,11 @@ declare class HttpDispatcher {
286
325
  handleAutomation(path: string, method: string, body: any, context: HttpProtocolContext): Promise<HttpDispatcherResult>;
287
326
  private getServicesMap;
288
327
  private getService;
328
+ /**
329
+ * Get the ObjectQL service which provides access to SchemaRegistry.
330
+ * Tries multiple access patterns since kernel structure varies.
331
+ */
332
+ private getObjectQLService;
289
333
  private capitalize;
290
334
  /**
291
335
  * Main Dispatcher Entry Point
@@ -501,6 +545,10 @@ declare class RestServer {
501
545
  * Register metadata endpoints
502
546
  */
503
547
  private registerMetadataEndpoints;
548
+ /**
549
+ * Register UI endpoints
550
+ */
551
+ private registerUiEndpoints;
504
552
  /**
505
553
  * Register CRUD endpoints for data operations
506
554
  */
package/dist/index.d.ts CHANGED
@@ -221,11 +221,26 @@ declare class HttpDispatcher {
221
221
  routes: {
222
222
  data: string;
223
223
  metadata: string;
224
+ packages: string;
224
225
  auth: string;
226
+ ui: string;
225
227
  graphql: string | undefined;
226
228
  storage: string | undefined;
227
229
  analytics: string | undefined;
228
230
  hub: string | undefined;
231
+ automation: string;
232
+ };
233
+ endpoints: {
234
+ data: string;
235
+ metadata: string;
236
+ packages: string;
237
+ auth: string;
238
+ ui: string;
239
+ graphql: string | undefined;
240
+ storage: string | undefined;
241
+ analytics: string | undefined;
242
+ hub: string | undefined;
243
+ automation: string;
229
244
  };
230
245
  features: {
231
246
  graphql: boolean;
@@ -258,7 +273,7 @@ declare class HttpDispatcher {
258
273
  * Standard: /metadata/:type/:name
259
274
  * Fallback for backward compat: /metadata (all objects), /metadata/:objectName (get object)
260
275
  */
261
- handleMetadata(path: string, context: HttpProtocolContext, method?: string, body?: any): Promise<HttpDispatcherResult>;
276
+ handleMetadata(path: string, context: HttpProtocolContext, method?: string, body?: any, query?: any): Promise<HttpDispatcherResult>;
262
277
  /**
263
278
  * Handles Data requests
264
279
  * path: sub-path after /data/ (e.g. "contacts", "contacts/123", "contacts/query")
@@ -269,6 +284,25 @@ declare class HttpDispatcher {
269
284
  * path: sub-path after /analytics/
270
285
  */
271
286
  handleAnalytics(path: string, method: string, body: any, context: HttpProtocolContext): Promise<HttpDispatcherResult>;
287
+ /**
288
+ * Handles Package Management requests
289
+ *
290
+ * REST Endpoints:
291
+ * - GET /packages → list all installed packages
292
+ * - GET /packages/:id → get a specific package
293
+ * - POST /packages → install a new package
294
+ * - DELETE /packages/:id → uninstall a package
295
+ * - PATCH /packages/:id/enable → enable a package
296
+ * - PATCH /packages/:id/disable → disable a package
297
+ *
298
+ * Uses ObjectQL SchemaRegistry directly (via the 'objectql' service)
299
+ * with broker fallback for backward compatibility.
300
+ */
301
+ handlePackages(path: string, method: string, body: any, query: any, context: HttpProtocolContext): Promise<HttpDispatcherResult>;
302
+ /**
303
+ * Fallback: handle packages via broker (for backward compatibility)
304
+ */
305
+ private handlePackagesViaBroker;
272
306
  /**
273
307
  * Handles Hub requests
274
308
  * path: sub-path after /hub/
@@ -279,6 +313,11 @@ declare class HttpDispatcher {
279
313
  * path: sub-path after /storage/
280
314
  */
281
315
  handleStorage(path: string, method: string, file: any, context: HttpProtocolContext): Promise<HttpDispatcherResult>;
316
+ /**
317
+ * Handles UI requests
318
+ * path: sub-path after /ui/
319
+ */
320
+ handleUi(path: string, query: any, _context: HttpProtocolContext): Promise<HttpDispatcherResult>;
282
321
  /**
283
322
  * Handles Automation requests
284
323
  * path: sub-path after /automation/
@@ -286,6 +325,11 @@ declare class HttpDispatcher {
286
325
  handleAutomation(path: string, method: string, body: any, context: HttpProtocolContext): Promise<HttpDispatcherResult>;
287
326
  private getServicesMap;
288
327
  private getService;
328
+ /**
329
+ * Get the ObjectQL service which provides access to SchemaRegistry.
330
+ * Tries multiple access patterns since kernel structure varies.
331
+ */
332
+ private getObjectQLService;
289
333
  private capitalize;
290
334
  /**
291
335
  * Main Dispatcher Entry Point
@@ -501,6 +545,10 @@ declare class RestServer {
501
545
  * Register metadata endpoints
502
546
  */
503
547
  private registerMetadataEndpoints;
548
+ /**
549
+ * Register UI endpoints
550
+ */
551
+ private registerUiEndpoints;
504
552
  /**
505
553
  * Register CRUD endpoints for data operations
506
554
  */