@proteos/sdk 0.51.1 → 0.52.0

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.
@@ -331,6 +331,88 @@ var EntityServiceImpl = class {
331
331
  }
332
332
  };
333
333
 
334
+ // src/meta/entity-extensions.ts
335
+ var ENTITY_EXTENSIONS_BASE_PATH = "/meta/v1/entity-extensions";
336
+ var EntityExtensionServiceImpl = class {
337
+ constructor(client) {
338
+ this.client = client;
339
+ }
340
+ client;
341
+ list(options = {}) {
342
+ return new PageIterator((opts) => this.listPage(opts), options);
343
+ }
344
+ async listPage(options = {}) {
345
+ return this.client.requestWithQuery(
346
+ "GET",
347
+ ENTITY_EXTENSIONS_BASE_PATH,
348
+ options
349
+ );
350
+ }
351
+ async get(key) {
352
+ return this.client.request("GET", `${ENTITY_EXTENSIONS_BASE_PATH}/${key}`);
353
+ }
354
+ async create(request) {
355
+ return this.client.request("POST", ENTITY_EXTENSIONS_BASE_PATH, request);
356
+ }
357
+ async upsert(key, request) {
358
+ return this.client.request("PUT", `${ENTITY_EXTENSIONS_BASE_PATH}/${key}`, {
359
+ ...request,
360
+ key
361
+ });
362
+ }
363
+ async update(key, request) {
364
+ return this.client.request(
365
+ "PATCH",
366
+ `${ENTITY_EXTENSIONS_BASE_PATH}/${key}`,
367
+ request
368
+ );
369
+ }
370
+ async delete(key) {
371
+ await this.client.request("DELETE", `${ENTITY_EXTENSIONS_BASE_PATH}/${key}`);
372
+ }
373
+ };
374
+
375
+ // src/meta/list-extensions.ts
376
+ var LIST_EXTENSIONS_BASE_PATH = "/meta/v1/list-extensions";
377
+ var ListExtensionServiceImpl = class {
378
+ constructor(client) {
379
+ this.client = client;
380
+ }
381
+ client;
382
+ list(options = {}) {
383
+ return new PageIterator((opts) => this.listPage(opts), options);
384
+ }
385
+ async listPage(options = {}) {
386
+ return this.client.requestWithQuery(
387
+ "GET",
388
+ LIST_EXTENSIONS_BASE_PATH,
389
+ options
390
+ );
391
+ }
392
+ async get(key) {
393
+ return this.client.request("GET", `${LIST_EXTENSIONS_BASE_PATH}/${key}`);
394
+ }
395
+ async create(request) {
396
+ return this.client.request("POST", LIST_EXTENSIONS_BASE_PATH, request);
397
+ }
398
+ async upsert(key, request) {
399
+ return this.client.request("PUT", `${LIST_EXTENSIONS_BASE_PATH}/${key}`, {
400
+ ...request,
401
+ key
402
+ });
403
+ }
404
+ async update(key, request) {
405
+ return this.client.request(
406
+ "PATCH",
407
+ `${LIST_EXTENSIONS_BASE_PATH}/${key}`,
408
+ request
409
+ );
410
+ }
411
+ async delete(key) {
412
+ await this.client.request("DELETE", `${LIST_EXTENSIONS_BASE_PATH}/${key}`);
413
+ }
414
+ };
415
+
334
416
  // src/meta/list-views.ts
335
417
  var LIST_VIEWS_BASE_PATH = "/meta/v1/list-views";
336
418
  var ListViewServiceImpl = class {
@@ -391,6 +473,58 @@ var ListServiceImpl = class {
391
473
  }
392
474
  };
393
475
 
