@memberjunction/core-entities 5.30.0 → 5.31.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.
Files changed (56) hide show
  1. package/dist/custom/MJDashboardEntityExtended.d.ts.map +1 -1
  2. package/dist/custom/MJDashboardEntityExtended.js +2 -2
  3. package/dist/custom/MJDashboardEntityExtended.js.map +1 -1
  4. package/dist/custom/MJListDetailEntityExtended.d.ts.map +1 -1
  5. package/dist/custom/MJListDetailEntityExtended.js +3 -3
  6. package/dist/custom/MJListDetailEntityExtended.js.map +1 -1
  7. package/dist/custom/MJUserViewEntityExtended.js +8 -8
  8. package/dist/custom/MJUserViewEntityExtended.js.map +1 -1
  9. package/dist/custom/PermissionProviders/AccessControlRuleProvider.d.ts +6 -6
  10. package/dist/custom/PermissionProviders/AccessControlRuleProvider.d.ts.map +1 -1
  11. package/dist/custom/PermissionProviders/AccessControlRuleProvider.js +16 -15
  12. package/dist/custom/PermissionProviders/AccessControlRuleProvider.js.map +1 -1
  13. package/dist/custom/PermissionProviders/ApplicationRolePermissionProvider.d.ts +5 -5
  14. package/dist/custom/PermissionProviders/ApplicationRolePermissionProvider.d.ts.map +1 -1
  15. package/dist/custom/PermissionProviders/ApplicationRolePermissionProvider.js +7 -7
  16. package/dist/custom/PermissionProviders/ApplicationRolePermissionProvider.js.map +1 -1
  17. package/dist/custom/PermissionProviders/EntityPermissionProvider.d.ts +6 -6
  18. package/dist/custom/PermissionProviders/EntityPermissionProvider.d.ts.map +1 -1
  19. package/dist/custom/PermissionProviders/EntityPermissionProvider.js +11 -10
  20. package/dist/custom/PermissionProviders/EntityPermissionProvider.js.map +1 -1
  21. package/dist/custom/PermissionProviders/QueryPermissionProvider.d.ts +2 -2
  22. package/dist/custom/PermissionProviders/QueryPermissionProvider.d.ts.map +1 -1
  23. package/dist/custom/PermissionProviders/QueryPermissionProvider.js +2 -2
  24. package/dist/custom/PermissionProviders/QueryPermissionProvider.js.map +1 -1
  25. package/dist/custom/PermissionProviders/ResourcePermissionProvider.d.ts +17 -5
  26. package/dist/custom/PermissionProviders/ResourcePermissionProvider.d.ts.map +1 -1
  27. package/dist/custom/PermissionProviders/ResourcePermissionProvider.js +43 -5
  28. package/dist/custom/PermissionProviders/ResourcePermissionProvider.js.map +1 -1
  29. package/dist/custom/Permissions/MJAccessControlRuleEntityExtended.d.ts.map +1 -1
  30. package/dist/custom/Permissions/MJAccessControlRuleEntityExtended.js +3 -3
  31. package/dist/custom/Permissions/MJAccessControlRuleEntityExtended.js.map +1 -1
  32. package/dist/custom/ResourcePermissions/ResourcePermissionEngine.d.ts.map +1 -1
  33. package/dist/custom/ResourcePermissions/ResourcePermissionEngine.js +2 -2
  34. package/dist/custom/ResourcePermissions/ResourcePermissionEngine.js.map +1 -1
  35. package/dist/engines/GeoDataEngine.d.ts.map +1 -1
  36. package/dist/engines/GeoDataEngine.js +2 -2
  37. package/dist/engines/GeoDataEngine.js.map +1 -1
  38. package/dist/engines/PermissionEngine.d.ts +1 -1
  39. package/dist/engines/PermissionEngine.d.ts.map +1 -1
  40. package/dist/engines/PermissionEngine.js +2 -2
  41. package/dist/engines/PermissionEngine.js.map +1 -1
  42. package/dist/engines/UserInfoEngine.d.ts.map +1 -1
  43. package/dist/engines/UserInfoEngine.js +10 -10
  44. package/dist/engines/UserInfoEngine.js.map +1 -1
  45. package/dist/engines/UserViewEngine.d.ts.map +1 -1
  46. package/dist/engines/UserViewEngine.js +4 -4
  47. package/dist/engines/UserViewEngine.js.map +1 -1
  48. package/dist/engines/conversations.d.ts.map +1 -1
  49. package/dist/engines/conversations.js +11 -11
  50. package/dist/engines/conversations.js.map +1 -1
  51. package/dist/generated/entity_subclasses.d.ts +653 -5
  52. package/dist/generated/entity_subclasses.d.ts.map +1 -1
  53. package/dist/generated/entity_subclasses.js +937 -36
  54. package/dist/generated/entity_subclasses.js.map +1 -1
  55. package/package.json +5 -5
  56. package/readme.md +14 -0
