@objectstack/platform-objects 7.0.0 → 7.1.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.js CHANGED
@@ -2397,7 +2397,7 @@ var SysOauthApplication = data.ObjectSchema.create({
2397
2397
  locations: ["list_toolbar"],
2398
2398
  type: "api",
2399
2399
  method: "POST",
2400
- target: "/api/v1/auth/oauth2/register",
2400
+ target: "/api/v1/auth/sys-oauth-application/register",
2401
2401
  refreshAfter: true,
2402
2402
  params: [
2403
2403
  { name: "name", label: "Application Name", type: "text", required: true },
@@ -4206,6 +4206,16 @@ var defaultPermissionSets = [
4206
4206
  operation: "all",
4207
4207
  using: "user_id = current_user.id"
4208
4208
  },
4209
+ // OAuth applications a user has registered themselves (self-service
4210
+ // developer flow exposed in the Account app's Developer section).
4211
+ // `sys_oauth_application` has no `organization_id` so the wildcard
4212
+ // `tenant_isolation` policy would otherwise deny every row.
4213
+ {
4214
+ name: "sys_oauth_application_self",
4215
+ object: "sys_oauth_application",
4216
+ operation: "all",
4217
+ using: "user_id = current_user.id"
4218
+ },
4209
4219
  // Org-scoped visibility for organization-owned identity-adjacent
4210
4220
  // tables. Org admins may inspect their own org's invitations and
4211
4221
  // memberships (read; writes still flow through better-auth).
@@ -4358,6 +4368,16 @@ var defaultPermissionSets = [
4358
4368
  object: "sys_oauth_consent",
4359
4369
  operation: "all",
4360
4370
  using: "user_id = current_user.id"
4371
+ },
4372
+ // OAuth applications a user has registered themselves (Account →
4373
+ // Developer → OAuth Applications). `sys_oauth_application` has no
4374
+ // `organization_id`, so without this carve-out the wildcard
4375
+ // `tenant_isolation` policy returns zero rows even for the owner.
4376
+ {
4377
+ name: "sys_oauth_application_self",
4378
+ object: "sys_oauth_application",
4379
+ operation: "all",
4380
+ using: "user_id = current_user.id"
4361
4381
  }
4362
4382
  ]
4363
4383
  }),
@@ -7787,21 +7807,20 @@ var ACCOUNT_APP = {
7787
7807
  // manage their own 2FA / linked accounts / personal OAuth apps. RLS on
7788
7808
  // each object scopes rows to the caller.
7789
7809
  navigation: [
7790
- // Profile is the canonical landing — name, email, avatar, verification
7791
- // status. Uses `type: 'object' + recordId: '{current_user_id}'` so it
7792
- // resolves to the sys_user record page; the slotted SysUserDetailPage
7793
- // (kind: 'slotted', isDefault: true) tailors that page into a proper
7794
- // self-service profile (highlight chips, grouped detail sections, no
7795
- // Discussion thread) without losing the record-context features
7796
- // (related lists, header actions, RLS-aware edit).
7810
+ // Profile is the canonical landing — a hand-written React settings card
7811
+ // (Vercel/Linear style) registered in the Console SPA as
7812
+ // `account:profile_card`. The renderer reads the current user via
7813
+ // `useAuth()` and writes via `client.auth.updateUser`, so there is no
7814
+ // sys_user record context here this is intentional. The admin-facing
7815
+ // sys_user record page (see `pages/sys-user.page.ts`) stays focused on
7816
+ // record browsing (Identity/Audit fields, related lists, admin actions)
7817
+ // and is reached through Setup, never from the Account App.
7797
7818
  {
7798
7819
  id: "nav_account_profile",
7799
- type: "object",
7820
+ type: "component",
7800
7821
  label: "Profile",
7801
- objectName: "sys_user",
7802
- recordId: "{current_user_id}",
7803
- icon: "user-circle",
7804
- requiresObject: "sys_user"
7822
+ componentRef: "account:profile_card",
7823
+ icon: "user-circle"
7805
7824
  },
7806
7825
  // --- Inbox & work assigned to me -----------------------------------
7807
7826
  // Notifications, approvals waiting on me, and the orgs I belong to.
@@ -7905,16 +7924,14 @@ var ACCOUNT_APP = {
7905
7924
  requiresObject: "sys_oauth_application"
7906
7925
  }
7907
7926
  ]
7908
- },
7909
- {
7910
- id: "nav_account_preferences",
7911
- type: "object",
7912
- label: "Preferences",
7913
- objectName: "sys_user_preference",
7914
- viewName: "mine",
7915
- icon: "sliders-horizontal",
7916
- requiresObject: "sys_user_preference"
7917
7927
  }
