@memberjunction/core-entities 4.0.0 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/generated/entity_subclasses.d.ts +136 -47
  2. package/dist/generated/entity_subclasses.d.ts.map +1 -1
  3. package/dist/generated/entity_subclasses.js +399 -94
  4. package/dist/generated/entity_subclasses.js.map +1 -1
  5. package/package.json +5 -5
  6. package/readme.md +420 -132
  7. package/dist/custom/AIAgentExtended.d.ts +0 -13
  8. package/dist/custom/AIAgentExtended.d.ts.map +0 -1
  9. package/dist/custom/AIAgentExtended.js +0 -37
  10. package/dist/custom/AIAgentExtended.js.map +0 -1
  11. package/dist/custom/AIAgentRunExtended.d.ts +0 -32
  12. package/dist/custom/AIAgentRunExtended.d.ts.map +0 -1
  13. package/dist/custom/AIAgentRunExtended.js +0 -136
  14. package/dist/custom/AIAgentRunExtended.js.map +0 -1
  15. package/dist/custom/AIAgentRunStepExtended.d.ts +0 -48
  16. package/dist/custom/AIAgentRunStepExtended.d.ts.map +0 -1
  17. package/dist/custom/AIAgentRunStepExtended.js +0 -149
  18. package/dist/custom/AIAgentRunStepExtended.js.map +0 -1
  19. package/dist/custom/AIModelExtended.d.ts +0 -14
  20. package/dist/custom/AIModelExtended.d.ts.map +0 -1
  21. package/dist/custom/AIModelExtended.js +0 -36
  22. package/dist/custom/AIModelExtended.js.map +0 -1
  23. package/dist/custom/AIPromptCategoryExtended.d.ts +0 -7
  24. package/dist/custom/AIPromptCategoryExtended.d.ts.map +0 -1
  25. package/dist/custom/AIPromptCategoryExtended.js +0 -26
  26. package/dist/custom/AIPromptCategoryExtended.js.map +0 -1
  27. package/dist/custom/AIPromptExtended.d.ts +0 -51
  28. package/dist/custom/AIPromptExtended.d.ts.map +0 -1
  29. package/dist/custom/AIPromptExtended.js +0 -169
  30. package/dist/custom/AIPromptExtended.js.map +0 -1
  31. package/dist/custom/AIPromptRunEntityExtended.d.ts +0 -47
  32. package/dist/custom/AIPromptRunEntityExtended.d.ts.map +0 -1
  33. package/dist/custom/AIPromptRunEntityExtended.js +0 -156
  34. package/dist/custom/AIPromptRunEntityExtended.js.map +0 -1
  35. package/dist/custom/TypeTablesCache.d.ts +0 -12
  36. package/dist/custom/TypeTablesCache.d.ts.map +0 -1
  37. package/dist/custom/TypeTablesCache.js +0 -31
  38. package/dist/custom/TypeTablesCache.js.map +0 -1
@@ -2379,7 +2379,7 @@ export const AIResultCacheSchema = z.object({
2379
2379
  * * Description: Vector representation of the prompt for similarity matching.`),
2380
2380
  PromptRunID: z.string().nullable().describe(`
2381
2381
  * * Field Name: PromptRunID
2382
- * * Display Name: Prompt Run
2382
+ * * Display Name: Prompt Run ID
2383
2383
  * * SQL Data Type: uniqueidentifier
2384
2384
  * * Related Entity/Foreign Key: MJ: AI Prompt Runs (vwAIPromptRuns.ID)
2385
2385
  * * Description: Reference to the AIPromptRun that created this cache entry.`),
@@ -4312,7 +4312,7 @@ export const ConversationSchema = z.object({
4312
4312
  * * Related Entity/Foreign Key: Entities (vwEntities.ID)`),
4313
4313
  LinkedRecordID: z.string().nullable().describe(`
4314
4314
  * * Field Name: LinkedRecordID
4315
- * * Display Name: Linked Record ID
4315
+ * * Display Name: Linked Record
4316
4316
  * * SQL Data Type: nvarchar(500)
4317
4317
  * * Description: ID of a related record this conversation is about (support ticket, order, etc.).`),
4318
4318
  DataContextID: z.string().nullable().describe(`
@@ -4890,12 +4890,12 @@ export const DuplicateRunDetailSchema = z.object({
4890
4890
  * * Default Value: newsequentialid()`),
4891
4891
  DuplicateRunID: z.string().describe(`
4892
4892
  * * Field Name: DuplicateRunID
4893
- * * Display Name: Duplicate Run ID
4893
+ * * Display Name: Duplicate Run
4894
4894
  * * SQL Data Type: uniqueidentifier
4895
4895
  * * Related Entity/Foreign Key: Duplicate Runs (vwDuplicateRuns.ID)`),
4896
4896
  RecordID: z.string().describe(`
4897
4897
  * * Field Name: RecordID
4898
- * * Display Name: Record ID
4898
+ * * Display Name: Record
4899
4899
  * * SQL Data Type: nvarchar(500)
4900
4900
  * * Description: The ID of the record being analyzed for duplicates.`),
4901
4901
  MatchStatus: z.union([z.literal('Complete'), z.literal('Error'), z.literal('Pending'), z.literal('Skipped')]).describe(`
@@ -5092,7 +5092,7 @@ export const EmployeeCompanyIntegrationSchema = z.object({
5092
5092
  * * Default Value: getutcdate()`),
5093
5093
  Employee: z.string().nullable().describe(`
5094
5094
  * * Field Name: Employee
5095
- * * Display Name: Employee
5095
+ * * Display Name: Employee Name
5096
5096
  * * SQL Data Type: nvarchar(81)`),
5097
5097
  CompanyIntegration: z.string().describe(`
5098
5098
  * * Field Name: CompanyIntegration
@@ -5130,7 +5130,7 @@ export const EmployeeRoleSchema = z.object({
5130
5130
  * * Default Value: getutcdate()`),
5131
5131
  Employee: z.string().nullable().describe(`
5132
5132
  * * Field Name: Employee
5133
- * * Display Name: Employee
5133
+ * * Display Name: Employee Name
5134
5134
  * * SQL Data Type: nvarchar(81)`),
5135
5135
  Role: z.string().describe(`
5136
5136
  * * Field Name: Role
@@ -5168,7 +5168,7 @@ export const EmployeeSkillSchema = z.object({
5168
5168
  * * Default Value: getutcdate()`),
5169
5169
  Employee: z.string().nullable().describe(`
5170
5170
  * * Field Name: Employee
5171
- * * Display Name: Employee Name
5171
+ * * Display Name: Employee
5172
5172
  * * SQL Data Type: nvarchar(81)`),
5173
5173
  Skill: z.string().describe(`
5174
5174
  * * Field Name: Skill
@@ -5667,11 +5667,11 @@ export const EntityActionFilterSchema = z.object({
5667
5667
  * * Default Value: getutcdate()`),
5668
5668
  EntityAction: z.string().describe(`
5669
5669
  * * Field Name: EntityAction
5670
- * * Display Name: Entity Action
5670
+ * * Display Name: Action Name
5671
5671
  * * SQL Data Type: nvarchar(425)`),
5672
5672
  ActionFilter: z.string().describe(`
5673
5673
  * * Field Name: ActionFilter
5674
- * * Display Name: Action Filter
5674
+ * * Display Name: Filter Name
5675
5675
  * * SQL Data Type: nvarchar(MAX)`),
5676
5676
  });
