@memberjunction/core-entities 5.22.0 → 5.24.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.
@@ -985,6 +985,56 @@ export const MJAIAgentCategorySchema = z.object({
985
985
  * * Display Name: Root Parent
986
986
  * * SQL Data Type: uniqueidentifier`),
987
987
  });
988
+ /**
989
+ * zod schema definition for the entity MJ: AI Agent Client Tools
990
+ */
991
+ export const MJAIAgentClientToolSchema = z.object({
992
+ ID: z.string().describe(`
993
+ * * Field Name: ID
994
+ * * Display Name: ID
995
+ * * SQL Data Type: uniqueidentifier
996
+ * * Default Value: newsequentialid()`),
997
+ AgentID: z.string().describe(`
998
+ * * Field Name: AgentID
999
+ * * Display Name: Agent
1000
+ * * SQL Data Type: uniqueidentifier
1001
+ * * Related Entity/Foreign Key: MJ: AI Agents (vwAIAgents.ID)`),
1002
+ ClientToolDefinitionID: z.string().describe(`
1003
+ * * Field Name: ClientToolDefinitionID
1004
+ * * Display Name: Tool Definition
1005
+ * * SQL Data Type: uniqueidentifier
1006
+ * * Related Entity/Foreign Key: MJ: AI Client Tool Definitions (vwAIClientToolDefinitions.ID)`),
1007
+ IsRequired: z.boolean().describe(`
1008
+ * * Field Name: IsRequired
1009
+ * * Display Name: Is Required
1010
+ * * SQL Data Type: bit
1011
+ * * Default Value: 0
1012
+ * * Description: When true, the agent expects this tool to always be available on the client. If the client has not registered a handler, agent execution may warn or fail depending on configuration.`),
1013
+ Priority: z.number().describe(`
1014
+ * * Field Name: Priority
1015
+ * * Display Name: Priority
1016
+ * * SQL Data Type: int
1017
+ * * Default Value: 0
1018
+ * * Description: Sort order for tool listing in prompts. Lower numbers appear first. Tools with the same priority are listed alphabetically.`),
1019
+ __mj_CreatedAt: z.date().describe(`
1020
+ * * Field Name: __mj_CreatedAt
1021
+ * * Display Name: Created At
1022
+ * * SQL Data Type: datetimeoffset
1023
+ * * Default Value: getutcdate()`),
1024
+ __mj_UpdatedAt: z.date().describe(`
1025
+ * * Field Name: __mj_UpdatedAt
1026
+ * * Display Name: Updated At
1027
+ * * SQL Data Type: datetimeoffset
1028
+ * * Default Value: getutcdate()`),
1029
+ Agent: z.string().nullable().describe(`
1030
+ * * Field Name: Agent
1031
+ * * Display Name: Agent Name
1032
+ * * SQL Data Type: nvarchar(255)`),
1033
+ ClientToolDefinition: z.string().describe(`
1034
+ * * Field Name: ClientToolDefinition
1035
+ * * Display Name: Tool Name
1036
+ * * SQL Data Type: nvarchar(200)`),
1037
+ });
988
1038
  /**
989
1039
  * zod schema definition for the entity MJ: AI Agent Configurations
990
1040
  */
@@ -3228,7 +3278,7 @@ export const MJAIAgentSchema = z.object({
3228
3278
  * * Description: Number of messages that triggers context compression when EnableContextCompression is true.`),
3229
3279
  ContextCompressionPromptID: z.string().nullable().describe(`
3230
3280
  * * Field Name: ContextCompressionPromptID
3231
- * * Display Name: Context Compression Prompt
3281
+ * * Display Name: Compression Prompt
3232
3282
  * * SQL Data Type: uniqueidentifier
3233
3283
  * * Related Entity/Foreign Key: MJ: AI Prompts (vwAIPrompts.ID)`),
3234
3284
  ContextCompressionMessageRetentionCount: z.number().nullable().describe(`
@@ -3397,7 +3447,7 @@ if this limit is exceeded.`),
3397
3447
  * * Description: Default artifact type produced by this agent. This is the primary artifact type; additional artifact types can be linked via AIAgentArtifactType junction table. Can be NULL if agent does not produce artifacts by default.`),
3398
3448
  OwnerUserID: z.string().describe(`
3399
3449
  * * Field Name: OwnerUserID
3400
- * * Display Name: Owner
3450
+ * * Display Name: Owner User
3401
3451
  * * SQL Data Type: uniqueidentifier
3402
3452
  * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
3403
3453
  * * Default Value: ECAFCCEC-6A37-EF11-86D4-000D3A4E707E
@@ -3516,7 +3566,7 @@ if this limit is exceeded.`),
3516
3566
  * * Description: Base path within the storage provider for this agent's attachments. Agent run ID and sequence number are appended to create unique paths. Format: /folder/subfolder`),
3517
3567
  InlineStorageThresholdBytes: z.number().nullable().describe(`
3518
3568
  * * Field Name: InlineStorageThresholdBytes
3519
- * * Display Name: Inline Storage Threshold (Bytes)
3569
+ * * Display Name: Inline Storage Threshold Bytes
3520
3570
  * * SQL Data Type: int
3521
3571
  * * Description: File size threshold for inline storage. Files <= this size are stored as base64 inline, larger files use MJStorage. NULL uses system default (1MB). Set to 0 to always use MJStorage.`),
3522
3572
  AgentTypePromptParams: z.string().nullable().describe(`
@@ -3531,13 +3581,13 @@ if this limit is exceeded.`),
3531
3581
  * * Description: JSON configuration defining scope dimensions for multi-tenant deployments. Example: {"dimensions":[{"name":"OrganizationID","entityId":"...","isPrimary":true,"required":true},{"name":"ContactID","entityId":"...","isPrimary":false,"required":false}],"inheritanceMode":"cascading"}`),
3532
3582
  NoteRetentionDays: z.number().nullable().describe(`
3533
3583
  * * Field Name: NoteRetentionDays
3534
- * * Display Name: Note Retention (Days)
3584
+ * * Display Name: Note Retention Days
3535
3585
  * * SQL Data Type: int
3536
3586
  * * Default Value: 90
3537
3587
  * * Description: Number of days to retain notes before archiving due to inactivity. Default 90. NULL means use system default.`),
3538
3588
  ExampleRetentionDays: z.number().nullable().describe(`
3539
3589
  * * Field Name: ExampleRetentionDays
3540
- * * Display Name: Example Retention (Days)
3590
+ * * Display Name: Example Retention Days
3541
3591
  * * SQL Data Type: int
3542
3592
  * * Default Value: 180
3543
3593
  * * Description: Number of days to retain examples before archiving due to inactivity. Default 180. NULL means use system default.`),
@@ -3558,6 +3608,12 @@ if this limit is exceeded.`),
3558
3608
  * * SQL Data Type: uniqueidentifier
3559
3609
  * * Related Entity/Foreign Key: MJ: AI Agent Categories (vwAIAgentCategories.ID)
3560
3610
  * * Description: Foreign key to AIAgentCategory. Assigns this agent to an organizational category for grouping, filtering, and inherited assignment strategy resolution.`),
3611
+ AllowEphemeralClientTools: z.boolean().describe(`
3612
+ * * Field Name: AllowEphemeralClientTools
3613
+ * * Display Name: Allow Ephemeral Client Tools
3614
+ * * SQL Data Type: bit
3615
+ * * Default Value: 1
3616
+ * * Description: When true (default), this agent accepts runtime-registered ephemeral client tools that are not defined in metadata. Set to false for agents that require strict tool governance.`),
3561
3617
  Parent: z.string().nullable().describe(`
3562
3618
  * * Field Name: Parent
3563
3619
  * * Display Name: Parent Name
@@ -3576,7 +3632,7 @@ if this limit is exceeded.`),
3576
3632
  * * SQL Data Type: nvarchar(100)`),
3577
3633
  OwnerUser: z.string().describe(`
3578
3634
  * * Field Name: OwnerUser
3579
- * * Display Name: Owner Name
3635
+ * * Display Name: Owner User Name
3580
3636
  * * SQL Data Type: nvarchar(100)`),
3581
3637
  AttachmentStorageProvider: z.string().nullable().describe(`
3582
3638
  * * Field Name: AttachmentStorageProvider
@@ -3655,6 +3711,62 @@ export const MJAIArchitectureSchema = z.object({
3655
3711
  * * Display Name: Root Parent Architecture ID
3656
3712
  * * SQL Data Type: uniqueidentifier`),
3657
3713
  });
3714
+ /**
3715
+ * zod schema definition for the entity MJ: AI Client Tool Definitions
3716
+ */
3717
+ export const MJAIClientToolDefinitionSchema = z.object({
3718
+ ID: z.string().describe(`
3719
+ * * Field Name: ID
3720
+ * * Display Name: ID
3721
+ * * SQL Data Type: uniqueidentifier
3722
+ * * Default Value: newsequentialid()`),
3723
+ Name: z.string().describe(`
3724
+ * * Field Name: Name
3725
+ * * Display Name: Tool Name
3726
+ * * SQL Data Type: nvarchar(200)
3727
+ * * Description: Unique identifier for the client tool (e.g., NavigateToApp, NavigateToRecord). Used to match tool invocations from the LLM to registered handlers on the client.`),
3728
+ Description: z.string().describe(`
3729
+ * * Field Name: Description
3730
+ * * Display Name: Description
3731
+ * * SQL Data Type: nvarchar(MAX)
3732
+ * * Description: Human-readable description of what the tool does. This text is injected into the LLM system prompt so it knows when and how to use the tool.`),
3733
+ Category: z.string().nullable().describe(`
3734
+ * * Field Name: Category
3735
+ * * Display Name: Category
3736
+ * * SQL Data Type: nvarchar(50)
3737
+ * * Description: Tool category for grouping and filtering (e.g., navigation, form, display, data).`),
3738
+ InputSchemaJSON: z.string().nullable().describe(`
3739
+ * * Field Name: InputSchemaJSON
3740
+ * * Display Name: Input Schema
3741
+ * * SQL Data Type: nvarchar(MAX)
3742
+ * * Description: JSON Schema defining the input parameters the tool accepts. Included in the LLM prompt so it generates valid parameter objects.`),
3743
+ OutputSchemaJSON: z.string().nullable().describe(`
3744
+ * * Field Name: OutputSchemaJSON
3745
+ * * Display Name: Output Schema
3746
+ * * SQL Data Type: nvarchar(MAX)
3747
+ * * Description: JSON Schema describing the return value from the tool. Optional — used for documentation and LLM context.`),
3748
+ DefaultTimeoutMs: z.number().nullable().describe(`
3749
+ * * Field Name: DefaultTimeoutMs
3750
+ * * Display Name: Default Timeout (ms)
3751
+ * * SQL Data Type: int
3752
+ * * Default Value: 30000
3753
+ * * Description: Default timeout in milliseconds for this tool. Can be overridden per-invocation by the LLM or per-run by execution params. Default is 30000ms (30 seconds).`),
3754
+ RequiresContextType: z.string().nullable().describe(`
3755
+ * * Field Name: RequiresContextType
3756
+ * * Display Name: Required Context Type
3757
+ * * SQL Data Type: nvarchar(100)
3758
+ * * Description: When set, the client only sends this tool to the server when the user is in the specified context (e.g., entity-form, dashboard, search). Null means the tool is always available.`),
3759
+ __mj_CreatedAt: z.date().describe(`
3760
+ * * Field Name: __mj_CreatedAt
3761
+ * * Display Name: Created At
3762
+ * * SQL Data Type: datetimeoffset
3763
+ * * Default Value: getutcdate()`),
3764
+ __mj_UpdatedAt: z.date().describe(`
3765
+ * * Field Name: __mj_UpdatedAt
3766
+ * * Display Name: Updated At
3767
+ * * SQL Data Type: datetimeoffset
3768
+ * * Default Value: getutcdate()`),
3769
+ });
3658
3770
  /**
3659
3771
  * zod schema definition for the entity MJ: AI Configuration Params
3660
3772
  */
