@objectstack/platform-objects 4.2.0 → 5.0.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.
@@ -597,6 +597,12 @@ declare const SysUser: Omit<{
597
597
  recordTypes?: string[] | undefined;
598
598
  sharingModel?: "read" | "full" | "private" | "read_write" | undefined;
599
599
  keyPrefix?: string | undefined;
600
+ detail?: {
601
+ [x: string]: unknown;
602
+ renderViaSchema?: boolean | undefined;
603
+ hideReferenceRail?: boolean | undefined;
604
+ hideRelatedTab?: boolean | undefined;
605
+ } | undefined;
600
606
  actions?: {
601
607
  name: string;
602
608
  label: string;
@@ -3585,6 +3591,12 @@ declare const SysSession: Omit<{
3585
3591
  recordTypes?: string[] | undefined;
3586
3592
  sharingModel?: "read" | "full" | "private" | "read_write" | undefined;
3587
3593
  keyPrefix?: string | undefined;
3594
+ detail?: {
3595
+ [x: string]: unknown;
3596
+ renderViaSchema?: boolean | undefined;
3597
+ hideReferenceRail?: boolean | undefined;
3598
+ hideRelatedTab?: boolean | undefined;
3599
+ } | undefined;
3588
3600
  actions?: {
3589
3601
  name: string;
3590
3602
  label: string;
@@ -6278,6 +6290,12 @@ declare const SysAccount: Omit<{
6278
6290
  recordTypes?: string[] | undefined;
6279
6291
  sharingModel?: "read" | "full" | "private" | "read_write" | undefined;
6280
6292
  keyPrefix?: string | undefined;
6293
+ detail?: {
6294
+ [x: string]: unknown;
6295
+ renderViaSchema?: boolean | undefined;
6296
+ hideReferenceRail?: boolean | undefined;
6297
+ hideRelatedTab?: boolean | undefined;
6298
+ } | undefined;
6281
6299
  actions?: {
6282
6300
  name: string;
6283
6301
  label: string;
@@ -9317,6 +9335,12 @@ declare const SysVerification: Omit<{
9317
9335
  recordTypes?: string[] | undefined;
9318
9336
  sharingModel?: "read" | "full" | "private" | "read_write" | undefined;
9319
9337
  keyPrefix?: string | undefined;
9338
+ detail?: {
9339
+ [x: string]: unknown;
9340
+ renderViaSchema?: boolean | undefined;
9341
+ hideReferenceRail?: boolean | undefined;
9342
+ hideRelatedTab?: boolean | undefined;
9343
+ } | undefined;
9320
9344
  actions?: {
9321
9345
  name: string;
9322
9346
  label: string;
@@ -11066,6 +11090,12 @@ declare const SysOrganization: Omit<{
11066
11090
  recordTypes?: string[] | undefined;
11067
11091
  sharingModel?: "read" | "full" | "private" | "read_write" | undefined;
11068
11092
  keyPrefix?: string | undefined;
11093
+ detail?: {
11094
+ [x: string]: unknown;
11095
+ renderViaSchema?: boolean | undefined;
11096
+ hideReferenceRail?: boolean | undefined;
11097
+ hideRelatedTab?: boolean | undefined;
11098
+ } | undefined;
11069
11099
  actions?: {
11070
11100
  name: string;
11071
11101
  label: string;
@@ -13090,6 +13120,12 @@ declare const SysMember: Omit<{
13090
13120
  recordTypes?: string[] | undefined;
13091
13121
  sharingModel?: "read" | "full" | "private" | "read_write" | undefined;
13092
13122
  keyPrefix?: string | undefined;
13123
+ detail?: {
13124
+ [x: string]: unknown;
13125
+ renderViaSchema?: boolean | undefined;
13126
+ hideReferenceRail?: boolean | undefined;
13127
+ hideRelatedTab?: boolean | undefined;
13128
+ } | undefined;
13093
13129
  actions?: {
13094
13130
  name: string;
13095
13131
  label: string;
@@ -14711,6 +14747,12 @@ declare const SysInvitation: Omit<{
14711
14747
  recordTypes?: string[] | undefined;
14712
14748
  sharingModel?: "read" | "full" | "private" | "read_write" | undefined;
14713
14749
  keyPrefix?: string | undefined;
14750
+ detail?: {
14751
+ [x: string]: unknown;
14752
+ renderViaSchema?: boolean | undefined;
14753
+ hideReferenceRail?: boolean | undefined;
14754
+ hideRelatedTab?: boolean | undefined;
14755
+ } | undefined;
14714
14756
  actions?: {
14715
14757
  name: string;
14716
14758
  label: string;
@@ -17120,6 +17162,12 @@ declare const SysTeam: Omit<{
17120
17162
  recordTypes?: string[] | undefined;
17121
17163
  sharingModel?: "read" | "full" | "private" | "read_write" | undefined;
17122
17164
  keyPrefix?: string | undefined;
17165
+ detail?: {
17166
+ [x: string]: unknown;
17167
+ renderViaSchema?: boolean | undefined;
17168
+ hideReferenceRail?: boolean | undefined;
17169
+ hideRelatedTab?: boolean | undefined;
17170
+ } | undefined;
17123
17171
  actions?: {
17124
17172
  name: string;
17125
17173
  label: string;
@@ -18787,6 +18835,12 @@ declare const SysTeamMember: Omit<{
18787
18835
  recordTypes?: string[] | undefined;
18788
18836
  sharingModel?: "read" | "full" | "private" | "read_write" | undefined;
18789
18837
  keyPrefix?: string | undefined;
18838
+ detail?: {
18839
+ [x: string]: unknown;
18840
+ renderViaSchema?: boolean | undefined;
18841
+ hideReferenceRail?: boolean | undefined;
18842
+ hideRelatedTab?: boolean | undefined;
18843
+ } | undefined;
18790
18844
  actions?: {
18791
18845
  name: string;
18792
18846
  label: string;
@@ -20235,6 +20289,12 @@ declare const SysDepartment: Omit<{
20235
20289
  recordTypes?: string[] | undefined;
20236
20290
  sharingModel?: "read" | "full" | "private" | "read_write" | undefined;
20237
20291
  keyPrefix?: string | undefined;
20292
+ detail?: {
20293
+ [x: string]: unknown;
20294
+ renderViaSchema?: boolean | undefined;
20295
+ hideReferenceRail?: boolean | undefined;
20296
+ hideRelatedTab?: boolean | undefined;
20297
+ } | undefined;
20238
20298
  actions?: {
20239
20299
  name: string;
20240
20300
  label: string;
@@ -23304,6 +23364,12 @@ declare const SysDepartmentMember: Omit<{
23304
23364
  recordTypes?: string[] | undefined;
23305
23365
  sharingModel?: "read" | "full" | "private" | "read_write" | undefined;
23306
23366
  keyPrefix?: string | undefined;
23367
+ detail?: {
23368
+ [x: string]: unknown;
23369
+ renderViaSchema?: boolean | undefined;
23370
+ hideReferenceRail?: boolean | undefined;
23371
+ hideRelatedTab?: boolean | undefined;
23372
+ } | undefined;
23307
23373
  actions?: {
23308
23374
  name: string;
23309
23375
  label: string;
@@ -25579,6 +25645,12 @@ declare const SysApiKey: Omit<{
25579
25645
  recordTypes?: string[] | undefined;
25580
25646
  sharingModel?: "read" | "full" | "private" | "read_write" | undefined;
25581
25647
  keyPrefix?: string | undefined;
25648
+ detail?: {
25649
+ [x: string]: unknown;
25650
+ renderViaSchema?: boolean | undefined;
25651
+ hideReferenceRail?: boolean | undefined;
25652
+ hideRelatedTab?: boolean | undefined;
25653
+ } | undefined;
25582
25654
  actions?: {
25583
25655
  name: string;
25584
25656
  label: string;
@@ -28322,6 +28394,12 @@ declare const SysTwoFactor: Omit<{
28322
28394
  recordTypes?: string[] | undefined;
28323
28395
  sharingModel?: "read" | "full" | "private" | "read_write" | undefined;
28324
28396
  keyPrefix?: string | undefined;
28397
+ detail?: {
28398
+ [x: string]: unknown;
28399
+ renderViaSchema?: boolean | undefined;
28400
+ hideReferenceRail?: boolean | undefined;
28401
+ hideRelatedTab?: boolean | undefined;
28402
+ } | undefined;
28325
28403
  actions?: {
28326
28404
  name: string;
28327
28405
  label: string;
@@ -30149,6 +30227,12 @@ declare const SysDeviceCode: Omit<{
30149
30227
  recordTypes?: string[] | undefined;
30150
30228
  sharingModel?: "read" | "full" | "private" | "read_write" | undefined;
30151
30229
  keyPrefix?: string | undefined;
30230
+ detail?: {
30231
+ [x: string]: unknown;
30232
+ renderViaSchema?: boolean | undefined;
30233
+ hideReferenceRail?: boolean | undefined;
30234
+ hideRelatedTab?: boolean | undefined;
30235
+ } | undefined;
30152
30236
  actions?: {
30153
30237
  name: string;
30154
30238
  label: string;
@@ -32958,6 +33042,12 @@ declare const SysUserPreference: Omit<{
32958
33042
  recordTypes?: string[] | undefined;
32959
33043
  sharingModel?: "read" | "full" | "private" | "read_write" | undefined;
32960
33044
  keyPrefix?: string | undefined;
33045
+ detail?: {
33046
+ [x: string]: unknown;
33047
+ renderViaSchema?: boolean | undefined;
33048
+ hideReferenceRail?: boolean | undefined;
33049
+ hideRelatedTab?: boolean | undefined;
33050
+ } | undefined;
32961
33051
  actions?: {
32962
33052
  name: string;
32963
33053
  label: string;
@@ -34779,6 +34869,12 @@ declare const SysOauthApplication: Omit<{
34779
34869
  recordTypes?: string[] | undefined;
34780
34870
  sharingModel?: "read" | "full" | "private" | "read_write" | undefined;
34781
34871
  keyPrefix?: string | undefined;
34872
+ detail?: {
34873
+ [x: string]: unknown;
34874
+ renderViaSchema?: boolean | undefined;
34875
+ hideReferenceRail?: boolean | undefined;
34876
+ hideRelatedTab?: boolean | undefined;
34877
+ } | undefined;
34782
34878
  actions?: {
34783
34879
  name: string;
34784
34880
  label: string;
@@ -40795,6 +40891,12 @@ declare const SysOauthAccessToken: Omit<{
40795
40891
  recordTypes?: string[] | undefined;
40796
40892
  sharingModel?: "read" | "full" | "private" | "read_write" | undefined;
40797
40893
  keyPrefix?: string | undefined;
40894
+ detail?: {
40895
+ [x: string]: unknown;
40896
+ renderViaSchema?: boolean | undefined;
40897
+ hideReferenceRail?: boolean | undefined;
40898
+ hideRelatedTab?: boolean | undefined;
40899
+ } | undefined;
40798
40900
  actions?: {
40799
40901
  name: string;
40800
40902
  label: string;
@@ -43249,6 +43351,12 @@ declare const SysOauthRefreshToken: Omit<{
43249
43351
  recordTypes?: string[] | undefined;
43250
43352
  sharingModel?: "read" | "full" | "private" | "read_write" | undefined;
43251
43353
  keyPrefix?: string | undefined;
43354
+ detail?: {
43355
+ [x: string]: unknown;
43356
+ renderViaSchema?: boolean | undefined;
43357
+ hideReferenceRail?: boolean | undefined;
43358
+ hideRelatedTab?: boolean | undefined;
43359
+ } | undefined;
43252
43360
  actions?: {
43253
43361
  name: string;
43254
43362
  label: string;
@@ -45878,6 +45986,12 @@ declare const SysOauthConsent: Omit<{
45878
45986
  recordTypes?: string[] | undefined;
45879
45987
  sharingModel?: "read" | "full" | "private" | "read_write" | undefined;
45880
45988
  keyPrefix?: string | undefined;
45989
+ detail?: {
45990
+ [x: string]: unknown;
45991
+ renderViaSchema?: boolean | undefined;
45992
+ hideReferenceRail?: boolean | undefined;
45993
+ hideRelatedTab?: boolean | undefined;
45994
+ } | undefined;
45881
45995
  actions?: {
45882
45996
  name: string;
45883
45997
  label: string;
@@ -47800,6 +47914,12 @@ declare const SysJwks: Omit<{
47800
47914
  recordTypes?: string[] | undefined;
47801
47915
  sharingModel?: "read" | "full" | "private" | "read_write" | undefined;
47802
47916
  keyPrefix?: string | undefined;
47917
+ detail?: {
47918
+ [x: string]: unknown;
47919
+ renderViaSchema?: boolean | undefined;
47920
+ hideReferenceRail?: boolean | undefined;
47921
+ hideRelatedTab?: boolean | undefined;
47922
+ } | undefined;
47803
47923
  actions?: {
47804
47924
  name: string;
47805
47925
  label: string;
package/dist/index.js CHANGED
@@ -5579,11 +5579,11 @@ var SysMetadataObject = data.ObjectSchema.create({
5579
5579
  required: false,
5580
5580
  defaultValue: 1
5581
5581
  }),
5582
- /** Content checksum for change detection */
5582
+ /** Content checksum for change detection (e.g. `sha256:<64 hex>` = 71 chars) */
5583
5583
  checksum: data.Field.text({
5584
5584
  label: "Checksum",
5585
5585
  required: false,
5586
- maxLength: 64
5586
+ maxLength: 71
5587
5587
  }),
5588
5588
  /** Origin of this metadata record */
5589
5589
  source: data.Field.select(["filesystem", "database", "api", "migration"], {
@@ -5650,7 +5650,7 @@ var SysMetadataHistoryObject = data.ObjectSchema.create({
5650
5650
  icon: "history",
5651
5651
  isSystem: true,
5652
5652
  managedBy: "system",
5653
- description: "Version history and audit trail for metadata changes",
5653
+ description: "Durable event log of metadata overlay changes (per-org, append-only)",
5654
5654
  fields: {
5655
5655
  /** Primary Key (UUID) */
5656
5656
  id: data.Field.text({
@@ -5658,11 +5658,24 @@ var SysMetadataHistoryObject = data.ObjectSchema.create({
5658
5658
  required: true,
5659
5659
  readonly: true
5660
5660
  }),
5661
- /** Foreign key to sys_metadata.id */
5662
- metadata_id: data.Field.lookup("sys_metadata", {
5663
- label: "Metadata",
5661
+ /** Per-org monotonic event sequence (durable cursor for replay). */
5662
+ event_seq: data.Field.number({
5663
+ label: "Event Seq",
5664
5664
  required: true,
5665
- readonly: true
5665
+ readonly: true,
5666
+ description: "Per-organization monotonic event log cursor."
5667
+ }),
5668
+ /**
5669
+ * Parent `sys_metadata.id` at insertion time (plain text, no FK).
5670
+ * Null for events whose parent row no longer exists (e.g. some
5671
+ * delete records). Forensic only — joins should go through
5672
+ * `(organization_id, type, name)`.
5673
+ */
5674
+ metadata_id: data.Field.text({
5675
+ label: "Metadata ID",
5676
+ required: false,
5677
+ readonly: true,
5678
+ maxLength: 64
5666
5679
  }),
5667
5680
  /** Machine name (denormalized for easier querying) */
5668
5681
  name: data.Field.text({
@@ -5680,7 +5693,7 @@ var SysMetadataHistoryObject = data.ObjectSchema.create({
5680
5693
  readonly: true,
5681
5694
  maxLength: 100
5682
5695
  }),
5683
- /** Version number at this snapshot */
5696
+ /** Per-(org,type,name) lineage counter at this snapshot. */
5684
5697
  version: data.Field.number({
5685
5698
  label: "Version",
5686
5699
  required: true,
@@ -5692,33 +5705,47 @@ var SysMetadataHistoryObject = data.ObjectSchema.create({
5692
5705
  required: true,
5693
5706
  readonly: true
5694
5707
  }),
5695
- /** Historical metadata snapshot (JSON payload) */
5708
+ /**
5709
+ * Historical metadata snapshot (JSON payload).
5710
+ * Null for `operation_type = 'delete'` — the row carries no body.
5711
+ */
5696
5712
  metadata: data.Field.textarea({
5697
5713
  label: "Metadata",
5698
- required: true,
5714
+ required: false,
5699
5715
  readonly: true,
5700
- description: "JSON-serialized metadata snapshot at this version"
5716
+ description: "JSON-serialized metadata snapshot at this version (null for deletes)."
5701
5717
  }),
5702
- /** SHA-256 checksum of metadata content */
5718
+ /** SHA-256 checksum of metadata content (null for deletes). */
5703
5719
  checksum: data.Field.text({
5704
5720
  label: "Checksum",
5705
- required: true,
5721
+ required: false,
5706
5722
  readonly: true,
5707
- maxLength: 64
5723
+ maxLength: 80
5708
5724
  }),
5709
- /** Checksum of the previous version */
5725
+ /** Checksum of the previous version (null for the first event). */
5710
5726
  previous_checksum: data.Field.text({
5711
5727
  label: "Previous Checksum",
5712
5728
  required: false,
5713
5729
  readonly: true,
5714
- maxLength: 64
5730
+ maxLength: 80
5715
5731
  }),
5716
- /** Human-readable description of changes */
5732
+ /** Human-readable description of changes (= MetadataEvent.message). */
5717
5733
  change_note: data.Field.textarea({
5718
5734
  label: "Change Note",
5719
5735
  required: false,
5720
5736
  readonly: true,
5721
- description: "Description of what changed in this version"
5737
+ description: "Description of what changed in this version."
5738
+ }),
5739
+ /**
5740
+ * Producer of the event ('sys-metadata-repo', 'fs', 'studio',
5741
+ * 'api', …). Defaults to 'sys-metadata-repo' on the canonical
5742
+ * write path; preserved on history() reads as MetadataEvent.source.
5743
+ */
5744
+ source: data.Field.text({
5745
+ label: "Source",
5746
+ required: false,
5747
+ readonly: true,
5748
+ maxLength: 64
5722
5749
  }),
5723
5750
  /** Organization ID for multi-tenant isolation */
5724
5751
  organization_id: data.Field.lookup("sys_organization", {
@@ -5727,15 +5754,7 @@ var SysMetadataHistoryObject = data.ObjectSchema.create({
5727
5754
  readonly: true,
5728
5755
  description: "Organization for multi-tenant isolation."
5729
5756
  }),
5730
- /** Environment ID null = platform-global, set = env-scoped */
5731
- project_id: data.Field.text({
5732
- label: "Environment ID",
5733
- required: false,
5734
- readonly: true,
5735
- maxLength: 255,
5736
- description: "Scopes this history entry to a specific environment."
5737
- }),
5738
- /** User who made this change */
5757
+ /** User who made this change (= MetadataEvent.actor). */
5739
5758
  recorded_by: data.Field.lookup("sys_user", {
5740
5759
  label: "Recorded By",
5741
5760
  required: false,
@@ -5749,21 +5768,18 @@ var SysMetadataHistoryObject = data.ObjectSchema.create({
5749
5768
  })
5750
5769
  },
5751
5770
  indexes: [
5752
- { fields: ["metadata_id", "version"], unique: true },
5753
- { fields: ["metadata_id", "recorded_at"] },
5771
+ { fields: ["organization_id", "event_seq"], unique: true },
5772
+ { fields: ["organization_id", "type", "name", "version"], unique: true },
5773
+ { fields: ["organization_id", "type", "name", "recorded_at"] },
5754
5774
  { fields: ["type", "name"] },
5755
5775
  { fields: ["recorded_at"] },
5756
- { fields: ["operation_type"] },
5757
- { fields: ["organization_id"] },
5758
- { fields: ["project_id"] }
5776
+ { fields: ["operation_type"] }
5759
5777
  ],
5760
5778
  enable: {
5761
5779
  trackHistory: false,
5762
- // Don't track history of history records
5763
5780
  searchable: false,
5764
5781
  apiEnabled: true,
5765
5782
  apiMethods: ["get", "list"],
5766
- // Read-only via API
5767
5783
  trash: false
5768
5784
  }
5769
5785
  });