5677
5677
  /**
@@ -5721,12 +5721,12 @@ export const EntityActionInvocationSchema = z.object({
5721
5721
  * * Default Value: newsequentialid()`),
5722
5722
  EntityActionID: z.string().describe(`
5723
5723
  * * Field Name: EntityActionID
5724
- * * Display Name: Entity Action ID
5724
+ * * Display Name: Entity Action
5725
5725
  * * SQL Data Type: uniqueidentifier
5726
5726
  * * Related Entity/Foreign Key: Entity Actions (vwEntityActions.ID)`),
5727
5727
  InvocationTypeID: z.string().describe(`
5728
5728
  * * Field Name: InvocationTypeID
5729
- * * Display Name: Invocation Type ID
5729
+ * * Display Name: Invocation Type
5730
5730
  * * SQL Data Type: uniqueidentifier
5731
5731
  * * Related Entity/Foreign Key: Entity Action Invocation Types (vwEntityActionInvocationTypes.ID)`),
5732
5732
  Status: z.union([z.literal('Active'), z.literal('Disabled'), z.literal('Pending')]).describe(`
@@ -5752,7 +5752,7 @@ export const EntityActionInvocationSchema = z.object({
5752
5752
  * * Default Value: getutcdate()`),
5753
5753
  EntityAction: z.string().describe(`
5754
5754
  * * Field Name: EntityAction
5755
- * * Display Name: Entity Action
5755
+ * * Display Name: Action
5756
5756
  * * SQL Data Type: nvarchar(425)`),
5757
5757
  InvocationType: z.string().describe(`
5758
5758
  * * Field Name: InvocationType
@@ -5770,12 +5770,12 @@ export const EntityActionParamSchema = z.object({
5770
5770
  * * Default Value: newsequentialid()`),
5771
5771
  EntityActionID: z.string().describe(`
5772
5772
  * * Field Name: EntityActionID
5773
- * * Display Name: Entity Action
5773
+ * * Display Name: Entity Action Id
5774
5774
  * * SQL Data Type: uniqueidentifier
5775
5775
  * * Related Entity/Foreign Key: Entity Actions (vwEntityActions.ID)`),
5776
5776
  ActionParamID: z.string().describe(`
5777
5777
  * * Field Name: ActionParamID
5778
- * * Display Name: Action Parameter
5778
+ * * Display Name: Action Parameter Id
5779
5779
  * * SQL Data Type: uniqueidentifier
5780
5780
  * * Related Entity/Foreign Key: Action Params (vwActionParams.ID)`),
5781
5781
  ValueType: z.union([z.literal('Entity Field'), z.literal('Entity Object'), z.literal('Script'), z.literal('Static')]).describe(`
@@ -5811,7 +5811,7 @@ export const EntityActionParamSchema = z.object({
5811
5811
  * * Default Value: getutcdate()`),
5812
5812
  EntityAction: z.string().describe(`
5813
5813
  * * Field Name: EntityAction
5814
- * * Display Name: Action Name
5814
+ * * Display Name: Entity Action
5815
5815
  * * SQL Data Type: nvarchar(425)`),
5816
5816
  ActionParam: z.string().describe(`
5817
5817
  * * Field Name: ActionParam
@@ -5983,7 +5983,7 @@ export const EntityCommunicationFieldSchema = z.object({
5983
5983
  * * Default Value: newsequentialid()`),
5984
5984
  EntityCommunicationMessageTypeID: z.string().describe(`
5985
5985
  * * Field Name: EntityCommunicationMessageTypeID
5986
- * * Display Name: Entity Communication Message Type
5986
+ * * Display Name: Message Type ID
5987
5987
  * * SQL Data Type: uniqueidentifier
5988
5988
  * * Related Entity/Foreign Key: Entity Communication Message Types (vwEntityCommunicationMessageTypes.ID)`),
5989
5989
  FieldName: z.string().describe(`
@@ -7194,7 +7194,7 @@ export const ErrorLogSchema = z.object({
7194
7194
  * * Related Entity/Foreign Key: Company Integration Run Details (vwCompanyIntegrationRunDetails.ID)`),
7195
7195
  Code: z.string().nullable().describe(`
7196
7196
  * * Field Name: Code
7197
- * * Display Name: Code
7197
+ * * Display Name: Error Code
7198
7198
  * * SQL Data Type: nchar(20)
7199
7199
  * * Description: Error code for categorizing and handling specific error types.`),
7200
7200
  Message: z.string().nullable().describe(`
@@ -7691,6 +7691,7 @@ export const IntegrationURLFormatSchema = z.object({
7691
7691
  * * Related Entity/Foreign Key: Entities (vwEntities.ID)`),
7692
7692
  URLFormat: z.string().describe(`
7693
7693
  * * Field Name: URLFormat
7694
+ * * Display Name: URL Format
7694
7695
  * * SQL Data Type: nvarchar(500)
7695
7696
  * * Description: The URL Format for the given integration including the ability to include markup with fields from the integration`),
7696
7697
  Comments: z.string().nullable().describe(`
@@ -9163,7 +9164,7 @@ detailed information about what validation rules failed.`),
9163
9164
  * * SQL Data Type: nvarchar(255)`),
9164
9165
  Parent: z.string().nullable().describe(`
9165
9166
  * * Field Name: Parent
9166
- * * Display Name: Parent Step
9167
+ * * Display Name: Parent
9167
9168
  * * SQL Data Type: nvarchar(255)`),
9168
9169
  RootParentID: z.string().nullable().describe(`
9169
9170
  * * Field Name: RootParentID
@@ -13111,7 +13112,7 @@ export const ConversationDetailArtifactSchema = z.object({
13111
13112
  * * Default Value: getutcdate()`),
13112
13113
  ConversationDetail: z.string().describe(`
13113
13114
  * * Field Name: ConversationDetail
13114
- * * Display Name: Conversation Message
13115
+ * * Display Name: Conversation Text
13115
13116
  * * SQL Data Type: nvarchar(MAX)`),
13116
13117
  ArtifactVersion: z.string().nullable().describe(`
13117
13118
  * * Field Name: ArtifactVersion
@@ -13261,7 +13262,7 @@ export const ConversationDetailRatingSchema = z.object({
13261
13262
  * * Default Value: getutcdate()`),
13262
13263
  ConversationDetail: z.string().describe(`
13263
13264
  * * Field Name: ConversationDetail
13264
- * * Display Name: Conversation Detail
13265
+ * * Display Name: Conversation Message
13265
13266
  * * SQL Data Type: nvarchar(MAX)`),
13266
13267
  User: z.string().describe(`
13267
13268
  * * Field Name: User
@@ -15989,7 +15990,7 @@ export const TaskSchema = z.object({
15989
15990
  * * Default Value: newsequentialid()`),
15990
15991
  ParentID: z.string().nullable().describe(`
15991
15992
  * * Field Name: ParentID
15992
- * * Display Name: Parent
15993
+ * * Display Name: Parent ID
15993
15994
  * * SQL Data Type: uniqueidentifier
15994
15995
  * * Related Entity/Foreign Key: MJ: Tasks (vwTasks.ID)`),
15995
15996
  Name: z.string().describe(`
@@ -16004,33 +16005,33 @@ export const TaskSchema = z.object({
16004
16005
  * * Description: Detailed description of the task requirements and objectives`),
16005
16006
  TypeID: z.string().describe(`
16006
16007
  * * Field Name: TypeID
16007
- * * Display Name: Type
16008
+ * * Display Name: Type ID
16008
16009
  * * SQL Data Type: uniqueidentifier
16009
16010
  * * Related Entity/Foreign Key: MJ: Task Types (vwTaskTypes.ID)`),
16010
16011
  EnvironmentID: z.string().describe(`
16011
16012
  * * Field Name: EnvironmentID
16012
- * * Display Name: Environment
16013
+ * * Display Name: Environment ID
16013
16014
  * * SQL Data Type: uniqueidentifier
16014
16015
  * * Related Entity/Foreign Key: MJ: Environments (vwEnvironments.ID)
16015
16016
  * * Default Value: F51358F3-9447-4176-B313-BF8025FD8D09`),
16016
16017
  ProjectID: z.string().nullable().describe(`
16017
16018
  * * Field Name: ProjectID
16018
- * * Display Name: Project
16019
+ * * Display Name: Project ID
16019
16020
  * * SQL Data Type: uniqueidentifier
16020
16021
  * * Related Entity/Foreign Key: MJ: Projects (vwProjects.ID)`),
16021
16022
  ConversationDetailID: z.string().nullable().describe(`
16022
16023
  * * Field Name: ConversationDetailID
16023
- * * Display Name: Conversation Detail
16024
+ * * Display Name: Conversation Detail ID
16024
16025
  * * SQL Data Type: uniqueidentifier
16025
16026
  * * Related Entity/Foreign Key: Conversation Details (vwConversationDetails.ID)`),
16026
16027
  UserID: z.string().nullable().describe(`
16027
16028
  * * Field Name: UserID
16028
- * * Display Name: User
16029
+ * * Display Name: User ID
16029
16030
  * * SQL Data Type: uniqueidentifier
16030
16031
  * * Related Entity/Foreign Key: Users (vwUsers.ID)`),
16031
16032
  AgentID: z.string().nullable().describe(`
16032
16033
  * * Field Name: AgentID
16033
- * * Display Name: Agent
16034
+ * * Display Name: Agent ID
16034
16035
  * * SQL Data Type: uniqueidentifier
16035
16036
  * * Related Entity/Foreign Key: AI Agents (vwAIAgents.ID)`),
16036
16037
  Status: z.union([z.literal('Blocked'), z.literal('Cancelled'), z.literal('Complete'), z.literal('Deferred'), z.literal('Failed'), z.literal('In Progress'), z.literal('Pending')]).describe(`
@@ -16081,19 +16082,19 @@ export const TaskSchema = z.object({
16081
16082
  * * Default Value: getutcdate()`),
16082
16083
  Parent: z.string().nullable().describe(`
16083
16084
  * * Field Name: Parent
16084
- * * Display Name: Parent
16085
+ * * Display Name: Parent Name
16085
16086
  * * SQL Data Type: nvarchar(255)`),
16086
16087
  Type: z.string().describe(`
16087
16088
  * * Field Name: Type
16088
- * * Display Name: Type
16089
+ * * Display Name: Type Name
16089
16090
  * * SQL Data Type: nvarchar(255)`),
16090
16091
  Environment: z.string().describe(`
16091
16092
  * * Field Name: Environment
16092
- * * Display Name: Environment
16093
+ * * Display Name: Environment Name
16093
16094
  * * SQL Data Type: nvarchar(255)`),
16094
16095
  Project: z.string().nullable().describe(`
16095
16096
  * * Field Name: Project
16096
- * * Display Name: Project
16097
+ * * Display Name: Project Name
16097
16098
  * * SQL Data Type: nvarchar(255)`),
16098
16099
  ConversationDetail: z.string().nullable().describe(`
16099
16100
  * * Field Name: ConversationDetail
@@ -16101,15 +16102,15 @@ export const TaskSchema = z.object({
16101
16102
  * * SQL Data Type: nvarchar(MAX)`),
16102
16103
  User: z.string().nullable().describe(`
16103
16104
  * * Field Name: User
16104
- * * Display Name: User
16105
+ * * Display Name: User Name
16105
16106
  * * SQL Data Type: nvarchar(100)`),
16106
16107
  Agent: z.string().nullable().describe(`
16107
16108
  * * Field Name: Agent
16108
- * * Display Name: Agent
16109
+ * * Display Name: Agent Name
16109
16110
  * * SQL Data Type: nvarchar(255)`),
16110
16111
  RootParentID: z.string().nullable().describe(`
16111
16112
  * * Field Name: RootParentID
16112
- * * Display Name: Root Parent
16113
+ * * Display Name: Root Parent ID
16113
16114
  * * SQL Data Type: uniqueidentifier`),
16114
16115
  });
16115
16116
  /**
@@ -18063,17 +18064,17 @@ export const RecommendationItemSchema = z.object({
18063
18064
  * * Default Value: newsequentialid()`),
18064
18065
  RecommendationID: z.string().describe(`
18065
18066
  * * Field Name: RecommendationID
18066
- * * Display Name: Recommendation ID
18067
+ * * Display Name: Recommendation
18067
18068
  * * SQL Data Type: uniqueidentifier
18068
18069
  * * Related Entity/Foreign Key: Recommendations (vwRecommendations.ID)`),
18069
18070
  DestinationEntityID: z.string().describe(`
18070
18071
  * * Field Name: DestinationEntityID
18071
- * * Display Name: Destination Entity ID
18072
+ * * Display Name: Destination Entity
18072
18073
  * * SQL Data Type: uniqueidentifier
18073
18074
  * * Related Entity/Foreign Key: Entities (vwEntities.ID)`),
18074
18075
  DestinationEntityRecordID: z.string().describe(`
18075
18076
  * * Field Name: DestinationEntityRecordID
18076
- * * Display Name: Destination Entity Record ID
18077
+ * * Display Name: Destination Record ID
18077
18078
  * * SQL Data Type: nvarchar(450)
18078
18079
  * * Description: The record ID of the destination entity`),
18079
18080
  MatchProbability: z.number().nullable().describe(`
@@ -18213,7 +18214,7 @@ export const RecommendationSchema = z.object({
18213
18214
  * * Related Entity/Foreign Key: Entities (vwEntities.ID)`),
18214
18215
  SourceEntityRecordID: z.string().describe(`
18215
18216
  * * Field Name: SourceEntityRecordID
18216
- * * Display Name: Source Record ID
18217
+ * * Display Name: Source Entity Record ID
18217
18218
  * * SQL Data Type: nvarchar(MAX)
18218
18219
  * * Description: The record ID of the source entity`),
18219
18220
  __mj_CreatedAt: z.date().describe(`
@@ -18228,7 +18229,7 @@ export const RecommendationSchema = z.object({
18228
18229
  * * Default Value: getutcdate()`),
18229
18230
  RecommendationRun: z.string().describe(`
18230
18231
  * * Field Name: RecommendationRun
18231
- * * Display Name: Recommendation Run
18232
+ * * Display Name: Run
18232
18233
  * * SQL Data Type: nvarchar(255)`),
18233
18234
  SourceEntity: z.string().describe(`
18234
18235
  * * Field Name: SourceEntity
@@ -18296,7 +18297,7 @@ export const RecordChangeSchema = z.object({
18296
18297
  * * Default Value: newsequentialid()`),
18297
18298
  EntityID: z.string().describe(`
18298
18299
  * * Field Name: EntityID
18299
- * * Display Name: Entity
18300
+ * * Display Name: Entity ID
18300
18301
  * * SQL Data Type: uniqueidentifier
18301
18302
  * * Related Entity/Foreign Key: Entities (vwEntities.ID)`),
18302
18303
  RecordID: z.string().describe(`
@@ -18306,7 +18307,7 @@ export const RecordChangeSchema = z.object({
18306
18307
  * * Description: Field RecordID for entity Record Changes.`),
18307
18308
  UserID: z.string().describe(`
18308
18309
  * * Field Name: UserID
18309
- * * Display Name: User
18310
+ * * Display Name: User ID
18310
18311
  * * SQL Data Type: uniqueidentifier
18311
18312
  * * Related Entity/Foreign Key: Users (vwUsers.ID)`),
18312
18313
  Type: z.union([z.literal('Create'), z.literal('Delete'), z.literal('Snapshot'), z.literal('Update')]).describe(`
@@ -18370,12 +18371,12 @@ export const RecordChangeSchema = z.object({
18370
18371
  * * Description: Field ErrorLog for entity Record Changes.`),
18371
18372
  ReplayRunID: z.string().nullable().describe(`
18372
18373
  * * Field Name: ReplayRunID
18373
- * * Display Name: Replay Run
18374
+ * * Display Name: Replay Run ID
18374
18375
  * * SQL Data Type: uniqueidentifier
18375
18376
  * * Related Entity/Foreign Key: Record Change Replay Runs (vwRecordChangeReplayRuns.ID)`),
18376
18377
  IntegrationID: z.string().nullable().describe(`
18377
18378
  * * Field Name: IntegrationID
18378
- * * Display Name: Integration
18379
+ * * Display Name: Integration ID
18379
18380
  * * SQL Data Type: uniqueidentifier
18380
18381
  * * Related Entity/Foreign Key: Integrations (vwIntegrations.ID)`),
18381
18382
  Comments: z.string().nullable().describe(`
@@ -18422,7 +18423,7 @@ export const RecordMergeDeletionLogSchema = z.object({
18422
18423
  * * Default Value: newsequentialid()`),
18423
18424
  RecordMergeLogID: z.string().describe(`
18424
18425
  * * Field Name: RecordMergeLogID
18425
- * * Display Name: Record Merge Log ID
18426
+ * * Display Name: Record Merge Log
18426
18427
  * * SQL Data Type: uniqueidentifier
18427
18428
  * * Related Entity/Foreign Key: Record Merge Logs (vwRecordMergeLogs.ID)`),
18428
18429
  DeletedRecordID: z.string().describe(`
@@ -19027,6 +19028,7 @@ export const RoleSchema = z.object({
19027
19028
  * * Description: The unique ID of the role in the directory being used for authentication, for example an ID in Azure.`),
19028
19029
  SQLName: z.string().nullable().describe(`
19029
19030
  * * Field Name: SQLName
19031
+ * * Display Name: SQL Name
19030
19032
  * * SQL Data Type: nvarchar(250)
19031
19033
  * * Description: The name of the role in the database, this is used for auto-generating permission statements by CodeGen`),
19032
19034
  __mj_CreatedAt: z.date().describe(`
@@ -19603,7 +19605,7 @@ export const TemplateParamSchema = z.object({
19603
19605
  * * Description: Whether this parameter must be provided when using the template.`),
19604
19606
  LinkedParameterName: z.string().nullable().describe(`
19605
19607
  * * Field Name: LinkedParameterName
19606
- * * Display Name: Linked Parameter
19608
+ * * Display Name: Linked Parameter Name
19607
19609
  * * SQL Data Type: nvarchar(255)
19608
19610
  * * Description: Only used when Type=Entity, this is used to link an Entity parameter with another parameter so that the rows in the Entity parameter can be filtered automatically based on the FKEY relationship between the Record and this Entity parameter. For example, if the Entity-based parameter is for an entity like Activities and there is another parameter of type Record for an entity like Contacts, in that situation the Activities Parameter would point to the Contacts parameter as the LinkedParameterName because we would filter down the Activities in each template render to only those linked to the Contact.`),
19609
19611
  LinkedParameterField: z.string().nullable().describe(`
@@ -19623,7 +19625,7 @@ export const TemplateParamSchema = z.object({
19623
19625
  * * Related Entity/Foreign Key: Entities (vwEntities.ID)`),
19624
19626
  RecordID: z.string().nullable().describe(`
19625
19627
  * * Field Name: RecordID
19626
- * * Display Name: Record ID
19628
+ * * Display Name: Record
19627
19629
  * * SQL Data Type: nvarchar(2000)
19628
19630
  * * Description: Record ID, used only when Type is Record and a specific hardcoded record ID is desired, this is an uncommon use case, helpful for pulling in static types and metadata in some cases.`),
19629
19631
  __mj_CreatedAt: z.date().describe(`
@@ -19643,7 +19645,7 @@ export const TemplateParamSchema = z.object({
19643
19645
  * * Description: This field is used only when the Type of the TemplateParam table is "Entity". It is an optional field used to specify the sorting order for the related entity data that is used in the template for the Entity specified.`),
19644
19646
  TemplateContentID: z.string().nullable().describe(`
19645
19647
  * * Field Name: TemplateContentID
19646
- * * Display Name: Template Content
19648
+ * * Display Name: Template Content ID
19647
19649
  * * SQL Data Type: uniqueidentifier
19648
19650
  * * Related Entity/Foreign Key: Template Contents (vwTemplateContents.ID)
19649
19651
  * * Description: Optional reference to a specific template content. When NULL, this parameter applies to all content items within the template. When set, this parameter applies only to the specified template content.`),
@@ -22092,6 +22094,41 @@ let ActionEntity = class ActionEntity extends BaseEntity {
22092
22094
  return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
22093
22095
  }
22094
22096
  /**
22097
+ * Actions - Delete method override to wrap in transaction since CascadeDeletes is true.
22098
+ * Wrapping in a transaction ensures that all cascade delete operations are handled atomically.
22099
+ * @public
22100
+ * @method
22101
+ * @override
22102
+ * @memberof ActionEntity
22103
+ * @returns {Promise<boolean>} - true if successful, false otherwise
22104
+ */
22105
+ async Delete(options) {
22106
+ if (Metadata.Provider.ProviderType === ProviderType.Database) {
22107
+ // For database providers, use the transaction methods directly
22108
+ const provider = Metadata.Provider;
22109
+ try {
22110
+ await provider.BeginTransaction();
22111
+ const result = await super.Delete(options);
22112
+ if (result) {
22113
+ await provider.CommitTransaction();
22114
+ return true;
22115
+ }
22116
+ else {
22117
+ await provider.RollbackTransaction();
22118
+ return false;
22119
+ }
22120
+ }
22121
+ catch (error) {
22122
+ await provider.RollbackTransaction();
22123
+ throw error;
22124
+ }
22125
+ }
22126
+ else {
22127
+ // For network providers, cascading deletes are handled server-side
22128
+ return super.Delete(options);
22129
+ }
22130
+ }
22131
+ /**
22095
22132
  * * Field Name: ID
22096
22133
  * * Display Name: ID
22097
22134
  * * SQL Data Type: uniqueidentifier
@@ -23932,6 +23969,41 @@ let AIAgentEntity = class AIAgentEntity extends BaseEntity {
23932
23969
  return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
23933
23970
  }
23934
23971
  /**
23972
+ * AI Agents - Delete method override to wrap in transaction since CascadeDeletes is true.
23973
+ * Wrapping in a transaction ensures that all cascade delete operations are handled atomically.
23974
+ * @public
23975
+ * @method
23976
+ * @override
23977
+ * @memberof AIAgentEntity
23978
+ * @returns {Promise<boolean>} - true if successful, false otherwise
23979
+ */
23980
+ async Delete(options) {
23981
+ if (Metadata.Provider.ProviderType === ProviderType.Database) {
23982
+ // For database providers, use the transaction methods directly
23983
+ const provider = Metadata.Provider;
23984
+ try {
23985
+ await provider.BeginTransaction();
23986
+ const result = await super.Delete(options);
23987
+ if (result) {
23988
+ await provider.CommitTransaction();
23989
+ return true;
23990
+ }
23991
+ else {
23992
+ await provider.RollbackTransaction();
23993
+ return false;
23994
+ }
23995
+ }
23996
+ catch (error) {
23997
+ await provider.RollbackTransaction();
23998
+ throw error;
23999
+ }
24000
+ }
24001
+ else {
24002
+ // For network providers, cascading deletes are handled server-side
24003
+ return super.Delete(options);
24004
+ }
24005
+ }
24006
+ /**
23935
24007
  * Validate() method override for AI Agents entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
23936
24008
  * * DefaultPromptEffortLevel: This rule ensures that if a default prompt effort level is specified, it must be a number between 1 and 100, inclusive.
23937
24009
  * * MaxExecutionsPerRun: This rule ensures that if 'MaxExecutionsPerRun' is provided, it must be a value greater than zero. If it is left blank, that's acceptable.
@@ -25413,6 +25485,9 @@ let AIModelEntity = class AIModelEntity extends BaseEntity {
25413
25485
  get Vendor() {
25414
25486
  return this.Get('Vendor');
25415
25487
  }
25488
+ set Vendor(value) {
25489
+ this.Set('Vendor', value);
25490
+ }
25416
25491
  /**
25417
25492
  * * Field Name: DriverClass
25418
25493
  * * Display Name: Driver Class
@@ -25421,6 +25496,9 @@ let AIModelEntity = class AIModelEntity extends BaseEntity {
25421
25496
  get DriverClass() {
25422
25497
  return this.Get('DriverClass');
25423
25498
  }
25499
+ set DriverClass(value) {
25500
+ this.Set('DriverClass', value);
25501
+ }
25424
25502
  /**
25425
25503
  * * Field Name: DriverImportPath
25426
25504
  * * Display Name: Driver Import Path
@@ -25429,6 +25507,9 @@ let AIModelEntity = class AIModelEntity extends BaseEntity {
25429
25507
  get DriverImportPath() {
25430
25508
  return this.Get('DriverImportPath');
25431
25509
  }
25510
+ set DriverImportPath(value) {
25511
+ this.Set('DriverImportPath', value);
25512
+ }
25432
25513
  /**
25433
25514
  * * Field Name: APIName
25434
25515
  * * Display Name: API Name
@@ -25437,6 +25518,9 @@ let AIModelEntity = class AIModelEntity extends BaseEntity {
25437
25518
  get APIName() {
25438
25519
  return this.Get('APIName');
25439
25520
  }
25521
+ set APIName(value) {
25522
+ this.Set('APIName', value);
25523
+ }
25440
25524
  /**
25441
25525
  * * Field Name: InputTokenLimit
25442
25526
  * * Display Name: Input Token Limit
@@ -25445,6 +25529,9 @@ let AIModelEntity = class AIModelEntity extends BaseEntity {
25445
25529
  get InputTokenLimit() {
25446
25530
  return this.Get('InputTokenLimit');
25447
25531
  }
25532
+ set InputTokenLimit(value) {
25533
+ this.Set('InputTokenLimit', value);
25534
+ }
25448
25535
  /**
25449
25536
  * * Field Name: SupportedResponseFormats
25450
25537
  * * Display Name: Supported Response Formats
@@ -25453,6 +25540,9 @@ let AIModelEntity = class AIModelEntity extends BaseEntity {
25453
25540
  get SupportedResponseFormats() {
25454
25541
  return this.Get('SupportedResponseFormats');
25455
25542
  }
25543
+ set SupportedResponseFormats(value) {
25544
+ this.Set('SupportedResponseFormats', value);
25545
+ }
25456
25546
  /**
25457
25547
  * * Field Name: SupportsEffortLevel
25458
25548
  * * Display Name: Supports Effort Level
@@ -25461,6 +25551,9 @@ let AIModelEntity = class AIModelEntity extends BaseEntity {
25461
25551
  get SupportsEffortLevel() {
25462
25552
  return this.Get('SupportsEffortLevel');
25463
25553
  }
25554
+ set SupportsEffortLevel(value) {
25555
+ this.Set('SupportsEffortLevel', value);
25556
+ }
25464
25557
  };
25465
25558
  AIModelEntity = __decorate([
25466
25559
  RegisterClass(BaseEntity, 'AI Models')
@@ -25694,6 +25787,41 @@ let AIPromptEntity = class AIPromptEntity extends BaseEntity {
25694
25787
  return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
25695
25788
  }
25696
25789
  /**
25790
+ * AI Prompts - Delete method override to wrap in transaction since CascadeDeletes is true.
25791
+ * Wrapping in a transaction ensures that all cascade delete operations are handled atomically.
25792
+ * @public
25793
+ * @method
25794
+ * @override
25795
+ * @memberof AIPromptEntity
25796
+ * @returns {Promise<boolean>} - true if successful, false otherwise
25797
+ */
25798
+ async Delete(options) {
25799
+ if (Metadata.Provider.ProviderType === ProviderType.Database) {
25800
+ // For database providers, use the transaction methods directly
25801
+ const provider = Metadata.Provider;
25802
+ try {
25803
+ await provider.BeginTransaction();
25804
+ const result = await super.Delete(options);
25805
+ if (result) {
25806
+ await provider.CommitTransaction();
25807
+ return true;
25808
+ }
25809
+ else {
25810
+ await provider.RollbackTransaction();
25811
+ return false;
25812
+ }
25813
+ }
25814
+ catch (error) {
25815
+ await provider.RollbackTransaction();
25816
+ throw error;
25817
+ }
25818
+ }
25819
+ else {
25820
+ // For network providers, cascading deletes are handled server-side
25821
+ return super.Delete(options);
25822
+ }
25823
+ }
25824
+ /**
25697
25825
  * Validate() method override for AI Prompts entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
25698
25826
  * * CacheSimilarityThreshold: This rule ensures that the "CacheSimilarityThreshold" value, if provided, must be between 0 and 1 (including both 0 and 1). If it is not set, there is no restriction.
25699
25827
  * * CacheTTLSeconds: This rule ensures that if a cache time-to-live (CacheTTLSeconds) value is provided, it must be greater than zero. If it is not set, that's allowed.
@@ -26781,7 +26909,7 @@ let AIResultCacheEntity = class AIResultCacheEntity extends BaseEntity {
26781
26909
  }
26782
26910
  /**
26783
26911
  * * Field Name: PromptRunID
26784
- * * Display Name: Prompt Run
26912
+ * * Display Name: Prompt Run ID
26785
26913
  * * SQL Data Type: uniqueidentifier
26786
26914
  * * Related Entity/Foreign Key: MJ: AI Prompt Runs (vwAIPromptRuns.ID)
26787
26915
  * * Description: Reference to the AIPromptRun that created this cache entry.
@@ -31803,7 +31931,7 @@ let ConversationEntity = class ConversationEntity extends BaseEntity {
31803
31931
  }
31804
31932
  /**
31805
31933
  * * Field Name: LinkedRecordID
31806
- * * Display Name: Linked Record ID
31934
+ * * Display Name: Linked Record
31807
31935
  * * SQL Data Type: nvarchar(500)
31808
31936
  * * Description: ID of a related record this conversation is about (support ticket, order, etc.).
31809
31937
  */