@@ -21704,6 +21704,220 @@ export const MJTagCoOccurrenceSchema = z.object({
21704
21704
  * * Display Name: Tag B
21705
21705
  * * SQL Data Type: nvarchar(255)`),
21706
21706
  });
21707
+ /**
21708
+ * zod schema definition for the entity MJ: Tag Scopes
21709
+ */
21710
+ export const MJTagScopeSchema = z.object({
21711
+ ID: z.string().describe(`
21712
+ * * Field Name: ID
21713
+ * * Display Name: ID
21714
+ * * SQL Data Type: uniqueidentifier
21715
+ * * Default Value: newsequentialid()`),
21716
+ TagID: z.string().describe(`
21717
+ * * Field Name: TagID
21718
+ * * Display Name: Tag ID
21719
+ * * SQL Data Type: uniqueidentifier
21720
+ * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)
21721
+ * * Description: The Tag whose visibility this row constrains.`),
21722
+ ScopeEntityID: z.string().describe(`
21723
+ * * Field Name: ScopeEntityID
21724
+ * * Display Name: Scope Entity ID
21725
+ * * SQL Data Type: uniqueidentifier
21726
+ * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
21727
+ * * Description: Entity that the scope record belongs to (e.g., Companies, AI Agents). Combined with ScopeRecordID identifies the specific tenant or context that may see the tag.`),
21728
+ ScopeRecordID: z.string().describe(`
21729
+ * * Field Name: ScopeRecordID
21730
+ * * Display Name: Scope Record ID
21731
+ * * SQL Data Type: nvarchar(450)
21732
+ * * Description: Primary key value of the scope record. Stored as NVARCHAR(450) to match the polymorphic RecordID convention used by TaggedItem.`),
21733
+ __mj_CreatedAt: z.date().describe(`
21734
+ * * Field Name: __mj_CreatedAt
21735
+ * * Display Name: Created At
21736
+ * * SQL Data Type: datetimeoffset
21737
+ * * Default Value: getutcdate()`),
21738
+ __mj_UpdatedAt: z.date().describe(`
21739
+ * * Field Name: __mj_UpdatedAt
21740
+ * * Display Name: Updated At
21741
+ * * SQL Data Type: datetimeoffset
21742
+ * * Default Value: getutcdate()`),
21743
+ Tag: z.string().describe(`
21744
+ * * Field Name: Tag
21745
+ * * Display Name: Tag
21746
+ * * SQL Data Type: nvarchar(255)`),
21747
+ ScopeEntity: z.string().describe(`
21748
+ * * Field Name: ScopeEntity
21749
+ * * Display Name: Scope Entity
21750
+ * * SQL Data Type: nvarchar(255)`),
21751
+ });
21752
+ /**
21753
+ * zod schema definition for the entity MJ: Tag Suggestions
21754
+ */
21755
+ export const MJTagSuggestionSchema = z.object({
21756
+ ID: z.string().describe(`
21757
+ * * Field Name: ID
21758
+ * * Display Name: ID
21759
+ * * SQL Data Type: uniqueidentifier
21760
+ * * Default Value: newsequentialid()`),
21761
+ ProposedName: z.string().describe(`
21762
+ * * Field Name: ProposedName
21763
+ * * Display Name: Proposed Name
21764
+ * * SQL Data Type: nvarchar(255)
21765
+ * * Description: The proposed tag name as seen by the classifier or analyzer.`),
21766
+ ProposedParentID: z.string().nullable().describe(`
21767
+ * * Field Name: ProposedParentID
21768
+ * * Display Name: Proposed Parent
21769
+ * * SQL Data Type: uniqueidentifier
21770
+ * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)
21771
+ * * Description: Tag under which the suggestion would be created if approved as a new tag. NULL = root.`),
21772
+ BestMatchTagID: z.string().nullable().describe(`
21773
+ * * Field Name: BestMatchTagID
21774
+ * * Display Name: Best Match Tag
21775
+ * * SQL Data Type: uniqueidentifier
21776
+ * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)
21777
+ * * Description: When non-null, the existing Tag the system believes is the closest match. The reviewer may accept this as a merge target instead of creating a new tag.`),
21778
+ BestMatchScore: z.number().nullable().describe(`
21779
+ * * Field Name: BestMatchScore
21780
+ * * Display Name: Best Match Score
21781
+ * * SQL Data Type: decimal(4, 3)
21782
+ * * Description: Cosine similarity score (0.000-1.000) between the proposed name embedding and BestMatchTagID's embedding, when applicable.`),
21783
+ Reason: z.string().describe(`
21784
+ * * Field Name: Reason
21785
+ * * Display Name: Reason
21786
+ * * SQL Data Type: nvarchar(50)
21787
+ * * Description: Why this suggestion was created. Free-form NVARCHAR for forward compatibility; conventional values include ConstrainedMode, BelowThreshold, ParentFrozen, AutoGrowDisabled, MaxChildrenExceeded, MaxDepthExceeded, BelowMinWeight, RequiresReview, MergeCandidate, LowUsage, WideNode.`),
21788
+ SourceContentItemID: z.string().nullable().describe(`
21789
+ * * Field Name: SourceContentItemID
21790
+ * * Display Name: Source Content Item
21791
+ * * SQL Data Type: uniqueidentifier
21792
+ * * Related Entity/Foreign Key: MJ: Content Items (vwContentItems.ID)
21793
+ * * Description: ContentItem that triggered this suggestion, when item-level. NULL for taxonomy-level suggestions (merge candidates, low-usage alerts).`),
21794
+ SourceContentSourceID: z.string().nullable().describe(`
21795
+ * * Field Name: SourceContentSourceID
21796
+ * * Display Name: Source Content Source
21797
+ * * SQL Data Type: uniqueidentifier
21798
+ * * Related Entity/Foreign Key: MJ: Content Sources (vwContentSources.ID)
21799
+ * * Description: ContentSource that triggered this suggestion, when source-attributable.`),
21800
+ SourceText: z.string().nullable().describe(`
21801
+ * * Field Name: SourceText
21802
+ * * Display Name: Source Text
21803
+ * * SQL Data Type: nvarchar(MAX)
21804
+ * * Description: Optional snippet of source text that prompted the suggestion. Useful for reviewer context.`),
21805
+ Status: z.union([z.literal('Approved'), z.literal('Merged'), z.literal('Pending'), z.literal('Rejected')]).describe(`
21806
+ * * Field Name: Status
21807
+ * * Display Name: Status
21808
+ * * SQL Data Type: nvarchar(20)
21809
+ * * Default Value: Pending
21810
+ * * Value List Type: List
21811
+ * * Possible Values
21812
+ * * Approved
21813
+ * * Merged
21814
+ * * Pending
21815
+ * * Rejected
21816
+ * * Description: Pending = awaiting review; Approved = accepted as a new tag; Merged = accepted as a merge into BestMatchTagID; Rejected = dismissed.`),
21817
+ ResolvedTagID: z.string().nullable().describe(`
21818
+ * * Field Name: ResolvedTagID
21819
+ * * Display Name: Resolved Tag
21820
+ * * SQL Data Type: uniqueidentifier
21821
+ * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)
21822
+ * * Description: When Approved or Merged, points to the resulting Tag (the new tag for Approved, the merge target for Merged).`),
21823
+ ReviewedByUserID: z.string().nullable().describe(`
21824
+ * * Field Name: ReviewedByUserID
21825
+ * * Display Name: Reviewed By User
21826
+ * * SQL Data Type: uniqueidentifier
21827
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
21828
+ * * Description: User who took action on this suggestion.`),
21829
+ ReviewedAt: z.date().nullable().describe(`
21830
+ * * Field Name: ReviewedAt
21831
+ * * Display Name: Reviewed At
21832
+ * * SQL Data Type: datetimeoffset
21833
+ * * Description: Timestamp of the review action.`),
21834
+ ReviewerNotes: z.string().nullable().describe(`
21835
+ * * Field Name: ReviewerNotes
21836
+ * * Display Name: Reviewer Notes
21837
+ * * SQL Data Type: nvarchar(MAX)
21838
+ * * Description: Free-form notes captured at review time. Useful for rejection rationale or merge decisions.`),
21839
+ __mj_CreatedAt: z.date().describe(`
21840
+ * * Field Name: __mj_CreatedAt
21841
+ * * Display Name: Created At
21842
+ * * SQL Data Type: datetimeoffset
21843
+ * * Default Value: getutcdate()`),
21844
+ __mj_UpdatedAt: z.date().describe(`
21845
+ * * Field Name: __mj_UpdatedAt
21846
+ * * Display Name: Updated At
21847
+ * * SQL Data Type: datetimeoffset
21848
+ * * Default Value: getutcdate()`),
21849
+ ProposedParent: z.string().nullable().describe(`
21850
+ * * Field Name: ProposedParent
21851
+ * * Display Name: Proposed Parent Name
21852
+ * * SQL Data Type: nvarchar(255)`),
21853
+ BestMatchTag: z.string().nullable().describe(`
21854
+ * * Field Name: BestMatchTag
21855
+ * * Display Name: Best Match Name
21856
+ * * SQL Data Type: nvarchar(255)`),
21857
+ SourceContentItem: z.string().nullable().describe(`
21858
+ * * Field Name: SourceContentItem
21859
+ * * Display Name: Source Content Item Name
21860
+ * * SQL Data Type: nvarchar(250)`),
21861
+ SourceContentSource: z.string().nullable().describe(`
21862
+ * * Field Name: SourceContentSource
21863
+ * * Display Name: Source Content Source Name
21864
+ * * SQL Data Type: nvarchar(255)`),
21865
+ ResolvedTag: z.string().nullable().describe(`
21866
+ * * Field Name: ResolvedTag
21867
+ * * Display Name: Resolved Tag Name
21868
+ * * SQL Data Type: nvarchar(255)`),
21869
+ ReviewedByUser: z.string().nullable().describe(`
21870
+ * * Field Name: ReviewedByUser
21871
+ * * Display Name: Reviewed By User Name
21872
+ * * SQL Data Type: nvarchar(100)`),
21873
+ });
21874
+ /**
21875
+ * zod schema definition for the entity MJ: Tag Synonyms
21876
+ */
21877
+ export const MJTagSynonymSchema = z.object({
21878
+ ID: z.string().describe(`
21879
+ * * Field Name: ID
21880
+ * * Display Name: ID
21881
+ * * SQL Data Type: uniqueidentifier
21882
+ * * Default Value: newsequentialid()`),
21883
+ TagID: z.string().describe(`
21884
+ * * Field Name: TagID
21885
+ * * Display Name: Tag ID
21886
+ * * SQL Data Type: uniqueidentifier
21887
+ * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)
21888
+ * * Description: The Tag this synonym maps to.`),
21889
+ Synonym: z.string().describe(`
21890
+ * * Field Name: Synonym
21891
+ * * Display Name: Synonym
21892
+ * * SQL Data Type: nvarchar(255)
21893
+ * * Description: The alternate name that should resolve to the Tag. Case-insensitive; uniqueness is enforced per-Tag via UQ_TagSynonym_Tag_Synonym.`),
21894
+ Source: z.union([z.literal('Imported'), z.literal('LLM'), z.literal('Manual'), z.literal('Merged')]).describe(`
21895
+ * * Field Name: Source
21896
+ * * Display Name: Source
21897
+ * * SQL Data Type: nvarchar(20)
21898
+ * * Default Value: Manual
21899
+ * * Value List Type: List
21900
+ * * Possible Values
21901
+ * * Imported
21902
+ * * LLM
21903
+ * * Manual
21904
+ * * Merged
21905
+ * * Description: How this synonym was introduced. Manual = admin-authored; LLM = suggested by an LLM run; Imported = bulk-loaded; Merged = inherited from a tag merged into this one.`),
21906
+ __mj_CreatedAt: z.date().describe(`
21907
+ * * Field Name: __mj_CreatedAt
21908
+ * * Display Name: Created At
21909
+ * * SQL Data Type: datetimeoffset
21910
+ * * Default Value: getutcdate()`),
21911
+ __mj_UpdatedAt: z.date().describe(`
21912
+ * * Field Name: __mj_UpdatedAt
21913
+ * * Display Name: Updated At
21914
+ * * SQL Data Type: datetimeoffset
21915
+ * * Default Value: getutcdate()`),
21916
+ Tag: z.string().describe(`
21917
+ * * Field Name: Tag
21918
+ * * Display Name: Tag Name
21919
+ * * SQL Data Type: nvarchar(255)`),
21920
+ });
21707
21921
  /**
21708
21922
  * zod schema definition for the entity MJ: Tagged Items
21709
21923
  */