7928
+ // Note: `sys_user_preference` is intentionally NOT exposed in the
7929
+ // Account App. It's an internal key-value store the UI uses for state
7930
+ // like `ui.recent`, `ui.favorites`, theme, sidebar collapse — not
7931
+ // a user-curatable settings surface. A future
7932
+ // `account:preferences_card` React component should provide the
7933
+ // curated theme / locale / timezone / notifications toggles when we
7934
+ // need them; until then there is no nav entry.
7918
7935
  ]
7919
7936
  };
7920
7937
  var SystemOverviewDashboard = ui.Dashboard.create({
@@ -11133,8 +11150,7 @@ var en = {
11133
11150
  nav_account_linked: { label: "Linked Accounts" },
11134
11151
  nav_account_sessions: { label: "Active Sessions" },
11135
11152
  nav_account_api_keys: { label: "API Keys" },
11136
- nav_account_oauth_apps: { label: "OAuth Applications" },
11137
- nav_account_preferences: { label: "Preferences" }
11153
+ nav_account_oauth_apps: { label: "OAuth Applications" }
11138
11154
  }
11139
11155
  },
11140
11156
  setup: {
@@ -14345,8 +14361,7 @@ var zhCN = {
14345
14361
  nav_account_linked: { label: "\u5DF2\u5173\u8054\u8D26\u6237" },
14346
14362
  nav_account_sessions: { label: "\u6D3B\u52A8\u4F1A\u8BDD" },
14347
14363
  nav_account_api_keys: { label: "API \u5BC6\u94A5" },
14348
- nav_account_oauth_apps: { label: "OAuth \u5E94\u7528" },
14349
- nav_account_preferences: { label: "\u504F\u597D\u8BBE\u7F6E" }
14364
+ nav_account_oauth_apps: { label: "OAuth \u5E94\u7528" }
14350
14365
  }
14351
14366
  },
14352
14367
  setup: {
@@ -17518,8 +17533,7 @@ var jaJP = {
17518
17533
  nav_account_linked: { label: "\u9023\u643A\u30A2\u30AB\u30A6\u30F3\u30C8" },
17519
17534
  nav_account_sessions: { label: "\u30A2\u30AF\u30C6\u30A3\u30D6\u30BB\u30C3\u30B7\u30E7\u30F3" },
17520
17535
  nav_account_api_keys: { label: "API \u30AD\u30FC" },
17521
- nav_account_oauth_apps: { label: "OAuth \u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3" },
17522
- nav_account_preferences: { label: "\u74B0\u5883\u8A2D\u5B9A" }
17536
+ nav_account_oauth_apps: { label: "OAuth \u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3" }
17523
17537
  }
17524
17538
  },
17525
17539
  setup: {
@@ -20691,8 +20705,7 @@ var esES = {
20691
20705
  nav_account_linked: { label: "Cuentas vinculadas" },
20692
20706
  nav_account_sessions: { label: "Sesiones activas" },
20693
20707
  nav_account_api_keys: { label: "Claves API" },
20694
- nav_account_oauth_apps: { label: "Aplicaciones OAuth" },
20695
- nav_account_preferences: { label: "Preferencias" }
20708
+ nav_account_oauth_apps: { label: "Aplicaciones OAuth" }
20696
20709
  }
20697
20710
  },
20698
20711
  setup: {