@@ -33219,7 +33347,7 @@ let DuplicateRunDetailEntity = class DuplicateRunDetailEntity extends BaseEntity
33219
33347
  }
33220
33348
  /**
33221
33349
  * * Field Name: DuplicateRunID
33222
- * * Display Name: Duplicate Run ID
33350
+ * * Display Name: Duplicate Run
33223
33351
  * * SQL Data Type: uniqueidentifier
33224
33352
  * * Related Entity/Foreign Key: Duplicate Runs (vwDuplicateRuns.ID)
33225
33353
  */
@@ -33231,7 +33359,7 @@ let DuplicateRunDetailEntity = class DuplicateRunDetailEntity extends BaseEntity
33231
33359
  }
33232
33360
  /**
33233
33361
  * * Field Name: RecordID
33234
- * * Display Name: Record ID
33362
+ * * Display Name: Record
33235
33363
  * * SQL Data Type: nvarchar(500)
33236
33364
  * * Description: The ID of the record being analyzed for duplicates.
33237
33365
  */
@@ -33682,7 +33810,7 @@ let EmployeeCompanyIntegrationEntity = class EmployeeCompanyIntegrationEntity ex
33682
33810
  }
33683
33811
  /**
33684
33812
  * * Field Name: Employee
33685
- * * Display Name: Employee
33813
+ * * Display Name: Employee Name
33686
33814
  * * SQL Data Type: nvarchar(81)
33687
33815
  */
