@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.mjs CHANGED
@@ -631,6 +631,12 @@ var SysOrganization = ObjectSchema.create({
631
631
  target: "/api/v1/auth/organization/create",
632
632
  successMessage: "Organization created",
633
633
  refreshAfter: true,
634
+ // Hidden when the deployment is provisioned in single-org mode
635
+ // (`OS_MULTI_ORG_ENABLED=false`). `features.multiOrgEnabled` is
636
+ // populated by the console/account shells from `/auth/config`;
637
+ // we default to visible when the flag is undefined so we don't
638
+ // accidentally hide the button while auth config is still loading.
639
+ visible: "features.multiOrgEnabled != false",
634
640
  params: [
635
641
  { field: "name", required: true },
636
642
  { field: "slug", required: true },
@@ -3462,7 +3468,7 @@ var defaultPermissionSets = [
3462
3468
  modifyAllRecords: true
3463
3469
  }
3464
3470
  },
3465
- systemPermissions: ["manage_users", "manage_metadata", "setup.access"]
3471
+ systemPermissions: ["manage_users", "manage_metadata", "setup.access", "studio.access"]
3466
3472
  }),
3467
3473
  PermissionSetSchema.parse({
3468
3474
  name: "member_default",
@@ -5968,6 +5974,44 @@ var SysMetadataObject = ObjectSchema.create({
5968
5974
  apiEnabled: true,
5969
5975
  apiMethods: ["get", "list", "create", "update", "delete"],
5970
5976
  trash: false
5977
+ },
5978
+ // Named list views — power the Setup App "Data Model" group so admins
5979
+ // can browse object/field metadata in a typed grid instead of the raw
5980
+ // `All Metadata` debug surface. Each entry pre-filters by `type` and
5981
+ // shows the columns that matter for that type. The dedicated visual
5982
+ // designer (objectui's <ObjectManager> / <FieldDesigner>) deep-links
5983
+ // from the row's `Edit in Designer` action; the grid stays useful for
5984
+ // search, audit (state / updated_at) and triage.
5985
+ listViews: {
5986
+ only_objects: {
5987
+ type: "grid",
5988
+ name: "only_objects",
5989
+ label: "Objects",
5990
+ data: { provider: "object", object: "sys_metadata" },
5991
+ columns: ["name", "namespace", "scope", "managed_by", "state", "updated_at"],
5992
+ filter: [{ field: "type", operator: "equals", value: "object" }],
5993
+ sort: [{ field: "name", order: "asc" }],
5994
+ pagination: { pageSize: 50 }
5995
+ },
5996
+ only_fields: {
5997
+ type: "grid",
5998
+ name: "only_fields",
5999
+ label: "Fields",
6000
+ data: { provider: "object", object: "sys_metadata" },
6001
+ columns: ["name", "namespace", "scope", "managed_by", "state", "updated_at"],
6002
+ filter: [{ field: "type", operator: "equals", value: "field" }],
6003
+ sort: [{ field: "name", order: "asc" }],
6004
+ pagination: { pageSize: 50 }
6005
+ },
6006
+ all_metadata: {
6007
+ type: "grid",
6008
+ name: "all_metadata",
6009
+ label: "All",
6010
+ data: { provider: "object", object: "sys_metadata" },
6011
+ columns: ["name", "type", "namespace", "scope", "state", "updated_at"],
6012
+ sort: [{ field: "updated_at", order: "desc" }],
6013
+ pagination: { pageSize: 50 }
6014
+ }
5971
6015
  }
5972
6016
  });
5973
6017
  var SysMetadataHistoryObject = ObjectSchema.create({
@@ -6509,6 +6553,36 @@ var SETUP_APP = {
6509
6553
  { id: "nav_system_overview", type: "dashboard", label: "System Overview", dashboardName: "system_overview", icon: "activity" }
6510
6554
  ]
6511
6555
  },
6556
+ {
6557
+ // App Marketplace — browse + install packages. The browse page is
6558
+ // always available: single-environment runtimes use the
6559
+ // `MarketplaceProxy` plugin to browse the remote catalog;
6560
+ // control-plane (cloud) deployments add `sys_package_installation`
6561
+ // to track per-env installs. The "Installed Apps" entry is gated
6562
+ // on that object so it only appears when the catalog backend
6563
+ // exposes installations (i.e. control-plane / multi-tenant).
6564
+ id: "group_apps",
6565
+ type: "group",
6566
+ label: "Apps",
6567
+ icon: "package",
6568
+ children: [
6569
+ {
6570
+ id: "nav_marketplace_browse",
6571
+ type: "url",
6572
+ label: "Browse Marketplace",
6573
+ url: "/apps/setup/system/marketplace",
6574
+ icon: "store"
6575
+ },
6576
+ {
6577
+ id: "nav_marketplace_installed",
6578
+ type: "url",
6579
+ label: "Installed Apps",
6580
+ url: "/apps/setup/system/marketplace/installed",
6581
+ icon: "package-check",
6582
+ requiresObject: "sys_package_installation"
6583
+ }
6584
+ ]
6585
+ },
6512
6586
  {
6513
6587
  id: "group_people_org",
6514
6588
  type: "group",
@@ -6638,18 +6712,272 @@ var SETUP_APP = {
6638
6712
  // from sys_user / org members.
6639
6713
  // - Demoted "All Metadata" from the (now-deleted) Platform group
6640
6714
  // to this Advanced/debug bucket.
6641
- // - The marketplace-only `sys_app` / `sys_package` /
6642
- // `sys_package_installation` menus have been removed entirely;
6643
- // they are contributed by `@objectstack/service-tenant`
6644
- // (control-plane) and are not present in single-environment runtimes.
6715
+ // - The raw `sys_app` / `sys_package` / `sys_package_installation`
6716
+ // object-list menus stay removed (they are control-plane admin
6717
+ // surfaces and live in `cloud-control.app.ts`). End-user
6718
+ // marketplace access lives in the top-level `Apps` group above,
6719
+ // pointing at the React browse/installed pages.
6645
6720
  { id: "nav_oauth_apps", type: "object", label: "OAuth Applications", objectName: "sys_oauth_application", icon: "app-window" },
6646
6721
  { id: "nav_jwks", type: "object", label: "Signing Keys (JWKS)", objectName: "sys_jwks", icon: "key-round" },
6647
6722
  { id: "nav_verifications", type: "object", label: "Verifications", objectName: "sys_verification", icon: "mail-check" },
6648
6723
  { id: "nav_two_factor", type: "object", label: "Two-Factor", objectName: "sys_two_factor", icon: "smartphone" },
6649
6724
  { id: "nav_device_codes", type: "object", label: "Device Codes", objectName: "sys_device_code", icon: "qr-code" },
6650
6725
  { id: "nav_accounts", type: "object", label: "Identity Links", objectName: "sys_account", icon: "link-2" },
6651
- { id: "nav_user_preferences", type: "object", label: "User Preferences", objectName: "sys_user_preference", icon: "sliders" },
6652
- { id: "nav_metadata", type: "object", label: "All Metadata", objectName: "sys_metadata", icon: "file-cog" }
6726
+ { id: "nav_user_preferences", type: "object", label: "User Preferences", objectName: "sys_user_preference", icon: "sliders" }
6727
+ ]
6728
+ }
6729
+ ]
6730
+ };
6731
+
6732
+ // src/apps/studio.app.ts
6733
+ var STUDIO_APP = {
6734
+ name: "studio",
6735
+ label: "Studio",
6736
+ description: "Metadata workbench for developers, analysts, and implementers",
6737
+ icon: "hammer",
6738
+ active: true,
6739
+ isDefault: false,
6740
+ branding: {
6741
+ primaryColor: "#6366f1"
6742
+ // Indigo-500 — distinct from Setup's slate
6743
+ },
6744
+ requiredPermissions: ["studio.access"],
6745
+ navigation: [
6746
+ {
6747
+ id: "group_overview",
6748
+ type: "group",
6749
+ label: "Overview",
6750
+ icon: "layout-dashboard",
6751
+ children: [
6752
+ {
6753
+ id: "nav_metadata_directory",
6754
+ type: "component",
6755
+ label: "All Metadata Types",
6756
+ componentRef: "metadata:directory",
6757
+ icon: "layers"
6758
+ }
6759
+ ]
6760
+ },
6761
+ {
6762
+ // Data Model — schema-design surfaces. Objects are the primary
6763
+ // entry; field management happens in-context on each object's
6764
+ // detail form (master-detail), so no top-level field link.
6765
+ id: "group_data_model",
6766
+ type: "group",
6767
+ label: "Data Model",
6768
+ icon: "database",
6769
+ children: [
6770
+ {
6771
+ id: "nav_objects",
6772
+ type: "component",
6773
+ label: "Objects",
6774
+ componentRef: "metadata:resource",
6775
+ params: { type: "object" },
6776
+ icon: "box"
6777
+ },
6778
+ {
6779
+ id: "nav_validations",
6780
+ type: "component",
6781
+ label: "Validations",
6782
+ componentRef: "metadata:resource",
6783
+ params: { type: "validation" },
6784
+ icon: "check-square"
6785
+ }
6786
+ ]
6787
+ },
6788
+ {
6789
+ // User Experience — the metadata that shapes what end users see.
6790
+ id: "group_ux",
6791
+ type: "group",
6792
+ label: "User Experience",
6793
+ icon: "layout",
6794
+ children: [
6795
+ {
6796
+ id: "nav_apps",
6797
+ type: "component",
6798
+ label: "Apps",
6799
+ componentRef: "metadata:resource",
6800
+ params: { type: "app" },
6801
+ icon: "app-window"
6802
+ },
6803
+ {
6804
+ id: "nav_views",
6805
+ type: "component",
6806
+ label: "Views",
6807
+ componentRef: "metadata:resource",
6808
+ params: { type: "view" },
6809
+ icon: "table"
6810
+ },
6811
+ {
6812
+ id: "nav_pages",
6813
+ type: "component",
6814
+ label: "Pages",
6815
+ componentRef: "metadata:resource",
6816
+ params: { type: "page" },
6817
+ icon: "file-text"
6818
+ },
6819
+ {
6820
+ id: "nav_dashboards",
6821
+ type: "component",
6822
+ label: "Dashboards",
6823
+ componentRef: "metadata:resource",
6824
+ params: { type: "dashboard" },
6825
+ icon: "layout-dashboard"
6826
+ },
6827
+ {
6828
+ id: "nav_reports",
6829
+ type: "component",
6830
+ label: "Reports",
6831
+ componentRef: "metadata:resource",
6832
+ params: { type: "report" },
6833
+ icon: "bar-chart-3"
6834
+ }
6835
+ ]
6836
+ },
6837
+ {
6838
+ // Logic — declarative + scripted business rules.
6839
+ id: "group_logic",
6840
+ type: "group",
6841
+ label: "Logic",
6842
+ icon: "function-square",
6843
+ children: [
6844
+ {
6845
+ id: "nav_actions",
6846
+ type: "component",
6847
+ label: "Actions",
6848
+ componentRef: "metadata:resource",
6849
+ params: { type: "action" },
6850
+ icon: "mouse-pointer-click"
6851
+ },
6852
+ {
6853
+ id: "nav_hooks",
6854
+ type: "component",
6855
+ label: "Hooks",
6856
+ componentRef: "metadata:resource",
6857
+ params: { type: "hook" },
6858
+ icon: "webhook"
6859
+ }
6860
+ ]
6861
+ },
6862
+ {
6863
+ // Automation — flows, declarative workflow rules, approval processes.
6864
+ id: "group_automation",
6865
+ type: "group",
6866
+ label: "Automation",
6867
+ icon: "workflow",
6868
+ children: [
6869
+ {
6870
+ id: "nav_flows",
6871
+ type: "component",
6872
+ label: "Flows",
6873
+ componentRef: "metadata:resource",
6874
+ params: { type: "flow" },
6875
+ icon: "git-branch"
6876
+ },
6877
+ {
6878
+ id: "nav_workflows",
6879
+ type: "component",
6880
+ label: "Workflow Rules",
6881
+ componentRef: "metadata:resource",
6882
+ params: { type: "workflow" },
6883
+ icon: "zap"
6884
+ },
6885
+ {
6886
+ id: "nav_approvals",
6887
+ type: "component",
6888
+ label: "Approval Processes",
6889
+ componentRef: "metadata:resource",
6890
+ params: { type: "approval" },
6891
+ icon: "check-circle"
6892
+ }
6893
+ ]
6894
+ },
6895
+ {
6896
+ // AI — agent/tool/skill metadata. Configured together by the
6897
+ // same team in practice; runtime conversations live in their
6898
+ // own app surface, not here.
6899
+ id: "group_ai",
6900
+ type: "group",
6901
+ label: "AI",
6902
+ icon: "sparkles",
6903
+ children: [
6904
+ {
6905
+ id: "nav_agents",
6906
+ type: "component",
6907
+ label: "Agents",
6908
+ componentRef: "metadata:resource",
6909
+ params: { type: "agent" },
6910
+ icon: "bot"
6911
+ },
6912
+ {
6913
+ id: "nav_tools",
6914
+ type: "component",
6915
+ label: "Tools",
6916
+ componentRef: "metadata:resource",
6917
+ params: { type: "tool" },
6918
+ icon: "wrench"
6919
+ },
6920
+ {
6921
+ id: "nav_skills",
6922
+ type: "component",
6923
+ label: "Skills",
6924
+ componentRef: "metadata:resource",
6925
+ params: { type: "skill" },
6926
+ icon: "brain"
6927
+ }
6928
+ ]
6929
+ },
6930
+ {
6931
+ // Developer — first-party developer tooling surfaces hosted by the
6932
+ // console (API console, flow run inspector, public forms registry).
6933
+ // Registered as built-in components in the console's
6934
+ // ComponentRegistry under the `developer:*` namespace.
6935
+ id: "group_developer",
6936
+ type: "group",
6937
+ label: "Developer",
6938
+ icon: "terminal",
6939
+ children: [
6940
+ {
6941
+ id: "nav_api_console",
6942
+ type: "component",
6943
+ label: "API Console",
6944
+ componentRef: "developer:api-console",
6945
+ icon: "terminal"
6946
+ },
6947
+ {
6948
+ id: "nav_flow_runs",
6949
+ type: "component",
6950
+ label: "Flow Runs",
6951
+ componentRef: "developer:flow-runs",
6952
+ icon: "activity"
6953
+ },
6954
+ {
6955
+ id: "nav_public_forms",
6956
+ type: "component",
6957
+ label: "Public Forms",
6958
+ componentRef: "developer:public-forms",
6959
+ icon: "file-text"
6960
+ }
6961
+ ]
6962
+ },
6963
+ {
6964
+ // Integration — outbound shapes: datasources, email templates,
6965
+ // routes/functions/services live here too once they have CRUD
6966
+ // surfaces. Email templates are a developer artefact (templates
6967
+ // referenced by transactional sends), not a Setup item.
6968
+ id: "group_integration",
6969
+ type: "group",
6970
+ label: "Integration",
6971
+ icon: "plug",
6972
+ children: [
6973
+ {
6974
+ id: "nav_email_templates",
6975
+ type: "component",
6976
+ label: "Email Templates",
6977
+ componentRef: "metadata:resource",
6978
+ params: { type: "email_template" },
6979
+ icon: "mail"
6980
+ }
6653
6981
  ]
6654
6982
  }
6655
6983
  ]
@@ -9718,6 +10046,7 @@ var en = {
9718
10046
  navigation: {
9719
10047
  // Groups
9720
10048
  group_overview: { label: "Overview" },
10049
+ group_apps: { label: "Apps" },
9721
10050
  group_people_org: { label: "People & Organization" },
9722
10051
  group_access_control: { label: "Access Control" },
9723
10052
  group_approvals: { label: "Approvals" },
@@ -9726,6 +10055,9 @@ var en = {
9726
10055
  group_advanced: { label: "Advanced" },
9727
10056
  // Overview
9728
10057
  nav_system_overview: { label: "System Overview" },
10058
+ // Apps / Marketplace
10059
+ nav_marketplace_browse: { label: "Browse Marketplace" },
10060
+ nav_marketplace_installed: { label: "Installed Apps" },
9729
10061
  // People & Organization
9730
10062
  nav_users: { label: "Users" },
9731
10063
  nav_departments: { label: "Departments" },
@@ -12733,6 +13065,9 @@ var zhCN = {
12733
13065
  description: "\u5E73\u53F0\u8BBE\u7F6E\u4E0E\u7BA1\u7406",
12734
13066
  navigation: {
12735
13067
  group_overview: { label: "\u603B\u89C8" },
13068
+ group_apps: { label: "\u5E94\u7528" },
13069
+ nav_marketplace_browse: { label: "\u6D4F\u89C8\u5E94\u7528\u5E02\u573A" },
13070
+ nav_marketplace_installed: { label: "\u5DF2\u5B89\u88C5\u5E94\u7528" },
12736
13071
  group_people_org: { label: "\u4EBA\u5458\u4E0E\u7EC4\u7EC7" },
12737
13072
  group_access_control: { label: "\u8BBF\u95EE\u63A7\u5236" },
12738
13073
  group_approvals: { label: "\u5BA1\u6279" },
@@ -15707,6 +16042,9 @@ var jaJP = {
15707
16042
  description: "\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0\u8A2D\u5B9A\u3068\u7BA1\u7406",
15708
16043
  navigation: {
15709
16044
  group_overview: { label: "\u6982\u8981" },
16045
+ group_apps: { label: "\u30A2\u30D7\u30EA" },
16046
+ nav_marketplace_browse: { label: "\u30DE\u30FC\u30B1\u30C3\u30C8\u30D7\u30EC\u30A4\u30B9\u3092\u95B2\u89A7" },
16047
+ nav_marketplace_installed: { label: "\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u6E08\u307F\u30A2\u30D7\u30EA" },
15710
16048
  group_people_org: { label: "\u30E6\u30FC\u30B6\u30FC\u3068\u7D44\u7E54" },
15711
16049
  group_access_control: { label: "\u30A2\u30AF\u30BB\u30B9\u5236\u5FA1" },
15712
16050
  group_approvals: { label: "\u627F\u8A8D" },
@@ -18681,6 +19019,9 @@ var esES = {
18681
19019
  description: "Configuraci\xF3n y administraci\xF3n de la plataforma",
18682
19020
  navigation: {
18683
19021
  group_overview: { label: "Resumen" },
19022
+ group_apps: { label: "Aplicaciones" },
19023
+ nav_marketplace_browse: { label: "Explorar Marketplace" },
19024
+ nav_marketplace_installed: { label: "Aplicaciones instaladas" },
18684
19025
  group_people_org: { label: "Personas y Organizaci\xF3n" },
18685
19026
  group_access_control: { label: "Control de Acceso" },
18686
19027
  group_approvals: { label: "Aprobaciones" },
@@ -18747,6 +19088,6 @@ var SetupAppTranslations = {
18747
19088
  "es-ES": esES
18748
19089
  };
18749
19090
 
18750
- export { SETUP_APP, SetupAppTranslations, SysAccount, SysActivity, SysApiKey, SysApprovalAction, SysApprovalProcess, SysApprovalRequest, SysAttachment, SysAuditLog, SysComment, SysDepartment, SysDepartmentMember, SysDeviceCode, SysEmail, SysEmailTemplate, SysInvitation, SysJob, SysJobQueue, SysJobRun, SysJwks, SysMember, SysMetadataObject as SysMetadata, SysMetadataHistoryObject, SysMetadataObject, SysNotification, SysOauthAccessToken, SysOauthApplication, SysOauthConsent, SysOauthRefreshToken, SysOrganization, SysPermissionSet, SysPresence, SysRecordShare, SysReportSchedule, SysRole, SysRolePermissionSet, SysSavedReport, SysSecret, SysSession, SysSetting, SysSettingAudit, SysSharingRule, SysTeam, SysTeamMember, SysTwoFactor, SysUser, SysUserPermissionSet, SysUserPreference, SysVerification, SysWebhook, SystemOverviewDashboard, defaultPermissionSets, en, esES, jaJP, zhCN };
19091
+ export { SETUP_APP, STUDIO_APP, SetupAppTranslations, SysAccount, SysActivity, SysApiKey, SysApprovalAction, SysApprovalProcess, SysApprovalRequest, SysAttachment, SysAuditLog, SysComment, SysDepartment, SysDepartmentMember, SysDeviceCode, SysEmail, SysEmailTemplate, SysInvitation, SysJob, SysJobQueue, SysJobRun, SysJwks, SysMember, SysMetadataObject as SysMetadata, SysMetadataHistoryObject, SysMetadataObject, SysNotification, SysOauthAccessToken, SysOauthApplication, SysOauthConsent, SysOauthRefreshToken, SysOrganization, SysPermissionSet, SysPresence, SysRecordShare, SysReportSchedule, SysRole, SysRolePermissionSet, SysSavedReport, SysSecret, SysSession, SysSetting, SysSettingAudit, SysSharingRule, SysTeam, SysTeamMember, SysTwoFactor, SysUser, SysUserPermissionSet, SysUserPreference, SysVerification, SysWebhook, SystemOverviewDashboard, defaultPermissionSets, en, esES, jaJP, zhCN };
18751
19092
  //# sourceMappingURL=index.mjs.map
18752
19093
  //# sourceMappingURL=index.mjs.map