@@ -21804,25 +22018,79 @@ export const MJTagSchema = z.object({
21804
22018
  * * Description: Lifecycle status of the tag: Active (in use), Merged (consolidated into another tag), Deprecated (no longer assigned but preserved), Deleted (soft-deleted).`),
21805
22019
  MergedIntoTagID: z.string().nullable().describe(`
21806
22020
  * * Field Name: MergedIntoTagID
21807
- * * Display Name: Merged Into Tag
22021
+ * * Display Name: Merged Into
21808
22022
  * * SQL Data Type: uniqueidentifier
21809
22023
  * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)
21810
22024
  * * 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.`),
22025
+ IsGlobal: z.boolean().describe(`
22026
+ * * Field Name: IsGlobal
22027
+ * * Display Name: Is Global
22028
+ * * SQL Data Type: bit
22029
+ * * Default Value: 1
22030
+ * * Description: When 1, the tag is visible to every tenant/scope. When 0, the tag is only visible to the (Entity, Record) pairs listed in TagScope. Cannot be set together with TagScope rows — enforced in entity Save() override.`),
22031
+ AllowAutoGrow: z.boolean().describe(`
22032
+ * * Field Name: AllowAutoGrow
22033
+ * * Display Name: Allow Auto Grow
22034
+ * * SQL Data Type: bit
22035
+ * * Default Value: 1
22036
+ * * Description: When 1, the autotagger may auto-create new child tags under this node when running in AutoGrow or FreeFlow mode. When 0, new children must come through the TagSuggestion review queue.`),
22037
+ IsFrozen: z.boolean().describe(`
22038
+ * * Field Name: IsFrozen
22039
+ * * Display Name: Is Frozen
22040
+ * * SQL Data Type: bit
22041
+ * * Default Value: 0
22042
+ * * Description: When 1, this subtree is locked: no new children may be created under this node or any descendant, regardless of taxonomy mode. Existing children remain editable.`),
22043
+ MaxChildren: z.number().nullable().describe(`
22044
+ * * Field Name: MaxChildren
22045
+ * * Display Name: Max Children
22046
+ * * SQL Data Type: int
22047
+ * * Description: Optional cap on the number of direct children allowed under this tag. NULL = unlimited. Auto-grow is blocked once this cap is reached and routed to the TagSuggestion queue.`),
22048
+ MaxDescendantDepth: z.number().nullable().describe(`
22049
+ * * Field Name: MaxDescendantDepth
22050
+ * * Display Name: Max Descendant Depth
22051
+ * * SQL Data Type: int
22052
+ * * Description: Optional cap on the depth of the subtree rooted at this tag. NULL = unlimited. 0 = leaf-only (no children at all). Enforced via ancestor walk during auto-grow.`),
22053
+ MinWeight: z.number().nullable().describe(`
22054
+ * * Field Name: MinWeight
22055
+ * * Display Name: Min Weight
22056
+ * * SQL Data Type: decimal(3, 2)
22057
+ * * Description: Optional minimum classifier confidence (0.00-1.00) required for this tag to be applied. Items below this floor are routed to the TagSuggestion queue instead of being tagged.`),
22058
+ RequiresReview: z.boolean().describe(`
22059
+ * * Field Name: RequiresReview
22060
+ * * Display Name: Requires Review
22061
+ * * SQL Data Type: bit
22062
+ * * Default Value: 0
22063
+ * * Description: When 1, every classifier-applied use of this tag is routed to the TagSuggestion queue for human approval before being persisted as a ContentItemTag → TaggedItem.`),
22064
+ EmbeddingVector: z.string().nullable().describe(`
22065
+ * * Field Name: EmbeddingVector
22066
+ * * Display Name: Embedding Vector
22067
+ * * SQL Data Type: nvarchar(MAX)
22068
+ * * Description: JSON-encoded numeric vector representing the tag's embedding under the model identified by EmbeddingModelID. Refreshed automatically on Save() when Name or Description changes. Used to seed the in-memory tag vector cache without a cold-start LLM round-trip.`),
22069
+ EmbeddingModelID: z.string().nullable().describe(`
22070
+ * * Field Name: EmbeddingModelID
22071
+ * * Display Name: Embedding Model
22072
+ * * SQL Data Type: uniqueidentifier
22073
+ * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
22074
+ * * Description: AI model whose embedding produced EmbeddingVector. When the configured tag-embedding model differs from this value, the cached vector is treated as stale and recomputed.`),
21811
22075
  Parent: z.string().nullable().describe(`
21812
22076
  * * Field Name: Parent
21813
22077
  * * Display Name: Parent Name
21814
22078
  * * SQL Data Type: nvarchar(255)`),
21815
22079
  MergedIntoTag: z.string().nullable().describe(`
21816
22080
  * * Field Name: MergedIntoTag
21817
- * * Display Name: Merged Into Tag Name
22081
+ * * Display Name: Merged Into Name
21818
22082
  * * SQL Data Type: nvarchar(255)`),
22083
+ EmbeddingModel: z.string().nullable().describe(`
22084
+ * * Field Name: EmbeddingModel
22085
+ * * Display Name: Embedding Model Name
22086
+ * * SQL Data Type: nvarchar(50)`),
21819
22087
  RootParentID: z.string().nullable().describe(`
21820
22088
  * * Field Name: RootParentID
21821
22089
  * * Display Name: Root Parent
21822
22090
  * * SQL Data Type: uniqueidentifier`),
21823
22091
  RootMergedIntoTagID: z.string().nullable().describe(`
21824
22092
  * * Field Name: RootMergedIntoTagID
21825
- * * Display Name: Root Merged Into Tag
22093
+ * * Display Name: Root Merged Into
21826
22094
  * * SQL Data Type: uniqueidentifier`),
21827
22095
  });
21828
22096
  /**
@@ -26361,9 +26629,9 @@ let MJActionEntity = class MJActionEntity extends BaseEntity {
26361
26629
  * @returns {Promise<boolean>} - true if successful, false otherwise
26362
26630
  */