33688
33816
  get Employee() {
@@ -33785,7 +33913,7 @@ let EmployeeRoleEntity = class EmployeeRoleEntity extends BaseEntity {
33785
33913
  }
33786
33914
  /**
33787
33915
  * * Field Name: Employee
33788
- * * Display Name: Employee
33916
+ * * Display Name: Employee Name
33789
33917
  * * SQL Data Type: nvarchar(81)
33790
33918
  */
33791
33919
  get Employee() {
@@ -33888,7 +34016,7 @@ let EmployeeSkillEntity = class EmployeeSkillEntity extends BaseEntity {
33888
34016
  }
33889
34017
  /**
33890
34018
  * * Field Name: Employee
33891
- * * Display Name: Employee Name
34019
+ * * Display Name: Employee
33892
34020
  * * SQL Data Type: nvarchar(81)
33893
34021
  */
33894
34022
  get Employee() {
@@ -35052,7 +35180,7 @@ let EntityActionFilterEntity = class EntityActionFilterEntity extends BaseEntity
35052
35180
  }
35053
35181
  /**
35054
35182
  * * Field Name: EntityAction
35055
- * * Display Name: Entity Action
35183
+ * * Display Name: Action Name
35056
35184
  * * SQL Data Type: nvarchar(425)
35057
35185
  */
35058
35186
  get EntityAction() {
@@ -35060,7 +35188,7 @@ let EntityActionFilterEntity = class EntityActionFilterEntity extends BaseEntity
35060
35188
  }
35061
35189
  /**
35062
35190
  * * Field Name: ActionFilter
35063
- * * Display Name: Action Filter
35191
+ * * Display Name: Filter Name
35064
35192
  * * SQL Data Type: nvarchar(MAX)
35065
35193
  */
35066
35194
  get ActionFilter() {
@@ -35213,7 +35341,7 @@ let EntityActionInvocationEntity = class EntityActionInvocationEntity extends Ba
35213
35341
  }
35214
35342
  /**
35215
35343
  * * Field Name: EntityActionID
35216
- * * Display Name: Entity Action ID
35344
+ * * Display Name: Entity Action
35217
35345
  * * SQL Data Type: uniqueidentifier
35218
35346
  * * Related Entity/Foreign Key: Entity Actions (vwEntityActions.ID)
35219
35347
  */
@@ -35225,7 +35353,7 @@ let EntityActionInvocationEntity = class EntityActionInvocationEntity extends Ba
35225
35353
  }
35226
35354
  /**
35227
35355
  * * Field Name: InvocationTypeID
35228
- * * Display Name: Invocation Type ID
35356
+ * * Display Name: Invocation Type
35229
35357
  * * SQL Data Type: uniqueidentifier
35230
35358
  * * Related Entity/Foreign Key: Entity Action Invocation Types (vwEntityActionInvocationTypes.ID)
35231
35359
  */
@@ -35273,7 +35401,7 @@ let EntityActionInvocationEntity = class EntityActionInvocationEntity extends Ba
35273
35401
  }