@@ -6677,10 +6789,11 @@ export const MJApplicationSchema = z.object({
6677
6789
  * * Display Name: Color
6678
6790
  * * SQL Data Type: nvarchar(20)
6679
6791
  * * Description: Hex color code for visual theming (e.g., #4caf50)`),
6680
- DefaultNavItems: z.string().nullable().describe(`
6792
+ DefaultNavItems: z.any().nullable().describe(`
6681
6793
  * * Field Name: DefaultNavItems
6682
6794
  * * Display Name: Default Nav Items
6683
6795
  * * SQL Data Type: nvarchar(MAX)
6796
+ * * JSON Type: Array<MJApplicationEntity_IDefaultNavItem>
6684
6797
  * * Description: JSON array of default navigation items for this application. Parsed by BaseApplication.GetNavItems()`),
6685
6798
  ClassName: z.string().nullable().describe(`
6686
6799
  * * Field Name: ClassName
@@ -9168,6 +9281,97 @@ export const MJContentItemAttributeSchema = z.object({
9168
9281
  * * Display Name: Content Item
9169
9282
  * * SQL Data Type: nvarchar(250)`),
9170
9283
  });
9284
+ /**
9285
+ * zod schema definition for the entity MJ: Content Item Duplicates
9286
+ */
9287
+ export const MJContentItemDuplicateSchema = z.object({
9288
+ ID: z.string().describe(`
9289
+ * * Field Name: ID
9290
+ * * Display Name: ID
9291
+ * * SQL Data Type: uniqueidentifier
9292
+ * * Default Value: newsequentialid()`),
9293
+ ContentItemAID: z.string().describe(`
9294
+ * * Field Name: ContentItemAID
9295
+ * * Display Name: Content Item A ID
9296
+ * * SQL Data Type: uniqueidentifier
9297
+ * * Related Entity/Foreign Key: MJ: Content Items (vwContentItems.ID)`),
9298
+ ContentItemBID: z.string().describe(`
9299
+ * * Field Name: ContentItemBID
9300
+ * * Display Name: Content Item B ID
9301
+ * * SQL Data Type: uniqueidentifier
9302
+ * * Related Entity/Foreign Key: MJ: Content Items (vwContentItems.ID)`),
9303
+ SimilarityScore: z.number().describe(`
9304
+ * * Field Name: SimilarityScore
9305
+ * * Display Name: Similarity Score
9306
+ * * SQL Data Type: decimal(5, 4)
9307
+ * * Description: Cosine similarity (for Vector) or exact match score (1.0 for Checksum/URL). Range 0.0-1.0.`),
9308
+ DetectionMethod: z.union([z.literal('Checksum'), z.literal('Title'), z.literal('URL'), z.literal('Vector')]).describe(`
9309
+ * * Field Name: DetectionMethod
9310
+ * * Display Name: Detection Method
9311
+ * * SQL Data Type: nvarchar(30)
9312
+ * * Default Value: Checksum
9313
+ * * Value List Type: List
9314
+ * * Possible Values
9315
+ * * Checksum
9316
+ * * Title
9317
+ * * URL
9318
+ * * Vector
9319
+ * * Description: How the duplicate was detected: Checksum (identical text hash), Vector (embedding similarity), Title (same title text), URL (same source URL).`),
9320
+ Status: z.union([z.literal('Confirmed'), z.literal('Dismissed'), z.literal('Merged'), z.literal('Pending')]).describe(`
9321
+ * * Field Name: Status
9322
+ * * Display Name: Status
9323
+ * * SQL Data Type: nvarchar(20)
9324
+ * * Default Value: Pending
9325
+ * * Value List Type: List
9326
+ * * Possible Values
9327
+ * * Confirmed
9328
+ * * Dismissed
9329
+ * * Merged
9330
+ * * Pending
9331
+ * * Description: Current status: Pending (awaiting review), Confirmed (verified duplicate), Dismissed (not a duplicate), Merged (one item was removed).`),
9332
+ ResolvedByUserID: z.string().nullable().describe(`
9333
+ * * Field Name: ResolvedByUserID
9334
+ * * Display Name: Resolved By User ID
9335
+ * * SQL Data Type: uniqueidentifier
9336
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)`),
9337
+ ResolvedAt: z.date().nullable().describe(`
9338
+ * * Field Name: ResolvedAt
9339
+ * * Display Name: Resolved At
9340
+ * * SQL Data Type: datetimeoffset`),
9341
+ Resolution: z.union([z.literal('KeepA'), z.literal('KeepB'), z.literal('MergeBoth'), z.literal('NotDuplicate')]).nullable().describe(`
9342
+ * * Field Name: Resolution
9343
+ * * Display Name: Resolution
9344
+ * * SQL Data Type: nvarchar(20)
9345
+ * * Value List Type: List
9346
+ * * Possible Values
9347
+ * * KeepA
9348
+ * * KeepB
9349
+ * * MergeBoth
9350
+ * * NotDuplicate
9351
+ * * Description: How the duplicate was resolved: KeepA (keep first, remove second), KeepB (keep second, remove first), MergeBoth (combine into one), NotDuplicate (false positive).`),
9352
+ __mj_CreatedAt: z.date().describe(`
9353
+ * * Field Name: __mj_CreatedAt
9354
+ * * Display Name: Created At
9355
+ * * SQL Data Type: datetimeoffset
9356
+ * * Default Value: getutcdate()`),
9357
+ __mj_UpdatedAt: z.date().describe(`
9358
+ * * Field Name: __mj_UpdatedAt
9359
+ * * Display Name: Updated At
9360
+ * * SQL Data Type: datetimeoffset
9361
+ * * Default Value: getutcdate()`),
9362
+ ContentItemA: z.string().nullable().describe(`
9363
+ * * Field Name: ContentItemA
9364
+ * * Display Name: Content Item A
9365
+ * * SQL Data Type: nvarchar(250)`),
9366
+ ContentItemB: z.string().nullable().describe(`
9367
+ * * Field Name: ContentItemB
9368
+ * * Display Name: Content Item B
9369
+ * * SQL Data Type: nvarchar(250)`),
9370
+ ResolvedByUser: z.string().nullable().describe(`
9371
+ * * Field Name: ResolvedByUser
9372
+ * * Display Name: Resolved By User
9373
+ * * SQL Data Type: nvarchar(100)`),
9374
+ });
9171
9375
  /**
9172
9376
  * zod schema definition for the entity MJ: Content Item Tags
9173
9377
  */
@@ -9179,7 +9383,7 @@ export const MJContentItemTagSchema = z.object({
9179
9383
  * * Default Value: newsequentialid()`),
9180
9384
  ItemID: z.string().describe(`
9181
9385
  * * Field Name: ItemID
9182
- * * Display Name: Item ID
9386
+ * * Display Name: Item
9183
9387
  * * SQL Data Type: uniqueidentifier
9184
9388
  * * Related Entity/Foreign Key: MJ: Content Items (vwContentItems.ID)`),
9185
9389
  Tag: z.string().describe(`
@@ -9197,10 +9401,26 @@ export const MJContentItemTagSchema = z.object({
9197
9401
  * * Display Name: Updated At
9198
9402
  * * SQL Data Type: datetimeoffset
9199
9403
  * * Default Value: getutcdate()`),
9404
+ Weight: z.number().describe(`
9405
+ * * Field Name: Weight
9406
+ * * Display Name: Weight
9407
+ * * SQL Data Type: numeric(5, 4)
9408
+ * * Default Value: 1.0
9409
+ * * Description: Relevance weight for this tag (0.0-1.0). 1.0 = highly relevant central topic, 0.5 = moderately relevant, 0.1 = tangentially related. Assigned by the LLM during autotagging.`),
9410
+ TagID: z.string().nullable().describe(`
9411
+ * * Field Name: TagID
9412
+ * * Display Name: Tag Reference
9413
+ * * SQL Data Type: uniqueidentifier
9414
+ * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)
9415
+ * * Description: Optional link to the formal MJ Tag taxonomy. When set, this free-text tag has been matched (via semantic similarity or exact match) to a curated Tag record. NULL means the tag is unmatched free text only.`),
9200
9416
  Item: z.string().nullable().describe(`
9201
9417
  * * Field Name: Item
9202
- * * Display Name: Item
9418
+ * * Display Name: Item Name
9203
9419
  * * SQL Data Type: nvarchar(250)`),
9420
+ Tag_Virtual: z.string().nullable().describe(`
9421
+ * * Field Name: Tag_Virtual
9422
+ * * Display Name: Tag (Virtual)
9423
+ * * SQL Data Type: nvarchar(255)`),
9204
9424
  });
9205
9425
  /**
9206
9426
  * zod schema definition for the entity MJ: Content Items
@@ -9264,6 +9484,54 @@ export const MJContentItemSchema = z.object({
9264
9484
  * * Display Name: Updated At
9265
9485
  * * SQL Data Type: datetimeoffset
9266
9486
  * * Default Value: getutcdate()`),
9487
+ EntityRecordDocumentID: z.string().nullable().describe(`
9488
+ * * Field Name: EntityRecordDocumentID
9489
+ * * Display Name: Entity Record Document ID
9490
+ * * SQL Data Type: uniqueidentifier
9491
+ * * Related Entity/Foreign Key: MJ: Entity Record Documents (vwEntityRecordDocuments.ID)
9492
+ * * Description: For entity-sourced content items, links to the Entity Record Document snapshot that was rendered for this item. Provides traceability back to the source entity record via ERD.EntityID + ERD.RecordID. NULL for non-entity sources.`),
9493
+ EmbeddingStatus: z.union([z.literal('Complete'), z.literal('Failed'), z.literal('Pending'), z.literal('Processing'), z.literal('Skipped')]).describe(`
9494
+ * * Field Name: EmbeddingStatus
9495
+ * * Display Name: Embedding Status
9496
+ * * SQL Data Type: nvarchar(20)
9497
+ * * Default Value: Pending
9498
+ * * Value List Type: List
9499
+ * * Possible Values
9500
+ * * Complete
9501
+ * * Failed
9502
+ * * Pending
9503
+ * * Processing
9504
+ * * Skipped
9505
+ * * Description: Vectorization status: Pending (not yet embedded), Processing (currently being embedded), Complete (vector stored), Failed (embedding error), Skipped (excluded from vectorization).`),
9506
+ LastEmbeddedAt: z.date().nullable().describe(`
9507
+ * * Field Name: LastEmbeddedAt
9508
+ * * Display Name: Last Embedded At
9509
+ * * SQL Data Type: datetimeoffset
9510
+ * * Description: Timestamp of the most recent successful embedding for this content item.`),
9511
+ EmbeddingModelID: z.string().nullable().describe(`
9512
+ * * Field Name: EmbeddingModelID
9513
+ * * Display Name: Embedding Model ID
9514
+ * * SQL Data Type: uniqueidentifier
9515
+ * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
9516
+ * * Description: The AI model used to generate the most recent embedding for this content item.`),
9517
+ TaggingStatus: z.union([z.literal('Complete'), z.literal('Failed'), z.literal('Pending'), z.literal('Processing'), z.literal('Skipped')]).describe(`
9518
+ * * Field Name: TaggingStatus
9519
+ * * Display Name: Tagging Status
9520
+ * * SQL Data Type: nvarchar(20)
9521
+ * * Default Value: Pending
9522
+ * * Value List Type: List
9523
+ * * Possible Values
9524
+ * * Complete
9525
+ * * Failed
9526
+ * * Pending
9527
+ * * Processing
9528
+ * * Skipped
9529
+ * * Description: Autotagging status: Pending (not yet tagged), Processing (LLM is generating tags), Complete (tags assigned), Failed (LLM error), Skipped (excluded from tagging).`),
9530
+ LastTaggedAt: z.date().nullable().describe(`
9531
+ * * Field Name: LastTaggedAt
9532
+ * * Display Name: Last Tagged At
9533
+ * * SQL Data Type: datetimeoffset
9534
+ * * Description: Timestamp of the most recent successful autotagging run for this content item.`),
9267
9535
  ContentSource: z.string().nullable().describe(`
9268
9536
  * * Field Name: ContentSource
9269
9537
  * * Display Name: Content Source
@@ -9280,6 +9548,167 @@ export const MJContentItemSchema = z.object({
9280
9548
  * * Field Name: ContentFileType
9281
9549
  * * Display Name: Content File Type
9282
9550
  * * SQL Data Type: nvarchar(255)`),
9551
+ EntityRecordDocument: z.string().nullable().describe(`
9552
+ * * Field Name: EntityRecordDocument
9553
+ * * Display Name: Entity Record Document
9554
+ * * SQL Data Type: nvarchar(450)`),
9555
+ EmbeddingModel: z.string().nullable().describe(`
9556
+ * * Field Name: EmbeddingModel
9557
+ * * Display Name: Embedding Model
9558
+ * * SQL Data Type: nvarchar(50)`),
9559
+ });
9560
+ /**
9561
+ * zod schema definition for the entity MJ: Content Process Run Details
9562
+ */
9563
+ export const MJContentProcessRunDetailSchema = z.object({
9564
+ ID: z.string().describe(`
9565
+ * * Field Name: ID
9566
+ * * Display Name: ID
9567
+ * * SQL Data Type: uniqueidentifier
9568
+ * * Default Value: newsequentialid()`),
9569
+ ContentProcessRunID: z.string().describe(`
9570
+ * * Field Name: ContentProcessRunID
9571
+ * * Display Name: Content Process Run
9572
+ * * SQL Data Type: uniqueidentifier
9573
+ * * Related Entity/Foreign Key: MJ: Content Process Runs (vwContentProcessRuns.ID)
9574
+ * * Description: The parent pipeline run this detail belongs to.`),
9575
+ ContentSourceID: z.string().describe(`
9576
+ * * Field Name: ContentSourceID
9577
+ * * Display Name: Content Source
9578
+ * * SQL Data Type: uniqueidentifier
9579
+ * * Related Entity/Foreign Key: MJ: Content Sources (vwContentSources.ID)
9580
+ * * Description: The content source being processed in this detail record.`),
9581
+ ContentSourceTypeID: z.string().describe(`
9582
+ * * Field Name: ContentSourceTypeID
9583
+ * * Display Name: Content Source Type
9584
+ * * SQL Data Type: uniqueidentifier
9585
+ * * Related Entity/Foreign Key: MJ: Content Source Types (vwContentSourceTypes.ID)
9586
+ * * Description: The type of content source (RSS Feed, Entity, Website, Cloud Storage, etc.).`),
9587
+ Status: z.string().describe(`
9588
+ * * Field Name: Status
9589
+ * * Display Name: Status
9590
+ * * SQL Data Type: nvarchar(20)
9591
+ * * Default Value: Pending
9592
+ * * Description: Processing status: Pending, Running, Completed, Failed, or Skipped.`),
9593
+ ItemsProcessed: z.number().describe(`
9594
+ * * Field Name: ItemsProcessed
9595
+ * * Display Name: Items Processed
9596
+ * * SQL Data Type: int
9597
+ * * Default Value: 0
9598
+ * * Description: Total content items processed for this source during the run.`),
9599
+ ItemsTagged: z.number().describe(`
9600
+ * * Field Name: ItemsTagged
9601
+ * * Display Name: Items Tagged
9602
+ * * SQL Data Type: int
9603
+ * * Default Value: 0
9604
+ * * Description: Number of content items successfully tagged by the LLM.`),
9605
+ ItemsVectorized: z.number().describe(`
9606
+ * * Field Name: ItemsVectorized
9607
+ * * Display Name: Items Vectorized
9608
+ * * SQL Data Type: int
9609
+ * * Default Value: 0
9610
+ * * Description: Number of content items successfully embedded and upserted to the vector database.`),
9611
+ TagsCreated: z.number().describe(`
9612
+ * * Field Name: TagsCreated
9613
+ * * Display Name: Tags Created
9614
+ * * SQL Data Type: int
9615
+ * * Default Value: 0
9616
+ * * Description: Number of new ContentItemTag records created during LLM tagging.`),
9617
+ ErrorCount: z.number().describe(`
9618
+ * * Field Name: ErrorCount
9619
+ * * Display Name: Error Count
9620
+ * * SQL Data Type: int
9621
+ * * Default Value: 0
9622
+ * * Description: Number of errors encountered while processing this source.`),
9623
+ StartTime: z.date().nullable().describe(`
9624
+ * * Field Name: StartTime
9625
+ * * Display Name: Start Time
9626
+ * * SQL Data Type: datetimeoffset
9627
+ * * Description: When processing started for this source within the pipeline run.`),
9628
+ EndTime: z.date().nullable().describe(`
9629
+ * * Field Name: EndTime
9630
+ * * Display Name: End Time
9631
+ * * SQL Data Type: datetimeoffset
9632
+ * * Description: When processing completed for this source within the pipeline run.`),
9633
+ TotalTokensUsed: z.number().describe(`
9634
+ * * Field Name: TotalTokensUsed
9635
+ * * Display Name: Total Tokens Used
9636
+ * * SQL Data Type: int
9637
+ * * Default Value: 0
9638
+ * * Description: Rollup of all tokens used across LLM tagging and embedding calls for this source. Computed from linked AIPromptRun records via the ContentProcessRunPromptRun junction table.`),
9639
+ TotalCost: z.number().describe(`
9640
+ * * Field Name: TotalCost
9641
+ * * Display Name: Total Cost
9642
+ * * SQL Data Type: decimal(18, 6)
9643
+ * * Default Value: 0
9644
+ * * Description: Rollup of all costs across LLM tagging and embedding calls for this source. Computed from linked AIPromptRun records via the ContentProcessRunPromptRun junction table.`),
9645
+ __mj_CreatedAt: z.date().describe(`
9646
+ * * Field Name: __mj_CreatedAt
9647
+ * * Display Name: Created At
9648
+ * * SQL Data Type: datetimeoffset
9649
+ * * Default Value: getutcdate()`),
9650
+ __mj_UpdatedAt: z.date().describe(`
9651
+ * * Field Name: __mj_UpdatedAt
9652
+ * * Display Name: Updated At
9653
+ * * SQL Data Type: datetimeoffset
9654
+ * * Default Value: getutcdate()`),
9655
+ ContentProcessRun: z.string().nullable().describe(`
9656
+ * * Field Name: ContentProcessRun
9657
+ * * Display Name: Content Process Run Name
9658
+ * * SQL Data Type: nvarchar(255)`),
9659
+ ContentSource: z.string().nullable().describe(`
9660
+ * * Field Name: ContentSource
9661
+ * * Display Name: Content Source Name
9662
+ * * SQL Data Type: nvarchar(255)`),
9663
+ ContentSourceType: z.string().describe(`
9664
+ * * Field Name: ContentSourceType
9665
+ * * Display Name: Source Type Category
9666
+ * * SQL Data Type: nvarchar(255)`),
9667
+ });
9668
+ /**
9669
+ * zod schema definition for the entity MJ: Content Process Run Prompt Runs
9670
+ */
9671
+ export const MJContentProcessRunPromptRunSchema = z.object({
9672
+ ID: z.string().describe(`
9673
+ * * Field Name: ID
9674
+ * * Display Name: ID
9675
+ * * SQL Data Type: uniqueidentifier
9676
+ * * Default Value: newsequentialid()`),
9677
+ ContentProcessRunDetailID: z.string().describe(`
9678
+ * * Field Name: ContentProcessRunDetailID
9679
+ * * Display Name: Content Process Run Detail
9680
+ * * SQL Data Type: uniqueidentifier
9681
+ * * Related Entity/Foreign Key: MJ: Content Process Run Details (vwContentProcessRunDetails.ID)
9682
+ * * Description: The content process run detail record this prompt run is associated with.`),
9683
+ AIPromptRunID: z.string().describe(`
9684
+ * * Field Name: AIPromptRunID
9685
+ * * Display Name: AI Prompt Run
9686
+ * * SQL Data Type: uniqueidentifier
9687
+ * * Related Entity/Foreign Key: MJ: AI Prompt Runs (vwAIPromptRuns.ID)
9688
+ * * Description: The AI prompt run record containing token usage, cost, model, vendor, and execution details for this call.`),
9689
+ RunType: z.union([z.literal('Embed'), z.literal('Tag')]).describe(`
9690
+ * * Field Name: RunType
9691
+ * * Display Name: Run Type
9692
+ * * SQL Data Type: nvarchar(20)
9693
+ * * Value List Type: List
9694
+ * * Possible Values
9695
+ * * Embed
9696
+ * * Tag
9697
+ * * Description: Whether this AIPromptRun was for LLM tagging (Tag) or text embedding (Embed).`),
9698
+ __mj_CreatedAt: z.date().describe(`
9699
+ * * Field Name: __mj_CreatedAt
9700
+ * * Display Name: Created At
9701
+ * * SQL Data Type: datetimeoffset
9702
+ * * Default Value: getutcdate()`),
9703
+ __mj_UpdatedAt: z.date().describe(`
9704
+ * * Field Name: __mj_UpdatedAt
9705
+ * * Display Name: Updated At
9706
+ * * SQL Data Type: datetimeoffset
9707
+ * * Default Value: getutcdate()`),
9708
+ AIPromptRun: z.string().nullable().describe(`
9709
+ * * Field Name: AIPromptRun
9710
+ * * Display Name: Prompt Run Label
9711
+ * * SQL Data Type: nvarchar(255)`),
9283
9712
  });
9284
9713
  /**
9285
9714
  * zod schema definition for the entity MJ: Content Process Runs
@@ -9324,10 +9753,60 @@ export const MJContentProcessRunSchema = z.object({
9324
9753
  * * Display Name: Updated At
9325
9754
  * * SQL Data Type: datetimeoffset
9326
9755
  * * Default Value: getutcdate()`),
9756
+ StartedByUserID: z.string().nullable().describe(`
9757
+ * * Field Name: StartedByUserID
9758
+ * * Display Name: Started By User ID
9759
+ * * SQL Data Type: uniqueidentifier
9760
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
9761
+ * * Description: The user who triggered this pipeline run. NULL for system-initiated runs.`),
9762
+ TotalItemCount: z.number().nullable().describe(`
9763
+ * * Field Name: TotalItemCount
9764
+ * * Display Name: Total Item Count
9765
+ * * SQL Data Type: int
9766
+ * * Description: Total number of content items to process in this run. Used for progress percentage calculation.`),
9767
+ LastProcessedOffset: z.number().nullable().describe(`
9768
+ * * Field Name: LastProcessedOffset
9769
+ * * Display Name: Last Processed Offset
9770
+ * * SQL Data Type: int
9771
+ * * Default Value: 0
9772
+ * * Description: StartRow offset of the last successfully completed batch. Used for resume-from-crash: next batch starts at this offset. Reset to 0 on new runs.`),
9773
+ BatchSize: z.number().nullable().describe(`
9774
+ * * Field Name: BatchSize
9775
+ * * Display Name: Batch Size
9776
+ * * SQL Data Type: int
9777
+ * * Default Value: 100
9778
+ * * Description: Number of content items processed per batch. Configurable per run, default 100.`),
9779
+ ErrorCount: z.number().nullable().describe(`
9780
+ * * Field Name: ErrorCount
9781
+ * * Display Name: Error Count
9782
+ * * SQL Data Type: int
9783
+ * * Default Value: 0
9784
+ * * Description: Running count of errors encountered during processing. Used by the circuit breaker to halt the pipeline if error rate exceeds the configured threshold.`),
9785
+ ErrorMessage: z.string().nullable().describe(`
9786
+ * * Field Name: ErrorMessage
9787
+ * * Display Name: Error Message
9788
+ * * SQL Data Type: nvarchar(MAX)
9789
+ * * Description: Error details if the run failed. Includes error messages, stack traces, or circuit breaker trigger reason.`),
9790
+ CancellationRequested: z.boolean().describe(`
9791
+ * * Field Name: CancellationRequested
9792
+ * * Display Name: Cancellation Requested
9793
+ * * SQL Data Type: bit
9794
+ * * Default Value: 0
9795
+ * * Description: When set to 1, the pipeline stops after completing the current batch. Used for pause and cancel operations. The Status column reflects the final state (Paused or Cancelled).`),
9796
+ Configuration: z.any().nullable().describe(`
9797
+ * * Field Name: Configuration
9798
+ * * Display Name: Configuration
9799
+ * * SQL Data Type: nvarchar(MAX)
9800
+ * * JSON Type: MJContentProcessRunEntity_IContentProcessRunConfiguration
9801
+ * * Description: JSON snapshot of the pipeline configuration used for this run. Conforms to the IContentProcessRunConfiguration interface. Includes batch size, rate limits, error thresholds, and duplicate detection settings.`),
9327
9802
  Source: z.string().nullable().describe(`
9328
9803
  * * Field Name: Source
9329
9804
  * * Display Name: Source
9330
9805
  * * SQL Data Type: nvarchar(255)`),
9806
+ StartedByUser: z.string().nullable().describe(`
9807
+ * * Field Name: StartedByUser
9808
+ * * Display Name: Started By User
9809
+ * * SQL Data Type: nvarchar(100)`),
9331
9810
  });
9332
9811
  /**
9333
9812
  * zod schema definition for the entity MJ: Content Source Params
@@ -9438,6 +9917,17 @@ export const MJContentSourceTypeSchema = z.object({
9438
9917
  * * Display Name: Updated At
9439
9918
  * * SQL Data Type: datetimeoffset
9440
9919
  * * Default Value: getutcdate()`),
9920
+ DriverClass: z.string().nullable().describe(`
9921
+ * * Field Name: DriverClass
9922
+ * * Display Name: Driver Class
9923
+ * * SQL Data Type: nvarchar(255)
9924
+ * * Description: The registered class name used by ClassFactory to instantiate the provider for this source type (e.g., AutotagLocalFileSystem, AutotagEntity). Must match a @RegisterClass key on a class extending AutotagBase.`),
9925
+ Configuration: z.any().nullable().describe(`
9926
+ * * Field Name: Configuration
9927
+ * * Display Name: Configuration
9928
+ * * SQL Data Type: nvarchar(MAX)
9929
+ * * JSON Type: MJContentSourceTypeEntity_IContentSourceTypeConfiguration
9930
+ * * Description: JSON configuration blob for type-level settings. Conforms to the IContentSourceTypeConfiguration interface. Reserved for future type-wide settings shared by all sources of this type.`),
9441
9931
  });
9442
9932
  /**
9443
9933
  * zod schema definition for the entity MJ: Content Sources
@@ -9454,17 +9944,17 @@ export const MJContentSourceSchema = z.object({
9454
9944
  * * SQL Data Type: nvarchar(255)`),
9455
9945
  ContentTypeID: z.string().describe(`
9456
9946
  * * Field Name: ContentTypeID
9457
- * * Display Name: Content Type ID
9947
+ * * Display Name: Content Type
9458
9948
  * * SQL Data Type: uniqueidentifier
9459
9949
  * * Related Entity/Foreign Key: MJ: Content Types (vwContentTypes.ID)`),
9460
9950
  ContentSourceTypeID: z.string().describe(`
9461
9951
  * * Field Name: ContentSourceTypeID
9462
- * * Display Name: Content Source Type ID
9952
+ * * Display Name: Content Source Type
9463
9953
  * * SQL Data Type: uniqueidentifier
9464
9954
  * * Related Entity/Foreign Key: MJ: Content Source Types (vwContentSourceTypes.ID)`),
9465
9955
  ContentFileTypeID: z.string().describe(`
9466
9956
  * * Field Name: ContentFileTypeID
9467
- * * Display Name: Content File Type ID
9957
+ * * Display Name: Content File Type
9468
9958
  * * SQL Data Type: uniqueidentifier
9469
9959
  * * Related Entity/Foreign Key: MJ: Content File Types (vwContentFileTypes.ID)`),
9470
9960
  URL: z.string().describe(`
@@ -9482,6 +9972,42 @@ export const MJContentSourceSchema = z.object({
9482
9972
  * * Display Name: Updated At
9483
9973
  * * SQL Data Type: datetimeoffset
9484
9974
  * * Default Value: getutcdate()`),
9975
+ EmbeddingModelID: z.string().nullable().describe(`
9976
+ * * Field Name: EmbeddingModelID
9977
+ * * Display Name: Embedding Model
9978
+ * * SQL Data Type: uniqueidentifier
9979
+ * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
9980
+ * * Description: Per-source override for the AI embedding model. When NULL, falls back to the ContentType default.`),
9981
+ VectorIndexID: z.string().nullable().describe(`
9982
+ * * Field Name: VectorIndexID
9983
+ * * Display Name: Vector Index
9984
+ * * SQL Data Type: uniqueidentifier
9985
+ * * Related Entity/Foreign Key: MJ: Vector Indexes (vwVectorIndexes.ID)
9986
+ * * Description: Per-source override for the vector index. When NULL, falls back to the ContentType default.`),
9987
+ Configuration: z.any().nullable().describe(`
9988
+ * * Field Name: Configuration
9989
+ * * Display Name: Configuration
9990
+ * * SQL Data Type: nvarchar(MAX)
9991
+ * * JSON Type: MJContentSourceEntity_IContentSourceConfiguration
9992
+ * * Description: JSON configuration blob for source-instance settings. Conforms to the IContentSourceConfiguration interface. Includes tag taxonomy mode (constrained/auto-grow/free-flow), tag root ID, match threshold, LLM taxonomy sharing, and vectorization toggle.`),
9993
+ EntityID: z.string().nullable().describe(`
9994
+ * * Field Name: EntityID
9995
+ * * Display Name: Entity
9996
+ * * SQL Data Type: uniqueidentifier
9997
+ * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
9998
+ * * Description: For Entity-type content sources, the MJ Entity to pull records from. NULL for non-entity sources (files, RSS, websites, etc.).`),
9999
+ EntityDocumentID: z.string().nullable().describe(`
10000
+ * * Field Name: EntityDocumentID
10001
+ * * Display Name: Entity Document
10002
+ * * SQL Data Type: uniqueidentifier
10003
+ * * Related Entity/Foreign Key: MJ: Entity Documents (vwEntityDocuments.ID)
10004
+ * * Description: For Entity-type content sources, the Entity Document template used to render entity records into text for autotagging. The template defines which fields to include, how to format them, and related record inclusion. NULL for non-entity sources.`),
10005
+ ScheduledActionID: z.string().nullable().describe(`
10006
+ * * Field Name: ScheduledActionID
10007
+ * * Display Name: Scheduled Action
10008
+ * * SQL Data Type: uniqueidentifier
10009
+ * * Related Entity/Foreign Key: MJ: Scheduled Actions (vwScheduledActions.ID)
10010
+ * * Description: Optional link to a MJ Scheduled Action that automatically runs the classification pipeline for this source on a cron schedule.`),
9485
10011
  ContentType: z.string().describe(`
9486
10012
  * * Field Name: ContentType
9487
10013
  * * Display Name: Content Type
@@ -9494,6 +10020,26 @@ export const MJContentSourceSchema = z.object({
9494
10020
  * * Field Name: ContentFileType
9495
10021
  * * Display Name: Content File Type
9496
10022
  * * SQL Data Type: nvarchar(255)`),
10023
+ EmbeddingModel: z.string().nullable().describe(`
10024
+ * * Field Name: EmbeddingModel
10025
+ * * Display Name: Embedding Model
10026
+ * * SQL Data Type: nvarchar(50)`),
10027
+ VectorIndex: z.string().nullable().describe(`
10028
+ * * Field Name: VectorIndex
10029
+ * * Display Name: Vector Index
10030
+ * * SQL Data Type: nvarchar(255)`),
10031
+ Entity: z.string().nullable().describe(`
10032
+ * * Field Name: Entity
10033
+ * * Display Name: Entity
10034
+ * * SQL Data Type: nvarchar(255)`),
10035
+ EntityDocument: z.string().nullable().describe(`
10036
+ * * Field Name: EntityDocument
10037
+ * * Display Name: Entity Document
10038
+ * * SQL Data Type: nvarchar(250)`),
10039
+ ScheduledAction: z.string().nullable().describe(`
10040
+ * * Field Name: ScheduledAction
10041
+ * * Display Name: Scheduled Action
10042
+ * * SQL Data Type: nvarchar(255)`),
9497
10043
  });
9498
10044
  /**
9499
10045
  * zod schema definition for the entity MJ: Content Type Attributes
@@ -9552,17 +10098,17 @@ export const MJContentTypeSchema = z.object({
9552
10098
  * * SQL Data Type: nvarchar(MAX)`),
9553
10099
  AIModelID: z.string().describe(`
9554
10100
  * * Field Name: AIModelID
9555
- * * Display Name: AIModel ID
10101
+ * * Display Name: AI Model
9556
10102
  * * SQL Data Type: uniqueidentifier
9557
10103
  * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)`),
9558
10104
  MinTags: z.number().describe(`
9559
10105
  * * Field Name: MinTags
9560
- * * Display Name: Min Tags
10106
+ * * Display Name: Minimum Tags
9561
10107
  * * SQL Data Type: int
9562
10108
  * * Description: Minimum number of tags that must be applied to content of this type.`),
9563
10109
  MaxTags: z.number().describe(`
9564
10110
  * * Field Name: MaxTags
9565
- * * Display Name: Max Tags
10111
+ * * Display Name: Maximum Tags
9566
10112
  * * SQL Data Type: int
9567
10113
  * * Description: Maximum number of tags allowed on content of this type.`),
9568
10114
  __mj_CreatedAt: z.date().describe(`
@@ -9575,10 +10121,36 @@ export const MJContentTypeSchema = z.object({
9575
10121
  * * Display Name: Updated At
9576
10122
  * * SQL Data Type: datetimeoffset
9577
10123
  * * Default Value: getutcdate()`),
10124
+ EmbeddingModelID: z.string().nullable().describe(`
10125
+ * * Field Name: EmbeddingModelID
10126
+ * * Display Name: Embedding Model
10127
+ * * SQL Data Type: uniqueidentifier
10128
+ * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
10129
+ * * Description: Default AI embedding model for vectorizing content items of this type. Sources can override per-source. If NULL, uses the first available embedding model.`),
10130
+ VectorIndexID: z.string().nullable().describe(`
10131
+ * * Field Name: VectorIndexID
10132
+ * * Display Name: Vector Index
10133
+ * * SQL Data Type: uniqueidentifier
10134
+ * * Related Entity/Foreign Key: MJ: Vector Indexes (vwVectorIndexes.ID)
10135
+ * * Description: Default vector index for storing embeddings of this content type. Sources can override per-source. If NULL, uses the first available vector index.`),
10136
+ Configuration: z.any().nullable().describe(`
10137
+ * * Field Name: Configuration
10138
+ * * Display Name: Configuration
10139
+ * * SQL Data Type: nvarchar(MAX)
10140
+ * * JSON Type: MJContentTypeEntity_IContentTypeConfiguration
10141
+ * * Description: JSON configuration blob for content-type-level settings. Conforms to the IContentTypeConfiguration interface. Reserved for future type-wide settings such as default tag taxonomy rules and processing options.`),
9578
10142
  AIModel: z.string().describe(`
9579
10143
  * * Field Name: AIModel
9580
- * * Display Name: AIModel
10144
+ * * Display Name: AI Model Name
9581
10145
  * * SQL Data Type: nvarchar(50)`),
10146
+ EmbeddingModel: z.string().nullable().describe(`
10147
+ * * Field Name: EmbeddingModel
10148
+ * * Display Name: Embedding Model Name
10149
+ * * SQL Data Type: nvarchar(50)`),
10150
+ VectorIndex: z.string().nullable().describe(`
10151
+ * * Field Name: VectorIndex
10152
+ * * Display Name: Vector Index Name
10153
+ * * SQL Data Type: nvarchar(255)`),
9582
10154
  });
9583
10155
  /**
9584
10156
  * zod schema definition for the entity MJ: Conversation Artifact Permissions
@@ -11228,7 +11800,7 @@ export const MJDuplicateRunDetailMatchSchema = z.object({
11228
11800
  * * Default Value: newsequentialid()`),
11229
11801
  DuplicateRunDetailID: z.string().describe(`
11230
11802
  * * Field Name: DuplicateRunDetailID
11231
- * * Display Name: Duplicate Run Detail
11803
+ * * Display Name: Duplicate Run Detail ID
11232
11804
  * * SQL Data Type: uniqueidentifier
11233
11805
  * * Related Entity/Foreign Key: MJ: Duplicate Run Details (vwDuplicateRunDetails.ID)`),
11234
11806
  MatchSource: z.union([z.literal('SP'), z.literal('Vector')]).describe(`
@@ -11243,7 +11815,7 @@ export const MJDuplicateRunDetailMatchSchema = z.object({
11243
11815
  * * Description: Either Vector or SP`),
11244
11816
  MatchRecordID: z.string().describe(`
11245
11817
  * * Field Name: MatchRecordID
11246
- * * Display Name: Match Record
11818
+ * * Display Name: Match Record ID
11247
11819
  * * SQL Data Type: nvarchar(500)
11248
11820
  * * Description: The ID of the record identified as a potential duplicate match.`),
11249
11821
  MatchProbability: z.number().describe(`
@@ -11277,7 +11849,7 @@ export const MJDuplicateRunDetailMatchSchema = z.object({
11277
11849
  * * Description: Current approval status of the proposed action (Pending, Approved, Rejected).`),
11278
11850
  RecordMergeLogID: z.string().nullable().describe(`
11279
11851
  * * Field Name: RecordMergeLogID
11280
- * * Display Name: Record Merge Log
11852
+ * * Display Name: Record Merge Log ID
11281
11853
  * * SQL Data Type: uniqueidentifier
11282
11854
  * * Related Entity/Foreign Key: MJ: Record Merge Logs (vwRecordMergeLogs.ID)`),
11283
11855
  MergeStatus: z.union([z.literal('Complete'), z.literal('Error'), z.literal('Pending')]).describe(`
@@ -11307,6 +11879,11 @@ export const MJDuplicateRunDetailMatchSchema = z.object({
11307
11879
  * * Display Name: Updated At
11308
11880
  * * SQL Data Type: datetimeoffset
11309
11881
  * * Default Value: getutcdate()`),
11882
+ RecordMetadata: z.string().nullable().describe(`
11883
+ * * Field Name: RecordMetadata
11884
+ * * Display Name: Record Metadata
11885
+ * * SQL Data Type: nvarchar(MAX)
11886
+ * * Description: JSON metadata snapshot of the matched record from the vector database at detection time. Contains display fields (Name, Description, EntityIcon, etc.) for rich UI rendering without additional lookups.`),
11310
11887
  DuplicateRunDetail: z.string().describe(`
11311
11888
  * * Field Name: DuplicateRunDetail
11312
11889
  * * Display Name: Duplicate Run Detail
@@ -11327,12 +11904,12 @@ export const MJDuplicateRunDetailSchema = z.object({
11327
11904
  * * Default Value: newsequentialid()`),
11328
11905
  DuplicateRunID: z.string().describe(`
11329
11906
  * * Field Name: DuplicateRunID
11330
- * * Display Name: Duplicate Run ID
11907
+ * * Display Name: Duplicate Run
11331
11908
  * * SQL Data Type: uniqueidentifier
11332
11909
  * * Related Entity/Foreign Key: MJ: Duplicate Runs (vwDuplicateRuns.ID)`),
11333
11910
  RecordID: z.string().describe(`
11334
11911
  * * Field Name: RecordID
11335
- * * Display Name: Record ID
11912
+ * * Display Name: Record
11336
11913
  * * SQL Data Type: nvarchar(500)
11337
11914
  * * Description: The ID of the record being analyzed for duplicates.`),
11338
11915
  MatchStatus: z.union([z.literal('Complete'), z.literal('Error'), z.literal('Pending'), z.literal('Skipped')]).describe(`
@@ -11384,9 +11961,24 @@ export const MJDuplicateRunDetailSchema = z.object({
11384
11961
  * * Display Name: Updated At
11385
11962
  * * SQL Data Type: datetimeoffset
11386
11963
  * * Default Value: getutcdate()`),
11964
+ RecordMetadata: z.string().nullable().describe(`
11965
+ * * Field Name: RecordMetadata
11966
+ * * Display Name: Record Metadata
11967
+ * * SQL Data Type: nvarchar(MAX)
11968
+ * * Description: JSON metadata snapshot of the source record from the vector database at detection time. Contains display fields (Name, Description, EntityIcon, etc.) for rich UI rendering without additional lookups.`),
11969
+ StartedAt: z.date().nullable().describe(`
11970
+ * * Field Name: StartedAt
11971
+ * * Display Name: Started At
11972
+ * * SQL Data Type: datetimeoffset
11973
+ * * Description: When processing started for this specific record during duplicate detection.`),
11974
+ EndedAt: z.date().nullable().describe(`
11975
+ * * Field Name: EndedAt
11976
+ * * Display Name: Ended At
11977
+ * * SQL Data Type: datetimeoffset
11978
+ * * Description: When processing completed for this specific record during duplicate detection.`),
11387
11979
  DuplicateRun: z.string().describe(`
11388
11980
  * * Field Name: DuplicateRun
11389
- * * Display Name: Duplicate Run
11981
+ * * Display Name: Run Name
11390
11982
  * * SQL Data Type: nvarchar(255)`),
11391
11983
  });
11392
11984
  /**
@@ -11405,14 +11997,15 @@ export const MJDuplicateRunSchema = z.object({
11405
11997
  * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)`),
11406
11998
  StartedByUserID: z.string().describe(`
11407
11999
  * * Field Name: StartedByUserID
11408
- * * Display Name: Started By User
12000
+ * * Display Name: Started By
11409
12001
  * * SQL Data Type: uniqueidentifier
11410
12002
  * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)`),
11411
- SourceListID: z.string().describe(`
12003
+ SourceListID: z.string().nullable().describe(`
11412
12004
  * * Field Name: SourceListID
11413
12005
  * * Display Name: Source List
11414
12006
  * * SQL Data Type: uniqueidentifier
11415
- * * Related Entity/Foreign Key: MJ: Lists (vwLists.ID)`),
12007
+ * * Related Entity/Foreign Key: MJ: Lists (vwLists.ID)
12008
+ * * Description: Optional List ID to narrow the scope of duplicate detection. When NULL, all records in the entity are scanned. When set, only records in the specified list are checked for duplicates.`),
11416
12009
  StartedAt: z.date().describe(`
11417
12010
  * * Field Name: StartedAt
11418
12011
  * * Display Name: Started At
@@ -11440,7 +12033,7 @@ export const MJDuplicateRunSchema = z.object({
11440
12033
  * * Description: Comments or notes regarding the approval decision for this duplicate run.`),
11441
12034
  ApprovedByUserID: z.string().nullable().describe(`
11442
12035
  * * Field Name: ApprovedByUserID
11443
- * * Display Name: Approved By User
12036
+ * * Display Name: Approved By
11444
12037
  * * SQL Data Type: uniqueidentifier
11445
12038
  * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)`),
11446
12039
  ProcessingStatus: z.union([z.literal('Complete'), z.literal('Failed'), z.literal('In Progress'), z.literal('Pending')]).describe(`
@@ -11470,17 +12063,46 @@ export const MJDuplicateRunSchema = z.object({
11470
12063
  * * Display Name: Updated At
11471
12064
  * * SQL Data Type: datetimeoffset
11472
12065
  * * Default Value: getutcdate()`),
12066
+ TotalItemCount: z.number().nullable().describe(`
12067
+ * * Field Name: TotalItemCount
12068
+ * * Display Name: Total Item Count
12069
+ * * SQL Data Type: int
12070
+ * * Description: Total entity records to check for duplicates in this run.`),
12071
+ ProcessedItemCount: z.number().nullable().describe(`
12072
+ * * Field Name: ProcessedItemCount
12073
+ * * Display Name: Processed Item Count
12074
+ * * SQL Data Type: int
12075
+ * * Default Value: 0
12076
+ * * Description: Number of records checked so far. Used for progress percentage.`),
12077
+ LastProcessedOffset: z.number().nullable().describe(`
12078
+ * * Field Name: LastProcessedOffset
12079
+ * * Display Name: Last Processed Offset
12080
+ * * SQL Data Type: int
12081
+ * * Default Value: 0
12082
+ * * Description: Resume cursor for large-scale duplicate detection. Stores the offset of the last completed batch.`),
12083
+ BatchSize: z.number().nullable().describe(`
12084
+ * * Field Name: BatchSize
12085
+ * * Display Name: Batch Size
12086
+ * * SQL Data Type: int
12087
+ * * Default Value: 100
12088
+ * * Description: Number of records processed per batch during duplicate detection.`),
12089
+ CancellationRequested: z.boolean().describe(`
12090
+ * * Field Name: CancellationRequested
12091
+ * * Display Name: Cancellation Requested
12092
+ * * SQL Data Type: bit
12093
+ * * Default Value: 0
12094
+ * * Description: When set to 1, duplicate detection stops after the current batch. Used for pause/cancel.`),
11473
12095
  Entity: z.string().describe(`
11474
12096
  * * Field Name: Entity
11475
- * * Display Name: Entity
12097
+ * * Display Name: Entity Name
11476
12098
  * * SQL Data Type: nvarchar(255)`),
11477
12099
  StartedByUser: z.string().describe(`
11478
12100
  * * Field Name: StartedByUser
11479
12101
  * * Display Name: Started By User
11480
12102
  * * SQL Data Type: nvarchar(100)`),
11481
- SourceList: z.string().describe(`
12103
+ SourceList: z.string().nullable().describe(`
11482
12104
  * * Field Name: SourceList
11483
- * * Display Name: Source List
12105
+ * * Display Name: Source List Name
11484
12106
  * * SQL Data Type: nvarchar(100)`),
11485
12107
  ApprovedByUser: z.string().nullable().describe(`
11486
12108
  * * Field Name: ApprovedByUser
@@ -12890,13 +13512,13 @@ export const MJEntityDocumentSchema = z.object({
12890
13512
  * * Field Name: PotentialMatchThreshold
12891
13513
  * * Display Name: Potential Match Threshold
12892
13514
  * * SQL Data Type: numeric(12, 11)
12893
- * * Default Value: 1
13515
+ * * Default Value: 0.7
12894
13516
  * * Description: Value between 0 and 1 that determines what is considered a potential matching record. Value must be <= AbsoluteMatchThreshold. This is primarily used for duplicate detection but can be used for other applications as well where matching is relevant.`),
12895
13517
  AbsoluteMatchThreshold: z.number().describe(`
12896
13518
  * * Field Name: AbsoluteMatchThreshold
12897
13519
  * * Display Name: Absolute Match Threshold
12898
13520
  * * SQL Data Type: numeric(12, 11)
12899
- * * Default Value: 1
13521
+ * * Default Value: 0.95
12900
13522
  * * Description: Value between 0 and 1 that determines what is considered an absolute matching record. Value must be >= PotentialMatchThreshold. This is primarily used for duplicate detection but can be used for other applications as well where matching is relevant.`),
12901
13523
  __mj_CreatedAt: z.date().describe(`
12902
13524
  * * Field Name: __mj_CreatedAt
@@ -13359,6 +13981,22 @@ export const MJEntityFieldSchema = z.object({
13359
13981
  * * Display Name: Related Entity Join Fields
13360
13982
  * * SQL Data Type: nvarchar(MAX)
13361
13983
  * * Description: JSON configuration for additional fields to join from the related entity into this entity's base view. Supports modes: extend (add to NameField), override (replace NameField), disable (no joins). Schema: { mode?: string, fields?: [{ field: string, alias?: string }] }`),
13984
+ JSONType: z.string().nullable().describe(`
13985
+ * * Field Name: JSONType
13986
+ * * Display Name: JSON Type
13987
+ * * SQL Data Type: nvarchar(255)
13988
+ * * Description: The name of the TypeScript interface/type for this JSON field. When set, CodeGen emits a strongly-typed Object-suffixed accessor using this type instead of only the default string getter/setter.`),
13989
+ JSONTypeIsArray: z.boolean().describe(`
13990
+ * * Field Name: JSONTypeIsArray
13991
+ * * Display Name: JSON Type Is Array
13992
+ * * SQL Data Type: bit
13993
+ * * Default Value: 0
13994
+ * * Description: If true, the field holds a JSON array of JSONType items. The Object accessor returns Array<JSONType> | null and the setter accepts Array<JSONType> | null.`),
13995
+ JSONTypeDefinition: z.string().nullable().describe(`
13996
+ * * Field Name: JSONTypeDefinition
13997
+ * * Display Name: JSON Type Definition
13998
+ * * SQL Data Type: nvarchar(MAX)
13999
+ * * Description: Raw TypeScript code emitted by CodeGen above the entity class definition. Typically contains the interface/type definition referenced by JSONType. Can include imports, multiple types, or any valid TypeScript.`),
13362
14000
  FieldCodeName: z.string().nullable().describe(`
13363
14001
  * * Field Name: FieldCodeName
13364
14002
  * * Display Name: Field Code Name
@@ -15075,6 +15713,63 @@ export const MJIntegrationSchema = z.object({
15075
15713
  * * Display Name: Credential Type Name
15076
15714
  * * SQL Data Type: nvarchar(100)`),
15077
15715
  });
15716
+ /**
15717
+ * zod schema definition for the entity MJ: Knowledge Hub Saved Searches
15718
+ */
15719
+ export const MJKnowledgeHubSavedSearchSchema = z.object({
15720
+ ID: z.string().describe(`
15721
+ * * Field Name: ID
15722
+ * * Display Name: ID
15723
+ * * SQL Data Type: uniqueidentifier
15724
+ * * Default Value: newsequentialid()`),
15725
+ UserID: z.string().describe(`
15726
+ * * Field Name: UserID
15727
+ * * Display Name: User
15728
+ * * SQL Data Type: uniqueidentifier
15729
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)`),
15730
+ Name: z.string().describe(`
15731
+ * * Field Name: Name
15732
+ * * Display Name: Name
15733
+ * * SQL Data Type: nvarchar(255)`),
15734
+ Query: z.string().describe(`
15735
+ * * Field Name: Query
15736
+ * * Display Name: Query
15737
+ * * SQL Data Type: nvarchar(1000)`),
15738
+ Filters: z.string().nullable().describe(`
15739
+ * * Field Name: Filters
15740
+ * * Display Name: Filters
15741
+ * * SQL Data Type: nvarchar(MAX)
15742
+ * * Description: JSON object with active filter selections. Keys are filter categories (Entity, Tags), values are arrays of selected option values.`),
15743
+ MinScore: z.number().nullable().describe(`
15744
+ * * Field Name: MinScore
15745
+ * * Display Name: Minimum Score
15746
+ * * SQL Data Type: decimal(3, 2)`),
15747
+ MaxResults: z.number().nullable().describe(`
15748
+ * * Field Name: MaxResults
15749
+ * * Display Name: Maximum Results
15750
+ * * SQL Data Type: int
15751
+ * * Default Value: 50`),
15752
+ NotifyOnNewResults: z.boolean().describe(`
15753
+ * * Field Name: NotifyOnNewResults
15754
+ * * Display Name: Notify On New Results
15755
+ * * SQL Data Type: bit
15756
+ * * Default Value: 0
15757
+ * * Description: When enabled, the system will notify the user when new results match this saved search (future capability).`),
15758
+ __mj_CreatedAt: z.date().describe(`
15759
+ * * Field Name: __mj_CreatedAt
15760
+ * * Display Name: Created At
15761
+ * * SQL Data Type: datetimeoffset
15762
+ * * Default Value: getutcdate()`),
15763
+ __mj_UpdatedAt: z.date().describe(`
15764
+ * * Field Name: __mj_UpdatedAt
15765
+ * * Display Name: Updated At
15766
+ * * SQL Data Type: datetimeoffset
15767
+ * * Default Value: getutcdate()`),
15768
+ User: z.string().describe(`
15769
+ * * Field Name: User
15770
+ * * Display Name: User Name
15771
+ * * SQL Data Type: nvarchar(100)`),
15772
+ });
15078
15773
  /**
15079
15774
  * zod schema definition for the entity MJ: Libraries
15080
15775
  */
@@ -19554,6 +20249,127 @@ export const MJSQLDialectSchema = z.object({
19554
20249
  * * SQL Data Type: datetimeoffset
19555
20250
  * * Default Value: getutcdate()`),
19556
20251
  });
20252
+ /**
20253
+ * zod schema definition for the entity MJ: Tag Audit Logs
20254
+ */
20255
+ export const MJTagAuditLogSchema = z.object({
20256
+ ID: z.string().describe(`
20257
+ * * Field Name: ID
20258
+ * * Display Name: ID
20259
+ * * SQL Data Type: uniqueidentifier
20260
+ * * Default Value: newsequentialid()`),
20261
+ TagID: z.string().describe(`
20262
+ * * Field Name: TagID
20263
+ * * Display Name: Tag
20264
+ * * SQL Data Type: uniqueidentifier
20265
+ * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)
20266
+ * * Description: The tag that was acted upon.`),
20267
+ Action: z.union([z.literal('Created'), z.literal('Deleted'), z.literal('Deprecated'), z.literal('DescriptionChanged'), z.literal('Merged'), z.literal('Moved'), z.literal('Reactivated'), z.literal('Renamed'), z.literal('Split')]).describe(`
20268
+ * * Field Name: Action
20269
+ * * Display Name: Action
20270
+ * * SQL Data Type: nvarchar(30)
20271
+ * * Value List Type: List
20272
+ * * Possible Values
20273
+ * * Created
20274
+ * * Deleted
20275
+ * * Deprecated
20276
+ * * DescriptionChanged
20277
+ * * Merged
20278
+ * * Moved
20279
+ * * Reactivated
20280
+ * * Renamed
20281
+ * * Split
20282
+ * * Description: The type of action performed: Created, Renamed, Moved (parent changed), Merged (into RelatedTagID), Split (from RelatedTagID), Deprecated, Reactivated, Deleted, DescriptionChanged.`),
20283
+ Details: z.string().nullable().describe(`
20284
+ * * Field Name: Details
20285
+ * * Display Name: Action Details
20286
+ * * SQL Data Type: nvarchar(MAX)
20287
+ * * Description: JSON object with action-specific details. For Renamed: {"OldName":"...","NewName":"..."}. For Moved: {"OldParentID":"...","NewParentID":"..."}. For Merged: {"ItemsMoved":42}.`),
20288
+ PerformedByUserID: z.string().describe(`
20289
+ * * Field Name: PerformedByUserID
20290
+ * * Display Name: Performed By User
20291
+ * * SQL Data Type: uniqueidentifier
20292
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
20293
+ * * Description: User who performed the action.`),
20294
+ RelatedTagID: z.string().nullable().describe(`
20295
+ * * Field Name: RelatedTagID
20296
+ * * Display Name: Related Tag
20297
+ * * SQL Data Type: uniqueidentifier
20298
+ * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)
20299
+ * * Description: For Merged actions: the surviving tag. For Split actions: the source tag. NULL for other actions.`),
20300
+ __mj_CreatedAt: z.date().describe(`
20301
+ * * Field Name: __mj_CreatedAt
20302
+ * * Display Name: Created At
20303
+ * * SQL Data Type: datetimeoffset
20304
+ * * Default Value: getutcdate()`),
20305
+ __mj_UpdatedAt: z.date().describe(`
20306
+ * * Field Name: __mj_UpdatedAt
20307
+ * * Display Name: Updated At
20308
+ * * SQL Data Type: datetimeoffset
20309
+ * * Default Value: getutcdate()`),
20310
+ Tag: z.string().describe(`
20311
+ * * Field Name: Tag
20312
+ * * Display Name: Tag Name
20313
+ * * SQL Data Type: nvarchar(255)`),
20314
+ PerformedByUser: z.string().describe(`
20315
+ * * Field Name: PerformedByUser
20316
+ * * Display Name: User Name
20317
+ * * SQL Data Type: nvarchar(100)`),
20318
+ RelatedTag: z.string().nullable().describe(`
20319
+ * * Field Name: RelatedTag
20320
+ * * Display Name: Related Tag Name
20321
+ * * SQL Data Type: nvarchar(255)`),
20322
+ });
20323
+ /**
20324
+ * zod schema definition for the entity MJ: Tag Co Occurrences
20325
+ */
20326
+ export const MJTagCoOccurrenceSchema = z.object({
20327
+ ID: z.string().describe(`
20328
+ * * Field Name: ID
20329
+ * * Display Name: ID
20330
+ * * SQL Data Type: uniqueidentifier
20331
+ * * Default Value: newsequentialid()`),
20332
+ TagAID: z.string().describe(`
20333
+ * * Field Name: TagAID
20334
+ * * Display Name: Tag A ID
20335
+ * * SQL Data Type: uniqueidentifier
20336
+ * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)
20337
+ * * Description: First tag in the canonical pair (TagAID < TagBID ensures each pair is stored exactly once).`),
20338
+ TagBID: z.string().describe(`
20339
+ * * Field Name: TagBID
20340
+ * * Display Name: Tag B ID
20341
+ * * SQL Data Type: uniqueidentifier
20342
+ * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)`),
20343
+ CoOccurrenceCount: z.number().describe(`
20344
+ * * Field Name: CoOccurrenceCount
20345
+ * * Display Name: Co-Occurrence Count
20346
+ * * SQL Data Type: int
20347
+ * * Default Value: 0
20348
+ * * Description: Number of content items (or entity records via TaggedItem) that are tagged with both TagA and TagB.`),
20349
+ LastComputedAt: z.date().describe(`
20350
+ * * Field Name: LastComputedAt
20351
+ * * Display Name: Last Computed At
20352
+ * * SQL Data Type: datetimeoffset
20353
+ * * Default Value: getutcdate()`),
20354
+ __mj_CreatedAt: z.date().describe(`
20355
+ * * Field Name: __mj_CreatedAt
20356
+ * * Display Name: Created At
20357
+ * * SQL Data Type: datetimeoffset
20358
+ * * Default Value: getutcdate()`),
20359
+ __mj_UpdatedAt: z.date().describe(`
20360
+ * * Field Name: __mj_UpdatedAt
20361
+ * * Display Name: Updated At
20362
+ * * SQL Data Type: datetimeoffset
20363
+ * * Default Value: getutcdate()`),
20364
+ TagA: z.string().describe(`
20365
+ * * Field Name: TagA
20366
+ * * Display Name: Tag A
20367
+ * * SQL Data Type: nvarchar(255)`),
20368
+ TagB: z.string().describe(`
20369
+ * * Field Name: TagB
20370
+ * * Display Name: Tag B
20371
+ * * SQL Data Type: nvarchar(255)`),
20372
+ });
19557
20373
  /**
19558
20374
  * zod schema definition for the entity MJ: Tagged Items
19559
20375
  */
@@ -19588,6 +20404,12 @@ export const MJTaggedItemSchema = z.object({
19588
20404
  * * Display Name: Updated At
19589
20405
  * * SQL Data Type: datetimeoffset
19590
20406
  * * Default Value: getutcdate()`),
