@objectstack/platform-objects 6.7.0 → 6.8.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.
package/dist/index.d.mts CHANGED
@@ -4,7 +4,7 @@ export { SysActivity, SysApprovalAction, SysApprovalProcess, SysApprovalRequest,
4
4
  export { SysWebhook } from './integration/index.mjs';
5
5
  export { SysMetadata, SysMetadataHistoryObject, SysMetadata as SysMetadataObject } from './metadata/index.mjs';
6
6
  export { SysSecret, SysSetting, SysSettingAudit } from './system/index.mjs';
7
- export { SETUP_APP, SetupAppTranslations, SystemOverviewDashboard, en, esES, jaJP, zhCN } from './apps/index.mjs';
7
+ export { SETUP_APP, STUDIO_APP, SetupAppTranslations, SystemOverviewDashboard, en, esES, jaJP, zhCN } from './apps/index.mjs';
8
8
  import './state-machine.zod-BNanU03M.d-Ek3_yo9P.mjs';
9
9
  import 'zod';
10
10
  import '@objectstack/spec/data';
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ export { SysActivity, SysApprovalAction, SysApprovalProcess, SysApprovalRequest,
4
4
  export { SysWebhook } from './integration/index.js';
5
5
  export { SysMetadata, SysMetadataHistoryObject, SysMetadata as SysMetadataObject } from './metadata/index.js';
6
6
  export { SysSecret, SysSetting, SysSettingAudit } from './system/index.js';
7
- export { SETUP_APP, SetupAppTranslations, SystemOverviewDashboard, en, esES, jaJP, zhCN } from './apps/index.js';
7
+ export { SETUP_APP, STUDIO_APP, SetupAppTranslations, SystemOverviewDashboard, en, esES, jaJP, zhCN } from './apps/index.js';
8
8
  import './state-machine.zod-BNanU03M.d-Ek3_yo9P.js';
9
9
  import 'zod';
10
10
  import '@objectstack/spec/data';
package/dist/index.js CHANGED
@@ -633,6 +633,12 @@ var SysOrganization = data.ObjectSchema.create({
633
633
  target: "/api/v1/auth/organization/create",
634
634
  successMessage: "Organization created",
635
635
  refreshAfter: true,
636
+ // Hidden when the deployment is provisioned in single-org mode
637
+ // (`OS_MULTI_ORG_ENABLED=false`). `features.multiOrgEnabled` is
638
+ // populated by the console/account shells from `/auth/config`;
639
+ // we default to visible when the flag is undefined so we don't
640
+ // accidentally hide the button while auth config is still loading.
641
+ visible: "features.multiOrgEnabled != false",
636
642
  params: [
637
643
  { field: "name", required: true },
638
644
  { field: "slug", required: true },
@@ -3464,7 +3470,7 @@ var defaultPermissionSets = [
3464
3470
  modifyAllRecords: true
3465
3471
  }
3466
3472
  },
3467
- systemPermissions: ["manage_users", "manage_metadata", "setup.access"]
3473
+ systemPermissions: ["manage_users", "manage_metadata", "setup.access", "studio.access"]
3468
3474
  }),
3469
3475
  security.PermissionSetSchema.parse({
3470
3476
  name: "member_default",
@@ -5970,6 +5976,44 @@ var SysMetadataObject = data.ObjectSchema.create({
5970
5976
  apiEnabled: true,
5971
5977
  apiMethods: ["get", "list", "create", "update", "delete"],
5972
5978
  trash: false
5979
+ },
5980
+ // Named list views — power the Setup App "Data Model" group so admins
5981
+ // can browse object/field metadata in a typed grid instead of the raw
5982
+ // `All Metadata` debug surface. Each entry pre-filters by `type` and
5983
+ // shows the columns that matter for that type. The dedicated visual
5984
+ // designer (objectui's <ObjectManager> / <FieldDesigner>) deep-links
5985
+ // from the row's `Edit in Designer` action; the grid stays useful for
5986
+ // search, audit (state / updated_at) and triage.
5987
+ listViews: {
5988
+ only_objects: {
5989
+ type: "grid",
5990
+ name: "only_objects",
5991
+ label: "Objects",
5992
+ data: { provider: "object", object: "sys_metadata" },
5993
+ columns: ["name", "namespace", "scope", "managed_by", "state", "updated_at"],
5994
+ filter: [{ field: "type", operator: "equals", value: "object" }],
5995
+ sort: [{ field: "name", order: "asc" }],
5996
+ pagination: { pageSize: 50 }
5997
+ },
5998
+ only_fields: {
5999
+ type: "grid",
6000
+ name: "only_fields",
6001
+ label: "Fields",
6002
+ data: { provider: "object", object: "sys_metadata" },
6003
+ columns: ["name", "namespace", "scope", "managed_by", "state", "updated_at"],
6004
+ filter: [{ field: "type", operator: "equals", value: "field" }],
6005
+ sort: [{ field: "name", order: "asc" }],
6006
+ pagination: { pageSize: 50 }
6007
+ },
6008
+ all_metadata: {
6009
+ type: "grid",
6010
+ name: "all_metadata",
6011
+ label: "All",
6012
+ data: { provider: "object", object: "sys_metadata" },
6013
+ columns: ["name", "type", "namespace", "scope", "state", "updated_at"],
6014
+ sort: [{ field: "updated_at", order: "desc" }],
6015
+ pagination: { pageSize: 50 }
6016
+ }
5973
6017
  }
5974
6018
  });
5975
6019
  var SysMetadataHistoryObject = data.ObjectSchema.create({
@@ -6511,6 +6555,36 @@ var SETUP_APP = {
6511
6555
  { id: "nav_system_overview", type: "dashboard", label: "System Overview", dashboardName: "system_overview", icon: "activity" }
6512
6556
  ]
6513
6557
  },
6558
+ {
6559
+ // App Marketplace — browse + install packages. The browse page is
6560
+ // always available: single-environment runtimes use the
6561
+ // `MarketplaceProxy` plugin to browse the remote catalog;
6562
+ // control-plane (cloud) deployments add `sys_package_installation`
6563
+ // to track per-env installs. The "Installed Apps" entry is gated
6564
+ // on that object so it only appears when the catalog backend
6565
+ // exposes installations (i.e. control-plane / multi-tenant).
6566
+ id: "group_apps",
6567
+ type: "group",
6568
+ label: "Apps",
6569
+ icon: "package",
6570
+ children: [
6571
+ {
6572
+ id: "nav_marketplace_browse",
6573
+ type: "url",
6574
+ label: "Browse Marketplace",
6575
+ url: "/apps/setup/system/marketplace",
6576
+ icon: "store"
6577
+ },
6578
+ {
6579
+ id: "nav_marketplace_installed",
6580
+ type: "url",
6581
+ label: "Installed Apps",
6582
+ url: "/apps/setup/system/marketplace/installed",
6583
+ icon: "package-check",
6584
+ requiresObject: "sys_package_installation"
6585
+ }
6586
+ ]
6587
+ },
6514
6588
  {
6515
6589
  id: "group_people_org",
6516
6590
  type: "group",
@@ -6640,18 +6714,239 @@ var SETUP_APP = {
6640
6714
  // from sys_user / org members.
6641
6715
  // - Demoted "All Metadata" from the (now-deleted) Platform group
6642
6716
  // to this Advanced/debug bucket.
6643
- // - The marketplace-only `sys_app` / `sys_package` /
6644
- // `sys_package_installation` menus have been removed entirely;
6645
- // they are contributed by `@objectstack/service-tenant`
6646
- // (control-plane) and are not present in single-environment runtimes.
6717
+ // - The raw `sys_app` / `sys_package` / `sys_package_installation`
6718
+ // object-list menus stay removed (they are control-plane admin
6719
+ // surfaces and live in `cloud-control.app.ts`). End-user
6720
+ // marketplace access lives in the top-level `Apps` group above,
6721
+ // pointing at the React browse/installed pages.
6647
6722
  { id: "nav_oauth_apps", type: "object", label: "OAuth Applications", objectName: "sys_oauth_application", icon: "app-window" },
6648
6723
  { id: "nav_jwks", type: "object", label: "Signing Keys (JWKS)", objectName: "sys_jwks", icon: "key-round" },
6649
6724
  { id: "nav_verifications", type: "object", label: "Verifications", objectName: "sys_verification", icon: "mail-check" },
6650
6725
  { id: "nav_two_factor", type: "object", label: "Two-Factor", objectName: "sys_two_factor", icon: "smartphone" },
6651
6726
  { id: "nav_device_codes", type: "object", label: "Device Codes", objectName: "sys_device_code", icon: "qr-code" },
6652
6727
  { id: "nav_accounts", type: "object", label: "Identity Links", objectName: "sys_account", icon: "link-2" },
6653
- { id: "nav_user_preferences", type: "object", label: "User Preferences", objectName: "sys_user_preference", icon: "sliders" },
6654
- { id: "nav_metadata", type: "object", label: "All Metadata", objectName: "sys_metadata", icon: "file-cog" }
6728
+ { id: "nav_user_preferences", type: "object", label: "User Preferences", objectName: "sys_user_preference", icon: "sliders" }
6729
+ ]
6730
+ }
6731
+ ]
6732
+ };
6733
+
6734
+ // src/apps/studio.app.ts
6735
+ var STUDIO_APP = {
6736
+ name: "studio",
6737
+ label: "Studio",
6738
+ description: "Metadata workbench for developers, analysts, and implementers",
6739
+ icon: "hammer",
6740
+ active: true,
6741
+ isDefault: false,
6742
+ branding: {
6743
+ primaryColor: "#6366f1"
6744
+ // Indigo-500 — distinct from Setup's slate
6745
+ },
6746
+ requiredPermissions: ["studio.access"],
6747
+ navigation: [
6748
+ {
6749
+ id: "group_overview",
6750
+ type: "group",
6751
+ label: "Overview",
6752
+ icon: "layout-dashboard",
6753
+ children: [
6754
+ {
6755
+ id: "nav_metadata_directory",
6756
+ type: "component",
6757
+ label: "All Metadata Types",
6758
+ componentRef: "metadata:directory",
6759
+ icon: "layers"
6760
+ }
6761
+ ]
6762
+ },
6763
+ {
6764
+ // Data Model — schema-design surfaces. Objects are the primary
6765
+ // entry; field management happens in-context on each object's
6766
+ // detail form (master-detail), so no top-level field link.
6767
+ id: "group_data_model",
6768
+ type: "group",
6769
+ label: "Data Model",
6770
+ icon: "database",
6771
+ children: [
6772
+ {
6773
+ id: "nav_objects",
6774
+ type: "component",
6775
+ label: "Objects",
6776
+ componentRef: "metadata:resource",
6777
+ params: { type: "object" },
6778
+ icon: "box"
6779
+ },
6780
+ {
6781
+ id: "nav_validations",
6782
+ type: "component",
6783
+ label: "Validations",
6784
+ componentRef: "metadata:resource",
6785
+ params: { type: "validation" },
6786
+ icon: "check-square"
6787
+ }
6788
+ ]
6789
+ },
6790
+ {
6791
+ // User Experience — the metadata that shapes what end users see.
6792
+ id: "group_ux",
6793
+ type: "group",
6794
+ label: "User Experience",
6795
+ icon: "layout",
6796
+ children: [
6797
+ {
6798
+ id: "nav_apps",
6799
+ type: "component",
6800
+ label: "Apps",
6801
+ componentRef: "metadata:resource",
6802
+ params: { type: "app" },
6803
+ icon: "app-window"
6804
+ },
6805
+ {
6806
+ id: "nav_views",
6807
+ type: "component",
6808
+ label: "Views",
6809
+ componentRef: "metadata:resource",
6810
+ params: { type: "view" },
6811
+ icon: "table"
6812
+ },
6813
+ {
6814
+ id: "nav_pages",
6815
+ type: "component",
6816
+ label: "Pages",
6817
+ componentRef: "metadata:resource",
6818
+ params: { type: "page" },
6819
+ icon: "file-text"
6820
+ },
6821
+ {
6822
+ id: "nav_dashboards",
6823
+ type: "component",
6824
+ label: "Dashboards",
6825
+ componentRef: "metadata:resource",
6826
+ params: { type: "dashboard" },
6827
+ icon: "layout-dashboard"
6828
+ },
6829
+ {
6830
+ id: "nav_reports",
6831
+ type: "component",
6832
+ label: "Reports",
6833
+ componentRef: "metadata:resource",
6834
+ params: { type: "report" },
6835
+ icon: "bar-chart-3"
6836
+ }
6837
+ ]
6838
+ },
6839
+ {
6840
+ // Logic — declarative + scripted business rules.
6841
+ id: "group_logic",
6842
+ type: "group",
6843
+ label: "Logic",
6844
+ icon: "function-square",
6845
+ children: [
6846
+ {
6847
+ id: "nav_actions",
6848
+ type: "component",
6849
+ label: "Actions",
6850
+ componentRef: "metadata:resource",
6851
+ params: { type: "action" },
6852
+ icon: "mouse-pointer-click"
6853
+ },
6854
+ {
6855
+ id: "nav_hooks",
6856
+ type: "component",
6857
+ label: "Hooks",
6858
+ componentRef: "metadata:resource",
6859
+ params: { type: "hook" },
6860
+ icon: "webhook"
6861
+ }
6862
+ ]
6863
+ },
6864
+ {
6865
+ // Automation — flows, declarative workflow rules, approval processes.
6866
+ id: "group_automation",
6867
+ type: "group",
6868
+ label: "Automation",
6869
+ icon: "workflow",
6870
+ children: [
6871
+ {
6872
+ id: "nav_flows",
6873
+ type: "component",
6874
+ label: "Flows",
6875
+ componentRef: "metadata:resource",
6876
+ params: { type: "flow" },
6877
+ icon: "git-branch"
6878
+ },
6879
+ {
6880
+ id: "nav_workflows",
6881
+ type: "component",
6882
+ label: "Workflow Rules",
6883
+ componentRef: "metadata:resource",
6884
+ params: { type: "workflow" },
6885
+ icon: "zap"
6886
+ },
6887
+ {
6888
+ id: "nav_approvals",
6889
+ type: "component",
6890
+ label: "Approval Processes",
6891
+ componentRef: "metadata:resource",
6892
+ params: { type: "approval" },
6893
+ icon: "check-circle"
6894
+ }
6895
+ ]
6896
+ },
6897
+ {
6898
+ // AI — agent/tool/skill metadata. Configured together by the
6899
+ // same team in practice; runtime conversations live in their
6900
+ // own app surface, not here.
6901
+ id: "group_ai",
6902
+ type: "group",
6903
+ label: "AI",
6904
+ icon: "sparkles",
6905
+ children: [
6906
+ {
6907
+ id: "nav_agents",
6908
+ type: "component",
6909
+ label: "Agents",
6910
+ componentRef: "metadata:resource",
6911
+ params: { type: "agent" },
6912
+ icon: "bot"
6913
+ },
6914
+ {
6915
+ id: "nav_tools",
6916
+ type: "component",
6917
+ label: "Tools",
6918
+ componentRef: "metadata:resource",
6919
+ params: { type: "tool" },
6920
+ icon: "wrench"
6921
+ },
6922
+ {
6923
+ id: "nav_skills",
6924
+ type: "component",
6925
+ label: "Skills",
6926
+ componentRef: "metadata:resource",
6927
+ params: { type: "skill" },
6928
+ icon: "brain"
6929
+ }
6930
+ ]
6931
+ },
6932
+ {
6933
+ // Integration — outbound shapes: datasources, email templates,
6934
+ // routes/functions/services live here too once they have CRUD
6935
+ // surfaces. Email templates are a developer artefact (templates
6936
+ // referenced by transactional sends), not a Setup item.
6937
+ id: "group_integration",
6938
+ type: "group",
6939
+ label: "Integration",
6940
+ icon: "plug",
6941
+ children: [
6942
+ {
6943
+ id: "nav_email_templates",
6944
+ type: "component",
6945
+ label: "Email Templates",
6946
+ componentRef: "metadata:resource",
6947
+ params: { type: "email_template" },
6948
+ icon: "mail"
6949
+ }
6655
6950
  ]
6656
6951
  }
6657
6952
  ]
@@ -9720,6 +10015,7 @@ var en = {
9720
10015
  navigation: {
9721
10016
  // Groups
9722
10017
  group_overview: { label: "Overview" },
10018
+ group_apps: { label: "Apps" },
9723
10019
  group_people_org: { label: "People & Organization" },
9724
10020
  group_access_control: { label: "Access Control" },
9725
10021
  group_approvals: { label: "Approvals" },
@@ -9728,6 +10024,9 @@ var en = {
9728
10024
  group_advanced: { label: "Advanced" },
9729
10025
  // Overview
9730
10026
  nav_system_overview: { label: "System Overview" },
10027
+ // Apps / Marketplace
10028
+ nav_marketplace_browse: { label: "Browse Marketplace" },
10029
+ nav_marketplace_installed: { label: "Installed Apps" },
9731
10030
  // People & Organization
9732
10031
  nav_users: { label: "Users" },
9733
10032
  nav_departments: { label: "Departments" },
@@ -12735,6 +13034,9 @@ var zhCN = {
12735
13034
  description: "\u5E73\u53F0\u8BBE\u7F6E\u4E0E\u7BA1\u7406",
12736
13035
  navigation: {
12737
13036
  group_overview: { label: "\u603B\u89C8" },
13037
+ group_apps: { label: "\u5E94\u7528" },
13038
+ nav_marketplace_browse: { label: "\u6D4F\u89C8\u5E94\u7528\u5E02\u573A" },
13039
+ nav_marketplace_installed: { label: "\u5DF2\u5B89\u88C5\u5E94\u7528" },
12738
13040
  group_people_org: { label: "\u4EBA\u5458\u4E0E\u7EC4\u7EC7" },
12739
13041
  group_access_control: { label: "\u8BBF\u95EE\u63A7\u5236" },
12740
13042
  group_approvals: { label: "\u5BA1\u6279" },
@@ -15709,6 +16011,9 @@ var jaJP = {
15709
16011
  description: "\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0\u8A2D\u5B9A\u3068\u7BA1\u7406",
15710
16012
  navigation: {
15711
16013
  group_overview: { label: "\u6982\u8981" },
16014
+ group_apps: { label: "\u30A2\u30D7\u30EA" },
16015
+ nav_marketplace_browse: { label: "\u30DE\u30FC\u30B1\u30C3\u30C8\u30D7\u30EC\u30A4\u30B9\u3092\u95B2\u89A7" },
16016
+ nav_marketplace_installed: { label: "\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u6E08\u307F\u30A2\u30D7\u30EA" },
15712
16017
  group_people_org: { label: "\u30E6\u30FC\u30B6\u30FC\u3068\u7D44\u7E54" },
15713
16018
  group_access_control: { label: "\u30A2\u30AF\u30BB\u30B9\u5236\u5FA1" },
15714
16019
  group_approvals: { label: "\u627F\u8A8D" },
@@ -18683,6 +18988,9 @@ var esES = {
18683
18988
  description: "Configuraci\xF3n y administraci\xF3n de la plataforma",
18684
18989
  navigation: {
18685
18990
  group_overview: { label: "Resumen" },
18991
+ group_apps: { label: "Aplicaciones" },
18992
+ nav_marketplace_browse: { label: "Explorar Marketplace" },
18993
+ nav_marketplace_installed: { label: "Aplicaciones instaladas" },
18686
18994
  group_people_org: { label: "Personas y Organizaci\xF3n" },
18687
18995
  group_access_control: { label: "Control de Acceso" },
18688
18996
  group_approvals: { label: "Aprobaciones" },
@@ -18750,6 +19058,7 @@ var SetupAppTranslations = {
18750
19058
  };
18751
19059
 
18752
19060
  exports.SETUP_APP = SETUP_APP;
19061
+ exports.STUDIO_APP = STUDIO_APP;
18753
19062
  exports.SetupAppTranslations = SetupAppTranslations;
18754
19063
  exports.SysAccount = SysAccount;
18755
19064
  exports.SysActivity = SysActivity;