35274
35402
  /**
35275
35403
  * * Field Name: EntityAction
35276
- * * Display Name: Entity Action
35404
+ * * Display Name: Action
35277
35405
  * * SQL Data Type: nvarchar(425)
35278
35406
  */
35279
35407
  get EntityAction() {
@@ -35334,7 +35462,7 @@ let EntityActionParamEntity = class EntityActionParamEntity extends BaseEntity {
35334
35462
  }
35335
35463
  /**
35336
35464
  * * Field Name: EntityActionID
35337
- * * Display Name: Entity Action
35465
+ * * Display Name: Entity Action Id
35338
35466
  * * SQL Data Type: uniqueidentifier
35339
35467
  * * Related Entity/Foreign Key: Entity Actions (vwEntityActions.ID)
35340
35468
  */
@@ -35346,7 +35474,7 @@ let EntityActionParamEntity = class EntityActionParamEntity extends BaseEntity {
35346
35474
  }
35347
35475
  /**
35348
35476
  * * Field Name: ActionParamID
35349
- * * Display Name: Action Parameter
35477
+ * * Display Name: Action Parameter Id
35350
35478
  * * SQL Data Type: uniqueidentifier
35351
35479
  * * Related Entity/Foreign Key: Action Params (vwActionParams.ID)
35352
35480
  */
@@ -35418,7 +35546,7 @@ let EntityActionParamEntity = class EntityActionParamEntity extends BaseEntity {
35418
35546
  }
35419
35547
  /**
35420
35548
  * * Field Name: EntityAction
35421
- * * Display Name: Action Name
35549
+ * * Display Name: Entity Action
35422
35550
  * * SQL Data Type: nvarchar(425)
35423
35551
  */
35424
35552
  get EntityAction() {
@@ -35849,7 +35977,7 @@ let EntityCommunicationFieldEntity = class EntityCommunicationFieldEntity extend
35849
35977
  }
35850
35978
  /**
35851
35979
  * * Field Name: EntityCommunicationMessageTypeID
35852
- * * Display Name: Entity Communication Message Type
35980
+ * * Display Name: Message Type ID
35853
35981
  * * SQL Data Type: uniqueidentifier
35854
35982
  * * Related Entity/Foreign Key: Entity Communication Message Types (vwEntityCommunicationMessageTypes.ID)
35855
35983
  */
@@ -38725,7 +38853,7 @@ let ErrorLogEntity = class ErrorLogEntity extends BaseEntity {
38725
38853
  }
38726
38854
  /**
38727
38855
  * * Field Name: Code
38728
- * * Display Name: Code
38856
+ * * Display Name: Error Code
38729
38857
  * * SQL Data Type: nchar(20)
38730
38858
  * * Description: Error code for categorizing and handling specific error types.
38731
38859
  */
@@ -40014,6 +40142,7 @@ let IntegrationURLFormatEntity = class IntegrationURLFormatEntity extends BaseEn
40014
40142
  }