20407
+ Weight: z.number().describe(`
20408
+ * * Field Name: Weight
20409
+ * * Display Name: Weight
20410
+ * * SQL Data Type: numeric(5, 4)
20411
+ * * Default Value: 1.0
20412
+ * * Description: Relevance weight of this tag association (0.0 to 1.0). 1.0 indicates the tag is highly relevant or was manually applied. Lower values indicate decreasing relevance as determined by LLM autotagging. Default 1.0 for manually applied tags.`),
19591
20413
  Tag: z.string().describe(`
19592
20414
  * * Field Name: Tag
19593
20415
  * * Display Name: Tag
@@ -19612,7 +20434,7 @@ export const MJTagSchema = z.object({
19612
20434
  * * SQL Data Type: nvarchar(255)`),
19613
20435
  ParentID: z.string().nullable().describe(`
19614
20436
  * * Field Name: ParentID
19615
- * * Display Name: Parent ID
20437
+ * * Display Name: Parent
19616
20438
  * * SQL Data Type: uniqueidentifier
19617
20439
  * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)`),
19618
20440
  DisplayName: z.string().describe(`
@@ -19634,13 +20456,39 @@ export const MJTagSchema = z.object({
19634
20456
  * * Display Name: Updated At
19635
20457
  * * SQL Data Type: datetimeoffset
19636
20458
  * * Default Value: getutcdate()`),
20459
+ Status: z.union([z.literal('Active'), z.literal('Deleted'), z.literal('Deprecated'), z.literal('Merged')]).describe(`
20460
+ * * Field Name: Status
20461
+ * * Display Name: Status
20462
+ * * SQL Data Type: nvarchar(20)
20463
+ * * Default Value: Active
20464
+ * * Value List Type: List
20465
+ * * Possible Values
20466
+ * * Active
20467
+ * * Deleted
20468
+ * * Deprecated
20469
+ * * Merged
20470
+ * * Description: Lifecycle status of the tag: Active (in use), Merged (consolidated into another tag), Deprecated (no longer assigned but preserved), Deleted (soft-deleted).`),
20471
+ MergedIntoTagID: z.string().nullable().describe(`
20472
+ * * Field Name: MergedIntoTagID
20473
+ * * Display Name: Merged Into Tag
20474
+ * * SQL Data Type: uniqueidentifier
20475
+ * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)
20476
+ * * Description: When Status is Merged, points to the surviving tag this tag was merged into. All TaggedItem and ContentItemTag references are re-pointed during merge.`),
19637
20477
  Parent: z.string().nullable().describe(`
19638
20478
  * * Field Name: Parent
19639
- * * Display Name: Parent
20479
+ * * Display Name: Parent Name
20480
+ * * SQL Data Type: nvarchar(255)`),
20481
+ MergedIntoTag: z.string().nullable().describe(`
20482
+ * * Field Name: MergedIntoTag
20483
+ * * Display Name: Merged Into Tag Name
19640
20484
  * * SQL Data Type: nvarchar(255)`),
19641
20485
  RootParentID: z.string().nullable().describe(`
19642
20486
  * * Field Name: RootParentID
19643
- * * Display Name: Root Parent ID
20487
+ * * Display Name: Root Parent
20488
+ * * SQL Data Type: uniqueidentifier`),
20489
+ RootMergedIntoTagID: z.string().nullable().describe(`
20490
+ * * Field Name: RootMergedIntoTagID
20491
+ * * Display Name: Root Merged Into Tag
19644
20492
  * * SQL Data Type: uniqueidentifier`),
19645
20493
  });
19646
20494
  /**
@@ -21797,15 +22645,17 @@ export const MJUserViewSchema = z.object({
21797
22645
  * * SQL Data Type: bit
21798
22646
  * * Default Value: 0
21799
22647
  * * Description: Whether this is the user's default view for the entity.`),
21800
- GridState: z.string().nullable().describe(`
22648
+ GridState: z.any().nullable().describe(`
21801
22649
  * * Field Name: GridState
21802
22650
  * * Display Name: Grid State
21803
22651
  * * SQL Data Type: nvarchar(MAX)
22652
+ * * JSON Type: MJUserViewEntity_IGridState
21804
22653
  * * Description: JSON storing complete grid configuration including columns, widths, and formatting.`),
21805
- FilterState: z.string().nullable().describe(`
22654
+ FilterState: z.any().nullable().describe(`
21806
22655
  * * Field Name: FilterState
21807
22656
  * * Display Name: Filter State
21808
22657
  * * SQL Data Type: nvarchar(MAX)
22658
+ * * JSON Type: MJUserViewEntity_IFilterState
21809
22659
  * * Description: JSON storing the view's filter configuration.`),
21810
22660
  CustomFilterState: z.boolean().describe(`
21811
22661
  * * Field Name: CustomFilterState
@@ -21845,10 +22695,11 @@ export const MJUserViewSchema = z.object({
21845
22695
  * * SQL Data Type: bit
21846
22696
  * * Default Value: 0
21847
22697
  * * Description: Indicates if a custom WHERE clause is used instead of standard filters.`),
21848
- SortState: z.string().nullable().describe(`
22698
+ SortState: z.any().nullable().describe(`
21849
22699
  * * Field Name: SortState
21850
22700
  * * Display Name: Sort State
21851
22701
  * * SQL Data Type: nvarchar(MAX)
22702
+ * * JSON Type: Array<MJUserViewEntity_ISortStateItem>
21852
22703
  * * Description: JSON storing the view's sort configuration.`),
21853
22704
  __mj_CreatedAt: z.date().describe(`
21854
22705
  * * Field Name: __mj_CreatedAt
@@ -21865,15 +22716,17 @@ export const MJUserViewSchema = z.object({
21865
22716
  * * Display Name: Thumbnail
21866
22717
  * * SQL Data Type: nvarchar(MAX)
21867
22718
  * * Description: Thumbnail image for the user view that can be displayed in gallery views. Can contain either a URL to an image file or a Base64-encoded image string.`),
21868
- CardState: z.string().nullable().describe(`
22719
+ CardState: z.any().nullable().describe(`
21869
22720
  * * Field Name: CardState
21870
22721
  * * Display Name: Card State
21871
22722
  * * SQL Data Type: nvarchar(MAX)
22723
+ * * JSON Type: MJUserViewEntity_ICardState
21872
22724
  * * Description: JSON configuration for card display mode in Data Explorer. Stores card layout settings including title field, subtitle, display fields, thumbnails, and layout density. When null, defaults are derived from entity metadata. See CardState interface in packages/Angular/Generic/entity-viewer/src/lib/types.ts for the current schema definition.`),
21873
- DisplayState: z.string().nullable().describe(`
22725
+ DisplayState: z.any().nullable().describe(`
21874
22726
  * * Field Name: DisplayState
21875
22727
  * * Display Name: Display State
21876
22728
  * * SQL Data Type: nvarchar(MAX)
22729
+ * * JSON Type: MJUserViewEntity_IDisplayState
21877
22730
  * * Description: JSON configuration for display mode settings. Stores default display mode (grid/cards/timeline/chart), available modes for sharing, and mode-specific configurations like timeline date field and segmentation. See ViewDisplayState interface in packages/Angular/Generic/entity-viewer/src/lib/types.ts for schema.`),
21878
22731
  UserName: z.string().describe(`
21879
22732
  * * Field Name: UserName
@@ -25284,6 +26137,134 @@ MJAIAgentCategoryEntity = __decorate([
25284
26137
  RegisterClass(BaseEntity, 'MJ: AI Agent Categories')
25285
26138
  ], MJAIAgentCategoryEntity);
25286
26139
  export { MJAIAgentCategoryEntity };
26140
+ /**
26141
+ * MJ: AI Agent Client Tools - strongly typed entity sub-class
26142
+ * * Schema: __mj
26143
+ * * Base Table: AIAgentClientTool
26144
+ * * Base View: vwAIAgentClientTools
26145
+ * * Primary Key: ID
26146
+ * @extends {BaseEntity}
26147
+ * @class
26148
+ * @public
26149
+ */
26150
+ let MJAIAgentClientToolEntity = class MJAIAgentClientToolEntity extends BaseEntity {
26151
+ /**
26152
+ * Loads the MJ: AI Agent Client Tools record from the database
26153
+ * @param ID: string - primary key value to load the MJ: AI Agent Client Tools record.
26154
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
26155
+ * @returns {Promise<boolean>} - true if successful, false otherwise
26156
+ * @public
26157
+ * @async
26158
+ * @memberof MJAIAgentClientToolEntity
26159
+ * @method
26160
+ * @override
26161
+ */
26162
+ async Load(ID, EntityRelationshipsToLoad) {
26163
+ const compositeKey = new CompositeKey();
26164
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
26165
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
26166
+ }
26167
+ /**
26168
+ * * Field Name: ID
26169
+ * * Display Name: ID
26170
+ * * SQL Data Type: uniqueidentifier
26171
+ * * Default Value: newsequentialid()
26172
+ */
26173
+ get ID() {
26174
+ return this.Get('ID');
26175
+ }
26176
+ set ID(value) {
26177
+ this.Set('ID', value);
26178
+ }
26179
+ /**
26180
+ * * Field Name: AgentID
26181
+ * * Display Name: Agent
26182
+ * * SQL Data Type: uniqueidentifier
26183
+ * * Related Entity/Foreign Key: MJ: AI Agents (vwAIAgents.ID)
26184
+ */
26185
+ get AgentID() {
26186
+ return this.Get('AgentID');
26187
+ }
26188
+ set AgentID(value) {
26189
+ this.Set('AgentID', value);
26190
+ }
26191
+ /**
26192
+ * * Field Name: ClientToolDefinitionID
26193
+ * * Display Name: Tool Definition
26194
+ * * SQL Data Type: uniqueidentifier
26195
+ * * Related Entity/Foreign Key: MJ: AI Client Tool Definitions (vwAIClientToolDefinitions.ID)
26196
+ */
26197
+ get ClientToolDefinitionID() {
26198
+ return this.Get('ClientToolDefinitionID');
26199
+ }
26200
+ set ClientToolDefinitionID(value) {
26201
+ this.Set('ClientToolDefinitionID', value);
26202
+ }
26203
+ /**
26204
+ * * Field Name: IsRequired
26205
+ * * Display Name: Is Required
26206
+ * * SQL Data Type: bit
26207
+ * * Default Value: 0
26208
+ * * Description: When true, the agent expects this tool to always be available on the client. If the client has not registered a handler, agent execution may warn or fail depending on configuration.
26209
+ */
26210
+ get IsRequired() {
26211
+ return this.Get('IsRequired');
26212
+ }
26213
+ set IsRequired(value) {
26214
+ this.Set('IsRequired', value);
26215
+ }
26216
+ /**
26217
+ * * Field Name: Priority
26218
+ * * Display Name: Priority
26219
+ * * SQL Data Type: int
26220
+ * * Default Value: 0
26221
+ * * Description: Sort order for tool listing in prompts. Lower numbers appear first. Tools with the same priority are listed alphabetically.
26222
+ */
26223
+ get Priority() {
26224
+ return this.Get('Priority');
26225
+ }
26226
+ set Priority(value) {
26227
+ this.Set('Priority', value);
26228
+ }
26229
+ /**
26230
+ * * Field Name: __mj_CreatedAt
26231
+ * * Display Name: Created At
26232
+ * * SQL Data Type: datetimeoffset
26233
+ * * Default Value: getutcdate()
26234
+ */
26235
+ get __mj_CreatedAt() {
26236
+ return this.Get('__mj_CreatedAt');
26237
+ }
26238
+ /**
26239
+ * * Field Name: __mj_UpdatedAt
26240
+ * * Display Name: Updated At
26241
+ * * SQL Data Type: datetimeoffset
26242
+ * * Default Value: getutcdate()
26243
+ */
26244
+ get __mj_UpdatedAt() {
26245
+ return this.Get('__mj_UpdatedAt');
26246
+ }
26247
+ /**
26248
+ * * Field Name: Agent
26249
+ * * Display Name: Agent Name
26250
+ * * SQL Data Type: nvarchar(255)
26251
+ */
26252
+ get Agent() {
26253
+ return this.Get('Agent');
26254
+ }
26255
+ /**
26256
+ * * Field Name: ClientToolDefinition
26257
+ * * Display Name: Tool Name
26258
+ * * SQL Data Type: nvarchar(200)
26259
+ */
26260
+ get ClientToolDefinition() {
26261
+ return this.Get('ClientToolDefinition');
26262
+ }
26263
+ };
26264
+ MJAIAgentClientToolEntity = __decorate([
26265
+ RegisterClass(BaseEntity, 'MJ: AI Agent Client Tools')
26266
+ ], MJAIAgentClientToolEntity);
26267
+ export { MJAIAgentClientToolEntity };
25287
26268
  /**
25288
26269
  * MJ: AI Agent Configurations - strongly typed entity sub-class
25289
26270
  * * Schema: __mj
@@ -31027,7 +32008,7 @@ let MJAIAgentEntity = class MJAIAgentEntity extends BaseEntity {
31027
32008
  }
31028
32009
  /**
31029
32010
  * * Field Name: ContextCompressionPromptID
31030
- * * Display Name: Context Compression Prompt
32011
+ * * Display Name: Compression Prompt
31031
32012
  * * SQL Data Type: uniqueidentifier
31032
32013
  * * Related Entity/Foreign Key: MJ: AI Prompts (vwAIPrompts.ID)
31033
32014
  */