476
+ // src/meta/menu-configuration-extensions.ts
477
+ var MENU_CONFIGURATION_EXTENSIONS_BASE_PATH = "/meta/v1/menu-configuration-extensions";
478
+ var MenuConfigurationExtensionServiceImpl = class {
479
+ constructor(client) {
480
+ this.client = client;
481
+ }
482
+ client;
483
+ list(options = {}) {
484
+ return new PageIterator((opts) => this.listPage(opts), options);
485
+ }
486
+ async listPage(options = {}) {
487
+ return this.client.requestWithQuery(
488
+ "GET",
489
+ MENU_CONFIGURATION_EXTENSIONS_BASE_PATH,
490
+ options
491
+ );
492
+ }
493
+ async get(key) {
494
+ return this.client.request(
495
+ "GET",
496
+ `${MENU_CONFIGURATION_EXTENSIONS_BASE_PATH}/${key}`
497
+ );
498
+ }
499
+ async create(request) {
500
+ return this.client.request(
501
+ "POST",
502
+ MENU_CONFIGURATION_EXTENSIONS_BASE_PATH,
503
+ request
504
+ );
505
+ }
506
+ async upsert(key, request) {
507
+ return this.client.request(
508
+ "PUT",
509
+ `${MENU_CONFIGURATION_EXTENSIONS_BASE_PATH}/${key}`,
510
+ {
511
+ ...request,
512
+ key
513
+ }
514
+ );
515
+ }
516
+ async update(key, request) {
517
+ return this.client.request(
518
+ "PATCH",
519
+ `${MENU_CONFIGURATION_EXTENSIONS_BASE_PATH}/${key}`,
520
+ request
521
+ );
522
+ }
523
+ async delete(key) {
524
+ await this.client.request("DELETE", `${MENU_CONFIGURATION_EXTENSIONS_BASE_PATH}/${key}`);
525
+ }
526
+ };
527
+
394
528
  // src/meta/menu-configurations.ts
395
529
  var MENU_CONFIGURATIONS_BASE_PATH = "/meta/v1/menu-configurations";
396
530
  var MenuConfigurationServiceImpl = class {
@@ -479,6 +613,47 @@ var ModuleServiceImpl = class {
479
613
  }
480
614
  };
481
615
 
616
+ // src/meta/page-extensions.ts
617
+ var PAGE_EXTENSIONS_BASE_PATH = "/meta/v1/page-extensions";
618
+ var PageExtensionServiceImpl = class {
619
+ constructor(client) {
620
+ this.client = client;
621
+ }
622
+ client;
623
+ list(options = {}) {
624
+ return new PageIterator((opts) => this.listPage(opts), options);
625
+ }
626
+ async listPage(options = {}) {
627
+ return this.client.requestWithQuery(
628
+ "GET",
629
+ PAGE_EXTENSIONS_BASE_PATH,
630
+ options
631
+ );
632
+ }
633
+ async get(key) {
634
+ return this.client.request("GET", `${PAGE_EXTENSIONS_BASE_PATH}/${key}`);
635
+ }
636
+ async create(request) {
637
+ return this.client.request("POST", PAGE_EXTENSIONS_BASE_PATH, request);
638
+ }
639
+ async upsert(key, request) {
640
+ return this.client.request("PUT", `${PAGE_EXTENSIONS_BASE_PATH}/${key}`, {
641
+ ...request,
642
+ key
643
+ });
644
+ }
645
+ async update(key, request) {
646
+ return this.client.request(
647
+ "PATCH",
648
+ `${PAGE_EXTENSIONS_BASE_PATH}/${key}`,
649
+ request
650
+ );
651
+ }
652
+ async delete(key) {
653
+ await this.client.request("DELETE", `${PAGE_EXTENSIONS_BASE_PATH}/${key}`);
654
+ }
655
+ };
656
+
482
657
  // src/meta/pages.ts
483
658
  var PAGES_BASE_PATH = "/meta/v1/pages";
