@memberjunction/core-entities 6.3.0-edge.1 → 6.3.0-edge.2

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 (113) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/custom/ArtifactPermissionDelegate.d.ts +27 -6
  3. package/dist/custom/ArtifactPermissionDelegate.d.ts.map +1 -1
  4. package/dist/custom/ArtifactPermissionDelegate.js +845 -298
  5. package/dist/custom/ArtifactPermissionDelegate.js.map +1 -1
  6. package/dist/custom/ConversationWriteAccess.d.ts +9 -0
  7. package/dist/custom/ConversationWriteAccess.d.ts.map +1 -1
  8. package/dist/custom/ConversationWriteAccess.js +56 -1
  9. package/dist/custom/ConversationWriteAccess.js.map +1 -1
  10. package/dist/custom/Permissions/BaseShareEntityExtended.d.ts +9 -0
  11. package/dist/custom/Permissions/BaseShareEntityExtended.d.ts.map +1 -1
  12. package/dist/custom/Permissions/BaseShareEntityExtended.js +11 -0
  13. package/dist/custom/Permissions/BaseShareEntityExtended.js.map +1 -1
  14. package/dist/custom/Permissions/MJArtifactPermissionEntityExtended.d.ts.map +1 -1
  15. package/dist/custom/Permissions/MJArtifactPermissionEntityExtended.js +15 -3
  16. package/dist/custom/Permissions/MJArtifactPermissionEntityExtended.js.map +1 -1
  17. package/dist/custom/Permissions/MJCollectionPermissionEntityExtended.d.ts +1 -0
  18. package/dist/custom/Permissions/MJCollectionPermissionEntityExtended.d.ts.map +1 -1
  19. package/dist/custom/Permissions/MJCollectionPermissionEntityExtended.js +45 -13
  20. package/dist/custom/Permissions/MJCollectionPermissionEntityExtended.js.map +1 -1
  21. package/dist/custom/Permissions/MJDashboardPermissionEntityExtended.d.ts +3 -1
  22. package/dist/custom/Permissions/MJDashboardPermissionEntityExtended.d.ts.map +1 -1
  23. package/dist/custom/Permissions/MJDashboardPermissionEntityExtended.js +83 -19
  24. package/dist/custom/Permissions/MJDashboardPermissionEntityExtended.js.map +1 -1
  25. package/dist/custom/Permissions/shareNotification.d.ts +14 -1
  26. package/dist/custom/Permissions/shareNotification.d.ts.map +1 -1
  27. package/dist/custom/Permissions/shareNotification.js +62 -8
  28. package/dist/custom/Permissions/shareNotification.js.map +1 -1
  29. package/dist/custom/ResourcePermissions/MJResourcePermissionEntityExtended.d.ts.map +1 -1
  30. package/dist/custom/ResourcePermissions/MJResourcePermissionEntityExtended.js +120 -38
  31. package/dist/custom/ResourcePermissions/MJResourcePermissionEntityExtended.js.map +1 -1
  32. package/dist/custom/SlideDeckEngine.d.ts +45 -3
  33. package/dist/custom/SlideDeckEngine.d.ts.map +1 -1
  34. package/dist/custom/SlideDeckEngine.js +509 -10
  35. package/dist/custom/SlideDeckEngine.js.map +1 -1
  36. package/dist/custom/SlideDeckPptxEngine.d.ts.map +1 -1
  37. package/dist/custom/SlideDeckPptxEngine.js +91 -17
  38. package/dist/custom/SlideDeckPptxEngine.js.map +1 -1
  39. package/dist/custom/SpreadsheetEngine.d.ts +7 -0
  40. package/dist/custom/SpreadsheetEngine.d.ts.map +1 -1
  41. package/dist/custom/SpreadsheetEngine.js +72 -0
  42. package/dist/custom/SpreadsheetEngine.js.map +1 -1
  43. package/dist/custom/approvals.d.ts +24 -0
  44. package/dist/custom/approvals.d.ts.map +1 -1
  45. package/dist/custom/approvals.js +34 -1
  46. package/dist/custom/approvals.js.map +1 -1
  47. package/dist/engines/CanonGraphEngine.d.ts +114 -1
  48. package/dist/engines/CanonGraphEngine.d.ts.map +1 -1
  49. package/dist/engines/CanonGraphEngine.js +240 -20
  50. package/dist/engines/CanonGraphEngine.js.map +1 -1
  51. package/dist/engines/conversations.d.ts +20 -4
  52. package/dist/engines/conversations.d.ts.map +1 -1
  53. package/dist/engines/conversations.js +61 -12
  54. package/dist/engines/conversations.js.map +1 -1
  55. package/dist/generated/entities/__mj.d.ts +6973 -399
  56. package/dist/generated/entities/__mj.d.ts.map +1 -1
  57. package/dist/generated/entities/__mj.js +35452 -27348
  58. package/dist/generated/entities/__mj.js.map +1 -1
  59. package/dist/generated/remote_operations.d.ts +745 -65
  60. package/dist/generated/remote_operations.d.ts.map +1 -1
  61. package/dist/generated/remote_operations.js +248 -8
  62. package/dist/generated/remote_operations.js.map +1 -1
  63. package/dist/generated/schemas/__mj.d.ts +2156 -230
  64. package/dist/generated/schemas/__mj.d.ts.map +1 -1
  65. package/dist/generated/schemas/__mj.js +3385 -26
  66. package/dist/generated/schemas/__mj.js.map +1 -1
  67. package/dist/graph/BaseGraphEdgeProvider.d.ts +33 -1
  68. package/dist/graph/BaseGraphEdgeProvider.d.ts.map +1 -1
  69. package/dist/graph/BaseGraphEdgeProvider.js +18 -3
  70. package/dist/graph/BaseGraphEdgeProvider.js.map +1 -1
  71. package/dist/graph/CanonDocumentRenderer.d.ts +43 -0
  72. package/dist/graph/CanonDocumentRenderer.d.ts.map +1 -0
  73. package/dist/graph/CanonDocumentRenderer.js +627 -0
  74. package/dist/graph/CanonDocumentRenderer.js.map +1 -0
  75. package/dist/graph/DomainClustering.d.ts +88 -0
  76. package/dist/graph/DomainClustering.d.ts.map +1 -0
  77. package/dist/graph/DomainClustering.js +327 -0
  78. package/dist/graph/DomainClustering.js.map +1 -0
  79. package/dist/graph/DomainProposalWriter.d.ts +25 -0
  80. package/dist/graph/DomainProposalWriter.d.ts.map +1 -0
  81. package/dist/graph/DomainProposalWriter.js +107 -0
  82. package/dist/graph/DomainProposalWriter.js.map +1 -0
  83. package/dist/graph/GraphAccessPolicy.d.ts +111 -0
  84. package/dist/graph/GraphAccessPolicy.d.ts.map +1 -0
  85. package/dist/graph/GraphAccessPolicy.js +123 -0
  86. package/dist/graph/GraphAccessPolicy.js.map +1 -0
  87. package/dist/graph/GraphEngine.d.ts +99 -10
  88. package/dist/graph/GraphEngine.d.ts.map +1 -1
  89. package/dist/graph/GraphEngine.js +359 -53
  90. package/dist/graph/GraphEngine.js.map +1 -1
  91. package/dist/graph/RecordRelations.d.ts +52 -0
  92. package/dist/graph/RecordRelations.d.ts.map +1 -0
  93. package/dist/graph/RecordRelations.js +90 -0
  94. package/dist/graph/RecordRelations.js.map +1 -0
  95. package/dist/graph/index.d.ts +9 -1
  96. package/dist/graph/index.d.ts.map +1 -1
  97. package/dist/graph/index.js +13 -1
  98. package/dist/graph/index.js.map +1 -1
  99. package/dist/graph/policies/ProvenanceAccessPolicies.d.ts +56 -0
  100. package/dist/graph/policies/ProvenanceAccessPolicies.d.ts.map +1 -0
  101. package/dist/graph/policies/ProvenanceAccessPolicies.js +228 -0
  102. package/dist/graph/policies/ProvenanceAccessPolicies.js.map +1 -0
  103. package/dist/graph/providers/QueryEdgeProvider.d.ts.map +1 -1
  104. package/dist/graph/providers/QueryEdgeProvider.js +2 -2
  105. package/dist/graph/providers/QueryEdgeProvider.js.map +1 -1
  106. package/dist/graph/providers/RecordLinkEdgeProvider.d.ts.map +1 -1
  107. package/dist/graph/providers/RecordLinkEdgeProvider.js +2 -2
  108. package/dist/graph/providers/RecordLinkEdgeProvider.js.map +1 -1
  109. package/dist/graph/providers/SharedConceptEdgeProvider.d.ts +54 -0
  110. package/dist/graph/providers/SharedConceptEdgeProvider.d.ts.map +1 -0
  111. package/dist/graph/providers/SharedConceptEdgeProvider.js +282 -0
  112. package/dist/graph/providers/SharedConceptEdgeProvider.js.map +1 -0
  113. package/package.json +6 -6