40015
40143
  /**
40016
40144
  * * Field Name: URLFormat
40145
+ * * Display Name: URL Format
40017
40146
  * * SQL Data Type: nvarchar(500)
40018
40147
  * * Description: The URL Format for the given integration including the ability to include markup with fields from the integration
40019
40148
  */
@@ -43348,6 +43477,41 @@ let AIAgentRunStepEntity = class AIAgentRunStepEntity extends BaseEntity {
43348
43477
  return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
43349
43478
  }
43350
43479
  /**
43480
+ * MJ: AI Agent Run Steps - Delete method override to wrap in transaction since CascadeDeletes is true.
43481
+ * Wrapping in a transaction ensures that all cascade delete operations are handled atomically.
43482
+ * @public
43483
+ * @method
43484
+ * @override
43485
+ * @memberof AIAgentRunStepEntity
43486
+ * @returns {Promise<boolean>} - true if successful, false otherwise
43487
+ */
43488
+ async Delete(options) {
43489
+ if (Metadata.Provider.ProviderType === ProviderType.Database) {
43490
+ // For database providers, use the transaction methods directly
43491
+ const provider = Metadata.Provider;
43492
+ try {
43493
+ await provider.BeginTransaction();
43494
+ const result = await super.Delete(options);
43495
+ if (result) {
43496
+ await provider.CommitTransaction();
43497
+ return true;
43498
+ }
43499
+ else {
43500
+ await provider.RollbackTransaction();
43501
+ return false;
43502
+ }
43503
+ }
43504
+ catch (error) {
43505
+ await provider.RollbackTransaction();
43506
+ throw error;
43507
+ }
43508
+ }
43509
+ else {
43510
+ // For network providers, cascading deletes are handled server-side
43511
+ return super.Delete(options);
43512
+ }
43513
+ }
43514
+ /**
43351
43515
  * Validate() method override for MJ: AI Agent Run Steps entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
43352
43516
  * * FinalPayloadValidationResult: The FinalPayloadValidationResult field can be empty, but if a value is set it must be one of the allowed outcomes: Warn, Fail, Retry, or Pass. This ensures that only valid validation results are stored.
43353
43517
  * * StepNumber: This rule ensures that the step number must be greater than zero.
@@ -43692,7 +43856,7 @@ detailed information about what validation rules failed.
43692
43856
  }
43693
43857
  /**
43694
43858
  * * Field Name: Parent
43695
- * * Display Name: Parent Step
43859
+ * * Display Name: Parent
43696
43860
  * * SQL Data Type: nvarchar(255)
43697
43861
  */