26363
26631
  async Delete(options) {
26364
- if (Metadata.Provider.ProviderType === ProviderType.Database) {
26632
+ if (Metadata.Provider.ProviderType === ProviderType.Database) { // global-provider-ok: codegen runs offline against a single provider
26365
26633
  // For database providers, use the transaction methods directly
26366
- const provider = Metadata.Provider;
26634
+ const provider = Metadata.Provider; // global-provider-ok: codegen runs offline against a single provider
26367
26635
  try {
26368
26636
  await provider.BeginTransaction();
26369
26637
  const result = await super.Delete(options);
@@ -31208,9 +31476,9 @@ let MJAIAgentRunStepEntity = class MJAIAgentRunStepEntity extends BaseEntity {
31208
31476
  * @returns {Promise<boolean>} - true if successful, false otherwise
31209
31477
  */
31210
31478
  async Delete(options) {
31211
- if (Metadata.Provider.ProviderType === ProviderType.Database) {
31479
+ if (Metadata.Provider.ProviderType === ProviderType.Database) { // global-provider-ok: codegen runs offline against a single provider
31212
31480
  // For database providers, use the transaction methods directly
31213
- const provider = Metadata.Provider;
31481
+ const provider = Metadata.Provider; // global-provider-ok: codegen runs offline against a single provider
31214
31482
  try {
31215
31483
  await provider.BeginTransaction();
31216
31484
  const result = await super.Delete(options);
@@ -31633,9 +31901,9 @@ let MJAIAgentRunEntity = class MJAIAgentRunEntity extends BaseEntity {
31633
31901
  * @returns {Promise<boolean>} - true if successful, false otherwise
31634
31902
  */
31635
31903
  async Delete(options) {
31636
- if (Metadata.Provider.ProviderType === ProviderType.Database) {
31904
+ if (Metadata.Provider.ProviderType === ProviderType.Database) { // global-provider-ok: codegen runs offline against a single provider
31637
31905
  // For database providers, use the transaction methods directly
31638
- const provider = Metadata.Provider;
31906
+ const provider = Metadata.Provider; // global-provider-ok: codegen runs offline against a single provider
31639
31907
  try {
31640
31908
  await provider.BeginTransaction();
31641
31909
  const result = await super.Delete(options);
@@ -32619,9 +32887,9 @@ let MJAIAgentStepEntity = class MJAIAgentStepEntity extends BaseEntity {
32619
32887
  * @returns {Promise<boolean>} - true if successful, false otherwise
32620
32888
  */
32621
32889
  async Delete(options) {
32622
- if (Metadata.Provider.ProviderType === ProviderType.Database) {
32890
+ if (Metadata.Provider.ProviderType === ProviderType.Database) { // global-provider-ok: codegen runs offline against a single provider
32623
32891
  // For database providers, use the transaction methods directly
32624
- const provider = Metadata.Provider;
32892
+ const provider = Metadata.Provider; // global-provider-ok: codegen runs offline against a single provider
32625
32893
  try {
32626
32894
  await provider.BeginTransaction();
32627
32895
  const result = await super.Delete(options);
@@ -33276,9 +33544,9 @@ let MJAIAgentEntity = class MJAIAgentEntity extends BaseEntity {
33276
33544
  * @returns {Promise<boolean>} - true if successful, false otherwise
33277
33545
  */
33278
33546
  async Delete(options) {
33279
- if (Metadata.Provider.ProviderType === ProviderType.Database) {
33547
+ if (Metadata.Provider.ProviderType === ProviderType.Database) { // global-provider-ok: codegen runs offline against a single provider
33280
33548
  // For database providers, use the transaction methods directly
33281
- const provider = Metadata.Provider;
33549
+ const provider = Metadata.Provider; // global-provider-ok: codegen runs offline against a single provider
33282
33550
  try {
33283
33551
  await provider.BeginTransaction();
33284
33552
  const result = await super.Delete(options);
@@ -34834,9 +35102,9 @@ let MJAIConfigurationEntity = class MJAIConfigurationEntity extends BaseEntity {
34834
35102
  * @returns {Promise<boolean>} - true if successful, false otherwise
34835
35103
  */
34836
35104
  async Delete(options) {
34837
- if (Metadata.Provider.ProviderType === ProviderType.Database) {
35105
+ if (Metadata.Provider.ProviderType === ProviderType.Database) { // global-provider-ok: codegen runs offline against a single provider
34838
35106
  // For database providers, use the transaction methods directly
34839
- const provider = Metadata.Provider;
35107
+ const provider = Metadata.Provider; // global-provider-ok: codegen runs offline against a single provider
34840
35108
  try {
34841
35109
  await provider.BeginTransaction();
34842
35110
  const result = await super.Delete(options);
@@ -38112,9 +38380,9 @@ let MJAIPromptRunEntity = class MJAIPromptRunEntity extends BaseEntity {
38112
38380
  * @returns {Promise<boolean>} - true if successful, false otherwise
38113
38381
  */
38114
38382
  async Delete(options) {
38115
- if (Metadata.Provider.ProviderType === ProviderType.Database) {
38383
+ if (Metadata.Provider.ProviderType === ProviderType.Database) { // global-provider-ok: codegen runs offline against a single provider
38116
38384
  // For database providers, use the transaction methods directly
38117
- const provider = Metadata.Provider;
38385
+ const provider = Metadata.Provider; // global-provider-ok: codegen runs offline against a single provider
38118
38386
  try {
38119
38387
  await provider.BeginTransaction();
38120
38388
  const result = await super.Delete(options);
@@ -39484,9 +39752,9 @@ let MJAIPromptEntity = class MJAIPromptEntity extends BaseEntity {
39484
39752
  * @returns {Promise<boolean>} - true if successful, false otherwise
39485
39753
  */
39486
39754
  async Delete(options) {
39487
- if (Metadata.Provider.ProviderType === ProviderType.Database) {
39755
+ if (Metadata.Provider.ProviderType === ProviderType.Database) { // global-provider-ok: codegen runs offline against a single provider
39488
39756
  // For database providers, use the transaction methods directly
39489
- const provider = Metadata.Provider;
39757
+ const provider = Metadata.Provider; // global-provider-ok: codegen runs offline against a single provider
39490
39758
  try {
39491
39759
  await provider.BeginTransaction();
39492
39760
  const result = await super.Delete(options);
@@ -52221,9 +52489,9 @@ let MJConversationArtifactVersionEntity = class MJConversationArtifactVersionEnt
52221
52489
  * @returns {Promise<boolean>} - true if successful, false otherwise
52222
52490
  */
52223
52491
  async Delete(options) {
52224
- if (Metadata.Provider.ProviderType === ProviderType.Database) {
52492
+ if (Metadata.Provider.ProviderType === ProviderType.Database) { // global-provider-ok: codegen runs offline against a single provider
52225
52493
  // For database providers, use the transaction methods directly
52226
- const provider = Metadata.Provider;
52494
+ const provider = Metadata.Provider; // global-provider-ok: codegen runs offline against a single provider
52227
52495
  try {
52228
52496
  await provider.BeginTransaction();
52229
52497
  const result = await super.Delete(options);
@@ -52413,9 +52681,9 @@ let MJConversationArtifactEntity = class MJConversationArtifactEntity extends Ba
52413
52681
  * @returns {Promise<boolean>} - true if successful, false otherwise
52414
52682
  */
52415
52683
  async Delete(options) {
52416
- if (Metadata.Provider.ProviderType === ProviderType.Database) {
52684
+ if (Metadata.Provider.ProviderType === ProviderType.Database) { // global-provider-ok: codegen runs offline against a single provider
52417
52685
  // For database providers, use the transaction methods directly
52418
- const provider = Metadata.Provider;
52686
+ const provider = Metadata.Provider; // global-provider-ok: codegen runs offline against a single provider
52419
52687
  try {
52420
52688
  await provider.BeginTransaction();
52421
52689
  const result = await super.Delete(options);
@@ -53153,9 +53421,9 @@ let MJConversationDetailEntity = class MJConversationDetailEntity extends BaseEn
53153
53421
  * @returns {Promise<boolean>} - true if successful, false otherwise
53154
53422
  */
53155
53423
  async Delete(options) {
53156
- if (Metadata.Provider.ProviderType === ProviderType.Database) {
53424
+ if (Metadata.Provider.ProviderType === ProviderType.Database) { // global-provider-ok: codegen runs offline against a single provider
53157
53425
  // For database providers, use the transaction methods directly
53158
- const provider = Metadata.Provider;
53426
+ const provider = Metadata.Provider; // global-provider-ok: codegen runs offline against a single provider
53159
53427
  try {
53160
53428
  await provider.BeginTransaction();
53161
53429
  const result = await super.Delete(options);
@@ -53651,9 +53919,9 @@ let MJConversationEntity = class MJConversationEntity extends BaseEntity {
53651
53919
  * @returns {Promise<boolean>} - true if successful, false otherwise
53652
53920
  */
53653
53921
  async Delete(options) {
53654
- if (Metadata.Provider.ProviderType === ProviderType.Database) {
53922
+ if (Metadata.Provider.ProviderType === ProviderType.Database) { // global-provider-ok: codegen runs offline against a single provider
53655
53923
  // For database providers, use the transaction methods directly
53656
- const provider = Metadata.Provider;
53924
+ const provider = Metadata.Provider; // global-provider-ok: codegen runs offline against a single provider
53657
53925
  try {
53658
53926
  await provider.BeginTransaction();
53659
53927
  const result = await super.Delete(options);
@@ -55709,9 +55977,9 @@ let MJDashboardEntity = class MJDashboardEntity extends BaseEntity {
55709
55977
  * @returns {Promise<boolean>} - true if successful, false otherwise
55710
55978
  */
55711
55979
  async Delete(options) {
55712
- if (Metadata.Provider.ProviderType === ProviderType.Database) {
55980
+ if (Metadata.Provider.ProviderType === ProviderType.Database) { // global-provider-ok: codegen runs offline against a single provider
55713
55981
  // For database providers, use the transaction methods directly
55714
- const provider = Metadata.Provider;
55982
+ const provider = Metadata.Provider; // global-provider-ok: codegen runs offline against a single provider
55715
55983
  try {
55716
55984
  await provider.BeginTransaction();
55717
55985
  const result = await super.Delete(options);
@@ -71804,9 +72072,9 @@ let MJQueryEntity = class MJQueryEntity extends BaseEntity {
71804
72072
  * @returns {Promise<boolean>} - true if successful, false otherwise
71805
72073
  */
71806
72074
  async Delete(options) {
71807
- if (Metadata.Provider.ProviderType === ProviderType.Database) {
72075
+ if (Metadata.Provider.ProviderType === ProviderType.Database) { // global-provider-ok: codegen runs offline against a single provider
71808
72076
  // For database providers, use the transaction methods directly
71809
- const provider = Metadata.Provider;
72077
+ const provider = Metadata.Provider; // global-provider-ok: codegen runs offline against a single provider
71810
72078
  try {
71811
72079
  await provider.BeginTransaction();
71812
72080
  const result = await super.Delete(options);
@@ -76184,9 +76452,9 @@ let MJReportEntity = class MJReportEntity extends BaseEntity {
76184
76452
  * @returns {Promise<boolean>} - true if successful, false otherwise
76185
76453
  */
76186
76454
  async Delete(options) {
76187
- if (Metadata.Provider.ProviderType === ProviderType.Database) {
76455
+ if (Metadata.Provider.ProviderType === ProviderType.Database) { // global-provider-ok: codegen runs offline against a single provider
76188
76456
  // For database providers, use the transaction methods directly
76189
- const provider = Metadata.Provider;
76457
+ const provider = Metadata.Provider; // global-provider-ok: codegen runs offline against a single provider
76190
76458
  try {
76191
76459
  await provider.BeginTransaction();
76192
76460
  const result = await super.Delete(options);
@@ -79639,6 +79907,518 @@ MJTagCoOccurrenceEntity = __decorate([
79639
79907
  RegisterClass(BaseEntity, 'MJ: Tag Co Occurrences')
79640
79908
  ], MJTagCoOccurrenceEntity);
79641
79909
  export { MJTagCoOccurrenceEntity };
79910
+ /**
79911
+ * MJ: Tag Scopes - strongly typed entity sub-class
79912
+ * * Schema: __mj
79913
+ * * Base Table: TagScope
79914
+ * * Base View: vwTagScopes
79915
+ * * @description Polymorphic junction binding a Tag to one or more (Entity, Record) scope rows. A Tag with one or more TagScope rows is only visible inside those scopes; a Tag with no rows AND IsGlobal=1 is visible everywhere. Mirrors the shape of TaggedItem.
79916
+ * * Primary Key: ID
79917
+ * @extends {BaseEntity}
79918
+ * @class
79919
+ * @public
79920
+ */
79921
+ let MJTagScopeEntity = class MJTagScopeEntity extends BaseEntity {
79922
+ /**
79923
+ * Loads the MJ: Tag Scopes record from the database
79924
+ * @param ID: string - primary key value to load the MJ: Tag Scopes record.
79925
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
79926
+ * @returns {Promise<boolean>} - true if successful, false otherwise
79927
+ * @public
79928
+ * @async
79929
+ * @memberof MJTagScopeEntity
79930
+ * @method
79931
+ * @override
79932
+ */
79933
+ async Load(ID, EntityRelationshipsToLoad) {
79934
+ const compositeKey = new CompositeKey();
79935
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
79936
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
79937
+ }
79938
+ /**
79939
+ * * Field Name: ID
79940
+ * * Display Name: ID
79941
+ * * SQL Data Type: uniqueidentifier
79942
+ * * Default Value: newsequentialid()
79943
+ */
79944
+ get ID() {
79945
+ return this.Get('ID');
79946
+ }
79947
+ set ID(value) {
79948
+ this.Set('ID', value);
79949
+ }
79950
+ /**
79951
+ * * Field Name: TagID
79952
+ * * Display Name: Tag ID
79953
+ * * SQL Data Type: uniqueidentifier
79954
+ * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)
79955
+ * * Description: The Tag whose visibility this row constrains.
79956
+ */
79957
+ get TagID() {
79958
+ return this.Get('TagID');
79959
+ }
79960
+ set TagID(value) {
79961
+ this.Set('TagID', value);
79962
+ }
79963
+ /**
79964
+ * * Field Name: ScopeEntityID
79965
+ * * Display Name: Scope Entity ID
79966
+ * * SQL Data Type: uniqueidentifier
79967
+ * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
79968
+ * * Description: Entity that the scope record belongs to (e.g., Companies, AI Agents). Combined with ScopeRecordID identifies the specific tenant or context that may see the tag.
79969
+ */
79970
+ get ScopeEntityID() {
79971
+ return this.Get('ScopeEntityID');
79972
+ }
79973
+ set ScopeEntityID(value) {
79974
+ this.Set('ScopeEntityID', value);
79975
+ }
79976
+ /**
79977
+ * * Field Name: ScopeRecordID
79978
+ * * Display Name: Scope Record ID
79979
+ * * SQL Data Type: nvarchar(450)
79980
+ * * Description: Primary key value of the scope record. Stored as NVARCHAR(450) to match the polymorphic RecordID convention used by TaggedItem.
79981
+ */
79982
+ get ScopeRecordID() {
79983
+ return this.Get('ScopeRecordID');
79984
+ }
79985
+ set ScopeRecordID(value) {
79986
+ this.Set('ScopeRecordID', value);
79987
+ }
79988
+ /**
79989
+ * * Field Name: __mj_CreatedAt
79990
+ * * Display Name: Created At
79991
+ * * SQL Data Type: datetimeoffset
79992
+ * * Default Value: getutcdate()
79993
+ */
79994
+ get __mj_CreatedAt() {
79995
+ return this.Get('__mj_CreatedAt');
79996
+ }
79997
+ /**
79998
+ * * Field Name: __mj_UpdatedAt
79999
+ * * Display Name: Updated At
80000
+ * * SQL Data Type: datetimeoffset
80001
+ * * Default Value: getutcdate()
80002
+ */
80003
+ get __mj_UpdatedAt() {
80004
+ return this.Get('__mj_UpdatedAt');
80005
+ }
80006
+ /**
80007
+ * * Field Name: Tag
80008
+ * * Display Name: Tag
80009
+ * * SQL Data Type: nvarchar(255)
80010
+ */
80011
+ get Tag() {
80012
+ return this.Get('Tag');
80013
+ }
80014
+ /**
80015
+ * * Field Name: ScopeEntity
80016
+ * * Display Name: Scope Entity
80017
+ * * SQL Data Type: nvarchar(255)
80018
+ */
80019
+ get ScopeEntity() {
80020
+ return this.Get('ScopeEntity');
80021
+ }
80022
+ };
80023
+ MJTagScopeEntity = __decorate([
80024
+ RegisterClass(BaseEntity, 'MJ: Tag Scopes')
80025
+ ], MJTagScopeEntity);
80026
+ export { MJTagScopeEntity };
80027
+ /**
80028
+ * MJ: Tag Suggestions - strongly typed entity sub-class
80029
+ * * Schema: __mj
80030
+ * * Base Table: TagSuggestion
80031
+ * * Base View: vwTagSuggestions
80032
+ * * @description Human-in-the-loop review queue for tag changes the autotagger could not commit autonomously: ambiguous matches, governance-blocked auto-grows, low-usage deprecation candidates, and merge candidates from co-occurrence analysis.
80033
+ * * Primary Key: ID
80034
+ * @extends {BaseEntity}
80035
+ * @class
80036
+ * @public
80037
+ */
80038
+ let MJTagSuggestionEntity = class MJTagSuggestionEntity extends BaseEntity {
80039
+ /**
80040
+ * Loads the MJ: Tag Suggestions record from the database
80041
+ * @param ID: string - primary key value to load the MJ: Tag Suggestions record.
80042
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
80043
+ * @returns {Promise<boolean>} - true if successful, false otherwise
80044
+ * @public
80045
+ * @async
80046
+ * @memberof MJTagSuggestionEntity
80047
+ * @method
80048
+ * @override
80049
+ */
80050
+ async Load(ID, EntityRelationshipsToLoad) {
80051
+ const compositeKey = new CompositeKey();
80052
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
80053
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
80054
+ }
80055
+ /**
80056
+ * * Field Name: ID
80057
+ * * Display Name: ID
80058
+ * * SQL Data Type: uniqueidentifier
80059
+ * * Default Value: newsequentialid()
80060
+ */
80061
+ get ID() {
80062
+ return this.Get('ID');
80063
+ }
80064
+ set ID(value) {
80065
+ this.Set('ID', value);
80066
+ }
80067
+ /**
80068
+ * * Field Name: ProposedName
80069
+ * * Display Name: Proposed Name
80070
+ * * SQL Data Type: nvarchar(255)
80071
+ * * Description: The proposed tag name as seen by the classifier or analyzer.
80072
+ */
80073
+ get ProposedName() {
80074
+ return this.Get('ProposedName');
80075
+ }
80076
+ set ProposedName(value) {
80077
+ this.Set('ProposedName', value);
80078
+ }
80079
+ /**
80080
+ * * Field Name: ProposedParentID
80081
+ * * Display Name: Proposed Parent
80082
+ * * SQL Data Type: uniqueidentifier
80083
+ * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)
80084
+ * * Description: Tag under which the suggestion would be created if approved as a new tag. NULL = root.
80085
+ */
80086
+ get ProposedParentID() {
80087
+ return this.Get('ProposedParentID');
80088
+ }
80089
+ set ProposedParentID(value) {
80090
+ this.Set('ProposedParentID', value);
80091
+ }
80092
+ /**
80093
+ * * Field Name: BestMatchTagID
80094
+ * * Display Name: Best Match Tag
80095
+ * * SQL Data Type: uniqueidentifier
80096
+ * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)
80097
+ * * Description: When non-null, the existing Tag the system believes is the closest match. The reviewer may accept this as a merge target instead of creating a new tag.
80098
+ */
80099
+ get BestMatchTagID() {
80100
+ return this.Get('BestMatchTagID');
80101
+ }
80102
+ set BestMatchTagID(value) {
80103
+ this.Set('BestMatchTagID', value);
80104
+ }
80105
+ /**
80106
+ * * Field Name: BestMatchScore
80107
+ * * Display Name: Best Match Score
80108
+ * * SQL Data Type: decimal(4, 3)
80109
+ * * Description: Cosine similarity score (0.000-1.000) between the proposed name embedding and BestMatchTagID's embedding, when applicable.
80110
+ */
80111
+ get BestMatchScore() {
80112
+ return this.Get('BestMatchScore');
80113
+ }
80114
+ set BestMatchScore(value) {
80115
+ this.Set('BestMatchScore', value);
80116
+ }
80117
+ /**
80118
+ * * Field Name: Reason
80119
+ * * Display Name: Reason
80120
+ * * SQL Data Type: nvarchar(50)
80121
+ * * Description: Why this suggestion was created. Free-form NVARCHAR for forward compatibility; conventional values include ConstrainedMode, BelowThreshold, ParentFrozen, AutoGrowDisabled, MaxChildrenExceeded, MaxDepthExceeded, BelowMinWeight, RequiresReview, MergeCandidate, LowUsage, WideNode.
80122
+ */
80123
+ get Reason() {
80124
+ return this.Get('Reason');
80125
+ }
80126
+ set Reason(value) {
80127
+ this.Set('Reason', value);
80128
+ }
80129
+ /**
80130
+ * * Field Name: SourceContentItemID
80131
+ * * Display Name: Source Content Item
80132
+ * * SQL Data Type: uniqueidentifier
80133
+ * * Related Entity/Foreign Key: MJ: Content Items (vwContentItems.ID)
80134
+ * * Description: ContentItem that triggered this suggestion, when item-level. NULL for taxonomy-level suggestions (merge candidates, low-usage alerts).
80135
+ */
80136
+ get SourceContentItemID() {
80137
+ return this.Get('SourceContentItemID');
80138
+ }
80139
+ set SourceContentItemID(value) {
80140
+ this.Set('SourceContentItemID', value);
80141
+ }
80142
+ /**
80143
+ * * Field Name: SourceContentSourceID
80144
+ * * Display Name: Source Content Source
80145
+ * * SQL Data Type: uniqueidentifier
80146
+ * * Related Entity/Foreign Key: MJ: Content Sources (vwContentSources.ID)
80147
+ * * Description: ContentSource that triggered this suggestion, when source-attributable.
80148
+ */
80149
+ get SourceContentSourceID() {
80150
+ return this.Get('SourceContentSourceID');
80151
+ }
80152
+ set SourceContentSourceID(value) {
80153
+ this.Set('SourceContentSourceID', value);
80154
+ }
80155
+ /**
80156
+ * * Field Name: SourceText
80157
+ * * Display Name: Source Text
80158
+ * * SQL Data Type: nvarchar(MAX)
80159
+ * * Description: Optional snippet of source text that prompted the suggestion. Useful for reviewer context.
80160
+ */
80161
+ get SourceText() {
80162
+ return this.Get('SourceText');
80163
+ }
80164
+ set SourceText(value) {
80165
+ this.Set('SourceText', value);
80166
+ }
80167
+ /**
80168
+ * * Field Name: Status
80169
+ * * Display Name: Status
80170
+ * * SQL Data Type: nvarchar(20)
80171
+ * * Default Value: Pending
80172
+ * * Value List Type: List
80173
+ * * Possible Values
80174
+ * * Approved
80175
+ * * Merged
80176
+ * * Pending
80177
+ * * Rejected
80178
+ * * Description: Pending = awaiting review; Approved = accepted as a new tag; Merged = accepted as a merge into BestMatchTagID; Rejected = dismissed.
80179
+ */
80180
+ get Status() {
80181
+ return this.Get('Status');
80182
+ }
80183
+ set Status(value) {
80184
+ this.Set('Status', value);
80185
+ }
80186
+ /**
80187
+ * * Field Name: ResolvedTagID
80188
+ * * Display Name: Resolved Tag
80189
+ * * SQL Data Type: uniqueidentifier
80190
+ * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)
80191
+ * * Description: When Approved or Merged, points to the resulting Tag (the new tag for Approved, the merge target for Merged).
80192
+ */
80193
+ get ResolvedTagID() {
80194
+ return this.Get('ResolvedTagID');
80195
+ }
80196
+ set ResolvedTagID(value) {
80197
+ this.Set('ResolvedTagID', value);
80198
+ }
80199
+ /**
80200
+ * * Field Name: ReviewedByUserID
80201
+ * * Display Name: Reviewed By User
80202
+ * * SQL Data Type: uniqueidentifier
80203
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
80204
+ * * Description: User who took action on this suggestion.
80205
+ */
80206
+ get ReviewedByUserID() {
80207
+ return this.Get('ReviewedByUserID');
80208
+ }
80209
+ set ReviewedByUserID(value) {
80210
+ this.Set('ReviewedByUserID', value);
80211
+ }
80212
+ /**
80213
+ * * Field Name: ReviewedAt
80214
+ * * Display Name: Reviewed At
80215
+ * * SQL Data Type: datetimeoffset
80216
+ * * Description: Timestamp of the review action.
80217
+ */
80218
+ get ReviewedAt() {
80219
+ return this.Get('ReviewedAt');
80220
+ }
80221
+ set ReviewedAt(value) {
80222
+ this.Set('ReviewedAt', value);
80223
+ }
80224
+ /**
80225
+ * * Field Name: ReviewerNotes
80226
+ * * Display Name: Reviewer Notes
80227
+ * * SQL Data Type: nvarchar(MAX)
80228
+ * * Description: Free-form notes captured at review time. Useful for rejection rationale or merge decisions.
80229
+ */
80230
+ get ReviewerNotes() {
80231
+ return this.Get('ReviewerNotes');
80232
+ }
80233
+ set ReviewerNotes(value) {
80234
+ this.Set('ReviewerNotes', value);
80235
+ }
80236
+ /**
80237
+ * * Field Name: __mj_CreatedAt
80238
+ * * Display Name: Created At
80239
+ * * SQL Data Type: datetimeoffset
80240
+ * * Default Value: getutcdate()
80241
+ */
80242
+ get __mj_CreatedAt() {
80243
+ return this.Get('__mj_CreatedAt');
80244
+ }
80245
+ /**
80246
+ * * Field Name: __mj_UpdatedAt
80247
+ * * Display Name: Updated At
80248
+ * * SQL Data Type: datetimeoffset
80249
+ * * Default Value: getutcdate()
80250
+ */
80251
+ get __mj_UpdatedAt() {
80252
+ return this.Get('__mj_UpdatedAt');
80253
+ }
80254
+ /**
80255
+ * * Field Name: ProposedParent
80256
+ * * Display Name: Proposed Parent Name
80257
+ * * SQL Data Type: nvarchar(255)
80258
+ */
80259
+ get ProposedParent() {
80260
+ return this.Get('ProposedParent');
80261
+ }
80262
+ /**
80263
+ * * Field Name: BestMatchTag
80264
+ * * Display Name: Best Match Name
80265
+ * * SQL Data Type: nvarchar(255)
80266
+ */
80267
+ get BestMatchTag() {
80268
+ return this.Get('BestMatchTag');
80269
+ }
80270
+ /**
80271
+ * * Field Name: SourceContentItem
80272
+ * * Display Name: Source Content Item Name
80273
+ * * SQL Data Type: nvarchar(250)
80274
+ */
80275
+ get SourceContentItem() {
80276
+ return this.Get('SourceContentItem');
80277
+ }
80278
+ /**
80279
+ * * Field Name: SourceContentSource
80280
+ * * Display Name: Source Content Source Name
80281
+ * * SQL Data Type: nvarchar(255)
80282
+ */
80283
+ get SourceContentSource() {
80284
+ return this.Get('SourceContentSource');
80285
+ }
80286
+ /**
80287
+ * * Field Name: ResolvedTag
80288
+ * * Display Name: Resolved Tag Name
80289
+ * * SQL Data Type: nvarchar(255)
80290
+ */
80291
+ get ResolvedTag() {
80292
+ return this.Get('ResolvedTag');
80293
+ }
80294
+ /**
80295
+ * * Field Name: ReviewedByUser
80296
+ * * Display Name: Reviewed By User Name
80297
+ * * SQL Data Type: nvarchar(100)
80298
+ */
80299
+ get ReviewedByUser() {
80300
+ return this.Get('ReviewedByUser');
80301
+ }
80302
+ };
80303
+ MJTagSuggestionEntity = __decorate([
80304
+ RegisterClass(BaseEntity, 'MJ: Tag Suggestions')
80305
+ ], MJTagSuggestionEntity);
80306
+ export { MJTagSuggestionEntity };
80307
+ /**
80308
+ * MJ: Tag Synonyms - strongly typed entity sub-class
80309
+ * * Schema: __mj
80310
+ * * Base Table: TagSynonym
80311
+ * * Base View: vwTagSynonyms
80312
+ * * @description Alternate names that should resolve to a Tag during autotagging. Consulted before exact/fuzzy/semantic match tiers in TagEngine.ResolveTag.
80313
+ * * Primary Key: ID
80314
+ * @extends {BaseEntity}
80315
+ * @class
80316
+ * @public
80317
+ */
80318
+ let MJTagSynonymEntity = class MJTagSynonymEntity extends BaseEntity {
80319
+ /**
80320
+ * Loads the MJ: Tag Synonyms record from the database
80321
+ * @param ID: string - primary key value to load the MJ: Tag Synonyms record.
80322
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
80323
+ * @returns {Promise<boolean>} - true if successful, false otherwise
80324
+ * @public
80325
+ * @async
80326
+ * @memberof MJTagSynonymEntity
80327
+ * @method
80328
+ * @override
80329
+ */
80330
+ async Load(ID, EntityRelationshipsToLoad) {
80331
+ const compositeKey = new CompositeKey();
80332
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
80333
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
80334
+ }
80335
+ /**
80336
+ * * Field Name: ID
80337
+ * * Display Name: ID
80338
+ * * SQL Data Type: uniqueidentifier
80339
+ * * Default Value: newsequentialid()
80340
+ */
80341
+ get ID() {
80342
+ return this.Get('ID');
80343
+ }
80344
+ set ID(value) {
80345
+ this.Set('ID', value);
80346
+ }
80347
+ /**
80348
+ * * Field Name: TagID
80349
+ * * Display Name: Tag ID
80350
+ * * SQL Data Type: uniqueidentifier
80351
+ * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)
80352
+ * * Description: The Tag this synonym maps to.
80353
+ */
80354
+ get TagID() {
80355
+ return this.Get('TagID');
80356
+ }
80357
+ set TagID(value) {
80358
+ this.Set('TagID', value);
80359
+ }
80360
+ /**
80361
+ * * Field Name: Synonym
80362
+ * * Display Name: Synonym
80363
+ * * SQL Data Type: nvarchar(255)
80364
+ * * Description: The alternate name that should resolve to the Tag. Case-insensitive; uniqueness is enforced per-Tag via UQ_TagSynonym_Tag_Synonym.
80365
+ */
80366
+ get Synonym() {
80367
+ return this.Get('Synonym');
80368
+ }
80369
+ set Synonym(value) {
80370
+ this.Set('Synonym', value);
80371
+ }
80372
+ /**
80373
+ * * Field Name: Source
80374
+ * * Display Name: Source
80375
+ * * SQL Data Type: nvarchar(20)
80376
+ * * Default Value: Manual
80377
+ * * Value List Type: List
80378
+ * * Possible Values
80379
+ * * Imported
80380
+ * * LLM
80381
+ * * Manual
80382
+ * * Merged
80383
+ * * Description: How this synonym was introduced. Manual = admin-authored; LLM = suggested by an LLM run; Imported = bulk-loaded; Merged = inherited from a tag merged into this one.
80384
+ */
80385
+ get Source() {
80386
+ return this.Get('Source');
80387
+ }
80388
+ set Source(value) {
80389
+ this.Set('Source', value);
80390
+ }
80391
+ /**
80392
+ * * Field Name: __mj_CreatedAt
80393
+ * * Display Name: Created At
80394
+ * * SQL Data Type: datetimeoffset
80395
+ * * Default Value: getutcdate()
80396
+ */
80397
+ get __mj_CreatedAt() {
80398
+ return this.Get('__mj_CreatedAt');
80399
+ }
80400
+ /**
80401
+ * * Field Name: __mj_UpdatedAt
80402
+ * * Display Name: Updated At
80403
+ * * SQL Data Type: datetimeoffset
80404
+ * * Default Value: getutcdate()
80405
+ */
80406
+ get __mj_UpdatedAt() {
80407
+ return this.Get('__mj_UpdatedAt');
80408
+ }
80409
+ /**
80410
+ * * Field Name: Tag
80411
+ * * Display Name: Tag Name
80412
+ * * SQL Data Type: nvarchar(255)
80413
+ */
80414
+ get Tag() {
80415
+ return this.Get('Tag');
80416
+ }
80417
+ };
80418
+ MJTagSynonymEntity = __decorate([
80419
+ RegisterClass(BaseEntity, 'MJ: Tag Synonyms')
80420
+ ], MJTagSynonymEntity);
80421
+ export { MJTagSynonymEntity };
79642
80422
  /**
79643
80423
  * MJ: Tagged Items - strongly typed entity sub-class
79644
80424
  * * Schema: __mj
@@ -79892,7 +80672,7 @@ let MJTagEntity = class MJTagEntity extends BaseEntity {
79892
80672
  }
79893
80673
  /**
79894
80674
  * * Field Name: MergedIntoTagID
79895
- * * Display Name: Merged Into Tag
80675
+ * * Display Name: Merged Into
79896
80676
  * * SQL Data Type: uniqueidentifier
79897
80677
  * * Related Entity/Foreign Key: MJ: Tags (vwTags.ID)
79898
80678
  * * 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.
@@ -79904,6 +80684,119 @@ let MJTagEntity = class MJTagEntity extends BaseEntity {
79904
80684
  this.Set('MergedIntoTagID', value);
79905
80685
  }
79906
80686
  /**
80687
+ * * Field Name: IsGlobal
80688
+ * * Display Name: Is Global
80689
+ * * SQL Data Type: bit
80690
+ * * Default Value: 1
80691
+ * * Description: When 1, the tag is visible to every tenant/scope. When 0, the tag is only visible to the (Entity, Record) pairs listed in TagScope. Cannot be set together with TagScope rows — enforced in entity Save() override.
80692
+ */
80693
+ get IsGlobal() {
80694
+ return this.Get('IsGlobal');
80695
+ }
80696
+ set IsGlobal(value) {
80697
+ this.Set('IsGlobal', value);
80698
+ }
80699
+ /**
80700
+ * * Field Name: AllowAutoGrow
80701
+ * * Display Name: Allow Auto Grow
80702
+ * * SQL Data Type: bit
80703
+ * * Default Value: 1
80704
+ * * Description: When 1, the autotagger may auto-create new child tags under this node when running in AutoGrow or FreeFlow mode. When 0, new children must come through the TagSuggestion review queue.
80705
+ */
80706
+ get AllowAutoGrow() {
80707
+ return this.Get('AllowAutoGrow');
80708
+ }
80709
+ set AllowAutoGrow(value) {
80710
+ this.Set('AllowAutoGrow', value);
80711
+ }
80712
+ /**
80713
+ * * Field Name: IsFrozen
80714
+ * * Display Name: Is Frozen
80715
+ * * SQL Data Type: bit
80716
+ * * Default Value: 0
80717
+ * * Description: When 1, this subtree is locked: no new children may be created under this node or any descendant, regardless of taxonomy mode. Existing children remain editable.
80718
+ */
80719
+ get IsFrozen() {
80720
+ return this.Get('IsFrozen');
80721
+ }
80722
+ set IsFrozen(value) {
80723
+ this.Set('IsFrozen', value);
80724
+ }
80725
+ /**
80726
+ * * Field Name: MaxChildren
80727
+ * * Display Name: Max Children
80728
+ * * SQL Data Type: int
80729
+ * * Description: Optional cap on the number of direct children allowed under this tag. NULL = unlimited. Auto-grow is blocked once this cap is reached and routed to the TagSuggestion queue.
80730
+ */
80731
+ get MaxChildren() {
80732
+ return this.Get('MaxChildren');
80733
+ }
80734
+ set MaxChildren(value) {
80735
+ this.Set('MaxChildren', value);
80736
+ }
80737
+ /**
80738
+ * * Field Name: MaxDescendantDepth
80739
+ * * Display Name: Max Descendant Depth
80740
+ * * SQL Data Type: int
80741
+ * * Description: Optional cap on the depth of the subtree rooted at this tag. NULL = unlimited. 0 = leaf-only (no children at all). Enforced via ancestor walk during auto-grow.
80742
+ */
80743
+ get MaxDescendantDepth() {
80744
+ return this.Get('MaxDescendantDepth');
80745
+ }
80746
+ set MaxDescendantDepth(value) {
80747
+ this.Set('MaxDescendantDepth', value);
80748
+ }
80749
+ /**
80750
+ * * Field Name: MinWeight
80751
+ * * Display Name: Min Weight
80752
+ * * SQL Data Type: decimal(3, 2)
80753
+ * * Description: Optional minimum classifier confidence (0.00-1.00) required for this tag to be applied. Items below this floor are routed to the TagSuggestion queue instead of being tagged.
80754
+ */
80755
+ get MinWeight() {
80756
+ return this.Get('MinWeight');
80757
+ }
80758
+ set MinWeight(value) {
80759
+ this.Set('MinWeight', value);
80760
+ }
80761
+ /**
80762
+ * * Field Name: RequiresReview
80763
+ * * Display Name: Requires Review
80764
+ * * SQL Data Type: bit
80765
+ * * Default Value: 0
80766
+ * * Description: When 1, every classifier-applied use of this tag is routed to the TagSuggestion queue for human approval before being persisted as a ContentItemTag → TaggedItem.
80767
+ */
80768
+ get RequiresReview() {
80769
+ return this.Get('RequiresReview');
80770
+ }
80771
+ set RequiresReview(value) {
80772
+ this.Set('RequiresReview', value);
80773
+ }
80774
+ /**
80775
+ * * Field Name: EmbeddingVector
80776
+ * * Display Name: Embedding Vector
80777
+ * * SQL Data Type: nvarchar(MAX)
80778
+ * * Description: JSON-encoded numeric vector representing the tag's embedding under the model identified by EmbeddingModelID. Refreshed automatically on Save() when Name or Description changes. Used to seed the in-memory tag vector cache without a cold-start LLM round-trip.
80779
+ */
80780
+ get EmbeddingVector() {
80781
+ return this.Get('EmbeddingVector');
80782
+ }
80783
+ set EmbeddingVector(value) {
80784
+ this.Set('EmbeddingVector', value);
80785
+ }
80786
+ /**
80787
+ * * Field Name: EmbeddingModelID
80788
+ * * Display Name: Embedding Model
80789
+ * * SQL Data Type: uniqueidentifier
80790
+ * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
80791
+ * * Description: AI model whose embedding produced EmbeddingVector. When the configured tag-embedding model differs from this value, the cached vector is treated as stale and recomputed.
80792
+ */
80793
+ get EmbeddingModelID() {
80794
+ return this.Get('EmbeddingModelID');
80795
+ }
80796
+ set EmbeddingModelID(value) {
80797
+ this.Set('EmbeddingModelID', value);
80798
+ }
80799
+ /**
79907
80800
  * * Field Name: Parent
79908
80801
  * * Display Name: Parent Name
79909
80802
  * * SQL Data Type: nvarchar(255)
@@ -79913,13 +80806,21 @@ let MJTagEntity = class MJTagEntity extends BaseEntity {
79913
80806
  }
79914
80807
  /**
79915
80808
  * * Field Name: MergedIntoTag
79916
- * * Display Name: Merged Into Tag Name
80809
+ * * Display Name: Merged Into Name
79917
80810
  * * SQL Data Type: nvarchar(255)
79918
80811
  */
79919
80812
  get MergedIntoTag() {
79920
80813
  return this.Get('MergedIntoTag');
79921
80814
  }
79922
80815
  /**
80816
+ * * Field Name: EmbeddingModel
80817
+ * * Display Name: Embedding Model Name
80818
+ * * SQL Data Type: nvarchar(50)
80819
+ */
80820
+ get EmbeddingModel() {
80821
+ return this.Get('EmbeddingModel');
80822
+ }
80823
+ /**
79923
80824
  * * Field Name: RootParentID
79924
80825
  * * Display Name: Root Parent
79925
80826
  * * SQL Data Type: uniqueidentifier
@@ -79929,7 +80830,7 @@ let MJTagEntity = class MJTagEntity extends BaseEntity {
79929
80830
  }
79930
80831
  /**
79931
80832
  * * Field Name: RootMergedIntoTagID
79932
- * * Display Name: Root Merged Into Tag
80833
+ * * Display Name: Root Merged Into
79933
80834
  * * SQL Data Type: uniqueidentifier
79934
80835
  */
79935
80836
  get RootMergedIntoTagID() {