@objectstack/platform-objects 6.7.1 → 6.8.1

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,272 @@ 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
+ // Developer — first-party developer tooling surfaces hosted by the
6934
+ // console (API console, flow run inspector, public forms registry).
6935
+ // Registered as built-in components in the console's
6936
+ // ComponentRegistry under the `developer:*` namespace.
6937
+ id: "group_developer",
6938
+ type: "group",
6939
+ label: "Developer",
6940
+ icon: "terminal",
6941
+ children: [
6942
+ {
6943
+ id: "nav_api_console",
6944
+ type: "component",
6945
+ label: "API Console",
6946
+ componentRef: "developer:api-console",
6947
+ icon: "terminal"
6948
+ },
6949
+ {
6950
+ id: "nav_flow_runs",
6951
+ type: "component",
6952
+ label: "Flow Runs",
6953
+ componentRef: "developer:flow-runs",
6954
+ icon: "activity"
6955
+ },
6956
+ {
6957
+ id: "nav_public_forms",
6958
+ type: "component",
6959
+ label: "Public Forms",
6960
+ componentRef: "developer:public-forms",
6961
+ icon: "file-text"
6962
+ }
6963
+ ]
6964
+ },
6965
+ {
6966
+ // Integration — outbound shapes: datasources, email templates,
6967
+ // routes/functions/services live here too once they have CRUD
6968
+ // surfaces. Email templates are a developer artefact (templates
6969
+ // referenced by transactional sends), not a Setup item.
6970
+ id: "group_integration",
6971
+ type: "group",
6972
+ label: "Integration",
6973
+ icon: "plug",
6974
+ children: [
6975
+ {
6976
+ id: "nav_email_templates",
6977
+ type: "component",
6978
+ label: "Email Templates",
6979
+ componentRef: "metadata:resource",
6980
+ params: { type: "email_template" },
6981
+ icon: "mail"
6982
+ }
6655
6983
  ]
6656
6984
  }
6657
6985
  ]
@@ -9720,6 +10048,7 @@ var en = {
9720
10048
  navigation: {
9721
10049
  // Groups
9722
10050
  group_overview: { label: "Overview" },
10051
+ group_apps: { label: "Apps" },
9723
10052
  group_people_org: { label: "People & Organization" },
9724
10053
  group_access_control: { label: "Access Control" },
9725
10054
  group_approvals: { label: "Approvals" },
@@ -9728,6 +10057,9 @@ var en = {
9728
10057
  group_advanced: { label: "Advanced" },
9729
10058
  // Overview
9730
10059
  nav_system_overview: { label: "System Overview" },
10060
+ // Apps / Marketplace
10061
+ nav_marketplace_browse: { label: "Browse Marketplace" },
10062
+ nav_marketplace_installed: { label: "Installed Apps" },
9731
10063
  // People & Organization
9732
10064
  nav_users: { label: "Users" },
9733
10065
  nav_departments: { label: "Departments" },
@@ -12735,6 +13067,9 @@ var zhCN = {
12735
13067
  description: "\u5E73\u53F0\u8BBE\u7F6E\u4E0E\u7BA1\u7406",
12736
13068
  navigation: {
12737
13069
  group_overview: { label: "\u603B\u89C8" },
13070
+ group_apps: { label: "\u5E94\u7528" },
13071
+ nav_marketplace_browse: { label: "\u6D4F\u89C8\u5E94\u7528\u5E02\u573A" },
13072
+ nav_marketplace_installed: { label: "\u5DF2\u5B89\u88C5\u5E94\u7528" },
12738
13073
  group_people_org: { label: "\u4EBA\u5458\u4E0E\u7EC4\u7EC7" },
12739
13074
  group_access_control: { label: "\u8BBF\u95EE\u63A7\u5236" },
12740
13075
  group_approvals: { label: "\u5BA1\u6279" },
@@ -15709,6 +16044,9 @@ var jaJP = {
15709
16044
  description: "\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0\u8A2D\u5B9A\u3068\u7BA1\u7406",
15710
16045
  navigation: {
15711
16046
  group_overview: { label: "\u6982\u8981" },
16047
+ group_apps: { label: "\u30A2\u30D7\u30EA" },
16048
+ nav_marketplace_browse: { label: "\u30DE\u30FC\u30B1\u30C3\u30C8\u30D7\u30EC\u30A4\u30B9\u3092\u95B2\u89A7" },
16049
+ nav_marketplace_installed: { label: "\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u6E08\u307F\u30A2\u30D7\u30EA" },
15712
16050
  group_people_org: { label: "\u30E6\u30FC\u30B6\u30FC\u3068\u7D44\u7E54" },
15713
16051
  group_access_control: { label: "\u30A2\u30AF\u30BB\u30B9\u5236\u5FA1" },
15714
16052
  group_approvals: { label: "\u627F\u8A8D" },
@@ -18683,6 +19021,9 @@ var esES = {
18683
19021
  description: "Configuraci\xF3n y administraci\xF3n de la plataforma",
18684
19022
  navigation: {
18685
19023
  group_overview: { label: "Resumen" },
19024
+ group_apps: { label: "Aplicaciones" },
19025
+ nav_marketplace_browse: { label: "Explorar Marketplace" },
19026
+ nav_marketplace_installed: { label: "Aplicaciones instaladas" },
18686
19027
  group_people_org: { label: "Personas y Organizaci\xF3n" },
18687
19028
  group_access_control: { label: "Control de Acceso" },
18688
19029
  group_approvals: { label: "Aprobaciones" },
@@ -18750,6 +19091,7 @@ var SetupAppTranslations = {
18750
19091
  };
18751
19092
 
18752
19093
  exports.SETUP_APP = SETUP_APP;
19094
+ exports.STUDIO_APP = STUDIO_APP;
18753
19095
  exports.SetupAppTranslations = SetupAppTranslations;
18754
19096
  exports.SysAccount = SysAccount;
18755
19097
  exports.SysActivity = SysActivity;