484
659
  var PageServiceImpl = class {
@@ -932,6 +1107,7 @@ var ResponsiveSizingSchema = zod.z.object({
932
1107
  });
933
1108
  var commonPropsShape = {
934
1109
  id: zod.z.string().optional(),
1110
+ extension_key: zod.z.string().optional(),
935
1111
  visible_when: FilterGroupSchema.optional(),
936
1112
  read_only_when: FilterGroupSchema.optional(),
937
1113
  width: SizeValueSchema.optional(),
@@ -962,6 +1138,17 @@ var LayoutElementType = {
962
1138
  List: "list",
963
1139
  WorkflowTrigger: "workflow_trigger"
964
1140
  };
1141
+ var LayoutTabSchema = zod.z.lazy(
1142
+ () => zod.z.object({
1143
+ id: zod.z.string().min(1),
1144
+ extension_key: zod.z.string().optional(),
1145
+ label: zod.z.string().min(1),
1146
+ icon: zod.z.string().optional(),
1147
+ visible_when: FilterGroupSchema.optional(),
1148
+ default_when: FilterGroupSchema.optional(),
1149
+ content: LayoutElementSchema
1150
+ })
1151
+ );
965
1152
  var LayoutElementSchema = zod.z.lazy(
966
1153
  () => zod.z.discriminatedUnion("type", [
967
1154
  zod.z.object({
@@ -1002,16 +1189,7 @@ var LayoutElementSchema = zod.z.lazy(
1002
1189
  zod.z.object({
1003
1190
  type: zod.z.literal("tabs"),
1004
1191
  ...commonPropsShape,
1005
- tabs: zod.z.array(
1006
- zod.z.object({
1007
- id: zod.z.string().min(1),
1008
- label: zod.z.string().min(1),
1009
- icon: zod.z.string().optional(),
1010
- visible_when: FilterGroupSchema.optional(),
1011
- default_when: FilterGroupSchema.optional(),
1012
- content: LayoutElementSchema
1013
- })
1014
- ),
1192
+ tabs: zod.z.array(LayoutTabSchema),
1015
1193
  default_tab_id: zod.z.string().optional()
1016
1194
  }),
1017
1195
  zod.z.object({
@@ -1267,6 +1445,7 @@ var AttributeSchema = zod.z.object({
1267
1445
  is_nullable: zod.z.boolean().optional(),
1268
1446
  is_unique: zod.z.boolean(),
1269
1447
  is_read_only: zod.z.boolean().optional(),
1448
+ extension_key: zod.z.string().optional(),
1270
1449
  restrictions: AttributeRestrictionsSchema.optional(),
1271
1450
  default_value: zod.z.unknown().optional(),
1272
1451
  meta: zod.z.unknown().optional(),
@@ -1355,13 +1534,15 @@ var PageActionSchema = zod.z.object({
1355
1534
  workflow: zod.z.string().optional(),
1356
1535
  params: zod.z.record(zod.z.string()).optional(),
1357
1536
  inputs: zod.z.record(zod.z.string()).optional(),
1358
- skip_confirmation: zod.z.boolean().optional()
1537
+ skip_confirmation: zod.z.boolean().optional(),
1538
+ extension_key: zod.z.string().optional()
1359
1539
  });
1360
1540
  var SelectionModeSchema = zod.z.enum(["on_demand", "always", "off"]);
1361
1541
  var ColumnSchema = zod.z.object({
1362
1542
  attribute: zod.z.string(),
1363
1543
  label: zod.z.string(),
1364
- width: zod.z.number()
1544
+ width: zod.z.number(),
1545
+ extension_key: zod.z.string().optional()
1365
1546
  });
1366
1547
  var SortConfigSchema = zod.z.object({
1367
1548
  attribute: zod.z.string(),
@@ -1412,7 +1593,10 @@ var MenuItemSchema = zod.z.lazy(
1412
1593
  type: zod.z.enum(["link", "group", "entity", "page", "list"]),
1413
1594
  icon: zod.z.string(),
1414
1595
  reference: zod.z.string().optional(),
1415
- children: zod.z.array(MenuItemSchema).nullable()
1596
+ children: zod.z.array(MenuItemSchema).nullable(),
1597
+ extension_key: zod.z.string().optional(),
1598
+ is_hidden: zod.z.boolean().optional(),
1599
+ replaced_item: zod.z.lazy(() => MenuItemSchema).optional()
1416
1600
  })
1417
1601
  );
1418
1602
  var MenuConfigurationSchema = AuditFieldsSchema.extend({
@@ -1423,6 +1607,71 @@ var MenuConfigurationSchema = AuditFieldsSchema.extend({
1423
1607
  items: zod.z.array(MenuItemSchema),
1424
1608
  is_default: zod.z.boolean()
1425
1609
  });
1610
+ var EntityExtensionSchema = AuditFieldsSchema.extend({
1611
+ key: zod.z.string(),
1612
+ org_id: zod.z.string(),
1613
+ name: zod.z.string(),
1614
+ description: zod.z.string(),
1615
+ entity_slug: zod.z.string(),
1616
+ module_slug: zod.z.string(),
1617
+ attributes: zod.z.array(AttributeSchema)
1618
+ });
1619
+ var ExtensionPositionSchema = zod.z.enum(["before", "after", "first", "last"]);
1620
+ var PAGE_EXTENSION_ANCHOR_MAIN = "layout.main";
1621
+ var PAGE_EXTENSION_ANCHOR_SIDE_PANEL = "layout.side_panel";
1622
+ var PageExtensionPlacementSchema = zod.z.object({
1623
+ anchor_id: zod.z.string().min(1),
1624
+ position: ExtensionPositionSchema,
1625
+ elements: zod.z.array(LayoutElementSchema).optional(),
1626
+ tabs: zod.z.array(LayoutTabSchema).optional()
1627
+ });
1628
+ var PageExtensionSchema = AuditFieldsSchema.extend({
1629
+ key: zod.z.string(),
1630
+ org_id: zod.z.string(),
1631
+ name: zod.z.string(),
1632
+ description: zod.z.string(),
1633
+ page_slug: zod.z.string(),
1634
+ module_slug: zod.z.string(),
1635
+ placements: zod.z.array(PageExtensionPlacementSchema)
1636
+ });
1637
+ var MenuConfigurationExtensionPositionSchema = zod.z.enum([
1638
+ "before",
1639
+ "after",
1640
+ "first",
1641
+ "last",
1642
+ "replace",
1643
+ "remove"
1644
+ ]);
1645
+ var MENU_CONFIGURATION_EXTENSION_ANCHOR_ITEMS = "menu.items";
1646
+ var MenuConfigurationExtensionPlacementSchema = zod.z.object({
1647
+ anchor_id: zod.z.string().min(1),
1648
+ position: MenuConfigurationExtensionPositionSchema,
1649
+ items: zod.z.array(MenuItemSchema).optional()
1650
+ });
1651
+ var MenuConfigurationExtensionSchema = AuditFieldsSchema.extend({
1652
+ key: zod.z.string(),
1653
+ org_id: zod.z.string(),
1654
+ name: zod.z.string(),
1655
+ description: zod.z.string(),
1656
+ menu_slug: zod.z.string(),
1657
+ module_slug: zod.z.string(),
1658
+ placements: zod.z.array(MenuConfigurationExtensionPlacementSchema)
1659
+ });
1660
+ var ListExtensionColumnPlacementSchema = zod.z.object({
1661
+ anchor_attribute: zod.z.string().optional(),
1662
+ position: ExtensionPositionSchema,
1663
+ columns: zod.z.array(ColumnSchema).min(1)
1664
+ });
1665
+ var ListExtensionSchema = AuditFieldsSchema.extend({
1666
+ key: zod.z.string(),
1667
+ org_id: zod.z.string(),
1668
+ name: zod.z.string(),
1669
+ description: zod.z.string(),
1670
+ list_slug: zod.z.string(),
1671
+ module_slug: zod.z.string(),
1672
+ columns: zod.z.array(ListExtensionColumnPlacementSchema),
1673
+ actions: zod.z.array(PageActionSchema)
1674
+ });
1426
1675
  var AppHomeSchema = zod.z.object({
1427
1676
  type: zod.z.enum(["list", "page"]),
1428
1677
  reference: zod.z.string()
@@ -1470,6 +1719,26 @@ var MetaClient = class {
1470
1719
  * Service for managing entity definitions.
1471
1720
  */
1472
1721
  entities;
1722
+ /**
1723
+ * Service for managing entity extensions — attributes contributed to a host
1724
+ * entity by a resource that does not own it.
1725
+ */
1726
+ entityExtensions;
1727
+ /**
1728
+ * Service for managing page extensions — anchored layout blocks contributed
1729
+ * to a host page by a resource that does not own it.
1730
+ */
1731
+ pageExtensions;
1732
+ /**
1733
+ * Service for managing list extensions — columns and toolbar actions
1734
+ * contributed to a host list by a resource that does not own it.
1735
+ */
1736
+ listExtensions;
1737
+ /**
1738
+ * Service for managing menu-configuration extensions — items contributed
1739
+ * to a host menu by another module or resource.
1740
+ */
1741
+ menuConfigurationExtensions;
1473
1742
  /**
1474
1743
  * Service for managing WebAssembly modules.
1475
1744
  */
@@ -1518,6 +1787,10 @@ var MetaClient = class {
1518
1787
  */
1519
1788
  constructor(client) {
1520
1789
  this.entities = new EntityServiceImpl(client);
1790
+ this.entityExtensions = new EntityExtensionServiceImpl(client);
1791
+ this.pageExtensions = new PageExtensionServiceImpl(client);
1792
+ this.listExtensions = new ListExtensionServiceImpl(client);
1793
+ this.menuConfigurationExtensions = new MenuConfigurationExtensionServiceImpl(client);
1521
1794
  this.modules = new ModuleServiceImpl(client);
1522
1795
  this.variables = new VariableServiceImpl(client);
1523
1796
  this.components = new ComponentServiceImpl(client);
@@ -1544,16 +1817,25 @@ exports.CurrencyAttributeMetaSchema = CurrencyAttributeMetaSchema;
1544
1817
  exports.DEFAULT_PAGE_SIZE = DEFAULT_PAGE_SIZE;
1545
1818
  exports.DONE = DONE;
1546
1819
  exports.DesignReferenceSchema = DesignReferenceSchema;
1820
+ exports.EntityExtensionSchema = EntityExtensionSchema;
1547
1821
  exports.EntitySchema = EntitySchema;
1548
1822
  exports.EntityWithSchemaSchema = EntityWithSchemaSchema;
1823
+ exports.ExtensionPositionSchema = ExtensionPositionSchema;
1549
1824
  exports.FileAttributeMetaSchema = FileAttributeMetaSchema;
1550
1825
  exports.FileRefSchema = FileRefSchema;
1551
1826
  exports.FilterElementSchema = FilterElementSchema;
1552
1827
  exports.FilterGroupSchema = FilterGroupSchema;
1553
1828
  exports.LayoutElementSchema = LayoutElementSchema;
1554
1829
  exports.LayoutElementType = LayoutElementType;
1830
+ exports.LayoutTabSchema = LayoutTabSchema;
1831
+ exports.ListExtensionColumnPlacementSchema = ListExtensionColumnPlacementSchema;
1832
+ exports.ListExtensionSchema = ListExtensionSchema;
1555
1833
  exports.ListSchema = ListSchema;
1556
1834
  exports.ListViewSchema = ListViewSchema;
1835
+ exports.MENU_CONFIGURATION_EXTENSION_ANCHOR_ITEMS = MENU_CONFIGURATION_EXTENSION_ANCHOR_ITEMS;
1836
+ exports.MenuConfigurationExtensionPlacementSchema = MenuConfigurationExtensionPlacementSchema;
1837
+ exports.MenuConfigurationExtensionPositionSchema = MenuConfigurationExtensionPositionSchema;
1838
+ exports.MenuConfigurationExtensionSchema = MenuConfigurationExtensionSchema;
1557
1839
  exports.MenuConfigurationSchema = MenuConfigurationSchema;
1558
1840
  exports.MenuItemSchema = MenuItemSchema;
1559
1841
  exports.MenuItemType = MenuItemType;
@@ -1561,9 +1843,13 @@ exports.MetaClient = MetaClient;
1561
1843
  exports.ModuleSchema = ModuleSchema;
1562
1844
  exports.OnDeleteActionSchema = OnDeleteActionSchema;
1563
1845
  exports.PAGE_BACKGROUND_TOKENS = PAGE_BACKGROUND_TOKENS;
1846
+ exports.PAGE_EXTENSION_ANCHOR_MAIN = PAGE_EXTENSION_ANCHOR_MAIN;
1847
+ exports.PAGE_EXTENSION_ANCHOR_SIDE_PANEL = PAGE_EXTENSION_ANCHOR_SIDE_PANEL;
1564
1848
  exports.PLATFORM_ATTRIBUTE_NAMES = PLATFORM_ATTRIBUTE_NAMES;
1565
1849
  exports.PLATFORM_USER_ID = PLATFORM_USER_ID;
1566
1850
  exports.PageActionSchema = PageActionSchema;
1851
+ exports.PageExtensionPlacementSchema = PageExtensionPlacementSchema;
1852
+ exports.PageExtensionSchema = PageExtensionSchema;
1567
1853
  exports.PageIterator = PageIterator;
1568
1854
  exports.PageLayoutSchema = PageLayoutSchema;
1569
1855
  exports.PageLayoutSidePanelSchema = PageLayoutSidePanelSchema;
@@ -1600,5 +1886,5 @@ exports.parsePrincipalMeta = parsePrincipalMeta;
1600
1886
  exports.parseRelationMeta = parseRelationMeta;
1601
1887
  exports.parseUserMeta = parseUserMeta;
1602
1888
  exports.platformAttributes = platformAttributes;
1603
- //# sourceMappingURL=chunk-RKFXHDVU.cjs.map
1604
- //# sourceMappingURL=chunk-RKFXHDVU.cjs.map
1889
+ //# sourceMappingURL=chunk-WEEC4REL.cjs.map
1890
+ //# sourceMappingURL=chunk-WEEC4REL.cjs.map