43698
43862
  get Parent() {
@@ -43740,6 +43904,41 @@ let AIAgentRunEntity = class AIAgentRunEntity extends BaseEntity {
43740
43904
  return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
43741
43905
  }
43742
43906
  /**
43907
+ * MJ: AI Agent Runs - Delete method override to wrap in transaction since CascadeDeletes is true.
43908
+ * Wrapping in a transaction ensures that all cascade delete operations are handled atomically.
43909
+ * @public
43910
+ * @method
43911
+ * @override
43912
+ * @memberof AIAgentRunEntity
43913
+ * @returns {Promise<boolean>} - true if successful, false otherwise
43914
+ */
43915
+ async Delete(options) {
43916
+ if (Metadata.Provider.ProviderType === ProviderType.Database) {
43917
+ // For database providers, use the transaction methods directly
43918
+ const provider = Metadata.Provider;
43919
+ try {
43920
+ await provider.BeginTransaction();
43921
+ const result = await super.Delete(options);
43922
+ if (result) {
43923
+ await provider.CommitTransaction();
43924
+ return true;
43925
+ }
43926
+ else {
43927
+ await provider.RollbackTransaction();
43928
+ return false;
43929
+ }
43930
+ }
43931
+ catch (error) {
43932
+ await provider.RollbackTransaction();
43933
+ throw error;
43934
+ }
43935
+ }
43936
+ else {
43937
+ // For network providers, cascading deletes are handled server-side
43938
+ return super.Delete(options);
43939
+ }
43940
+ }
43941
+ /**
43743
43942
  * Validate() method override for MJ: AI Agent Runs entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
43744
43943
  * * EffortLevel: This rule ensures that the effort level, if specified, must be a number between 1 and 100, inclusive.
43745
43944
  * * FinalStep: The FinalStep field can be left empty, but if a value is provided it must be one of the approved step names – While, ForEach, Chat, Sub-Agent, Actions, Retry, Failed, or Success. This ensures only valid workflow steps are recorded.
@@ -44666,6 +44865,41 @@ let AIAgentStepEntity = class AIAgentStepEntity extends BaseEntity {
44666
44865
  return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
44667
44866
  }
44668
44867
  /**
44868
+ * MJ: AI Agent Steps - Delete method override to wrap in transaction since CascadeDeletes is true.
44869
+ * Wrapping in a transaction ensures that all cascade delete operations are handled atomically.
44870
+ * @public
44871
+ * @method
44872
+ * @override
44873
+ * @memberof AIAgentStepEntity
44874
+ * @returns {Promise<boolean>} - true if successful, false otherwise
44875
+ */
44876
+ async Delete(options) {
44877
+ if (Metadata.Provider.ProviderType === ProviderType.Database) {
44878
+ // For database providers, use the transaction methods directly
44879
+ const provider = Metadata.Provider;
44880
+ try {
44881
+ await provider.BeginTransaction();
44882
+ const result = await super.Delete(options);
44883
+ if (result) {
44884
+ await provider.CommitTransaction();
44885
+ return true;
44886
+ }
44887
+ else {
44888
+ await provider.RollbackTransaction();
44889
+ return false;
44890
+ }
44891
+ }
44892
+ catch (error) {
44893
+ await provider.RollbackTransaction();
44894
+ throw error;
44895
+ }
44896
+ }
44897
+ else {
44898
+ // For network providers, cascading deletes are handled server-side
44899
+ return super.Delete(options);
44900
+ }
44901
+ }
44902
+ /**
44669
44903
  * Validate() method override for MJ: AI Agent Steps entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
44670
44904
  * * RetryCount: This rule ensures that the number of retries allowed cannot be negative.
44671
44905
  * * TimeoutSeconds: This rule ensures that, if provided, the timeout value must be greater than zero seconds.
@@ -45558,6 +45792,41 @@ let AIConfigurationEntity = class AIConfigurationEntity extends BaseEntity {
45558
45792
  return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
45559
45793
  }
45560
45794
  /**
45795
+ * MJ: AI Configurations - Delete method override to wrap in transaction since CascadeDeletes is true.
45796
+ * Wrapping in a transaction ensures that all cascade delete operations are handled atomically.
45797
+ * @public
45798
+ * @method
45799
+ * @override
45800
+ * @memberof AIConfigurationEntity
45801
+ * @returns {Promise<boolean>} - true if successful, false otherwise
45802
+ */
45803
+ async Delete(options) {
45804
+ if (Metadata.Provider.ProviderType === ProviderType.Database) {
45805
+ // For database providers, use the transaction methods directly
45806
+ const provider = Metadata.Provider;
45807
+ try {
45808
+ await provider.BeginTransaction();
45809
+ const result = await super.Delete(options);
45810
+ if (result) {
45811
+ await provider.CommitTransaction();
45812
+ return true;
45813
+ }
45814
+ else {
45815
+ await provider.RollbackTransaction();
45816
+ return false;
45817
+ }
45818
+ }
45819
+ catch (error) {
45820
+ await provider.RollbackTransaction();
45821
+ throw error;
45822
+ }
45823
+ }
45824
+ else {
45825
+ // For network providers, cascading deletes are handled server-side
45826
+ return super.Delete(options);
45827
+ }
45828
+ }
45829
+ /**
45561
45830
  * * Field Name: ID
45562
45831
  * * Display Name: ID
45563
45832
  * * SQL Data Type: uniqueidentifier
@@ -48048,6 +48317,41 @@ let AIPromptRunEntity = class AIPromptRunEntity extends BaseEntity {
48048
48317
  return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
48049
48318
  }
48050
48319
  /**
48320
+ * MJ: AI Prompt Runs - Delete method override to wrap in transaction since CascadeDeletes is true.
48321
+ * Wrapping in a transaction ensures that all cascade delete operations are handled atomically.
48322
+ * @public
48323
+ * @method
48324
+ * @override
48325
+ * @memberof AIPromptRunEntity
48326
+ * @returns {Promise<boolean>} - true if successful, false otherwise
48327
+ */
48328
+ async Delete(options) {
48329
+ if (Metadata.Provider.ProviderType === ProviderType.Database) {
48330
+ // For database providers, use the transaction methods directly
48331
+ const provider = Metadata.Provider;
48332
+ try {
48333
+ await provider.BeginTransaction();
48334
+ const result = await super.Delete(options);
48335
+ if (result) {
48336
+ await provider.CommitTransaction();
48337
+ return true;
48338
+ }
48339
+ else {
48340
+ await provider.RollbackTransaction();
48341
+ return false;
48342
+ }
48343
+ }
48344
+ catch (error) {
48345
+ await provider.RollbackTransaction();
48346
+ throw error;
48347
+ }
48348
+ }
48349
+ else {
48350
+ // For network providers, cascading deletes are handled server-side
48351
+ return super.Delete(options);
48352
+ }
48353
+ }
48354
+ /**
48051
48355
  * Validate() method override for MJ: AI Prompt Runs entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
48052
48356
  * * EffortLevel: This rule ensures that if an effort level is provided, it must be between 1 and 100, inclusive.
48053
48357
  * * Table-Level: This rule ensures that if the 'CompletedAt' date is provided, it must be the same as or later than the 'RunAt' date. If 'CompletedAt' is not specified, there is no restriction.
@@ -53820,7 +54124,7 @@ let ConversationDetailArtifactEntity = class ConversationDetailArtifactEntity ex
53820
54124
  }
53821
54125
  /**
53822
54126
  * * Field Name: ConversationDetail
53823
- * * Display Name: Conversation Message
54127
+ * * Display Name: Conversation Text
53824
54128
  * * SQL Data Type: nvarchar(MAX)
53825
54129
  */
53826
54130
  get ConversationDetail() {
@@ -54244,7 +54548,7 @@ let ConversationDetailRatingEntity = class ConversationDetailRatingEntity extend
54244
54548
  }
54245
54549
  /**
54246
54550
  * * Field Name: ConversationDetail
54247
- * * Display Name: Conversation Detail
54551
+ * * Display Name: Conversation Message
54248
54552
  * * SQL Data Type: nvarchar(MAX)
54249
54553
  */
54250
54554
  get ConversationDetail() {
@@ -61232,7 +61536,7 @@ let TaskEntity = class TaskEntity extends BaseEntity {
61232
61536
  }
61233
61537
  /**
61234
61538
  * * Field Name: ParentID
61235
- * * Display Name: Parent
61539
+ * * Display Name: Parent ID
61236
61540
  * * SQL Data Type: uniqueidentifier
61237
61541
  * * Related Entity/Foreign Key: MJ: Tasks (vwTasks.ID)
61238
61542
  */
@@ -61268,7 +61572,7 @@ let TaskEntity = class TaskEntity extends BaseEntity {
61268
61572
  }
61269
61573
  /**
61270
61574
  * * Field Name: TypeID
61271
- * * Display Name: Type
61575
+ * * Display Name: Type ID
61272
61576
  * * SQL Data Type: uniqueidentifier
61273
61577
  * * Related Entity/Foreign Key: MJ: Task Types (vwTaskTypes.ID)
61274
61578
  */
@@ -61280,7 +61584,7 @@ let TaskEntity = class TaskEntity extends BaseEntity {
61280
61584
  }
61281
61585
  /**
61282
61586
  * * Field Name: EnvironmentID
61283
- * * Display Name: Environment
61587
+ * * Display Name: Environment ID
61284
61588
  * * SQL Data Type: uniqueidentifier
61285
61589
  * * Related Entity/Foreign Key: MJ: Environments (vwEnvironments.ID)
61286
61590
  * * Default Value: F51358F3-9447-4176-B313-BF8025FD8D09
@@ -61293,7 +61597,7 @@ let TaskEntity = class TaskEntity extends BaseEntity {
61293
61597
  }
61294
61598
  /**
61295
61599
  * * Field Name: ProjectID
61296
- * * Display Name: Project
61600
+ * * Display Name: Project ID
61297
61601
  * * SQL Data Type: uniqueidentifier
61298
61602
  * * Related Entity/Foreign Key: MJ: Projects (vwProjects.ID)
61299
61603
  */
@@ -61305,7 +61609,7 @@ let TaskEntity = class TaskEntity extends BaseEntity {
61305
61609
  }
61306
61610
  /**
61307
61611
  * * Field Name: ConversationDetailID
61308
- * * Display Name: Conversation Detail
61612
+ * * Display Name: Conversation Detail ID
61309
61613
  * * SQL Data Type: uniqueidentifier
61310
61614
  * * Related Entity/Foreign Key: Conversation Details (vwConversationDetails.ID)
61311
61615
  */
@@ -61317,7 +61621,7 @@ let TaskEntity = class TaskEntity extends BaseEntity {
61317
61621
  }
61318
61622
  /**
61319
61623
  * * Field Name: UserID
61320
- * * Display Name: User
61624
+ * * Display Name: User ID
61321
61625
  * * SQL Data Type: uniqueidentifier
61322
61626
  * * Related Entity/Foreign Key: Users (vwUsers.ID)
61323
61627
  */
@@ -61329,7 +61633,7 @@ let TaskEntity = class TaskEntity extends BaseEntity {
61329
61633
  }
61330
61634
  /**
61331
61635
  * * Field Name: AgentID
61332
- * * Display Name: Agent
61636
+ * * Display Name: Agent ID
61333
61637
  * * SQL Data Type: uniqueidentifier
61334
61638
  * * Related Entity/Foreign Key: AI Agents (vwAIAgents.ID)
61335
61639
  */
@@ -61430,7 +61734,7 @@ let TaskEntity = class TaskEntity extends BaseEntity {
61430
61734
  }
61431
61735
  /**
61432
61736
  * * Field Name: Parent
61433
- * * Display Name: Parent
61737
+ * * Display Name: Parent Name
61434
61738
  * * SQL Data Type: nvarchar(255)
61435
61739
  */
61436
61740
  get Parent() {
@@ -61438,7 +61742,7 @@ let TaskEntity = class TaskEntity extends BaseEntity {
61438
61742
  }
61439
61743
  /**
61440
61744
  * * Field Name: Type
61441
- * * Display Name: Type
61745
+ * * Display Name: Type Name
61442
61746
  * * SQL Data Type: nvarchar(255)
61443
61747
  */
61444
61748
  get Type() {
@@ -61446,7 +61750,7 @@ let TaskEntity = class TaskEntity extends BaseEntity {
61446
61750
  }
61447
61751
  /**
61448
61752
  * * Field Name: Environment
61449
- * * Display Name: Environment
61753
+ * * Display Name: Environment Name
61450
61754
  * * SQL Data Type: nvarchar(255)
61451
61755
  */
61452
61756
  get Environment() {
@@ -61454,7 +61758,7 @@ let TaskEntity = class TaskEntity extends BaseEntity {
61454
61758
  }
61455
61759
  /**
61456
61760
  * * Field Name: Project
61457
- * * Display Name: Project
61761
+ * * Display Name: Project Name
61458
61762
  * * SQL Data Type: nvarchar(255)
61459
61763
  */
61460
61764
  get Project() {
@@ -61470,7 +61774,7 @@ let TaskEntity = class TaskEntity extends BaseEntity {
61470
61774
  }
61471
61775
  /**
61472
61776
  * * Field Name: User
61473
- * * Display Name: User
61777
+ * * Display Name: User Name
61474
61778
  * * SQL Data Type: nvarchar(100)
61475
61779
  */
61476
61780
  get User() {
@@ -61478,7 +61782,7 @@ let TaskEntity = class TaskEntity extends BaseEntity {
61478
61782
  }
61479
61783
  /**
61480
61784
  * * Field Name: Agent
61481
- * * Display Name: Agent
61785
+ * * Display Name: Agent Name
61482
61786
  * * SQL Data Type: nvarchar(255)
61483
61787
  */
61484
61788
  get Agent() {
@@ -61486,7 +61790,7 @@ let TaskEntity = class TaskEntity extends BaseEntity {
61486
61790
  }
61487
61791
  /**
61488
61792
  * * Field Name: RootParentID
61489
- * * Display Name: Root Parent
61793
+ * * Display Name: Root Parent ID
61490
61794
  * * SQL Data Type: uniqueidentifier
61491
61795
  */
61492
61796
  get RootParentID() {
@@ -66450,7 +66754,7 @@ let RecommendationItemEntity = class RecommendationItemEntity extends BaseEntity
66450
66754
  }
66451
66755
  /**
66452
66756
  * * Field Name: RecommendationID
66453
- * * Display Name: Recommendation ID
66757
+ * * Display Name: Recommendation
66454
66758
  * * SQL Data Type: uniqueidentifier
66455
66759
  * * Related Entity/Foreign Key: Recommendations (vwRecommendations.ID)
66456
66760
  */
@@ -66462,7 +66766,7 @@ let RecommendationItemEntity = class RecommendationItemEntity extends BaseEntity
66462
66766
  }
66463
66767
  /**
66464
66768
  * * Field Name: DestinationEntityID
66465
- * * Display Name: Destination Entity ID
66769
+ * * Display Name: Destination Entity
66466
66770
  * * SQL Data Type: uniqueidentifier
66467
66771
  * * Related Entity/Foreign Key: Entities (vwEntities.ID)
66468
66772
  */
@@ -66474,7 +66778,7 @@ let RecommendationItemEntity = class RecommendationItemEntity extends BaseEntity
66474
66778
  }
66475
66779
  /**
66476
66780
  * * Field Name: DestinationEntityRecordID
66477
- * * Display Name: Destination Entity Record ID
66781
+ * * Display Name: Destination Record ID
66478
66782
  * * SQL Data Type: nvarchar(450)
66479
66783
  * * Description: The record ID of the destination entity
66480
66784
  */
@@ -66843,7 +67147,7 @@ let RecommendationEntity = class RecommendationEntity extends BaseEntity {
66843
67147
  }
66844
67148
  /**
66845
67149
  * * Field Name: SourceEntityRecordID
66846
- * * Display Name: Source Record ID
67150
+ * * Display Name: Source Entity Record ID
66847
67151
  * * SQL Data Type: nvarchar(MAX)
66848
67152
  * * Description: The record ID of the source entity
66849
67153
  */
@@ -66873,7 +67177,7 @@ let RecommendationEntity = class RecommendationEntity extends BaseEntity {
66873
67177
  }
66874
67178
  /**
66875
67179
  * * Field Name: RecommendationRun
66876
- * * Display Name: Recommendation Run
67180
+ * * Display Name: Run
66877
67181
  * * SQL Data Type: nvarchar(255)
66878
67182
  */
66879
67183
  get RecommendationRun() {
@@ -67059,7 +67363,7 @@ let RecordChangeEntity = class RecordChangeEntity extends BaseEntity {
67059
67363
  }
67060
67364
  /**
67061
67365
  * * Field Name: EntityID
67062
- * * Display Name: Entity
67366
+ * * Display Name: Entity ID
67063
67367
  * * SQL Data Type: uniqueidentifier
67064
67368
  * * Related Entity/Foreign Key: Entities (vwEntities.ID)
67065
67369
  */
@@ -67083,7 +67387,7 @@ let RecordChangeEntity = class RecordChangeEntity extends BaseEntity {
67083
67387
  }
67084
67388
  /**
67085
67389
  * * Field Name: UserID
67086
- * * Display Name: User
67390
+ * * Display Name: User ID
67087
67391
  * * SQL Data Type: uniqueidentifier
67088
67392
  * * Related Entity/Foreign Key: Users (vwUsers.ID)
67089
67393
  */
@@ -67210,7 +67514,7 @@ let RecordChangeEntity = class RecordChangeEntity extends BaseEntity {
67210
67514
  }
67211
67515
  /**
67212
67516
  * * Field Name: ReplayRunID
67213
- * * Display Name: Replay Run
67517
+ * * Display Name: Replay Run ID
67214
67518
  * * SQL Data Type: uniqueidentifier
67215
67519
  * * Related Entity/Foreign Key: Record Change Replay Runs (vwRecordChangeReplayRuns.ID)
67216
67520
  */
@@ -67222,7 +67526,7 @@ let RecordChangeEntity = class RecordChangeEntity extends BaseEntity {
67222
67526
  }
67223
67527
  /**
67224
67528
  * * Field Name: IntegrationID
67225
- * * Display Name: Integration
67529
+ * * Display Name: Integration ID
67226
67530
  * * SQL Data Type: uniqueidentifier
67227
67531
  * * Related Entity/Foreign Key: Integrations (vwIntegrations.ID)
67228
67532
  */
@@ -67342,7 +67646,7 @@ let RecordMergeDeletionLogEntity = class RecordMergeDeletionLogEntity extends Ba
67342
67646
  }
67343
67647
  /**
67344
67648
  * * Field Name: RecordMergeLogID
67345
- * * Display Name: Record Merge Log ID
67649
+ * * Display Name: Record Merge Log
67346
67650
  * * SQL Data Type: uniqueidentifier
67347
67651
  * * Related Entity/Foreign Key: Record Merge Logs (vwRecordMergeLogs.ID)
67348
67652
  */
@@ -68894,6 +69198,7 @@ let RoleEntity = class RoleEntity extends BaseEntity {
68894
69198
  }
68895
69199
  /**
68896
69200
  * * Field Name: SQLName
69201
+ * * Display Name: SQL Name
68897
69202
  * * SQL Data Type: nvarchar(250)
68898
69203
  * * Description: The name of the role in the database, this is used for auto-generating permission statements by CodeGen
68899
69204
  */
@@ -70421,7 +70726,7 @@ let TemplateParamEntity = class TemplateParamEntity extends BaseEntity {
70421
70726
  }
70422
70727
  /**
70423
70728
  * * Field Name: LinkedParameterName
70424
- * * Display Name: Linked Parameter
70729
+ * * Display Name: Linked Parameter Name
70425
70730
  * * SQL Data Type: nvarchar(255)
70426
70731
  * * Description: Only used when Type=Entity, this is used to link an Entity parameter with another parameter so that the rows in the Entity parameter can be filtered automatically based on the FKEY relationship between the Record and this Entity parameter. For example, if the Entity-based parameter is for an entity like Activities and there is another parameter of type Record for an entity like Contacts, in that situation the Activities Parameter would point to the Contacts parameter as the LinkedParameterName because we would filter down the Activities in each template render to only those linked to the Contact.
70427
70732
  */
@@ -70469,7 +70774,7 @@ let TemplateParamEntity = class TemplateParamEntity extends BaseEntity {
70469
70774
  }
70470
70775
  /**
70471
70776
  * * Field Name: RecordID
70472
- * * Display Name: Record ID
70777
+ * * Display Name: Record
70473
70778
  * * SQL Data Type: nvarchar(2000)
70474
70779
  * * Description: Record ID, used only when Type is Record and a specific hardcoded record ID is desired, this is an uncommon use case, helpful for pulling in static types and metadata in some cases.
70475
70780
  */
@@ -70511,7 +70816,7 @@ let TemplateParamEntity = class TemplateParamEntity extends BaseEntity {
70511
70816
  }
70512
70817
  /**
70513
70818
  * * Field Name: TemplateContentID
70514
- * * Display Name: Template Content
70819
+ * * Display Name: Template Content ID
70515
70820
  * * SQL Data Type: uniqueidentifier
70516
70821
  * * Related Entity/Foreign Key: Template Contents (vwTemplateContents.ID)
70517
70822
  * * Description: Optional reference to a specific template content. When NULL, this parameter applies to all content items within the template. When set, this parameter applies only to the specified template content.