@objectstack/platform-objects 4.2.0 → 5.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.
@@ -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,12 @@ 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."
5666
5667
  }),
5667
5668
  /** Machine name (denormalized for easier querying) */
5668
5669
  name: data.Field.text({
@@ -5680,7 +5681,7 @@ var SysMetadataHistoryObject = data.ObjectSchema.create({
5680
5681
  readonly: true,
5681
5682
  maxLength: 100
5682
5683
  }),
5683
- /** Version number at this snapshot */
5684
+ /** Per-(org,type,name) lineage counter at this snapshot. */
5684
5685
  version: data.Field.number({
5685
5686
  label: "Version",
5686
5687
  required: true,
@@ -5692,33 +5693,47 @@ var SysMetadataHistoryObject = data.ObjectSchema.create({
5692
5693
  required: true,
5693
5694
  readonly: true
5694
5695
  }),
5695
- /** Historical metadata snapshot (JSON payload) */
5696
+ /**
5697
+ * Historical metadata snapshot (JSON payload).
5698
+ * Null for `operation_type = 'delete'` — the row carries no body.
5699
+ */
5696
5700
  metadata: data.Field.textarea({
5697
5701
  label: "Metadata",
5698
- required: true,
5702
+ required: false,
5699
5703
  readonly: true,
5700
- description: "JSON-serialized metadata snapshot at this version"
5704
+ description: "JSON-serialized metadata snapshot at this version (null for deletes)."
5701
5705
  }),
5702
- /** SHA-256 checksum of metadata content */
5706
+ /** SHA-256 checksum of metadata content (null for deletes). */
5703
5707
  checksum: data.Field.text({
5704
5708
  label: "Checksum",
5705
- required: true,
5709
+ required: false,
5706
5710
  readonly: true,
5707
- maxLength: 64
5711
+ maxLength: 80
5708
5712
  }),
5709
- /** Checksum of the previous version */
5713
+ /** Checksum of the previous version (null for the first event). */
5710
5714
  previous_checksum: data.Field.text({
5711
5715
  label: "Previous Checksum",
5712
5716
  required: false,
5713
5717
  readonly: true,
5714
- maxLength: 64
5718
+ maxLength: 80
5715
5719
  }),
5716
- /** Human-readable description of changes */
5720
+ /** Human-readable description of changes (= MetadataEvent.message). */
5717
5721
  change_note: data.Field.textarea({
5718
5722
  label: "Change Note",
5719
5723
  required: false,
5720
5724
  readonly: true,
5721
- description: "Description of what changed in this version"
5725
+ description: "Description of what changed in this version."
5726
+ }),
5727
+ /**
5728
+ * Producer of the event ('sys-metadata-repo', 'fs', 'studio',
5729
+ * 'api', …). Defaults to 'sys-metadata-repo' on the canonical
5730
+ * write path; preserved on history() reads as MetadataEvent.source.
5731
+ */
5732
+ source: data.Field.text({
5733
+ label: "Source",
5734
+ required: false,
5735
+ readonly: true,
5736
+ maxLength: 64
5722
5737
  }),
5723
5738
  /** Organization ID for multi-tenant isolation */
5724
5739
  organization_id: data.Field.lookup("sys_organization", {
@@ -5727,15 +5742,7 @@ var SysMetadataHistoryObject = data.ObjectSchema.create({
5727
5742
  readonly: true,
5728
5743
  description: "Organization for multi-tenant isolation."
5729
5744
  }),
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 */
5745
+ /** User who made this change (= MetadataEvent.actor). */
5739
5746
  recorded_by: data.Field.lookup("sys_user", {
5740
5747
  label: "Recorded By",
5741
5748
  required: false,
@@ -5749,21 +5756,21 @@ var SysMetadataHistoryObject = data.ObjectSchema.create({
5749
5756
  })
5750
5757
  },
5751
5758
  indexes: [
5752
- { fields: ["metadata_id", "version"], unique: true },
5753
- { fields: ["metadata_id", "recorded_at"] },
5759
+ { fields: ["organization_id", "event_seq"], unique: true },
5760
+ { fields: ["organization_id", "type", "name", "version"], unique: true },
5761
+ { fields: ["organization_id", "type", "name", "recorded_at"] },
5762
+ // ADR-0009: getByHash() lookup — execution-pinned types resolve a
5763
+ // historical body by content hash via this index.
5764
+ { fields: ["organization_id", "type", "name", "checksum"] },
5754
5765
  { fields: ["type", "name"] },
5755
5766
  { fields: ["recorded_at"] },
5756
- { fields: ["operation_type"] },
5757
- { fields: ["organization_id"] },
5758
- { fields: ["project_id"] }
5767
+ { fields: ["operation_type"] }
5759
5768
  ],
5760
5769
  enable: {
5761
5770
  trackHistory: false,
5762
- // Don't track history of history records
5763
5771
  searchable: false,
5764
5772
  apiEnabled: true,
5765
5773
  apiMethods: ["get", "list"],
5766
- // Read-only via API
5767
5774
  trash: false
5768
5775
  }
5769
5776
  });
@@ -9249,9 +9256,6 @@ var enObjects = {
9249
9256
  id: {
9250
9257
  label: "ID"
9251
9258
  },
9252
- metadata_id: {
9253
- label: "Metadata"
9254
- },
9255
9259
  name: {
9256
9260
  label: "Name"
9257
9261
  },
@@ -12291,9 +12295,6 @@ var zhCNObjects = {
12291
12295
  id: {
12292
12296
  label: "ID"
12293
12297
  },
12294
- metadata_id: {
12295
- label: "\u5143\u6570\u636E"
12296
- },
12297
12298
  name: {
12298
12299
  label: "\u540D\u79F0"
12299
12300
  },
@@ -15279,9 +15280,6 @@ var jaJPObjects = {
15279
15280
  id: {
15280
15281
  label: "ID"
15281
15282
  },
15282
- metadata_id: {
15283
- label: "\u30E1\u30BF\u30C7\u30FC\u30BF"
15284
- },
15285
15283
  name: {
15286
15284
  label: "\u540D\u524D"
15287
15285
  },
@@ -18267,9 +18265,6 @@ var esESObjects = {
18267
18265
  id: {
18268
18266
  label: "ID"
18269
18267
  },
18270
- metadata_id: {
18271
- label: "Metadatos"
18272
- },
18273
18268
  name: {
18274
18269
  label: "Nombre"
18275
18270
  },