@@ -31378,7 +32359,7 @@ if this limit is exceeded.
31378
32359
  }
31379
32360
  /**
31380
32361
  * * Field Name: OwnerUserID
31381
- * * Display Name: Owner
32362
+ * * Display Name: Owner User
31382
32363
  * * SQL Data Type: uniqueidentifier
31383
32364
  * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
31384
32365
  * * Default Value: ECAFCCEC-6A37-EF11-86D4-000D3A4E707E
@@ -31609,7 +32590,7 @@ if this limit is exceeded.
31609
32590
  }
31610
32591
  /**
31611
32592
  * * Field Name: InlineStorageThresholdBytes
31612
- * * Display Name: Inline Storage Threshold (Bytes)
32593
+ * * Display Name: Inline Storage Threshold Bytes
31613
32594
  * * SQL Data Type: int
31614
32595
  * * Description: File size threshold for inline storage. Files <= this size are stored as base64 inline, larger files use MJStorage. NULL uses system default (1MB). Set to 0 to always use MJStorage.
31615
32596
  */
@@ -31645,7 +32626,7 @@ if this limit is exceeded.
31645
32626
  }
31646
32627
  /**
31647
32628
  * * Field Name: NoteRetentionDays
31648
- * * Display Name: Note Retention (Days)
32629
+ * * Display Name: Note Retention Days
31649
32630
  * * SQL Data Type: int
31650
32631
  * * Default Value: 90
31651
32632
  * * Description: Number of days to retain notes before archiving due to inactivity. Default 90. NULL means use system default.
@@ -31658,7 +32639,7 @@ if this limit is exceeded.
31658
32639
  }
31659
32640
  /**
31660
32641
  * * Field Name: ExampleRetentionDays
31661
- * * Display Name: Example Retention (Days)
32642
+ * * Display Name: Example Retention Days
31662
32643
  * * SQL Data Type: int
31663
32644
  * * Default Value: 180
31664
32645
  * * Description: Number of days to retain examples before archiving due to inactivity. Default 180. NULL means use system default.
@@ -31708,6 +32689,19 @@ if this limit is exceeded.
31708
32689
  this.Set('CategoryID', value);
31709
32690
  }
31710
32691
  /**
32692
+ * * Field Name: AllowEphemeralClientTools
32693
+ * * Display Name: Allow Ephemeral Client Tools
32694
+ * * SQL Data Type: bit
32695
+ * * Default Value: 1
32696
+ * * Description: When true (default), this agent accepts runtime-registered ephemeral client tools that are not defined in metadata. Set to false for agents that require strict tool governance.
32697
+ */
32698
+ get AllowEphemeralClientTools() {
32699
+ return this.Get('AllowEphemeralClientTools');
32700
+ }
32701
+ set AllowEphemeralClientTools(value) {
32702
+ this.Set('AllowEphemeralClientTools', value);
32703
+ }
32704
+ /**
31711
32705
  * * Field Name: Parent
31712
32706
  * * Display Name: Parent Name
31713
32707
  * * SQL Data Type: nvarchar(255)
@@ -31741,7 +32735,7 @@ if this limit is exceeded.
31741
32735
  }
31742
32736
  /**
31743
32737
  * * Field Name: OwnerUser
31744
- * * Display Name: Owner Name
32738
+ * * Display Name: Owner User Name
31745
32739
  * * SQL Data Type: nvarchar(100)
31746
32740
  */