@@ -2044,6 +2044,16 @@ export const MJAIAgentRequestSchema = z.object({
2044
2044
  * * SQL Data Type: uniqueidentifier
2045
2045
  * * Related Entity/Foreign Key: MJ: Tasks (vwTasks.ID)
2046
2046
  * * Description: The workflow step (MJ: Tasks row) waiting on this request, when it came from a task graph rather than from a running agent. Distinct from OriginatingAgentRunStepID: a task graph outlives the agent run that submitted it, so the task — not the run — is what resumes when a person answers. NULL for requests raised by a run directly.`),
2047
+ HumanTaskProvider: z.string().nullable().describe(`
2048
+ * * Field Name: HumanTaskProvider
2049
+ * * Display Name: Human Task Provider
2050
+ * * SQL Data Type: nvarchar(100)
2051
+ * * Description: The registration key of the human-task provider that also put this request in front of a person, when the install routes agent requests to one (humanTasks.defaultProvider). NULL when only the built-in inbox holds the request. Only that provider may answer the request through the provider path, and an answer given elsewhere asks it to withdraw its own ask.`),
2052
+ HumanTaskExternalReference: z.string().nullable().describe(`
2053
+ * * Field Name: HumanTaskExternalReference
2054
+ * * Display Name: Human Task External Reference
2055
+ * * SQL Data Type: nvarchar(500)
2056
+ * * Description: The reference the human-task provider returned for its own record of this request (for example a task ID in another app), handed back to the provider when it is asked to withdraw. NULL when no provider took the request or it returned none.`),
2047
2057
  Agent: z.string().nullable().describe(`
2048
2058
  * * Field Name: Agent
2049
2059
  * * Display Name: Agent Name
@@ -2077,6 +2087,107 @@ export const MJAIAgentRequestSchema = z.object({
2077
2087
  * * Display Name: Originating Task Name
2078
2088
  * * SQL Data Type: nvarchar(255)`),
2079
2089
  });
2090
+ /**
2091
+ * zod schema definition for the entity MJ: AI Agent Rhythm Templates
2092
+ */
2093
+ export const MJAIAgentRhythmTemplateSchema = z.object({
2094
+ ID: z.string().describe(`
2095
+ * * Field Name: ID
2096
+ * * Display Name: ID
2097
+ * * SQL Data Type: uniqueidentifier
2098
+ * * Default Value: newsequentialid()`),
2099
+ AgentID: z.string().describe(`
2100
+ * * Field Name: AgentID
2101
+ * * Display Name: Agent ID
2102
+ * * SQL Data Type: uniqueidentifier
2103
+ * * Related Entity/Foreign Key: MJ: AI Agents (vwAIAgents.ID)
2104
+ * * Description: The always-on AI agent (for example Chief of Staff) to which this rhythm template applies.`),
2105
+ SkillID: z.string().nullable().describe(`
2106
+ * * Field Name: SkillID
2107
+ * * Display Name: Skill ID
2108
+ * * SQL Data Type: uniqueidentifier
2109
+ * * Related Entity/Foreign Key: MJ: AI Skills (vwAISkills.ID)
2110
+ * * Description: Optional AI Skill that contributes this rhythm template; NULL for core agent rhythms.`),
2111
+ Name: z.string().describe(`
2112
+ * * Field Name: Name
2113
+ * * Display Name: Name
2114
+ * * SQL Data Type: nvarchar(255)
2115
+ * * Description: Human-readable title of the offered rhythm shown to the user during onboarding or capability reviews.`),
2116
+ WorkstreamKey: z.string().describe(`
2117
+ * * Field Name: WorkstreamKey
2118
+ * * Display Name: Workstream Key
2119
+ * * SQL Data Type: nvarchar(150)
2120
+ * * Description: Stable programmatic workstream key (for example tasks-daily-triage, calendar-daily-review) used to upsert the user routine cleanly.`),
2121
+ Description: z.string().nullable().describe(`
2122
+ * * Field Name: Description
2123
+ * * Display Name: Description
2124
+ * * SQL Data Type: nvarchar(MAX)
2125
+ * * Description: Plain-language explanation of what this rhythm checks and delivers to the user.`),
2126
+ DefaultCronExpression: z.string().describe(`
2127
+ * * Field Name: DefaultCronExpression
2128
+ * * Display Name: Default Cron Expression
2129
+ * * SQL Data Type: nvarchar(100)
2130
+ * * Description: Default 5-field cron expression evaluated in the user's local timezone when enabled.`),
2131
+ DefaultWakeGate: z.string().nullable().describe(`
2132
+ * * Field Name: DefaultWakeGate
2133
+ * * Display Name: Default Wake Gate
2134
+ * * SQL Data Type: nvarchar(MAX)
2135
+ * * Description: Optional default 3-Tier Wake Gate JSON (watchedEntities, skipIfUnchanged, tier1Expression, tier2Decision) copied onto the created AgentWake routine.`),
2136
+ WakeReason: z.string().describe(`
2137
+ * * Field Name: WakeReason
2138
+ * * Display Name: Wake Reason
2139
+ * * SQL Data Type: nvarchar(500)
2140
+ * * Description: Concise wake reason stored on the created AgentWake routine and passed to the agent when the rhythm fires.`),
2141
+ OfferAt: z.union([z.literal('Both'), z.literal('Install'), z.literal('Onboarding')]).describe(`
2142
+ * * Field Name: OfferAt
2143
+ * * Display Name: Offer At
2144
+ * * SQL Data Type: nvarchar(20)
2145
+ * * Default Value: Onboarding
2146
+ * * Value List Type: List
2147
+ * * Possible Values
2148
+ * * Both
2149
+ * * Install
2150
+ * * Onboarding
2151
+ * * Description: Lifecycle moment when this rhythm should be suggested to the user: Onboarding, Install, or Both.`),
2152
+ Status: z.union([z.literal('Active'), z.literal('Inactive')]).describe(`
2153
+ * * Field Name: Status
2154
+ * * Display Name: Status
2155
+ * * SQL Data Type: nvarchar(20)
2156
+ * * Default Value: Active
2157
+ * * Value List Type: List
2158
+ * * Possible Values
2159
+ * * Active
2160
+ * * Inactive
2161
+ * * Description: Whether this rhythm template is currently Active or Inactive.`),
2162
+ __mj_CreatedAt: z.date().describe(`
2163
+ * * Field Name: __mj_CreatedAt
2164
+ * * Display Name: Created At
2165
+ * * SQL Data Type: datetimeoffset
2166
+ * * Default Value: getutcdate()`),
2167
+ __mj_UpdatedAt: z.date().describe(`
2168
+ * * Field Name: __mj_UpdatedAt
2169
+ * * Display Name: Updated At
2170
+ * * SQL Data Type: datetimeoffset
2171
+ * * Default Value: getutcdate()`),
2172
+ DefaultAgentConfigurationID: z.string().nullable().describe(`
2173
+ * * Field Name: DefaultAgentConfigurationID
2174
+ * * Display Name: Default Agent Configuration ID
2175
+ * * SQL Data Type: uniqueidentifier
2176
+ * * Related Entity/Foreign Key: MJ: AI Configurations (vwAIConfigurations.ID)
2177
+ * * Description: Optional default AI Configuration (model tier such as Fast, Standard, or High Power) seeded onto UserRoutine.AgentConfigurationID when this rhythm template is enabled and used as a fallback on wake.`),
2178
+ Agent: z.string().nullable().describe(`
2179
+ * * Field Name: Agent
2180
+ * * Display Name: Agent
2181
+ * * SQL Data Type: nvarchar(255)`),
2182
+ Skill: z.string().nullable().describe(`
2183
+ * * Field Name: Skill
2184
+ * * Display Name: Skill
2185
+ * * SQL Data Type: nvarchar(255)`),
2186
+ DefaultAgentConfiguration: z.string().nullable().describe(`
2187
+ * * Field Name: DefaultAgentConfiguration
2188
+ * * Display Name: Default Agent Configuration
2189
+ * * SQL Data Type: nvarchar(100)`),
2190
+ });
2080
2191
  /**
2081
2192
  * zod schema definition for the entity MJ: AI Agent Rubrics
2082
2193
  */
@@ -3569,6 +3680,12 @@ export const MJAIAgentSkillSchema = z.object({
3569
3680
  * * Display Name: Updated At
3570
3681
  * * SQL Data Type: datetimeoffset
3571
3682
  * * Default Value: getutcdate()`),
3683
+ AllowMetadataSyncUpdate: z.boolean().describe(`
3684
+ * * Field Name: AllowMetadataSyncUpdate
3685
+ * * Display Name: Allow Metadata Sync Update
3686
+ * * SQL Data Type: bit
3687
+ * * Default Value: 1
3688
+ * * Description: When 1 (default), metadata sync and app upgrades may update this agent-skill grant. Set to 0 when an administrator locally overrides or disables an app-shipped skill grant.`),
3572
3689
  Agent: z.string().nullable().describe(`
3573
3690
  * * Field Name: Agent
3574
3691
  * * Display Name: Agent Name
@@ -3657,7 +3774,7 @@ export const MJAIAgentStepSchema = z.object({
3657
3774
  * * Field Name: Description
3658
3775
  * * Display Name: Description
3659
3776
  * * SQL Data Type: nvarchar(MAX)`),
3660
- StepType: z.union([z.literal('Action'), z.literal('Decision'), z.literal('ForEach'), z.literal('Human'), z.literal('Prompt'), z.literal('Sub-Agent'), z.literal('While')]).describe(`
3777
+ StepType: z.union([z.literal('Action'), z.literal('Decision'), z.literal('External'), z.literal('ForEach'), z.literal('Human'), z.literal('Prompt'), z.literal('Sub-Agent'), z.literal('Wait'), z.literal('While')]).describe(`
3661
3778
  * * Field Name: StepType
3662
3779
  * * Display Name: Step Type
3663
3780
  * * SQL Data Type: nvarchar(20)
@@ -3665,10 +3782,12 @@ export const MJAIAgentStepSchema = z.object({
3665
3782
  * * Possible Values
3666
3783
  * * Action
3667
3784
  * * Decision
3785
+ * * External
3668
3786
  * * ForEach
3669
3787
  * * Human
3670
3788
  * * Prompt
3671
3789
  * * Sub-Agent
3790
+ * * Wait
3672
3791
  * * While
3673
3792
  * * Description: Type of step: Action (execute an action), Sub-Agent (delegate to another agent), Prompt (run an AI prompt), Decision (one typed decision call whose answers the outgoing paths route on), Human (ask a person), or ForEach / While (a loop).`),
3674
3793
  StartingStep: z.boolean().describe(`
@@ -3795,6 +3914,91 @@ export const MJAIAgentStepSchema = z.object({
3795
3914
  * * Display Name: Prompt
3796
3915
  * * SQL Data Type: nvarchar(255)`),
3797
3916
  });
3917
+ /**
3918
+ * zod schema definition for the entity MJ: AI Agent Suggestions
3919
+ */
3920
+ export const MJAIAgentSuggestionSchema = z.object({
3921
+ ID: z.string().describe(`
3922
+ * * Field Name: ID
3923
+ * * Display Name: ID
3924
+ * * SQL Data Type: uniqueidentifier
3925
+ * * Default Value: newsequentialid()`),
3926
+ AgentID: z.string().describe(`
3927
+ * * Field Name: AgentID
3928
+ * * Display Name: Agent ID
3929
+ * * SQL Data Type: uniqueidentifier
3930
+ * * Related Entity/Foreign Key: MJ: AI Agents (vwAIAgents.ID)
3931
+ * * Description: The AI agent that made the suggestion.`),
3932
+ UserID: z.string().describe(`
3933
+ * * Field Name: UserID
3934
+ * * Display Name: User ID
3935
+ * * SQL Data Type: uniqueidentifier
3936
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
3937
+ * * Description: The user to whom the suggestion was offered.`),
3938
+ Kind: z.union([z.literal('Behavior'), z.literal('Integration'), z.literal('Rhythm'), z.literal('Skill')]).describe(`
3939
+ * * Field Name: Kind
3940
+ * * Display Name: Kind
3941
+ * * SQL Data Type: nvarchar(30)
3942
+ * * Default Value: Rhythm
3943
+ * * Value List Type: List
3944
+ * * Possible Values
3945
+ * * Behavior
3946
+ * * Integration
3947
+ * * Rhythm
3948
+ * * Skill
3949
+ * * Description: Category of suggestion: Rhythm, Skill, Behavior, or Integration.`),
3950
+ TargetKey: z.string().describe(`
3951
+ * * Field Name: TargetKey
3952
+ * * Display Name: Target Key
3953
+ * * SQL Data Type: nvarchar(200)
3954
+ * * Description: Stable deduplication key (such as a rhythm WorkstreamKey or skill name) preventing repeated offers of the same declined suggestion.`),
3955
+ Summary: z.string().describe(`
3956
+ * * Field Name: Summary
3957
+ * * Display Name: Summary
3958
+ * * SQL Data Type: nvarchar(MAX)
3959
+ * * Description: Concise description of the proposed capability or rhythm shown to the user.`),
3960
+ Status: z.union([z.literal('Accepted'), z.literal('Declined'), z.literal('Expired'), z.literal('Offered')]).describe(`
3961
+ * * Field Name: Status
3962
+ * * Display Name: Status
3963
+ * * SQL Data Type: nvarchar(20)
3964
+ * * Default Value: Offered
3965
+ * * Value List Type: List
3966
+ * * Possible Values
3967
+ * * Accepted
3968
+ * * Declined
3969
+ * * Expired
3970
+ * * Offered
3971
+ * * Description: Outcome of the suggestion: Offered, Accepted, Declined, or Expired.`),
3972
+ OfferedAt: z.date().describe(`
3973
+ * * Field Name: OfferedAt
3974
+ * * Display Name: Offered At
3975
+ * * SQL Data Type: datetimeoffset
3976
+ * * Default Value: getutcdate()
3977
+ * * Description: UTC timestamp when the suggestion was first presented to the user.`),
3978
+ RespondedAt: z.date().nullable().describe(`
3979
+ * * Field Name: RespondedAt
3980
+ * * Display Name: Responded At
3981
+ * * SQL Data Type: datetimeoffset
3982
+ * * Description: UTC timestamp when the user accepted, declined, or let the suggestion expire.`),
3983
+ __mj_CreatedAt: z.date().describe(`
3984
+ * * Field Name: __mj_CreatedAt
3985
+ * * Display Name: Created At
3986
+ * * SQL Data Type: datetimeoffset
3987
+ * * Default Value: getutcdate()`),
3988
+ __mj_UpdatedAt: z.date().describe(`
3989
+ * * Field Name: __mj_UpdatedAt
3990
+ * * Display Name: Updated At
3991
+ * * SQL Data Type: datetimeoffset
3992
+ * * Default Value: getutcdate()`),
3993
+ Agent: z.string().nullable().describe(`
3994
+ * * Field Name: Agent
3995
+ * * Display Name: Agent
3996
+ * * SQL Data Type: nvarchar(255)`),
3997
+ User: z.string().nullable().describe(`
3998
+ * * Field Name: User
3999
+ * * Display Name: User
4000
+ * * SQL Data Type: nvarchar(100)`),
4001
+ });
3798
4002
  /**
3799
4003
  * zod schema definition for the entity MJ: AI Agent Types
3800
4004
  */
@@ -4008,7 +4212,7 @@ export const MJAIAgentUserPolicySchema = z.object({
4008
4212
  * * Field Name: CoordinationMode
4009
4213
  * * Display Name: Coordination Mode
4010
4214
  * * SQL Data Type: nvarchar(20)
4011
- * * Default Value: Observer
4215
+ * * Default Value: Autonomous
4012
4216
  * * Value List Type: List
4013
4217
  * * Possible Values
4014
4218
  * * Autonomous
@@ -4043,7 +4247,7 @@ export const MJAIAgentUserPolicySchema = z.object({
4043
4247
  * * Field Name: PhoneChannelMode
4044
4248
  * * Display Name: Phone Channel Mode
4045
4249
  * * SQL Data Type: nvarchar(20)
4046
- * * Default Value: InboundOnly
4250
+ * * Default Value: Disabled
4047
4251
  * * Value List Type: List
4048
4252
  * * Possible Values
4049
4253
  * * Disabled
@@ -4065,7 +4269,7 @@ export const MJAIAgentUserPolicySchema = z.object({
4065
4269
  * * Field Name: CalendarChannelMode
4066
4270
  * * Display Name: Calendar Channel Mode
4067
4271
  * * SQL Data Type: nvarchar(30)
4068
- * * Default Value: ReadOnly
4272
+ * * Default Value: ProposeWithApproval
4069
4273
  * * Value List Type: List
4070
4274
  * * Possible Values
4071
4275
  * * Autonomous
@@ -4165,8 +4369,8 @@ export const MJAIAgentSchema = z.object({
4165
4369
  LogoURL: z.string().nullable().describe(`
4166
4370
  * * Field Name: LogoURL
4167
4371
  * * Display Name: Logo URL
4168
- * * SQL Data Type: nvarchar(255)
4169
- * * Description: URL to an image file or base64 data URI (e.g., data:image/png;base64,...) for the agent logo. Takes precedence over IconClass in UI display.`),
4372
+ * * SQL Data Type: nvarchar(MAX)
4373
+ * * Description: URL to an image file, presigned asset URL, or base64 data URI (e.g., data:image/png;base64,...) for the agent logo or custom instance avatar. Takes precedence over IconClass in UI display.`),
4170
4374
  __mj_CreatedAt: z.date().describe(`
4171
4375
  * * Field Name: __mj_CreatedAt
4172
4376
  * * Display Name: Created At
@@ -4682,6 +4886,46 @@ if this limit is exceeded.`),
4682
4886
  * * Display Name: Max Sub Agent Consult Rounds
4683
4887
  * * SQL Data Type: int
4684
4888
  * * Description: Maximum number of Consult rounds this agent answers for a sub-agent before that sub-agent's question propagates to this agent's caller. NULL uses the framework default (3).`),
4889
+ Isolation: z.union([z.literal('Container'), z.literal('InProcess'), z.literal('Process'), z.literal('Worker')]).describe(`
4890
+ * * Field Name: Isolation
4891
+ * * Display Name: Isolation
4892
+ * * SQL Data Type: nvarchar(20)
4893
+ * * Default Value: InProcess
4894
+ * * Value List Type: List
4895
+ * * Possible Values
4896
+ * * Container
4897
+ * * InProcess
4898
+ * * Process
4899
+ * * Worker
4900
+ * * Description: Execution isolation level for workflows and graphs backed by this agent: InProcess (default for existing/upgraded rows), Worker (worker_threads with V8 heap limits - default for Workflow.Draft), Process (child_process OS containment), or Container (container runtime isolation).`),
4901
+ BaseAgentID: z.string().nullable().describe(`
4902
+ * * Field Name: BaseAgentID
4903
+ * * Display Name: Base Agent ID
4904
+ * * SQL Data Type: uniqueidentifier
4905
+ * * Related Entity/Foreign Key: MJ: AI Agents (vwAIAgents.ID)
4906
+ * * Description: Optional prototype/base agent ID for multi-level capability inheritance (instance-of), distinct from ParentID (structural sub-agent composition). Derived agents inherit prompts, actions, sub-agents, skills, configurations, modalities, and rhythm templates live from their BaseAgentID chain (up to MaxDepth 5).`),
4907
+ InstantiationMode: z.union([z.literal('None'), z.literal('Optional'), z.literal('Required')]).describe(`
4908
+ * * Field Name: InstantiationMode
4909
+ * * Display Name: Instantiation Mode
4910
+ * * SQL Data Type: nvarchar(20)
4911
+ * * Default Value: None
4912
+ * * Value List Type: List
4913
+ * * Possible Values
4914
+ * * None
4915
+ * * Optional
4916
+ * * Required
4917
+ * * Description: Controls whether users can create tailored derived instances from this agent via BaseAgentID: None (direct-use only; default for catalog agents, sub-agents, and personal leaf instances), Optional (directly runnable and instantiable as a template), or Required (template/onboarding factory only; excluded from direct ad-hoc delegation).`),
4918
+ AdditionalInstructions: z.string().nullable().describe(`
4919
+ * * Field Name: AdditionalInstructions
4920
+ * * Display Name: Additional Instructions
4921
+ * * SQL Data Type: nvarchar(MAX)
4922
+ * * Description: Optional standing instructions appended to this agent's prompt context and stacked down the BaseAgentID inheritance chain from root template to personal leaf instance.`),
4923
+ IsPrimaryInstance: z.boolean().describe(`
4924
+ * * Field Name: IsPrimaryInstance
4925
+ * * Display Name: Is Primary Instance
4926
+ * * SQL Data Type: bit
4927
+ * * Default Value: 0
4928
+ * * Description: When true, marks this derived agent as the owner's primary instance among multiple instances sharing the same RootBaseAgentID for deterministic routing (e.g., inbound mailbox wakes, inter-agent requests, default dashboard selection).`),
4685
4929
  Parent: z.string().nullable().describe(`
4686
4930
  * * Field Name: Parent
4687
4931
  * * Display Name: Parent
@@ -4730,6 +4974,10 @@ if this limit is exceeded.`),
4730
4974
  * * Field Name: ConversationSummaryPrompt
4731
4975
  * * Display Name: Conversation Summary Prompt
4732
4976
  * * SQL Data Type: nvarchar(255)`),
4977
+ BaseAgent: z.string().nullable().describe(`
4978
+ * * Field Name: BaseAgent
4979
+ * * Display Name: Base Agent
4980
+ * * SQL Data Type: nvarchar(255)`),
4733
4981
  RootParentID: z.string().nullable().describe(`
4734
4982
  * * Field Name: RootParentID
4735
4983
  * * Display Name: Root Parent ID
@@ -4750,6 +4998,26 @@ if this limit is exceeded.`),
4750
4998
  * * Field Name: ParentIDChildCount
4751
4999
  * * Display Name: Parent ID Child Count
4752
5000
  * * SQL Data Type: int`),
5001
+ RootBaseAgentID: z.string().nullable().describe(`
5002
+ * * Field Name: RootBaseAgentID
5003
+ * * Display Name: Root Base Agent ID
5004
+ * * SQL Data Type: uniqueidentifier`),
5005
+ BaseAgentIDDepth: z.number().nullable().describe(`
5006
+ * * Field Name: BaseAgentIDDepth
5007
+ * * Display Name: Base Agent ID Depth
5008
+ * * SQL Data Type: int`),
5009
+ BaseAgentIDPath: z.string().nullable().describe(`
5010
+ * * Field Name: BaseAgentIDPath
5011
+ * * Display Name: Base Agent ID Path
5012
+ * * SQL Data Type: nvarchar(MAX)`),
5013
+ BaseAgentIDIsLeaf: z.boolean().nullable().describe(`
5014
+ * * Field Name: BaseAgentIDIsLeaf
5015
+ * * Display Name: Base Agent ID Is Leaf
5016
+ * * SQL Data Type: bit`),
5017
+ BaseAgentIDChildCount: z.number().nullable().describe(`
5018
+ * * Field Name: BaseAgentIDChildCount
5019
+ * * Display Name: Base Agent ID Child Count
5020
+ * * SQL Data Type: int`),
4753
5021
  });
4754
5022
  /**
4755
5023
  * zod schema definition for the entity MJ: AI Architectures
@@ -7897,6 +8165,17 @@ export const MJAISkillActionSchema = z.object({
7897
8165
  * * SQL Data Type: bit
7898
8166
  * * Default Value: 1
7899
8167
  * * Description: Whether activating the skill puts this action into the agent's run. 1 (default): the action is described to the model and callable during the run, today's behaviour. 0: the action stays bundled with the skill (SKILL.md export, tooling) but is left out of the run entirely: not described to the model and not executable by the agent; only application code invokes it, through the Actions API. Use 0 for actions a person triggers through the UI on a later turn, such as a menu button in the skill's reply.`),
8168
+ Role: z.union([z.literal('Both'), z.literal('Briefing'), z.literal('Tool')]).describe(`
8169
+ * * Field Name: Role
8170
+ * * Display Name: Role
8171
+ * * SQL Data Type: nvarchar(20)
8172
+ * * Default Value: Tool
8173
+ * * Value List Type: List
8174
+ * * Possible Values
8175
+ * * Both
8176
+ * * Briefing
8177
+ * * Tool
8178
+ * * Description: Role this action plays within the skill: Tool (normal tool invoked by the model), Briefing (deterministic briefing contributor invoked by Assemble My Briefing), or Both.`),
7900
8179
  Skill: z.string().nullable().describe(`
7901
8180
  * * Field Name: Skill
7902
8181
  * * Display Name: Skill
@@ -9694,6 +9973,287 @@ export const MJActionSchema = z.object({
9694
9973
  * * Display Name: Parent ID Child Count
9695
9974
  * * SQL Data Type: int`),
9696
9975
  });
9976
+ /**
9977
+ * zod schema definition for the entity MJ: Agent Channel Participants
9978
+ */
9979
+ export const MJAgentChannelParticipantSchema = z.object({
9980
+ ID: z.string().describe(`
9981
+ * * Field Name: ID
9982
+ * * Display Name: ID
9983
+ * * SQL Data Type: uniqueidentifier
9984
+ * * Default Value: newsequentialid()`),
9985
+ AgentChannelID: z.string().describe(`
9986
+ * * Field Name: AgentChannelID
9987
+ * * Display Name: Agent Channel ID
9988
+ * * SQL Data Type: uniqueidentifier
9989
+ * * Related Entity/Foreign Key: MJ: Agent Channels (vwAgentChannels.ID)
9990
+ * * Description: The Agent Channel (and Conversation ID) to which this participant belongs.`),
9991
+ UserID: z.string().describe(`
9992
+ * * Field Name: UserID
9993
+ * * Display Name: User ID
9994
+ * * SQL Data Type: uniqueidentifier
9995
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
9996
+ * * Description: The human user represented by this participant entry.`),
9997
+ AgentID: z.string().describe(`
9998
+ * * Field Name: AgentID
9999
+ * * Display Name: Agent ID
10000
+ * * SQL Data Type: uniqueidentifier
10001
+ * * Related Entity/Foreign Key: MJ: AI Agents (vwAIAgents.ID)
10002
+ * * Description: The AI agent acting on behalf of UserID in this channel.`),
10003
+ Role: z.union([z.literal('Initiator'), z.literal('Participant')]).describe(`
10004
+ * * Field Name: Role
10005
+ * * Display Name: Role
10006
+ * * SQL Data Type: nvarchar(20)
10007
+ * * Default Value: Participant
10008
+ * * Value List Type: List
10009
+ * * Possible Values
10010
+ * * Initiator
10011
+ * * Participant
10012
+ * * Description: Participant role in the channel: Initiator or Participant.`),
10013
+ LastSeenDetailID: z.string().nullable().describe(`
10014
+ * * Field Name: LastSeenDetailID
10015
+ * * Display Name: Last Seen Detail ID
10016
+ * * SQL Data Type: uniqueidentifier
10017
+ * * Related Entity/Foreign Key: MJ: Conversation Details (vwConversationDetails.ID)
10018
+ * * Description: Optional ConversationDetail ID of the last message read by this participant.`),
10019
+ JoinedAt: z.date().describe(`
10020
+ * * Field Name: JoinedAt
10021
+ * * Display Name: Joined At
10022
+ * * SQL Data Type: datetimeoffset
10023
+ * * Default Value: getutcdate()
10024
+ * * Description: UTC timestamp when this participant joined the channel.`),
10025
+ __mj_CreatedAt: z.date().describe(`
10026
+ * * Field Name: __mj_CreatedAt
10027
+ * * Display Name: Created At
10028
+ * * SQL Data Type: datetimeoffset
10029
+ * * Default Value: getutcdate()`),
10030
+ __mj_UpdatedAt: z.date().describe(`
10031
+ * * Field Name: __mj_UpdatedAt
10032
+ * * Display Name: Updated At
10033
+ * * SQL Data Type: datetimeoffset
10034
+ * * Default Value: getutcdate()`),
10035
+ AgentChannel: z.string().nullable().describe(`
10036
+ * * Field Name: AgentChannel
10037
+ * * Display Name: Agent Channel
10038
+ * * SQL Data Type: nvarchar(255)`),
10039
+ User: z.string().nullable().describe(`
10040
+ * * Field Name: User
10041
+ * * Display Name: User
10042
+ * * SQL Data Type: nvarchar(100)`),
10043
+ Agent: z.string().nullable().describe(`
10044
+ * * Field Name: Agent
10045
+ * * Display Name: Agent
10046
+ * * SQL Data Type: nvarchar(255)`),
10047
+ LastSeenDetail: z.string().nullable().describe(`
10048
+ * * Field Name: LastSeenDetail
10049
+ * * Display Name: Last Seen Detail
10050
+ * * SQL Data Type: nvarchar(100)`),
10051
+ });
10052
+ /**
10053
+ * zod schema definition for the entity MJ: Agent Channels
10054
+ */
10055
+ export const MJAgentChannelSchema = z.object({
10056
+ ID: z.string().describe(`
10057
+ * * Field Name: ID
10058
+ * * Display Name: ID
10059
+ * * SQL Data Type: uniqueidentifier
10060
+ * * Related Entity/Foreign Key: MJ: Conversations (vwConversations.ID)
10061
+ * * Description: Shared primary key referencing MJ: Conversations(ID) for this IS-A Agent Channel conversation.`),
10062
+ Topic: z.string().describe(`
10063
+ * * Field Name: Topic
10064
+ * * Display Name: Topic
10065
+ * * SQL Data Type: nvarchar(500)
10066
+ * * Description: Short executive topic describing what the participating agents are coordinating on.`),
10067
+ ChannelStatus: z.union([z.literal('Open'), z.literal('Paused For Human'), z.literal('Resolved')]).describe(`
10068
+ * * Field Name: ChannelStatus
10069
+ * * Display Name: Channel Status
10070
+ * * SQL Data Type: nvarchar(30)
10071
+ * * Default Value: Open
10072
+ * * Value List Type: List
10073
+ * * Possible Values
10074
+ * * Open
10075
+ * * Paused For Human
10076
+ * * Resolved
10077
+ * * Description: Operational state of the channel: Open, Paused For Human (loop or wake limit reached), or Resolved.`),
10078
+ ReplyBy: z.date().nullable().describe(`
10079
+ * * Field Name: ReplyBy
10080
+ * * Display Name: Reply By
10081
+ * * SQL Data Type: datetimeoffset
10082
+ * * Description: Optional deadline by which participants should respond or resolve the coordination topic.`),
10083
+ ConsecutiveAgentTurns: z.number().describe(`
10084
+ * * Field Name: ConsecutiveAgentTurns
10085
+ * * Display Name: Consecutive Agent Turns
10086
+ * * SQL Data Type: int
10087
+ * * Default Value: 0
10088
+ * * Description: Number of consecutive agent messages posted since the last human message; resets to 0 when any human posts.`),
10089
+ MaxConsecutiveAgentTurns: z.number().describe(`
10090
+ * * Field Name: MaxConsecutiveAgentTurns
10091
+ * * Display Name: Max Consecutive Agent Turns
10092
+ * * SQL Data Type: int
10093
+ * * Default Value: 10
10094
+ * * Description: Maximum consecutive agent turns permitted without human intervention before the channel automatically pauses (default 10).`),
10095
+ LastHumanMessageAt: z.date().nullable().describe(`
10096
+ * * Field Name: LastHumanMessageAt
10097
+ * * Display Name: Last Human Message At
10098
+ * * SQL Data Type: datetimeoffset
10099
+ * * Description: UTC timestamp of the most recent message posted directly by a human participant.`),
10100
+ HourlyWakeCount: z.number().describe(`
10101
+ * * Field Name: HourlyWakeCount
10102
+ * * Display Name: Hourly Wake Count
10103
+ * * SQL Data Type: int
10104
+ * * Default Value: 0
10105
+ * * Description: Count of peer agent wakes dispatched for this channel within the current rolling 1-hour window.`),
10106
+ HourlyWakeWindowStart: z.date().nullable().describe(`
10107
+ * * Field Name: HourlyWakeWindowStart
10108
+ * * Display Name: Hourly Wake Window Start
10109
+ * * SQL Data Type: datetimeoffset
10110
+ * * Description: UTC start timestamp of the current 1-hour wake rate-limit window.`),
10111
+ MaxHourlyWakes: z.number().describe(`
10112
+ * * Field Name: MaxHourlyWakes
10113
+ * * Display Name: Max Hourly Wakes
10114
+ * * SQL Data Type: int
10115
+ * * Default Value: 6
10116
+ * * Description: Maximum peer wakes allowed per hour for this channel before pausing for human review (default 6).`),
10117
+ __mj_CreatedAt: z.date().describe(`
10118
+ * * Field Name: __mj_CreatedAt
10119
+ * * Display Name: Created At
10120
+ * * SQL Data Type: datetimeoffset
10121
+ * * Default Value: getutcdate()`),
10122
+ __mj_UpdatedAt: z.date().describe(`
10123
+ * * Field Name: __mj_UpdatedAt
10124
+ * * Display Name: Updated At
10125
+ * * SQL Data Type: datetimeoffset
10126
+ * * Default Value: getutcdate()`),
10127
+ UserID: z.string().describe(`
10128
+ * * Field Name: UserID
10129
+ * * Display Name: User ID
10130
+ * * SQL Data Type: uniqueidentifier
10131
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)`),
10132
+ ExternalID: z.string().nullable().describe(`
10133
+ * * Field Name: ExternalID
10134
+ * * Display Name: External ID
10135
+ * * SQL Data Type: nvarchar(500)`),
10136
+ Name: z.string().nullable().describe(`
10137
+ * * Field Name: Name
10138
+ * * Display Name: Name
10139
+ * * SQL Data Type: nvarchar(255)`),
10140
+ Description: z.string().nullable().describe(`
10141
+ * * Field Name: Description
10142
+ * * Display Name: Description
10143
+ * * SQL Data Type: nvarchar(MAX)`),
10144
+ IsArchived: z.boolean().describe(`
10145
+ * * Field Name: IsArchived
10146
+ * * Display Name: Is Archived
10147
+ * * SQL Data Type: bit`),
10148
+ LinkedEntityID: z.string().nullable().describe(`
10149
+ * * Field Name: LinkedEntityID
10150
+ * * Display Name: Linked Entity ID
10151
+ * * SQL Data Type: uniqueidentifier
10152
+ * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)`),
10153
+ LinkedRecordID: z.string().nullable().describe(`
10154
+ * * Field Name: LinkedRecordID
10155
+ * * Display Name: Linked Record ID
10156
+ * * SQL Data Type: nvarchar(500)`),
10157
+ DataContextID: z.string().nullable().describe(`
10158
+ * * Field Name: DataContextID
10159
+ * * Display Name: Data Context ID
10160
+ * * SQL Data Type: uniqueidentifier
10161
+ * * Related Entity/Foreign Key: MJ: Data Contexts (vwDataContexts.ID)`),
10162
+ Status: z.string().describe(`
10163
+ * * Field Name: Status
10164
+ * * Display Name: Status
10165
+ * * SQL Data Type: nvarchar(20)`),
10166
+ EnvironmentID: z.string().describe(`
10167
+ * * Field Name: EnvironmentID
10168
+ * * Display Name: Environment ID
10169
+ * * SQL Data Type: uniqueidentifier
10170
+ * * Related Entity/Foreign Key: MJ: Environments (vwEnvironments.ID)`),
10171
+ ProjectID: z.string().nullable().describe(`
10172
+ * * Field Name: ProjectID
10173
+ * * Display Name: Project ID
10174
+ * * SQL Data Type: uniqueidentifier
10175
+ * * Related Entity/Foreign Key: MJ: Projects (vwProjects.ID)`),
10176
+ IsPinned: z.boolean().describe(`
10177
+ * * Field Name: IsPinned
10178
+ * * Display Name: Is Pinned
10179
+ * * SQL Data Type: bit`),
10180
+ TestRunID: z.string().nullable().describe(`
10181
+ * * Field Name: TestRunID
10182
+ * * Display Name: Test Run ID
10183
+ * * SQL Data Type: uniqueidentifier
10184
+ * * Related Entity/Foreign Key: MJ: Test Runs (vwTestRuns.ID)`),
10185
+ ApplicationScope: z.string().describe(`
10186
+ * * Field Name: ApplicationScope
10187
+ * * Display Name: Application Scope
10188
+ * * SQL Data Type: nvarchar(20)`),
10189
+ ApplicationID: z.string().nullable().describe(`
10190
+ * * Field Name: ApplicationID
10191
+ * * Display Name: Application ID
10192
+ * * SQL Data Type: uniqueidentifier
10193
+ * * Related Entity/Foreign Key: MJ: Applications (vwApplications.ID)`),
10194
+ DefaultAgentID: z.string().nullable().describe(`
10195
+ * * Field Name: DefaultAgentID
10196
+ * * Display Name: Default Agent ID
10197
+ * * SQL Data Type: uniqueidentifier
10198
+ * * Related Entity/Foreign Key: MJ: AI Agents (vwAIAgents.ID)`),
10199
+ AdditionalData: z.string().nullable().describe(`
10200
+ * * Field Name: AdditionalData
10201
+ * * Display Name: Additional Data
10202
+ * * SQL Data Type: nvarchar(MAX)`),
10203
+ RecordingFileID: z.string().nullable().describe(`
10204
+ * * Field Name: RecordingFileID
10205
+ * * Display Name: Recording File ID
10206
+ * * SQL Data Type: uniqueidentifier
10207
+ * * Related Entity/Foreign Key: MJ: Files (vwFiles.ID)`),
10208
+ EgressID: z.string().nullable().describe(`
10209
+ * * Field Name: EgressID
10210
+ * * Display Name: Egress ID
10211
+ * * SQL Data Type: nvarchar(255)`),
10212
+ VisitorKey: z.string().nullable().describe(`
10213
+ * * Field Name: VisitorKey
10214
+ * * Display Name: Visitor Key
10215
+ * * SQL Data Type: nvarchar(255)`),
10216
+ LastConversationID: z.string().nullable().describe(`
10217
+ * * Field Name: LastConversationID
10218
+ * * Display Name: Last Conversation ID
10219
+ * * SQL Data Type: uniqueidentifier
10220
+ * * Related Entity/Foreign Key: MJ: Conversations (vwConversations.ID)`),
10221
+ AnchorType: z.string().nullable().describe(`
10222
+ * * Field Name: AnchorType
10223
+ * * Display Name: Anchor Type
10224
+ * * SQL Data Type: nvarchar(30)`),
10225
+ AnchorKey: z.string().nullable().describe(`
10226
+ * * Field Name: AnchorKey
10227
+ * * Display Name: Anchor Key
10228
+ * * SQL Data Type: nvarchar(255)`),
10229
+ AnchorMetadata: z.string().nullable().describe(`
10230
+ * * Field Name: AnchorMetadata
10231
+ * * Display Name: Anchor Metadata
10232
+ * * SQL Data Type: nvarchar(MAX)`),
10233
+ IsResolved: z.boolean().describe(`
10234
+ * * Field Name: IsResolved
10235
+ * * Display Name: Is Resolved
10236
+ * * SQL Data Type: bit`),
10237
+ ResolvedByUserID: z.string().nullable().describe(`
10238
+ * * Field Name: ResolvedByUserID
10239
+ * * Display Name: Resolved By User ID
10240
+ * * SQL Data Type: uniqueidentifier
10241
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)`),
10242
+ ResolvedAt: z.date().nullable().describe(`
10243
+ * * Field Name: ResolvedAt
10244
+ * * Display Name: Resolved At
10245
+ * * SQL Data Type: datetimeoffset`),
10246
+ TypeID: z.string().describe(`
10247
+ * * Field Name: TypeID
10248
+ * * Display Name: Type ID
10249
+ * * SQL Data Type: uniqueidentifier
10250
+ * * Related Entity/Foreign Key: MJ: Conversation Types (vwConversationTypes.ID)`),
10251
+ ParentID: z.string().nullable().describe(`
10252
+ * * Field Name: ParentID
10253
+ * * Display Name: Parent ID
10254
+ * * SQL Data Type: uniqueidentifier
10255
+ * * Related Entity/Foreign Key: MJ: Conversations (vwConversations.ID)`),
10256
+ });
9697
10257
  /**
9698
10258
  * zod schema definition for the entity MJ: Application Entities
9699
10259
  */
@@ -12273,11 +12833,152 @@ export const MJCommentSchema = z.object({
12273
12833
  * * Display Name: Type
12274
12834
  * * SQL Data Type: uniqueidentifier
12275
12835
  * * Related Entity/Foreign Key: MJ: Conversation Types (vwConversationTypes.ID)`),
12836
+ ParentID: z.string().nullable().describe(`
12837
+ * * Field Name: ParentID
12838
+ * * Display Name: Parent ID
12839
+ * * SQL Data Type: uniqueidentifier
12840
+ * * Related Entity/Foreign Key: MJ: Conversations (vwConversations.ID)`),
12276
12841
  CommentType: z.string().nullable().describe(`
12277
12842
  * * Field Name: CommentType
12278
12843
  * * Display Name: Comment Type Name
12279
12844
  * * SQL Data Type: nvarchar(100)`),
12280
12845
  });
12846
+ /**
12847
+ * zod schema definition for the entity MJ: Communication Activities
12848
+ */
12849
+ export const MJCommunicationActivitySchema = z.object({
12850
+ ID: z.string().describe(`
12851
+ * * Field Name: ID
12852
+ * * Display Name: ID
12853
+ * * SQL Data Type: uniqueidentifier
12854
+ * * Default Value: newsequentialid()`),
12855
+ CommunicationLogID: z.string().nullable().describe(`
12856
+ * * Field Name: CommunicationLogID
12857
+ * * Display Name: Communication Log ID
12858
+ * * SQL Data Type: uniqueidentifier
12859
+ * * Related Entity/Foreign Key: MJ: Communication Logs (vwCommunicationLogs.ID)
12860
+ * * Description: Message the event belongs to. NULL when the event could not be matched.`),
12861
+ CommunicationEndpointID: z.string().nullable().describe(`
12862
+ * * Field Name: CommunicationEndpointID
12863
+ * * Display Name: Communication Endpoint ID
12864
+ * * SQL Data Type: uniqueidentifier
12865
+ * * Related Entity/Foreign Key: MJ: Communication Endpoints (vwCommunicationEndpoints.ID)
12866
+ * * Description: Endpoint the event concerns.`),
12867
+ CommunicationSenderID: z.string().nullable().describe(`
12868
+ * * Field Name: CommunicationSenderID
12869
+ * * Display Name: Communication Sender ID
12870
+ * * SQL Data Type: uniqueidentifier
12871
+ * * Related Entity/Foreign Key: MJ: Communication Senders (vwCommunicationSenders.ID)
12872
+ * * Description: Sender of the message, copied from the log for reporting without a join.`),
12873
+ CommunicationProviderID: z.string().describe(`
12874
+ * * Field Name: CommunicationProviderID
12875
+ * * Display Name: Communication Provider ID
12876
+ * * SQL Data Type: uniqueidentifier
12877
+ * * Related Entity/Foreign Key: MJ: Communication Providers (vwCommunicationProviders.ID)
12878
+ * * Description: Provider that reported the event.`),
12879
+ EventType: z.union([z.literal('Clicked'), z.literal('Deferred'), z.literal('Delivered'), z.literal('Dropped'), z.literal('Hard Bounce'), z.literal('Opened'), z.literal('Queued'), z.literal('Sent'), z.literal('Soft Bounce'), z.literal('Spam Complaint'), z.literal('Unsubscribed')]).describe(`
12880
+ * * Field Name: EventType
12881
+ * * Display Name: Event Type
12882
+ * * SQL Data Type: nvarchar(30)
12883
+ * * Value List Type: List
12884
+ * * Possible Values
12885
+ * * Clicked
12886
+ * * Deferred
12887
+ * * Delivered
12888
+ * * Dropped
12889
+ * * Hard Bounce
12890
+ * * Opened
12891
+ * * Queued
12892
+ * * Sent
12893
+ * * Soft Bounce
12894
+ * * Spam Complaint
12895
+ * * Unsubscribed
12896
+ * * Description: Normalized event type.`),
12897
+ OccurredAt: z.date().describe(`
12898
+ * * Field Name: OccurredAt
12899
+ * * Display Name: Occurred At
12900
+ * * SQL Data Type: datetimeoffset
12901
+ * * Description: When the event happened, per the provider.`),
12902
+ ReceivedAt: z.date().describe(`
12903
+ * * Field Name: ReceivedAt
12904
+ * * Display Name: Received At
12905
+ * * SQL Data Type: datetimeoffset
12906
+ * * Default Value: sysdatetimeoffset()
12907
+ * * Description: When MJ received the event.`),
12908
+ ProviderEventID: z.string().nullable().describe(`
12909
+ * * Field Name: ProviderEventID
12910
+ * * Display Name: Provider Event ID
12911
+ * * SQL Data Type: nvarchar(200)
12912
+ * * Description: Provider's unique event ID (for example SendGrid sg_event_id). Unique per provider; duplicates are dropped.`),
12913
+ ProviderMessageID: z.string().nullable().describe(`
12914
+ * * Field Name: ProviderMessageID
12915
+ * * Display Name: Provider Message ID
12916
+ * * SQL Data Type: nvarchar(200)
12917
+ * * Description: Provider's message ID, used to match the event when tracking metadata is missing.`),
12918
+ TargetURL: z.string().nullable().describe(`
12919
+ * * Field Name: TargetURL
12920
+ * * Display Name: Target URL
12921
+ * * SQL Data Type: nvarchar(2000)
12922
+ * * Description: Clicked URL, for Clicked events.`),
12923
+ BounceCode: z.string().nullable().describe(`
12924
+ * * Field Name: BounceCode
12925
+ * * Display Name: Bounce Code
12926
+ * * SQL Data Type: nvarchar(50)
12927
+ * * Description: SMTP or provider bounce code, for bounce events.`),
12928
+ BounceReason: z.string().nullable().describe(`
12929
+ * * Field Name: BounceReason
12930
+ * * Display Name: Bounce Reason
12931
+ * * SQL Data Type: nvarchar(1000)
12932
+ * * Description: Provider bounce or drop explanation.`),
12933
+ IsMachineEvent: z.boolean().describe(`
12934
+ * * Field Name: IsMachineEvent
12935
+ * * Display Name: Is Machine Event
12936
+ * * SQL Data Type: bit
12937
+ * * Default Value: 0
12938
+ * * Description: 1 when the open or click is judged automated (mail privacy proxies, link scanners). Excluded from engagement.`),
12939
+ IPAddress: z.string().nullable().describe(`
12940
+ * * Field Name: IPAddress
12941
+ * * Display Name: IP Address
12942
+ * * SQL Data Type: nvarchar(45)
12943
+ * * Description: IP address reported with the event. Subject to the retention policy.`),
12944
+ UserAgent: z.string().nullable().describe(`
12945
+ * * Field Name: UserAgent
12946
+ * * Display Name: User Agent
12947
+ * * SQL Data Type: nvarchar(1000)
12948
+ * * Description: User agent reported with the event. Subject to the retention policy.`),
12949
+ CorrelationData: z.string().nullable().describe(`
12950
+ * * Field Name: CorrelationData
12951
+ * * Display Name: Correlation Data
12952
+ * * SQL Data Type: nvarchar(MAX)
12953
+ * * Description: Caller CorrelationData echoed back by the provider.`),
12954
+ RawPayload: z.string().nullable().describe(`
12955
+ * * Field Name: RawPayload
12956
+ * * Display Name: Raw Payload
12957
+ * * SQL Data Type: nvarchar(MAX)
12958
+ * * Description: Original provider payload for troubleshooting. Purged under the retention policy.`),
12959
+ __mj_CreatedAt: z.date().describe(`
12960
+ * * Field Name: __mj_CreatedAt
12961
+ * * Display Name: Created At
12962
+ * * SQL Data Type: datetimeoffset
12963
+ * * Default Value: getutcdate()`),
12964
+ __mj_UpdatedAt: z.date().describe(`
12965
+ * * Field Name: __mj_UpdatedAt
12966
+ * * Display Name: Updated At
12967
+ * * SQL Data Type: datetimeoffset
12968
+ * * Default Value: getutcdate()`),
12969
+ CommunicationLog: z.date().nullable().describe(`
12970
+ * * Field Name: CommunicationLog
12971
+ * * Display Name: Communication Log
12972
+ * * SQL Data Type: datetimeoffset`),
12973
+ CommunicationSender: z.string().nullable().describe(`
12974
+ * * Field Name: CommunicationSender
12975
+ * * Display Name: Communication Sender
12976
+ * * SQL Data Type: nvarchar(200)`),
12977
+ CommunicationProvider: z.string().nullable().describe(`
12978
+ * * Field Name: CommunicationProvider
12979
+ * * Display Name: Communication Provider
12980
+ * * SQL Data Type: nvarchar(255)`),
12981
+ });
12281
12982
  /**
12282
12983
  * zod schema definition for the entity MJ: Communication Base Message Types
12283
12984
  */
@@ -12326,6 +13027,482 @@ export const MJCommunicationBaseMessageTypeSchema = z.object({
12326
13027
  * * SQL Data Type: datetimeoffset
12327
13028
  * * Default Value: getutcdate()`),
12328
13029
  });
13030
+ /**
13031
+ * zod schema definition for the entity MJ: Communication Compliance Regime Jurisdictions
13032
+ */
13033
+ export const MJCommunicationComplianceRegimeJurisdictionSchema = z.object({
13034
+ ID: z.string().describe(`
13035
+ * * Field Name: ID
13036
+ * * Display Name: ID
13037
+ * * SQL Data Type: uniqueidentifier
13038
+ * * Default Value: newsequentialid()`),
13039
+ CommunicationComplianceRegimeID: z.string().describe(`
13040
+ * * Field Name: CommunicationComplianceRegimeID
13041
+ * * Display Name: Communication Compliance Regime ID
13042
+ * * SQL Data Type: uniqueidentifier
13043
+ * * Related Entity/Foreign Key: MJ: Communication Compliance Regimes (vwCommunicationComplianceRegimes.ID)
13044
+ * * Description: The regime.`),
13045
+ JurisdictionID: z.string().describe(`
13046
+ * * Field Name: JurisdictionID
13047
+ * * Display Name: Jurisdiction ID
13048
+ * * SQL Data Type: uniqueidentifier
13049
+ * * Related Entity/Foreign Key: MJ: Jurisdictions (vwJurisdictions.ID)
13050
+ * * Description: The jurisdiction (country, subdivision or group) where it applies.`),
13051
+ __mj_CreatedAt: z.date().describe(`
13052
+ * * Field Name: __mj_CreatedAt
13053
+ * * Display Name: Created At
13054
+ * * SQL Data Type: datetimeoffset
13055
+ * * Default Value: getutcdate()`),
13056
+ __mj_UpdatedAt: z.date().describe(`
13057
+ * * Field Name: __mj_UpdatedAt
13058
+ * * Display Name: Updated At
13059
+ * * SQL Data Type: datetimeoffset
13060
+ * * Default Value: getutcdate()`),
13061
+ CommunicationComplianceRegime: z.string().nullable().describe(`
13062
+ * * Field Name: CommunicationComplianceRegime
13063
+ * * Display Name: Communication Compliance Regime
13064
+ * * SQL Data Type: nvarchar(100)`),
13065
+ Jurisdiction: z.string().nullable().describe(`
13066
+ * * Field Name: Jurisdiction
13067
+ * * Display Name: Jurisdiction
13068
+ * * SQL Data Type: nvarchar(200)`),
13069
+ });
13070
+ /**
13071
+ * zod schema definition for the entity MJ: Communication Compliance Regime Rules
13072
+ */
13073
+ export const MJCommunicationComplianceRegimeRuleSchema = z.object({
13074
+ ID: z.string().describe(`
13075
+ * * Field Name: ID
13076
+ * * Display Name: ID
13077
+ * * SQL Data Type: uniqueidentifier
13078
+ * * Default Value: newsequentialid()`),
13079
+ CommunicationComplianceRegimeID: z.string().describe(`
13080
+ * * Field Name: CommunicationComplianceRegimeID
13081
+ * * Display Name: Communication Compliance Regime ID
13082
+ * * SQL Data Type: uniqueidentifier
13083
+ * * Related Entity/Foreign Key: MJ: Communication Compliance Regimes (vwCommunicationComplianceRegimes.ID)
13084
+ * * Description: The regime this rule belongs to.`),
13085
+ CommunicationComplianceRuleTypeID: z.string().describe(`
13086
+ * * Field Name: CommunicationComplianceRuleTypeID
13087
+ * * Display Name: Communication Compliance Rule Type ID
13088
+ * * SQL Data Type: uniqueidentifier
13089
+ * * Related Entity/Foreign Key: MJ: Communication Compliance Rule Types (vwCommunicationComplianceRuleTypes.ID)
13090
+ * * Description: The kind of rule.`),
13091
+ BaseMessageTypeID: z.string().nullable().describe(`
13092
+ * * Field Name: BaseMessageTypeID
13093
+ * * Display Name: Base Message Type ID
13094
+ * * SQL Data Type: uniqueidentifier
13095
+ * * Related Entity/Foreign Key: MJ: Communication Base Message Types (vwCommunicationBaseMessageTypes.ID)
13096
+ * * Description: Channel the rule applies to. NULL = all channels.`),
13097
+ MessageClass: z.union([z.literal('Marketing'), z.literal('Operational'), z.literal('Transactional')]).nullable().describe(`
13098
+ * * Field Name: MessageClass
13099
+ * * Display Name: Message Class
13100
+ * * SQL Data Type: nvarchar(20)
13101
+ * * Value List Type: List
13102
+ * * Possible Values
13103
+ * * Marketing
13104
+ * * Operational
13105
+ * * Transactional
13106
+ * * Description: Message class the rule applies to. NULL = all classes.`),
13107
+ Parameters: z.string().nullable().describe(`
13108
+ * * Field Name: Parameters
13109
+ * * Display Name: Parameters
13110
+ * * SQL Data Type: nvarchar(MAX)
13111
+ * * Description: Rule parameters as JSON, validated against the rule type's ParameterSchema, for example {"Model":"Opt-In"} or {"StartHour":21,"EndHour":8}.`),
13112
+ Notes: z.string().nullable().describe(`
13113
+ * * Field Name: Notes
13114
+ * * Display Name: Notes
13115
+ * * SQL Data Type: nvarchar(MAX)
13116
+ * * Description: Citation or reviewer notes for the parameter values.`),
13117
+ Status: z.union([z.literal('Active'), z.literal('Disabled')]).describe(`
13118
+ * * Field Name: Status
13119
+ * * Display Name: Status
13120
+ * * SQL Data Type: nvarchar(20)
13121
+ * * Default Value: Active
13122
+ * * Value List Type: List
13123
+ * * Possible Values
13124
+ * * Active
13125
+ * * Disabled
13126
+ * * Description: Active or Disabled.`),
13127
+ __mj_CreatedAt: z.date().describe(`
13128
+ * * Field Name: __mj_CreatedAt
13129
+ * * Display Name: Created At
13130
+ * * SQL Data Type: datetimeoffset
13131
+ * * Default Value: getutcdate()`),
13132
+ __mj_UpdatedAt: z.date().describe(`
13133
+ * * Field Name: __mj_UpdatedAt
13134
+ * * Display Name: Updated At
13135
+ * * SQL Data Type: datetimeoffset
13136
+ * * Default Value: getutcdate()`),
13137
+ CommunicationComplianceRegime: z.string().nullable().describe(`
13138
+ * * Field Name: CommunicationComplianceRegime
13139
+ * * Display Name: Communication Compliance Regime
13140
+ * * SQL Data Type: nvarchar(100)`),
13141
+ CommunicationComplianceRuleType: z.string().nullable().describe(`
13142
+ * * Field Name: CommunicationComplianceRuleType
13143
+ * * Display Name: Communication Compliance Rule Type
13144
+ * * SQL Data Type: nvarchar(100)`),
13145
+ BaseMessageType: z.string().nullable().describe(`
13146
+ * * Field Name: BaseMessageType
13147
+ * * Display Name: Base Message Type
13148
+ * * SQL Data Type: nvarchar(100)`),
13149
+ });
13150
+ /**
13151
+ * zod schema definition for the entity MJ: Communication Compliance Regimes
13152
+ */
13153
+ export const MJCommunicationComplianceRegimeSchema = z.object({
13154
+ ID: z.string().describe(`
13155
+ * * Field Name: ID
13156
+ * * Display Name: ID
13157
+ * * SQL Data Type: uniqueidentifier
13158
+ * * Default Value: newsequentialid()`),
13159
+ Name: z.string().describe(`
13160
+ * * Field Name: Name
13161
+ * * Display Name: Name
13162
+ * * SQL Data Type: nvarchar(100)
13163
+ * * Description: Unique regime name.`),
13164
+ Description: z.string().nullable().describe(`
13165
+ * * Field Name: Description
13166
+ * * Display Name: Description
13167
+ * * SQL Data Type: nvarchar(MAX)
13168
+ * * Description: Summary of the regime and its scope.`),
13169
+ AppliesBy: z.union([z.literal('Recipient'), z.literal('Recipient or Sender'), z.literal('Sender')]).describe(`
13170
+ * * Field Name: AppliesBy
13171
+ * * Display Name: Applies By
13172
+ * * SQL Data Type: nvarchar(30)
13173
+ * * Default Value: Recipient
13174
+ * * Value List Type: List
13175
+ * * Possible Values
13176
+ * * Recipient
13177
+ * * Recipient or Sender
13178
+ * * Sender
13179
+ * * Description: Whose jurisdiction triggers the regime: the recipient's, the sender's, or either.`),
13180
+ AppliesWhenJurisdictionUnknown: z.boolean().describe(`
13181
+ * * Field Name: AppliesWhenJurisdictionUnknown
13182
+ * * Display Name: Applies When Jurisdiction Unknown
13183
+ * * SQL Data Type: bit
13184
+ * * Default Value: 1
13185
+ * * Description: When 1, the regime applies to recipients whose jurisdiction cannot be resolved. Default 1, so unknown recipients get the strictest combination of enabled regimes.`),
13186
+ ReferenceURL: z.string().nullable().describe(`
13187
+ * * Field Name: ReferenceURL
13188
+ * * Display Name: Reference URL
13189
+ * * SQL Data Type: nvarchar(1000)
13190
+ * * Description: Link to the authoritative text or the legal review behind the rule parameters.`),
13191
+ Status: z.union([z.literal('Active'), z.literal('Disabled')]).describe(`
13192
+ * * Field Name: Status
13193
+ * * Display Name: Status
13194
+ * * SQL Data Type: nvarchar(20)
13195
+ * * Default Value: Disabled
13196
+ * * Value List Type: List
13197
+ * * Possible Values
13198
+ * * Active
13199
+ * * Disabled
13200
+ * * Description: Active regimes are enforced. Defaults to Disabled: an admin turns each regime on.`),
13201
+ __mj_CreatedAt: z.date().describe(`
13202
+ * * Field Name: __mj_CreatedAt
13203
+ * * Display Name: Created At
13204
+ * * SQL Data Type: datetimeoffset
13205
+ * * Default Value: getutcdate()`),
13206
+ __mj_UpdatedAt: z.date().describe(`
13207
+ * * Field Name: __mj_UpdatedAt
13208
+ * * Display Name: Updated At
13209
+ * * SQL Data Type: datetimeoffset
13210
+ * * Default Value: getutcdate()`),
13211
+ });
13212
+ /**
13213
+ * zod schema definition for the entity MJ: Communication Compliance Rule Types
13214
+ */
13215
+ export const MJCommunicationComplianceRuleTypeSchema = z.object({
13216
+ ID: z.string().describe(`
13217
+ * * Field Name: ID
13218
+ * * Display Name: ID
13219
+ * * SQL Data Type: uniqueidentifier
13220
+ * * Default Value: newsequentialid()`),
13221
+ Name: z.string().describe(`
13222
+ * * Field Name: Name
13223
+ * * Display Name: Name
13224
+ * * SQL Data Type: nvarchar(100)
13225
+ * * Description: Unique rule type name.`),
13226
+ Description: z.string().nullable().describe(`
13227
+ * * Field Name: Description
13228
+ * * Display Name: Description
13229
+ * * SQL Data Type: nvarchar(MAX)
13230
+ * * Description: What the rule controls and how the strictest value is chosen.`),
13231
+ DriverClass: z.string().describe(`
13232
+ * * Field Name: DriverClass
13233
+ * * Display Name: Driver Class
13234
+ * * SQL Data Type: nvarchar(200)
13235
+ * * Description: ClassFactory key of a BaseComplianceRule subclass implementing Evaluate and Combine.`),
13236
+ ParameterSchema: z.string().nullable().describe(`
13237
+ * * Field Name: ParameterSchema
13238
+ * * Display Name: Parameter Schema
13239
+ * * SQL Data Type: nvarchar(MAX)
13240
+ * * Description: JSON schema that regime rule Parameters must satisfy.`),
13241
+ Status: z.union([z.literal('Active'), z.literal('Disabled')]).describe(`
13242
+ * * Field Name: Status
13243
+ * * Display Name: Status
13244
+ * * SQL Data Type: nvarchar(20)
13245
+ * * Default Value: Active
13246
+ * * Value List Type: List
13247
+ * * Possible Values
13248
+ * * Active
13249
+ * * Disabled
13250
+ * * Description: Active or Disabled.`),
13251
+ __mj_CreatedAt: z.date().describe(`
13252
+ * * Field Name: __mj_CreatedAt
13253
+ * * Display Name: Created At
13254
+ * * SQL Data Type: datetimeoffset
13255
+ * * Default Value: getutcdate()`),
13256
+ __mj_UpdatedAt: z.date().describe(`
13257
+ * * Field Name: __mj_UpdatedAt
13258
+ * * Display Name: Updated At
13259
+ * * SQL Data Type: datetimeoffset
13260
+ * * Default Value: getutcdate()`),
13261
+ });
13262
+ /**
13263
+ * zod schema definition for the entity MJ: Communication Consent Audit Logs
13264
+ */
13265
+ export const MJCommunicationConsentAuditLogSchema = z.object({
13266
+ ID: z.string().describe(`
13267
+ * * Field Name: ID
13268
+ * * Display Name: ID
13269
+ * * SQL Data Type: uniqueidentifier
13270
+ * * Default Value: newsequentialid()`),
13271
+ CommunicationSuppressionID: z.string().nullable().describe(`
13272
+ * * Field Name: CommunicationSuppressionID
13273
+ * * Display Name: Communication Suppression ID
13274
+ * * SQL Data Type: uniqueidentifier
13275
+ * * Related Entity/Foreign Key: MJ: Communication Suppressions (vwCommunicationSuppressions.ID)
13276
+ * * Description: Suppression that changed. Exactly one of this and CommunicationPrincipalPreferenceID is set.`),
13277
+ CommunicationPrincipalPreferenceID: z.string().nullable().describe(`
13278
+ * * Field Name: CommunicationPrincipalPreferenceID
13279
+ * * Display Name: Communication Principal Preference ID
13280
+ * * SQL Data Type: uniqueidentifier
13281
+ * * Related Entity/Foreign Key: MJ: Communication Principal Preferences (vwCommunicationPrincipalPreferences.ID)
13282
+ * * Description: Principal preference that changed. Exactly one of this and CommunicationSuppressionID is set.`),
13283
+ Action: z.union([z.literal('Confirmed'), z.literal('Created'), z.literal('Expired'), z.literal('Revoked'), z.literal('Updated')]).describe(`
13284
+ * * Field Name: Action
13285
+ * * Display Name: Action
13286
+ * * SQL Data Type: nvarchar(20)
13287
+ * * Value List Type: List
13288
+ * * Possible Values
13289
+ * * Confirmed
13290
+ * * Created
13291
+ * * Expired
13292
+ * * Revoked
13293
+ * * Updated
13294
+ * * Description: Created, Updated, Revoked or Expired.`),
13295
+ PreviousValue: z.string().nullable().describe(`
13296
+ * * Field Name: PreviousValue
13297
+ * * Display Name: Previous Value
13298
+ * * SQL Data Type: nvarchar(MAX)
13299
+ * * Description: JSON snapshot of the row before the change. NULL on Created.`),
13300
+ NewValue: z.string().nullable().describe(`
13301
+ * * Field Name: NewValue
13302
+ * * Display Name: New Value
13303
+ * * SQL Data Type: nvarchar(MAX)
13304
+ * * Description: JSON snapshot of the row after the change.`),
13305
+ Source: z.union([z.literal('API'), z.literal('Admin'), z.literal('Import'), z.literal('One-Click Header'), z.literal('Policy'), z.literal('Preference Center'), z.literal('Provider Webhook'), z.literal('Signup Form'), z.literal('System')]).describe(`
13306
+ * * Field Name: Source
13307
+ * * Display Name: Source
13308
+ * * SQL Data Type: nvarchar(30)
13309
+ * * Value List Type: List
13310
+ * * Possible Values
13311
+ * * API
13312
+ * * Admin
13313
+ * * Import
13314
+ * * One-Click Header
13315
+ * * Policy
13316
+ * * Preference Center
13317
+ * * Provider Webhook
13318
+ * * Signup Form
13319
+ * * System
13320
+ * * Description: Where the change came from.`),
13321
+ CommunicationLogID: z.string().nullable().describe(`
13322
+ * * Field Name: CommunicationLogID
13323
+ * * Display Name: Communication Log ID
13324
+ * * SQL Data Type: uniqueidentifier
13325
+ * * Related Entity/Foreign Key: MJ: Communication Logs (vwCommunicationLogs.ID)
13326
+ * * Description: Message whose link or event caused the change, when applicable.`),
13327
+ IPAddress: z.string().nullable().describe(`
13328
+ * * Field Name: IPAddress
13329
+ * * Display Name: IP Address
13330
+ * * SQL Data Type: nvarchar(45)
13331
+ * * Description: IP address of the request that made the change.`),
13332
+ UserAgent: z.string().nullable().describe(`
13333
+ * * Field Name: UserAgent
13334
+ * * Display Name: User Agent
13335
+ * * SQL Data Type: nvarchar(1000)
13336
+ * * Description: User agent of the request that made the change.`),
13337
+ ChangedByUserID: z.string().nullable().describe(`
13338
+ * * Field Name: ChangedByUserID
13339
+ * * Display Name: Changed By User ID
13340
+ * * SQL Data Type: uniqueidentifier
13341
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
13342
+ * * Description: MJ user who made the change, when not the person themselves.`),
13343
+ ChangedAt: z.date().describe(`
13344
+ * * Field Name: ChangedAt
13345
+ * * Display Name: Changed At
13346
+ * * SQL Data Type: datetimeoffset
13347
+ * * Default Value: sysdatetimeoffset()
13348
+ * * Description: When the change happened.`),
13349
+ __mj_CreatedAt: z.date().describe(`
13350
+ * * Field Name: __mj_CreatedAt
13351
+ * * Display Name: Created At
13352
+ * * SQL Data Type: datetimeoffset
13353
+ * * Default Value: getutcdate()`),
13354
+ __mj_UpdatedAt: z.date().describe(`
13355
+ * * Field Name: __mj_UpdatedAt
13356
+ * * Display Name: Updated At
13357
+ * * SQL Data Type: datetimeoffset
13358
+ * * Default Value: getutcdate()`),
13359
+ CommunicationLog: z.date().nullable().describe(`
13360
+ * * Field Name: CommunicationLog
13361
+ * * Display Name: Communication Log
13362
+ * * SQL Data Type: datetimeoffset`),
13363
+ ChangedByUser: z.string().nullable().describe(`
13364
+ * * Field Name: ChangedByUser
13365
+ * * Display Name: Changed By User
13366
+ * * SQL Data Type: nvarchar(100)`),
13367
+ });
13368
+ /**
13369
+ * zod schema definition for the entity MJ: Communication Endpoint Principals
13370
+ */
13371
+ export const MJCommunicationEndpointPrincipalSchema = z.object({
13372
+ ID: z.string().describe(`
13373
+ * * Field Name: ID
13374
+ * * Display Name: ID
13375
+ * * SQL Data Type: uniqueidentifier
13376
+ * * Default Value: newsequentialid()`),
13377
+ CommunicationEndpointID: z.string().describe(`
13378
+ * * Field Name: CommunicationEndpointID
13379
+ * * Display Name: Communication Endpoint ID
13380
+ * * SQL Data Type: uniqueidentifier
13381
+ * * Related Entity/Foreign Key: MJ: Communication Endpoints (vwCommunicationEndpoints.ID)
13382
+ * * Description: The endpoint.`),
13383
+ EntityID: z.string().describe(`
13384
+ * * Field Name: EntityID
13385
+ * * Display Name: Entity ID
13386
+ * * SQL Data Type: uniqueidentifier
13387
+ * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
13388
+ * * Description: Entity of the principal record.`),
13389
+ RecordID: z.string().describe(`
13390
+ * * Field Name: RecordID
13391
+ * * Display Name: Record ID
13392
+ * * SQL Data Type: nvarchar(450)
13393
+ * * Description: Primary key of the principal record (polymorphic, paired with EntityID).`),
13394
+ FirstSeenAt: z.date().describe(`
13395
+ * * Field Name: FirstSeenAt
13396
+ * * Display Name: First Seen At
13397
+ * * SQL Data Type: datetimeoffset
13398
+ * * Default Value: sysdatetimeoffset()
13399
+ * * Description: When the engine first resolved this record to this endpoint.`),
13400
+ LastSeenAt: z.date().describe(`
13401
+ * * Field Name: LastSeenAt
13402
+ * * Display Name: Last Seen At
13403
+ * * SQL Data Type: datetimeoffset
13404
+ * * Default Value: sysdatetimeoffset()
13405
+ * * Description: When the engine last resolved this record to this endpoint.`),
13406
+ __mj_CreatedAt: z.date().describe(`
13407
+ * * Field Name: __mj_CreatedAt
13408
+ * * Display Name: Created At
13409
+ * * SQL Data Type: datetimeoffset
13410
+ * * Default Value: getutcdate()`),
13411
+ __mj_UpdatedAt: z.date().describe(`
13412
+ * * Field Name: __mj_UpdatedAt
13413
+ * * Display Name: Updated At
13414
+ * * SQL Data Type: datetimeoffset
13415
+ * * Default Value: getutcdate()`),
13416
+ Entity: z.string().nullable().describe(`
13417
+ * * Field Name: Entity
13418
+ * * Display Name: Entity
13419
+ * * SQL Data Type: nvarchar(255)`),
13420
+ });
13421
+ /**
13422
+ * zod schema definition for the entity MJ: Communication Endpoints
13423
+ */
13424
+ export const MJCommunicationEndpointSchema = z.object({
13425
+ ID: z.string().describe(`
13426
+ * * Field Name: ID
13427
+ * * Display Name: ID
13428
+ * * SQL Data Type: uniqueidentifier
13429
+ * * Default Value: newsequentialid()`),
13430
+ BaseMessageTypeID: z.string().describe(`
13431
+ * * Field Name: BaseMessageTypeID
13432
+ * * Display Name: Base Message Type ID
13433
+ * * SQL Data Type: uniqueidentifier
13434
+ * * Related Entity/Foreign Key: MJ: Communication Base Message Types (vwCommunicationBaseMessageTypes.ID)
13435
+ * * Description: Channel of the address: the communication base message type (Email, SMS, ...).`),
13436
+ NormalizedValue: z.string().nullable().describe(`
13437
+ * * Field Name: NormalizedValue
13438
+ * * Display Name: Normalized Value
13439
+ * * SQL Data Type: nvarchar(320)
13440
+ * * Description: Normalized address: email lowercased and trimmed (dots and plus-tags kept); phone in E.164. NULL when Status is Erased.`),
13441
+ ValueHash: z.string().describe(`
13442
+ * * Field Name: ValueHash
13443
+ * * Display Name: Value Hash
13444
+ * * SQL Data Type: nvarchar(64)
13445
+ * * Description: SHA-256 hex digest of the normalized value. Preserved on erasure so re-imported addresses resolve to the same suppressed endpoint.`),
13446
+ Domain: z.string().nullable().describe(`
13447
+ * * Field Name: Domain
13448
+ * * Display Name: Domain
13449
+ * * SQL Data Type: nvarchar(255)
13450
+ * * Description: Email domain, for domain-level deliverability reporting. NULL for non-email channels.`),
13451
+ Status: z.union([z.literal('Active'), z.literal('Complained'), z.literal('Erased'), z.literal('Hard Bounced'), z.literal('Invalid'), z.literal('Soft Bouncing')]).describe(`
13452
+ * * Field Name: Status
13453
+ * * Display Name: Status
13454
+ * * SQL Data Type: nvarchar(20)
13455
+ * * Default Value: Active
13456
+ * * Value List Type: List
13457
+ * * Possible Values
13458
+ * * Active
13459
+ * * Complained
13460
+ * * Erased
13461
+ * * Hard Bounced
13462
+ * * Invalid
13463
+ * * Soft Bouncing
13464
+ * * Description: Health summary maintained from activity. Suppression rows remain the authority for blocking.`),
13465
+ SoftBounceCount: z.number().describe(`
13466
+ * * Field Name: SoftBounceCount
13467
+ * * Display Name: Soft Bounce Count
13468
+ * * SQL Data Type: int
13469
+ * * Default Value: 0
13470
+ * * Description: Consecutive soft bounces since the last delivery. A configurable threshold converts repeated soft bounces into a suppression.`),
13471
+ LastSentAt: z.date().nullable().describe(`
13472
+ * * Field Name: LastSentAt
13473
+ * * Display Name: Last Sent At
13474
+ * * SQL Data Type: datetimeoffset
13475
+ * * Description: Last time any message was handed to a provider for this address.`),
13476
+ LastDeliveredAt: z.date().nullable().describe(`
13477
+ * * Field Name: LastDeliveredAt
13478
+ * * Display Name: Last Delivered At
13479
+ * * SQL Data Type: datetimeoffset
13480
+ * * Description: Last confirmed delivery.`),
13481
+ LastBouncedAt: z.date().nullable().describe(`
13482
+ * * Field Name: LastBouncedAt
13483
+ * * Display Name: Last Bounced At
13484
+ * * SQL Data Type: datetimeoffset
13485
+ * * Description: Last bounce of any kind.`),
13486
+ LastEngagedAt: z.date().nullable().describe(`
13487
+ * * Field Name: LastEngagedAt
13488
+ * * Display Name: Last Engaged At
13489
+ * * SQL Data Type: datetimeoffset
13490
+ * * Description: Last human open or click (machine events excluded).`),
13491
+ __mj_CreatedAt: z.date().describe(`
13492
+ * * Field Name: __mj_CreatedAt
13493
+ * * Display Name: Created At
13494
+ * * SQL Data Type: datetimeoffset
13495
+ * * Default Value: getutcdate()`),
13496
+ __mj_UpdatedAt: z.date().describe(`
13497
+ * * Field Name: __mj_UpdatedAt
13498
+ * * Display Name: Updated At
13499
+ * * SQL Data Type: datetimeoffset
13500
+ * * Default Value: getutcdate()`),
13501
+ BaseMessageType: z.string().nullable().describe(`
13502
+ * * Field Name: BaseMessageType
13503
+ * * Display Name: Base Message Type
13504
+ * * SQL Data Type: nvarchar(100)`),
13505
+ });
12329
13506
  /**
12330
13507
  * zod schema definition for the entity MJ: Communication Logs
12331
13508
  */
@@ -12396,6 +13573,91 @@ export const MJCommunicationLogSchema = z.object({
12396
13573
  * * Display Name: Updated At
12397
13574
  * * SQL Data Type: datetimeoffset
12398
13575
  * * Default Value: getutcdate()`),
13576
+ EntityID: z.string().nullable().describe(`
13577
+ * * Field Name: EntityID
13578
+ * * Display Name: Entity ID
13579
+ * * SQL Data Type: uniqueidentifier
13580
+ * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
13581
+ * * Description: Entity of the principal record the message was sent to.`),
13582
+ RecordID: z.string().nullable().describe(`
13583
+ * * Field Name: RecordID
13584
+ * * Display Name: Record ID
13585
+ * * SQL Data Type: nvarchar(450)
13586
+ * * Description: Primary key of the principal record (polymorphic, paired with EntityID). NULL for transactional sends to a bare address.`),
13587
+ CommunicationEndpointID: z.string().nullable().describe(`
13588
+ * * Field Name: CommunicationEndpointID
13589
+ * * Display Name: Communication Endpoint ID
13590
+ * * SQL Data Type: uniqueidentifier
13591
+ * * Related Entity/Foreign Key: MJ: Communication Endpoints (vwCommunicationEndpoints.ID)
13592
+ * * Description: Endpoint the message was sent to.`),
13593
+ RecipientAddress: z.string().nullable().describe(`
13594
+ * * Field Name: RecipientAddress
13595
+ * * Display Name: Recipient Address
13596
+ * * SQL Data Type: nvarchar(320)
13597
+ * * Description: Address as sent, kept even if the endpoint row later changes.`),
13598
+ CommunicationSenderID: z.string().nullable().describe(`
13599
+ * * Field Name: CommunicationSenderID
13600
+ * * Display Name: Communication Sender ID
13601
+ * * SQL Data Type: uniqueidentifier
13602
+ * * Related Entity/Foreign Key: MJ: Communication Senders (vwCommunicationSenders.ID)
13603
+ * * Description: Sender the message went out on behalf of. Scopes any unsubscribe or complaint the message triggers.`),
13604
+ CommunicationPreferenceID: z.string().nullable().describe(`
13605
+ * * Field Name: CommunicationPreferenceID
13606
+ * * Display Name: Communication Preference ID
13607
+ * * SQL Data Type: uniqueidentifier
13608
+ * * Related Entity/Foreign Key: MJ: Communication Preferences (vwCommunicationPreferences.ID)
13609
+ * * Description: Preference the message was sent under. Scopes a one-click unsubscribe.`),
13610
+ MessageClass: z.union([z.literal('Marketing'), z.literal('Operational'), z.literal('Transactional')]).nullable().describe(`
13611
+ * * Field Name: MessageClass
13612
+ * * Display Name: Message Class
13613
+ * * SQL Data Type: nvarchar(20)
13614
+ * * Value List Type: List
13615
+ * * Possible Values
13616
+ * * Marketing
13617
+ * * Operational
13618
+ * * Transactional
13619
+ * * Description: Transactional, Operational or Marketing. NULL for messages logged before Communications V2.`),
13620
+ ScheduledAt: z.date().nullable().describe(`
13621
+ * * Field Name: ScheduledAt
13622
+ * * Display Name: Scheduled At
13623
+ * * SQL Data Type: datetimeoffset
13624
+ * * Description: Requested send time (SendAt), or the deferral time the compliance gate set (for example after quiet hours).`),
13625
+ ProviderMessageID: z.string().nullable().describe(`
13626
+ * * Field Name: ProviderMessageID
13627
+ * * Display Name: Provider Message ID
13628
+ * * SQL Data Type: nvarchar(200)
13629
+ * * Description: The provider's ID for the message (for example SendGrid X-Message-Id). Set once handed off; the send handler skips logs that already have one.`),
13630
+ UnsubscribeToken: z.string().nullable().describe(`
13631
+ * * Field Name: UnsubscribeToken
13632
+ * * Display Name: Unsubscribe Token
13633
+ * * SQL Data Type: uniqueidentifier
13634
+ * * Description: Non-enumerable random UUIDv4 capability token used in one-click unsubscribe and preference center links.`),
13635
+ TrackingToken: z.string().nullable().describe(`
13636
+ * * Field Name: TrackingToken
13637
+ * * Display Name: Tracking Token
13638
+ * * SQL Data Type: uniqueidentifier
13639
+ * * Description: Separate random UUIDv4 token for open-tracking pixels so image-proxy logs never hold unsubscribe capability.`),
13640
+ CorrelationData: z.string().nullable().describe(`
13641
+ * * Field Name: CorrelationData
13642
+ * * Display Name: Correlation Data
13643
+ * * SQL Data Type: nvarchar(MAX)
13644
+ * * Description: Caller-supplied JSON echoed into provider tracking metadata and back on every activity event (for example a campaign or sequence step ID).`),
13645
+ ComplianceDecision: z.string().nullable().describe(`
13646
+ * * Field Name: ComplianceDecision
13647
+ * * Display Name: Compliance Decision
13648
+ * * SQL Data Type: nvarchar(MAX)
13649
+ * * Description: JSON record of the gate's decision: applicable regimes and jurisdictions, resolved rules, obligations injected. Evidence of why the message was allowed.`),
13650
+ IsDryRun: z.boolean().describe(`
13651
+ * * Field Name: IsDryRun
13652
+ * * Display Name: Is Dry Run
13653
+ * * SQL Data Type: bit
13654
+ * * Default Value: 0
13655
+ * * Description: True when the message went through the provider's dry-run path and was not delivered. A dry-run log is Complete but is never counted as sent.`),
13656
+ DeferredPayload: z.string().nullable().describe(`
13657
+ * * Field Name: DeferredPayload
13658
+ * * Display Name: Deferred Payload
13659
+ * * SQL Data Type: nvarchar(MAX)
13660
+ * * Description: JSON of the rendered message (subject and bodies) for a send deferred to a later time. Written when the log is created Pending, read by the scheduled sweep, and cleared once the message is dispatched so the body is not kept.`),
12399
13661
  CommunicationProvider: z.string().nullable().describe(`
12400
13662
  * * Field Name: CommunicationProvider
12401
13663
  * * Display Name: Communication Provider
@@ -12408,6 +13670,367 @@ export const MJCommunicationLogSchema = z.object({
12408
13670
  * * Field Name: CommunicationRun
12409
13671
  * * Display Name: Communication Run
12410
13672
  * * SQL Data Type: nvarchar(100)`),
13673
+ Entity: z.string().nullable().describe(`
13674
+ * * Field Name: Entity
13675
+ * * Display Name: Entity
13676
+ * * SQL Data Type: nvarchar(255)`),
13677
+ CommunicationSender: z.string().nullable().describe(`
13678
+ * * Field Name: CommunicationSender
13679
+ * * Display Name: Communication Sender
13680
+ * * SQL Data Type: nvarchar(200)`),
13681
+ CommunicationPreference: z.string().nullable().describe(`
13682
+ * * Field Name: CommunicationPreference
13683
+ * * Display Name: Communication Preference
13684
+ * * SQL Data Type: nvarchar(200)`),
13685
+ });
13686
+ /**
13687
+ * zod schema definition for the entity MJ: Communication Preferences
13688
+ */
13689
+ export const MJCommunicationPreferenceSchema = z.object({
13690
+ ID: z.string().describe(`
13691
+ * * Field Name: ID
13692
+ * * Display Name: ID
13693
+ * * SQL Data Type: uniqueidentifier
13694
+ * * Default Value: newsequentialid()`),
13695
+ CommunicationSenderID: z.string().nullable().describe(`
13696
+ * * Field Name: CommunicationSenderID
13697
+ * * Display Name: Communication Sender ID
13698
+ * * SQL Data Type: uniqueidentifier
13699
+ * * Related Entity/Foreign Key: MJ: Communication Senders (vwCommunicationSenders.ID)
13700
+ * * Description: Owning sender. NULL means the preference is shared across senders; non-NULL means the preference is owned by that specific sender.`),
13701
+ Name: z.string().describe(`
13702
+ * * Field Name: Name
13703
+ * * Display Name: Name
13704
+ * * SQL Data Type: nvarchar(200)
13705
+ * * Description: Name shown in the preference center. Unique per sender.`),
13706
+ Description: z.string().nullable().describe(`
13707
+ * * Field Name: Description
13708
+ * * Display Name: Description
13709
+ * * SQL Data Type: nvarchar(MAX)
13710
+ * * Description: Explanation shown in the preference center.`),
13711
+ Category: z.string().nullable().describe(`
13712
+ * * Field Name: Category
13713
+ * * Display Name: Category
13714
+ * * SQL Data Type: nvarchar(100)
13715
+ * * Description: Optional grouping heading in the preference center.`),
13716
+ MessageClass: z.union([z.literal('Marketing'), z.literal('Operational'), z.literal('Transactional')]).describe(`
13717
+ * * Field Name: MessageClass
13718
+ * * Display Name: Message Class
13719
+ * * SQL Data Type: nvarchar(20)
13720
+ * * Default Value: Marketing
13721
+ * * Value List Type: List
13722
+ * * Possible Values
13723
+ * * Marketing
13724
+ * * Operational
13725
+ * * Transactional
13726
+ * * Description: Transactional, Operational or Marketing. Decides which suppression reasons and regime rules apply to messages sent under this preference.`),
13727
+ DefaultState: z.union([z.literal('Opted In'), z.literal('Opted Out')]).describe(`
13728
+ * * Field Name: DefaultState
13729
+ * * Display Name: Default State
13730
+ * * SQL Data Type: nvarchar(20)
13731
+ * * Default Value: Opted In
13732
+ * * Value List Type: List
13733
+ * * Possible Values
13734
+ * * Opted In
13735
+ * * Opted Out
13736
+ * * Description: State assumed when a principal has no Principal Preference row. An applicable opt-in regime overrides Opted In for Marketing: explicit consent is then required.`),
13737
+ BaseMessageTypeID: z.string().nullable().describe(`
13738
+ * * Field Name: BaseMessageTypeID
13739
+ * * Display Name: Base Message Type ID
13740
+ * * SQL Data Type: uniqueidentifier
13741
+ * * Related Entity/Foreign Key: MJ: Communication Base Message Types (vwCommunicationBaseMessageTypes.ID)
13742
+ * * Description: Channel this preference applies to. NULL means all channels.`),
13743
+ IsUserVisible: z.boolean().describe(`
13744
+ * * Field Name: IsUserVisible
13745
+ * * Display Name: Is User Visible
13746
+ * * SQL Data Type: bit
13747
+ * * Default Value: 1
13748
+ * * Description: When 0, the preference is internal and hidden from the preference center.`),
13749
+ DisplayOrder: z.number().describe(`
13750
+ * * Field Name: DisplayOrder
13751
+ * * Display Name: Display Order
13752
+ * * SQL Data Type: int
13753
+ * * Default Value: 0
13754
+ * * Description: Order in the preference center.`),
13755
+ Status: z.union([z.literal('Active'), z.literal('Disabled')]).describe(`
13756
+ * * Field Name: Status
13757
+ * * Display Name: Status
13758
+ * * SQL Data Type: nvarchar(20)
13759
+ * * Default Value: Active
13760
+ * * Value List Type: List
13761
+ * * Possible Values
13762
+ * * Active
13763
+ * * Disabled
13764
+ * * Description: Active or Disabled. Sends naming a disabled preference are refused.`),
13765
+ __mj_CreatedAt: z.date().describe(`
13766
+ * * Field Name: __mj_CreatedAt
13767
+ * * Display Name: Created At
13768
+ * * SQL Data Type: datetimeoffset
13769
+ * * Default Value: getutcdate()`),
13770
+ __mj_UpdatedAt: z.date().describe(`
13771
+ * * Field Name: __mj_UpdatedAt
13772
+ * * Display Name: Updated At
13773
+ * * SQL Data Type: datetimeoffset
13774
+ * * Default Value: getutcdate()`),
13775
+ CommunicationSender: z.string().nullable().describe(`
13776
+ * * Field Name: CommunicationSender
13777
+ * * Display Name: Communication Sender
13778
+ * * SQL Data Type: nvarchar(200)`),
13779
+ BaseMessageType: z.string().nullable().describe(`
13780
+ * * Field Name: BaseMessageType
13781
+ * * Display Name: Base Message Type
13782
+ * * SQL Data Type: nvarchar(100)`),
13783
+ });
13784
+ /**
13785
+ * zod schema definition for the entity MJ: Communication Principal Preferences
13786
+ */
13787
+ export const MJCommunicationPrincipalPreferenceSchema = z.object({
13788
+ ID: z.string().describe(`
13789
+ * * Field Name: ID
13790
+ * * Display Name: ID
13791
+ * * SQL Data Type: uniqueidentifier
13792
+ * * Default Value: newsequentialid()`),
13793
+ EntityID: z.string().describe(`
13794
+ * * Field Name: EntityID
13795
+ * * Display Name: Entity ID
13796
+ * * SQL Data Type: uniqueidentifier
13797
+ * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
13798
+ * * Description: Entity of the principal record.`),
13799
+ RecordID: z.string().describe(`
13800
+ * * Field Name: RecordID
13801
+ * * Display Name: Record ID
13802
+ * * SQL Data Type: nvarchar(450)
13803
+ * * Description: Primary key of the principal record (polymorphic, paired with EntityID).`),
13804
+ CommunicationPreferenceID: z.string().describe(`
13805
+ * * Field Name: CommunicationPreferenceID
13806
+ * * Display Name: Communication Preference ID
13807
+ * * SQL Data Type: uniqueidentifier
13808
+ * * Related Entity/Foreign Key: MJ: Communication Preferences (vwCommunicationPreferences.ID)
13809
+ * * Description: The preference this choice is for.`),
13810
+ CommunicationSenderID: z.string().nullable().describe(`
13811
+ * * Field Name: CommunicationSenderID
13812
+ * * Display Name: Communication Sender ID
13813
+ * * SQL Data Type: uniqueidentifier
13814
+ * * Related Entity/Foreign Key: MJ: Communication Senders (vwCommunicationSenders.ID)
13815
+ * * Description: Sender this choice applies to (and its descendants). NULL means every sender.`),
13816
+ State: z.union([z.literal('Opted In'), z.literal('Opted Out'), z.literal('Pending')]).describe(`
13817
+ * * Field Name: State
13818
+ * * Display Name: State
13819
+ * * SQL Data Type: nvarchar(20)
13820
+ * * Value List Type: List
13821
+ * * Possible Values
13822
+ * * Opted In
13823
+ * * Opted Out
13824
+ * * Pending
13825
+ * * Description: Pending (awaiting double opt-in confirmation), Opted In or Opted Out.`),
13826
+ OptInMethod: z.union([z.literal('Double'), z.literal('Single')]).nullable().describe(`
13827
+ * * Field Name: OptInMethod
13828
+ * * Display Name: Opt In Method
13829
+ * * SQL Data Type: nvarchar(20)
13830
+ * * Value List Type: List
13831
+ * * Possible Values
13832
+ * * Double
13833
+ * * Single
13834
+ * * Description: Whether consent was captured via Single or Double opt-in. Preserved after Pending transitions to Opted In.`),
13835
+ ConfirmedAt: z.date().nullable().describe(`
13836
+ * * Field Name: ConfirmedAt
13837
+ * * Display Name: Confirmed At
13838
+ * * SQL Data Type: datetimeoffset
13839
+ * * Description: When double opt-in confirmation was completed. NULL for single opt-in or while still Pending.`),
13840
+ ConfirmationToken: z.string().nullable().describe(`
13841
+ * * Field Name: ConfirmationToken
13842
+ * * Display Name: Confirmation Token
13843
+ * * SQL Data Type: uniqueidentifier
13844
+ * * Description: Random UUIDv4 token used in double opt-in confirmation links, separate from UnsubscribeToken.`),
13845
+ ConsentSource: z.union([z.literal('API'), z.literal('Admin'), z.literal('Import'), z.literal('One-Click Header'), z.literal('Preference Center'), z.literal('Provider Webhook'), z.literal('Signup Form')]).describe(`
13846
+ * * Field Name: ConsentSource
13847
+ * * Display Name: Consent Source
13848
+ * * SQL Data Type: nvarchar(30)
13849
+ * * Value List Type: List
13850
+ * * Possible Values
13851
+ * * API
13852
+ * * Admin
13853
+ * * Import
13854
+ * * One-Click Header
13855
+ * * Preference Center
13856
+ * * Provider Webhook
13857
+ * * Signup Form
13858
+ * * Description: Where the choice was captured.`),
13859
+ ConsentAt: z.date().describe(`
13860
+ * * Field Name: ConsentAt
13861
+ * * Display Name: Consent At
13862
+ * * SQL Data Type: datetimeoffset
13863
+ * * Default Value: sysdatetimeoffset()
13864
+ * * Description: When the choice was made.`),
13865
+ ConsentText: z.string().nullable().describe(`
13866
+ * * Field Name: ConsentText
13867
+ * * Display Name: Consent Text
13868
+ * * SQL Data Type: nvarchar(MAX)
13869
+ * * Description: The exact wording the person agreed to, kept as consent evidence where a regime requires it.`),
13870
+ ExpiresAt: z.date().nullable().describe(`
13871
+ * * Field Name: ExpiresAt
13872
+ * * Display Name: Expires At
13873
+ * * SQL Data Type: datetimeoffset
13874
+ * * Description: When implied consent lapses (for example under a ConsentExpiry rule). NULL means no expiry.`),
13875
+ CommunicationLogID: z.string().nullable().describe(`
13876
+ * * Field Name: CommunicationLogID
13877
+ * * Display Name: Communication Log ID
13878
+ * * SQL Data Type: uniqueidentifier
13879
+ * * Related Entity/Foreign Key: MJ: Communication Logs (vwCommunicationLogs.ID)
13880
+ * * Description: Message whose link or header produced this choice, when applicable.`),
13881
+ IPAddress: z.string().nullable().describe(`
13882
+ * * Field Name: IPAddress
13883
+ * * Display Name: IP Address
13884
+ * * SQL Data Type: nvarchar(45)
13885
+ * * Description: IP address of the request that made the choice.`),
13886
+ UserAgent: z.string().nullable().describe(`
13887
+ * * Field Name: UserAgent
13888
+ * * Display Name: User Agent
13889
+ * * SQL Data Type: nvarchar(1000)
13890
+ * * Description: User agent of the request that made the choice.`),
13891
+ ChangedByUserID: z.string().nullable().describe(`
13892
+ * * Field Name: ChangedByUserID
13893
+ * * Display Name: Changed By User ID
13894
+ * * SQL Data Type: uniqueidentifier
13895
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
13896
+ * * Description: MJ user who made the change on the person's behalf (admin or API). NULL for self-service.`),
13897
+ __mj_CreatedAt: z.date().describe(`
13898
+ * * Field Name: __mj_CreatedAt
13899
+ * * Display Name: Created At
13900
+ * * SQL Data Type: datetimeoffset
13901
+ * * Default Value: getutcdate()`),
13902
+ __mj_UpdatedAt: z.date().describe(`
13903
+ * * Field Name: __mj_UpdatedAt
13904
+ * * Display Name: Updated At
13905
+ * * SQL Data Type: datetimeoffset
13906
+ * * Default Value: getutcdate()`),
13907
+ Entity: z.string().nullable().describe(`
13908
+ * * Field Name: Entity
13909
+ * * Display Name: Entity
13910
+ * * SQL Data Type: nvarchar(255)`),
13911
+ CommunicationPreference: z.string().nullable().describe(`
13912
+ * * Field Name: CommunicationPreference
13913
+ * * Display Name: Communication Preference
13914
+ * * SQL Data Type: nvarchar(200)`),
13915
+ CommunicationSender: z.string().nullable().describe(`
13916
+ * * Field Name: CommunicationSender
13917
+ * * Display Name: Communication Sender
13918
+ * * SQL Data Type: nvarchar(200)`),
13919
+ CommunicationLog: z.date().nullable().describe(`
13920
+ * * Field Name: CommunicationLog
13921
+ * * Display Name: Communication Log
13922
+ * * SQL Data Type: datetimeoffset`),
13923
+ ChangedByUser: z.string().nullable().describe(`
13924
+ * * Field Name: ChangedByUser
13925
+ * * Display Name: Changed By User
13926
+ * * SQL Data Type: nvarchar(100)`),
13927
+ });
13928
+ /**
13929
+ * zod schema definition for the entity MJ: Communication Principals
13930
+ */
13931
+ export const MJCommunicationPrincipalSchema = z.object({
13932
+ ID: z.string().describe(`
13933
+ * * Field Name: ID
13934
+ * * Display Name: ID
13935
+ * * SQL Data Type: uniqueidentifier
13936
+ * * Default Value: newsequentialid()`),
13937
+ EntityID: z.string().describe(`
13938
+ * * Field Name: EntityID
13939
+ * * Display Name: Entity ID
13940
+ * * SQL Data Type: uniqueidentifier
13941
+ * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
13942
+ * * Description: The entity registered as a principal. One registration per entity.`),
13943
+ Name: z.string().describe(`
13944
+ * * Field Name: Name
13945
+ * * Display Name: Name
13946
+ * * SQL Data Type: nvarchar(100)
13947
+ * * Description: Display name shown in the principal selector, for example People or Organizations. The selector is hidden when only one principal is active.`),
13948
+ Description: z.string().nullable().describe(`
13949
+ * * Field Name: Description
13950
+ * * Display Name: Description
13951
+ * * SQL Data Type: nvarchar(MAX)
13952
+ * * Description: What this principal represents and which app registered it.`),
13953
+ DriverClass: z.string().nullable().describe(`
13954
+ * * Field Name: DriverClass
13955
+ * * Display Name: Driver Class
13956
+ * * SQL Data Type: nvarchar(200)
13957
+ * * Description: ClassFactory key of a BaseCommunicationPrincipal subclass. NULL uses the metadata-only base class.`),
13958
+ Configuration: z.string().nullable().describe(`
13959
+ * * Field Name: Configuration
13960
+ * * Display Name: Configuration
13961
+ * * SQL Data Type: nvarchar(MAX)
13962
+ * * Description: JSON slot mapping, for example {"Slots":{"FullName":"FullName","Jurisdiction":"Addresses.CountryISO2","Timezone":"Timezone","PreferredLanguage":"Language"}}. Slots may traverse relationships. Address slots live in Entity Communication Fields.`),
13963
+ DisplayOrder: z.number().describe(`
13964
+ * * Field Name: DisplayOrder
13965
+ * * Display Name: Display Order
13966
+ * * SQL Data Type: int
13967
+ * * Default Value: 0
13968
+ * * Description: Order of principals in pickers.`),
13969
+ Status: z.union([z.literal('Active'), z.literal('Disabled')]).describe(`
13970
+ * * Field Name: Status
13971
+ * * Display Name: Status
13972
+ * * SQL Data Type: nvarchar(20)
13973
+ * * Default Value: Active
13974
+ * * Value List Type: List
13975
+ * * Possible Values
13976
+ * * Active
13977
+ * * Disabled
13978
+ * * Description: Active principals can be sent to; Disabled principals are refused by the engine.`),
13979
+ __mj_CreatedAt: z.date().describe(`
13980
+ * * Field Name: __mj_CreatedAt
13981
+ * * Display Name: Created At
13982
+ * * SQL Data Type: datetimeoffset
13983
+ * * Default Value: getutcdate()`),
13984
+ __mj_UpdatedAt: z.date().describe(`
13985
+ * * Field Name: __mj_UpdatedAt
13986
+ * * Display Name: Updated At
13987
+ * * SQL Data Type: datetimeoffset
13988
+ * * Default Value: getutcdate()`),
13989
+ Entity: z.string().nullable().describe(`
13990
+ * * Field Name: Entity
13991
+ * * Display Name: Entity
13992
+ * * SQL Data Type: nvarchar(255)`),
13993
+ });
13994
+ /**
13995
+ * zod schema definition for the entity MJ: Communication Provider Events
13996
+ */
13997
+ export const MJCommunicationProviderEventSchema = z.object({
13998
+ ID: z.string().describe(`
13999
+ * * Field Name: ID
14000
+ * * Display Name: ID
14001
+ * * SQL Data Type: uniqueidentifier
14002
+ * * Default Value: newsequentialid()`),
14003
+ CommunicationProviderID: z.string().describe(`
14004
+ * * Field Name: CommunicationProviderID
14005
+ * * Display Name: Communication Provider ID
14006
+ * * SQL Data Type: uniqueidentifier
14007
+ * * Related Entity/Foreign Key: MJ: Communication Providers (vwCommunicationProviders.ID)
14008
+ * * Description: Provider that delivered the webhook event.`),
14009
+ ProviderEventID: z.string().describe(`
14010
+ * * Field Name: ProviderEventID
14011
+ * * Display Name: Provider Event ID
14012
+ * * SQL Data Type: nvarchar(200)
14013
+ * * Description: Provider's unique event ID (for example SendGrid sg_event_id).`),
14014
+ ReceivedAt: z.date().describe(`
14015
+ * * Field Name: ReceivedAt
14016
+ * * Display Name: Received At
14017
+ * * SQL Data Type: datetimeoffset
14018
+ * * Default Value: sysdatetimeoffset()
14019
+ * * Description: When MJ processed the event, used by the 7-day retention purge.`),
14020
+ __mj_CreatedAt: z.date().describe(`
14021
+ * * Field Name: __mj_CreatedAt
14022
+ * * Display Name: Created At
14023
+ * * SQL Data Type: datetimeoffset
14024
+ * * Default Value: getutcdate()`),
14025
+ __mj_UpdatedAt: z.date().describe(`
14026
+ * * Field Name: __mj_UpdatedAt
14027
+ * * Display Name: Updated At
14028
+ * * SQL Data Type: datetimeoffset
14029
+ * * Default Value: getutcdate()`),
14030
+ CommunicationProvider: z.string().nullable().describe(`
14031
+ * * Field Name: CommunicationProvider
14032
+ * * Display Name: Communication Provider
14033
+ * * SQL Data Type: nvarchar(255)`),
12411
14034
  });
12412
14035
  /**
12413
14036
  * zod schema definition for the entity MJ: Communication Provider Message Types
@@ -12584,11 +14207,89 @@ export const MJCommunicationProviderSchema = z.object({
12584
14207
  * * Display Name: Allowed O Auth Tenant I Ds
12585
14208
  * * SQL Data Type: nvarchar(1000)
12586
14209
  * * Description: Optional comma-separated allowlist of identity tenant identifiers (Gate 3) that a user-delegated OAuth token must carry: Azure AD tenant IDs (tid) or Google Workspace hosted domains (hd). NULL means no tenant restriction beyond AllowedEmailDomains.`),
14210
+ RequireVerifiedDomain: z.boolean().describe(`
14211
+ * * Field Name: RequireVerifiedDomain
14212
+ * * Display Name: Require Verified Domain
14213
+ * * SQL Data Type: bit
14214
+ * * Default Value: 0
14215
+ * * Description: When 1, sends through this provider require a Verified Communication Sending Domain matching the sender's domain and credential.`),
14216
+ DeliveryGuarantee: z.union([z.literal('At Least Once'), z.literal('At Most Once')]).describe(`
14217
+ * * Field Name: DeliveryGuarantee
14218
+ * * Display Name: Delivery Guarantee
14219
+ * * SQL Data Type: nvarchar(20)
14220
+ * * Default Value: At Most Once
14221
+ * * Value List Type: List
14222
+ * * Possible Values
14223
+ * * At Least Once
14224
+ * * At Most Once
14225
+ * * Description: What happens when a send's outcome is unknown (the provider may have accepted it, but the result was never recorded). At Most Once: never resend; the message is reported as Failed with OutcomeUnknown, so a recipient may miss it. At Least Once: resend; a recipient may get it twice. Default for every send through this provider.`),
12587
14226
  DefaultCredential: z.string().nullable().describe(`
12588
14227
  * * Field Name: DefaultCredential
12589
14228
  * * Display Name: Default Credential
12590
14229
  * * SQL Data Type: nvarchar(200)`),
12591
14230
  });
14231
+ /**
14232
+ * zod schema definition for the entity MJ: Communication Run Chunks
14233
+ */
14234
+ export const MJCommunicationRunChunkSchema = z.object({
14235
+ ID: z.string().describe(`
14236
+ * * Field Name: ID
14237
+ * * Display Name: ID
14238
+ * * SQL Data Type: uniqueidentifier
14239
+ * * Default Value: newsequentialid()`),
14240
+ CommunicationRunID: z.string().describe(`
14241
+ * * Field Name: CommunicationRunID
14242
+ * * Display Name: Communication Run ID
14243
+ * * SQL Data Type: uniqueidentifier
14244
+ * * Related Entity/Foreign Key: MJ: Communication Runs (vwCommunicationRuns.ID)
14245
+ * * Description: Run the chunk belongs to.`),
14246
+ ChunkIndex: z.number().describe(`
14247
+ * * Field Name: ChunkIndex
14248
+ * * Display Name: Chunk Index
14249
+ * * SQL Data Type: int
14250
+ * * Description: Zero-based position of the chunk in the run. Unique per run.`),
14251
+ Status: z.union([z.literal('Complete'), z.literal('Failed')]).describe(`
14252
+ * * Field Name: Status
14253
+ * * Display Name: Status
14254
+ * * SQL Data Type: nvarchar(20)
14255
+ * * Default Value: Complete
14256
+ * * Value List Type: List
14257
+ * * Possible Values
14258
+ * * Complete
14259
+ * * Failed
14260
+ * * Description: Complete when the chunk was processed (individual recipients may still be blocked or failed); Failed when the chunk was refused before any recipient was processed.`),
14261
+ RecipientCount: z.number().describe(`
14262
+ * * Field Name: RecipientCount
14263
+ * * Display Name: Recipient Count
14264
+ * * SQL Data Type: int
14265
+ * * Default Value: 0
14266
+ * * Description: Number of recipients in the chunk.`),
14267
+ CompletedAt: z.date().describe(`
14268
+ * * Field Name: CompletedAt
14269
+ * * Display Name: Completed At
14270
+ * * SQL Data Type: datetimeoffset
14271
+ * * Default Value: sysdatetimeoffset()
14272
+ * * Description: When the chunk finished.`),
14273
+ ErrorMessage: z.string().nullable().describe(`
14274
+ * * Field Name: ErrorMessage
14275
+ * * Display Name: Error Message
14276
+ * * SQL Data Type: nvarchar(MAX)
14277
+ * * Description: Why the chunk was refused, when Status is Failed.`),
14278
+ __mj_CreatedAt: z.date().describe(`
14279
+ * * Field Name: __mj_CreatedAt
14280
+ * * Display Name: Created At
14281
+ * * SQL Data Type: datetimeoffset
14282
+ * * Default Value: getutcdate()`),
14283
+ __mj_UpdatedAt: z.date().describe(`
14284
+ * * Field Name: __mj_UpdatedAt
14285
+ * * Display Name: Updated At
14286
+ * * SQL Data Type: datetimeoffset
14287
+ * * Default Value: getutcdate()`),
14288
+ CommunicationRun: z.string().nullable().describe(`
14289
+ * * Field Name: CommunicationRun
14290
+ * * Display Name: Communication Run
14291
+ * * SQL Data Type: nvarchar(100)`),
14292
+ });
12592
14293
  /**
12593
14294
  * zod schema definition for the entity MJ: Communication Runs
12594
14295
  */
@@ -12650,11 +14351,624 @@ export const MJCommunicationRunSchema = z.object({
12650
14351
  * * Display Name: Updated At
12651
14352
  * * SQL Data Type: datetimeoffset
12652
14353
  * * Default Value: getutcdate()`),
14354
+ ChunkCount: z.number().nullable().describe(`
14355
+ * * Field Name: ChunkCount
14356
+ * * Display Name: Chunk Count
14357
+ * * SQL Data Type: int
14358
+ * * Description: Number of queued chunks the run was split into. The run is ended when this many Communication Run Chunks have been recorded. NULL for a run that is not chunked.`),
14359
+ DeliveryGuarantee: z.union([z.literal('At Least Once'), z.literal('At Most Once')]).nullable().describe(`
14360
+ * * Field Name: DeliveryGuarantee
14361
+ * * Display Name: Delivery Guarantee
14362
+ * * SQL Data Type: nvarchar(20)
14363
+ * * Value List Type: List
14364
+ * * Possible Values
14365
+ * * At Least Once
14366
+ * * At Most Once
14367
+ * * Description: Overrides the sender and provider DeliveryGuarantee for every send in this run. NULL inherits.`),
14368
+ User: z.string().nullable().describe(`
14369
+ * * Field Name: User
14370
+ * * Display Name: User
14371
+ * * SQL Data Type: nvarchar(100)`),
14372
+ });
14373
+ /**
14374
+ * zod schema definition for the entity MJ: Communication Sender Permissions
14375
+ */
14376
+ export const MJCommunicationSenderPermissionSchema = z.object({
14377
+ ID: z.string().describe(`
14378
+ * * Field Name: ID
14379
+ * * Display Name: ID
14380
+ * * SQL Data Type: uniqueidentifier
14381
+ * * Default Value: newsequentialid()`),
14382
+ CommunicationSenderID: z.string().describe(`
14383
+ * * Field Name: CommunicationSenderID
14384
+ * * Display Name: Communication Sender ID
14385
+ * * SQL Data Type: uniqueidentifier
14386
+ * * Related Entity/Foreign Key: MJ: Communication Senders (vwCommunicationSenders.ID)
14387
+ * * Description: The sender the grant applies to.`),
14388
+ RoleID: z.string().nullable().describe(`
14389
+ * * Field Name: RoleID
14390
+ * * Display Name: Role ID
14391
+ * * SQL Data Type: uniqueidentifier
14392
+ * * Related Entity/Foreign Key: MJ: Roles (vwRoles.ID)
14393
+ * * Description: Role granted the permission. Exactly one of RoleID and UserID is set.`),
14394
+ UserID: z.string().nullable().describe(`
14395
+ * * Field Name: UserID
14396
+ * * Display Name: User ID
14397
+ * * SQL Data Type: uniqueidentifier
14398
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
14399
+ * * Description: User granted the permission. Exactly one of RoleID and UserID is set.`),
14400
+ PermissionLevel: z.union([z.literal('Manage'), z.literal('Send'), z.literal('View')]).describe(`
14401
+ * * Field Name: PermissionLevel
14402
+ * * Display Name: Permission Level
14403
+ * * SQL Data Type: nvarchar(20)
14404
+ * * Value List Type: List
14405
+ * * Possible Values
14406
+ * * Manage
14407
+ * * Send
14408
+ * * View
14409
+ * * Description: View: see activity and reports. Send: send as this sender. Manage: also edit the sender, its preferences and its suppressions. Each level includes the ones before it.`),
14410
+ AppliesToChildSenders: z.boolean().describe(`
14411
+ * * Field Name: AppliesToChildSenders
14412
+ * * Display Name: Applies To Child Senders
14413
+ * * SQL Data Type: bit
14414
+ * * Default Value: 1
14415
+ * * Description: When 1, the grant also applies to every descendant sender.`),
14416
+ __mj_CreatedAt: z.date().describe(`
14417
+ * * Field Name: __mj_CreatedAt
14418
+ * * Display Name: Created At
14419
+ * * SQL Data Type: datetimeoffset
14420
+ * * Default Value: getutcdate()`),
14421
+ __mj_UpdatedAt: z.date().describe(`
14422
+ * * Field Name: __mj_UpdatedAt
14423
+ * * Display Name: Updated At
14424
+ * * SQL Data Type: datetimeoffset
14425
+ * * Default Value: getutcdate()`),
14426
+ CommunicationSender: z.string().nullable().describe(`
14427
+ * * Field Name: CommunicationSender
14428
+ * * Display Name: Communication Sender
14429
+ * * SQL Data Type: nvarchar(200)`),
14430
+ Role: z.string().nullable().describe(`
14431
+ * * Field Name: Role
14432
+ * * Display Name: Role
14433
+ * * SQL Data Type: nvarchar(50)`),
12653
14434
  User: z.string().nullable().describe(`
12654
14435
  * * Field Name: User
12655
14436
  * * Display Name: User
12656
14437
  * * SQL Data Type: nvarchar(100)`),
12657
14438
  });
14439
+ /**
14440
+ * zod schema definition for the entity MJ: Communication Sender Types
14441
+ */
14442
+ export const MJCommunicationSenderTypeSchema = z.object({
14443
+ ID: z.string().describe(`
14444
+ * * Field Name: ID
14445
+ * * Display Name: ID
14446
+ * * SQL Data Type: uniqueidentifier
14447
+ * * Default Value: newsequentialid()`),
14448
+ Name: z.string().describe(`
14449
+ * * Field Name: Name
14450
+ * * Display Name: Name
14451
+ * * SQL Data Type: nvarchar(100)
14452
+ * * Description: Unique name, for example Company, Brand, Tenant or Newsletter.`),
14453
+ Description: z.string().nullable().describe(`
14454
+ * * Field Name: Description
14455
+ * * Display Name: Description
14456
+ * * SQL Data Type: nvarchar(MAX)
14457
+ * * Description: What this sender type represents.`),
14458
+ EntityID: z.string().nullable().describe(`
14459
+ * * Field Name: EntityID
14460
+ * * Display Name: Entity ID
14461
+ * * SQL Data Type: uniqueidentifier
14462
+ * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
14463
+ * * Description: Entity whose records back senders of this type, for example MJ: Companies. NULL for senders defined only in Communication Senders (for example a brand with no source record).`),
14464
+ DriverClass: z.string().nullable().describe(`
14465
+ * * Field Name: DriverClass
14466
+ * * Display Name: Driver Class
14467
+ * * SQL Data Type: nvarchar(200)
14468
+ * * Description: ClassFactory key of a BaseCommunicationSender subclass for custom resolution, templating context or permission checks. NULL uses the metadata-only base class.`),
14469
+ Configuration: z.string().nullable().describe(`
14470
+ * * Field Name: Configuration
14471
+ * * Display Name: Configuration
14472
+ * * SQL Data Type: nvarchar(MAX)
14473
+ * * Description: JSON slot mapping from the backing entity, for example {"Slots":{"Name":"Name","SendingDomain":"Domain","LogoURL":"LogoURL","Website":"Website"}}. Values set on a Communication Sender row override mapped values.`),
14474
+ Status: z.union([z.literal('Active'), z.literal('Disabled')]).describe(`
14475
+ * * Field Name: Status
14476
+ * * Display Name: Status
14477
+ * * SQL Data Type: nvarchar(20)
14478
+ * * Default Value: Active
14479
+ * * Value List Type: List
14480
+ * * Possible Values
14481
+ * * Active
14482
+ * * Disabled
14483
+ * * Description: Active or Disabled.`),
14484
+ __mj_CreatedAt: z.date().describe(`
14485
+ * * Field Name: __mj_CreatedAt
14486
+ * * Display Name: Created At
14487
+ * * SQL Data Type: datetimeoffset
14488
+ * * Default Value: getutcdate()`),
14489
+ __mj_UpdatedAt: z.date().describe(`
14490
+ * * Field Name: __mj_UpdatedAt
14491
+ * * Display Name: Updated At
14492
+ * * SQL Data Type: datetimeoffset
14493
+ * * Default Value: getutcdate()`),
14494
+ Entity: z.string().nullable().describe(`
14495
+ * * Field Name: Entity
14496
+ * * Display Name: Entity
14497
+ * * SQL Data Type: nvarchar(255)`),
14498
+ });
14499
+ /**
14500
+ * zod schema definition for the entity MJ: Communication Senders
14501
+ */
14502
+ export const MJCommunicationSenderSchema = z.object({
14503
+ ID: z.string().describe(`
14504
+ * * Field Name: ID
14505
+ * * Display Name: ID
14506
+ * * SQL Data Type: uniqueidentifier
14507
+ * * Default Value: newsequentialid()`),
14508
+ CommunicationSenderTypeID: z.string().describe(`
14509
+ * * Field Name: CommunicationSenderTypeID
14510
+ * * Display Name: Communication Sender Type ID
14511
+ * * SQL Data Type: uniqueidentifier
14512
+ * * Related Entity/Foreign Key: MJ: Communication Sender Types (vwCommunicationSenderTypes.ID)
14513
+ * * Description: The sender type this sender belongs to.`),
14514
+ RecordID: z.string().nullable().describe(`
14515
+ * * Field Name: RecordID
14516
+ * * Display Name: Record ID
14517
+ * * SQL Data Type: nvarchar(450)
14518
+ * * Description: Primary key of the backing record in the sender type's entity (for example an MJ: Companies ID). NULL when the sender has no backing record.`),
14519
+ ParentSenderID: z.string().nullable().describe(`
14520
+ * * Field Name: ParentSenderID
14521
+ * * Display Name: Parent Sender ID
14522
+ * * SQL Data Type: uniqueidentifier
14523
+ * * Related Entity/Foreign Key: MJ: Communication Senders (vwCommunicationSenders.ID)
14524
+ * * Description: Parent sender, for example the company a brand or newsletter belongs to. Suppressions, preferences and permissions on a parent apply to its descendants.`),
14525
+ Name: z.string().describe(`
14526
+ * * Field Name: Name
14527
+ * * Display Name: Name
14528
+ * * SQL Data Type: nvarchar(200)
14529
+ * * Description: Display name used in the preference center and reports.`),
14530
+ Description: z.string().nullable().describe(`
14531
+ * * Field Name: Description
14532
+ * * Display Name: Description
14533
+ * * SQL Data Type: nvarchar(MAX)
14534
+ * * Description: What this sender is and who manages it.`),
14535
+ IsDefault: z.boolean().describe(`
14536
+ * * Field Name: IsDefault
14537
+ * * Display Name: Is Default
14538
+ * * SQL Data Type: bit
14539
+ * * Default Value: 0
14540
+ * * Description: When 1, this sender is used for sends that name no sender. At most one default sender per instance.`),
14541
+ FromEmail: z.string().nullable().describe(`
14542
+ * * Field Name: FromEmail
14543
+ * * Display Name: From Email
14544
+ * * SQL Data Type: nvarchar(320)
14545
+ * * Description: Default From address for email sent by this sender.`),
14546
+ FromName: z.string().nullable().describe(`
14547
+ * * Field Name: FromName
14548
+ * * Display Name: From Name
14549
+ * * SQL Data Type: nvarchar(200)
14550
+ * * Description: Default From display name.`),
14551
+ ReplyToEmail: z.string().nullable().describe(`
14552
+ * * Field Name: ReplyToEmail
14553
+ * * Display Name: Reply To Email
14554
+ * * SQL Data Type: nvarchar(320)
14555
+ * * Description: Default Reply-To address.`),
14556
+ FromPhone: z.string().nullable().describe(`
14557
+ * * Field Name: FromPhone
14558
+ * * Display Name: From Phone
14559
+ * * SQL Data Type: nvarchar(32)
14560
+ * * Description: Default sending phone number or short code for SMS, in E.164 form.`),
14561
+ SendingDomain: z.string().nullable().describe(`
14562
+ * * Field Name: SendingDomain
14563
+ * * Display Name: Sending Domain
14564
+ * * SQL Data Type: nvarchar(255)
14565
+ * * Description: Authenticated sending domain (SPF/DKIM/DMARC). Also a rate-limiting key for the send queue.`),
14566
+ PostalAddress: z.string().nullable().describe(`
14567
+ * * Field Name: PostalAddress
14568
+ * * Display Name: Postal Address
14569
+ * * SQL Data Type: nvarchar(1000)
14570
+ * * Description: Physical postal address injected into footers when a regime's SenderIdentification rule requires it.`),
14571
+ JurisdictionID: z.string().nullable().describe(`
14572
+ * * Field Name: JurisdictionID
14573
+ * * Display Name: Jurisdiction ID
14574
+ * * SQL Data Type: uniqueidentifier
14575
+ * * Related Entity/Foreign Key: MJ: Jurisdictions (vwJurisdictions.ID)
14576
+ * * Description: Where the sender is established. Regimes whose AppliesBy includes Sender apply based on this jurisdiction.`),
14577
+ CommunicationProviderID: z.string().nullable().describe(`
14578
+ * * Field Name: CommunicationProviderID
14579
+ * * Display Name: Communication Provider ID
14580
+ * * SQL Data Type: uniqueidentifier
14581
+ * * Related Entity/Foreign Key: MJ: Communication Providers (vwCommunicationProviders.ID)
14582
+ * * Description: Default provider for this sender's sends, overriding the instance default.`),
14583
+ CredentialID: z.string().nullable().describe(`
14584
+ * * Field Name: CredentialID
14585
+ * * Display Name: Credential ID
14586
+ * * SQL Data Type: uniqueidentifier
14587
+ * * Related Entity/Foreign Key: MJ: Credentials (vwCredentials.ID)
14588
+ * * Description: Provider credential for this sender (for example a per-tenant SendGrid subuser key). Secrets live only in MJ: Credentials.`),
14589
+ PreferenceCenterURL: z.string().nullable().describe(`
14590
+ * * Field Name: PreferenceCenterURL
14591
+ * * Display Name: Preference Center URL
14592
+ * * SQL Data Type: nvarchar(1000)
14593
+ * * Description: Public preference center URL for this sender. Used as the redirect after one-click unsubscribe and in footers.`),
14594
+ TemplateContext: z.string().nullable().describe(`
14595
+ * * Field Name: TemplateContext
14596
+ * * Display Name: Template Context
14597
+ * * SQL Data Type: nvarchar(MAX)
14598
+ * * Description: JSON brand variables exposed to templates and callers as Sender.*, for example {"LogoURL":"...","PrimaryColor":"#0B5394","FooterText":"..."}. Merged down the sender hierarchy: a child's values override its parent's.`),
14599
+ Configuration: z.string().nullable().describe(`
14600
+ * * Field Name: Configuration
14601
+ * * Display Name: Configuration
14602
+ * * SQL Data Type: nvarchar(MAX)
14603
+ * * Description: Driver-specific JSON settings for this sender.`),
14604
+ EnforcementMode: z.union([z.literal('Enforce'), z.literal('Off'), z.literal('Shadow')]).nullable().describe(`
14605
+ * * Field Name: EnforcementMode
14606
+ * * Display Name: Enforcement Mode
14607
+ * * SQL Data Type: nvarchar(10)
14608
+ * * Value List Type: List
14609
+ * * Possible Values
14610
+ * * Enforce
14611
+ * * Off
14612
+ * * Shadow
14613
+ * * Description: Per-sender override of the instance compliance enforcement mode (Off, Shadow or Enforce). NULL uses the instance setting.`),
14614
+ DeliveryGuarantee: z.union([z.literal('At Least Once'), z.literal('At Most Once')]).nullable().describe(`
14615
+ * * Field Name: DeliveryGuarantee
14616
+ * * Display Name: Delivery Guarantee
14617
+ * * SQL Data Type: nvarchar(20)
14618
+ * * Value List Type: List
14619
+ * * Possible Values
14620
+ * * At Least Once
14621
+ * * At Most Once
14622
+ * * Description: Overrides the provider's DeliveryGuarantee for sends from this sender. NULL inherits from the nearest ancestor sender, then the provider.`),
14623
+ Status: z.union([z.literal('Active'), z.literal('Disabled'), z.literal('Suspended')]).describe(`
14624
+ * * Field Name: Status
14625
+ * * Display Name: Status
14626
+ * * SQL Data Type: nvarchar(20)
14627
+ * * Default Value: Active
14628
+ * * Value List Type: List
14629
+ * * Possible Values
14630
+ * * Active
14631
+ * * Disabled
14632
+ * * Suspended
14633
+ * * Description: Active senders can send; Suspended senders are paused (for example a reputation problem); Disabled senders are retired.`),
14634
+ __mj_CreatedAt: z.date().describe(`
14635
+ * * Field Name: __mj_CreatedAt
14636
+ * * Display Name: Created At
14637
+ * * SQL Data Type: datetimeoffset
14638
+ * * Default Value: getutcdate()`),
14639
+ __mj_UpdatedAt: z.date().describe(`
14640
+ * * Field Name: __mj_UpdatedAt
14641
+ * * Display Name: Updated At
14642
+ * * SQL Data Type: datetimeoffset
14643
+ * * Default Value: getutcdate()`),
14644
+ CommunicationSenderType: z.string().nullable().describe(`
14645
+ * * Field Name: CommunicationSenderType
14646
+ * * Display Name: Communication Sender Type
14647
+ * * SQL Data Type: nvarchar(100)`),
14648
+ ParentSender: z.string().nullable().describe(`
14649
+ * * Field Name: ParentSender
14650
+ * * Display Name: Parent Sender
14651
+ * * SQL Data Type: nvarchar(200)`),
14652
+ Jurisdiction: z.string().nullable().describe(`
14653
+ * * Field Name: Jurisdiction
14654
+ * * Display Name: Jurisdiction
14655
+ * * SQL Data Type: nvarchar(200)`),
14656
+ CommunicationProvider: z.string().nullable().describe(`
14657
+ * * Field Name: CommunicationProvider
14658
+ * * Display Name: Communication Provider
14659
+ * * SQL Data Type: nvarchar(255)`),
14660
+ Credential: z.string().nullable().describe(`
14661
+ * * Field Name: Credential
14662
+ * * Display Name: Credential
14663
+ * * SQL Data Type: nvarchar(200)`),
14664
+ });
14665
+ /**
14666
+ * zod schema definition for the entity MJ: Communication Sending Domains
14667
+ */
14668
+ export const MJCommunicationSendingDomainSchema = z.object({
14669
+ ID: z.string().describe(`
14670
+ * * Field Name: ID
14671
+ * * Display Name: ID
14672
+ * * SQL Data Type: uniqueidentifier
14673
+ * * Default Value: newsequentialid()`),
14674
+ CommunicationProviderID: z.string().describe(`
14675
+ * * Field Name: CommunicationProviderID
14676
+ * * Display Name: Communication Provider ID
14677
+ * * SQL Data Type: uniqueidentifier
14678
+ * * Related Entity/Foreign Key: MJ: Communication Providers (vwCommunicationProviders.ID)
14679
+ * * Description: Provider that authenticates the domain (for example SendGrid).`),
14680
+ CredentialID: z.string().nullable().describe(`
14681
+ * * Field Name: CredentialID
14682
+ * * Display Name: Credential ID
14683
+ * * SQL Data Type: uniqueidentifier
14684
+ * * Related Entity/Foreign Key: MJ: Credentials (vwCredentials.ID)
14685
+ * * Description: MJ: Credential (account or subuser) owning this domain authentication. NULL uses default environment credentials.`),
14686
+ Domain: z.string().describe(`
14687
+ * * Field Name: Domain
14688
+ * * Display Name: Domain
14689
+ * * SQL Data Type: nvarchar(255)
14690
+ * * Description: Authenticated sending domain (for example mail.example.org).`),
14691
+ ProviderDomainID: z.string().nullable().describe(`
14692
+ * * Field Name: ProviderDomainID
14693
+ * * Display Name: Provider Domain ID
14694
+ * * SQL Data Type: nvarchar(200)
14695
+ * * Description: Provider's domain-authentication record ID (for example SendGrid whitelabel domain ID).`),
14696
+ Status: z.union([z.literal('Failed'), z.literal('Pending'), z.literal('Revoked'), z.literal('Verified')]).describe(`
14697
+ * * Field Name: Status
14698
+ * * Display Name: Status
14699
+ * * SQL Data Type: nvarchar(20)
14700
+ * * Default Value: Pending
14701
+ * * Value List Type: List
14702
+ * * Possible Values
14703
+ * * Failed
14704
+ * * Pending
14705
+ * * Revoked
14706
+ * * Verified
14707
+ * * Description: Pending, Verified, Failed or Revoked.`),
14708
+ DNSRecords: z.string().nullable().describe(`
14709
+ * * Field Name: DNSRecords
14710
+ * * Display Name: DNS Records
14711
+ * * SQL Data Type: nvarchar(MAX)
14712
+ * * Description: JSON array of required DNS records (Type, Purpose, Host, Value, Validated, LastError) returned by the provider.`),
14713
+ LastVerifiedAt: z.date().nullable().describe(`
14714
+ * * Field Name: LastVerifiedAt
14715
+ * * Display Name: Last Verified At
14716
+ * * SQL Data Type: datetimeoffset
14717
+ * * Description: When DNS validation was last checked.`),
14718
+ VerifiedAt: z.date().nullable().describe(`
14719
+ * * Field Name: VerifiedAt
14720
+ * * Display Name: Verified At
14721
+ * * SQL Data Type: datetimeoffset
14722
+ * * Description: When the domain first reached Verified status.`),
14723
+ __mj_CreatedAt: z.date().describe(`
14724
+ * * Field Name: __mj_CreatedAt
14725
+ * * Display Name: Created At
14726
+ * * SQL Data Type: datetimeoffset
14727
+ * * Default Value: getutcdate()`),
14728
+ __mj_UpdatedAt: z.date().describe(`
14729
+ * * Field Name: __mj_UpdatedAt
14730
+ * * Display Name: Updated At
14731
+ * * SQL Data Type: datetimeoffset
14732
+ * * Default Value: getutcdate()`),
14733
+ CommunicationProvider: z.string().nullable().describe(`
14734
+ * * Field Name: CommunicationProvider
14735
+ * * Display Name: Communication Provider
14736
+ * * SQL Data Type: nvarchar(255)`),
14737
+ Credential: z.string().nullable().describe(`
14738
+ * * Field Name: Credential
14739
+ * * Display Name: Credential
14740
+ * * SQL Data Type: nvarchar(200)`),
14741
+ });
14742
+ /**
14743
+ * zod schema definition for the entity MJ: Communication Suppression Policies
14744
+ */
14745
+ export const MJCommunicationSuppressionPolicySchema = z.object({
14746
+ ID: z.string().describe(`
14747
+ * * Field Name: ID
14748
+ * * Display Name: ID
14749
+ * * SQL Data Type: uniqueidentifier
14750
+ * * Default Value: newsequentialid()`),
14751
+ Name: z.string().describe(`
14752
+ * * Field Name: Name
14753
+ * * Display Name: Name
14754
+ * * SQL Data Type: nvarchar(200)
14755
+ * * Description: Unique policy name.`),
14756
+ Description: z.string().nullable().describe(`
14757
+ * * Field Name: Description
14758
+ * * Display Name: Description
14759
+ * * SQL Data Type: nvarchar(MAX)
14760
+ * * Description: What the policy protects against.`),
14761
+ DriverClass: z.string().describe(`
14762
+ * * Field Name: DriverClass
14763
+ * * Display Name: Driver Class
14764
+ * * SQL Data Type: nvarchar(200)
14765
+ * * Description: ClassFactory key of a BaseCommunicationSuppressionPolicy subclass.`),
14766
+ Parameters: z.string().nullable().describe(`
14767
+ * * Field Name: Parameters
14768
+ * * Display Name: Parameters
14769
+ * * SQL Data Type: nvarchar(MAX)
14770
+ * * Description: Driver parameters as JSON, for example {"Signal":"Spam Complaint","Threshold":3,"WindowDays":90,"Scope":"Global"}.`),
14771
+ Status: z.union([z.literal('Active'), z.literal('Disabled')]).describe(`
14772
+ * * Field Name: Status
14773
+ * * Display Name: Status
14774
+ * * SQL Data Type: nvarchar(20)
14775
+ * * Default Value: Active
14776
+ * * Value List Type: List
14777
+ * * Possible Values
14778
+ * * Active
14779
+ * * Disabled
14780
+ * * Description: Active or Disabled.`),
14781
+ __mj_CreatedAt: z.date().describe(`
14782
+ * * Field Name: __mj_CreatedAt
14783
+ * * Display Name: Created At
14784
+ * * SQL Data Type: datetimeoffset
14785
+ * * Default Value: getutcdate()`),
14786
+ __mj_UpdatedAt: z.date().describe(`
14787
+ * * Field Name: __mj_UpdatedAt
14788
+ * * Display Name: Updated At
14789
+ * * SQL Data Type: datetimeoffset
14790
+ * * Default Value: getutcdate()`),
14791
+ });
14792
+ /**
14793
+ * zod schema definition for the entity MJ: Communication Suppressions
14794
+ */
14795
+ export const MJCommunicationSuppressionSchema = z.object({
14796
+ ID: z.string().describe(`
14797
+ * * Field Name: ID
14798
+ * * Display Name: ID
14799
+ * * SQL Data Type: uniqueidentifier
14800
+ * * Default Value: newsequentialid()`),
14801
+ CommunicationEndpointID: z.string().nullable().describe(`
14802
+ * * Field Name: CommunicationEndpointID
14803
+ * * Display Name: Communication Endpoint ID
14804
+ * * SQL Data Type: uniqueidentifier
14805
+ * * Related Entity/Foreign Key: MJ: Communication Endpoints (vwCommunicationEndpoints.ID)
14806
+ * * Description: Blocked address. Address-level rows protect every principal that shares the address. At least one of endpoint or principal is set.`),
14807
+ EntityID: z.string().nullable().describe(`
14808
+ * * Field Name: EntityID
14809
+ * * Display Name: Entity ID
14810
+ * * SQL Data Type: uniqueidentifier
14811
+ * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
14812
+ * * Description: Entity of the blocked principal record, when the block is principal-level.`),
14813
+ RecordID: z.string().nullable().describe(`
14814
+ * * Field Name: RecordID
14815
+ * * Display Name: Record ID
14816
+ * * SQL Data Type: nvarchar(450)
14817
+ * * Description: Primary key of the blocked principal record (polymorphic, paired with EntityID).`),
14818
+ CommunicationSenderID: z.string().nullable().describe(`
14819
+ * * Field Name: CommunicationSenderID
14820
+ * * Display Name: Communication Sender ID
14821
+ * * SQL Data Type: uniqueidentifier
14822
+ * * Related Entity/Foreign Key: MJ: Communication Senders (vwCommunicationSenders.ID)
14823
+ * * Description: Sender the block applies to, including its descendants. NULL = global: every sender. Hard bounces and invalid addresses are always global.`),
14824
+ CommunicationPreferenceID: z.string().nullable().describe(`
14825
+ * * Field Name: CommunicationPreferenceID
14826
+ * * Display Name: Communication Preference ID
14827
+ * * SQL Data Type: uniqueidentifier
14828
+ * * Related Entity/Foreign Key: MJ: Communication Preferences (vwCommunicationPreferences.ID)
14829
+ * * Description: Preference the block applies to. NULL = all preferences of the classes the reason covers.`),
14830
+ BaseMessageTypeID: z.string().nullable().describe(`
14831
+ * * Field Name: BaseMessageTypeID
14832
+ * * Display Name: Base Message Type ID
14833
+ * * SQL Data Type: uniqueidentifier
14834
+ * * Related Entity/Foreign Key: MJ: Communication Base Message Types (vwCommunicationBaseMessageTypes.ID)
14835
+ * * Description: Channel the block applies to. NULL = all channels.`),
14836
+ Reason: z.union([z.literal('Admin Block'), z.literal('Hard Bounce'), z.literal('Invalid Address'), z.literal('Policy'), z.literal('Spam Complaint'), z.literal('User Unsubscribe')]).describe(`
14837
+ * * Field Name: Reason
14838
+ * * Display Name: Reason
14839
+ * * SQL Data Type: nvarchar(30)
14840
+ * * Value List Type: List
14841
+ * * Possible Values
14842
+ * * Admin Block
14843
+ * * Hard Bounce
14844
+ * * Invalid Address
14845
+ * * Policy
14846
+ * * Spam Complaint
14847
+ * * User Unsubscribe
14848
+ * * Description: Why the block exists. Hard Bounce and Invalid Address block every class; Spam Complaint and Admin Block block Operational and Marketing; User Unsubscribe and Policy block Marketing, or only the named preference when one is set.`),
14849
+ Source: z.union([z.literal('API'), z.literal('Admin'), z.literal('Import'), z.literal('One-Click Header'), z.literal('Policy'), z.literal('Preference Center'), z.literal('Provider Webhook')]).describe(`
14850
+ * * Field Name: Source
14851
+ * * Display Name: Source
14852
+ * * SQL Data Type: nvarchar(30)
14853
+ * * Value List Type: List
14854
+ * * Possible Values
14855
+ * * API
14856
+ * * Admin
14857
+ * * Import
14858
+ * * One-Click Header
14859
+ * * Policy
14860
+ * * Preference Center
14861
+ * * Provider Webhook
14862
+ * * Description: Where the signal came from.`),
14863
+ Status: z.union([z.literal('Active'), z.literal('Expired'), z.literal('Revoked')]).describe(`
14864
+ * * Field Name: Status
14865
+ * * Display Name: Status
14866
+ * * SQL Data Type: nvarchar(20)
14867
+ * * Default Value: Active
14868
+ * * Value List Type: List
14869
+ * * Possible Values
14870
+ * * Active
14871
+ * * Expired
14872
+ * * Revoked
14873
+ * * Description: Active rows block. Revoked rows were lifted (for example the person resubscribed). Expired rows passed ExpiresAt.`),
14874
+ EffectiveAt: z.date().describe(`
14875
+ * * Field Name: EffectiveAt
14876
+ * * Display Name: Effective At
14877
+ * * SQL Data Type: datetimeoffset
14878
+ * * Default Value: sysdatetimeoffset()
14879
+ * * Description: When the block took effect.`),
14880
+ ExpiresAt: z.date().nullable().describe(`
14881
+ * * Field Name: ExpiresAt
14882
+ * * Display Name: Expires At
14883
+ * * SQL Data Type: datetimeoffset
14884
+ * * Description: Optional automatic end, for example a cooling-off block after soft bounces. NULL = until revoked.`),
14885
+ RevokedAt: z.date().nullable().describe(`
14886
+ * * Field Name: RevokedAt
14887
+ * * Display Name: Revoked At
14888
+ * * SQL Data Type: datetimeoffset
14889
+ * * Description: When the block was lifted. Set exactly when Status is Revoked.`),
14890
+ RevokedByUserID: z.string().nullable().describe(`
14891
+ * * Field Name: RevokedByUserID
14892
+ * * Display Name: Revoked By User ID
14893
+ * * SQL Data Type: uniqueidentifier
14894
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
14895
+ * * Description: MJ user who lifted the block, when it was not the person themselves.`),
14896
+ CommunicationLogID: z.string().nullable().describe(`
14897
+ * * Field Name: CommunicationLogID
14898
+ * * Display Name: Communication Log ID
14899
+ * * SQL Data Type: uniqueidentifier
14900
+ * * Related Entity/Foreign Key: MJ: Communication Logs (vwCommunicationLogs.ID)
14901
+ * * Description: The message that triggered the block (one-click unsubscribe, bounce, complaint). Also identifies the sender for sender-scoped blocks.`),
14902
+ CommunicationSuppressionPolicyID: z.string().nullable().describe(`
14903
+ * * Field Name: CommunicationSuppressionPolicyID
14904
+ * * Display Name: Communication Suppression Policy ID
14905
+ * * SQL Data Type: uniqueidentifier
14906
+ * * Related Entity/Foreign Key: MJ: Communication Suppression Policies (vwCommunicationSuppressionPolicies.ID)
14907
+ * * Description: Suppression policy that created the block. Required when Reason is Policy.`),
14908
+ IPAddress: z.string().nullable().describe(`
14909
+ * * Field Name: IPAddress
14910
+ * * Display Name: IP Address
14911
+ * * SQL Data Type: nvarchar(45)
14912
+ * * Description: IP address of the request that created the block.`),
14913
+ UserAgent: z.string().nullable().describe(`
14914
+ * * Field Name: UserAgent
14915
+ * * Display Name: User Agent
14916
+ * * SQL Data Type: nvarchar(1000)
14917
+ * * Description: User agent of the request that created the block.`),
14918
+ Notes: z.string().nullable().describe(`
14919
+ * * Field Name: Notes
14920
+ * * Display Name: Notes
14921
+ * * SQL Data Type: nvarchar(MAX)
14922
+ * * Description: Free-text notes, for example why an admin added the block.`),
14923
+ CreatedByUserID: z.string().nullable().describe(`
14924
+ * * Field Name: CreatedByUserID
14925
+ * * Display Name: Created By User ID
14926
+ * * SQL Data Type: uniqueidentifier
14927
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
14928
+ * * Description: MJ user who created the block (admin or API). NULL for provider- or recipient-originated blocks.`),
14929
+ __mj_CreatedAt: z.date().describe(`
14930
+ * * Field Name: __mj_CreatedAt
14931
+ * * Display Name: Created At
14932
+ * * SQL Data Type: datetimeoffset
14933
+ * * Default Value: getutcdate()`),
14934
+ __mj_UpdatedAt: z.date().describe(`
14935
+ * * Field Name: __mj_UpdatedAt
14936
+ * * Display Name: Updated At
14937
+ * * SQL Data Type: datetimeoffset
14938
+ * * Default Value: getutcdate()`),
14939
+ Entity: z.string().nullable().describe(`
14940
+ * * Field Name: Entity
14941
+ * * Display Name: Entity
14942
+ * * SQL Data Type: nvarchar(255)`),
14943
+ CommunicationSender: z.string().nullable().describe(`
14944
+ * * Field Name: CommunicationSender
14945
+ * * Display Name: Communication Sender
14946
+ * * SQL Data Type: nvarchar(200)`),
14947
+ CommunicationPreference: z.string().nullable().describe(`
14948
+ * * Field Name: CommunicationPreference
14949
+ * * Display Name: Communication Preference
14950
+ * * SQL Data Type: nvarchar(200)`),
14951
+ BaseMessageType: z.string().nullable().describe(`
14952
+ * * Field Name: BaseMessageType
14953
+ * * Display Name: Base Message Type
14954
+ * * SQL Data Type: nvarchar(100)`),
14955
+ RevokedByUser: z.string().nullable().describe(`
14956
+ * * Field Name: RevokedByUser
14957
+ * * Display Name: Revoked By User
14958
+ * * SQL Data Type: nvarchar(100)`),
14959
+ CommunicationLog: z.date().nullable().describe(`
14960
+ * * Field Name: CommunicationLog
14961
+ * * Display Name: Communication Log
14962
+ * * SQL Data Type: datetimeoffset`),
14963
+ CommunicationSuppressionPolicy: z.string().nullable().describe(`
14964
+ * * Field Name: CommunicationSuppressionPolicy
14965
+ * * Display Name: Communication Suppression Policy
14966
+ * * SQL Data Type: nvarchar(200)`),
14967
+ CreatedByUser: z.string().nullable().describe(`
14968
+ * * Field Name: CreatedByUser
14969
+ * * Display Name: Created By User
14970
+ * * SQL Data Type: nvarchar(100)`),
14971
+ });
12658
14972
  /**
12659
14973
  * zod schema definition for the entity MJ: Companies
12660
14974
  */
@@ -17034,6 +19348,12 @@ export const MJConversationSchema = z.object({
17034
19348
  * * Related Entity/Foreign Key: MJ: Conversation Types (vwConversationTypes.ID)
17035
19349
  * * Default Value: 7F81FF57-C5A8-464D-B3B4-35A4FCF10717
17036
19350
  * * Description: Foreign key to ConversationType identifying the kind of conversation (defaults to Chat). CodeGen exposes the joined ConversationType.Name as the virtual Type field.`),
19351
+ ParentID: z.string().nullable().describe(`
19352
+ * * Field Name: ParentID
19353
+ * * Display Name: Parent ID
19354
+ * * SQL Data Type: uniqueidentifier
19355
+ * * Related Entity/Foreign Key: MJ: Conversations (vwConversations.ID)
19356
+ * * Description: Optional parent Conversation ID for structural hierarchy (such as private side conversations anchored to a parent conversation). Strictly structural and never grants implicit read or write access to parent, child, or sibling conversations.`),
17037
19357
  User: z.string().nullable().describe(`
17038
19358
  * * Field Name: User
17039
19359
  * * Display Name: User
@@ -17082,6 +19402,30 @@ export const MJConversationSchema = z.object({
17082
19402
  * * Field Name: Type
17083
19403
  * * Display Name: Type
17084
19404
  * * SQL Data Type: nvarchar(100)`),
19405
+ Parent: z.string().nullable().describe(`
19406
+ * * Field Name: Parent
19407
+ * * Display Name: Parent
19408
+ * * SQL Data Type: nvarchar(255)`),
19409
+ RootParentID: z.string().nullable().describe(`
19410
+ * * Field Name: RootParentID
19411
+ * * Display Name: Root Parent ID
19412
+ * * SQL Data Type: uniqueidentifier`),
19413
+ ParentIDDepth: z.number().nullable().describe(`
19414
+ * * Field Name: ParentIDDepth
19415
+ * * Display Name: Parent ID Depth
19416
+ * * SQL Data Type: int`),
19417
+ ParentIDPath: z.string().nullable().describe(`
19418
+ * * Field Name: ParentIDPath
19419
+ * * Display Name: Parent ID Path
19420
+ * * SQL Data Type: nvarchar(MAX)`),
19421
+ ParentIDIsLeaf: z.boolean().nullable().describe(`
19422
+ * * Field Name: ParentIDIsLeaf
19423
+ * * Display Name: Parent ID Is Leaf
19424
+ * * SQL Data Type: bit`),
19425
+ ParentIDChildCount: z.number().nullable().describe(`
19426
+ * * Field Name: ParentIDChildCount
19427
+ * * Display Name: Parent ID Child Count
19428
+ * * SQL Data Type: int`),
17085
19429
  });
17086
19430
  /**
17087
19431
  * zod schema definition for the entity MJ: Countries
@@ -20561,6 +22905,12 @@ export const MJEntityCommunicationMessageTypeSchema = z.object({
20561
22905
  * * Display Name: __mj _Updated At
20562
22906
  * * SQL Data Type: datetimeoffset
20563
22907
  * * Default Value: getutcdate()`),
22908
+ CommunicationPrincipalID: z.string().nullable().describe(`
22909
+ * * Field Name: CommunicationPrincipalID
22910
+ * * Display Name: Communication Principal ID
22911
+ * * SQL Data Type: uniqueidentifier
22912
+ * * Related Entity/Foreign Key: MJ: Communication Principals (vwCommunicationPrincipals.ID)
22913
+ * * Description: The principal this channel mapping belongs to. NULL for rows created before Communications V2; the engine falls back to matching EntityID.`),
20564
22914
  Entity: z.string().nullable().describe(`
20565
22915
  * * Field Name: Entity
20566
22916
  * * Display Name: Entity
@@ -20569,6 +22919,10 @@ export const MJEntityCommunicationMessageTypeSchema = z.object({
20569
22919
  * * Field Name: BaseMessageType
20570
22920
  * * Display Name: Base Message Type
20571
22921
  * * SQL Data Type: nvarchar(100)`),
22922
+ CommunicationPrincipal: z.string().nullable().describe(`
22923
+ * * Field Name: CommunicationPrincipal
22924
+ * * Display Name: Communication Principal
22925
+ * * SQL Data Type: nvarchar(100)`),
20572
22926
  });
20573
22927
  /**
20574
22928
  * zod schema definition for the entity MJ: Entity Document Runs
@@ -23455,7 +25809,7 @@ export const MJFeatureValueSchema = z.object({
23455
25809
  * * SQL Data Type: uniqueidentifier
23456
25810
  * * Default Value: newsequentialid()
23457
25811
  * * Description: Unique identifier for this feature value history record.`),
23458
- RecordProcessID: z.string().describe(`
25812
+ RecordProcessID: z.string().nullable().describe(`
23459
25813
  * * Field Name: RecordProcessID
23460
25814
  * * Display Name: Record Process
23461
25815
  * * SQL Data Type: uniqueidentifier
@@ -23595,7 +25949,7 @@ export const MJFeatureValueSchema = z.object({
23595
25949
  * * Display Name: Value Key Hash
23596
25950
  * * SQL Data Type: nvarchar(64)
23597
25951
  * * Description: SHA-256 of the canonical FeatureValueKey (entity, record, feature, pipeline version, prompt version hash, AI model, parameters hash, input hash, source). Unique per pipeline: re-computing the same key updates the row instead of inserting a duplicate.`),
23598
- Source: z.union([z.literal('Human'), z.literal('Pipeline')]).describe(`
25952
+ Source: z.union([z.literal('Human'), z.literal('Model'), z.literal('Pipeline')]).describe(`
23599
25953
  * * Field Name: Source
23600
25954
  * * Display Name: Source
23601
25955
  * * SQL Data Type: nvarchar(20)
@@ -23603,6 +25957,7 @@ export const MJFeatureValueSchema = z.object({
23603
25957
  * * Value List Type: List
23604
25958
  * * Possible Values
23605
25959
  * * Human
25960
+ * * Model
23606
25961
  * * Pipeline
23607
25962
  * * Description: Who produced the value: Pipeline (computed by the Feature Pipeline) or Human (entered by a person, which write-back leaves in place).`),
23608
25963
  EffectiveAsOf: z.date().nullable().describe(`
@@ -23631,6 +25986,23 @@ export const MJFeatureValueSchema = z.object({
23631
25986
  * * SQL Data Type: uniqueidentifier
23632
25987
  * * Related Entity/Foreign Key: MJ: ML Models (vwMLModels.ID)
23633
25988
  * * Description: The MJ: ML Models record that scored this value, for values written by an ML Model record process (the champion's audit row or a shadow challenger's row). NULL for values from AI prompts, which record their model in AIModelID.`),
25989
+ MLModelScoringBindingID: z.string().nullable().describe(`
25990
+ * * Field Name: MLModelScoringBindingID
25991
+ * * Display Name: ML Model Scoring Binding
25992
+ * * SQL Data Type: uniqueidentifier
25993
+ * * Related Entity/Foreign Key: MJ: ML Model Scoring Bindings (vwMLModelScoringBindings.ID)
25994
+ * * Description: The scoring binding whose prediction this is; set on every Model row and on a person's value entered on a binding.`),
25995
+ MLScoringRunID: z.string().nullable().describe(`
25996
+ * * Field Name: MLScoringRunID
25997
+ * * Display Name: ML Scoring Run
25998
+ * * SQL Data Type: uniqueidentifier
25999
+ * * Related Entity/Foreign Key: MJ: ML Scoring Runs (vwMLScoringRuns.ID)
26000
+ * * Description: The scoring run that wrote this Model row.`),
26001
+ InTraining: z.boolean().nullable().describe(`
26002
+ * * Field Name: InTraining
26003
+ * * Display Name: In Training
26004
+ * * SQL Data Type: bit
26005
+ * * Description: Model rows: true when the record was in the model's training snapshot, so its score is optimistic.`),
23634
26006
  RecordProcess: z.string().nullable().describe(`
23635
26007
  * * Field Name: RecordProcess
23636
26008
  * * Display Name: Record Process
@@ -23655,6 +26027,10 @@ export const MJFeatureValueSchema = z.object({
23655
26027
  * * Field Name: AIModel
23656
26028
  * * Display Name: AI Model Details
23657
26029
  * * SQL Data Type: nvarchar(50)`),
26030
+ MLModelScoringBinding: z.string().nullable().describe(`
26031
+ * * Field Name: MLModelScoringBinding
26032
+ * * Display Name: ML Model Scoring Binding
26033
+ * * SQL Data Type: nvarchar(255)`),
23658
26034
  });
23659
26035
  /**
23660
26036
  * zod schema definition for the entity MJ: Field Suggestions
@@ -23842,6 +26218,11 @@ export const MJFieldSuggestionSchema = z.object({
23842
26218
  * * Display Name: Type
23843
26219
  * * SQL Data Type: uniqueidentifier
23844
26220
  * * Related Entity/Foreign Key: MJ: Conversation Types (vwConversationTypes.ID)`),
26221
+ ParentID: z.string().nullable().describe(`
26222
+ * * Field Name: ParentID
26223
+ * * Display Name: Parent ID
26224
+ * * SQL Data Type: uniqueidentifier
26225
+ * * Related Entity/Foreign Key: MJ: Conversations (vwConversations.ID)`),
23845
26226
  AIPromptRun: z.string().nullable().describe(`
23846
26227
  * * Field Name: AIPromptRun
23847
26228
  * * Display Name: AI Prompt Run Details
@@ -24626,6 +27007,16 @@ export const MJGraphConceptSchema = z.object({
24626
27007
  * * Display Name: Updated At
24627
27008
  * * SQL Data Type: datetimeoffset
24628
27009
  * * Default Value: getutcdate()`),
27010
+ Origin: z.union([z.literal('Declared'), z.literal('Inferred')]).describe(`
27011
+ * * Field Name: Origin
27012
+ * * Display Name: Origin
27013
+ * * SQL Data Type: nvarchar(20)
27014
+ * * Default Value: Declared
27015
+ * * Value List Type: List
27016
+ * * Possible Values
27017
+ * * Declared
27018
+ * * Inferred
27019
+ * * Description: How the concept came to exist. Declared: authored by a person or seeded; visible to anyone who can read concepts. Inferred: synthesized by the Content Pipeline from document chunks; visible only to someone who can read its sources (SourcedFrom edges), unless it is Approved in a Canon graph.`),
24629
27020
  Graph: z.string().nullable().describe(`
24630
27021
  * * Field Name: Graph
24631
27022
  * * Display Name: Graph
@@ -24977,6 +27368,38 @@ export const MJGraphTypeSchema = z.object({
24977
27368
  * * Display Name: Updated At
24978
27369
  * * SQL Data Type: datetimeoffset
24979
27370
  * * Default Value: getutcdate()`),
27371
+ DefaultAuthorityTierID: z.string().nullable().describe(`
27372
+ * * Field Name: DefaultAuthorityTierID
27373
+ * * Display Name: Default Authority Tier ID
27374
+ * * SQL Data Type: uniqueidentifier
27375
+ * * Related Entity/Foreign Key: MJ: Graph Authority Tiers (vwGraphAuthorityTiers.ID)
27376
+ * * Description: Authority tier given to content sources that feed graphs of this type and name no tier of their own. NULL leaves such sources unranked, below every configured tier.`),
27377
+ DefaultConceptTaxonomyMode: z.union([z.literal('Auto Grow'), z.literal('Constrained'), z.literal('Propose Only')]).describe(`
27378
+ * * Field Name: DefaultConceptTaxonomyMode
27379
+ * * Display Name: Default Concept Taxonomy Mode
27380
+ * * SQL Data Type: nvarchar(30)
27381
+ * * Default Value: Auto Grow
27382
+ * * Value List Type: List
27383
+ * * Possible Values
27384
+ * * Auto Grow
27385
+ * * Constrained
27386
+ * * Propose Only
27387
+ * * Description: Concept taxonomy mode used when a content source feeding a graph of this type names none: Constrained links only to existing concepts, Propose Only creates new concepts and edges as Proposed for steward review, Auto Grow creates them as Approved.`),
27388
+ DefaultGroundingMode: z.union([z.literal('Full Canon'), z.literal('None'), z.literal('Schema and Queries')]).describe(`
27389
+ * * Field Name: DefaultGroundingMode
27390
+ * * Display Name: Default Grounding Mode
27391
+ * * SQL Data Type: nvarchar(30)
27392
+ * * Default Value: None
27393
+ * * Value List Type: List
27394
+ * * Possible Values
27395
+ * * Full Canon
27396
+ * * None
27397
+ * * Schema and Queries
27398
+ * * Description: Grounding depth used when a content source feeding a graph of this type names none: None extracts document concepts only, Schema and Queries also links concepts to entities, alternate base views and queries, Full Canon additionally links actions, skills and workflows.`),
27399
+ DefaultAuthorityTier: z.string().nullable().describe(`
27400
+ * * Field Name: DefaultAuthorityTier
27401
+ * * Display Name: Default Authority Tier
27402
+ * * SQL Data Type: nvarchar(100)`),
24980
27403
  });
24981
27404
  /**
24982
27405
  * zod schema definition for the entity MJ: Graphs
@@ -26213,6 +28636,111 @@ export const MJInteractionSchema = z.object({
26213
28636
  * * Display Name: Phone Number
26214
28637
  * * SQL Data Type: nvarchar(20)`),
26215
28638
  });
28639
+ /**
28640
+ * zod schema definition for the entity MJ: Jurisdiction Members
28641
+ */
28642
+ export const MJJurisdictionMemberSchema = z.object({
28643
+ ID: z.string().describe(`
28644
+ * * Field Name: ID
28645
+ * * Display Name: ID
28646
+ * * SQL Data Type: uniqueidentifier
28647
+ * * Default Value: newsequentialid()`),
28648
+ GroupJurisdictionID: z.string().describe(`
28649
+ * * Field Name: GroupJurisdictionID
28650
+ * * Display Name: Group Jurisdiction ID
28651
+ * * SQL Data Type: uniqueidentifier
28652
+ * * Related Entity/Foreign Key: MJ: Jurisdictions (vwJurisdictions.ID)
28653
+ * * Description: The containing jurisdiction, for example EU or US.`),
28654
+ MemberJurisdictionID: z.string().describe(`
28655
+ * * Field Name: MemberJurisdictionID
28656
+ * * Display Name: Member Jurisdiction ID
28657
+ * * SQL Data Type: uniqueidentifier
28658
+ * * Related Entity/Foreign Key: MJ: Jurisdictions (vwJurisdictions.ID)
28659
+ * * Description: The contained jurisdiction, for example FR or US-CA.`),
28660
+ __mj_CreatedAt: z.date().describe(`
28661
+ * * Field Name: __mj_CreatedAt
28662
+ * * Display Name: Created At
28663
+ * * SQL Data Type: datetimeoffset
28664
+ * * Default Value: getutcdate()`),
28665
+ __mj_UpdatedAt: z.date().describe(`
28666
+ * * Field Name: __mj_UpdatedAt
28667
+ * * Display Name: Updated At
28668
+ * * SQL Data Type: datetimeoffset
28669
+ * * Default Value: getutcdate()`),
28670
+ GroupJurisdiction: z.string().nullable().describe(`
28671
+ * * Field Name: GroupJurisdiction
28672
+ * * Display Name: Group Jurisdiction
28673
+ * * SQL Data Type: nvarchar(200)`),
28674
+ MemberJurisdiction: z.string().nullable().describe(`
28675
+ * * Field Name: MemberJurisdiction
28676
+ * * Display Name: Member Jurisdiction
28677
+ * * SQL Data Type: nvarchar(200)`),
28678
+ });
28679
+ /**
28680
+ * zod schema definition for the entity MJ: Jurisdictions
28681
+ */
28682
+ export const MJJurisdictionSchema = z.object({
28683
+ ID: z.string().describe(`
28684
+ * * Field Name: ID
28685
+ * * Display Name: ID
28686
+ * * SQL Data Type: uniqueidentifier
28687
+ * * Default Value: newsequentialid()`),
28688
+ Code: z.string().describe(`
28689
+ * * Field Name: Code
28690
+ * * Display Name: Code
28691
+ * * SQL Data Type: nvarchar(20)
28692
+ * * Description: Unique code: ISO 3166-1 alpha-2 for countries (US, FR), ISO 3166-2 for subdivisions (US-CA), or a short group code (EU, EEA).`),
28693
+ Name: z.string().describe(`
28694
+ * * Field Name: Name
28695
+ * * Display Name: Name
28696
+ * * SQL Data Type: nvarchar(200)
28697
+ * * Description: Display name, for example France, California or European Union.`),
28698
+ Description: z.string().nullable().describe(`
28699
+ * * Field Name: Description
28700
+ * * Display Name: Description
28701
+ * * SQL Data Type: nvarchar(MAX)
28702
+ * * Description: Notes on the jurisdiction and what it covers.`),
28703
+ Type: z.union([z.literal('Country'), z.literal('Group'), z.literal('Subdivision')]).describe(`
28704
+ * * Field Name: Type
28705
+ * * Display Name: Type
28706
+ * * SQL Data Type: nvarchar(20)
28707
+ * * Value List Type: List
28708
+ * * Possible Values
28709
+ * * Country
28710
+ * * Group
28711
+ * * Subdivision
28712
+ * * Description: Country, Subdivision or Group. Groups contain other jurisdictions through Jurisdiction Members.`),
28713
+ CountryID: z.string().nullable().describe(`
28714
+ * * Field Name: CountryID
28715
+ * * Display Name: Country ID
28716
+ * * SQL Data Type: uniqueidentifier
28717
+ * * Related Entity/Foreign Key: MJ: Countries (vwCountries.ID)
28718
+ * * Description: For Country and Subdivision jurisdictions, the matching row in MJ: Countries.`),
28719
+ Status: z.union([z.literal('Active'), z.literal('Disabled')]).describe(`
28720
+ * * Field Name: Status
28721
+ * * Display Name: Status
28722
+ * * SQL Data Type: nvarchar(20)
28723
+ * * Default Value: Active
28724
+ * * Value List Type: List
28725
+ * * Possible Values
28726
+ * * Active
28727
+ * * Disabled
28728
+ * * Description: Active jurisdictions are used in resolution; Disabled ones are ignored.`),
28729
+ __mj_CreatedAt: z.date().describe(`
28730
+ * * Field Name: __mj_CreatedAt
28731
+ * * Display Name: Created At
28732
+ * * SQL Data Type: datetimeoffset
28733
+ * * Default Value: getutcdate()`),
28734
+ __mj_UpdatedAt: z.date().describe(`
28735
+ * * Field Name: __mj_UpdatedAt
28736
+ * * Display Name: Updated At
28737
+ * * SQL Data Type: datetimeoffset
28738
+ * * Default Value: getutcdate()`),
28739
+ Country: z.string().nullable().describe(`
28740
+ * * Field Name: Country
28741
+ * * Display Name: Country
28742
+ * * SQL Data Type: nvarchar(200)`),
28743
+ });
26216
28744
  /**
26217
28745
  * zod schema definition for the entity MJ: Knowledge Hub Saved Searches
26218
28746
  */
@@ -26270,6 +28798,106 @@ export const MJKnowledgeHubSavedSearchSchema = z.object({
26270
28798
  * * Display Name: User Name
26271
28799
  * * SQL Data Type: nvarchar(100)`),
26272
28800
  });
28801
+ /**
28802
+ * zod schema definition for the entity MJ: Latest Feature Values
28803
+ */
28804
+ export const MJvwLatestFeatureValuesSchema = z.object({
28805
+ ID: z.string().describe(`
28806
+ * * Field Name: ID
28807
+ * * Display Name: ID
28808
+ * * SQL Data Type: uniqueidentifier
28809
+ * * Description: Unique identifier for this feature value record, matching the source FeatureValue.ID.`),
28810
+ EntityID: z.string().describe(`
28811
+ * * Field Name: EntityID
28812
+ * * Display Name: Entity ID
28813
+ * * SQL Data Type: uniqueidentifier
28814
+ * * Description: The entity ID of the record this feature was computed for.`),
28815
+ RecordID: z.string().describe(`
28816
+ * * Field Name: RecordID
28817
+ * * Display Name: Record ID
28818
+ * * SQL Data Type: nvarchar(900)
28819
+ * * Description: Serialized primary key of the record this feature value belongs to.`),
28820
+ FeatureName: z.string().describe(`
28821
+ * * Field Name: FeatureName
28822
+ * * Display Name: Feature Name
28823
+ * * SQL Data Type: nvarchar(255)
28824
+ * * Description: Name of the feature.`),
28825
+ Source: z.string().describe(`
28826
+ * * Field Name: Source
28827
+ * * Display Name: Source
28828
+ * * SQL Data Type: nvarchar(20)
28829
+ * * Description: Who produced the value (e.g., Pipeline, Human, Model).`),
28830
+ Role: z.string().describe(`
28831
+ * * Field Name: Role
28832
+ * * Display Name: Role
28833
+ * * SQL Data Type: nvarchar(20)
28834
+ * * Description: Role of the feature value (e.g., Champion).`),
28835
+ EffectiveAsOf: z.date().nullable().describe(`
28836
+ * * Field Name: EffectiveAsOf
28837
+ * * Display Name: Effective As Of
28838
+ * * SQL Data Type: datetimeoffset
28839
+ * * Description: Timestamp from which this value is considered effective for the feature.`),
28840
+ ComputedAt: z.date().describe(`
28841
+ * * Field Name: ComputedAt
28842
+ * * Display Name: Computed At
28843
+ * * SQL Data Type: datetimeoffset
28844
+ * * Description: Timestamp when this feature value was computed.`),
28845
+ MLModelScoringBindingID: z.string().nullable().describe(`
28846
+ * * Field Name: MLModelScoringBindingID
28847
+ * * Display Name: ML Model Scoring Binding ID
28848
+ * * SQL Data Type: uniqueidentifier
28849
+ * * Description: Identifier of the scoring binding whose prediction this value represents.`),
28850
+ MLModelID: z.string().nullable().describe(`
28851
+ * * Field Name: MLModelID
28852
+ * * Display Name: ML Model ID
28853
+ * * SQL Data Type: uniqueidentifier
28854
+ * * Description: Identifier of the ML model that scored this value.`),
28855
+ MLScoringRunID: z.string().nullable().describe(`
28856
+ * * Field Name: MLScoringRunID
28857
+ * * Display Name: ML Scoring Run ID
28858
+ * * SQL Data Type: uniqueidentifier
28859
+ * * Description: Identifier of the ML scoring run that computed this value.`),
28860
+ InTraining: z.boolean().nullable().describe(`
28861
+ * * Field Name: InTraining
28862
+ * * Display Name: In Training
28863
+ * * SQL Data Type: bit
28864
+ * * Description: Indicates whether this record was included in the model's training snapshot.`),
28865
+ RecordProcessID: z.string().nullable().describe(`
28866
+ * * Field Name: RecordProcessID
28867
+ * * Display Name: Record Process ID
28868
+ * * SQL Data Type: uniqueidentifier
28869
+ * * Description: Identifier of the Record Process (Feature Pipeline) that computed this feature value.`),
28870
+ ValueText: z.string().nullable().describe(`
28871
+ * * Field Name: ValueText
28872
+ * * Display Name: Value (Text)
28873
+ * * SQL Data Type: nvarchar(MAX)
28874
+ * * Description: Computed feature value as text, for textual or categorical features.`),
28875
+ ValueNumeric: z.number().nullable().describe(`
28876
+ * * Field Name: ValueNumeric
28877
+ * * Display Name: Value (Numeric)
28878
+ * * SQL Data Type: float(53)
28879
+ * * Description: Computed feature value as a floating-point numeric score or metric.`),
28880
+ ValueDate: z.date().nullable().describe(`
28881
+ * * Field Name: ValueDate
28882
+ * * Display Name: Value (Date)
28883
+ * * SQL Data Type: datetimeoffset
28884
+ * * Description: Computed feature value formatted as a date/time timestamp.`),
28885
+ ValueBoolean: z.boolean().nullable().describe(`
28886
+ * * Field Name: ValueBoolean
28887
+ * * Display Name: Value (Boolean)
28888
+ * * SQL Data Type: bit
28889
+ * * Description: Computed feature value as a boolean true/false flag.`),
28890
+ ValueJSON: z.string().nullable().describe(`
28891
+ * * Field Name: ValueJSON
28892
+ * * Display Name: Value (JSON)
28893
+ * * SQL Data Type: nvarchar(MAX)
28894
+ * * Description: Computed feature value as structured JSON data.`),
28895
+ Confidence: z.number().nullable().describe(`
28896
+ * * Field Name: Confidence
28897
+ * * Display Name: Confidence
28898
+ * * SQL Data Type: float(53)
28899
+ * * Description: Optional confidence score associated with this computed feature value.`),
28900
+ });
26273
28901
  /**
26274
28902
  * zod schema definition for the entity MJ: Libraries
26275
28903
  */
@@ -27729,20 +30357,151 @@ export const MJMLEvaluationProtocolSchema = z.object({
27729
30357
  * * SQL Data Type: nvarchar(255)`),
27730
30358
  });
27731
30359
  /**
27732
- * zod schema definition for the entity MJ: ML Model Scoring Bindings
30360
+ * zod schema definition for the entity MJ: ML Model Publish Records
27733
30361
  */
27734
- export const MJMLModelScoringBindingSchema = z.object({
30362
+ export const MJMLModelPublishRecordSchema = z.object({
27735
30363
  ID: z.string().describe(`
27736
30364
  * * Field Name: ID
27737
30365
  * * Display Name: ID
27738
30366
  * * SQL Data Type: uniqueidentifier
27739
30367
  * * Default Value: newsequentialid()`),
27740
- MLModelID: z.string().describe(`
27741
- * * Field Name: MLModelID
27742
- * * Display Name: ML Model ID
30368
+ ModelID: z.string().nullable().describe(`
30369
+ * * Field Name: ModelID
30370
+ * * Display Name: Model
30371
+ * * SQL Data Type: uniqueidentifier
30372
+ * * Related Entity/Foreign Key: MJ: ML Models (vwMLModels.ID)
30373
+ * * Description: The model the record is about. NULL only on a run-level refusal: a training run whose outcome produced no model row.`),
30374
+ TrainingRunID: z.string().nullable().describe(`
30375
+ * * Field Name: TrainingRunID
30376
+ * * Display Name: Training Run
30377
+ * * SQL Data Type: uniqueidentifier
30378
+ * * Related Entity/Foreign Key: MJ: ML Training Runs (vwMLTrainingRuns.ID)
30379
+ * * Description: The training run the record is about; the idempotency key of a publish and of a run-level refusal.`),
30380
+ Kind: z.union([z.literal('publish'), z.literal('refusal'), z.literal('sign-off')]).describe(`
30381
+ * * Field Name: Kind
30382
+ * * Display Name: Kind
30383
+ * * SQL Data Type: nvarchar(20)
30384
+ * * Value List Type: List
30385
+ * * Possible Values
30386
+ * * publish
30387
+ * * refusal
30388
+ * * sign-off
30389
+ * * Description: sign-off (a person approved or rejected), publish (a status change was applied) or refusal (a publish attempt was refused).`),
30390
+ Purpose: z.union([z.literal('adopt'), z.literal('evaluate'), z.literal('publish'), z.literal('rollback')]).describe(`
30391
+ * * Field Name: Purpose
30392
+ * * Display Name: Purpose
30393
+ * * SQL Data Type: nvarchar(20)
30394
+ * * Value List Type: List
30395
+ * * Possible Values
30396
+ * * adopt
30397
+ * * evaluate
30398
+ * * publish
30399
+ * * rollback
30400
+ * * Description: publish, rollback (an archived model published again), evaluate (a run-level outcome only) or adopt (a pre-change Published model re-verified).`),
30401
+ ApproverKind: z.string().describe(`
30402
+ * * Field Name: ApproverKind
30403
+ * * Display Name: Approver Kind
30404
+ * * SQL Data Type: nvarchar(20)
30405
+ * * Description: automated-gate when no person approved the publish; user when a person published or the publish consumed that person's approving sign-off.`),
30406
+ UserID: z.string().nullable().describe(`
30407
+ * * Field Name: UserID
30408
+ * * Display Name: User
30409
+ * * SQL Data Type: uniqueidentifier
30410
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
30411
+ * * Description: The person who approved, when ApproverKind is user.`),
30412
+ Initiator: z.any().describe(`
30413
+ * * Field Name: Initiator
30414
+ * * Display Name: Initiator
30415
+ * * SQL Data Type: nvarchar(MAX)
30416
+ * * JSON Type: MJMLModelPublishRecordEntity_Actor
30417
+ * * Description: JSON Actor: who started the attempt (a user, an agent run, a Record Process run or a scheduled job run).`),
30418
+ RecordedAt: z.date().describe(`
30419
+ * * Field Name: RecordedAt
30420
+ * * Display Name: Recorded At
30421
+ * * SQL Data Type: datetimeoffset
30422
+ * * Default Value: sysdatetimeoffset()
30423
+ * * Description: When the record was written.`),
30424
+ Decision: z.string().nullable().describe(`
30425
+ * * Field Name: Decision
30426
+ * * Display Name: Decision
30427
+ * * SQL Data Type: nvarchar(10)
30428
+ * * Description: Sign-off rows only: approve or reject.`),
30429
+ Reason: z.string().nullable().describe(`
30430
+ * * Field Name: Reason
30431
+ * * Display Name: Reason
30432
+ * * SQL Data Type: nvarchar(MAX)
30433
+ * * Description: The reason in plain words; required when the record overrides flags.`),
30434
+ GateDecision: z.any().nullable().describe(`
30435
+ * * Field Name: GateDecision
30436
+ * * Display Name: Gate Decision
30437
+ * * SQL Data Type: nvarchar(MAX)
30438
+ * * JSON Type: MJMLModelPublishRecordEntity_GateDecision
30439
+ * * Description: JSON GateDecision as the gate re-derived it at the publish, kept as a copy for audit. Required on publish rows.`),
30440
+ Evidence: z.any().nullable().describe(`
30441
+ * * Field Name: Evidence
30442
+ * * Display Name: Evidence
30443
+ * * SQL Data Type: nvarchar(MAX)
30444
+ * * JSON Type: MJMLModelPublishRecordEntity_EvidenceSnapshot
30445
+ * * Description: JSON EvidenceSnapshot built by the server from stored rows at the moment of the sign-off or publish.`),
30446
+ EvidenceSha256: z.string().nullable().describe(`
30447
+ * * Field Name: EvidenceSha256
30448
+ * * Display Name: Evidence SHA-256
30449
+ * * SQL Data Type: char(64)
30450
+ * * Description: SHA-256 of the canonical Evidence JSON; a sign-off authorises a publish only while it equals a fresh recomputation.`),
30451
+ OverridesFlags: z.string().describe(`
30452
+ * * Field Name: OverridesFlags
30453
+ * * Display Name: Overrides Flags
30454
+ * * SQL Data Type: nvarchar(MAX)
30455
+ * * Default Value: []
30456
+ * * Description: JSON array of the leakage flags a sign-off acknowledges by name; empty on every other row.`),
30457
+ SignOffID: z.string().nullable().describe(`
30458
+ * * Field Name: SignOffID
30459
+ * * Display Name: Sign-Off
30460
+ * * SQL Data Type: uniqueidentifier
30461
+ * * Related Entity/Foreign Key: MJ: ML Model Publish Records (vwMLModelPublishRecords.ID)
30462
+ * * Description: Publish rows: the human sign-off this publish consumed, when one was required.`),
30463
+ ReplacesModelID: z.string().nullable().describe(`
30464
+ * * Field Name: ReplacesModelID
30465
+ * * Display Name: Replaces Model
27743
30466
  * * SQL Data Type: uniqueidentifier
27744
30467
  * * Related Entity/Foreign Key: MJ: ML Models (vwMLModels.ID)
27745
- * * Description: Foreign key to the MLModel that does the scoring`),
30468
+ * * Description: Publish rows: the model archived in the same transaction.`),
30469
+ Refusal: z.any().nullable().describe(`
30470
+ * * Field Name: Refusal
30471
+ * * Display Name: Refusal Details
30472
+ * * SQL Data Type: nvarchar(MAX)
30473
+ * * JSON Type: MJMLModelPublishRecordEntity_TransitionRefusal
30474
+ * * Description: Refusal rows: JSON TransitionRefusal, the reason the attempt was refused.`),
30475
+ Transient: z.boolean().describe(`
30476
+ * * Field Name: Transient
30477
+ * * Display Name: Transient
30478
+ * * SQL Data Type: bit
30479
+ * * Default Value: 0
30480
+ * * Description: Refusal rows: true when a retry may succeed.`),
30481
+ __mj_CreatedAt: z.date().describe(`
30482
+ * * Field Name: __mj_CreatedAt
30483
+ * * Display Name: Created At
30484
+ * * SQL Data Type: datetimeoffset
30485
+ * * Default Value: getutcdate()`),
30486
+ __mj_UpdatedAt: z.date().describe(`
30487
+ * * Field Name: __mj_UpdatedAt
30488
+ * * Display Name: Updated At
30489
+ * * SQL Data Type: datetimeoffset
30490
+ * * Default Value: getutcdate()`),
30491
+ User: z.string().nullable().describe(`
30492
+ * * Field Name: User
30493
+ * * Display Name: User Details
30494
+ * * SQL Data Type: nvarchar(100)`),
30495
+ });
30496
+ /**
30497
+ * zod schema definition for the entity MJ: ML Model Scoring Bindings
30498
+ */
30499
+ export const MJMLModelScoringBindingSchema = z.object({
30500
+ ID: z.string().describe(`
30501
+ * * Field Name: ID
30502
+ * * Display Name: ID
30503
+ * * SQL Data Type: uniqueidentifier
30504
+ * * Default Value: newsequentialid()`),
27746
30505
  RecordProcessID: z.string().nullable().describe(`
27747
30506
  * * Field Name: RecordProcessID
27748
30507
  * * Display Name: Record Process ID
@@ -27759,23 +30518,17 @@ export const MJMLModelScoringBindingSchema = z.object({
27759
30518
  * * Field Name: TargetColumn
27760
30519
  * * Display Name: Target Column
27761
30520
  * * SQL Data Type: nvarchar(255)
27762
- * * Description: Name of the column that receives the prediction (when scores are written back / materialized)`),
27763
- Mode: z.union([z.literal('Materialized'), z.literal('OnDemand'), z.literal('Scheduled')]).describe(`
30521
+ * * Description: Name of an existing column of the target entity that also receives the newest prediction; NULL stores the predictions as Feature Values only.`),
30522
+ Mode: z.union([z.literal('OnDemand'), z.literal('Scheduled')]).describe(`
27764
30523
  * * Field Name: Mode
27765
30524
  * * Display Name: Scoring Mode
27766
30525
  * * SQL Data Type: nvarchar(20)
27767
30526
  * * Default Value: OnDemand
27768
30527
  * * Value List Type: List
27769
30528
  * * Possible Values
27770
- * * Materialized
27771
30529
  * * OnDemand
27772
30530
  * * Scheduled
27773
- * * Description: Scoring mode: OnDemand, Scheduled, or Materialized`),
27774
- MaterializedResultID: z.string().nullable().describe(`
27775
- * * Field Name: MaterializedResultID
27776
- * * Display Name: Materialized Result ID
27777
- * * SQL Data Type: uniqueidentifier
27778
- * * Description: Soft reference to a MJ: Materialized Results row (PR #2770) when Mode=Materialized; not a FK until that table exists`),
30531
+ * * Description: Scoring mode: OnDemand or Scheduled.`),
27779
30532
  LastScoredAt: z.date().nullable().describe(`
27780
30533
  * * Field Name: LastScoredAt
27781
30534
  * * Display Name: Last Scored At
@@ -27796,6 +30549,43 @@ export const MJMLModelScoringBindingSchema = z.object({
27796
30549
  * * Display Name: Updated At
27797
30550
  * * SQL Data Type: datetimeoffset
27798
30551
  * * Default Value: getutcdate()`),
30552
+ MLTrainingPipelineID: z.string().describe(`
30553
+ * * Field Name: MLTrainingPipelineID
30554
+ * * Display Name: ML Training Pipeline
30555
+ * * SQL Data Type: uniqueidentifier
30556
+ * * Related Entity/Foreign Key: MJ: ML Training Pipelines (vwMLTrainingPipelines.ID)
30557
+ * * Description: The training pipeline whose Published model scores for this binding; publishing a new version needs no binding change.`),
30558
+ FeatureName: z.string().describe(`
30559
+ * * Field Name: FeatureName
30560
+ * * Display Name: Feature Name
30561
+ * * SQL Data Type: nvarchar(255)
30562
+ * * Description: The feature name the predictions are stored under, unique on the target entity.`),
30563
+ TargetColumnSource: z.string().nullable().describe(`
30564
+ * * Field Name: TargetColumnSource
30565
+ * * Display Name: Target Column Source
30566
+ * * SQL Data Type: nvarchar(255)
30567
+ * * Description: The result reference ($.Value, $.Class, $.AdverseProbability or $.Probabilities.<class>) the column copy writes into TargetColumn; required when TargetColumn is set.`),
30568
+ Status: z.union([z.literal('Active'), z.literal('Withdrawn')]).describe(`
30569
+ * * Field Name: Status
30570
+ * * Display Name: Status
30571
+ * * SQL Data Type: nvarchar(20)
30572
+ * * Default Value: Active
30573
+ * * Value List Type: List
30574
+ * * Possible Values
30575
+ * * Active
30576
+ * * Withdrawn
30577
+ * * Description: Active or Withdrawn. A withdrawn binding no longer scores, and the column copies it made are cleared; its Feature Values stay.`),
30578
+ ViewAuthorizationID: z.string().nullable().describe(`
30579
+ * * Field Name: ViewAuthorizationID
30580
+ * * Display Name: View Authorization
30581
+ * * SQL Data Type: uniqueidentifier
30582
+ * * Related Entity/Foreign Key: MJ: Authorizations (vwAuthorizations.ID)
30583
+ * * Description: The authorization a user must hold to see this binding's predictions; a binding with none is visible to no user.`),
30584
+ RetentionDays: z.number().nullable().describe(`
30585
+ * * Field Name: RetentionDays
30586
+ * * Display Name: Retention Days
30587
+ * * SQL Data Type: int
30588
+ * * Description: Days of prediction history kept; NULL keeps all of it.`),
27799
30589
  RecordProcess: z.string().nullable().describe(`
27800
30590
  * * Field Name: RecordProcess
27801
30591
  * * Display Name: Record Process
@@ -27804,6 +30594,14 @@ export const MJMLModelScoringBindingSchema = z.object({
27804
30594
  * * Field Name: TargetEntity
27805
30595
  * * Display Name: Target Entity
27806
30596
  * * SQL Data Type: nvarchar(255)`),
30597
+ MLTrainingPipeline: z.string().nullable().describe(`
30598
+ * * Field Name: MLTrainingPipeline
30599
+ * * Display Name: ML Training Pipeline Name
30600
+ * * SQL Data Type: nvarchar(255)`),
30601
+ ViewAuthorization: z.string().nullable().describe(`
30602
+ * * Field Name: ViewAuthorization
30603
+ * * Display Name: View Authorization Name
30604
+ * * SQL Data Type: nvarchar(100)`),
27807
30605
  });
27808
30606
  /**
27809
30607
  * zod schema definition for the entity MJ: ML Models
@@ -27897,7 +30695,7 @@ export const MJMLModelSchema = z.object({
27897
30695
  * * Display Name: Training Row Count
27898
30696
  * * SQL Data Type: int
27899
30697
  * * Description: Number of rows used to train the model`),
27900
- Status: z.union([z.literal('Archived'), z.literal('Draft'), z.literal('Published'), z.literal('Validated')]).describe(`
30698
+ Status: z.union([z.literal('Archived'), z.literal('Draft'), z.literal('KeepBaseline'), z.literal('Published'), z.literal('Unevaluated'), z.literal('Validated')]).describe(`
27901
30699
  * * Field Name: Status
27902
30700
  * * Display Name: Status
27903
30701
  * * SQL Data Type: nvarchar(20)
@@ -27906,7 +30704,9 @@ export const MJMLModelSchema = z.object({
27906
30704
  * * Possible Values
27907
30705
  * * Archived
27908
30706
  * * Draft
30707
+ * * KeepBaseline
27909
30708
  * * Published
30709
+ * * Unevaluated
27910
30710
  * * Validated
27911
30711
  * * Description: Lifecycle status: Draft, Validated, Published, or Archived`),
27912
30712
  __mj_CreatedAt: z.date().describe(`
@@ -27919,6 +30719,92 @@ export const MJMLModelSchema = z.object({
27919
30719
  * * Display Name: Updated At
27920
30720
  * * SQL Data Type: datetimeoffset
27921
30721
  * * Default Value: getutcdate()`),
30722
+ PredictionUnitID: z.string().nullable().describe(`
30723
+ * * Field Name: PredictionUnitID
30724
+ * * Display Name: Prediction Unit
30725
+ * * SQL Data Type: uniqueidentifier
30726
+ * * Related Entity/Foreign Key: MJ: ML Prediction Units (vwMLPredictionUnits.ID)
30727
+ * * Description: The Prediction Unit version the model was trained under (the exact version row).`),
30728
+ EvaluationProtocolID: z.string().nullable().describe(`
30729
+ * * Field Name: EvaluationProtocolID
30730
+ * * Display Name: Evaluation Protocol
30731
+ * * SQL Data Type: uniqueidentifier
30732
+ * * Related Entity/Foreign Key: MJ: ML Evaluation Protocols (vwMLEvaluationProtocols.ID)
30733
+ * * Description: The Evaluation Protocol version the model was graded under (the exact version row).`),
30734
+ TrainingSnapshotID: z.string().nullable().describe(`
30735
+ * * Field Name: TrainingSnapshotID
30736
+ * * Display Name: Training Snapshot
30737
+ * * SQL Data Type: uniqueidentifier
30738
+ * * Related Entity/Foreign Key: MJ: ML Training Snapshots (vwMLTrainingSnapshots.ID)
30739
+ * * Description: The Training Snapshot the model was trained on.`),
30740
+ TrainingRunID: z.string().nullable().describe(`
30741
+ * * Field Name: TrainingRunID
30742
+ * * Display Name: Training Run
30743
+ * * SQL Data Type: uniqueidentifier
30744
+ * * Related Entity/Foreign Key: MJ: ML Training Runs (vwMLTrainingRuns.ID)
30745
+ * * Description: The training run that produced the model.`),
30746
+ ArtifactSha256: z.string().nullable().describe(`
30747
+ * * Field Name: ArtifactSha256
30748
+ * * Display Name: Artifact SHA-256
30749
+ * * SQL Data Type: char(64)
30750
+ * * Description: SHA-256 of the shipped artifact's stored bytes; a load that hashes differently is refused.`),
30751
+ SnapshotHash: z.string().nullable().describe(`
30752
+ * * Field Name: SnapshotHash
30753
+ * * Display Name: Snapshot Hash
30754
+ * * SQL Data Type: char(64)
30755
+ * * Description: Content hash of the training snapshot, copied at registration.`),
30756
+ CodeVersion: z.any().nullable().describe(`
30757
+ * * Field Name: CodeVersion
30758
+ * * Display Name: Code Version
30759
+ * * SQL Data Type: nvarchar(MAX)
30760
+ * * JSON Type: MJMLModelEntity_CodeVersion
30761
+ * * Description: JSON CodeVersion of the training code: git commit, sidecar version, library versions, threads and seed.`),
30762
+ FeatureSchemaHash: z.string().nullable().describe(`
30763
+ * * Field Name: FeatureSchemaHash
30764
+ * * Display Name: Feature Schema Hash
30765
+ * * SQL Data Type: char(64)
30766
+ * * Description: Hash of the feature schema the model scores; a scoring request whose features hash differently is refused.`),
30767
+ OutputSemantics: z.any().nullable().describe(`
30768
+ * * Field Name: OutputSemantics
30769
+ * * Display Name: Output Semantics
30770
+ * * SQL Data Type: nvarchar(MAX)
30771
+ * * JSON Type: MJMLModelEntity_OutputSemantics
30772
+ * * Description: JSON {task}: what the model's output means (the task type and, for a classification, the adverse class).`),
30773
+ Delivery: z.any().nullable().describe(`
30774
+ * * Field Name: Delivery
30775
+ * * Display Name: Delivery
30776
+ * * SQL Data Type: nvarchar(MAX)
30777
+ * * JSON Type: MJMLModelEntity_RegisteredDeliveryView
30778
+ * * Description: JSON RegisteredDelivery: what the training run shipped and the gate decision it shipped under.`),
30779
+ StatusReason: z.string().nullable().describe(`
30780
+ * * Field Name: StatusReason
30781
+ * * Display Name: Status Reason
30782
+ * * SQL Data Type: nvarchar(MAX)
30783
+ * * Description: Why the model has its status, in plain words: a kept baseline, a demotion to Unevaluated, an archive or a withheld publish.`),
30784
+ ArtifactStatus: z.union([z.literal('hash-mismatch'), z.literal('legacy-local'), z.literal('missing'), z.literal('unverified'), z.literal('verified')]).describe(`
30785
+ * * Field Name: ArtifactStatus
30786
+ * * Display Name: Artifact Status
30787
+ * * SQL Data Type: nvarchar(20)
30788
+ * * Default Value: unverified
30789
+ * * Value List Type: List
30790
+ * * Possible Values
30791
+ * * hash-mismatch
30792
+ * * legacy-local
30793
+ * * missing
30794
+ * * unverified
30795
+ * * verified
30796
+ * * Description: Health of the stored artifact as last checked: unverified, verified, missing, hash-mismatch or legacy-local.`),
30797
+ ArtifactCheckedAt: z.date().nullable().describe(`
30798
+ * * Field Name: ArtifactCheckedAt
30799
+ * * Display Name: Artifact Checked At
30800
+ * * SQL Data Type: datetimeoffset
30801
+ * * Description: When ArtifactStatus was last checked.`),
30802
+ ServingWhileUnevaluated: z.boolean().describe(`
30803
+ * * Field Name: ServingWhileUnevaluated
30804
+ * * Display Name: Serving While Unevaluated
30805
+ * * SQL Data Type: bit
30806
+ * * Default Value: 0
30807
+ * * Description: True for a model that was Published before the lifecycle gate, demoted to Unevaluated and kept serving its pipeline until a model published through the gate replaces it. Never set by an entity save.`),
27922
30808
  Pipeline: z.string().nullable().describe(`
27923
30809
  * * Field Name: Pipeline
27924
30810
  * * Display Name: Pipeline
@@ -27931,6 +30817,243 @@ export const MJMLModelSchema = z.object({
27931
30817
  * * Field Name: ArtifactFile
27932
30818
  * * Display Name: Artifact File
27933
30819
  * * SQL Data Type: nvarchar(500)`),
30820
+ PredictionUnit: z.string().nullable().describe(`
30821
+ * * Field Name: PredictionUnit
30822
+ * * Display Name: Prediction Unit Name
30823
+ * * SQL Data Type: nvarchar(255)`),
30824
+ EvaluationProtocol: z.string().nullable().describe(`
30825
+ * * Field Name: EvaluationProtocol
30826
+ * * Display Name: Evaluation Protocol Name
30827
+ * * SQL Data Type: nvarchar(255)`),
30828
+ TrainingSnapshot: z.string().nullable().describe(`
30829
+ * * Field Name: TrainingSnapshot
30830
+ * * Display Name: Training Snapshot Name
30831
+ * * SQL Data Type: nvarchar(64)`),
30832
+ });
30833
+ /**
30834
+ * zod schema definition for the entity MJ: ML Monitoring Results
30835
+ */
30836
+ export const MJMLMonitoringResultSchema = z.object({
30837
+ ID: z.string().describe(`
30838
+ * * Field Name: ID
30839
+ * * Display Name: ID
30840
+ * * SQL Data Type: uniqueidentifier
30841
+ * * Default Value: newsequentialid()`),
30842
+ ModelID: z.string().describe(`
30843
+ * * Field Name: ModelID
30844
+ * * Display Name: Model
30845
+ * * SQL Data Type: uniqueidentifier
30846
+ * * Related Entity/Foreign Key: MJ: ML Models (vwMLModels.ID)
30847
+ * * Description: The model monitored.`),
30848
+ ScheduledJobRunID: z.string().nullable().describe(`
30849
+ * * Field Name: ScheduledJobRunID
30850
+ * * Display Name: Scheduled Job Run ID
30851
+ * * SQL Data Type: uniqueidentifier
30852
+ * * Related Entity/Foreign Key: MJ: Scheduled Job Runs (vwScheduledJobRuns.ID)
30853
+ * * Description: The monitoring job run that wrote the row; NULL for a run started from the UI or a test.`),
30854
+ Period: z.date().describe(`
30855
+ * * Field Name: Period
30856
+ * * Display Name: Period
30857
+ * * SQL Data Type: date
30858
+ * * Description: The first day of the period.`),
30859
+ PeriodGrain: z.union([z.literal('month'), z.literal('quarter'), z.literal('week'), z.literal('year')]).describe(`
30860
+ * * Field Name: PeriodGrain
30861
+ * * Display Name: Period Grain
30862
+ * * SQL Data Type: nvarchar(10)
30863
+ * * Value List Type: List
30864
+ * * Possible Values
30865
+ * * month
30866
+ * * quarter
30867
+ * * week
30868
+ * * year
30869
+ * * Description: week, month, quarter or year.`),
30870
+ State: z.union([z.literal('evaluated'), z.literal('failed'), z.literal('insufficient-rows'), z.literal('window-open')]).describe(`
30871
+ * * Field Name: State
30872
+ * * Display Name: State
30873
+ * * SQL Data Type: nvarchar(20)
30874
+ * * Value List Type: List
30875
+ * * Possible Values
30876
+ * * evaluated
30877
+ * * failed
30878
+ * * insufficient-rows
30879
+ * * window-open
30880
+ * * Description: window-open (outcomes not yet known), evaluated, insufficient-rows (fewer scored rows than the job's minimum, so the period is recorded and not judged) or failed.`),
30881
+ ScoredRows: z.number().describe(`
30882
+ * * Field Name: ScoredRows
30883
+ * * Display Name: Scored Rows
30884
+ * * SQL Data Type: int
30885
+ * * Default Value: 0
30886
+ * * Description: Predictions the model stored for the period.`),
30887
+ JoinedRows: z.number().describe(`
30888
+ * * Field Name: JoinedRows
30889
+ * * Display Name: Joined Rows
30890
+ * * SQL Data Type: int
30891
+ * * Default Value: 0
30892
+ * * Description: Predictions joined to a known outcome.`),
30893
+ ExcludedInTrainingRows: z.number().describe(`
30894
+ * * Field Name: ExcludedInTrainingRows
30895
+ * * Display Name: Excluded In Training Rows
30896
+ * * SQL Data Type: int
30897
+ * * Default Value: 0
30898
+ * * Description: Joined predictions left out because the record was in the model's training snapshot.`),
30899
+ PrimaryScore: z.any().nullable().describe(`
30900
+ * * Field Name: PrimaryScore
30901
+ * * Display Name: Primary Score
30902
+ * * SQL Data Type: nvarchar(MAX)
30903
+ * * JSON Type: MJMLMonitoringResultEntity_MetricWithInterval
30904
+ * * Description: JSON MetricWithInterval: the protocol's primary metric over the joined rows.`),
30905
+ PrimaryValue: z.number().nullable().describe(`
30906
+ * * Field Name: PrimaryValue
30907
+ * * Display Name: Primary Value
30908
+ * * SQL Data Type: float(53)
30909
+ * * Description: The primary metric's value, copied from PrimaryScore for queries and charts.`),
30910
+ PrimaryLower: z.number().nullable().describe(`
30911
+ * * Field Name: PrimaryLower
30912
+ * * Display Name: Primary Lower Bound
30913
+ * * SQL Data Type: float(53)
30914
+ * * Description: The primary metric's interval lower bound, copied from PrimaryScore.`),
30915
+ PrimaryUpper: z.number().nullable().describe(`
30916
+ * * Field Name: PrimaryUpper
30917
+ * * Display Name: Primary Upper Bound
30918
+ * * SQL Data Type: float(53)
30919
+ * * Description: The primary metric's interval upper bound, copied from PrimaryScore.`),
30920
+ TrackedMetrics: z.any().nullable().describe(`
30921
+ * * Field Name: TrackedMetrics
30922
+ * * Display Name: Tracked Metrics
30923
+ * * SQL Data Type: nvarchar(MAX)
30924
+ * * JSON Type: Array<MJMLMonitoringResultEntity_TrackedMetric>
30925
+ * * Description: JSON array of MetricWithInterval: the other tracked metrics (positive rate, log loss, RMSE and so on).`),
30926
+ Calibration: z.any().nullable().describe(`
30927
+ * * Field Name: Calibration
30928
+ * * Display Name: Calibration
30929
+ * * SQL Data Type: nvarchar(MAX)
30930
+ * * JSON Type: MJMLMonitoringResultEntity_CalibrationReport
30931
+ * * Description: JSON CalibrationReport over the joined rows.`),
30932
+ DriftLook: z.any().nullable().describe(`
30933
+ * * Field Name: DriftLook
30934
+ * * Display Name: Drift Look
30935
+ * * SQL Data Type: nvarchar(MAX)
30936
+ * * JSON Type: Array<MJMLMonitoringResultEntity_DriftLookEntry>
30937
+ * * Description: JSON per-input drift statistics of the period's look: z, empirical p, adjusted p, the look's threshold and index.`),
30938
+ DriftAlarms: z.any().describe(`
30939
+ * * Field Name: DriftAlarms
30940
+ * * Display Name: Drift Alarms
30941
+ * * SQL Data Type: nvarchar(MAX)
30942
+ * * Default Value: []
30943
+ * * JSON Type: Array<MJMLMonitoringResultEntity_DriftLookEntry>
30944
+ * * Description: JSON array of the inputs whose drift alarm fired.`),
30945
+ Parity: z.any().nullable().describe(`
30946
+ * * Field Name: Parity
30947
+ * * Display Name: Parity
30948
+ * * SQL Data Type: nvarchar(MAX)
30949
+ * * JSON Type: MJMLMonitoringResultEntity_MonitoringParity
30950
+ * * Description: JSON {sampled, maxAbsDifference, passed}: the period's scoring parity check.`),
30951
+ TriggersFired: z.any().describe(`
30952
+ * * Field Name: TriggersFired
30953
+ * * Display Name: Triggers Fired
30954
+ * * SQL Data Type: nvarchar(MAX)
30955
+ * * Default Value: []
30956
+ * * JSON Type: Array<MJMLMonitoringResultEntity_MonitoringTriggerFired>
30957
+ * * Description: JSON array of {kind, reason}: the retrain and rollback triggers that fired.`),
30958
+ ChallengerRunID: z.string().nullable().describe(`
30959
+ * * Field Name: ChallengerRunID
30960
+ * * Display Name: Challenger Run ID
30961
+ * * SQL Data Type: uniqueidentifier
30962
+ * * Related Entity/Foreign Key: MJ: ML Training Runs (vwMLTrainingRuns.ID)
30963
+ * * Description: The challenger training run a fired trigger started.`),
30964
+ ChallengerResult: z.any().nullable().describe(`
30965
+ * * Field Name: ChallengerResult
30966
+ * * Display Name: Challenger Result
30967
+ * * SQL Data Type: nvarchar(MAX)
30968
+ * * JSON Type: MJMLMonitoringResultEntity_MonitoringChallengerResult
30969
+ * * Description: JSON {sharedRowIds, comparison, outcome, publishRecordId}: how the challenger compared and whether it was published or withheld.`),
30970
+ RollbackCheck: z.any().nullable().describe(`
30971
+ * * Field Name: RollbackCheck
30972
+ * * Display Name: Rollback Check
30973
+ * * SQL Data Type: nvarchar(MAX)
30974
+ * * JSON Type: MJMLMonitoringResultEntity_MonitoringRollbackCheck
30975
+ * * Description: JSON {previousModelId, sharedRowIds, comparison, consecutive, fired or not-eligible with the reason}: the automated rollback check.`),
30976
+ ErrorMessage: z.string().nullable().describe(`
30977
+ * * Field Name: ErrorMessage
30978
+ * * Display Name: Error Message
30979
+ * * SQL Data Type: nvarchar(MAX)
30980
+ * * Description: Why the period failed, when State is failed.`),
30981
+ __mj_CreatedAt: z.date().describe(`
30982
+ * * Field Name: __mj_CreatedAt
30983
+ * * Display Name: Created At
30984
+ * * SQL Data Type: datetimeoffset
30985
+ * * Default Value: getutcdate()`),
30986
+ __mj_UpdatedAt: z.date().describe(`
30987
+ * * Field Name: __mj_UpdatedAt
30988
+ * * Display Name: Updated At
30989
+ * * SQL Data Type: datetimeoffset
30990
+ * * Default Value: getutcdate()`),
30991
+ ScheduledJobRun: z.string().nullable().describe(`
30992
+ * * Field Name: ScheduledJobRun
30993
+ * * Display Name: Scheduled Job Run
30994
+ * * SQL Data Type: nvarchar(200)`),
30995
+ });
30996
+ /**
30997
+ * zod schema definition for the entity MJ: ML Output Bindings
30998
+ */
30999
+ export const MJMLOutputBindingSchema = z.object({
31000
+ ID: z.string().describe(`
31001
+ * * Field Name: ID
31002
+ * * Display Name: ID
31003
+ * * SQL Data Type: uniqueidentifier
31004
+ * * Default Value: newsequentialid()`),
31005
+ ModelID: z.string().describe(`
31006
+ * * Field Name: ModelID
31007
+ * * Display Name: Model
31008
+ * * SQL Data Type: uniqueidentifier
31009
+ * * Related Entity/Foreign Key: MJ: ML Models (vwMLModels.ID)
31010
+ * * Description: The model whose output the surface shows.`),
31011
+ Surface: z.union([z.literal('at-risk-list'), z.literal('predictions-grid'), z.literal('record-panel'), z.literal('why-badge')]).describe(`
31012
+ * * Field Name: Surface
31013
+ * * Display Name: Surface
31014
+ * * SQL Data Type: nvarchar(30)
31015
+ * * Value List Type: List
31016
+ * * Possible Values
31017
+ * * at-risk-list
31018
+ * * predictions-grid
31019
+ * * record-panel
31020
+ * * why-badge
31021
+ * * Description: at-risk-list, why-badge, predictions-grid or record-panel.`),
31022
+ SortsBy: z.union([z.literal('adverse-probability-desc'), z.literal('none'), z.literal('score-asc'), z.literal('score-desc')]).describe(`
31023
+ * * Field Name: SortsBy
31024
+ * * Display Name: Sorts By
31025
+ * * SQL Data Type: nvarchar(30)
31026
+ * * Value List Type: List
31027
+ * * Possible Values
31028
+ * * adverse-probability-desc
31029
+ * * none
31030
+ * * score-asc
31031
+ * * score-desc
31032
+ * * Description: adverse-probability-desc, score-desc, score-asc or none.`),
31033
+ DriverDirectionRelativeTo: z.union([z.literal('adverse-class'), z.literal('raw-contribution')]).describe(`
31034
+ * * Field Name: DriverDirectionRelativeTo
31035
+ * * Display Name: Driver Direction Relative To
31036
+ * * SQL Data Type: nvarchar(20)
31037
+ * * Value List Type: List
31038
+ * * Possible Values
31039
+ * * adverse-class
31040
+ * * raw-contribution
31041
+ * * Description: adverse-class (a driver that raises the adverse outcome points up) or raw-contribution.`),
31042
+ Label: z.string().describe(`
31043
+ * * Field Name: Label
31044
+ * * Display Name: Label
31045
+ * * SQL Data Type: nvarchar(255)
31046
+ * * Description: The label the surface shows, naming the scored class.`),
31047
+ __mj_CreatedAt: z.date().describe(`
31048
+ * * Field Name: __mj_CreatedAt
31049
+ * * Display Name: Created At
31050
+ * * SQL Data Type: datetimeoffset
31051
+ * * Default Value: getutcdate()`),
31052
+ __mj_UpdatedAt: z.date().describe(`
31053
+ * * Field Name: __mj_UpdatedAt
31054
+ * * Display Name: Updated At
31055
+ * * SQL Data Type: datetimeoffset
31056
+ * * Default Value: getutcdate()`),
27934
31057
  });
27935
31058
  /**
27936
31059
  * zod schema definition for the entity MJ: ML Prediction Units
@@ -28043,6 +31166,209 @@ export const MJMLPredictionUnitSchema = z.object({
28043
31166
  * * Display Name: Lineage Root
28044
31167
  * * SQL Data Type: nvarchar(255)`),
28045
31168
  });
31169
+ /**
31170
+ * zod schema definition for the entity MJ: ML Scoring Runs
31171
+ */
31172
+ export const MJMLScoringRunSchema = z.object({
31173
+ ID: z.string().describe(`
31174
+ * * Field Name: ID
31175
+ * * Display Name: ID
31176
+ * * SQL Data Type: uniqueidentifier
31177
+ * * Default Value: newsequentialid()`),
31178
+ ModelID: z.string().nullable().describe(`
31179
+ * * Field Name: ModelID
31180
+ * * Display Name: Model
31181
+ * * SQL Data Type: uniqueidentifier
31182
+ * * Related Entity/Foreign Key: MJ: ML Models (vwMLModels.ID)
31183
+ * * Description: The exact model version that scored. NULL only on a refused run whose binding's pipeline has no Published model.`),
31184
+ ModelVersion: z.number().nullable().describe(`
31185
+ * * Field Name: ModelVersion
31186
+ * * Display Name: Model Version
31187
+ * * SQL Data Type: int
31188
+ * * Description: The model's Version, copied at the run.`),
31189
+ MLModelScoringBindingID: z.string().nullable().describe(`
31190
+ * * Field Name: MLModelScoringBindingID
31191
+ * * Display Name: ML Model Scoring Binding
31192
+ * * SQL Data Type: uniqueidentifier
31193
+ * * Related Entity/Foreign Key: MJ: ML Model Scoring Bindings (vwMLModelScoringBindings.ID)
31194
+ * * Description: The scoring binding a writing run scored for; NULL for a call that returns its scores and writes no Feature Value.`),
31195
+ ArtifactSha256: z.string().nullable().describe(`
31196
+ * * Field Name: ArtifactSha256
31197
+ * * Display Name: Artifact SHA-256
31198
+ * * SQL Data Type: char(64)
31199
+ * * Description: SHA-256 of the artifact bytes that scored; NULL only when the run was refused before the artifact verified.`),
31200
+ FeatureSchemaHash: z.string().nullable().describe(`
31201
+ * * Field Name: FeatureSchemaHash
31202
+ * * Display Name: Feature Schema Hash
31203
+ * * SQL Data Type: char(64)
31204
+ * * Description: Hash of the model's feature schema the run scored with.`),
31205
+ Path: z.union([z.literal('monitoring'), z.literal('parity'), z.literal('predict'), z.literal('record-process'), z.literal('score-record-set')]).describe(`
31206
+ * * Field Name: Path
31207
+ * * Display Name: Path
31208
+ * * SQL Data Type: nvarchar(20)
31209
+ * * Value List Type: List
31210
+ * * Possible Values
31211
+ * * monitoring
31212
+ * * parity
31213
+ * * predict
31214
+ * * record-process
31215
+ * * score-record-set
31216
+ * * Description: Which caller ran it: score-record-set, record-process, monitoring, parity or predict.`),
31217
+ ScopeKind: z.union([z.literal('filter'), z.literal('record-ids'), z.literal('view')]).describe(`
31218
+ * * Field Name: ScopeKind
31219
+ * * Display Name: Scope Kind
31220
+ * * SQL Data Type: nvarchar(20)
31221
+ * * Value List Type: List
31222
+ * * Possible Values
31223
+ * * filter
31224
+ * * record-ids
31225
+ * * view
31226
+ * * Description: How the scope names its records: record-ids, view or filter.`),
31227
+ ScopeEntityID: z.string().describe(`
31228
+ * * Field Name: ScopeEntityID
31229
+ * * Display Name: Scope Entity
31230
+ * * SQL Data Type: uniqueidentifier
31231
+ * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
31232
+ * * Description: The entity whose records the scope names.`),
31233
+ Scope: z.any().describe(`
31234
+ * * Field Name: Scope
31235
+ * * Display Name: Scope
31236
+ * * SQL Data Type: nvarchar(MAX)
31237
+ * * JSON Type: MJMLScoringRunEntity_ScoringScope
31238
+ * * Description: JSON ScoringScope: the records the call asked to score.`),
31239
+ EntityMapping: z.any().nullable().describe(`
31240
+ * * Field Name: EntityMapping
31241
+ * * Display Name: Entity Mapping
31242
+ * * SQL Data Type: nvarchar(MAX)
31243
+ * * JSON Type: MJMLScoringRunEntity_EntityRef
31244
+ * * Description: JSON EntityRef mapping the scope entity onto the model's grain, when they differ.`),
31245
+ AsOfDate: z.date().describe(`
31246
+ * * Field Name: AsOfDate
31247
+ * * Display Name: As Of Date
31248
+ * * SQL Data Type: datetimeoffset
31249
+ * * Description: The as-of instant the features were read at.`),
31250
+ ReadPolicy: z.any().describe(`
31251
+ * * Field Name: ReadPolicy
31252
+ * * Display Name: Read Policy
31253
+ * * SQL Data Type: nvarchar(MAX)
31254
+ * * JSON Type: MJMLScoringRunEntity_ReadPolicy
31255
+ * * Description: JSON ReadPolicy the features were read under.`),
31256
+ DryRun: z.boolean().describe(`
31257
+ * * Field Name: DryRun
31258
+ * * Display Name: Dry Run
31259
+ * * SQL Data Type: bit
31260
+ * * Default Value: 0
31261
+ * * Description: True when the call scored without writing anything.`),
31262
+ RequestedBy: z.any().describe(`
31263
+ * * Field Name: RequestedBy
31264
+ * * Display Name: Requested By
31265
+ * * SQL Data Type: nvarchar(MAX)
31266
+ * * JSON Type: MJMLScoringRunEntity_Actor
31267
+ * * Description: JSON Actor: who asked for the run.`),
31268
+ RequestedByUserID: z.string().nullable().describe(`
31269
+ * * Field Name: RequestedByUserID
31270
+ * * Display Name: Requested By User
31271
+ * * SQL Data Type: uniqueidentifier
31272
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
31273
+ * * Description: The requesting user, when a person asked; a joinable copy of RequestedBy.`),
31274
+ ProcessRunID: z.string().nullable().describe(`
31275
+ * * Field Name: ProcessRunID
31276
+ * * Display Name: Process Run
31277
+ * * SQL Data Type: uniqueidentifier
31278
+ * * Related Entity/Foreign Key: MJ: Process Runs (vwProcessRuns.ID)
31279
+ * * Description: The Process Run, when the Record Process path ran it.`),
31280
+ ScheduledJobRunID: z.string().nullable().describe(`
31281
+ * * Field Name: ScheduledJobRunID
31282
+ * * Display Name: Scheduled Job Run
31283
+ * * SQL Data Type: uniqueidentifier
31284
+ * * Related Entity/Foreign Key: MJ: Scheduled Job Runs (vwScheduledJobRuns.ID)
31285
+ * * Description: The Scheduled Job Run, when monitoring or parity ran it.`),
31286
+ Status: z.union([z.literal('completed'), z.literal('failed'), z.literal('refused'), z.literal('running')]).describe(`
31287
+ * * Field Name: Status
31288
+ * * Display Name: Status
31289
+ * * SQL Data Type: nvarchar(20)
31290
+ * * Default Value: running
31291
+ * * Value List Type: List
31292
+ * * Possible Values
31293
+ * * completed
31294
+ * * failed
31295
+ * * refused
31296
+ * * running
31297
+ * * Description: running, refused, failed or completed. A failed run keeps the batches it wrote before the failing one.`),
31298
+ Refusal: z.any().nullable().describe(`
31299
+ * * Field Name: Refusal
31300
+ * * Display Name: Refusal
31301
+ * * SQL Data Type: nvarchar(MAX)
31302
+ * * JSON Type: MJMLScoringRunEntity_ScoringRefusal
31303
+ * * Description: JSON ScoringRefusal when the run was refused.`),
31304
+ Total: z.number().describe(`
31305
+ * * Field Name: Total
31306
+ * * Display Name: Total Records
31307
+ * * SQL Data Type: int
31308
+ * * Default Value: 0
31309
+ * * Description: Records in scope.`),
31310
+ Written: z.number().describe(`
31311
+ * * Field Name: Written
31312
+ * * Display Name: Written Records
31313
+ * * SQL Data Type: int
31314
+ * * Default Value: 0
31315
+ * * Description: Records whose prediction was written.`),
31316
+ Failed: z.number().describe(`
31317
+ * * Field Name: Failed
31318
+ * * Display Name: Failed Records
31319
+ * * SQL Data Type: int
31320
+ * * Default Value: 0
31321
+ * * Description: Records that failed to score.`),
31322
+ Skipped: z.number().describe(`
31323
+ * * Field Name: Skipped
31324
+ * * Display Name: Skipped Records
31325
+ * * SQL Data Type: int
31326
+ * * Default Value: 0
31327
+ * * Description: Records skipped (for example, a person's value the run must not overwrite).`),
31328
+ FirstErrors: z.any().nullable().describe(`
31329
+ * * Field Name: FirstErrors
31330
+ * * Display Name: First Errors
31331
+ * * SQL Data Type: nvarchar(MAX)
31332
+ * * JSON Type: Array<MJMLScoringRunEntity_ScoringRowError>
31333
+ * * Description: JSON array of the first errors, at most 20, each {recordId, message}.`),
31334
+ StartedAt: z.date().describe(`
31335
+ * * Field Name: StartedAt
31336
+ * * Display Name: Started At
31337
+ * * SQL Data Type: datetimeoffset
31338
+ * * Default Value: sysdatetimeoffset()
31339
+ * * Description: When the run started.`),
31340
+ EndedAt: z.date().nullable().describe(`
31341
+ * * Field Name: EndedAt
31342
+ * * Display Name: Ended At
31343
+ * * SQL Data Type: datetimeoffset
31344
+ * * Description: When the run ended; NULL while it runs.`),
31345
+ __mj_CreatedAt: z.date().describe(`
31346
+ * * Field Name: __mj_CreatedAt
31347
+ * * Display Name: Created At
31348
+ * * SQL Data Type: datetimeoffset
31349
+ * * Default Value: getutcdate()`),
31350
+ __mj_UpdatedAt: z.date().describe(`
31351
+ * * Field Name: __mj_UpdatedAt
31352
+ * * Display Name: Updated At
31353
+ * * SQL Data Type: datetimeoffset
31354
+ * * Default Value: getutcdate()`),
31355
+ MLModelScoringBinding: z.string().nullable().describe(`
31356
+ * * Field Name: MLModelScoringBinding
31357
+ * * Display Name: ML Model Scoring Binding Name
31358
+ * * SQL Data Type: nvarchar(255)`),
31359
+ ScopeEntity: z.string().nullable().describe(`
31360
+ * * Field Name: ScopeEntity
31361
+ * * Display Name: Scope Entity Name
31362
+ * * SQL Data Type: nvarchar(255)`),
31363
+ RequestedByUser: z.string().nullable().describe(`
31364
+ * * Field Name: RequestedByUser
31365
+ * * Display Name: Requested By User Name
31366
+ * * SQL Data Type: nvarchar(100)`),
31367
+ ScheduledJobRun: z.string().nullable().describe(`
31368
+ * * Field Name: ScheduledJobRun
31369
+ * * Display Name: Scheduled Job Run Details
31370
+ * * SQL Data Type: nvarchar(200)`),
31371
+ });
28046
31372
  /**
28047
31373
  * zod schema definition for the entity MJ: ML Training Pipelines
28048
31374
  */
@@ -31992,7 +35318,7 @@ export const MJRecordChangeSchema = z.object({
31992
35318
  * * Snapshot
31993
35319
  * * Update
31994
35320
  * * Description: Create, Update, or Delete`),
31995
- Source: z.union([z.literal('Clone'), z.literal('External'), z.literal('Internal'), z.literal('Restore')]).describe(`
35321
+ Source: z.union([z.literal('Clone'), z.literal('External'), z.literal('Internal'), z.literal('Restore'), z.literal('Sync')]).describe(`
31996
35322
  * * Field Name: Source
31997
35323
  * * Display Name: Source
31998
35324
  * * SQL Data Type: nvarchar(20)
@@ -32003,6 +35329,7 @@ export const MJRecordChangeSchema = z.object({
32003
35329
  * * External
32004
35330
  * * Internal
32005
35331
  * * Restore
35332
+ * * Sync
32006
35333
  * * Description: Internal or External`),
32007
35334
  ChangedAt: z.date().describe(`
32008
35335
  * * Field Name: ChangedAt
@@ -33548,6 +36875,11 @@ export const MJRowLevelSecurityFilterSchema = z.object({
33548
36875
  * * Display Name: __mj _Updated At
33549
36876
  * * SQL Data Type: datetimeoffset
33550
36877
  * * Default Value: getutcdate()`),
36878
+ PlatformVariants: z.string().nullable().describe(`
36879
+ * * Field Name: PlatformVariants
36880
+ * * Display Name: Platform Variants
36881
+ * * SQL Data Type: nvarchar(MAX)
36882
+ * * Description: Optional JSON object mapping SQL field names (FilterText) to database-platform overrides (for example {"FilterText":{"postgresql":"..."}}) resolved by RowLevelSecurityFilterInfo.GetPlatformFilterText.`),
33551
36883
  });
33552
36884
  /**
33553
36885
  * zod schema definition for the entity MJ: Rubric Bands
@@ -37513,7 +40845,7 @@ export const MJTaskSchema = z.object({
37513
40845
  * * SQL Data Type: uniqueidentifier
37514
40846
  * * Related Entity/Foreign Key: MJ: Actions (vwActions.ID)
37515
40847
  * * Description: The Action this task executes, when the node is action-assigned rather than agent-assigned or awaiting a person. Mutually exclusive with UserID and AgentID (CK_Task_Assignment). Set by durable entity-action dispatch, where a single-node graph carries one action to run with restart recovery.`),
37516
- StepType: z.union([z.literal('Action'), z.literal('Agent'), z.literal('Decision'), z.literal('External'), z.literal('ForEach'), z.literal('Human'), z.literal('Prompt'), z.literal('While')]).nullable().describe(`
40848
+ StepType: z.union([z.literal('Action'), z.literal('Agent'), z.literal('Decision'), z.literal('External'), z.literal('ForEach'), z.literal('Human'), z.literal('Prompt'), z.literal('Wait'), z.literal('While')]).nullable().describe(`
37517
40849
  * * Field Name: StepType
37518
40850
  * * Display Name: Step Type
37519
40851
  * * SQL Data Type: nvarchar(20)
@@ -37526,6 +40858,7 @@ export const MJTaskSchema = z.object({
37526
40858
  * * ForEach
37527
40859
  * * Human
37528
40860
  * * Prompt
40861
+ * * Wait
37529
40862
  * * While
37530
40863
  * * Description: Which kind of workflow step this task represents. NULL for a task that is not part of a workflow, such as a hand-authored to-do. Determines which of AgentID/ActionID/PromptID/UserID is meaningful and how Configuration is read. This is the executable vocabulary and is deliberately not the same value list as AIAgentStep.StepType, which describes a step at design time.`),
37531
40864
  PromptID: z.string().nullable().describe(`
@@ -37550,6 +40883,22 @@ export const MJTaskSchema = z.object({
37550
40883
  * * SQL Data Type: uniqueidentifier
37551
40884
  * * Related Entity/Foreign Key: MJ: Tasks (vwTasks.ID)
37552
40885
  * * Description: For a saga compensation task, the forward task it undoes. Unique, so a forward task is compensated at most once.`),
40886
+ CorrelationKey: z.string().nullable().describe(`
40887
+ * * Field Name: CorrelationKey
40888
+ * * Display Name: Correlation Key
40889
+ * * SQL Data Type: nvarchar(400)
40890
+ * * Description: For an External workflow step: the key an outside caller signals it by when it does not hold the task ID, resolved from the step's configuration when the step is reached. Not unique: one signal completes every reached step waiting on the same key, which is how a single event (a sprint closing, a payment settling) releases many workflows at once. NULL for every other step.`),
40891
+ AttemptCount: z.number().describe(`
40892
+ * * Field Name: AttemptCount
40893
+ * * Display Name: Attempt Count
40894
+ * * SQL Data Type: int
40895
+ * * Default Value: 0
40896
+ * * Description: For a workflow step: how many of its runs ended in a scheduled retry. 0 for a step that has not been retried. The dispatcher compares it with the step's retry policy to decide whether a failure is retried or final; a person retrying the step resets it.`),
40897
+ NextAttemptAt: z.date().nullable().describe(`
40898
+ * * Field Name: NextAttemptAt
40899
+ * * Display Name: Next Attempt At
40900
+ * * SQL Data Type: datetimeoffset
40901
+ * * Description: For a workflow step waiting to be retried: the earliest moment it may be claimed again, on the database clock. NULL when no retry is scheduled. Claiming skips the step until this moment has passed, so a retry survives a restart and runs on whichever instance is free.`),
37553
40902
  Parent: z.string().nullable().describe(`
37554
40903
  * * Field Name: Parent
37555
40904
  * * Display Name: Parent
@@ -39846,6 +43195,12 @@ export const MJUserRoutineSchema = z.object({
39846
43195
  * * Display Name: Last Checked At
39847
43196
  * * SQL Data Type: datetimeoffset
39848
43197
  * * Description: Timestamp when the dispatcher last evaluated this routine's watched entities and wake gate conditions.`),
43198
+ AgentConfigurationID: z.string().nullable().describe(`
43199
+ * * Field Name: AgentConfigurationID
43200
+ * * Display Name: Agent Configuration ID
43201
+ * * SQL Data Type: uniqueidentifier
43202
+ * * Related Entity/Foreign Key: MJ: AI Configurations (vwAIConfigurations.ID)
43203
+ * * Description: Optional AI Configuration (model tier such as Fast, Standard, or High Power) used when executing this routine's Agent target. Seeded from the originating rhythm template's DefaultAgentConfigurationID on creation and changeable by the user or agent.`),
39849
43204
  User: z.string().nullable().describe(`
39850
43205
  * * Field Name: User
39851
43206
  * * Display Name: User Name
@@ -39862,6 +43217,10 @@ export const MJUserRoutineSchema = z.object({
39862
43217
  * * Field Name: Conversation
39863
43218
  * * Display Name: Conversation Name
39864
43219
  * * SQL Data Type: nvarchar(255)`),
43220
+ AgentConfiguration: z.string().nullable().describe(`
43221
+ * * Field Name: AgentConfiguration
43222
+ * * Display Name: Agent Configuration
43223
+ * * SQL Data Type: nvarchar(100)`),
39865
43224
  });
39866
43225
  /**
39867
43226
  * zod schema definition for the entity MJ: User Settings