31747
32741
  get OwnerUser() {
@@ -31940,6 +32934,153 @@ MJAIArchitectureEntity = __decorate([
31940
32934
  RegisterClass(BaseEntity, 'MJ: AI Architectures')
31941
32935
  ], MJAIArchitectureEntity);
31942
32936
  export { MJAIArchitectureEntity };
32937
+ /**
32938
+ * MJ: AI Client Tool Definitions - strongly typed entity sub-class
32939
+ * * Schema: __mj
32940
+ * * Base Table: AIClientToolDefinition
32941
+ * * Base View: vwAIClientToolDefinitions
32942
+ * * Primary Key: ID
32943
+ * @extends {BaseEntity}
32944
+ * @class
32945
+ * @public
32946
+ */
32947
+ let MJAIClientToolDefinitionEntity = class MJAIClientToolDefinitionEntity extends BaseEntity {
32948
+ /**
32949
+ * Loads the MJ: AI Client Tool Definitions record from the database
32950
+ * @param ID: string - primary key value to load the MJ: AI Client Tool Definitions record.
32951
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
32952
+ * @returns {Promise<boolean>} - true if successful, false otherwise
32953
+ * @public
32954
+ * @async
32955
+ * @memberof MJAIClientToolDefinitionEntity
32956
+ * @method
32957
+ * @override
32958
+ */
32959
+ async Load(ID, EntityRelationshipsToLoad) {
32960
+ const compositeKey = new CompositeKey();
32961
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
32962
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
32963
+ }
32964
+ /**
32965
+ * * Field Name: ID
32966
+ * * Display Name: ID
32967
+ * * SQL Data Type: uniqueidentifier
32968
+ * * Default Value: newsequentialid()
32969
+ */
32970
+ get ID() {
32971
+ return this.Get('ID');
32972
+ }
32973
+ set ID(value) {
32974
+ this.Set('ID', value);
32975
+ }
32976
+ /**
32977
+ * * Field Name: Name
32978
+ * * Display Name: Tool Name
32979
+ * * SQL Data Type: nvarchar(200)
32980
+ * * Description: Unique identifier for the client tool (e.g., NavigateToApp, NavigateToRecord). Used to match tool invocations from the LLM to registered handlers on the client.
32981
+ */
32982
+ get Name() {
32983
+ return this.Get('Name');
32984
+ }
32985
+ set Name(value) {
32986
+ this.Set('Name', value);
32987
+ }
32988
+ /**
32989
+ * * Field Name: Description
32990
+ * * Display Name: Description
32991
+ * * SQL Data Type: nvarchar(MAX)
32992
+ * * Description: Human-readable description of what the tool does. This text is injected into the LLM system prompt so it knows when and how to use the tool.
32993
+ */
32994
+ get Description() {
32995
+ return this.Get('Description');
32996
+ }
32997
+ set Description(value) {
32998
+ this.Set('Description', value);
32999
+ }
33000
+ /**
33001
+ * * Field Name: Category
33002
+ * * Display Name: Category
33003
+ * * SQL Data Type: nvarchar(50)
33004
+ * * Description: Tool category for grouping and filtering (e.g., navigation, form, display, data).
33005
+ */
33006
+ get Category() {
33007
+ return this.Get('Category');
33008
+ }
33009
+ set Category(value) {
33010
+ this.Set('Category', value);
33011
+ }
33012
+ /**
33013
+ * * Field Name: InputSchemaJSON
33014
+ * * Display Name: Input Schema
33015
+ * * SQL Data Type: nvarchar(MAX)
33016
+ * * Description: JSON Schema defining the input parameters the tool accepts. Included in the LLM prompt so it generates valid parameter objects.
33017
+ */
33018
+ get InputSchemaJSON() {
33019
+ return this.Get('InputSchemaJSON');
33020
+ }
33021
+ set InputSchemaJSON(value) {
33022
+ this.Set('InputSchemaJSON', value);
33023
+ }
33024
+ /**
33025
+ * * Field Name: OutputSchemaJSON
33026
+ * * Display Name: Output Schema
33027
+ * * SQL Data Type: nvarchar(MAX)
33028
+ * * Description: JSON Schema describing the return value from the tool. Optional — used for documentation and LLM context.
33029
+ */
33030
+ get OutputSchemaJSON() {
33031
+ return this.Get('OutputSchemaJSON');
33032
+ }
33033
+ set OutputSchemaJSON(value) {
33034
+ this.Set('OutputSchemaJSON', value);
33035
+ }
33036
+ /**
33037
+ * * Field Name: DefaultTimeoutMs
33038
+ * * Display Name: Default Timeout (ms)
33039
+ * * SQL Data Type: int
33040
+ * * Default Value: 30000
33041
+ * * Description: Default timeout in milliseconds for this tool. Can be overridden per-invocation by the LLM or per-run by execution params. Default is 30000ms (30 seconds).
33042
+ */
33043
+ get DefaultTimeoutMs() {
33044
+ return this.Get('DefaultTimeoutMs');
33045
+ }
33046
+ set DefaultTimeoutMs(value) {
33047
+ this.Set('DefaultTimeoutMs', value);
33048
+ }
33049
+ /**
33050
+ * * Field Name: RequiresContextType
33051
+ * * Display Name: Required Context Type
33052
+ * * SQL Data Type: nvarchar(100)
33053
+ * * Description: When set, the client only sends this tool to the server when the user is in the specified context (e.g., entity-form, dashboard, search). Null means the tool is always available.
33054
+ */
33055
+ get RequiresContextType() {
33056
+ return this.Get('RequiresContextType');
33057
+ }
33058
+ set RequiresContextType(value) {
33059
+ this.Set('RequiresContextType', value);
33060
+ }
33061
+ /**
33062
+ * * Field Name: __mj_CreatedAt
33063
+ * * Display Name: Created At
33064
+ * * SQL Data Type: datetimeoffset
33065
+ * * Default Value: getutcdate()
33066
+ */
33067
+ get __mj_CreatedAt() {
33068
+ return this.Get('__mj_CreatedAt');
33069
+ }
33070
+ /**
33071
+ * * Field Name: __mj_UpdatedAt
33072
+ * * Display Name: Updated At
33073
+ * * SQL Data Type: datetimeoffset
33074
+ * * Default Value: getutcdate()
33075
+ */
33076
+ get __mj_UpdatedAt() {
33077
+ return this.Get('__mj_UpdatedAt');
33078
+ }
33079
+ };
33080
+ MJAIClientToolDefinitionEntity = __decorate([
33081
+ RegisterClass(BaseEntity, 'MJ: AI Client Tool Definitions')
33082
+ ], MJAIClientToolDefinitionEntity);
33083
+ export { MJAIClientToolDefinitionEntity };
31943
33084
  /**
31944
33085
  * MJ: AI Configuration Params - strongly typed entity sub-class
31945
33086
  * * Schema: __mj
@@ -39747,6 +40888,11 @@ export { MJApplicationSettingEntity };
39747
40888
  * @public
39748
40889
  */
39749
40890
  let MJApplicationEntity = class MJApplicationEntity extends BaseEntity {
40891
+ constructor() {
40892
+ super(...arguments);
40893
+ this._DefaultNavItemsObject_cached = undefined;
40894
+ this._DefaultNavItemsObject_lastRaw = null;
40895
+ }
39750
40896
  /**
39751
40897
  * Loads the MJ: Applications record from the database
39752
40898
  * @param ID: string - primary key value to load the MJ: Applications record.
@@ -39868,6 +41014,7 @@ let MJApplicationEntity = class MJApplicationEntity extends BaseEntity {
39868
41014
  * * Field Name: DefaultNavItems
39869
41015
  * * Display Name: Default Nav Items
39870
41016
  * * SQL Data Type: nvarchar(MAX)
41017
+ * * JSON Type: Array<MJApplicationEntity_IDefaultNavItem>
39871
41018
  * * Description: JSON array of default navigation items for this application. Parsed by BaseApplication.GetNavItems()
39872
41019
  */
39873
41020
  get DefaultNavItems() {
@@ -39877,6 +41024,24 @@ let MJApplicationEntity = class MJApplicationEntity extends BaseEntity {
39877
41024
  this.Set('DefaultNavItems', value);
39878
41025
  }
39879
41026
  /**
41027
+ * Typed accessor for DefaultNavItems — returns parsed JSON as Array<MJApplicationEntity_IDefaultNavItem>.
41028
+ * Uses lazy parsing with cache invalidation when the underlying raw value changes.
41029
+ */
41030
+ get DefaultNavItemsObject() {
41031
+ const raw = this.DefaultNavItems;
41032
+ if (raw !== this._DefaultNavItemsObject_lastRaw) {
41033
+ this._DefaultNavItemsObject_cached = raw ? JSON.parse(raw) : null;
41034
+ this._DefaultNavItemsObject_lastRaw = raw;
41035
+ }
41036
+ return this._DefaultNavItemsObject_cached;
41037
+ }
41038
+ set DefaultNavItemsObject(value) {
41039
+ const raw = value ? JSON.stringify(value) : null;
41040
+ this.DefaultNavItems = raw;
41041
+ this._DefaultNavItemsObject_cached = value;
41042
+ this._DefaultNavItemsObject_lastRaw = raw;
41043
+ }
41044
+ /**
39880
41045
  * * Field Name: ClassName
39881
41046
  * * Display Name: Class Name
39882
41047
  * * SQL Data Type: nvarchar(255)
@@ -45946,6 +47111,208 @@ MJContentItemAttributeEntity = __decorate([
45946
47111
  RegisterClass(BaseEntity, 'MJ: Content Item Attributes')
45947
47112
  ], MJContentItemAttributeEntity);
45948
47113
  export { MJContentItemAttributeEntity };
47114
+ /**
47115
+ * MJ: Content Item Duplicates - strongly typed entity sub-class
47116
+ * * Schema: __mj
47117
+ * * Base Table: ContentItemDuplicate
47118
+ * * Base View: vwContentItemDuplicates
47119
+ * * @description Detected duplicate or near-duplicate content items across sources. Each row represents a pair of items with similarity scoring and resolution tracking.
47120
+ * * Primary Key: ID
47121
+ * @extends {BaseEntity}
47122
+ * @class
47123
+ * @public
47124
+ */
47125
+ let MJContentItemDuplicateEntity = class MJContentItemDuplicateEntity extends BaseEntity {
47126
+ /**
47127
+ * Loads the MJ: Content Item Duplicates record from the database
47128
+ * @param ID: string - primary key value to load the MJ: Content Item Duplicates record.
47129
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
47130
+ * @returns {Promise<boolean>} - true if successful, false otherwise
47131
+ * @public
47132
+ * @async
47133
+ * @memberof MJContentItemDuplicateEntity
47134
+ * @method
47135
+ * @override
47136
+ */
47137
+ async Load(ID, EntityRelationshipsToLoad) {
47138
+ const compositeKey = new CompositeKey();
47139
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
47140
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
47141
+ }
47142
+ /**
47143
+ * * Field Name: ID
47144
+ * * Display Name: ID
47145
+ * * SQL Data Type: uniqueidentifier
47146
+ * * Default Value: newsequentialid()
47147
+ */
47148
+ get ID() {
47149
+ return this.Get('ID');
47150
+ }
47151
+ set ID(value) {
47152
+ this.Set('ID', value);
47153
+ }
47154
+ /**
47155
+ * * Field Name: ContentItemAID
47156
+ * * Display Name: Content Item A ID
47157
+ * * SQL Data Type: uniqueidentifier
47158
+ * * Related Entity/Foreign Key: MJ: Content Items (vwContentItems.ID)
47159
+ */
47160
+ get ContentItemAID() {
47161
+ return this.Get('ContentItemAID');
47162
+ }
47163
+ set ContentItemAID(value) {
47164
+ this.Set('ContentItemAID', value);
47165
+ }
47166
+ /**
47167
+ * * Field Name: ContentItemBID
47168
+ * * Display Name: Content Item B ID
47169
+ * * SQL Data Type: uniqueidentifier
47170
+ * * Related Entity/Foreign Key: MJ: Content Items (vwContentItems.ID)
47171
+ */
47172
+ get ContentItemBID() {
47173
+ return this.Get('ContentItemBID');
47174
+ }
47175
+ set ContentItemBID(value) {
47176
+ this.Set('ContentItemBID', value);
47177
+ }
47178
+ /**
47179
+ * * Field Name: SimilarityScore
47180
+ * * Display Name: Similarity Score
47181
+ * * SQL Data Type: decimal(5, 4)
47182
+ * * Description: Cosine similarity (for Vector) or exact match score (1.0 for Checksum/URL). Range 0.0-1.0.
47183
+ */
47184
+ get SimilarityScore() {
47185
+ return this.Get('SimilarityScore');
47186
+ }
47187
+ set SimilarityScore(value) {
47188
+ this.Set('SimilarityScore', value);
47189
+ }
47190
+ /**
47191
+ * * Field Name: DetectionMethod
47192
+ * * Display Name: Detection Method
47193
+ * * SQL Data Type: nvarchar(30)
47194
+ * * Default Value: Checksum
47195
+ * * Value List Type: List
47196
+ * * Possible Values
47197
+ * * Checksum
47198
+ * * Title
47199
+ * * URL
47200
+ * * Vector
47201
+ * * Description: How the duplicate was detected: Checksum (identical text hash), Vector (embedding similarity), Title (same title text), URL (same source URL).
47202
+ */
47203
+ get DetectionMethod() {
47204
+ return this.Get('DetectionMethod');
47205
+ }
47206
+ set DetectionMethod(value) {
47207
+ this.Set('DetectionMethod', value);
47208
+ }
47209
+ /**
47210
+ * * Field Name: Status
47211
+ * * Display Name: Status
47212
+ * * SQL Data Type: nvarchar(20)
47213
+ * * Default Value: Pending
47214
+ * * Value List Type: List
47215
+ * * Possible Values
47216
+ * * Confirmed
47217
+ * * Dismissed
47218
+ * * Merged
47219
+ * * Pending
47220
+ * * Description: Current status: Pending (awaiting review), Confirmed (verified duplicate), Dismissed (not a duplicate), Merged (one item was removed).
47221
+ */
47222
+ get Status() {
47223
+ return this.Get('Status');
47224
+ }
47225
+ set Status(value) {
47226
+ this.Set('Status', value);
47227
+ }
47228
+ /**
47229
+ * * Field Name: ResolvedByUserID
47230
+ * * Display Name: Resolved By User ID
47231
+ * * SQL Data Type: uniqueidentifier
47232
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
47233
+ */
47234
+ get ResolvedByUserID() {
47235
+ return this.Get('ResolvedByUserID');
47236
+ }
47237
+ set ResolvedByUserID(value) {
47238
+ this.Set('ResolvedByUserID', value);
47239
+ }
47240
+ /**
47241
+ * * Field Name: ResolvedAt
47242
+ * * Display Name: Resolved At
47243
+ * * SQL Data Type: datetimeoffset
47244
+ */
47245
+ get ResolvedAt() {
47246
+ return this.Get('ResolvedAt');
47247
+ }
47248
+ set ResolvedAt(value) {
47249
+ this.Set('ResolvedAt', value);
47250
+ }
47251
+ /**
47252
+ * * Field Name: Resolution
47253
+ * * Display Name: Resolution
47254
+ * * SQL Data Type: nvarchar(20)
47255
+ * * Value List Type: List
47256
+ * * Possible Values
47257
+ * * KeepA
47258
+ * * KeepB
47259
+ * * MergeBoth
47260
+ * * NotDuplicate
47261
+ * * Description: How the duplicate was resolved: KeepA (keep first, remove second), KeepB (keep second, remove first), MergeBoth (combine into one), NotDuplicate (false positive).
47262
+ */
47263
+ get Resolution() {
47264
+ return this.Get('Resolution');
47265
+ }
47266
+ set Resolution(value) {
47267
+ this.Set('Resolution', value);
47268
+ }
47269
+ /**
47270
+ * * Field Name: __mj_CreatedAt
47271
+ * * Display Name: Created At
47272
+ * * SQL Data Type: datetimeoffset
47273
+ * * Default Value: getutcdate()
47274
+ */
47275
+ get __mj_CreatedAt() {
47276
+ return this.Get('__mj_CreatedAt');
47277
+ }
47278
+ /**
47279
+ * * Field Name: __mj_UpdatedAt
47280
+ * * Display Name: Updated At
47281
+ * * SQL Data Type: datetimeoffset
47282
+ * * Default Value: getutcdate()
47283
+ */
47284
+ get __mj_UpdatedAt() {
47285
+ return this.Get('__mj_UpdatedAt');
47286
+ }
47287
+ /**
47288
+ * * Field Name: ContentItemA
47289
+ * * Display Name: Content Item A
47290
+ * * SQL Data Type: nvarchar(250)
47291
+ */
47292
+ get ContentItemA() {
47293
+ return this.Get('ContentItemA');
47294
+ }
47295
+ /**
47296
+ * * Field Name: ContentItemB
47297
+ * * Display Name: Content Item B
47298
+ * * SQL Data Type: nvarchar(250)
47299
+ */
47300
+ get ContentItemB() {
47301
+ return this.Get('ContentItemB');
47302
+ }
47303
+ /**
47304
+ * * Field Name: ResolvedByUser
47305
+ * * Display Name: Resolved By User
47306
+ * * SQL Data Type: nvarchar(100)
47307
+ */
47308
+ get ResolvedByUser() {
47309
+ return this.Get('ResolvedByUser');
47310
+ }
47311
+ };
47312
+ MJContentItemDuplicateEntity = __decorate([
47313
+ RegisterClass(BaseEntity, 'MJ: Content Item Duplicates')
47314
+ ], MJContentItemDuplicateEntity);
47315
+ export { MJContentItemDuplicateEntity };
45949
47316
  /**
45950
47317
  * MJ: Content Item Tags - strongly typed entity sub-class
45951
47318
  * * Schema: __mj
@@ -45988,7 +47355,7 @@ let MJContentItemTagEntity = class MJContentItemTagEntity extends BaseEntity {
45988
47355
  }
45989
47356
  /**
45990
47357
  * * Field Name: ItemID
45991
- * * Display Name: Item ID
47358
+ * * Display Name: Item
45992
47359
  * * SQL Data Type: uniqueidentifier
45993
47360
  * * Related Entity/Foreign Key: MJ: Content Items (vwContentItems.ID)
45994
47361
  */
@@ -46029,13 +47396,47 @@ let MJContentItemTagEntity = class MJContentItemTagEntity extends BaseEntity {
46029
47396
  return this.Get('__mj_UpdatedAt');
46030
47397
  }
46031
47398
  /**
47399
+ * * Field Name: Weight
47400
+ * * Display Name: Weight
47401
+ * * SQL Data Type: numeric(5, 4)
47402
+ * * Default Value: 1.0
47403
+ * * Description: Relevance weight for this tag (0.0-1.0). 1.0 = highly relevant central topic, 0.5 = moderately relevant, 0.1 = tangentially related. Assigned by the LLM during autotagging.
47404
+ */
47405
+ get Weight() {
47406
+ return this.Get('Weight');
47407
+ }
47408
+ set Weight(value) {
47409
+ this.Set('Weight', value);
47410
+ }
47411
+ /**
47412
+ * * Field Name: TagID
47413
+ * * Display Name: Tag Reference
47414
+ * * SQL Data Type: uniqueidentifier
47415
+ * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)
47416
+ * * Description: Optional link to the formal MJ Tag taxonomy. When set, this free-text tag has been matched (via semantic similarity or exact match) to a curated Tag record. NULL means the tag is unmatched free text only.
47417
+ */
47418
+ get TagID() {
47419
+ return this.Get('TagID');
47420
+ }
47421
+ set TagID(value) {
47422
+ this.Set('TagID', value);
47423
+ }
47424
+ /**
46032
47425
  * * Field Name: Item
46033
- * * Display Name: Item
47426
+ * * Display Name: Item Name
46034
47427
  * * SQL Data Type: nvarchar(250)
46035
47428
  */
46036
47429
  get Item() {
46037
47430
  return this.Get('Item');
46038
47431
  }
47432
+ /**
47433
+ * * Field Name: Tag_Virtual
47434
+ * * Display Name: Tag (Virtual)
47435
+ * * SQL Data Type: nvarchar(255)
47436
+ */
47437
+ get Tag_Virtual() {
47438
+ return this.Get('Tag_Virtual');
47439
+ }
46039
47440
  };
46040
47441
  MJContentItemTagEntity = __decorate([
46041
47442
  RegisterClass(BaseEntity, 'MJ: Content Item Tags')
@@ -46206,6 +47607,96 @@ let MJContentItemEntity = class MJContentItemEntity extends BaseEntity {
46206
47607
  return this.Get('__mj_UpdatedAt');
46207
47608
  }
46208
47609
  /**
47610
+ * * Field Name: EntityRecordDocumentID
47611
+ * * Display Name: Entity Record Document ID
47612
+ * * SQL Data Type: uniqueidentifier
47613
+ * * Related Entity/Foreign Key: MJ: Entity Record Documents (vwEntityRecordDocuments.ID)
47614
+ * * Description: For entity-sourced content items, links to the Entity Record Document snapshot that was rendered for this item. Provides traceability back to the source entity record via ERD.EntityID + ERD.RecordID. NULL for non-entity sources.
47615
+ */
47616
+ get EntityRecordDocumentID() {
47617
+ return this.Get('EntityRecordDocumentID');
47618
+ }
47619
+ set EntityRecordDocumentID(value) {
47620
+ this.Set('EntityRecordDocumentID', value);
47621
+ }
47622
+ /**
47623
+ * * Field Name: EmbeddingStatus
47624
+ * * Display Name: Embedding Status
47625
+ * * SQL Data Type: nvarchar(20)
47626
+ * * Default Value: Pending
47627
+ * * Value List Type: List
47628
+ * * Possible Values
47629
+ * * Complete
47630
+ * * Failed
47631
+ * * Pending
47632
+ * * Processing
47633
+ * * Skipped
47634
+ * * Description: Vectorization status: Pending (not yet embedded), Processing (currently being embedded), Complete (vector stored), Failed (embedding error), Skipped (excluded from vectorization).
47635
+ */
47636
+ get EmbeddingStatus() {
47637
+ return this.Get('EmbeddingStatus');
47638
+ }
47639
+ set EmbeddingStatus(value) {
47640
+ this.Set('EmbeddingStatus', value);
47641
+ }
47642
+ /**
47643
+ * * Field Name: LastEmbeddedAt
47644
+ * * Display Name: Last Embedded At
47645
+ * * SQL Data Type: datetimeoffset
47646
+ * * Description: Timestamp of the most recent successful embedding for this content item.
47647
+ */
47648
+ get LastEmbeddedAt() {
47649
+ return this.Get('LastEmbeddedAt');
47650
+ }
47651
+ set LastEmbeddedAt(value) {
47652
+ this.Set('LastEmbeddedAt', value);
47653
+ }
47654
+ /**
47655
+ * * Field Name: EmbeddingModelID
47656
+ * * Display Name: Embedding Model ID
47657
+ * * SQL Data Type: uniqueidentifier
47658
+ * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
47659
+ * * Description: The AI model used to generate the most recent embedding for this content item.
47660
+ */
47661
+ get EmbeddingModelID() {
47662
+ return this.Get('EmbeddingModelID');
47663
+ }
47664
+ set EmbeddingModelID(value) {
47665
+ this.Set('EmbeddingModelID', value);
47666
+ }
47667
+ /**
47668
+ * * Field Name: TaggingStatus
47669
+ * * Display Name: Tagging Status
47670
+ * * SQL Data Type: nvarchar(20)
47671
+ * * Default Value: Pending
47672
+ * * Value List Type: List
47673
+ * * Possible Values
47674
+ * * Complete
47675
+ * * Failed
47676
+ * * Pending
47677
+ * * Processing
47678
+ * * Skipped
47679
+ * * Description: Autotagging status: Pending (not yet tagged), Processing (LLM is generating tags), Complete (tags assigned), Failed (LLM error), Skipped (excluded from tagging).
47680
+ */
47681
+ get TaggingStatus() {
47682
+ return this.Get('TaggingStatus');
47683
+ }
47684
+ set TaggingStatus(value) {
47685
+ this.Set('TaggingStatus', value);
47686
+ }
47687
+ /**
47688
+ * * Field Name: LastTaggedAt
47689
+ * * Display Name: Last Tagged At
47690
+ * * SQL Data Type: datetimeoffset
47691
+ * * Description: Timestamp of the most recent successful autotagging run for this content item.
47692
+ */
47693
+ get LastTaggedAt() {
47694
+ return this.Get('LastTaggedAt');
47695
+ }
47696
+ set LastTaggedAt(value) {
47697
+ this.Set('LastTaggedAt', value);
47698
+ }
47699
+ /**
46209
47700
  * * Field Name: ContentSource
46210
47701
  * * Display Name: Content Source
46211
47702
  * * SQL Data Type: nvarchar(255)
@@ -46237,11 +47728,394 @@ let MJContentItemEntity = class MJContentItemEntity extends BaseEntity {
46237
47728
  get ContentFileType() {
46238
47729
  return this.Get('ContentFileType');
46239
47730
  }
47731
+ /**
47732
+ * * Field Name: EntityRecordDocument
47733
+ * * Display Name: Entity Record Document
47734
+ * * SQL Data Type: nvarchar(450)
47735
+ */
47736
+ get EntityRecordDocument() {
47737
+ return this.Get('EntityRecordDocument');
47738
+ }
47739
+ /**
47740
+ * * Field Name: EmbeddingModel
47741
+ * * Display Name: Embedding Model
47742
+ * * SQL Data Type: nvarchar(50)
47743
+ */
47744
+ get EmbeddingModel() {
47745
+ return this.Get('EmbeddingModel');
47746
+ }
46240
47747
  };
46241
47748
  MJContentItemEntity = __decorate([
46242
47749
  RegisterClass(BaseEntity, 'MJ: Content Items')
46243
47750
  ], MJContentItemEntity);
46244
47751
  export { MJContentItemEntity };
47752
+ /**
47753
+ * MJ: Content Process Run Details - strongly typed entity sub-class
47754
+ * * Schema: __mj
47755
+ * * Base Table: ContentProcessRunDetail
47756
+ * * Base View: vwContentProcessRunDetails
47757
+ * * @description Per-content-source tracking within a pipeline run. Each source processed during a ContentProcessRun gets one detail record with item counts, timing, token usage, and cost rollups.
47758
+ * * Primary Key: ID
47759
+ * @extends {BaseEntity}
47760
+ * @class
47761
+ * @public
47762
+ */
47763
+ let MJContentProcessRunDetailEntity = class MJContentProcessRunDetailEntity extends BaseEntity {
47764
+ /**
47765
+ * Loads the MJ: Content Process Run Details record from the database
47766
+ * @param ID: string - primary key value to load the MJ: Content Process Run Details record.
47767
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
47768
+ * @returns {Promise<boolean>} - true if successful, false otherwise
47769
+ * @public
47770
+ * @async
47771
+ * @memberof MJContentProcessRunDetailEntity
47772
+ * @method
47773
+ * @override
47774
+ */
47775
+ async Load(ID, EntityRelationshipsToLoad) {
47776
+ const compositeKey = new CompositeKey();
47777
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
47778
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
47779
+ }
47780
+ /**
47781
+ * * Field Name: ID
47782
+ * * Display Name: ID
47783
+ * * SQL Data Type: uniqueidentifier
47784
+ * * Default Value: newsequentialid()
47785
+ */
47786
+ get ID() {
47787
+ return this.Get('ID');
47788
+ }
47789
+ set ID(value) {
47790
+ this.Set('ID', value);
47791
+ }
47792
+ /**
47793
+ * * Field Name: ContentProcessRunID
47794
+ * * Display Name: Content Process Run
47795
+ * * SQL Data Type: uniqueidentifier
47796
+ * * Related Entity/Foreign Key: MJ: Content Process Runs (vwContentProcessRuns.ID)
47797
+ * * Description: The parent pipeline run this detail belongs to.
47798
+ */
47799
+ get ContentProcessRunID() {
47800
+ return this.Get('ContentProcessRunID');
47801
+ }
47802
+ set ContentProcessRunID(value) {
47803
+ this.Set('ContentProcessRunID', value);
47804
+ }
47805
+ /**
47806
+ * * Field Name: ContentSourceID
47807
+ * * Display Name: Content Source
47808
+ * * SQL Data Type: uniqueidentifier
47809
+ * * Related Entity/Foreign Key: MJ: Content Sources (vwContentSources.ID)
47810
+ * * Description: The content source being processed in this detail record.
47811
+ */
47812
+ get ContentSourceID() {
47813
+ return this.Get('ContentSourceID');
47814
+ }
47815
+ set ContentSourceID(value) {
47816
+ this.Set('ContentSourceID', value);
47817
+ }
47818
+ /**
47819
+ * * Field Name: ContentSourceTypeID
47820
+ * * Display Name: Content Source Type
47821
+ * * SQL Data Type: uniqueidentifier
47822
+ * * Related Entity/Foreign Key: MJ: Content Source Types (vwContentSourceTypes.ID)
47823
+ * * Description: The type of content source (RSS Feed, Entity, Website, Cloud Storage, etc.).
47824
+ */
47825
+ get ContentSourceTypeID() {
47826
+ return this.Get('ContentSourceTypeID');
47827
+ }
47828
+ set ContentSourceTypeID(value) {
47829
+ this.Set('ContentSourceTypeID', value);
47830
+ }
47831
+ /**
47832
+ * * Field Name: Status
47833
+ * * Display Name: Status
47834
+ * * SQL Data Type: nvarchar(20)
47835
+ * * Default Value: Pending
47836
+ * * Description: Processing status: Pending, Running, Completed, Failed, or Skipped.
47837
+ */
47838
+ get Status() {
47839
+ return this.Get('Status');
47840
+ }
47841
+ set Status(value) {
47842
+ this.Set('Status', value);
47843
+ }
47844
+ /**
47845
+ * * Field Name: ItemsProcessed
47846
+ * * Display Name: Items Processed
47847
+ * * SQL Data Type: int
47848
+ * * Default Value: 0
47849
+ * * Description: Total content items processed for this source during the run.
47850
+ */
47851
+ get ItemsProcessed() {
47852
+ return this.Get('ItemsProcessed');
47853
+ }
47854
+ set ItemsProcessed(value) {
47855
+ this.Set('ItemsProcessed', value);
47856
+ }
47857
+ /**
47858
+ * * Field Name: ItemsTagged
47859
+ * * Display Name: Items Tagged
47860
+ * * SQL Data Type: int
47861
+ * * Default Value: 0
47862
+ * * Description: Number of content items successfully tagged by the LLM.
47863
+ */
47864
+ get ItemsTagged() {
47865
+ return this.Get('ItemsTagged');
47866
+ }
47867
+ set ItemsTagged(value) {
47868
+ this.Set('ItemsTagged', value);
47869
+ }
47870
+ /**
47871
+ * * Field Name: ItemsVectorized
47872
+ * * Display Name: Items Vectorized
47873
+ * * SQL Data Type: int
47874
+ * * Default Value: 0
47875
+ * * Description: Number of content items successfully embedded and upserted to the vector database.
47876
+ */
47877
+ get ItemsVectorized() {
47878
+ return this.Get('ItemsVectorized');
47879
+ }
47880
+ set ItemsVectorized(value) {
47881
+ this.Set('ItemsVectorized', value);
47882
+ }
47883
+ /**
47884
+ * * Field Name: TagsCreated
47885
+ * * Display Name: Tags Created
47886
+ * * SQL Data Type: int
47887
+ * * Default Value: 0
47888
+ * * Description: Number of new ContentItemTag records created during LLM tagging.
47889
+ */
47890
+ get TagsCreated() {
47891
+ return this.Get('TagsCreated');
47892
+ }
47893
+ set TagsCreated(value) {
47894
+ this.Set('TagsCreated', value);
47895
+ }
47896
+ /**
47897
+ * * Field Name: ErrorCount
47898
+ * * Display Name: Error Count
47899
+ * * SQL Data Type: int
47900
+ * * Default Value: 0
47901
+ * * Description: Number of errors encountered while processing this source.
47902
+ */
47903
+ get ErrorCount() {
47904
+ return this.Get('ErrorCount');
47905
+ }
47906
+ set ErrorCount(value) {
47907
+ this.Set('ErrorCount', value);
47908
+ }
47909
+ /**
47910
+ * * Field Name: StartTime
47911
+ * * Display Name: Start Time
47912
+ * * SQL Data Type: datetimeoffset
47913
+ * * Description: When processing started for this source within the pipeline run.
47914
+ */
47915
+ get StartTime() {
47916
+ return this.Get('StartTime');
47917
+ }
47918
+ set StartTime(value) {
47919
+ this.Set('StartTime', value);
47920
+ }
47921
+ /**
47922
+ * * Field Name: EndTime
47923
+ * * Display Name: End Time
47924
+ * * SQL Data Type: datetimeoffset
47925
+ * * Description: When processing completed for this source within the pipeline run.
47926
+ */
47927
+ get EndTime() {
47928
+ return this.Get('EndTime');
47929
+ }
47930
+ set EndTime(value) {
47931
+ this.Set('EndTime', value);
47932
+ }
47933
+ /**
47934
+ * * Field Name: TotalTokensUsed
47935
+ * * Display Name: Total Tokens Used
47936
+ * * SQL Data Type: int
47937
+ * * Default Value: 0
47938
+ * * Description: Rollup of all tokens used across LLM tagging and embedding calls for this source. Computed from linked AIPromptRun records via the ContentProcessRunPromptRun junction table.
47939
+ */
47940
+ get TotalTokensUsed() {
47941
+ return this.Get('TotalTokensUsed');
47942
+ }
47943
+ set TotalTokensUsed(value) {
47944
+ this.Set('TotalTokensUsed', value);
47945
+ }
47946
+ /**
47947
+ * * Field Name: TotalCost
47948
+ * * Display Name: Total Cost
47949
+ * * SQL Data Type: decimal(18, 6)
47950
+ * * Default Value: 0
47951
+ * * Description: Rollup of all costs across LLM tagging and embedding calls for this source. Computed from linked AIPromptRun records via the ContentProcessRunPromptRun junction table.
47952
+ */
47953
+ get TotalCost() {
47954
+ return this.Get('TotalCost');
47955
+ }
47956
+ set TotalCost(value) {
47957
+ this.Set('TotalCost', value);
47958
+ }
47959
+ /**
47960
+ * * Field Name: __mj_CreatedAt
47961
+ * * Display Name: Created At
47962
+ * * SQL Data Type: datetimeoffset
47963
+ * * Default Value: getutcdate()
47964
+ */
47965
+ get __mj_CreatedAt() {
47966
+ return this.Get('__mj_CreatedAt');
47967
+ }
47968
+ /**
47969
+ * * Field Name: __mj_UpdatedAt
47970
+ * * Display Name: Updated At
47971
+ * * SQL Data Type: datetimeoffset
47972
+ * * Default Value: getutcdate()
47973
+ */
47974
+ get __mj_UpdatedAt() {
47975
+ return this.Get('__mj_UpdatedAt');
47976
+ }
47977
+ /**
47978
+ * * Field Name: ContentProcessRun
47979
+ * * Display Name: Content Process Run Name
47980
+ * * SQL Data Type: nvarchar(255)
47981
+ */
47982
+ get ContentProcessRun() {
47983
+ return this.Get('ContentProcessRun');
47984
+ }
47985
+ /**
47986
+ * * Field Name: ContentSource
47987
+ * * Display Name: Content Source Name
47988
+ * * SQL Data Type: nvarchar(255)
47989
+ */
47990
+ get ContentSource() {
47991
+ return this.Get('ContentSource');
47992
+ }
47993
+ /**
47994
+ * * Field Name: ContentSourceType
47995
+ * * Display Name: Source Type Category
47996
+ * * SQL Data Type: nvarchar(255)
47997
+ */
47998
+ get ContentSourceType() {
47999
+ return this.Get('ContentSourceType');
48000
+ }
48001
+ };
48002
+ MJContentProcessRunDetailEntity = __decorate([
48003
+ RegisterClass(BaseEntity, 'MJ: Content Process Run Details')
48004
+ ], MJContentProcessRunDetailEntity);
48005
+ export { MJContentProcessRunDetailEntity };
48006
+ /**
48007
+ * MJ: Content Process Run Prompt Runs - strongly typed entity sub-class
48008
+ * * Schema: __mj
48009
+ * * Base Table: ContentProcessRunPromptRun
48010
+ * * Base View: vwContentProcessRunPromptRuns
48011
+ * * @description Links ContentProcessRunDetail records to their associated AIPromptRun records. Each LLM tagging call and embedding call creates an AIPromptRun, and this junction table provides the FK relationship for cost/token analytics.
48012
+ * * Primary Key: ID
48013
+ * @extends {BaseEntity}
48014
+ * @class
48015
+ * @public
48016
+ */
48017
+ let MJContentProcessRunPromptRunEntity = class MJContentProcessRunPromptRunEntity extends BaseEntity {
48018
+ /**
48019
+ * Loads the MJ: Content Process Run Prompt Runs record from the database
48020
+ * @param ID: string - primary key value to load the MJ: Content Process Run Prompt Runs record.
48021
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
48022
+ * @returns {Promise<boolean>} - true if successful, false otherwise
48023
+ * @public
48024
+ * @async
48025
+ * @memberof MJContentProcessRunPromptRunEntity
48026
+ * @method
48027
+ * @override
48028
+ */
48029
+ async Load(ID, EntityRelationshipsToLoad) {
48030
+ const compositeKey = new CompositeKey();
48031
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
48032
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
48033
+ }
48034
+ /**
48035
+ * * Field Name: ID
48036
+ * * Display Name: ID
48037
+ * * SQL Data Type: uniqueidentifier
48038
+ * * Default Value: newsequentialid()
48039
+ */
48040
+ get ID() {
48041
+ return this.Get('ID');
48042
+ }
48043
+ set ID(value) {
48044
+ this.Set('ID', value);
48045
+ }
48046
+ /**
48047
+ * * Field Name: ContentProcessRunDetailID
48048
+ * * Display Name: Content Process Run Detail
48049
+ * * SQL Data Type: uniqueidentifier
48050
+ * * Related Entity/Foreign Key: MJ: Content Process Run Details (vwContentProcessRunDetails.ID)
48051
+ * * Description: The content process run detail record this prompt run is associated with.
48052
+ */
48053
+ get ContentProcessRunDetailID() {
48054
+ return this.Get('ContentProcessRunDetailID');
48055
+ }
48056
+ set ContentProcessRunDetailID(value) {
48057
+ this.Set('ContentProcessRunDetailID', value);
48058
+ }
48059
+ /**
48060
+ * * Field Name: AIPromptRunID
48061
+ * * Display Name: AI Prompt Run
48062
+ * * SQL Data Type: uniqueidentifier
48063
+ * * Related Entity/Foreign Key: MJ: AI Prompt Runs (vwAIPromptRuns.ID)
48064
+ * * Description: The AI prompt run record containing token usage, cost, model, vendor, and execution details for this call.
48065
+ */
48066
+ get AIPromptRunID() {
48067
+ return this.Get('AIPromptRunID');
48068
+ }
48069
+ set AIPromptRunID(value) {
48070
+ this.Set('AIPromptRunID', value);
48071
+ }
48072
+ /**
48073
+ * * Field Name: RunType
48074
+ * * Display Name: Run Type
48075
+ * * SQL Data Type: nvarchar(20)
48076
+ * * Value List Type: List
48077
+ * * Possible Values
48078
+ * * Embed
48079
+ * * Tag
48080
+ * * Description: Whether this AIPromptRun was for LLM tagging (Tag) or text embedding (Embed).
48081
+ */
48082
+ get RunType() {
48083
+ return this.Get('RunType');
48084
+ }
48085
+ set RunType(value) {
48086
+ this.Set('RunType', value);
48087
+ }
48088
+ /**
48089
+ * * Field Name: __mj_CreatedAt
48090
+ * * Display Name: Created At
48091
+ * * SQL Data Type: datetimeoffset
48092
+ * * Default Value: getutcdate()
48093
+ */
48094
+ get __mj_CreatedAt() {
48095
+ return this.Get('__mj_CreatedAt');
48096
+ }
48097
+ /**
48098
+ * * Field Name: __mj_UpdatedAt
48099
+ * * Display Name: Updated At
48100
+ * * SQL Data Type: datetimeoffset
48101
+ * * Default Value: getutcdate()
48102
+ */
48103
+ get __mj_UpdatedAt() {
48104
+ return this.Get('__mj_UpdatedAt');
48105
+ }
48106
+ /**
48107
+ * * Field Name: AIPromptRun
48108
+ * * Display Name: Prompt Run Label
48109
+ * * SQL Data Type: nvarchar(255)
48110
+ */
48111
+ get AIPromptRun() {
48112
+ return this.Get('AIPromptRun');
48113
+ }
48114
+ };
48115
+ MJContentProcessRunPromptRunEntity = __decorate([
48116
+ RegisterClass(BaseEntity, 'MJ: Content Process Run Prompt Runs')
48117
+ ], MJContentProcessRunPromptRunEntity);
48118
+ export { MJContentProcessRunPromptRunEntity };
46245
48119
  /**
46246
48120
  * MJ: Content Process Runs - strongly typed entity sub-class
46247
48121
  * * Schema: __mj
@@ -46254,6 +48128,11 @@ export { MJContentItemEntity };
46254
48128
  * @public
46255
48129
  */
46256
48130
  let MJContentProcessRunEntity = class MJContentProcessRunEntity extends BaseEntity {
48131
+ constructor() {
48132
+ super(...arguments);
48133
+ this._ConfigurationObject_cached = undefined;
48134
+ this._ConfigurationObject_lastRaw = null;
48135
+ }
46257
48136
  /**
46258
48137
  * Loads the MJ: Content Process Runs record from the database
46259
48138
  * @param ID: string - primary key value to load the MJ: Content Process Runs record.
@@ -46360,6 +48239,126 @@ let MJContentProcessRunEntity = class MJContentProcessRunEntity extends BaseEnti
46360
48239
  return this.Get('__mj_UpdatedAt');
46361
48240
  }
46362
48241
  /**
48242
+ * * Field Name: StartedByUserID
48243
+ * * Display Name: Started By User ID
48244
+ * * SQL Data Type: uniqueidentifier
48245
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
48246
+ * * Description: The user who triggered this pipeline run. NULL for system-initiated runs.
48247
+ */
48248
+ get StartedByUserID() {
48249
+ return this.Get('StartedByUserID');
48250
+ }
48251
+ set StartedByUserID(value) {
48252
+ this.Set('StartedByUserID', value);
48253
+ }
48254
+ /**
48255
+ * * Field Name: TotalItemCount
48256
+ * * Display Name: Total Item Count
48257
+ * * SQL Data Type: int
48258
+ * * Description: Total number of content items to process in this run. Used for progress percentage calculation.
48259
+ */
48260
+ get TotalItemCount() {
48261
+ return this.Get('TotalItemCount');
48262
+ }
48263
+ set TotalItemCount(value) {
48264
+ this.Set('TotalItemCount', value);
48265
+ }
48266
+ /**
48267
+ * * Field Name: LastProcessedOffset
48268
+ * * Display Name: Last Processed Offset
48269
+ * * SQL Data Type: int
48270
+ * * Default Value: 0
48271
+ * * Description: StartRow offset of the last successfully completed batch. Used for resume-from-crash: next batch starts at this offset. Reset to 0 on new runs.
48272
+ */
48273
+ get LastProcessedOffset() {
48274
+ return this.Get('LastProcessedOffset');
48275
+ }
48276
+ set LastProcessedOffset(value) {
48277
+ this.Set('LastProcessedOffset', value);
48278
+ }
48279
+ /**
48280
+ * * Field Name: BatchSize
48281
+ * * Display Name: Batch Size
48282
+ * * SQL Data Type: int
48283
+ * * Default Value: 100
48284
+ * * Description: Number of content items processed per batch. Configurable per run, default 100.
48285
+ */
48286
+ get BatchSize() {
48287
+ return this.Get('BatchSize');
48288
+ }
48289
+ set BatchSize(value) {
48290
+ this.Set('BatchSize', value);
48291
+ }
48292
+ /**
48293
+ * * Field Name: ErrorCount
48294
+ * * Display Name: Error Count
48295
+ * * SQL Data Type: int
48296
+ * * Default Value: 0
48297
+ * * Description: Running count of errors encountered during processing. Used by the circuit breaker to halt the pipeline if error rate exceeds the configured threshold.
48298
+ */
48299
+ get ErrorCount() {
48300
+ return this.Get('ErrorCount');
48301
+ }
48302
+ set ErrorCount(value) {
48303
+ this.Set('ErrorCount', value);
48304
+ }
48305
+ /**
48306
+ * * Field Name: ErrorMessage
48307
+ * * Display Name: Error Message
48308
+ * * SQL Data Type: nvarchar(MAX)
48309
+ * * Description: Error details if the run failed. Includes error messages, stack traces, or circuit breaker trigger reason.
48310
+ */
48311
+ get ErrorMessage() {
48312
+ return this.Get('ErrorMessage');
48313
+ }
48314
+ set ErrorMessage(value) {
48315
+ this.Set('ErrorMessage', value);
48316
+ }
48317
+ /**
48318
+ * * Field Name: CancellationRequested
48319
+ * * Display Name: Cancellation Requested
48320
+ * * SQL Data Type: bit
48321
+ * * Default Value: 0
48322
+ * * Description: When set to 1, the pipeline stops after completing the current batch. Used for pause and cancel operations. The Status column reflects the final state (Paused or Cancelled).
48323
+ */
48324
+ get CancellationRequested() {
48325
+ return this.Get('CancellationRequested');
48326
+ }
48327
+ set CancellationRequested(value) {
48328
+ this.Set('CancellationRequested', value);
48329
+ }
48330
+ /**
48331
+ * * Field Name: Configuration
48332
+ * * Display Name: Configuration
48333
+ * * SQL Data Type: nvarchar(MAX)
48334
+ * * JSON Type: MJContentProcessRunEntity_IContentProcessRunConfiguration
48335
+ * * Description: JSON snapshot of the pipeline configuration used for this run. Conforms to the IContentProcessRunConfiguration interface. Includes batch size, rate limits, error thresholds, and duplicate detection settings.
48336
+ */
48337
+ get Configuration() {
48338
+ return this.Get('Configuration');
48339
+ }
48340
+ set Configuration(value) {
48341
+ this.Set('Configuration', value);
48342
+ }
48343
+ /**
48344
+ * Typed accessor for Configuration — returns parsed JSON as MJContentProcessRunEntity_IContentProcessRunConfiguration.
48345
+ * Uses lazy parsing with cache invalidation when the underlying raw value changes.
48346
+ */
48347
+ get ConfigurationObject() {
48348
+ const raw = this.Configuration;
48349
+ if (raw !== this._ConfigurationObject_lastRaw) {
48350
+ this._ConfigurationObject_cached = raw ? JSON.parse(raw) : null;
48351
+ this._ConfigurationObject_lastRaw = raw;
48352
+ }
48353
+ return this._ConfigurationObject_cached;
48354
+ }
48355
+ set ConfigurationObject(value) {
48356
+ const raw = value ? JSON.stringify(value) : null;
48357
+ this.Configuration = raw;
48358
+ this._ConfigurationObject_cached = value;
48359
+ this._ConfigurationObject_lastRaw = raw;
48360
+ }
48361
+ /**
46363
48362
  * * Field Name: Source
46364
48363
  * * Display Name: Source
46365
48364
  * * SQL Data Type: nvarchar(255)
@@ -46367,6 +48366,14 @@ let MJContentProcessRunEntity = class MJContentProcessRunEntity extends BaseEnti
46367
48366
  get Source() {
46368
48367
  return this.Get('Source');
46369
48368
  }
48369
+ /**
48370
+ * * Field Name: StartedByUser
48371
+ * * Display Name: Started By User
48372
+ * * SQL Data Type: nvarchar(100)
48373
+ */
48374
+ get StartedByUser() {
48375
+ return this.Get('StartedByUser');
48376
+ }
46370
48377
  };
46371
48378
  MJContentProcessRunEntity = __decorate([
46372
48379
  RegisterClass(BaseEntity, 'MJ: Content Process Runs')
@@ -46612,6 +48619,11 @@ export { MJContentSourceTypeParamEntity };
46612
48619
  * @public
46613
48620
  */
46614
48621
  let MJContentSourceTypeEntity = class MJContentSourceTypeEntity extends BaseEntity {
48622
+ constructor() {
48623
+ super(...arguments);
48624
+ this._ConfigurationObject_cached = undefined;
48625
+ this._ConfigurationObject_lastRaw = null;
48626
+ }
46615
48627
  /**
46616
48628
  * Loads the MJ: Content Source Types record from the database
46617
48629
  * @param ID: string - primary key value to load the MJ: Content Source Types record.
@@ -46680,6 +48692,49 @@ let MJContentSourceTypeEntity = class MJContentSourceTypeEntity extends BaseEnti
46680
48692
  get __mj_UpdatedAt() {
46681
48693
  return this.Get('__mj_UpdatedAt');
46682
48694
  }
48695
+ /**
48696
+ * * Field Name: DriverClass
48697
+ * * Display Name: Driver Class
48698
+ * * SQL Data Type: nvarchar(255)
48699
+ * * Description: The registered class name used by ClassFactory to instantiate the provider for this source type (e.g., AutotagLocalFileSystem, AutotagEntity). Must match a @RegisterClass key on a class extending AutotagBase.
48700
+ */
48701
+ get DriverClass() {
48702
+ return this.Get('DriverClass');
48703
+ }
48704
+ set DriverClass(value) {
48705
+ this.Set('DriverClass', value);
48706
+ }
48707
+ /**
48708
+ * * Field Name: Configuration
48709
+ * * Display Name: Configuration
48710
+ * * SQL Data Type: nvarchar(MAX)
48711
+ * * JSON Type: MJContentSourceTypeEntity_IContentSourceTypeConfiguration
48712
+ * * Description: JSON configuration blob for type-level settings. Conforms to the IContentSourceTypeConfiguration interface. Reserved for future type-wide settings shared by all sources of this type.
48713
+ */
48714
+ get Configuration() {
48715
+ return this.Get('Configuration');
48716
+ }
48717
+ set Configuration(value) {
48718
+ this.Set('Configuration', value);
48719
+ }
48720
+ /**
48721
+ * Typed accessor for Configuration — returns parsed JSON as MJContentSourceTypeEntity_IContentSourceTypeConfiguration.
48722
+ * Uses lazy parsing with cache invalidation when the underlying raw value changes.
48723
+ */
48724
+ get ConfigurationObject() {
48725
+ const raw = this.Configuration;
48726
+ if (raw !== this._ConfigurationObject_lastRaw) {
48727
+ this._ConfigurationObject_cached = raw ? JSON.parse(raw) : null;
48728
+ this._ConfigurationObject_lastRaw = raw;
48729
+ }
48730
+ return this._ConfigurationObject_cached;
48731
+ }
48732
+ set ConfigurationObject(value) {
48733
+ const raw = value ? JSON.stringify(value) : null;
48734
+ this.Configuration = raw;
48735
+ this._ConfigurationObject_cached = value;
48736
+ this._ConfigurationObject_lastRaw = raw;
48737
+ }
46683
48738
  };
46684
48739
  MJContentSourceTypeEntity = __decorate([
46685
48740
  RegisterClass(BaseEntity, 'MJ: Content Source Types')
@@ -46697,6 +48752,11 @@ export { MJContentSourceTypeEntity };
46697
48752
  * @public
46698
48753
  */
46699
48754
  let MJContentSourceEntity = class MJContentSourceEntity extends BaseEntity {
48755
+ constructor() {
48756
+ super(...arguments);
48757
+ this._ConfigurationObject_cached = undefined;
48758
+ this._ConfigurationObject_lastRaw = null;
48759
+ }
46700
48760
  /**
46701
48761
  * Loads the MJ: Content Sources record from the database
46702
48762
  * @param ID: string - primary key value to load the MJ: Content Sources record.
@@ -46738,7 +48798,7 @@ let MJContentSourceEntity = class MJContentSourceEntity extends BaseEntity {
46738
48798
  }
46739
48799
  /**
46740
48800
  * * Field Name: ContentTypeID
46741
- * * Display Name: Content Type ID
48801
+ * * Display Name: Content Type
46742
48802
  * * SQL Data Type: uniqueidentifier
46743
48803
  * * Related Entity/Foreign Key: MJ: Content Types (vwContentTypes.ID)
46744
48804
  */
@@ -46750,7 +48810,7 @@ let MJContentSourceEntity = class MJContentSourceEntity extends BaseEntity {
46750
48810
  }
46751
48811
  /**
46752
48812
  * * Field Name: ContentSourceTypeID
46753
- * * Display Name: Content Source Type ID
48813
+ * * Display Name: Content Source Type
46754
48814
  * * SQL Data Type: uniqueidentifier
46755
48815
  * * Related Entity/Foreign Key: MJ: Content Source Types (vwContentSourceTypes.ID)
46756
48816
  */
@@ -46762,7 +48822,7 @@ let MJContentSourceEntity = class MJContentSourceEntity extends BaseEntity {
46762
48822
  }
46763
48823
  /**
46764
48824
  * * Field Name: ContentFileTypeID
46765
- * * Display Name: Content File Type ID
48825
+ * * Display Name: Content File Type
46766
48826
  * * SQL Data Type: uniqueidentifier
46767
48827
  * * Related Entity/Foreign Key: MJ: Content File Types (vwContentFileTypes.ID)
46768
48828
  */
@@ -46803,6 +48863,102 @@ let MJContentSourceEntity = class MJContentSourceEntity extends BaseEntity {
46803
48863
  return this.Get('__mj_UpdatedAt');
46804
48864
  }
46805
48865
  /**
48866
+ * * Field Name: EmbeddingModelID
48867
+ * * Display Name: Embedding Model
48868
+ * * SQL Data Type: uniqueidentifier
48869
+ * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
48870
+ * * Description: Per-source override for the AI embedding model. When NULL, falls back to the ContentType default.
48871
+ */
48872
+ get EmbeddingModelID() {
48873
+ return this.Get('EmbeddingModelID');
48874
+ }
48875
+ set EmbeddingModelID(value) {
48876
+ this.Set('EmbeddingModelID', value);
48877
+ }
48878
+ /**
48879
+ * * Field Name: VectorIndexID
48880
+ * * Display Name: Vector Index
48881
+ * * SQL Data Type: uniqueidentifier
48882
+ * * Related Entity/Foreign Key: MJ: Vector Indexes (vwVectorIndexes.ID)
48883
+ * * Description: Per-source override for the vector index. When NULL, falls back to the ContentType default.
48884
+ */
48885
+ get VectorIndexID() {
48886
+ return this.Get('VectorIndexID');
48887
+ }
48888
+ set VectorIndexID(value) {
48889
+ this.Set('VectorIndexID', value);
48890
+ }
48891
+ /**
48892
+ * * Field Name: Configuration
48893
+ * * Display Name: Configuration
48894
+ * * SQL Data Type: nvarchar(MAX)
48895
+ * * JSON Type: MJContentSourceEntity_IContentSourceConfiguration
48896
+ * * Description: JSON configuration blob for source-instance settings. Conforms to the IContentSourceConfiguration interface. Includes tag taxonomy mode (constrained/auto-grow/free-flow), tag root ID, match threshold, LLM taxonomy sharing, and vectorization toggle.
48897
+ */
48898
+ get Configuration() {
48899
+ return this.Get('Configuration');
48900
+ }
48901
+ set Configuration(value) {
48902
+ this.Set('Configuration', value);
48903
+ }
48904
+ /**
48905
+ * Typed accessor for Configuration — returns parsed JSON as MJContentSourceEntity_IContentSourceConfiguration.
48906
+ * Uses lazy parsing with cache invalidation when the underlying raw value changes.
48907
+ */
48908
+ get ConfigurationObject() {
48909
+ const raw = this.Configuration;
48910
+ if (raw !== this._ConfigurationObject_lastRaw) {
48911
+ this._ConfigurationObject_cached = raw ? JSON.parse(raw) : null;
48912
+ this._ConfigurationObject_lastRaw = raw;
48913
+ }
48914
+ return this._ConfigurationObject_cached;
48915
+ }
48916
+ set ConfigurationObject(value) {
48917
+ const raw = value ? JSON.stringify(value) : null;
48918
+ this.Configuration = raw;
48919
+ this._ConfigurationObject_cached = value;
48920
+ this._ConfigurationObject_lastRaw = raw;
48921
+ }
48922
+ /**
48923
+ * * Field Name: EntityID
48924
+ * * Display Name: Entity
48925
+ * * SQL Data Type: uniqueidentifier
48926
+ * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
48927
+ * * Description: For Entity-type content sources, the MJ Entity to pull records from. NULL for non-entity sources (files, RSS, websites, etc.).
48928
+ */
48929
+ get EntityID() {
48930
+ return this.Get('EntityID');
48931
+ }
48932
+ set EntityID(value) {
48933
+ this.Set('EntityID', value);
48934
+ }
48935
+ /**
48936
+ * * Field Name: EntityDocumentID
48937
+ * * Display Name: Entity Document
48938
+ * * SQL Data Type: uniqueidentifier
48939
+ * * Related Entity/Foreign Key: MJ: Entity Documents (vwEntityDocuments.ID)
48940
+ * * Description: For Entity-type content sources, the Entity Document template used to render entity records into text for autotagging. The template defines which fields to include, how to format them, and related record inclusion. NULL for non-entity sources.
48941
+ */
48942
+ get EntityDocumentID() {
48943
+ return this.Get('EntityDocumentID');
48944
+ }
48945
+ set EntityDocumentID(value) {
48946
+ this.Set('EntityDocumentID', value);
48947
+ }
48948
+ /**
48949
+ * * Field Name: ScheduledActionID
48950
+ * * Display Name: Scheduled Action
48951
+ * * SQL Data Type: uniqueidentifier
48952
+ * * Related Entity/Foreign Key: MJ: Scheduled Actions (vwScheduledActions.ID)
48953
+ * * Description: Optional link to a MJ Scheduled Action that automatically runs the classification pipeline for this source on a cron schedule.
48954
+ */
48955
+ get ScheduledActionID() {
48956
+ return this.Get('ScheduledActionID');
48957
+ }
48958
+ set ScheduledActionID(value) {
48959
+ this.Set('ScheduledActionID', value);
48960
+ }
48961
+ /**
46806
48962
  * * Field Name: ContentType
46807
48963
  * * Display Name: Content Type
46808
48964
  * * SQL Data Type: nvarchar(255)
@@ -46826,6 +48982,46 @@ let MJContentSourceEntity = class MJContentSourceEntity extends BaseEntity {
46826
48982
  get ContentFileType() {
46827
48983
  return this.Get('ContentFileType');
46828
48984
  }
48985
+ /**
48986
+ * * Field Name: EmbeddingModel
48987
+ * * Display Name: Embedding Model
48988
+ * * SQL Data Type: nvarchar(50)
48989
+ */
48990
+ get EmbeddingModel() {
48991
+ return this.Get('EmbeddingModel');
48992
+ }
48993
+ /**
48994
+ * * Field Name: VectorIndex
48995
+ * * Display Name: Vector Index
48996
+ * * SQL Data Type: nvarchar(255)
48997
+ */
48998
+ get VectorIndex() {
48999
+ return this.Get('VectorIndex');
49000
+ }
49001
+ /**
49002
+ * * Field Name: Entity
49003
+ * * Display Name: Entity
49004
+ * * SQL Data Type: nvarchar(255)
49005
+ */
49006
+ get Entity() {
49007
+ return this.Get('Entity');
49008
+ }
49009
+ /**
49010
+ * * Field Name: EntityDocument
49011
+ * * Display Name: Entity Document
49012
+ * * SQL Data Type: nvarchar(250)
49013
+ */
49014
+ get EntityDocument() {
49015
+ return this.Get('EntityDocument');
49016
+ }
49017
+ /**
49018
+ * * Field Name: ScheduledAction
49019
+ * * Display Name: Scheduled Action
49020
+ * * SQL Data Type: nvarchar(255)
49021
+ */
49022
+ get ScheduledAction() {
49023
+ return this.Get('ScheduledAction');
49024
+ }
46829
49025
  };
46830
49026
  MJContentSourceEntity = __decorate([
46831
49027
  RegisterClass(BaseEntity, 'MJ: Content Sources')
@@ -46952,6 +49148,11 @@ export { MJContentTypeAttributeEntity };
46952
49148
  * @public
46953
49149
  */
46954
49150
  let MJContentTypeEntity = class MJContentTypeEntity extends BaseEntity {
49151
+ constructor() {
49152
+ super(...arguments);
49153
+ this._ConfigurationObject_cached = undefined;
49154
+ this._ConfigurationObject_lastRaw = null;
49155
+ }
46955
49156
  /**
46956
49157
  * Loads the MJ: Content Types record from the database
46957
49158
  * @param ID: string - primary key value to load the MJ: Content Types record.
@@ -47004,7 +49205,7 @@ let MJContentTypeEntity = class MJContentTypeEntity extends BaseEntity {
47004
49205
  }
47005
49206
  /**
47006
49207
  * * Field Name: AIModelID
47007
- * * Display Name: AIModel ID
49208
+ * * Display Name: AI Model
47008
49209
  * * SQL Data Type: uniqueidentifier
47009
49210
  * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
47010
49211
  */
@@ -47016,7 +49217,7 @@ let MJContentTypeEntity = class MJContentTypeEntity extends BaseEntity {
47016
49217
  }
47017
49218
  /**
47018
49219
  * * Field Name: MinTags
47019
- * * Display Name: Min Tags
49220
+ * * Display Name: Minimum Tags
47020
49221
  * * SQL Data Type: int
47021
49222
  * * Description: Minimum number of tags that must be applied to content of this type.
47022
49223
  */
@@ -47028,7 +49229,7 @@ let MJContentTypeEntity = class MJContentTypeEntity extends BaseEntity {
47028
49229
  }
47029
49230
  /**
47030
49231
  * * Field Name: MaxTags
47031
- * * Display Name: Max Tags
49232
+ * * Display Name: Maximum Tags
47032
49233
  * * SQL Data Type: int
47033
49234
  * * Description: Maximum number of tags allowed on content of this type.
47034
49235
  */
@@ -47057,13 +49258,86 @@ let MJContentTypeEntity = class MJContentTypeEntity extends BaseEntity {
47057
49258
  return this.Get('__mj_UpdatedAt');
47058
49259
  }
47059
49260
  /**
49261
+ * * Field Name: EmbeddingModelID
49262
+ * * Display Name: Embedding Model
49263
+ * * SQL Data Type: uniqueidentifier
49264
+ * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
49265
+ * * Description: Default AI embedding model for vectorizing content items of this type. Sources can override per-source. If NULL, uses the first available embedding model.
49266
+ */
49267
+ get EmbeddingModelID() {
49268
+ return this.Get('EmbeddingModelID');
49269
+ }
49270
+ set EmbeddingModelID(value) {
49271
+ this.Set('EmbeddingModelID', value);
49272
+ }
49273
+ /**
49274
+ * * Field Name: VectorIndexID
49275
+ * * Display Name: Vector Index
49276
+ * * SQL Data Type: uniqueidentifier
49277
+ * * Related Entity/Foreign Key: MJ: Vector Indexes (vwVectorIndexes.ID)
49278
+ * * Description: Default vector index for storing embeddings of this content type. Sources can override per-source. If NULL, uses the first available vector index.
49279
+ */
49280
+ get VectorIndexID() {
49281
+ return this.Get('VectorIndexID');
49282
+ }
49283
+ set VectorIndexID(value) {
49284
+ this.Set('VectorIndexID', value);
49285
+ }
49286
+ /**
49287
+ * * Field Name: Configuration
49288
+ * * Display Name: Configuration
49289
+ * * SQL Data Type: nvarchar(MAX)
49290
+ * * JSON Type: MJContentTypeEntity_IContentTypeConfiguration
49291
+ * * Description: JSON configuration blob for content-type-level settings. Conforms to the IContentTypeConfiguration interface. Reserved for future type-wide settings such as default tag taxonomy rules and processing options.
49292
+ */
49293
+ get Configuration() {
49294
+ return this.Get('Configuration');
49295
+ }
49296
+ set Configuration(value) {
49297
+ this.Set('Configuration', value);
49298
+ }
49299
+ /**
49300
+ * Typed accessor for Configuration — returns parsed JSON as MJContentTypeEntity_IContentTypeConfiguration.
49301
+ * Uses lazy parsing with cache invalidation when the underlying raw value changes.
49302
+ */
49303
+ get ConfigurationObject() {
49304
+ const raw = this.Configuration;
49305
+ if (raw !== this._ConfigurationObject_lastRaw) {
49306
+ this._ConfigurationObject_cached = raw ? JSON.parse(raw) : null;
49307
+ this._ConfigurationObject_lastRaw = raw;
49308
+ }
49309
+ return this._ConfigurationObject_cached;
49310
+ }
49311
+ set ConfigurationObject(value) {
49312
+ const raw = value ? JSON.stringify(value) : null;
49313
+ this.Configuration = raw;
49314
+ this._ConfigurationObject_cached = value;
49315
+ this._ConfigurationObject_lastRaw = raw;
49316
+ }
49317
+ /**
47060
49318
  * * Field Name: AIModel
47061
- * * Display Name: AIModel
49319
+ * * Display Name: AI Model Name
47062
49320
  * * SQL Data Type: nvarchar(50)
47063
49321
  */
47064
49322
  get AIModel() {
47065
49323
  return this.Get('AIModel');
47066
49324
  }
49325
+ /**
49326
+ * * Field Name: EmbeddingModel
49327
+ * * Display Name: Embedding Model Name
49328
+ * * SQL Data Type: nvarchar(50)
49329
+ */
49330
+ get EmbeddingModel() {
49331
+ return this.Get('EmbeddingModel');
49332
+ }
49333
+ /**
49334
+ * * Field Name: VectorIndex
49335
+ * * Display Name: Vector Index Name
49336
+ * * SQL Data Type: nvarchar(255)
49337
+ */
49338
+ get VectorIndex() {
49339
+ return this.Get('VectorIndex');
49340
+ }
47067
49341
  };
47068
49342
  MJContentTypeEntity = __decorate([
47069
49343
  RegisterClass(BaseEntity, 'MJ: Content Types')
@@ -51415,7 +53689,7 @@ let MJDuplicateRunDetailMatchEntity = class MJDuplicateRunDetailMatchEntity exte
51415
53689
  }
51416
53690
  /**
51417
53691
  * * Field Name: DuplicateRunDetailID
51418
- * * Display Name: Duplicate Run Detail
53692
+ * * Display Name: Duplicate Run Detail ID
51419
53693
  * * SQL Data Type: uniqueidentifier
51420
53694
  * * Related Entity/Foreign Key: MJ: Duplicate Run Details (vwDuplicateRunDetails.ID)
51421
53695
  */
@@ -51444,7 +53718,7 @@ let MJDuplicateRunDetailMatchEntity = class MJDuplicateRunDetailMatchEntity exte
51444
53718
  }
51445
53719
  /**
51446
53720
  * * Field Name: MatchRecordID
51447
- * * Display Name: Match Record
53721
+ * * Display Name: Match Record ID
51448
53722
  * * SQL Data Type: nvarchar(500)
51449
53723
  * * Description: The ID of the record identified as a potential duplicate match.
51450
53724
  */
@@ -51513,7 +53787,7 @@ let MJDuplicateRunDetailMatchEntity = class MJDuplicateRunDetailMatchEntity exte
51513
53787
  }
51514
53788
  /**
51515
53789
  * * Field Name: RecordMergeLogID
51516
- * * Display Name: Record Merge Log
53790
+ * * Display Name: Record Merge Log ID
51517
53791
  * * SQL Data Type: uniqueidentifier
51518
53792
  * * Related Entity/Foreign Key: MJ: Record Merge Logs (vwRecordMergeLogs.ID)
51519
53793
  */
@@ -51573,6 +53847,18 @@ let MJDuplicateRunDetailMatchEntity = class MJDuplicateRunDetailMatchEntity exte
51573
53847
  return this.Get('__mj_UpdatedAt');
51574
53848
  }
51575
53849
  /**
53850
+ * * Field Name: RecordMetadata
53851
+ * * Display Name: Record Metadata
53852
+ * * SQL Data Type: nvarchar(MAX)
53853
+ * * Description: JSON metadata snapshot of the matched record from the vector database at detection time. Contains display fields (Name, Description, EntityIcon, etc.) for rich UI rendering without additional lookups.
53854
+ */
53855
+ get RecordMetadata() {
53856
+ return this.Get('RecordMetadata');
53857
+ }
53858
+ set RecordMetadata(value) {
53859
+ this.Set('RecordMetadata', value);
53860
+ }
53861
+ /**
51576
53862
  * * Field Name: DuplicateRunDetail
51577
53863
  * * Display Name: Duplicate Run Detail
51578
53864
  * * SQL Data Type: nvarchar(500)
@@ -51635,7 +53921,7 @@ let MJDuplicateRunDetailEntity = class MJDuplicateRunDetailEntity extends BaseEn
51635
53921
  }
51636
53922
  /**
51637
53923
  * * Field Name: DuplicateRunID
51638
- * * Display Name: Duplicate Run ID
53924
+ * * Display Name: Duplicate Run
51639
53925
  * * SQL Data Type: uniqueidentifier
51640
53926
  * * Related Entity/Foreign Key: MJ: Duplicate Runs (vwDuplicateRuns.ID)
51641
53927
  */
@@ -51647,7 +53933,7 @@ let MJDuplicateRunDetailEntity = class MJDuplicateRunDetailEntity extends BaseEn
51647
53933
  }
51648
53934
  /**
51649
53935
  * * Field Name: RecordID
51650
- * * Display Name: Record ID
53936
+ * * Display Name: Record
51651
53937
  * * SQL Data Type: nvarchar(500)
51652
53938
  * * Description: The ID of the record being analyzed for duplicates.
51653
53939
  */
@@ -51750,8 +54036,44 @@ let MJDuplicateRunDetailEntity = class MJDuplicateRunDetailEntity extends BaseEn
51750
54036
  return this.Get('__mj_UpdatedAt');
51751
54037
  }
51752
54038
  /**
54039
+ * * Field Name: RecordMetadata
54040
+ * * Display Name: Record Metadata
54041
+ * * SQL Data Type: nvarchar(MAX)
54042
+ * * Description: JSON metadata snapshot of the source record from the vector database at detection time. Contains display fields (Name, Description, EntityIcon, etc.) for rich UI rendering without additional lookups.
54043
+ */
54044
+ get RecordMetadata() {
54045
+ return this.Get('RecordMetadata');
54046
+ }
54047
+ set RecordMetadata(value) {
54048
+ this.Set('RecordMetadata', value);
54049
+ }
54050
+ /**
54051
+ * * Field Name: StartedAt
54052
+ * * Display Name: Started At
54053
+ * * SQL Data Type: datetimeoffset
54054
+ * * Description: When processing started for this specific record during duplicate detection.
54055
+ */
54056
+ get StartedAt() {
54057
+ return this.Get('StartedAt');
54058
+ }
54059
+ set StartedAt(value) {
54060
+ this.Set('StartedAt', value);
54061
+ }
54062
+ /**
54063
+ * * Field Name: EndedAt
54064
+ * * Display Name: Ended At
54065
+ * * SQL Data Type: datetimeoffset
54066
+ * * Description: When processing completed for this specific record during duplicate detection.
54067
+ */
54068
+ get EndedAt() {
54069
+ return this.Get('EndedAt');
54070
+ }
54071
+ set EndedAt(value) {
54072
+ this.Set('EndedAt', value);
54073
+ }
54074
+ /**
51753
54075
  * * Field Name: DuplicateRun
51754
- * * Display Name: Duplicate Run
54076
+ * * Display Name: Run Name
51755
54077
  * * SQL Data Type: nvarchar(255)
51756
54078
  */
51757
54079
  get DuplicateRun() {
@@ -51816,7 +54138,7 @@ let MJDuplicateRunEntity = class MJDuplicateRunEntity extends BaseEntity {
51816
54138
  }
51817
54139
  /**
51818
54140
  * * Field Name: StartedByUserID
51819
- * * Display Name: Started By User
54141
+ * * Display Name: Started By
51820
54142
  * * SQL Data Type: uniqueidentifier
51821
54143
  * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
51822
54144
  */
@@ -51831,6 +54153,7 @@ let MJDuplicateRunEntity = class MJDuplicateRunEntity extends BaseEntity {
51831
54153
  * * Display Name: Source List
51832
54154
  * * SQL Data Type: uniqueidentifier
51833
54155
  * * Related Entity/Foreign Key: MJ: Lists (vwLists.ID)
54156
+ * * Description: Optional List ID to narrow the scope of duplicate detection. When NULL, all records in the entity are scanned. When set, only records in the specified list are checked for duplicates.
51834
54157
  */
51835
54158
  get SourceListID() {
51836
54159
  return this.Get('SourceListID');
@@ -51893,7 +54216,7 @@ let MJDuplicateRunEntity = class MJDuplicateRunEntity extends BaseEntity {
51893
54216
  }
51894
54217
  /**
51895
54218
  * * Field Name: ApprovedByUserID
51896
- * * Display Name: Approved By User
54219
+ * * Display Name: Approved By
51897
54220
  * * SQL Data Type: uniqueidentifier
51898
54221
  * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
51899
54222
  */
@@ -51953,8 +54276,72 @@ let MJDuplicateRunEntity = class MJDuplicateRunEntity extends BaseEntity {
51953
54276
  return this.Get('__mj_UpdatedAt');
51954
54277
  }
51955
54278
  /**
54279
+ * * Field Name: TotalItemCount
54280
+ * * Display Name: Total Item Count
54281
+ * * SQL Data Type: int
54282
+ * * Description: Total entity records to check for duplicates in this run.
54283
+ */
54284
+ get TotalItemCount() {
54285
+ return this.Get('TotalItemCount');
54286
+ }
54287
+ set TotalItemCount(value) {
54288
+ this.Set('TotalItemCount', value);
54289
+ }
54290
+ /**
54291
+ * * Field Name: ProcessedItemCount
54292
+ * * Display Name: Processed Item Count
54293
+ * * SQL Data Type: int
54294
+ * * Default Value: 0
54295
+ * * Description: Number of records checked so far. Used for progress percentage.
54296
+ */
54297
+ get ProcessedItemCount() {
54298
+ return this.Get('ProcessedItemCount');
54299
+ }
54300
+ set ProcessedItemCount(value) {
54301
+ this.Set('ProcessedItemCount', value);
54302
+ }
54303
+ /**
54304
+ * * Field Name: LastProcessedOffset
54305
+ * * Display Name: Last Processed Offset
54306
+ * * SQL Data Type: int
54307
+ * * Default Value: 0
54308
+ * * Description: Resume cursor for large-scale duplicate detection. Stores the offset of the last completed batch.
54309
+ */
54310
+ get LastProcessedOffset() {
54311
+ return this.Get('LastProcessedOffset');
54312
+ }
54313
+ set LastProcessedOffset(value) {
54314
+ this.Set('LastProcessedOffset', value);
54315
+ }
54316
+ /**
54317
+ * * Field Name: BatchSize
54318
+ * * Display Name: Batch Size
54319
+ * * SQL Data Type: int
54320
+ * * Default Value: 100
54321
+ * * Description: Number of records processed per batch during duplicate detection.
54322
+ */
54323
+ get BatchSize() {
54324
+ return this.Get('BatchSize');
54325
+ }
54326
+ set BatchSize(value) {
54327
+ this.Set('BatchSize', value);
54328
+ }
54329
+ /**
54330
+ * * Field Name: CancellationRequested
54331
+ * * Display Name: Cancellation Requested
54332
+ * * SQL Data Type: bit
54333
+ * * Default Value: 0
54334
+ * * Description: When set to 1, duplicate detection stops after the current batch. Used for pause/cancel.
54335
+ */
54336
+ get CancellationRequested() {
54337
+ return this.Get('CancellationRequested');
54338
+ }
54339
+ set CancellationRequested(value) {
54340
+ this.Set('CancellationRequested', value);
54341
+ }
54342
+ /**
51956
54343
  * * Field Name: Entity
51957
- * * Display Name: Entity
54344
+ * * Display Name: Entity Name
51958
54345
  * * SQL Data Type: nvarchar(255)
51959
54346
  */
51960
54347
  get Entity() {
@@ -51970,7 +54357,7 @@ let MJDuplicateRunEntity = class MJDuplicateRunEntity extends BaseEntity {
51970
54357
  }
51971
54358
  /**
51972
54359
  * * Field Name: SourceList
51973
- * * Display Name: Source List
54360
+ * * Display Name: Source List Name
51974
54361
  * * SQL Data Type: nvarchar(100)
51975
54362
  */
51976
54363
  get SourceList() {
@@ -55480,7 +57867,7 @@ let MJEntityDocumentEntity = class MJEntityDocumentEntity extends BaseEntity {
55480
57867
  * * Field Name: PotentialMatchThreshold
55481
57868
  * * Display Name: Potential Match Threshold
55482
57869
  * * SQL Data Type: numeric(12, 11)
55483
- * * Default Value: 1
57870
+ * * Default Value: 0.7
55484
57871
  * * Description: Value between 0 and 1 that determines what is considered a potential matching record. Value must be <= AbsoluteMatchThreshold. This is primarily used for duplicate detection but can be used for other applications as well where matching is relevant.
55485
57872
  */
55486
57873
  get PotentialMatchThreshold() {
@@ -55493,7 +57880,7 @@ let MJEntityDocumentEntity = class MJEntityDocumentEntity extends BaseEntity {
55493
57880
  * * Field Name: AbsoluteMatchThreshold
55494
57881
  * * Display Name: Absolute Match Threshold
55495
57882
  * * SQL Data Type: numeric(12, 11)
55496
- * * Default Value: 1
57883
+ * * Default Value: 0.95
55497
57884
  * * Description: Value between 0 and 1 that determines what is considered an absolute matching record. Value must be >= PotentialMatchThreshold. This is primarily used for duplicate detection but can be used for other applications as well where matching is relevant.
55498
57885
  */
55499
57886
  get AbsoluteMatchThreshold() {
@@ -56481,6 +58868,43 @@ let MJEntityFieldEntity = class MJEntityFieldEntity extends BaseEntity {
56481
58868
  this.Set('RelatedEntityJoinFields', value);
56482
58869
  }
56483
58870
  /**
58871
+ * * Field Name: JSONType
58872
+ * * Display Name: JSON Type
58873
+ * * SQL Data Type: nvarchar(255)
58874
+ * * Description: The name of the TypeScript interface/type for this JSON field. When set, CodeGen emits a strongly-typed Object-suffixed accessor using this type instead of only the default string getter/setter.
58875
+ */
58876
+ get JSONType() {
58877
+ return this.Get('JSONType');
58878
+ }
58879
+ set JSONType(value) {
58880
+ this.Set('JSONType', value);
58881
+ }
58882
+ /**
58883
+ * * Field Name: JSONTypeIsArray
58884
+ * * Display Name: JSON Type Is Array
58885
+ * * SQL Data Type: bit
58886
+ * * Default Value: 0
58887
+ * * Description: If true, the field holds a JSON array of JSONType items. The Object accessor returns Array<JSONType> | null and the setter accepts Array<JSONType> | null.
58888
+ */
58889
+ get JSONTypeIsArray() {
58890
+ return this.Get('JSONTypeIsArray');
58891
+ }
58892
+ set JSONTypeIsArray(value) {
58893
+ this.Set('JSONTypeIsArray', value);
58894
+ }
58895
+ /**
58896
+ * * Field Name: JSONTypeDefinition
58897
+ * * Display Name: JSON Type Definition
58898
+ * * SQL Data Type: nvarchar(MAX)
58899
+ * * Description: Raw TypeScript code emitted by CodeGen above the entity class definition. Typically contains the interface/type definition referenced by JSONType. Can include imports, multiple types, or any valid TypeScript.
58900
+ */
58901
+ get JSONTypeDefinition() {
58902
+ return this.Get('JSONTypeDefinition');
58903
+ }
58904
+ set JSONTypeDefinition(value) {
58905
+ this.Set('JSONTypeDefinition', value);
58906
+ }
58907
+ /**
56484
58908
  * * Field Name: FieldCodeName
56485
58909
  * * Display Name: Field Code Name
56486
58910
  * * SQL Data Type: nvarchar(MAX)
@@ -60739,6 +63163,159 @@ MJIntegrationEntity = __decorate([
60739
63163
  RegisterClass(BaseEntity, 'MJ: Integrations')
60740
63164
  ], MJIntegrationEntity);
60741
63165
  export { MJIntegrationEntity };
63166
+ /**
63167
+ * MJ: Knowledge Hub Saved Searches - strongly typed entity sub-class
63168
+ * * Schema: __mj
63169
+ * * Base Table: KnowledgeHubSavedSearch
63170
+ * * Base View: vwKnowledgeHubSavedSearches
63171
+ * * @description User-saved search queries for the Knowledge Hub. Stores query text, active filters (JSON), and score thresholds so searches can be recalled or run on a schedule.
63172
+ * * Primary Key: ID
63173
+ * @extends {BaseEntity}
63174
+ * @class
63175
+ * @public
63176
+ */
63177
+ let MJKnowledgeHubSavedSearchEntity = class MJKnowledgeHubSavedSearchEntity extends BaseEntity {
63178
+ /**
63179
+ * Loads the MJ: Knowledge Hub Saved Searches record from the database
63180
+ * @param ID: string - primary key value to load the MJ: Knowledge Hub Saved Searches record.
63181
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
63182
+ * @returns {Promise<boolean>} - true if successful, false otherwise
63183
+ * @public
63184
+ * @async
63185
+ * @memberof MJKnowledgeHubSavedSearchEntity
63186
+ * @method
63187
+ * @override
63188
+ */
63189
+ async Load(ID, EntityRelationshipsToLoad) {
63190
+ const compositeKey = new CompositeKey();
63191
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
63192
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
63193
+ }
63194
+ /**
63195
+ * * Field Name: ID
63196
+ * * Display Name: ID
63197
+ * * SQL Data Type: uniqueidentifier
63198
+ * * Default Value: newsequentialid()
63199
+ */
63200
+ get ID() {
63201
+ return this.Get('ID');
63202
+ }
63203
+ set ID(value) {
63204
+ this.Set('ID', value);
63205
+ }
63206
+ /**
63207
+ * * Field Name: UserID
63208
+ * * Display Name: User
63209
+ * * SQL Data Type: uniqueidentifier
63210
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
63211
+ */
63212
+ get UserID() {
63213
+ return this.Get('UserID');
63214
+ }
63215
+ set UserID(value) {
63216
+ this.Set('UserID', value);
63217
+ }
63218
+ /**
63219
+ * * Field Name: Name
63220
+ * * Display Name: Name
63221
+ * * SQL Data Type: nvarchar(255)
63222
+ */
63223
+ get Name() {
63224
+ return this.Get('Name');
63225
+ }
63226
+ set Name(value) {
63227
+ this.Set('Name', value);
63228
+ }
63229
+ /**
63230
+ * * Field Name: Query
63231
+ * * Display Name: Query
63232
+ * * SQL Data Type: nvarchar(1000)
63233
+ */
63234
+ get Query() {
63235
+ return this.Get('Query');
63236
+ }
63237
+ set Query(value) {
63238
+ this.Set('Query', value);
63239
+ }
63240
+ /**
63241
+ * * Field Name: Filters
63242
+ * * Display Name: Filters
63243
+ * * SQL Data Type: nvarchar(MAX)
63244
+ * * Description: JSON object with active filter selections. Keys are filter categories (Entity, Tags), values are arrays of selected option values.
63245
+ */
63246
+ get Filters() {
63247
+ return this.Get('Filters');
63248
+ }
63249
+ set Filters(value) {
63250
+ this.Set('Filters', value);
63251
+ }
63252
+ /**
63253
+ * * Field Name: MinScore
63254
+ * * Display Name: Minimum Score
63255
+ * * SQL Data Type: decimal(3, 2)
63256
+ */
63257
+ get MinScore() {
63258
+ return this.Get('MinScore');
63259
+ }
63260
+ set MinScore(value) {
63261
+ this.Set('MinScore', value);
63262
+ }
63263
+ /**
63264
+ * * Field Name: MaxResults
63265
+ * * Display Name: Maximum Results
63266
+ * * SQL Data Type: int
63267
+ * * Default Value: 50
63268
+ */
63269
+ get MaxResults() {
63270
+ return this.Get('MaxResults');
63271
+ }
63272
+ set MaxResults(value) {
63273
+ this.Set('MaxResults', value);
63274
+ }
63275
+ /**
63276
+ * * Field Name: NotifyOnNewResults
63277
+ * * Display Name: Notify On New Results
63278
+ * * SQL Data Type: bit
63279
+ * * Default Value: 0
63280
+ * * Description: When enabled, the system will notify the user when new results match this saved search (future capability).
63281
+ */
63282
+ get NotifyOnNewResults() {
63283
+ return this.Get('NotifyOnNewResults');
63284
+ }
63285
+ set NotifyOnNewResults(value) {
63286
+ this.Set('NotifyOnNewResults', value);
63287
+ }
63288
+ /**
63289
+ * * Field Name: __mj_CreatedAt
63290
+ * * Display Name: Created At
63291
+ * * SQL Data Type: datetimeoffset
63292
+ * * Default Value: getutcdate()
63293
+ */
63294
+ get __mj_CreatedAt() {
63295
+ return this.Get('__mj_CreatedAt');
63296
+ }
63297
+ /**
63298
+ * * Field Name: __mj_UpdatedAt
63299
+ * * Display Name: Updated At
63300
+ * * SQL Data Type: datetimeoffset
63301
+ * * Default Value: getutcdate()
63302
+ */
63303
+ get __mj_UpdatedAt() {
63304
+ return this.Get('__mj_UpdatedAt');
63305
+ }
63306
+ /**
63307
+ * * Field Name: User
63308
+ * * Display Name: User Name
63309
+ * * SQL Data Type: nvarchar(100)
63310
+ */
63311
+ get User() {
63312
+ return this.Get('User');
63313
+ }
63314
+ };
63315
+ MJKnowledgeHubSavedSearchEntity = __decorate([
63316
+ RegisterClass(BaseEntity, 'MJ: Knowledge Hub Saved Searches')
63317
+ ], MJKnowledgeHubSavedSearchEntity);
63318
+ export { MJKnowledgeHubSavedSearchEntity };
60742
63319
  /**
60743
63320
  * MJ: Libraries - strongly typed entity sub-class
60744
63321
  * * Schema: __mj
@@ -72223,245 +74800,620 @@ let MJSQLDialectEntity = class MJSQLDialectEntity extends BaseEntity {
72223
74800
  get __mj_UpdatedAt() {
72224
74801
  return this.Get('__mj_UpdatedAt');
72225
74802
  }
72226
- };
72227
- MJSQLDialectEntity = __decorate([
72228
- RegisterClass(BaseEntity, 'MJ: SQL Dialects')
72229
- ], MJSQLDialectEntity);
72230
- export { MJSQLDialectEntity };
72231
- /**
72232
- * MJ: Tagged Items - strongly typed entity sub-class
72233
- * * Schema: __mj
72234
- * * Base Table: TaggedItem
72235
- * * Base View: vwTaggedItems
72236
- * * @description Tracks the links between any record in any entity with Tags
72237
- * * Primary Key: ID
72238
- * @extends {BaseEntity}
72239
- * @class
72240
- * @public
72241
- */
72242
- let MJTaggedItemEntity = class MJTaggedItemEntity extends BaseEntity {
72243
- /**
72244
- * Loads the MJ: Tagged Items record from the database
72245
- * @param ID: string - primary key value to load the MJ: Tagged Items record.
72246
- * @param EntityRelationshipsToLoad - (optional) the relationships to load
72247
- * @returns {Promise<boolean>} - true if successful, false otherwise
72248
- * @public
72249
- * @async
72250
- * @memberof MJTaggedItemEntity
72251
- * @method
72252
- * @override
72253
- */
72254
- async Load(ID, EntityRelationshipsToLoad) {
72255
- const compositeKey = new CompositeKey();
72256
- compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
72257
- return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
72258
- }
74803
+ };
74804
+ MJSQLDialectEntity = __decorate([
74805
+ RegisterClass(BaseEntity, 'MJ: SQL Dialects')
74806
+ ], MJSQLDialectEntity);
74807
+ export { MJSQLDialectEntity };
74808
+ /**
74809
+ * MJ: Tag Audit Logs - strongly typed entity sub-class
74810
+ * * Schema: __mj
74811
+ * * Base Table: TagAuditLog
74812
+ * * Base View: vwTagAuditLogs
74813
+ * * @description Immutable audit trail for all tag taxonomy changes. Each row records a single action with before/after details in JSON.
74814
+ * * Primary Key: ID
74815
+ * @extends {BaseEntity}
74816
+ * @class
74817
+ * @public
74818
+ */
74819
+ let MJTagAuditLogEntity = class MJTagAuditLogEntity extends BaseEntity {
74820
+ /**
74821
+ * Loads the MJ: Tag Audit Logs record from the database
74822
+ * @param ID: string - primary key value to load the MJ: Tag Audit Logs record.
74823
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
74824
+ * @returns {Promise<boolean>} - true if successful, false otherwise
74825
+ * @public
74826
+ * @async
74827
+ * @memberof MJTagAuditLogEntity
74828
+ * @method
74829
+ * @override
74830
+ */
74831
+ async Load(ID, EntityRelationshipsToLoad) {
74832
+ const compositeKey = new CompositeKey();
74833
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
74834
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
74835
+ }
74836
+ /**
74837
+ * * Field Name: ID
74838
+ * * Display Name: ID
74839
+ * * SQL Data Type: uniqueidentifier
74840
+ * * Default Value: newsequentialid()
74841
+ */
74842
+ get ID() {
74843
+ return this.Get('ID');
74844
+ }
74845
+ set ID(value) {
74846
+ this.Set('ID', value);
74847
+ }
74848
+ /**
74849
+ * * Field Name: TagID
74850
+ * * Display Name: Tag
74851
+ * * SQL Data Type: uniqueidentifier
74852
+ * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)
74853
+ * * Description: The tag that was acted upon.
74854
+ */
74855
+ get TagID() {
74856
+ return this.Get('TagID');
74857
+ }
74858
+ set TagID(value) {
74859
+ this.Set('TagID', value);
74860
+ }
74861
+ /**
74862
+ * * Field Name: Action
74863
+ * * Display Name: Action
74864
+ * * SQL Data Type: nvarchar(30)
74865
+ * * Value List Type: List
74866
+ * * Possible Values
74867
+ * * Created
74868
+ * * Deleted
74869
+ * * Deprecated
74870
+ * * DescriptionChanged
74871
+ * * Merged
74872
+ * * Moved
74873
+ * * Reactivated
74874
+ * * Renamed
74875
+ * * Split
74876
+ * * Description: The type of action performed: Created, Renamed, Moved (parent changed), Merged (into RelatedTagID), Split (from RelatedTagID), Deprecated, Reactivated, Deleted, DescriptionChanged.
74877
+ */
74878
+ get Action() {
74879
+ return this.Get('Action');
74880
+ }
74881
+ set Action(value) {
74882
+ this.Set('Action', value);
74883
+ }
74884
+ /**
74885
+ * * Field Name: Details
74886
+ * * Display Name: Action Details
74887
+ * * SQL Data Type: nvarchar(MAX)
74888
+ * * Description: JSON object with action-specific details. For Renamed: {"OldName":"...","NewName":"..."}. For Moved: {"OldParentID":"...","NewParentID":"..."}. For Merged: {"ItemsMoved":42}.
74889
+ */
74890
+ get Details() {
74891
+ return this.Get('Details');
74892
+ }
74893
+ set Details(value) {
74894
+ this.Set('Details', value);
74895
+ }
74896
+ /**
74897
+ * * Field Name: PerformedByUserID
74898
+ * * Display Name: Performed By User
74899
+ * * SQL Data Type: uniqueidentifier
74900
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
74901
+ * * Description: User who performed the action.
74902
+ */
74903
+ get PerformedByUserID() {
74904
+ return this.Get('PerformedByUserID');
74905
+ }
74906
+ set PerformedByUserID(value) {
74907
+ this.Set('PerformedByUserID', value);
74908
+ }
74909
+ /**
74910
+ * * Field Name: RelatedTagID
74911
+ * * Display Name: Related Tag
74912
+ * * SQL Data Type: uniqueidentifier
74913
+ * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)
74914
+ * * Description: For Merged actions: the surviving tag. For Split actions: the source tag. NULL for other actions.
74915
+ */
74916
+ get RelatedTagID() {
74917
+ return this.Get('RelatedTagID');
74918
+ }
74919
+ set RelatedTagID(value) {
74920
+ this.Set('RelatedTagID', value);
74921
+ }
74922
+ /**
74923
+ * * Field Name: __mj_CreatedAt
74924
+ * * Display Name: Created At
74925
+ * * SQL Data Type: datetimeoffset
74926
+ * * Default Value: getutcdate()
74927
+ */
74928
+ get __mj_CreatedAt() {
74929
+ return this.Get('__mj_CreatedAt');
74930
+ }
74931
+ /**
74932
+ * * Field Name: __mj_UpdatedAt
74933
+ * * Display Name: Updated At
74934
+ * * SQL Data Type: datetimeoffset
74935
+ * * Default Value: getutcdate()
74936
+ */
74937
+ get __mj_UpdatedAt() {
74938
+ return this.Get('__mj_UpdatedAt');
74939
+ }
74940
+ /**
74941
+ * * Field Name: Tag
74942
+ * * Display Name: Tag Name
74943
+ * * SQL Data Type: nvarchar(255)
74944
+ */
74945
+ get Tag() {
74946
+ return this.Get('Tag');
74947
+ }
74948
+ /**
74949
+ * * Field Name: PerformedByUser
74950
+ * * Display Name: User Name
74951
+ * * SQL Data Type: nvarchar(100)
74952
+ */
74953
+ get PerformedByUser() {
74954
+ return this.Get('PerformedByUser');
74955
+ }
74956
+ /**
74957
+ * * Field Name: RelatedTag
74958
+ * * Display Name: Related Tag Name
74959
+ * * SQL Data Type: nvarchar(255)
74960
+ */
74961
+ get RelatedTag() {
74962
+ return this.Get('RelatedTag');
74963
+ }
74964
+ };
74965
+ MJTagAuditLogEntity = __decorate([
74966
+ RegisterClass(BaseEntity, 'MJ: Tag Audit Logs')
74967
+ ], MJTagAuditLogEntity);
74968
+ export { MJTagAuditLogEntity };
74969
+ /**
74970
+ * MJ: Tag Co Occurrences - strongly typed entity sub-class
74971
+ * * Schema: __mj
74972
+ * * Base Table: TagCoOccurrence
74973
+ * * Base View: vwTagCoOccurrences
74974
+ * * @description Materialized co-occurrence counts for tag pairs. Records how many content items share both tags. Used for taxonomy health analysis, merge suggestions, and cross-entity intelligence. Recomputed periodically by the pipeline.
74975
+ * * Primary Key: ID
74976
+ * @extends {BaseEntity}
74977
+ * @class
74978
+ * @public
74979
+ */
74980
+ let MJTagCoOccurrenceEntity = class MJTagCoOccurrenceEntity extends BaseEntity {
74981
+ /**
74982
+ * Loads the MJ: Tag Co Occurrences record from the database
74983
+ * @param ID: string - primary key value to load the MJ: Tag Co Occurrences record.
74984
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
74985
+ * @returns {Promise<boolean>} - true if successful, false otherwise
74986
+ * @public
74987
+ * @async
74988
+ * @memberof MJTagCoOccurrenceEntity
74989
+ * @method
74990
+ * @override
74991
+ */
74992
+ async Load(ID, EntityRelationshipsToLoad) {
74993
+ const compositeKey = new CompositeKey();
74994
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
74995
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
74996
+ }
74997
+ /**
74998
+ * Validate() method override for MJ: Tag Co Occurrences entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
74999
+ * * Table-Level: Tag A must be ordered before Tag B to ensure that each pair of tags is stored consistently and to prevent duplicate entries for the same combination.
75000
+ * @public
75001
+ * @method
75002
+ * @override
75003
+ */
75004
+ Validate() {
75005
+ const result = super.Validate();
75006
+ this.ValidateTagAIDLessThanTagBID(result);
75007
+ result.Success = result.Success && (result.Errors.length === 0);
75008
+ return result;
75009
+ }
75010
+ /**
75011
+ * Tag A must be ordered before Tag B to ensure that each pair of tags is stored consistently and to prevent duplicate entries for the same combination.
75012
+ * @param result - the ValidationResult object to add any errors or warnings to
75013
+ * @public
75014
+ * @method
75015
+ */
75016
+ ValidateTagAIDLessThanTagBID(result) {
75017
+ if (this.TagAID != null && this.TagBID != null && this.TagAID >= this.TagBID) {
75018
+ result.Errors.push(new ValidationErrorInfo("TagAID", "Tag A must be ordered before Tag B to ensure a consistent ordering of tag pairs.", this.TagAID, ValidationErrorType.Failure));
75019
+ }
75020
+ }
75021
+ /**
75022
+ * * Field Name: ID
75023
+ * * Display Name: ID
75024
+ * * SQL Data Type: uniqueidentifier
75025
+ * * Default Value: newsequentialid()
75026
+ */
75027
+ get ID() {
75028
+ return this.Get('ID');
75029
+ }
75030
+ set ID(value) {
75031
+ this.Set('ID', value);
75032
+ }
75033
+ /**
75034
+ * * Field Name: TagAID
75035
+ * * Display Name: Tag A ID
75036
+ * * SQL Data Type: uniqueidentifier
75037
+ * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)
75038
+ * * Description: First tag in the canonical pair (TagAID < TagBID ensures each pair is stored exactly once).
75039
+ */
75040
+ get TagAID() {
75041
+ return this.Get('TagAID');
75042
+ }
75043
+ set TagAID(value) {
75044
+ this.Set('TagAID', value);
75045
+ }
75046
+ /**
75047
+ * * Field Name: TagBID
75048
+ * * Display Name: Tag B ID
75049
+ * * SQL Data Type: uniqueidentifier
75050
+ * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)
75051
+ */
75052
+ get TagBID() {
75053
+ return this.Get('TagBID');
75054
+ }
75055
+ set TagBID(value) {
75056
+ this.Set('TagBID', value);
75057
+ }
75058
+ /**
75059
+ * * Field Name: CoOccurrenceCount
75060
+ * * Display Name: Co-Occurrence Count
75061
+ * * SQL Data Type: int
75062
+ * * Default Value: 0
75063
+ * * Description: Number of content items (or entity records via TaggedItem) that are tagged with both TagA and TagB.
75064
+ */
75065
+ get CoOccurrenceCount() {
75066
+ return this.Get('CoOccurrenceCount');
75067
+ }
75068
+ set CoOccurrenceCount(value) {
75069
+ this.Set('CoOccurrenceCount', value);
75070
+ }
75071
+ /**
75072
+ * * Field Name: LastComputedAt
75073
+ * * Display Name: Last Computed At
75074
+ * * SQL Data Type: datetimeoffset
75075
+ * * Default Value: getutcdate()
75076
+ */
75077
+ get LastComputedAt() {
75078
+ return this.Get('LastComputedAt');
75079
+ }
75080
+ set LastComputedAt(value) {
75081
+ this.Set('LastComputedAt', value);
75082
+ }
75083
+ /**
75084
+ * * Field Name: __mj_CreatedAt
75085
+ * * Display Name: Created At
75086
+ * * SQL Data Type: datetimeoffset
75087
+ * * Default Value: getutcdate()
75088
+ */
75089
+ get __mj_CreatedAt() {
75090
+ return this.Get('__mj_CreatedAt');
75091
+ }
75092
+ /**
75093
+ * * Field Name: __mj_UpdatedAt
75094
+ * * Display Name: Updated At
75095
+ * * SQL Data Type: datetimeoffset
75096
+ * * Default Value: getutcdate()
75097
+ */
75098
+ get __mj_UpdatedAt() {
75099
+ return this.Get('__mj_UpdatedAt');
75100
+ }
75101
+ /**
75102
+ * * Field Name: TagA
75103
+ * * Display Name: Tag A
75104
+ * * SQL Data Type: nvarchar(255)
75105
+ */
75106
+ get TagA() {
75107
+ return this.Get('TagA');
75108
+ }
75109
+ /**
75110
+ * * Field Name: TagB
75111
+ * * Display Name: Tag B
75112
+ * * SQL Data Type: nvarchar(255)
75113
+ */
75114
+ get TagB() {
75115
+ return this.Get('TagB');
75116
+ }
75117
+ };
75118
+ MJTagCoOccurrenceEntity = __decorate([
75119
+ RegisterClass(BaseEntity, 'MJ: Tag Co Occurrences')
75120
+ ], MJTagCoOccurrenceEntity);
75121
+ export { MJTagCoOccurrenceEntity };
75122
+ /**
75123
+ * MJ: Tagged Items - strongly typed entity sub-class
75124
+ * * Schema: __mj
75125
+ * * Base Table: TaggedItem
75126
+ * * Base View: vwTaggedItems
75127
+ * * @description Tracks the links between any record in any entity with Tags
75128
+ * * Primary Key: ID
75129
+ * @extends {BaseEntity}
75130
+ * @class
75131
+ * @public
75132
+ */
75133
+ let MJTaggedItemEntity = class MJTaggedItemEntity extends BaseEntity {
75134
+ /**
75135
+ * Loads the MJ: Tagged Items record from the database
75136
+ * @param ID: string - primary key value to load the MJ: Tagged Items record.
75137
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
75138
+ * @returns {Promise<boolean>} - true if successful, false otherwise
75139
+ * @public
75140
+ * @async
75141
+ * @memberof MJTaggedItemEntity
75142
+ * @method
75143
+ * @override
75144
+ */
75145
+ async Load(ID, EntityRelationshipsToLoad) {
75146
+ const compositeKey = new CompositeKey();
75147
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
75148
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
75149
+ }
75150
+ /**
75151
+ * * Field Name: ID
75152
+ * * Display Name: ID
75153
+ * * SQL Data Type: uniqueidentifier
75154
+ * * Default Value: newsequentialid()
75155
+ */
75156
+ get ID() {
75157
+ return this.Get('ID');
75158
+ }
75159
+ set ID(value) {
75160
+ this.Set('ID', value);
75161
+ }
75162
+ /**
75163
+ * * Field Name: TagID
75164
+ * * Display Name: Tag ID
75165
+ * * SQL Data Type: uniqueidentifier
75166
+ * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)
75167
+ */
75168
+ get TagID() {
75169
+ return this.Get('TagID');
75170
+ }
75171
+ set TagID(value) {
75172
+ this.Set('TagID', value);
75173
+ }
75174
+ /**
75175
+ * * Field Name: EntityID
75176
+ * * Display Name: Entity ID
75177
+ * * SQL Data Type: uniqueidentifier
75178
+ * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
75179
+ */
75180
+ get EntityID() {
75181
+ return this.Get('EntityID');
75182
+ }
75183
+ set EntityID(value) {
75184
+ this.Set('EntityID', value);
75185
+ }
75186
+ /**
75187
+ * * Field Name: RecordID
75188
+ * * Display Name: Record ID
75189
+ * * SQL Data Type: nvarchar(450)
75190
+ * * Description: Field RecordID for entity Tagged Items.
75191
+ */
75192
+ get RecordID() {
75193
+ return this.Get('RecordID');
75194
+ }
75195
+ set RecordID(value) {
75196
+ this.Set('RecordID', value);
75197
+ }
75198
+ /**
75199
+ * * Field Name: __mj_CreatedAt
75200
+ * * Display Name: Created At
75201
+ * * SQL Data Type: datetimeoffset
75202
+ * * Default Value: getutcdate()
75203
+ */
75204
+ get __mj_CreatedAt() {
75205
+ return this.Get('__mj_CreatedAt');
75206
+ }
75207
+ /**
75208
+ * * Field Name: __mj_UpdatedAt
75209
+ * * Display Name: Updated At
75210
+ * * SQL Data Type: datetimeoffset
75211
+ * * Default Value: getutcdate()
75212
+ */
75213
+ get __mj_UpdatedAt() {
75214
+ return this.Get('__mj_UpdatedAt');
75215
+ }
75216
+ /**
75217
+ * * Field Name: Weight
75218
+ * * Display Name: Weight
75219
+ * * SQL Data Type: numeric(5, 4)
75220
+ * * Default Value: 1.0
75221
+ * * Description: Relevance weight of this tag association (0.0 to 1.0). 1.0 indicates the tag is highly relevant or was manually applied. Lower values indicate decreasing relevance as determined by LLM autotagging. Default 1.0 for manually applied tags.
75222
+ */
75223
+ get Weight() {
75224
+ return this.Get('Weight');
75225
+ }
75226
+ set Weight(value) {
75227
+ this.Set('Weight', value);
75228
+ }
75229
+ /**
75230
+ * * Field Name: Tag
75231
+ * * Display Name: Tag
75232
+ * * SQL Data Type: nvarchar(255)
75233
+ */
75234
+ get Tag() {
75235
+ return this.Get('Tag');
75236
+ }
75237
+ /**
75238
+ * * Field Name: Entity
75239
+ * * Display Name: Entity
75240
+ * * SQL Data Type: nvarchar(255)
75241
+ */
75242
+ get Entity() {
75243
+ return this.Get('Entity');
75244
+ }
75245
+ };
75246
+ MJTaggedItemEntity = __decorate([
75247
+ RegisterClass(BaseEntity, 'MJ: Tagged Items')
75248
+ ], MJTaggedItemEntity);
75249
+ export { MJTaggedItemEntity };
75250
+ /**
75251
+ * MJ: Tags - strongly typed entity sub-class
75252
+ * * Schema: __mj
75253
+ * * Base Table: Tag
75254
+ * * Base View: vwTags
75255
+ * * @description Tags are used to arbitrarily associate any record in any entity with addtional information.
75256
+ * * Primary Key: ID
75257
+ * @extends {BaseEntity}
75258
+ * @class
75259
+ * @public
75260
+ */
75261
+ let MJTagEntity = class MJTagEntity extends BaseEntity {
75262
+ /**
75263
+ * Loads the MJ: Tags record from the database
75264
+ * @param ID: string - primary key value to load the MJ: Tags record.
75265
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
75266
+ * @returns {Promise<boolean>} - true if successful, false otherwise
75267
+ * @public
75268
+ * @async
75269
+ * @memberof MJTagEntity
75270
+ * @method
75271
+ * @override
75272
+ */
75273
+ async Load(ID, EntityRelationshipsToLoad) {
75274
+ const compositeKey = new CompositeKey();
75275
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
75276
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
75277
+ }
75278
+ /**
75279
+ * * Field Name: ID
75280
+ * * Display Name: ID
75281
+ * * SQL Data Type: uniqueidentifier
75282
+ * * Default Value: newsequentialid()
75283
+ */
75284
+ get ID() {
75285
+ return this.Get('ID');
75286
+ }
75287
+ set ID(value) {
75288
+ this.Set('ID', value);
75289
+ }
75290
+ /**
75291
+ * * Field Name: Name
75292
+ * * Display Name: Name
75293
+ * * SQL Data Type: nvarchar(255)
75294
+ */
75295
+ get Name() {
75296
+ return this.Get('Name');
75297
+ }
75298
+ set Name(value) {
75299
+ this.Set('Name', value);
75300
+ }
75301
+ /**
75302
+ * * Field Name: ParentID
75303
+ * * Display Name: Parent
75304
+ * * SQL Data Type: uniqueidentifier
75305
+ * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)
75306
+ */
75307
+ get ParentID() {
75308
+ return this.Get('ParentID');
75309
+ }
75310
+ set ParentID(value) {
75311
+ this.Set('ParentID', value);
75312
+ }
75313
+ /**
75314
+ * * Field Name: DisplayName
75315
+ * * Display Name: Display Name
75316
+ * * SQL Data Type: nvarchar(255)
75317
+ * * Description: Field DisplayName for entity Tags.
75318
+ */
75319
+ get DisplayName() {
75320
+ return this.Get('DisplayName');
75321
+ }
75322
+ set DisplayName(value) {
75323
+ this.Set('DisplayName', value);
75324
+ }
75325
+ /**
75326
+ * * Field Name: Description
75327
+ * * Display Name: Description
75328
+ * * SQL Data Type: nvarchar(MAX)
75329
+ */
75330
+ get Description() {
75331
+ return this.Get('Description');
75332
+ }
75333
+ set Description(value) {
75334
+ this.Set('Description', value);
75335
+ }
75336
+ /**
75337
+ * * Field Name: __mj_CreatedAt
75338
+ * * Display Name: Created At
75339
+ * * SQL Data Type: datetimeoffset
75340
+ * * Default Value: getutcdate()
75341
+ */
75342
+ get __mj_CreatedAt() {
75343
+ return this.Get('__mj_CreatedAt');
75344
+ }
75345
+ /**
75346
+ * * Field Name: __mj_UpdatedAt
75347
+ * * Display Name: Updated At
75348
+ * * SQL Data Type: datetimeoffset
75349
+ * * Default Value: getutcdate()
75350
+ */
75351
+ get __mj_UpdatedAt() {
75352
+ return this.Get('__mj_UpdatedAt');
75353
+ }
72259
75354
  /**
72260
- * * Field Name: ID
72261
- * * Display Name: ID
72262
- * * SQL Data Type: uniqueidentifier
72263
- * * Default Value: newsequentialid()
75355
+ * * Field Name: Status
75356
+ * * Display Name: Status
75357
+ * * SQL Data Type: nvarchar(20)
75358
+ * * Default Value: Active
75359
+ * * Value List Type: List
75360
+ * * Possible Values
75361
+ * * Active
75362
+ * * Deleted
75363
+ * * Deprecated
75364
+ * * Merged
75365
+ * * Description: Lifecycle status of the tag: Active (in use), Merged (consolidated into another tag), Deprecated (no longer assigned but preserved), Deleted (soft-deleted).
72264
75366
  */
72265
- get ID() {
72266
- return this.Get('ID');
75367
+ get Status() {
75368
+ return this.Get('Status');
72267
75369
  }
72268
- set ID(value) {
72269
- this.Set('ID', value);
75370
+ set Status(value) {
75371
+ this.Set('Status', value);
72270
75372
  }
72271
75373
  /**
72272
- * * Field Name: TagID
72273
- * * Display Name: Tag ID
75374
+ * * Field Name: MergedIntoTagID
75375
+ * * Display Name: Merged Into Tag
72274
75376
  * * SQL Data Type: uniqueidentifier
72275
75377
  * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)
75378
+ * * Description: When Status is Merged, points to the surviving tag this tag was merged into. All TaggedItem and ContentItemTag references are re-pointed during merge.
72276
75379
  */
72277
- get TagID() {
72278
- return this.Get('TagID');
72279
- }
72280
- set TagID(value) {
72281
- this.Set('TagID', value);
72282
- }
72283
- /**
72284
- * * Field Name: EntityID
72285
- * * Display Name: Entity ID
72286
- * * SQL Data Type: uniqueidentifier
72287
- * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
72288
- */
72289
- get EntityID() {
72290
- return this.Get('EntityID');
75380
+ get MergedIntoTagID() {
75381
+ return this.Get('MergedIntoTagID');
72291
75382
  }
72292
- set EntityID(value) {
72293
- this.Set('EntityID', value);
75383
+ set MergedIntoTagID(value) {
75384
+ this.Set('MergedIntoTagID', value);
72294
75385
  }
72295
75386
  /**
72296
- * * Field Name: RecordID
72297
- * * Display Name: Record ID
72298
- * * SQL Data Type: nvarchar(450)
72299
- * * Description: Field RecordID for entity Tagged Items.
72300
- */
72301
- get RecordID() {
72302
- return this.Get('RecordID');
72303
- }
72304
- set RecordID(value) {
72305
- this.Set('RecordID', value);
72306
- }
72307
- /**
72308
- * * Field Name: __mj_CreatedAt
72309
- * * Display Name: Created At
72310
- * * SQL Data Type: datetimeoffset
72311
- * * Default Value: getutcdate()
72312
- */
72313
- get __mj_CreatedAt() {
72314
- return this.Get('__mj_CreatedAt');
72315
- }
72316
- /**
72317
- * * Field Name: __mj_UpdatedAt
72318
- * * Display Name: Updated At
72319
- * * SQL Data Type: datetimeoffset
72320
- * * Default Value: getutcdate()
72321
- */
72322
- get __mj_UpdatedAt() {
72323
- return this.Get('__mj_UpdatedAt');
72324
- }
72325
- /**
72326
- * * Field Name: Tag
72327
- * * Display Name: Tag
72328
- * * SQL Data Type: nvarchar(255)
72329
- */
72330
- get Tag() {
72331
- return this.Get('Tag');
72332
- }
72333
- /**
72334
- * * Field Name: Entity
72335
- * * Display Name: Entity
75387
+ * * Field Name: Parent
75388
+ * * Display Name: Parent Name
72336
75389
  * * SQL Data Type: nvarchar(255)
72337
75390
  */
72338
- get Entity() {
72339
- return this.Get('Entity');
72340
- }
72341
- };
72342
- MJTaggedItemEntity = __decorate([
72343
- RegisterClass(BaseEntity, 'MJ: Tagged Items')
72344
- ], MJTaggedItemEntity);
72345
- export { MJTaggedItemEntity };
72346
- /**
72347
- * MJ: Tags - strongly typed entity sub-class
72348
- * * Schema: __mj
72349
- * * Base Table: Tag
72350
- * * Base View: vwTags
72351
- * * @description Tags are used to arbitrarily associate any record in any entity with addtional information.
72352
- * * Primary Key: ID
72353
- * @extends {BaseEntity}
72354
- * @class
72355
- * @public
72356
- */
72357
- let MJTagEntity = class MJTagEntity extends BaseEntity {
72358
- /**
72359
- * Loads the MJ: Tags record from the database
72360
- * @param ID: string - primary key value to load the MJ: Tags record.
72361
- * @param EntityRelationshipsToLoad - (optional) the relationships to load
72362
- * @returns {Promise<boolean>} - true if successful, false otherwise
72363
- * @public
72364
- * @async
72365
- * @memberof MJTagEntity
72366
- * @method
72367
- * @override
72368
- */
72369
- async Load(ID, EntityRelationshipsToLoad) {
72370
- const compositeKey = new CompositeKey();
72371
- compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
72372
- return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
72373
- }
72374
- /**
72375
- * * Field Name: ID
72376
- * * Display Name: ID
72377
- * * SQL Data Type: uniqueidentifier
72378
- * * Default Value: newsequentialid()
72379
- */
72380
- get ID() {
72381
- return this.Get('ID');
72382
- }
72383
- set ID(value) {
72384
- this.Set('ID', value);
75391
+ get Parent() {
75392
+ return this.Get('Parent');
72385
75393
  }
72386
75394
  /**
72387
- * * Field Name: Name
72388
- * * Display Name: Name
75395
+ * * Field Name: MergedIntoTag
75396
+ * * Display Name: Merged Into Tag Name
72389
75397
  * * SQL Data Type: nvarchar(255)
72390
75398
  */
72391
- get Name() {
72392
- return this.Get('Name');
72393
- }
72394
- set Name(value) {
72395
- this.Set('Name', value);
75399
+ get MergedIntoTag() {
75400
+ return this.Get('MergedIntoTag');
72396
75401
  }
72397
75402
  /**
72398
- * * Field Name: ParentID
72399
- * * Display Name: Parent ID
75403
+ * * Field Name: RootParentID
75404
+ * * Display Name: Root Parent
72400
75405
  * * SQL Data Type: uniqueidentifier
72401
- * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)
72402
- */
72403
- get ParentID() {
72404
- return this.Get('ParentID');
72405
- }
72406
- set ParentID(value) {
72407
- this.Set('ParentID', value);
72408
- }
72409
- /**
72410
- * * Field Name: DisplayName
72411
- * * Display Name: Display Name
72412
- * * SQL Data Type: nvarchar(255)
72413
- * * Description: Field DisplayName for entity Tags.
72414
- */
72415
- get DisplayName() {
72416
- return this.Get('DisplayName');
72417
- }
72418
- set DisplayName(value) {
72419
- this.Set('DisplayName', value);
72420
- }
72421
- /**
72422
- * * Field Name: Description
72423
- * * Display Name: Description
72424
- * * SQL Data Type: nvarchar(MAX)
72425
75406
  */
72426
- get Description() {
72427
- return this.Get('Description');
72428
- }
72429
- set Description(value) {
72430
- this.Set('Description', value);
72431
- }
72432
- /**
72433
- * * Field Name: __mj_CreatedAt
72434
- * * Display Name: Created At
72435
- * * SQL Data Type: datetimeoffset
72436
- * * Default Value: getutcdate()
72437
- */
72438
- get __mj_CreatedAt() {
72439
- return this.Get('__mj_CreatedAt');
72440
- }
72441
- /**
72442
- * * Field Name: __mj_UpdatedAt
72443
- * * Display Name: Updated At
72444
- * * SQL Data Type: datetimeoffset
72445
- * * Default Value: getutcdate()
72446
- */
72447
- get __mj_UpdatedAt() {
72448
- return this.Get('__mj_UpdatedAt');
72449
- }
72450
- /**
72451
- * * Field Name: Parent
72452
- * * Display Name: Parent
72453
- * * SQL Data Type: nvarchar(255)
72454
- */
72455
- get Parent() {
72456
- return this.Get('Parent');
75407
+ get RootParentID() {
75408
+ return this.Get('RootParentID');
72457
75409
  }
72458
75410
  /**
72459
- * * Field Name: RootParentID
72460
- * * Display Name: Root Parent ID
75411
+ * * Field Name: RootMergedIntoTagID
75412
+ * * Display Name: Root Merged Into Tag
72461
75413
  * * SQL Data Type: uniqueidentifier
72462
75414
  */
72463
- get RootParentID() {
72464
- return this.Get('RootParentID');
75415
+ get RootMergedIntoTagID() {
75416
+ return this.Get('RootMergedIntoTagID');
72465
75417
  }
72466
75418
  };
72467
75419
  MJTagEntity = __decorate([
@@ -77842,6 +80794,19 @@ export { MJUserViewRunEntity };
77842
80794
  * @public
77843
80795
  */
77844
80796
  let MJUserViewEntity = class MJUserViewEntity extends BaseEntity {
80797
+ constructor() {
80798
+ super(...arguments);
80799
+ this._GridStateObject_cached = undefined;
80800
+ this._GridStateObject_lastRaw = null;
80801
+ this._FilterStateObject_cached = undefined;
80802
+ this._FilterStateObject_lastRaw = null;
80803
+ this._SortStateObject_cached = undefined;
80804
+ this._SortStateObject_lastRaw = null;
80805
+ this._CardStateObject_cached = undefined;
80806
+ this._CardStateObject_lastRaw = null;
80807
+ this._DisplayStateObject_cached = undefined;
80808
+ this._DisplayStateObject_lastRaw = null;
80809
+ }
77845
80810
  /**
77846
80811
  * Loads the MJ: User Views record from the database
77847
80812
  * @param ID: string - primary key value to load the MJ: User Views record.
@@ -77958,6 +80923,7 @@ let MJUserViewEntity = class MJUserViewEntity extends BaseEntity {
77958
80923
  * * Field Name: GridState
77959
80924
  * * Display Name: Grid State
77960
80925
  * * SQL Data Type: nvarchar(MAX)
80926
+ * * JSON Type: MJUserViewEntity_IGridState
77961
80927
  * * Description: JSON storing complete grid configuration including columns, widths, and formatting.
77962
80928
  */
77963
80929
  get GridState() {
@@ -77967,9 +80933,28 @@ let MJUserViewEntity = class MJUserViewEntity extends BaseEntity {
77967
80933
  this.Set('GridState', value);
77968
80934
  }
77969
80935
  /**
80936
+ * Typed accessor for GridState — returns parsed JSON as MJUserViewEntity_IGridState.
80937
+ * Uses lazy parsing with cache invalidation when the underlying raw value changes.
80938
+ */
80939
+ get GridStateObject() {
80940
+ const raw = this.GridState;
80941
+ if (raw !== this._GridStateObject_lastRaw) {
80942
+ this._GridStateObject_cached = raw ? JSON.parse(raw) : null;
80943
+ this._GridStateObject_lastRaw = raw;
80944
+ }
80945
+ return this._GridStateObject_cached;
80946
+ }
80947
+ set GridStateObject(value) {
80948
+ const raw = value ? JSON.stringify(value) : null;
80949
+ this.GridState = raw;
80950
+ this._GridStateObject_cached = value;
80951
+ this._GridStateObject_lastRaw = raw;
80952
+ }
80953
+ /**
77970
80954
  * * Field Name: FilterState
77971
80955
  * * Display Name: Filter State
77972
80956
  * * SQL Data Type: nvarchar(MAX)
80957
+ * * JSON Type: MJUserViewEntity_IFilterState
77973
80958
  * * Description: JSON storing the view's filter configuration.
77974
80959
  */
77975
80960
  get FilterState() {
@@ -77979,6 +80964,24 @@ let MJUserViewEntity = class MJUserViewEntity extends BaseEntity {
77979
80964
  this.Set('FilterState', value);
77980
80965
  }
77981
80966
  /**
80967
+ * Typed accessor for FilterState — returns parsed JSON as MJUserViewEntity_IFilterState.
80968
+ * Uses lazy parsing with cache invalidation when the underlying raw value changes.
80969
+ */
80970
+ get FilterStateObject() {
80971
+ const raw = this.FilterState;
80972
+ if (raw !== this._FilterStateObject_lastRaw) {
80973
+ this._FilterStateObject_cached = raw ? JSON.parse(raw) : null;
80974
+ this._FilterStateObject_lastRaw = raw;
80975
+ }
80976
+ return this._FilterStateObject_cached;
80977
+ }
80978
+ set FilterStateObject(value) {
80979
+ const raw = value ? JSON.stringify(value) : null;
80980
+ this.FilterState = raw;
80981
+ this._FilterStateObject_cached = value;
80982
+ this._FilterStateObject_lastRaw = raw;
80983
+ }
80984
+ /**
77982
80985
  * * Field Name: CustomFilterState
77983
80986
  * * Display Name: Custom Filter State
77984
80987
  * * SQL Data Type: bit
@@ -78069,6 +81072,7 @@ let MJUserViewEntity = class MJUserViewEntity extends BaseEntity {
78069
81072
  * * Field Name: SortState
78070
81073
  * * Display Name: Sort State
78071
81074
  * * SQL Data Type: nvarchar(MAX)
81075
+ * * JSON Type: Array<MJUserViewEntity_ISortStateItem>
78072
81076
  * * Description: JSON storing the view's sort configuration.
78073
81077
  */
78074
81078
  get SortState() {
@@ -78078,6 +81082,24 @@ let MJUserViewEntity = class MJUserViewEntity extends BaseEntity {
78078
81082
  this.Set('SortState', value);
78079
81083
  }
78080
81084
  /**
81085
+ * Typed accessor for SortState — returns parsed JSON as Array<MJUserViewEntity_ISortStateItem>.
81086
+ * Uses lazy parsing with cache invalidation when the underlying raw value changes.
81087
+ */
81088
+ get SortStateObject() {
81089
+ const raw = this.SortState;
81090
+ if (raw !== this._SortStateObject_lastRaw) {
81091
+ this._SortStateObject_cached = raw ? JSON.parse(raw) : null;
81092
+ this._SortStateObject_lastRaw = raw;
81093
+ }
81094
+ return this._SortStateObject_cached;
81095
+ }
81096
+ set SortStateObject(value) {
81097
+ const raw = value ? JSON.stringify(value) : null;
81098
+ this.SortState = raw;
81099
+ this._SortStateObject_cached = value;
81100
+ this._SortStateObject_lastRaw = raw;
81101
+ }
81102
+ /**
78081
81103
  * * Field Name: __mj_CreatedAt
78082
81104
  * * Display Name: Created At
78083
81105
  * * SQL Data Type: datetimeoffset
@@ -78111,6 +81133,7 @@ let MJUserViewEntity = class MJUserViewEntity extends BaseEntity {
78111
81133
  * * Field Name: CardState
78112
81134
  * * Display Name: Card State
78113
81135
  * * SQL Data Type: nvarchar(MAX)
81136
+ * * JSON Type: MJUserViewEntity_ICardState
78114
81137
  * * Description: JSON configuration for card display mode in Data Explorer. Stores card layout settings including title field, subtitle, display fields, thumbnails, and layout density. When null, defaults are derived from entity metadata. See CardState interface in packages/Angular/Generic/entity-viewer/src/lib/types.ts for the current schema definition.
78115
81138
  */
78116
81139
  get CardState() {
@@ -78120,9 +81143,28 @@ let MJUserViewEntity = class MJUserViewEntity extends BaseEntity {
78120
81143
  this.Set('CardState', value);
78121
81144
  }
78122
81145
  /**
81146
+ * Typed accessor for CardState — returns parsed JSON as MJUserViewEntity_ICardState.
81147
+ * Uses lazy parsing with cache invalidation when the underlying raw value changes.
81148
+ */
81149
+ get CardStateObject() {
81150
+ const raw = this.CardState;
81151
+ if (raw !== this._CardStateObject_lastRaw) {
81152
+ this._CardStateObject_cached = raw ? JSON.parse(raw) : null;
81153
+ this._CardStateObject_lastRaw = raw;
81154
+ }
81155
+ return this._CardStateObject_cached;
81156
+ }
81157
+ set CardStateObject(value) {
81158
+ const raw = value ? JSON.stringify(value) : null;
81159
+ this.CardState = raw;
81160
+ this._CardStateObject_cached = value;
81161
+ this._CardStateObject_lastRaw = raw;
81162
+ }
81163
+ /**
78123
81164
  * * Field Name: DisplayState
78124
81165
  * * Display Name: Display State
78125
81166
  * * SQL Data Type: nvarchar(MAX)
81167
+ * * JSON Type: MJUserViewEntity_IDisplayState
78126
81168
  * * Description: JSON configuration for display mode settings. Stores default display mode (grid/cards/timeline/chart), available modes for sharing, and mode-specific configurations like timeline date field and segmentation. See ViewDisplayState interface in packages/Angular/Generic/entity-viewer/src/lib/types.ts for schema.
78127
81169
  */
78128
81170
  get DisplayState() {
@@ -78132,6 +81174,24 @@ let MJUserViewEntity = class MJUserViewEntity extends BaseEntity {
78132
81174
  this.Set('DisplayState', value);
78133
81175
  }
78134
81176
  /**
81177
+ * Typed accessor for DisplayState — returns parsed JSON as MJUserViewEntity_IDisplayState.
81178
+ * Uses lazy parsing with cache invalidation when the underlying raw value changes.
81179
+ */
81180
+ get DisplayStateObject() {
81181
+ const raw = this.DisplayState;
81182
+ if (raw !== this._DisplayStateObject_lastRaw) {
81183
+ this._DisplayStateObject_cached = raw ? JSON.parse(raw) : null;
81184
+ this._DisplayStateObject_lastRaw = raw;
81185
+ }
81186
+ return this._DisplayStateObject_cached;
81187
+ }
81188
+ set DisplayStateObject(value) {
81189
+ const raw = value ? JSON.stringify(value) : null;
81190
+ this.DisplayState = raw;
81191
+ this._DisplayStateObject_cached = value;
81192
+ this._DisplayStateObject_lastRaw = raw;
81193
+ }
81194
+ /**
78135
81195
  * * Field Name: UserName
78136
81196
  * * Display Name: User Name
78137
81197
  * * SQL Data Type: nvarchar(100)