@memberjunction/core-entities 5.27.1 → 5.29.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.
@@ -6938,6 +6938,398 @@ export const MJApplicationSchema = z.object({
6938
6938
  * * Default Value: 1
6939
6939
  * * Description: When true, Path is automatically generated from Name on save. Set to false to manually control the Path value. Defaults to true for new applications.`),
6940
6940
  });
6941
+ /**
6942
+ * zod schema definition for the entity MJ: Archive Configuration Entities
6943
+ */
6944
+ export const MJArchiveConfigurationEntitySchema = z.object({
6945
+ ID: z.string().describe(`
6946
+ * * Field Name: ID
6947
+ * * Display Name: ID
6948
+ * * SQL Data Type: uniqueidentifier
6949
+ * * Default Value: newsequentialid()`),
6950
+ ArchiveConfigurationID: z.string().describe(`
6951
+ * * Field Name: ArchiveConfigurationID
6952
+ * * Display Name: Archive Configuration
6953
+ * * SQL Data Type: uniqueidentifier
6954
+ * * Related Entity/Foreign Key: MJ: Archive Configurations (vwArchiveConfigurations.ID)
6955
+ * * Description: Foreign key to the parent ArchiveConfiguration.`),
6956
+ EntityID: z.string().describe(`
6957
+ * * Field Name: EntityID
6958
+ * * Display Name: Entity
6959
+ * * SQL Data Type: uniqueidentifier
6960
+ * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
6961
+ * * Description: Foreign key to the Entity being archived.`),
6962
+ Mode: z.union([z.literal('ArchiveOnly'), z.literal('HardDelete'), z.literal('StripFields')]).nullable().describe(`
6963
+ * * Field Name: Mode
6964
+ * * Display Name: Archive Mode
6965
+ * * SQL Data Type: nvarchar(20)
6966
+ * * Value List Type: List
6967
+ * * Possible Values
6968
+ * * ArchiveOnly
6969
+ * * HardDelete
6970
+ * * StripFields
6971
+ * * Description: Archive mode override for this entity. NULL inherits from the parent configuration's DefaultMode.`),
6972
+ RetentionDays: z.number().nullable().describe(`
6973
+ * * Field Name: RetentionDays
6974
+ * * Display Name: Retention Days
6975
+ * * SQL Data Type: int
6976
+ * * Description: Retention period override in days. NULL inherits from the parent configuration's DefaultRetentionDays.`),
6977
+ DateField: z.string().describe(`
6978
+ * * Field Name: DateField
6979
+ * * Display Name: Date Field
6980
+ * * SQL Data Type: nvarchar(100)
6981
+ * * Default Value: __mj_CreatedAt
6982
+ * * Description: The date field on the entity used to determine record age for retention policy evaluation. Defaults to __mj_CreatedAt.`),
6983
+ FilterExpression: z.string().nullable().describe(`
6984
+ * * Field Name: FilterExpression
6985
+ * * Display Name: Filter Expression
6986
+ * * SQL Data Type: nvarchar(MAX)
6987
+ * * Description: Optional SQL WHERE clause fragment to further filter which records are eligible for archiving (e.g., "Status = 'Closed'").`),
6988
+ BatchSize: z.number().nullable().describe(`
6989
+ * * Field Name: BatchSize
6990
+ * * Display Name: Batch Size
6991
+ * * SQL Data Type: int
6992
+ * * Description: Batch size override for this entity. NULL inherits from the parent configuration's DefaultBatchSize.`),
6993
+ Priority: z.number().describe(`
6994
+ * * Field Name: Priority
6995
+ * * Display Name: Priority
6996
+ * * SQL Data Type: int
6997
+ * * Default Value: 100
6998
+ * * Description: Processing priority — lower numbers are archived first. Default is 100.`),
6999
+ FieldConfiguration: z.string().describe(`
7000
+ * * Field Name: FieldConfiguration
7001
+ * * Display Name: Field Configuration
7002
+ * * SQL Data Type: nvarchar(MAX)
7003
+ * * Description: JSON configuration specifying which fields to include/exclude in the archive output. Required for all modes.`),
7004
+ DriverClass: z.string().nullable().describe(`
7005
+ * * Field Name: DriverClass
7006
+ * * Display Name: Driver Class
7007
+ * * SQL Data Type: nvarchar(500)
7008
+ * * Description: Optional fully-qualified class name of a custom archive driver to use for this entity, overriding the default archiver.`),
7009
+ ArchiveRelatedRecordChanges: z.boolean().nullable().describe(`
7010
+ * * Field Name: ArchiveRelatedRecordChanges
7011
+ * * Display Name: Archive Related Record Changes
7012
+ * * SQL Data Type: bit
7013
+ * * Description: Override for archiving related Record Changes. NULL inherits from the parent configuration.`),
7014
+ IsActive: z.boolean().describe(`
7015
+ * * Field Name: IsActive
7016
+ * * Display Name: Is Active
7017
+ * * SQL Data Type: bit
7018
+ * * Default Value: 1
7019
+ * * Description: Whether this entity is active within the archive configuration.`),
7020
+ __mj_CreatedAt: z.date().describe(`
7021
+ * * Field Name: __mj_CreatedAt
7022
+ * * Display Name: Created At
7023
+ * * SQL Data Type: datetimeoffset
7024
+ * * Default Value: getutcdate()`),
7025
+ __mj_UpdatedAt: z.date().describe(`
7026
+ * * Field Name: __mj_UpdatedAt
7027
+ * * Display Name: Updated At
7028
+ * * SQL Data Type: datetimeoffset
7029
+ * * Default Value: getutcdate()`),
7030
+ ArchiveConfiguration: z.string().describe(`
7031
+ * * Field Name: ArchiveConfiguration
7032
+ * * Display Name: Archive Configuration Name
7033
+ * * SQL Data Type: nvarchar(255)`),
7034
+ Entity: z.string().describe(`
7035
+ * * Field Name: Entity
7036
+ * * Display Name: Entity Name
7037
+ * * SQL Data Type: nvarchar(255)`),
7038
+ });
7039
+ /**
7040
+ * zod schema definition for the entity MJ: Archive Configurations
7041
+ */
7042
+ export const MJArchiveConfigurationSchema = z.object({
7043
+ ID: z.string().describe(`
7044
+ * * Field Name: ID
7045
+ * * Display Name: ID
7046
+ * * SQL Data Type: uniqueidentifier
7047
+ * * Default Value: newsequentialid()`),
7048
+ Name: z.string().describe(`
7049
+ * * Field Name: Name
7050
+ * * Display Name: Name
7051
+ * * SQL Data Type: nvarchar(255)
7052
+ * * Description: Human-readable name for this archive configuration.`),
7053
+ Description: z.string().nullable().describe(`
7054
+ * * Field Name: Description
7055
+ * * Display Name: Description
7056
+ * * SQL Data Type: nvarchar(MAX)`),
7057
+ StorageAccountID: z.string().nullable().describe(`
7058
+ * * Field Name: StorageAccountID
7059
+ * * Display Name: Storage Account
7060
+ * * SQL Data Type: uniqueidentifier
7061
+ * * Related Entity/Foreign Key: MJ: File Storage Accounts (vwFileStorageAccounts.ID)
7062
+ * * Description: Foreign key to FileStorageAccount — the blob/file storage target for archived data.`),
7063
+ RootPath: z.string().describe(`
7064
+ * * Field Name: RootPath
7065
+ * * Display Name: Root Path
7066
+ * * SQL Data Type: nvarchar(500)
7067
+ * * Description: Root path within the storage account where archive files are written (e.g., "archives/production/").`),
7068
+ ArchiveFormat: z.union([z.literal('CSV'), z.literal('JSON'), z.literal('Parquet')]).describe(`
7069
+ * * Field Name: ArchiveFormat
7070
+ * * Display Name: Archive Format
7071
+ * * SQL Data Type: nvarchar(20)
7072
+ * * Default Value: JSON
7073
+ * * Value List Type: List
7074
+ * * Possible Values
7075
+ * * CSV
7076
+ * * JSON
7077
+ * * Parquet
7078
+ * * Description: Output format for archived records: JSON, Parquet, or CSV.`),
7079
+ IsActive: z.boolean().describe(`
7080
+ * * Field Name: IsActive
7081
+ * * Display Name: Is Active
7082
+ * * SQL Data Type: bit
7083
+ * * Default Value: 0
7084
+ * * Description: Whether this configuration is active and eligible for scheduled archive runs.`),
7085
+ DefaultRetentionDays: z.number().describe(`
7086
+ * * Field Name: DefaultRetentionDays
7087
+ * * Display Name: Default Retention Days
7088
+ * * SQL Data Type: int
7089
+ * * Default Value: 365
7090
+ * * Description: Default number of days after which records become eligible for archiving. Can be overridden per entity.`),
7091
+ DefaultMode: z.union([z.literal('ArchiveOnly'), z.literal('HardDelete'), z.literal('StripFields')]).describe(`
7092
+ * * Field Name: DefaultMode
7093
+ * * Display Name: Default Mode
7094
+ * * SQL Data Type: nvarchar(20)
7095
+ * * Default Value: StripFields
7096
+ * * Value List Type: List
7097
+ * * Possible Values
7098
+ * * ArchiveOnly
7099
+ * * HardDelete
7100
+ * * StripFields
7101
+ * * Description: Default archive mode: StripFields (null out specified fields), HardDelete (delete from source after archiving), ArchiveOnly (copy to storage without modifying source).`),
7102
+ DefaultBatchSize: z.number().describe(`
7103
+ * * Field Name: DefaultBatchSize
7104
+ * * Display Name: Default Batch Size
7105
+ * * SQL Data Type: int
7106
+ * * Default Value: 100
7107
+ * * Description: Default number of records to process per batch during archive runs.`),
7108
+ ArchiveRelatedRecordChanges: z.boolean().describe(`
7109
+ * * Field Name: ArchiveRelatedRecordChanges
7110
+ * * Display Name: Archive Related Record Changes
7111
+ * * SQL Data Type: bit
7112
+ * * Default Value: 1
7113
+ * * Description: When enabled, related Record Changes entries are also archived alongside the source records.`),
7114
+ Status: z.union([z.literal('Disabled'), z.literal('Error'), z.literal('Idle'), z.literal('Running')]).describe(`
7115
+ * * Field Name: Status
7116
+ * * Display Name: Status
7117
+ * * SQL Data Type: nvarchar(20)
7118
+ * * Default Value: Idle
7119
+ * * Value List Type: List
7120
+ * * Possible Values
7121
+ * * Disabled
7122
+ * * Error
7123
+ * * Idle
7124
+ * * Running
7125
+ * * Description: Current operational status of this configuration: Idle, Running, Error, or Disabled.`),
7126
+ CreatedByUserID: z.string().describe(`
7127
+ * * Field Name: CreatedByUserID
7128
+ * * Display Name: Created By User ID
7129
+ * * SQL Data Type: uniqueidentifier
7130
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
7131
+ * * Description: The user who created this archive configuration.`),
7132
+ __mj_CreatedAt: z.date().describe(`
7133
+ * * Field Name: __mj_CreatedAt
7134
+ * * Display Name: Created At
7135
+ * * SQL Data Type: datetimeoffset
7136
+ * * Default Value: getutcdate()`),
7137
+ __mj_UpdatedAt: z.date().describe(`
7138
+ * * Field Name: __mj_UpdatedAt
7139
+ * * Display Name: Updated At
7140
+ * * SQL Data Type: datetimeoffset
7141
+ * * Default Value: getutcdate()`),
7142
+ StorageAccount: z.string().nullable().describe(`
7143
+ * * Field Name: StorageAccount
7144
+ * * Display Name: Storage Account Name
7145
+ * * SQL Data Type: nvarchar(200)`),
7146
+ CreatedByUser: z.string().describe(`
7147
+ * * Field Name: CreatedByUser
7148
+ * * Display Name: Created By User
7149
+ * * SQL Data Type: nvarchar(100)`),
7150
+ });
7151
+ /**
7152
+ * zod schema definition for the entity MJ: Archive Run Details
7153
+ */
7154
+ export const MJArchiveRunDetailSchema = z.object({
7155
+ ID: z.string().describe(`
7156
+ * * Field Name: ID
7157
+ * * Display Name: ID
7158
+ * * SQL Data Type: uniqueidentifier
7159
+ * * Default Value: newsequentialid()`),
7160
+ ArchiveRunID: z.string().describe(`
7161
+ * * Field Name: ArchiveRunID
7162
+ * * Display Name: Archive Run
7163
+ * * SQL Data Type: uniqueidentifier
7164
+ * * Related Entity/Foreign Key: MJ: Archive Runs (vwArchiveRuns.ID)
7165
+ * * Description: Foreign key to the parent ArchiveRun.`),
7166
+ EntityID: z.string().describe(`
7167
+ * * Field Name: EntityID
7168
+ * * Display Name: Entity Record
7169
+ * * SQL Data Type: uniqueidentifier
7170
+ * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
7171
+ * * Description: Foreign key to the Entity this record belongs to.`),
7172
+ RecordID: z.string().describe(`
7173
+ * * Field Name: RecordID
7174
+ * * Display Name: Record ID
7175
+ * * SQL Data Type: nvarchar(750)
7176
+ * * Description: The primary key value of the archived record (string representation to support all key types).`),
7177
+ Status: z.union([z.literal('Failed'), z.literal('Skipped'), z.literal('Success')]).describe(`
7178
+ * * Field Name: Status
7179
+ * * Display Name: Status
7180
+ * * SQL Data Type: nvarchar(50)
7181
+ * * Value List Type: List
7182
+ * * Possible Values
7183
+ * * Failed
7184
+ * * Skipped
7185
+ * * Success
7186
+ * * Description: Outcome for this record: Success, Failed, or Skipped.`),
7187
+ StoragePath: z.string().nullable().describe(`
7188
+ * * Field Name: StoragePath
7189
+ * * Display Name: Storage Path
7190
+ * * SQL Data Type: nvarchar(1000)
7191
+ * * Description: Full path to the archived file in storage (e.g., "archives/production/Users/2026/04/record-id.json").`),
7192
+ BytesArchived: z.number().describe(`
7193
+ * * Field Name: BytesArchived
7194
+ * * Display Name: Bytes Archived
7195
+ * * SQL Data Type: bigint
7196
+ * * Default Value: 0
7197
+ * * Description: Number of bytes written to storage for this record.`),
7198
+ ErrorMessage: z.string().nullable().describe(`
7199
+ * * Field Name: ErrorMessage
7200
+ * * Display Name: Error Message
7201
+ * * SQL Data Type: nvarchar(MAX)
7202
+ * * Description: Error details when Status is Failed.`),
7203
+ ArchivedAt: z.date().nullable().describe(`
7204
+ * * Field Name: ArchivedAt
7205
+ * * Display Name: Archived At
7206
+ * * SQL Data Type: datetimeoffset
7207
+ * * Description: Timestamp when this record was successfully archived.`),
7208
+ VersionStamp: z.date().nullable().describe(`
7209
+ * * Field Name: VersionStamp
7210
+ * * Display Name: Version Stamp
7211
+ * * SQL Data Type: datetimeoffset
7212
+ * * Description: The __mj_UpdatedAt timestamp of the record at the time of archiving, used for conflict detection during restore.`),
7213
+ IsRecordChangeArchive: z.boolean().describe(`
7214
+ * * Field Name: IsRecordChangeArchive
7215
+ * * Display Name: Is Record Change Archive
7216
+ * * SQL Data Type: bit
7217
+ * * Default Value: 0
7218
+ * * Description: When true, this detail row represents an archived Record Change entry rather than a primary entity record.`),
7219
+ __mj_CreatedAt: z.date().describe(`
7220
+ * * Field Name: __mj_CreatedAt
7221
+ * * Display Name: Created At
7222
+ * * SQL Data Type: datetimeoffset
7223
+ * * Default Value: getutcdate()`),
7224
+ __mj_UpdatedAt: z.date().describe(`
7225
+ * * Field Name: __mj_UpdatedAt
7226
+ * * Display Name: Updated At
7227
+ * * SQL Data Type: datetimeoffset
7228
+ * * Default Value: getutcdate()`),
7229
+ Entity: z.string().describe(`
7230
+ * * Field Name: Entity
7231
+ * * Display Name: Entity Type
7232
+ * * SQL Data Type: nvarchar(255)`),
7233
+ });
7234
+ /**
7235
+ * zod schema definition for the entity MJ: Archive Runs
7236
+ */
7237
+ export const MJArchiveRunSchema = z.object({
7238
+ ID: z.string().describe(`
7239
+ * * Field Name: ID
7240
+ * * Display Name: ID
7241
+ * * SQL Data Type: uniqueidentifier
7242
+ * * Default Value: newsequentialid()`),
7243
+ ArchiveConfigurationID: z.string().describe(`
7244
+ * * Field Name: ArchiveConfigurationID
7245
+ * * Display Name: Archive Configuration
7246
+ * * SQL Data Type: uniqueidentifier
7247
+ * * Related Entity/Foreign Key: MJ: Archive Configurations (vwArchiveConfigurations.ID)
7248
+ * * Description: Foreign key to the ArchiveConfiguration that was executed.`),
7249
+ StartedAt: z.date().describe(`
7250
+ * * Field Name: StartedAt
7251
+ * * Display Name: Started At
7252
+ * * SQL Data Type: datetimeoffset
7253
+ * * Default Value: getutcdate()
7254
+ * * Description: Timestamp when the archive run started.`),
7255
+ CompletedAt: z.date().nullable().describe(`
7256
+ * * Field Name: CompletedAt
7257
+ * * Display Name: Completed At
7258
+ * * SQL Data Type: datetimeoffset
7259
+ * * Description: Timestamp when the archive run completed (NULL while still running).`),
7260
+ Status: z.union([z.literal('Cancelled'), z.literal('Complete'), z.literal('Failed'), z.literal('PartialSuccess'), z.literal('Running')]).describe(`
7261
+ * * Field Name: Status
7262
+ * * Display Name: Status
7263
+ * * SQL Data Type: nvarchar(50)
7264
+ * * Default Value: Running
7265
+ * * Value List Type: List
7266
+ * * Possible Values
7267
+ * * Cancelled
7268
+ * * Complete
7269
+ * * Failed
7270
+ * * PartialSuccess
7271
+ * * Running
7272
+ * * Description: Current status: Running, Complete, Failed, Cancelled, or PartialSuccess.`),
7273
+ TotalRecords: z.number().describe(`
7274
+ * * Field Name: TotalRecords
7275
+ * * Display Name: Total Records
7276
+ * * SQL Data Type: int
7277
+ * * Default Value: 0
7278
+ * * Description: Total number of records identified for archiving in this run.`),
7279
+ ArchivedRecords: z.number().describe(`
7280
+ * * Field Name: ArchivedRecords
7281
+ * * Display Name: Archived Records
7282
+ * * SQL Data Type: int
7283
+ * * Default Value: 0
7284
+ * * Description: Number of records successfully archived.`),
7285
+ FailedRecords: z.number().describe(`
7286
+ * * Field Name: FailedRecords
7287
+ * * Display Name: Failed Records
7288
+ * * SQL Data Type: int
7289
+ * * Default Value: 0
7290
+ * * Description: Number of records that failed to archive.`),
7291
+ SkippedRecords: z.number().describe(`
7292
+ * * Field Name: SkippedRecords
7293
+ * * Display Name: Skipped Records
7294
+ * * SQL Data Type: int
7295
+ * * Default Value: 0
7296
+ * * Description: Number of records skipped (e.g., already archived or filtered out).`),
7297
+ TotalBytesArchived: z.number().describe(`
7298
+ * * Field Name: TotalBytesArchived
7299
+ * * Display Name: Total Bytes Archived
7300
+ * * SQL Data Type: bigint
7301
+ * * Default Value: 0
7302
+ * * Description: Total bytes written to archive storage during this run.`),
7303
+ ErrorLog: z.string().nullable().describe(`
7304
+ * * Field Name: ErrorLog
7305
+ * * Display Name: Error Log
7306
+ * * SQL Data Type: nvarchar(MAX)
7307
+ * * Description: Aggregated error log for the run. Contains error details when Status is Failed or PartialSuccess.`),
7308
+ UserID: z.string().describe(`
7309
+ * * Field Name: UserID
7310
+ * * Display Name: Initiated By
7311
+ * * SQL Data Type: uniqueidentifier
7312
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
7313
+ * * Description: The user who initiated this archive run.`),
7314
+ __mj_CreatedAt: z.date().describe(`
7315
+ * * Field Name: __mj_CreatedAt
7316
+ * * Display Name: Created At
7317
+ * * SQL Data Type: datetimeoffset
7318
+ * * Default Value: getutcdate()`),
7319
+ __mj_UpdatedAt: z.date().describe(`
7320
+ * * Field Name: __mj_UpdatedAt
7321
+ * * Display Name: Updated At
7322
+ * * SQL Data Type: datetimeoffset
7323
+ * * Default Value: getutcdate()`),
7324
+ ArchiveConfiguration: z.string().describe(`
7325
+ * * Field Name: ArchiveConfiguration
7326
+ * * Display Name: Configuration Name
7327
+ * * SQL Data Type: nvarchar(255)`),
7328
+ User: z.string().describe(`
7329
+ * * Field Name: User
7330
+ * * Display Name: User Name
7331
+ * * SQL Data Type: nvarchar(100)`),
7332
+ });
6941
7333
  /**
6942
7334
  * zod schema definition for the entity MJ: Artifact Permissions
6943
7335
  */
@@ -7057,7 +7449,7 @@ export const MJArtifactTypeSchema = z.object({
7057
7449
  * * Description: Parent artifact type ID for hierarchical artifact type organization. Child types inherit ExtractRules from parent but can override.`),
7058
7450
  ExtractRules: z.string().nullable().describe(`
7059
7451
  * * Field Name: ExtractRules
7060
- * * Display Name: Extract Rules
7452
+ * * Display Name: Extraction Rules
7061
7453
  * * SQL Data Type: nvarchar(MAX)
7062
7454
  * * Description: JSON array of extraction rules defining how to extract attributes from artifact content. Each rule has: name (string), description (string), type (TypeScript type), standardProperty ('name'|'description'|'displayMarkdown'|'displayHtml'|null), extractor (JavaScript code string). Child types inherit parent rules and can override by name.`),
7063
7455
  DriverClass: z.string().nullable().describe(`
@@ -7080,6 +7472,11 @@ export const MJArtifactTypeSchema = z.object({
7080
7472
  * * File
7081
7473
  * * Text
7082
7474
  * * Description: Classifies whether this artifact type stores text content ('Text', the default for all existing types) or a binary file in MJStorage ('File'). Used by AgentRunner and viewer components to route file-based artifacts correctly.`),
7475
+ ToolLibraryClass: z.string().nullable().describe(`
7476
+ * * Field Name: ToolLibraryClass
7477
+ * * Display Name: Tool Library Class
7478
+ * * SQL Data Type: nvarchar(100)
7479
+ * * Description: Class name for the BaseArtifactToolLibrary subclass that provides type-specific artifact exploration tools for agents. Resolved via ClassFactory. When NULL, ArtifactToolManager uses name-based fallback resolution.`),
7083
7480
  Parent: z.string().nullable().describe(`
7084
7481
  * * Field Name: Parent
7085
7482
  * * Display Name: Parent
@@ -15679,7 +16076,7 @@ export const MJIntegrationObjectFieldSchema = z.object({
15679
16076
  * * Description: Foreign key to the IntegrationObject this field belongs to`),
15680
16077
  Name: z.string().describe(`
15681
16078
  * * Field Name: Name
15682
- * * Display Name: Name
16079
+ * * Display Name: Field Name
15683
16080
  * * SQL Data Type: nvarchar(255)
15684
16081
  * * Description: Field name as returned by the external API`),
15685
16082
  DisplayName: z.string().nullable().describe(`
@@ -15699,7 +16096,7 @@ export const MJIntegrationObjectFieldSchema = z.object({
15699
16096
  * * Description: UI grouping category within the object`),
15700
16097
  Type: z.string().describe(`
15701
16098
  * * Field Name: Type
15702
- * * Display Name: Type
16099
+ * * Display Name: Data Type
15703
16100
  * * SQL Data Type: nvarchar(100)
15704
16101
  * * Description: Data type of the field (e.g., nvarchar, int, datetime, decimal, bit). Uses same type vocabulary as EntityField.`),
15705
16102
  Length: z.number().nullable().describe(`
@@ -15730,25 +16127,25 @@ export const MJIntegrationObjectFieldSchema = z.object({
15730
16127
  * * Description: Default value from the source system`),
15731
16128
  IsPrimaryKey: z.boolean().describe(`
15732
16129
  * * Field Name: IsPrimaryKey
15733
- * * Display Name: Primary Key
16130
+ * * Display Name: Is Primary Key
15734
16131
  * * SQL Data Type: bit
15735
16132
  * * Default Value: 0
15736
16133
  * * Description: Whether this field is part of the object primary key`),
15737
16134
  IsUniqueKey: z.boolean().describe(`
15738
16135
  * * Field Name: IsUniqueKey
15739
- * * Display Name: Unique Key
16136
+ * * Display Name: Is Unique Key
15740
16137
  * * SQL Data Type: bit
15741
16138
  * * Default Value: 0
15742
16139
  * * Description: Whether values must be unique across all records`),
15743
16140
  IsReadOnly: z.boolean().describe(`
15744
16141
  * * Field Name: IsReadOnly
15745
- * * Display Name: Read Only
16142
+ * * Display Name: Is Read Only
15746
16143
  * * SQL Data Type: bit
15747
16144
  * * Default Value: 0
15748
16145
  * * Description: Whether this field cannot be written back to the source system`),
15749
16146
  IsRequired: z.boolean().describe(`
15750
16147
  * * Field Name: IsRequired
15751
- * * Display Name: Required
16148
+ * * Display Name: Is Required
15752
16149
  * * SQL Data Type: bit
15753
16150
  * * Default Value: 0
15754
16151
  * * Description: Whether this field is required for create/update operations`),
@@ -15795,6 +16192,12 @@ export const MJIntegrationObjectFieldSchema = z.object({
15795
16192
  * * Display Name: Updated At
15796
16193
  * * SQL Data Type: datetimeoffset
15797
16194
  * * Default Value: getutcdate()`),
16195
+ IsCustom: z.boolean().describe(`
16196
+ * * Field Name: IsCustom
16197
+ * * Display Name: Is Custom
16198
+ * * SQL Data Type: bit
16199
+ * * Default Value: 0
16200
+ * * Description: When true, this field was dynamically discovered by IntrospectSchema and is not defined in static connector metadata.`),
15798
16201
  IntegrationObject: z.string().describe(`
15799
16202
  * * Field Name: IntegrationObject
15800
16203
  * * Display Name: Integration Object Name
@@ -15816,7 +16219,7 @@ export const MJIntegrationObjectSchema = z.object({
15816
16219
  * * Description: Primary key`),
15817
16220
  IntegrationID: z.string().describe(`
15818
16221
  * * Field Name: IntegrationID
15819
- * * Display Name: Integration
16222
+ * * Display Name: Integration ID
15820
16223
  * * SQL Data Type: uniqueidentifier
15821
16224
  * * Related Entity/Foreign Key: MJ: Integrations (vwIntegrations.ID)
15822
16225
  * * Description: Foreign key to the Integration that owns this object`),
@@ -15888,7 +16291,7 @@ export const MJIntegrationObjectSchema = z.object({
15888
16291
  * * Description: Whether data can be pushed back to this object via the API`),
15889
16292
  DefaultQueryParams: z.string().nullable().describe(`
15890
16293
  * * Field Name: DefaultQueryParams
15891
- * * Display Name: Default Query Parameters
16294
+ * * Display Name: Default Query Params
15892
16295
  * * SQL Data Type: nvarchar(MAX)
15893
16296
  * * Description: JSON object of default query parameters to include with every API request for this object`),
15894
16297
  Configuration: z.string().nullable().describe(`
@@ -15940,9 +16343,15 @@ export const MJIntegrationObjectSchema = z.object({
15940
16343
  * * SQL Data Type: nvarchar(10)
15941
16344
  * * Default Value: DELETE
15942
16345
  * * Description: HTTP method for delete operations. Defaults to DELETE.`),
16346
+ IsCustom: z.boolean().describe(`
16347
+ * * Field Name: IsCustom
16348
+ * * Display Name: Is Custom
16349
+ * * SQL Data Type: bit
16350
+ * * Default Value: 0
16351
+ * * Description: When true, this object was dynamically discovered by IntrospectSchema and is not defined in static connector metadata.`),
15943
16352
  Integration: z.string().describe(`
15944
16353
  * * Field Name: Integration
15945
- * * Display Name: Integration Name
16354
+ * * Display Name: Integration
15946
16355
  * * SQL Data Type: nvarchar(100)`),
15947
16356
  });
15948
16357
  /**
@@ -17134,6 +17543,44 @@ export const MJMCPToolExecutionLogSchema = z.object({
17134
17543
  * * Display Name: User
17135
17544
  * * SQL Data Type: nvarchar(100)`),
17136
17545
  });
17546
+ /**
17547
+ * zod schema definition for the entity MJ: MCP Tool Favorites
17548
+ */
17549
+ export const MJMCPToolFavoriteSchema = z.object({
17550
+ ID: z.string().describe(`
17551
+ * * Field Name: ID
17552
+ * * Display Name: ID
17553
+ * * SQL Data Type: uniqueidentifier
17554
+ * * Default Value: newsequentialid()`),
17555
+ UserID: z.string().describe(`
17556
+ * * Field Name: UserID
17557
+ * * Display Name: User ID
17558
+ * * SQL Data Type: uniqueidentifier
17559
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)`),
17560
+ MCPServerToolID: z.string().describe(`
17561
+ * * Field Name: MCPServerToolID
17562
+ * * Display Name: MCP Server Tool ID
17563
+ * * SQL Data Type: uniqueidentifier
17564
+ * * Related Entity/Foreign Key: MJ: MCP Server Tools (vwMCPServerTools.ID)`),
17565
+ __mj_CreatedAt: z.date().describe(`
17566
+ * * Field Name: __mj_CreatedAt
17567
+ * * Display Name: Created At
17568
+ * * SQL Data Type: datetimeoffset
17569
+ * * Default Value: getutcdate()`),
17570
+ __mj_UpdatedAt: z.date().describe(`
17571
+ * * Field Name: __mj_UpdatedAt
17572
+ * * Display Name: Updated At
17573
+ * * SQL Data Type: datetimeoffset
17574
+ * * Default Value: getutcdate()`),
17575
+ User: z.string().describe(`
17576
+ * * Field Name: User
17577
+ * * Display Name: User
17578
+ * * SQL Data Type: nvarchar(100)`),
17579
+ MCPServerTool: z.string().nullable().describe(`
17580
+ * * Field Name: MCPServerTool
17581
+ * * Display Name: MCP Server Tool
17582
+ * * SQL Data Type: nvarchar(255)`),
17583
+ });
17137
17584
  /**
17138
17585
  * zod schema definition for the entity MJ: O Auth Auth Server Metadata Caches
17139
17586
  */
@@ -19113,7 +19560,7 @@ export const MJRecordChangeSchema = z.object({
19113
19560
  * * Snapshot
19114
19561
  * * Update
19115
19562
  * * Description: Create, Update, or Delete`),
19116
- Source: z.union([z.literal('External'), z.literal('Internal')]).describe(`
19563
+ Source: z.union([z.literal('External'), z.literal('Internal'), z.literal('Restore')]).describe(`
19117
19564
  * * Field Name: Source
19118
19565
  * * Display Name: Source
19119
19566
  * * SQL Data Type: nvarchar(20)
@@ -19122,6 +19569,7 @@ export const MJRecordChangeSchema = z.object({
19122
19569
  * * Possible Values
19123
19570
  * * External
19124
19571
  * * Internal
19572
+ * * Restore
19125
19573
  * * Description: Internal or External`),
19126
19574
  ChangedAt: z.date().describe(`
19127
19575
  * * Field Name: ChangedAt
@@ -19141,7 +19589,7 @@ export const MJRecordChangeSchema = z.object({
19141
19589
  * * Description: A generated, human-readable description of what was changed.`),
19142
19590
  FullRecordJSON: z.string().describe(`
19143
19591
  * * Field Name: FullRecordJSON
19144
- * * Display Name: Full Record Snapshot
19592
+ * * Display Name: Full Record JSON
19145
19593
  * * SQL Data Type: nvarchar(MAX)
19146
19594
  * * Description: A complete snapshot of the record AFTER the change was applied in a JSON format that can be parsed.`),
19147
19595
  Status: z.union([z.literal('Complete'), z.literal('Error'), z.literal('Pending')]).describe(`
@@ -19186,9 +19634,20 @@ export const MJRecordChangeSchema = z.object({
19186
19634
  * * SQL Data Type: datetimeoffset
19187
19635
  * * Default Value: getutcdate()
19188
19636
  * * Description: Field UpdatedAt for entity Record Changes.`),
19637
+ RestoredFromID: z.string().nullable().describe(`
19638
+ * * Field Name: RestoredFromID
19639
+ * * Display Name: Restored From ID
19640
+ * * SQL Data Type: uniqueidentifier
19641
+ * * Related Entity/Foreign Key: MJ: Record Changes (vwRecordChanges.ID)
19642
+ * * Description: When this RecordChange was produced by a restore operation, points at the historical RecordChange whose state was restored. NULL for ordinary changes. Together with Source='Restore' this builds the version-chain lineage for auditing and timeline navigation.`),
19643
+ RestoreReason: z.string().nullable().describe(`
19644
+ * * Field Name: RestoreReason
19645
+ * * Display Name: Restore Reason
19646
+ * * SQL Data Type: nvarchar(MAX)
19647
+ * * Description: Optional user-entered explanation captured at restore time. Persisted for audit purposes (regulated industries often require a reason for every reversal). NULL when the user did not enter one or when the change was not a restore.`),
19189
19648
  Entity: z.string().describe(`
19190
19649
  * * Field Name: Entity
19191
- * * Display Name: Entity
19650
+ * * Display Name: Entity Name
19192
19651
  * * SQL Data Type: nvarchar(255)`),
19193
19652
  User: z.string().describe(`
19194
19653
  * * Field Name: User
@@ -19202,6 +19661,14 @@ export const MJRecordChangeSchema = z.object({
19202
19661
  * * Field Name: Integration
19203
19662
  * * Display Name: Integration
19204
19663
  * * SQL Data Type: nvarchar(100)`),
19664
+ RestoredFrom: z.string().nullable().describe(`
19665
+ * * Field Name: RestoredFrom
19666
+ * * Display Name: Restored From
19667
+ * * SQL Data Type: nvarchar(750)`),
19668
+ RootRestoredFromID: z.string().nullable().describe(`
19669
+ * * Field Name: RootRestoredFromID
19670
+ * * Display Name: Root Restored From ID
19671
+ * * SQL Data Type: uniqueidentifier`),
19205
19672
  });
19206
19673
  /**
19207
19674
  * zod schema definition for the entity MJ: Record Geo Codes
@@ -23796,7 +24263,7 @@ export const MJVersionLabelItemSchema = z.object({
23796
24263
  RecordChange: z.string().describe(`
23797
24264
  * * Field Name: RecordChange
23798
24265
  * * Display Name: Record Change
23799
- * * SQL Data Type: nvarchar(MAX)`),
24266
+ * * SQL Data Type: nvarchar(750)`),
23800
24267
  Entity: z.string().describe(`
23801
24268
  * * Field Name: Entity
23802
24269
  * * Display Name: Entity
@@ -42056,25 +42523,25 @@ MJApplicationEntity = __decorate([
42056
42523
  ], MJApplicationEntity);
42057
42524
  export { MJApplicationEntity };
42058
42525
  /**
42059
- * MJ: Artifact Permissions - strongly typed entity sub-class
42526
+ * MJ: Archive Configuration Entities - strongly typed entity sub-class
42060
42527
  * * Schema: __mj
42061
- * * Base Table: ArtifactPermission
42062
- * * Base View: vwArtifactPermissions
42063
- * * @description Manages user permissions for artifacts with granular access control (Read, Edit, Delete, Share)
42528
+ * * Base Table: ArchiveConfigurationEntity
42529
+ * * Base View: vwArchiveConfigurationEntities
42530
+ * * @description Per-entity configuration within an archive pipeline. Allows overriding the parent configuration's defaults for mode, retention, batch size, and filtering on a per-entity basis.
42064
42531
  * * Primary Key: ID
42065
42532
  * @extends {BaseEntity}
42066
42533
  * @class
42067
42534
  * @public
42068
42535
  */
42069
- let MJArtifactPermissionEntity = class MJArtifactPermissionEntity extends BaseEntity {
42536
+ let MJArchiveConfigurationEntityEntity = class MJArchiveConfigurationEntityEntity extends BaseEntity {
42070
42537
  /**
42071
- * Loads the MJ: Artifact Permissions record from the database
42072
- * @param ID: string - primary key value to load the MJ: Artifact Permissions record.
42538
+ * Loads the MJ: Archive Configuration Entities record from the database
42539
+ * @param ID: string - primary key value to load the MJ: Archive Configuration Entities record.
42073
42540
  * @param EntityRelationshipsToLoad - (optional) the relationships to load
42074
42541
  * @returns {Promise<boolean>} - true if successful, false otherwise
42075
42542
  * @public
42076
42543
  * @async
42077
- * @memberof MJArtifactPermissionEntity
42544
+ * @memberof MJArchiveConfigurationEntityEntity
42078
42545
  * @method
42079
42546
  * @override
42080
42547
  */
@@ -42096,228 +42563,158 @@ let MJArtifactPermissionEntity = class MJArtifactPermissionEntity extends BaseEn
42096
42563
  this.Set('ID', value);
42097
42564
  }
42098
42565
  /**
42099
- * * Field Name: ArtifactID
42100
- * * Display Name: Artifact ID
42566
+ * * Field Name: ArchiveConfigurationID
42567
+ * * Display Name: Archive Configuration
42101
42568
  * * SQL Data Type: uniqueidentifier
42102
- * * Related Entity/Foreign Key: MJ: Artifacts (vwArtifacts.ID)
42569
+ * * Related Entity/Foreign Key: MJ: Archive Configurations (vwArchiveConfigurations.ID)
42570
+ * * Description: Foreign key to the parent ArchiveConfiguration.
42103
42571
  */
42104
- get ArtifactID() {
42105
- return this.Get('ArtifactID');
42572
+ get ArchiveConfigurationID() {
42573
+ return this.Get('ArchiveConfigurationID');
42106
42574
  }
42107
- set ArtifactID(value) {
42108
- this.Set('ArtifactID', value);
42575
+ set ArchiveConfigurationID(value) {
42576
+ this.Set('ArchiveConfigurationID', value);
42109
42577
  }
42110
42578
  /**
42111
- * * Field Name: UserID
42112
- * * Display Name: User ID
42579
+ * * Field Name: EntityID
42580
+ * * Display Name: Entity
42113
42581
  * * SQL Data Type: uniqueidentifier
42114
- * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
42115
- */
42116
- get UserID() {
42117
- return this.Get('UserID');
42118
- }
42119
- set UserID(value) {
42120
- this.Set('UserID', value);
42121
- }
42122
- /**
42123
- * * Field Name: CanRead
42124
- * * Display Name: Can Read
42125
- * * SQL Data Type: bit
42126
- * * Default Value: 1
42127
- * * Description: Whether the user can view/read the artifact
42128
- */
42129
- get CanRead() {
42130
- return this.Get('CanRead');
42131
- }
42132
- set CanRead(value) {
42133
- this.Set('CanRead', value);
42134
- }
42135
- /**
42136
- * * Field Name: CanEdit
42137
- * * Display Name: Can Edit
42138
- * * SQL Data Type: bit
42139
- * * Default Value: 0
42140
- * * Description: Whether the user can modify the artifact or create new versions
42141
- */
42142
- get CanEdit() {
42143
- return this.Get('CanEdit');
42144
- }
42145
- set CanEdit(value) {
42146
- this.Set('CanEdit', value);
42147
- }
42148
- /**
42149
- * * Field Name: CanDelete
42150
- * * Display Name: Can Delete
42151
- * * SQL Data Type: bit
42152
- * * Default Value: 0
42153
- * * Description: Whether the user can delete the artifact
42582
+ * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
42583
+ * * Description: Foreign key to the Entity being archived.
42154
42584
  */
42155
- get CanDelete() {
42156
- return this.Get('CanDelete');
42585
+ get EntityID() {
42586
+ return this.Get('EntityID');
42157
42587
  }
42158
- set CanDelete(value) {
42159
- this.Set('CanDelete', value);
42588
+ set EntityID(value) {
42589
+ this.Set('EntityID', value);
42160
42590
  }
42161
42591
  /**
42162
- * * Field Name: CanShare
42163
- * * Display Name: Can Share
42164
- * * SQL Data Type: bit
42165
- * * Default Value: 0
42166
- * * Description: Whether the user can share the artifact with other users
42592
+ * * Field Name: Mode
42593
+ * * Display Name: Archive Mode
42594
+ * * SQL Data Type: nvarchar(20)
42595
+ * * Value List Type: List
42596
+ * * Possible Values
42597
+ * * ArchiveOnly
42598
+ * * HardDelete
42599
+ * * StripFields
42600
+ * * Description: Archive mode override for this entity. NULL inherits from the parent configuration's DefaultMode.
42167
42601
  */
42168
- get CanShare() {
42169
- return this.Get('CanShare');
42602
+ get Mode() {
42603
+ return this.Get('Mode');
42170
42604
  }
42171
- set CanShare(value) {
42172
- this.Set('CanShare', value);
42605
+ set Mode(value) {
42606
+ this.Set('Mode', value);
42173
42607
  }
42174
42608
  /**
42175
- * * Field Name: SharedByUserID
42176
- * * Display Name: Shared By User ID
42177
- * * SQL Data Type: uniqueidentifier
42178
- * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
42179
- * * Description: Foreign key to the User who shared this artifact (if shared)
42609
+ * * Field Name: RetentionDays
42610
+ * * Display Name: Retention Days
42611
+ * * SQL Data Type: int
42612
+ * * Description: Retention period override in days. NULL inherits from the parent configuration's DefaultRetentionDays.
42180
42613
  */
42181
- get SharedByUserID() {
42182
- return this.Get('SharedByUserID');
42614
+ get RetentionDays() {
42615
+ return this.Get('RetentionDays');
42183
42616
  }
42184
- set SharedByUserID(value) {
42185
- this.Set('SharedByUserID', value);
42617
+ set RetentionDays(value) {
42618
+ this.Set('RetentionDays', value);
42186
42619
  }
42187
42620
  /**
42188
- * * Field Name: __mj_CreatedAt
42189
- * * Display Name: Created At
42190
- * * SQL Data Type: datetimeoffset
42191
- * * Default Value: getutcdate()
42621
+ * * Field Name: DateField
42622
+ * * Display Name: Date Field
42623
+ * * SQL Data Type: nvarchar(100)
42624
+ * * Default Value: __mj_CreatedAt
42625
+ * * Description: The date field on the entity used to determine record age for retention policy evaluation. Defaults to __mj_CreatedAt.
42192
42626
  */
42193
- get __mj_CreatedAt() {
42194
- return this.Get('__mj_CreatedAt');
42627
+ get DateField() {
42628
+ return this.Get('DateField');
42195
42629
  }
42196
- /**
42197
- * * Field Name: __mj_UpdatedAt
42198
- * * Display Name: Updated At
42199
- * * SQL Data Type: datetimeoffset
42200
- * * Default Value: getutcdate()
42201
- */
42202
- get __mj_UpdatedAt() {
42203
- return this.Get('__mj_UpdatedAt');
42630
+ set DateField(value) {
42631
+ this.Set('DateField', value);
42204
42632
  }
42205
42633
  /**
42206
- * * Field Name: Artifact
42207
- * * Display Name: Artifact
42208
- * * SQL Data Type: nvarchar(255)
42634
+ * * Field Name: FilterExpression
42635
+ * * Display Name: Filter Expression
42636
+ * * SQL Data Type: nvarchar(MAX)
42637
+ * * Description: Optional SQL WHERE clause fragment to further filter which records are eligible for archiving (e.g., "Status = 'Closed'").
42209
42638
  */
42210
- get Artifact() {
42211
- return this.Get('Artifact');
42639
+ get FilterExpression() {
42640
+ return this.Get('FilterExpression');
42212
42641
  }
42213
- /**
42214
- * * Field Name: User
42215
- * * Display Name: User
42216
- * * SQL Data Type: nvarchar(100)
42217
- */
42218
- get User() {
42219
- return this.Get('User');
42642
+ set FilterExpression(value) {
42643
+ this.Set('FilterExpression', value);
42220
42644
  }
42221
42645
  /**
42222
- * * Field Name: SharedByUser
42223
- * * Display Name: Shared By User
42224
- * * SQL Data Type: nvarchar(100)
42646
+ * * Field Name: BatchSize
42647
+ * * Display Name: Batch Size
42648
+ * * SQL Data Type: int
42649
+ * * Description: Batch size override for this entity. NULL inherits from the parent configuration's DefaultBatchSize.
42225
42650
  */
42226
- get SharedByUser() {
42227
- return this.Get('SharedByUser');
42651
+ get BatchSize() {
42652
+ return this.Get('BatchSize');
42228
42653
  }
42229
- };
42230
- MJArtifactPermissionEntity = __decorate([
42231
- RegisterClass(BaseEntity, 'MJ: Artifact Permissions')
42232
- ], MJArtifactPermissionEntity);
42233
- export { MJArtifactPermissionEntity };
42234
- /**
42235
- * MJ: Artifact Types - strongly typed entity sub-class
42236
- * * Schema: __mj
42237
- * * Base Table: ArtifactType
42238
- * * Base View: vwArtifactTypes
42239
- * * @description Defines the types of artifacts that can be created within conversations
42240
- * * Primary Key: ID
42241
- * @extends {BaseEntity}
42242
- * @class
42243
- * @public
42244
- */
42245
- let MJArtifactTypeEntity = class MJArtifactTypeEntity extends BaseEntity {
42246
- /**
42247
- * Loads the MJ: Artifact Types record from the database
42248
- * @param ID: string - primary key value to load the MJ: Artifact Types record.
42249
- * @param EntityRelationshipsToLoad - (optional) the relationships to load
42250
- * @returns {Promise<boolean>} - true if successful, false otherwise
42251
- * @public
42252
- * @async
42253
- * @memberof MJArtifactTypeEntity
42254
- * @method
42255
- * @override
42256
- */
42257
- async Load(ID, EntityRelationshipsToLoad) {
42258
- const compositeKey = new CompositeKey();
42259
- compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
42260
- return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
42654
+ set BatchSize(value) {
42655
+ this.Set('BatchSize', value);
42261
42656
  }
42262
42657
  /**
42263
- * * Field Name: ID
42264
- * * Display Name: ID
42265
- * * SQL Data Type: uniqueidentifier
42658
+ * * Field Name: Priority
42659
+ * * Display Name: Priority
42660
+ * * SQL Data Type: int
42661
+ * * Default Value: 100
42662
+ * * Description: Processing priority — lower numbers are archived first. Default is 100.
42266
42663
  */
42267
- get ID() {
42268
- return this.Get('ID');
42664
+ get Priority() {
42665
+ return this.Get('Priority');
42269
42666
  }
42270
- set ID(value) {
42271
- this.Set('ID', value);
42667
+ set Priority(value) {
42668
+ this.Set('Priority', value);
42272
42669
  }
42273
42670
  /**
42274
- * * Field Name: Name
42275
- * * Display Name: Name
42276
- * * SQL Data Type: nvarchar(100)
42277
- * * Description: Display name of the artifact type
42671
+ * * Field Name: FieldConfiguration
42672
+ * * Display Name: Field Configuration
42673
+ * * SQL Data Type: nvarchar(MAX)
42674
+ * * Description: JSON configuration specifying which fields to include/exclude in the archive output. Required for all modes.
42278
42675
  */
42279
- get Name() {
42280
- return this.Get('Name');
42676
+ get FieldConfiguration() {
42677
+ return this.Get('FieldConfiguration');
42281
42678
  }
42282
- set Name(value) {
42283
- this.Set('Name', value);
42679
+ set FieldConfiguration(value) {
42680
+ this.Set('FieldConfiguration', value);
42284
42681
  }
42285
42682
  /**
42286
- * * Field Name: Description
42287
- * * Display Name: Description
42288
- * * SQL Data Type: nvarchar(MAX)
42289
- * * Description: Detailed description of the artifact type
42683
+ * * Field Name: DriverClass
42684
+ * * Display Name: Driver Class
42685
+ * * SQL Data Type: nvarchar(500)
42686
+ * * Description: Optional fully-qualified class name of a custom archive driver to use for this entity, overriding the default archiver.
42290
42687
  */
42291
- get Description() {
42292
- return this.Get('Description');
42688
+ get DriverClass() {
42689
+ return this.Get('DriverClass');
42293
42690
  }
42294
- set Description(value) {
42295
- this.Set('Description', value);
42691
+ set DriverClass(value) {
42692
+ this.Set('DriverClass', value);
42296
42693
  }
42297
42694
  /**
42298
- * * Field Name: ContentType
42299
- * * Display Name: Content Type
42300
- * * SQL Data Type: nvarchar(100)
42301
- * * Description: MIME type or content identifier for this artifact type
42695
+ * * Field Name: ArchiveRelatedRecordChanges
42696
+ * * Display Name: Archive Related Record Changes
42697
+ * * SQL Data Type: bit
42698
+ * * Description: Override for archiving related Record Changes. NULL inherits from the parent configuration.
42302
42699
  */
42303
- get ContentType() {
42304
- return this.Get('ContentType');
42700
+ get ArchiveRelatedRecordChanges() {
42701
+ return this.Get('ArchiveRelatedRecordChanges');
42305
42702
  }
42306
- set ContentType(value) {
42307
- this.Set('ContentType', value);
42703
+ set ArchiveRelatedRecordChanges(value) {
42704
+ this.Set('ArchiveRelatedRecordChanges', value);
42308
42705
  }
42309
42706
  /**
42310
- * * Field Name: IsEnabled
42311
- * * Display Name: Is Enabled
42707
+ * * Field Name: IsActive
42708
+ * * Display Name: Is Active
42312
42709
  * * SQL Data Type: bit
42313
42710
  * * Default Value: 1
42314
- * * Description: Indicates if this artifact type is currently available for use
42711
+ * * Description: Whether this entity is active within the archive configuration.
42315
42712
  */
42316
- get IsEnabled() {
42317
- return this.Get('IsEnabled');
42713
+ get IsActive() {
42714
+ return this.Get('IsActive');
42318
42715
  }
42319
- set IsEnabled(value) {
42320
- this.Set('IsEnabled', value);
42716
+ set IsActive(value) {
42717
+ this.Set('IsActive', value);
42321
42718
  }
42322
42719
  /**
42323
42720
  * * Field Name: __mj_CreatedAt
@@ -42338,112 +42735,1101 @@ let MJArtifactTypeEntity = class MJArtifactTypeEntity extends BaseEntity {
42338
42735
  return this.Get('__mj_UpdatedAt');
42339
42736
  }
42340
42737
  /**
42341
- * * Field Name: ParentID
42342
- * * Display Name: Parent ID
42343
- * * SQL Data Type: uniqueidentifier
42344
- * * Related Entity/Foreign Key: MJ: Artifact Types (vwArtifactTypes.ID)
42345
- * * Description: Parent artifact type ID for hierarchical artifact type organization. Child types inherit ExtractRules from parent but can override.
42346
- */
42347
- get ParentID() {
42348
- return this.Get('ParentID');
42349
- }
42350
- set ParentID(value) {
42351
- this.Set('ParentID', value);
42352
- }
42353
- /**
42354
- * * Field Name: ExtractRules
42355
- * * Display Name: Extract Rules
42356
- * * SQL Data Type: nvarchar(MAX)
42357
- * * Description: JSON array of extraction rules defining how to extract attributes from artifact content. Each rule has: name (string), description (string), type (TypeScript type), standardProperty ('name'|'description'|'displayMarkdown'|'displayHtml'|null), extractor (JavaScript code string). Child types inherit parent rules and can override by name.
42358
- */
42359
- get ExtractRules() {
42360
- return this.Get('ExtractRules');
42361
- }
42362
- set ExtractRules(value) {
42363
- this.Set('ExtractRules', value);
42364
- }
42365
- /**
42366
- * * Field Name: DriverClass
42367
- * * Display Name: Driver Class
42738
+ * * Field Name: ArchiveConfiguration
42739
+ * * Display Name: Archive Configuration Name
42368
42740
  * * SQL Data Type: nvarchar(255)
42369
- * * Description: Driver class name for the artifact viewer plugin. References Angular component registered with @RegisterClass decorator.
42370
42741
  */
42371
- get DriverClass() {
42372
- return this.Get('DriverClass');
42373
- }
42374
- set DriverClass(value) {
42375
- this.Set('DriverClass', value);
42742
+ get ArchiveConfiguration() {
42743
+ return this.Get('ArchiveConfiguration');
42376
42744
  }
42377
42745
  /**
42378
- * * Field Name: Icon
42379
- * * Display Name: Icon
42746
+ * * Field Name: Entity
42747
+ * * Display Name: Entity Name
42380
42748
  * * SQL Data Type: nvarchar(255)
42381
- * * Description: Font Awesome icon class name for displaying this artifact type in the UI (e.g., fa-file-code, fa-chart-line)
42382
- */
42383
- get Icon() {
42384
- return this.Get('Icon');
42385
- }
42386
- set Icon(value) {
42387
- this.Set('Icon', value);
42388
- }
42389
- /**
42390
- * * Field Name: ContentCategory
42391
- * * Display Name: Content Category
42392
- * * SQL Data Type: nvarchar(10)
42393
- * * Default Value: Text
42394
- * * Value List Type: List
42395
- * * Possible Values
42396
- * * File
42397
- * * Text
42398
- * * Description: Classifies whether this artifact type stores text content ('Text', the default for all existing types) or a binary file in MJStorage ('File'). Used by AgentRunner and viewer components to route file-based artifacts correctly.
42399
- */
42400
- get ContentCategory() {
42401
- return this.Get('ContentCategory');
42402
- }
42403
- set ContentCategory(value) {
42404
- this.Set('ContentCategory', value);
42405
- }
42406
- /**
42407
- * * Field Name: Parent
42408
- * * Display Name: Parent
42409
- * * SQL Data Type: nvarchar(100)
42410
- */
42411
- get Parent() {
42412
- return this.Get('Parent');
42413
- }
42414
- /**
42415
- * * Field Name: RootParentID
42416
- * * Display Name: Root Parent ID
42417
- * * SQL Data Type: uniqueidentifier
42418
42749
  */
42419
- get RootParentID() {
42420
- return this.Get('RootParentID');
42750
+ get Entity() {
42751
+ return this.Get('Entity');
42421
42752
  }
42422
42753
  };
42423
- MJArtifactTypeEntity = __decorate([
42424
- RegisterClass(BaseEntity, 'MJ: Artifact Types')
42425
- ], MJArtifactTypeEntity);
42426
- export { MJArtifactTypeEntity };
42754
+ MJArchiveConfigurationEntityEntity = __decorate([
42755
+ RegisterClass(BaseEntity, 'MJ: Archive Configuration Entities')
42756
+ ], MJArchiveConfigurationEntityEntity);
42757
+ export { MJArchiveConfigurationEntityEntity };
42427
42758
  /**
42428
- * MJ: Artifact Uses - strongly typed entity sub-class
42759
+ * MJ: Archive Configurations - strongly typed entity sub-class
42429
42760
  * * Schema: __mj
42430
- * * Base Table: ArtifactUse
42431
- * * Base View: vwArtifactUses
42432
- * * @description Audit trail of artifact usage for security and analytics. Tracks each time an artifact is viewed, opened, shared, saved, or exported by users.
42761
+ * * Base Table: ArchiveConfiguration
42762
+ * * Base View: vwArchiveConfigurations
42763
+ * * @description Top-level configuration for an archive pipeline. Defines the storage target, default retention policy, archive format, and operational mode for archiving entity records.
42433
42764
  * * Primary Key: ID
42434
42765
  * @extends {BaseEntity}
42435
42766
  * @class
42436
42767
  * @public
42437
42768
  */
42438
- let MJArtifactUseEntity = class MJArtifactUseEntity extends BaseEntity {
42769
+ let MJArchiveConfigurationEntity = class MJArchiveConfigurationEntity extends BaseEntity {
42439
42770
  /**
42440
- * Loads the MJ: Artifact Uses record from the database
42441
- * @param ID: string - primary key value to load the MJ: Artifact Uses record.
42771
+ * Loads the MJ: Archive Configurations record from the database
42772
+ * @param ID: string - primary key value to load the MJ: Archive Configurations record.
42442
42773
  * @param EntityRelationshipsToLoad - (optional) the relationships to load
42443
42774
  * @returns {Promise<boolean>} - true if successful, false otherwise
42444
42775
  * @public
42445
42776
  * @async
42446
- * @memberof MJArtifactUseEntity
42777
+ * @memberof MJArchiveConfigurationEntity
42778
+ * @method
42779
+ * @override
42780
+ */
42781
+ async Load(ID, EntityRelationshipsToLoad) {
42782
+ const compositeKey = new CompositeKey();
42783
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
42784
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
42785
+ }
42786
+ /**
42787
+ * * Field Name: ID
42788
+ * * Display Name: ID
42789
+ * * SQL Data Type: uniqueidentifier
42790
+ * * Default Value: newsequentialid()
42791
+ */
42792
+ get ID() {
42793
+ return this.Get('ID');
42794
+ }
42795
+ set ID(value) {
42796
+ this.Set('ID', value);
42797
+ }
42798
+ /**
42799
+ * * Field Name: Name
42800
+ * * Display Name: Name
42801
+ * * SQL Data Type: nvarchar(255)
42802
+ * * Description: Human-readable name for this archive configuration.
42803
+ */
42804
+ get Name() {
42805
+ return this.Get('Name');
42806
+ }
42807
+ set Name(value) {
42808
+ this.Set('Name', value);
42809
+ }
42810
+ /**
42811
+ * * Field Name: Description
42812
+ * * Display Name: Description
42813
+ * * SQL Data Type: nvarchar(MAX)
42814
+ */
42815
+ get Description() {
42816
+ return this.Get('Description');
42817
+ }
42818
+ set Description(value) {
42819
+ this.Set('Description', value);
42820
+ }
42821
+ /**
42822
+ * * Field Name: StorageAccountID
42823
+ * * Display Name: Storage Account
42824
+ * * SQL Data Type: uniqueidentifier
42825
+ * * Related Entity/Foreign Key: MJ: File Storage Accounts (vwFileStorageAccounts.ID)
42826
+ * * Description: Foreign key to FileStorageAccount — the blob/file storage target for archived data.
42827
+ */
42828
+ get StorageAccountID() {
42829
+ return this.Get('StorageAccountID');
42830
+ }
42831
+ set StorageAccountID(value) {
42832
+ this.Set('StorageAccountID', value);
42833
+ }
42834
+ /**
42835
+ * * Field Name: RootPath
42836
+ * * Display Name: Root Path
42837
+ * * SQL Data Type: nvarchar(500)
42838
+ * * Description: Root path within the storage account where archive files are written (e.g., "archives/production/").
42839
+ */
42840
+ get RootPath() {
42841
+ return this.Get('RootPath');
42842
+ }
42843
+ set RootPath(value) {
42844
+ this.Set('RootPath', value);
42845
+ }
42846
+ /**
42847
+ * * Field Name: ArchiveFormat
42848
+ * * Display Name: Archive Format
42849
+ * * SQL Data Type: nvarchar(20)
42850
+ * * Default Value: JSON
42851
+ * * Value List Type: List
42852
+ * * Possible Values
42853
+ * * CSV
42854
+ * * JSON
42855
+ * * Parquet
42856
+ * * Description: Output format for archived records: JSON, Parquet, or CSV.
42857
+ */
42858
+ get ArchiveFormat() {
42859
+ return this.Get('ArchiveFormat');
42860
+ }
42861
+ set ArchiveFormat(value) {
42862
+ this.Set('ArchiveFormat', value);
42863
+ }
42864
+ /**
42865
+ * * Field Name: IsActive
42866
+ * * Display Name: Is Active
42867
+ * * SQL Data Type: bit
42868
+ * * Default Value: 0
42869
+ * * Description: Whether this configuration is active and eligible for scheduled archive runs.
42870
+ */
42871
+ get IsActive() {
42872
+ return this.Get('IsActive');
42873
+ }
42874
+ set IsActive(value) {
42875
+ this.Set('IsActive', value);
42876
+ }
42877
+ /**
42878
+ * * Field Name: DefaultRetentionDays
42879
+ * * Display Name: Default Retention Days
42880
+ * * SQL Data Type: int
42881
+ * * Default Value: 365
42882
+ * * Description: Default number of days after which records become eligible for archiving. Can be overridden per entity.
42883
+ */
42884
+ get DefaultRetentionDays() {
42885
+ return this.Get('DefaultRetentionDays');
42886
+ }
42887
+ set DefaultRetentionDays(value) {
42888
+ this.Set('DefaultRetentionDays', value);
42889
+ }
42890
+ /**
42891
+ * * Field Name: DefaultMode
42892
+ * * Display Name: Default Mode
42893
+ * * SQL Data Type: nvarchar(20)
42894
+ * * Default Value: StripFields
42895
+ * * Value List Type: List
42896
+ * * Possible Values
42897
+ * * ArchiveOnly
42898
+ * * HardDelete
42899
+ * * StripFields
42900
+ * * Description: Default archive mode: StripFields (null out specified fields), HardDelete (delete from source after archiving), ArchiveOnly (copy to storage without modifying source).
42901
+ */
42902
+ get DefaultMode() {
42903
+ return this.Get('DefaultMode');
42904
+ }
42905
+ set DefaultMode(value) {
42906
+ this.Set('DefaultMode', value);
42907
+ }
42908
+ /**
42909
+ * * Field Name: DefaultBatchSize
42910
+ * * Display Name: Default Batch Size
42911
+ * * SQL Data Type: int
42912
+ * * Default Value: 100
42913
+ * * Description: Default number of records to process per batch during archive runs.
42914
+ */
42915
+ get DefaultBatchSize() {
42916
+ return this.Get('DefaultBatchSize');
42917
+ }
42918
+ set DefaultBatchSize(value) {
42919
+ this.Set('DefaultBatchSize', value);
42920
+ }
42921
+ /**
42922
+ * * Field Name: ArchiveRelatedRecordChanges
42923
+ * * Display Name: Archive Related Record Changes
42924
+ * * SQL Data Type: bit
42925
+ * * Default Value: 1
42926
+ * * Description: When enabled, related Record Changes entries are also archived alongside the source records.
42927
+ */
42928
+ get ArchiveRelatedRecordChanges() {
42929
+ return this.Get('ArchiveRelatedRecordChanges');
42930
+ }
42931
+ set ArchiveRelatedRecordChanges(value) {
42932
+ this.Set('ArchiveRelatedRecordChanges', value);
42933
+ }
42934
+ /**
42935
+ * * Field Name: Status
42936
+ * * Display Name: Status
42937
+ * * SQL Data Type: nvarchar(20)
42938
+ * * Default Value: Idle
42939
+ * * Value List Type: List
42940
+ * * Possible Values
42941
+ * * Disabled
42942
+ * * Error
42943
+ * * Idle
42944
+ * * Running
42945
+ * * Description: Current operational status of this configuration: Idle, Running, Error, or Disabled.
42946
+ */
42947
+ get Status() {
42948
+ return this.Get('Status');
42949
+ }
42950
+ set Status(value) {
42951
+ this.Set('Status', value);
42952
+ }
42953
+ /**
42954
+ * * Field Name: CreatedByUserID
42955
+ * * Display Name: Created By User ID
42956
+ * * SQL Data Type: uniqueidentifier
42957
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
42958
+ * * Description: The user who created this archive configuration.
42959
+ */
42960
+ get CreatedByUserID() {
42961
+ return this.Get('CreatedByUserID');
42962
+ }
42963
+ set CreatedByUserID(value) {
42964
+ this.Set('CreatedByUserID', value);
42965
+ }
42966
+ /**
42967
+ * * Field Name: __mj_CreatedAt
42968
+ * * Display Name: Created At
42969
+ * * SQL Data Type: datetimeoffset
42970
+ * * Default Value: getutcdate()
42971
+ */
42972
+ get __mj_CreatedAt() {
42973
+ return this.Get('__mj_CreatedAt');
42974
+ }
42975
+ /**
42976
+ * * Field Name: __mj_UpdatedAt
42977
+ * * Display Name: Updated At
42978
+ * * SQL Data Type: datetimeoffset
42979
+ * * Default Value: getutcdate()
42980
+ */
42981
+ get __mj_UpdatedAt() {
42982
+ return this.Get('__mj_UpdatedAt');
42983
+ }
42984
+ /**
42985
+ * * Field Name: StorageAccount
42986
+ * * Display Name: Storage Account Name
42987
+ * * SQL Data Type: nvarchar(200)
42988
+ */
42989
+ get StorageAccount() {
42990
+ return this.Get('StorageAccount');
42991
+ }
42992
+ /**
42993
+ * * Field Name: CreatedByUser
42994
+ * * Display Name: Created By User
42995
+ * * SQL Data Type: nvarchar(100)
42996
+ */
42997
+ get CreatedByUser() {
42998
+ return this.Get('CreatedByUser');
42999
+ }
43000
+ };
43001
+ MJArchiveConfigurationEntity = __decorate([
43002
+ RegisterClass(BaseEntity, 'MJ: Archive Configurations')
43003
+ ], MJArchiveConfigurationEntity);
43004
+ export { MJArchiveConfigurationEntity };
43005
+ /**
43006
+ * MJ: Archive Run Details - strongly typed entity sub-class
43007
+ * * Schema: __mj
43008
+ * * Base Table: ArchiveRunDetail
43009
+ * * Base View: vwArchiveRunDetails
43010
+ * * @description Per-record detail for each archive run. Tracks the outcome, storage location, and error information for each individual record processed.
43011
+ * * Primary Key: ID
43012
+ * @extends {BaseEntity}
43013
+ * @class
43014
+ * @public
43015
+ */
43016
+ let MJArchiveRunDetailEntity = class MJArchiveRunDetailEntity extends BaseEntity {
43017
+ /**
43018
+ * Loads the MJ: Archive Run Details record from the database
43019
+ * @param ID: string - primary key value to load the MJ: Archive Run Details record.
43020
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
43021
+ * @returns {Promise<boolean>} - true if successful, false otherwise
43022
+ * @public
43023
+ * @async
43024
+ * @memberof MJArchiveRunDetailEntity
43025
+ * @method
43026
+ * @override
43027
+ */
43028
+ async Load(ID, EntityRelationshipsToLoad) {
43029
+ const compositeKey = new CompositeKey();
43030
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
43031
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
43032
+ }
43033
+ /**
43034
+ * * Field Name: ID
43035
+ * * Display Name: ID
43036
+ * * SQL Data Type: uniqueidentifier
43037
+ * * Default Value: newsequentialid()
43038
+ */
43039
+ get ID() {
43040
+ return this.Get('ID');
43041
+ }
43042
+ set ID(value) {
43043
+ this.Set('ID', value);
43044
+ }
43045
+ /**
43046
+ * * Field Name: ArchiveRunID
43047
+ * * Display Name: Archive Run
43048
+ * * SQL Data Type: uniqueidentifier
43049
+ * * Related Entity/Foreign Key: MJ: Archive Runs (vwArchiveRuns.ID)
43050
+ * * Description: Foreign key to the parent ArchiveRun.
43051
+ */
43052
+ get ArchiveRunID() {
43053
+ return this.Get('ArchiveRunID');
43054
+ }
43055
+ set ArchiveRunID(value) {
43056
+ this.Set('ArchiveRunID', value);
43057
+ }
43058
+ /**
43059
+ * * Field Name: EntityID
43060
+ * * Display Name: Entity Record
43061
+ * * SQL Data Type: uniqueidentifier
43062
+ * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
43063
+ * * Description: Foreign key to the Entity this record belongs to.
43064
+ */
43065
+ get EntityID() {
43066
+ return this.Get('EntityID');
43067
+ }
43068
+ set EntityID(value) {
43069
+ this.Set('EntityID', value);
43070
+ }
43071
+ /**
43072
+ * * Field Name: RecordID
43073
+ * * Display Name: Record ID
43074
+ * * SQL Data Type: nvarchar(750)
43075
+ * * Description: The primary key value of the archived record (string representation to support all key types).
43076
+ */
43077
+ get RecordID() {
43078
+ return this.Get('RecordID');
43079
+ }
43080
+ set RecordID(value) {
43081
+ this.Set('RecordID', value);
43082
+ }
43083
+ /**
43084
+ * * Field Name: Status
43085
+ * * Display Name: Status
43086
+ * * SQL Data Type: nvarchar(50)
43087
+ * * Value List Type: List
43088
+ * * Possible Values
43089
+ * * Failed
43090
+ * * Skipped
43091
+ * * Success
43092
+ * * Description: Outcome for this record: Success, Failed, or Skipped.
43093
+ */
43094
+ get Status() {
43095
+ return this.Get('Status');
43096
+ }
43097
+ set Status(value) {
43098
+ this.Set('Status', value);
43099
+ }
43100
+ /**
43101
+ * * Field Name: StoragePath
43102
+ * * Display Name: Storage Path
43103
+ * * SQL Data Type: nvarchar(1000)
43104
+ * * Description: Full path to the archived file in storage (e.g., "archives/production/Users/2026/04/record-id.json").
43105
+ */
43106
+ get StoragePath() {
43107
+ return this.Get('StoragePath');
43108
+ }
43109
+ set StoragePath(value) {
43110
+ this.Set('StoragePath', value);
43111
+ }
43112
+ /**
43113
+ * * Field Name: BytesArchived
43114
+ * * Display Name: Bytes Archived
43115
+ * * SQL Data Type: bigint
43116
+ * * Default Value: 0
43117
+ * * Description: Number of bytes written to storage for this record.
43118
+ */
43119
+ get BytesArchived() {
43120
+ return this.Get('BytesArchived');
43121
+ }
43122
+ set BytesArchived(value) {
43123
+ this.Set('BytesArchived', value);
43124
+ }
43125
+ /**
43126
+ * * Field Name: ErrorMessage
43127
+ * * Display Name: Error Message
43128
+ * * SQL Data Type: nvarchar(MAX)
43129
+ * * Description: Error details when Status is Failed.
43130
+ */
43131
+ get ErrorMessage() {
43132
+ return this.Get('ErrorMessage');
43133
+ }
43134
+ set ErrorMessage(value) {
43135
+ this.Set('ErrorMessage', value);
43136
+ }
43137
+ /**
43138
+ * * Field Name: ArchivedAt
43139
+ * * Display Name: Archived At
43140
+ * * SQL Data Type: datetimeoffset
43141
+ * * Description: Timestamp when this record was successfully archived.
43142
+ */
43143
+ get ArchivedAt() {
43144
+ return this.Get('ArchivedAt');
43145
+ }
43146
+ set ArchivedAt(value) {
43147
+ this.Set('ArchivedAt', value);
43148
+ }
43149
+ /**
43150
+ * * Field Name: VersionStamp
43151
+ * * Display Name: Version Stamp
43152
+ * * SQL Data Type: datetimeoffset
43153
+ * * Description: The __mj_UpdatedAt timestamp of the record at the time of archiving, used for conflict detection during restore.
43154
+ */
43155
+ get VersionStamp() {
43156
+ return this.Get('VersionStamp');
43157
+ }
43158
+ set VersionStamp(value) {
43159
+ this.Set('VersionStamp', value);
43160
+ }
43161
+ /**
43162
+ * * Field Name: IsRecordChangeArchive
43163
+ * * Display Name: Is Record Change Archive
43164
+ * * SQL Data Type: bit
43165
+ * * Default Value: 0
43166
+ * * Description: When true, this detail row represents an archived Record Change entry rather than a primary entity record.
43167
+ */
43168
+ get IsRecordChangeArchive() {
43169
+ return this.Get('IsRecordChangeArchive');
43170
+ }
43171
+ set IsRecordChangeArchive(value) {
43172
+ this.Set('IsRecordChangeArchive', value);
43173
+ }
43174
+ /**
43175
+ * * Field Name: __mj_CreatedAt
43176
+ * * Display Name: Created At
43177
+ * * SQL Data Type: datetimeoffset
43178
+ * * Default Value: getutcdate()
43179
+ */
43180
+ get __mj_CreatedAt() {
43181
+ return this.Get('__mj_CreatedAt');
43182
+ }
43183
+ /**
43184
+ * * Field Name: __mj_UpdatedAt
43185
+ * * Display Name: Updated At
43186
+ * * SQL Data Type: datetimeoffset
43187
+ * * Default Value: getutcdate()
43188
+ */
43189
+ get __mj_UpdatedAt() {
43190
+ return this.Get('__mj_UpdatedAt');
43191
+ }
43192
+ /**
43193
+ * * Field Name: Entity
43194
+ * * Display Name: Entity Type
43195
+ * * SQL Data Type: nvarchar(255)
43196
+ */
43197
+ get Entity() {
43198
+ return this.Get('Entity');
43199
+ }
43200
+ };
43201
+ MJArchiveRunDetailEntity = __decorate([
43202
+ RegisterClass(BaseEntity, 'MJ: Archive Run Details')
43203
+ ], MJArchiveRunDetailEntity);
43204
+ export { MJArchiveRunDetailEntity };
43205
+ /**
43206
+ * MJ: Archive Runs - strongly typed entity sub-class
43207
+ * * Schema: __mj
43208
+ * * Base Table: ArchiveRun
43209
+ * * Base View: vwArchiveRuns
43210
+ * * @description Tracks each execution of an archive configuration, including timing, aggregate statistics, and overall status.
43211
+ * * Primary Key: ID
43212
+ * @extends {BaseEntity}
43213
+ * @class
43214
+ * @public
43215
+ */
43216
+ let MJArchiveRunEntity = class MJArchiveRunEntity extends BaseEntity {
43217
+ /**
43218
+ * Loads the MJ: Archive Runs record from the database
43219
+ * @param ID: string - primary key value to load the MJ: Archive Runs record.
43220
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
43221
+ * @returns {Promise<boolean>} - true if successful, false otherwise
43222
+ * @public
43223
+ * @async
43224
+ * @memberof MJArchiveRunEntity
43225
+ * @method
43226
+ * @override
43227
+ */
43228
+ async Load(ID, EntityRelationshipsToLoad) {
43229
+ const compositeKey = new CompositeKey();
43230
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
43231
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
43232
+ }
43233
+ /**
43234
+ * * Field Name: ID
43235
+ * * Display Name: ID
43236
+ * * SQL Data Type: uniqueidentifier
43237
+ * * Default Value: newsequentialid()
43238
+ */
43239
+ get ID() {
43240
+ return this.Get('ID');
43241
+ }
43242
+ set ID(value) {
43243
+ this.Set('ID', value);
43244
+ }
43245
+ /**
43246
+ * * Field Name: ArchiveConfigurationID
43247
+ * * Display Name: Archive Configuration
43248
+ * * SQL Data Type: uniqueidentifier
43249
+ * * Related Entity/Foreign Key: MJ: Archive Configurations (vwArchiveConfigurations.ID)
43250
+ * * Description: Foreign key to the ArchiveConfiguration that was executed.
43251
+ */
43252
+ get ArchiveConfigurationID() {
43253
+ return this.Get('ArchiveConfigurationID');
43254
+ }
43255
+ set ArchiveConfigurationID(value) {
43256
+ this.Set('ArchiveConfigurationID', value);
43257
+ }
43258
+ /**
43259
+ * * Field Name: StartedAt
43260
+ * * Display Name: Started At
43261
+ * * SQL Data Type: datetimeoffset
43262
+ * * Default Value: getutcdate()
43263
+ * * Description: Timestamp when the archive run started.
43264
+ */
43265
+ get StartedAt() {
43266
+ return this.Get('StartedAt');
43267
+ }
43268
+ set StartedAt(value) {
43269
+ this.Set('StartedAt', value);
43270
+ }
43271
+ /**
43272
+ * * Field Name: CompletedAt
43273
+ * * Display Name: Completed At
43274
+ * * SQL Data Type: datetimeoffset
43275
+ * * Description: Timestamp when the archive run completed (NULL while still running).
43276
+ */
43277
+ get CompletedAt() {
43278
+ return this.Get('CompletedAt');
43279
+ }
43280
+ set CompletedAt(value) {
43281
+ this.Set('CompletedAt', value);
43282
+ }
43283
+ /**
43284
+ * * Field Name: Status
43285
+ * * Display Name: Status
43286
+ * * SQL Data Type: nvarchar(50)
43287
+ * * Default Value: Running
43288
+ * * Value List Type: List
43289
+ * * Possible Values
43290
+ * * Cancelled
43291
+ * * Complete
43292
+ * * Failed
43293
+ * * PartialSuccess
43294
+ * * Running
43295
+ * * Description: Current status: Running, Complete, Failed, Cancelled, or PartialSuccess.
43296
+ */
43297
+ get Status() {
43298
+ return this.Get('Status');
43299
+ }
43300
+ set Status(value) {
43301
+ this.Set('Status', value);
43302
+ }
43303
+ /**
43304
+ * * Field Name: TotalRecords
43305
+ * * Display Name: Total Records
43306
+ * * SQL Data Type: int
43307
+ * * Default Value: 0
43308
+ * * Description: Total number of records identified for archiving in this run.
43309
+ */
43310
+ get TotalRecords() {
43311
+ return this.Get('TotalRecords');
43312
+ }
43313
+ set TotalRecords(value) {
43314
+ this.Set('TotalRecords', value);
43315
+ }
43316
+ /**
43317
+ * * Field Name: ArchivedRecords
43318
+ * * Display Name: Archived Records
43319
+ * * SQL Data Type: int
43320
+ * * Default Value: 0
43321
+ * * Description: Number of records successfully archived.
43322
+ */
43323
+ get ArchivedRecords() {
43324
+ return this.Get('ArchivedRecords');
43325
+ }
43326
+ set ArchivedRecords(value) {
43327
+ this.Set('ArchivedRecords', value);
43328
+ }
43329
+ /**
43330
+ * * Field Name: FailedRecords
43331
+ * * Display Name: Failed Records
43332
+ * * SQL Data Type: int
43333
+ * * Default Value: 0
43334
+ * * Description: Number of records that failed to archive.
43335
+ */
43336
+ get FailedRecords() {
43337
+ return this.Get('FailedRecords');
43338
+ }
43339
+ set FailedRecords(value) {
43340
+ this.Set('FailedRecords', value);
43341
+ }
43342
+ /**
43343
+ * * Field Name: SkippedRecords
43344
+ * * Display Name: Skipped Records
43345
+ * * SQL Data Type: int
43346
+ * * Default Value: 0
43347
+ * * Description: Number of records skipped (e.g., already archived or filtered out).
43348
+ */
43349
+ get SkippedRecords() {
43350
+ return this.Get('SkippedRecords');
43351
+ }
43352
+ set SkippedRecords(value) {
43353
+ this.Set('SkippedRecords', value);
43354
+ }
43355
+ /**
43356
+ * * Field Name: TotalBytesArchived
43357
+ * * Display Name: Total Bytes Archived
43358
+ * * SQL Data Type: bigint
43359
+ * * Default Value: 0
43360
+ * * Description: Total bytes written to archive storage during this run.
43361
+ */
43362
+ get TotalBytesArchived() {
43363
+ return this.Get('TotalBytesArchived');
43364
+ }
43365
+ set TotalBytesArchived(value) {
43366
+ this.Set('TotalBytesArchived', value);
43367
+ }
43368
+ /**
43369
+ * * Field Name: ErrorLog
43370
+ * * Display Name: Error Log
43371
+ * * SQL Data Type: nvarchar(MAX)
43372
+ * * Description: Aggregated error log for the run. Contains error details when Status is Failed or PartialSuccess.
43373
+ */
43374
+ get ErrorLog() {
43375
+ return this.Get('ErrorLog');
43376
+ }
43377
+ set ErrorLog(value) {
43378
+ this.Set('ErrorLog', value);
43379
+ }
43380
+ /**
43381
+ * * Field Name: UserID
43382
+ * * Display Name: Initiated By
43383
+ * * SQL Data Type: uniqueidentifier
43384
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
43385
+ * * Description: The user who initiated this archive run.
43386
+ */
43387
+ get UserID() {
43388
+ return this.Get('UserID');
43389
+ }
43390
+ set UserID(value) {
43391
+ this.Set('UserID', value);
43392
+ }
43393
+ /**
43394
+ * * Field Name: __mj_CreatedAt
43395
+ * * Display Name: Created At
43396
+ * * SQL Data Type: datetimeoffset
43397
+ * * Default Value: getutcdate()
43398
+ */
43399
+ get __mj_CreatedAt() {
43400
+ return this.Get('__mj_CreatedAt');
43401
+ }
43402
+ /**
43403
+ * * Field Name: __mj_UpdatedAt
43404
+ * * Display Name: Updated At
43405
+ * * SQL Data Type: datetimeoffset
43406
+ * * Default Value: getutcdate()
43407
+ */
43408
+ get __mj_UpdatedAt() {
43409
+ return this.Get('__mj_UpdatedAt');
43410
+ }
43411
+ /**
43412
+ * * Field Name: ArchiveConfiguration
43413
+ * * Display Name: Configuration Name
43414
+ * * SQL Data Type: nvarchar(255)
43415
+ */
43416
+ get ArchiveConfiguration() {
43417
+ return this.Get('ArchiveConfiguration');
43418
+ }
43419
+ /**
43420
+ * * Field Name: User
43421
+ * * Display Name: User Name
43422
+ * * SQL Data Type: nvarchar(100)
43423
+ */
43424
+ get User() {
43425
+ return this.Get('User');
43426
+ }
43427
+ };
43428
+ MJArchiveRunEntity = __decorate([
43429
+ RegisterClass(BaseEntity, 'MJ: Archive Runs')
43430
+ ], MJArchiveRunEntity);
43431
+ export { MJArchiveRunEntity };
43432
+ /**
43433
+ * MJ: Artifact Permissions - strongly typed entity sub-class
43434
+ * * Schema: __mj
43435
+ * * Base Table: ArtifactPermission
43436
+ * * Base View: vwArtifactPermissions
43437
+ * * @description Manages user permissions for artifacts with granular access control (Read, Edit, Delete, Share)
43438
+ * * Primary Key: ID
43439
+ * @extends {BaseEntity}
43440
+ * @class
43441
+ * @public
43442
+ */
43443
+ let MJArtifactPermissionEntity = class MJArtifactPermissionEntity extends BaseEntity {
43444
+ /**
43445
+ * Loads the MJ: Artifact Permissions record from the database
43446
+ * @param ID: string - primary key value to load the MJ: Artifact Permissions record.
43447
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
43448
+ * @returns {Promise<boolean>} - true if successful, false otherwise
43449
+ * @public
43450
+ * @async
43451
+ * @memberof MJArtifactPermissionEntity
43452
+ * @method
43453
+ * @override
43454
+ */
43455
+ async Load(ID, EntityRelationshipsToLoad) {
43456
+ const compositeKey = new CompositeKey();
43457
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
43458
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
43459
+ }
43460
+ /**
43461
+ * * Field Name: ID
43462
+ * * Display Name: ID
43463
+ * * SQL Data Type: uniqueidentifier
43464
+ * * Default Value: newsequentialid()
43465
+ */
43466
+ get ID() {
43467
+ return this.Get('ID');
43468
+ }
43469
+ set ID(value) {
43470
+ this.Set('ID', value);
43471
+ }
43472
+ /**
43473
+ * * Field Name: ArtifactID
43474
+ * * Display Name: Artifact ID
43475
+ * * SQL Data Type: uniqueidentifier
43476
+ * * Related Entity/Foreign Key: MJ: Artifacts (vwArtifacts.ID)
43477
+ */
43478
+ get ArtifactID() {
43479
+ return this.Get('ArtifactID');
43480
+ }
43481
+ set ArtifactID(value) {
43482
+ this.Set('ArtifactID', value);
43483
+ }
43484
+ /**
43485
+ * * Field Name: UserID
43486
+ * * Display Name: User ID
43487
+ * * SQL Data Type: uniqueidentifier
43488
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
43489
+ */
43490
+ get UserID() {
43491
+ return this.Get('UserID');
43492
+ }
43493
+ set UserID(value) {
43494
+ this.Set('UserID', value);
43495
+ }
43496
+ /**
43497
+ * * Field Name: CanRead
43498
+ * * Display Name: Can Read
43499
+ * * SQL Data Type: bit
43500
+ * * Default Value: 1
43501
+ * * Description: Whether the user can view/read the artifact
43502
+ */
43503
+ get CanRead() {
43504
+ return this.Get('CanRead');
43505
+ }
43506
+ set CanRead(value) {
43507
+ this.Set('CanRead', value);
43508
+ }
43509
+ /**
43510
+ * * Field Name: CanEdit
43511
+ * * Display Name: Can Edit
43512
+ * * SQL Data Type: bit
43513
+ * * Default Value: 0
43514
+ * * Description: Whether the user can modify the artifact or create new versions
43515
+ */
43516
+ get CanEdit() {
43517
+ return this.Get('CanEdit');
43518
+ }
43519
+ set CanEdit(value) {
43520
+ this.Set('CanEdit', value);
43521
+ }
43522
+ /**
43523
+ * * Field Name: CanDelete
43524
+ * * Display Name: Can Delete
43525
+ * * SQL Data Type: bit
43526
+ * * Default Value: 0
43527
+ * * Description: Whether the user can delete the artifact
43528
+ */
43529
+ get CanDelete() {
43530
+ return this.Get('CanDelete');
43531
+ }
43532
+ set CanDelete(value) {
43533
+ this.Set('CanDelete', value);
43534
+ }
43535
+ /**
43536
+ * * Field Name: CanShare
43537
+ * * Display Name: Can Share
43538
+ * * SQL Data Type: bit
43539
+ * * Default Value: 0
43540
+ * * Description: Whether the user can share the artifact with other users
43541
+ */
43542
+ get CanShare() {
43543
+ return this.Get('CanShare');
43544
+ }
43545
+ set CanShare(value) {
43546
+ this.Set('CanShare', value);
43547
+ }
43548
+ /**
43549
+ * * Field Name: SharedByUserID
43550
+ * * Display Name: Shared By User ID
43551
+ * * SQL Data Type: uniqueidentifier
43552
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
43553
+ * * Description: Foreign key to the User who shared this artifact (if shared)
43554
+ */
43555
+ get SharedByUserID() {
43556
+ return this.Get('SharedByUserID');
43557
+ }
43558
+ set SharedByUserID(value) {
43559
+ this.Set('SharedByUserID', value);
43560
+ }
43561
+ /**
43562
+ * * Field Name: __mj_CreatedAt
43563
+ * * Display Name: Created At
43564
+ * * SQL Data Type: datetimeoffset
43565
+ * * Default Value: getutcdate()
43566
+ */
43567
+ get __mj_CreatedAt() {
43568
+ return this.Get('__mj_CreatedAt');
43569
+ }
43570
+ /**
43571
+ * * Field Name: __mj_UpdatedAt
43572
+ * * Display Name: Updated At
43573
+ * * SQL Data Type: datetimeoffset
43574
+ * * Default Value: getutcdate()
43575
+ */
43576
+ get __mj_UpdatedAt() {
43577
+ return this.Get('__mj_UpdatedAt');
43578
+ }
43579
+ /**
43580
+ * * Field Name: Artifact
43581
+ * * Display Name: Artifact
43582
+ * * SQL Data Type: nvarchar(255)
43583
+ */
43584
+ get Artifact() {
43585
+ return this.Get('Artifact');
43586
+ }
43587
+ /**
43588
+ * * Field Name: User
43589
+ * * Display Name: User
43590
+ * * SQL Data Type: nvarchar(100)
43591
+ */
43592
+ get User() {
43593
+ return this.Get('User');
43594
+ }
43595
+ /**
43596
+ * * Field Name: SharedByUser
43597
+ * * Display Name: Shared By User
43598
+ * * SQL Data Type: nvarchar(100)
43599
+ */
43600
+ get SharedByUser() {
43601
+ return this.Get('SharedByUser');
43602
+ }
43603
+ };
43604
+ MJArtifactPermissionEntity = __decorate([
43605
+ RegisterClass(BaseEntity, 'MJ: Artifact Permissions')
43606
+ ], MJArtifactPermissionEntity);
43607
+ export { MJArtifactPermissionEntity };
43608
+ /**
43609
+ * MJ: Artifact Types - strongly typed entity sub-class
43610
+ * * Schema: __mj
43611
+ * * Base Table: ArtifactType
43612
+ * * Base View: vwArtifactTypes
43613
+ * * @description Defines the types of artifacts that can be created within conversations
43614
+ * * Primary Key: ID
43615
+ * @extends {BaseEntity}
43616
+ * @class
43617
+ * @public
43618
+ */
43619
+ let MJArtifactTypeEntity = class MJArtifactTypeEntity extends BaseEntity {
43620
+ /**
43621
+ * Loads the MJ: Artifact Types record from the database
43622
+ * @param ID: string - primary key value to load the MJ: Artifact Types record.
43623
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
43624
+ * @returns {Promise<boolean>} - true if successful, false otherwise
43625
+ * @public
43626
+ * @async
43627
+ * @memberof MJArtifactTypeEntity
43628
+ * @method
43629
+ * @override
43630
+ */
43631
+ async Load(ID, EntityRelationshipsToLoad) {
43632
+ const compositeKey = new CompositeKey();
43633
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
43634
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
43635
+ }
43636
+ /**
43637
+ * * Field Name: ID
43638
+ * * Display Name: ID
43639
+ * * SQL Data Type: uniqueidentifier
43640
+ */
43641
+ get ID() {
43642
+ return this.Get('ID');
43643
+ }
43644
+ set ID(value) {
43645
+ this.Set('ID', value);
43646
+ }
43647
+ /**
43648
+ * * Field Name: Name
43649
+ * * Display Name: Name
43650
+ * * SQL Data Type: nvarchar(100)
43651
+ * * Description: Display name of the artifact type
43652
+ */
43653
+ get Name() {
43654
+ return this.Get('Name');
43655
+ }
43656
+ set Name(value) {
43657
+ this.Set('Name', value);
43658
+ }
43659
+ /**
43660
+ * * Field Name: Description
43661
+ * * Display Name: Description
43662
+ * * SQL Data Type: nvarchar(MAX)
43663
+ * * Description: Detailed description of the artifact type
43664
+ */
43665
+ get Description() {
43666
+ return this.Get('Description');
43667
+ }
43668
+ set Description(value) {
43669
+ this.Set('Description', value);
43670
+ }
43671
+ /**
43672
+ * * Field Name: ContentType
43673
+ * * Display Name: Content Type
43674
+ * * SQL Data Type: nvarchar(100)
43675
+ * * Description: MIME type or content identifier for this artifact type
43676
+ */
43677
+ get ContentType() {
43678
+ return this.Get('ContentType');
43679
+ }
43680
+ set ContentType(value) {
43681
+ this.Set('ContentType', value);
43682
+ }
43683
+ /**
43684
+ * * Field Name: IsEnabled
43685
+ * * Display Name: Is Enabled
43686
+ * * SQL Data Type: bit
43687
+ * * Default Value: 1
43688
+ * * Description: Indicates if this artifact type is currently available for use
43689
+ */
43690
+ get IsEnabled() {
43691
+ return this.Get('IsEnabled');
43692
+ }
43693
+ set IsEnabled(value) {
43694
+ this.Set('IsEnabled', value);
43695
+ }
43696
+ /**
43697
+ * * Field Name: __mj_CreatedAt
43698
+ * * Display Name: Created At
43699
+ * * SQL Data Type: datetimeoffset
43700
+ * * Default Value: getutcdate()
43701
+ */
43702
+ get __mj_CreatedAt() {
43703
+ return this.Get('__mj_CreatedAt');
43704
+ }
43705
+ /**
43706
+ * * Field Name: __mj_UpdatedAt
43707
+ * * Display Name: Updated At
43708
+ * * SQL Data Type: datetimeoffset
43709
+ * * Default Value: getutcdate()
43710
+ */
43711
+ get __mj_UpdatedAt() {
43712
+ return this.Get('__mj_UpdatedAt');
43713
+ }
43714
+ /**
43715
+ * * Field Name: ParentID
43716
+ * * Display Name: Parent ID
43717
+ * * SQL Data Type: uniqueidentifier
43718
+ * * Related Entity/Foreign Key: MJ: Artifact Types (vwArtifactTypes.ID)
43719
+ * * Description: Parent artifact type ID for hierarchical artifact type organization. Child types inherit ExtractRules from parent but can override.
43720
+ */
43721
+ get ParentID() {
43722
+ return this.Get('ParentID');
43723
+ }
43724
+ set ParentID(value) {
43725
+ this.Set('ParentID', value);
43726
+ }
43727
+ /**
43728
+ * * Field Name: ExtractRules
43729
+ * * Display Name: Extraction Rules
43730
+ * * SQL Data Type: nvarchar(MAX)
43731
+ * * Description: JSON array of extraction rules defining how to extract attributes from artifact content. Each rule has: name (string), description (string), type (TypeScript type), standardProperty ('name'|'description'|'displayMarkdown'|'displayHtml'|null), extractor (JavaScript code string). Child types inherit parent rules and can override by name.
43732
+ */
43733
+ get ExtractRules() {
43734
+ return this.Get('ExtractRules');
43735
+ }
43736
+ set ExtractRules(value) {
43737
+ this.Set('ExtractRules', value);
43738
+ }
43739
+ /**
43740
+ * * Field Name: DriverClass
43741
+ * * Display Name: Driver Class
43742
+ * * SQL Data Type: nvarchar(255)
43743
+ * * Description: Driver class name for the artifact viewer plugin. References Angular component registered with @RegisterClass decorator.
43744
+ */
43745
+ get DriverClass() {
43746
+ return this.Get('DriverClass');
43747
+ }
43748
+ set DriverClass(value) {
43749
+ this.Set('DriverClass', value);
43750
+ }
43751
+ /**
43752
+ * * Field Name: Icon
43753
+ * * Display Name: Icon
43754
+ * * SQL Data Type: nvarchar(255)
43755
+ * * Description: Font Awesome icon class name for displaying this artifact type in the UI (e.g., fa-file-code, fa-chart-line)
43756
+ */
43757
+ get Icon() {
43758
+ return this.Get('Icon');
43759
+ }
43760
+ set Icon(value) {
43761
+ this.Set('Icon', value);
43762
+ }
43763
+ /**
43764
+ * * Field Name: ContentCategory
43765
+ * * Display Name: Content Category
43766
+ * * SQL Data Type: nvarchar(10)
43767
+ * * Default Value: Text
43768
+ * * Value List Type: List
43769
+ * * Possible Values
43770
+ * * File
43771
+ * * Text
43772
+ * * Description: Classifies whether this artifact type stores text content ('Text', the default for all existing types) or a binary file in MJStorage ('File'). Used by AgentRunner and viewer components to route file-based artifacts correctly.
43773
+ */
43774
+ get ContentCategory() {
43775
+ return this.Get('ContentCategory');
43776
+ }
43777
+ set ContentCategory(value) {
43778
+ this.Set('ContentCategory', value);
43779
+ }
43780
+ /**
43781
+ * * Field Name: ToolLibraryClass
43782
+ * * Display Name: Tool Library Class
43783
+ * * SQL Data Type: nvarchar(100)
43784
+ * * Description: Class name for the BaseArtifactToolLibrary subclass that provides type-specific artifact exploration tools for agents. Resolved via ClassFactory. When NULL, ArtifactToolManager uses name-based fallback resolution.
43785
+ */
43786
+ get ToolLibraryClass() {
43787
+ return this.Get('ToolLibraryClass');
43788
+ }
43789
+ set ToolLibraryClass(value) {
43790
+ this.Set('ToolLibraryClass', value);
43791
+ }
43792
+ /**
43793
+ * * Field Name: Parent
43794
+ * * Display Name: Parent
43795
+ * * SQL Data Type: nvarchar(100)
43796
+ */
43797
+ get Parent() {
43798
+ return this.Get('Parent');
43799
+ }
43800
+ /**
43801
+ * * Field Name: RootParentID
43802
+ * * Display Name: Root Parent ID
43803
+ * * SQL Data Type: uniqueidentifier
43804
+ */
43805
+ get RootParentID() {
43806
+ return this.Get('RootParentID');
43807
+ }
43808
+ };
43809
+ MJArtifactTypeEntity = __decorate([
43810
+ RegisterClass(BaseEntity, 'MJ: Artifact Types')
43811
+ ], MJArtifactTypeEntity);
43812
+ export { MJArtifactTypeEntity };
43813
+ /**
43814
+ * MJ: Artifact Uses - strongly typed entity sub-class
43815
+ * * Schema: __mj
43816
+ * * Base Table: ArtifactUse
43817
+ * * Base View: vwArtifactUses
43818
+ * * @description Audit trail of artifact usage for security and analytics. Tracks each time an artifact is viewed, opened, shared, saved, or exported by users.
43819
+ * * Primary Key: ID
43820
+ * @extends {BaseEntity}
43821
+ * @class
43822
+ * @public
43823
+ */
43824
+ let MJArtifactUseEntity = class MJArtifactUseEntity extends BaseEntity {
43825
+ /**
43826
+ * Loads the MJ: Artifact Uses record from the database
43827
+ * @param ID: string - primary key value to load the MJ: Artifact Uses record.
43828
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
43829
+ * @returns {Promise<boolean>} - true if successful, false otherwise
43830
+ * @public
43831
+ * @async
43832
+ * @memberof MJArtifactUseEntity
42447
43833
  * @method
42448
43834
  * @override
42449
43835
  */
@@ -63782,7 +65168,7 @@ let MJIntegrationObjectFieldEntity = class MJIntegrationObjectFieldEntity extend
63782
65168
  }
63783
65169
  /**
63784
65170
  * * Field Name: Name
63785
- * * Display Name: Name
65171
+ * * Display Name: Field Name
63786
65172
  * * SQL Data Type: nvarchar(255)
63787
65173
  * * Description: Field name as returned by the external API
63788
65174
  */
@@ -63830,7 +65216,7 @@ let MJIntegrationObjectFieldEntity = class MJIntegrationObjectFieldEntity extend
63830
65216
  }
63831
65217
  /**
63832
65218
  * * Field Name: Type
63833
- * * Display Name: Type
65219
+ * * Display Name: Data Type
63834
65220
  * * SQL Data Type: nvarchar(100)
63835
65221
  * * Description: Data type of the field (e.g., nvarchar, int, datetime, decimal, bit). Uses same type vocabulary as EntityField.
63836
65222
  */
@@ -63903,7 +65289,7 @@ let MJIntegrationObjectFieldEntity = class MJIntegrationObjectFieldEntity extend
63903
65289
  }
63904
65290
  /**
63905
65291
  * * Field Name: IsPrimaryKey
63906
- * * Display Name: Primary Key
65292
+ * * Display Name: Is Primary Key
63907
65293
  * * SQL Data Type: bit
63908
65294
  * * Default Value: 0
63909
65295
  * * Description: Whether this field is part of the object primary key
@@ -63916,7 +65302,7 @@ let MJIntegrationObjectFieldEntity = class MJIntegrationObjectFieldEntity extend
63916
65302
  }
63917
65303
  /**
63918
65304
  * * Field Name: IsUniqueKey
63919
- * * Display Name: Unique Key
65305
+ * * Display Name: Is Unique Key
63920
65306
  * * SQL Data Type: bit
63921
65307
  * * Default Value: 0
63922
65308
  * * Description: Whether values must be unique across all records
@@ -63929,7 +65315,7 @@ let MJIntegrationObjectFieldEntity = class MJIntegrationObjectFieldEntity extend
63929
65315
  }
63930
65316
  /**
63931
65317
  * * Field Name: IsReadOnly
63932
- * * Display Name: Read Only
65318
+ * * Display Name: Is Read Only
63933
65319
  * * SQL Data Type: bit
63934
65320
  * * Default Value: 0
63935
65321
  * * Description: Whether this field cannot be written back to the source system
@@ -63942,7 +65328,7 @@ let MJIntegrationObjectFieldEntity = class MJIntegrationObjectFieldEntity extend
63942
65328
  }
63943
65329
  /**
63944
65330
  * * Field Name: IsRequired
63945
- * * Display Name: Required
65331
+ * * Display Name: Is Required
63946
65332
  * * SQL Data Type: bit
63947
65333
  * * Default Value: 0
63948
65334
  * * Description: Whether this field is required for create/update operations
@@ -64040,6 +65426,19 @@ let MJIntegrationObjectFieldEntity = class MJIntegrationObjectFieldEntity extend
64040
65426
  return this.Get('__mj_UpdatedAt');
64041
65427
  }
64042
65428
  /**
65429
+ * * Field Name: IsCustom
65430
+ * * Display Name: Is Custom
65431
+ * * SQL Data Type: bit
65432
+ * * Default Value: 0
65433
+ * * Description: When true, this field was dynamically discovered by IntrospectSchema and is not defined in static connector metadata.
65434
+ */
65435
+ get IsCustom() {
65436
+ return this.Get('IsCustom');
65437
+ }
65438
+ set IsCustom(value) {
65439
+ this.Set('IsCustom', value);
65440
+ }
65441
+ /**
64043
65442
  * * Field Name: IntegrationObject
64044
65443
  * * Display Name: Integration Object Name
64045
65444
  * * SQL Data Type: nvarchar(255)
@@ -64103,7 +65502,7 @@ let MJIntegrationObjectEntity = class MJIntegrationObjectEntity extends BaseEnti
64103
65502
  }
64104
65503
  /**
64105
65504
  * * Field Name: IntegrationID
64106
- * * Display Name: Integration
65505
+ * * Display Name: Integration ID
64107
65506
  * * SQL Data Type: uniqueidentifier
64108
65507
  * * Related Entity/Foreign Key: MJ: Integrations (vwIntegrations.ID)
64109
65508
  * * Description: Foreign key to the Integration that owns this object
@@ -64259,7 +65658,7 @@ let MJIntegrationObjectEntity = class MJIntegrationObjectEntity extends BaseEnti
64259
65658
  }
64260
65659
  /**
64261
65660
  * * Field Name: DefaultQueryParams
64262
- * * Display Name: Default Query Parameters
65661
+ * * Display Name: Default Query Params
64263
65662
  * * SQL Data Type: nvarchar(MAX)
64264
65663
  * * Description: JSON object of default query parameters to include with every API request for this object
64265
65664
  */
@@ -64369,8 +65768,21 @@ let MJIntegrationObjectEntity = class MJIntegrationObjectEntity extends BaseEnti
64369
65768
  this.Set('DeleteMethod', value);
64370
65769
  }
64371
65770
  /**
65771
+ * * Field Name: IsCustom
65772
+ * * Display Name: Is Custom
65773
+ * * SQL Data Type: bit
65774
+ * * Default Value: 0
65775
+ * * Description: When true, this object was dynamically discovered by IntrospectSchema and is not defined in static connector metadata.
65776
+ */
65777
+ get IsCustom() {
65778
+ return this.Get('IsCustom');
65779
+ }
65780
+ set IsCustom(value) {
65781
+ this.Set('IsCustom', value);
65782
+ }
65783
+ /**
64372
65784
  * * Field Name: Integration
64373
- * * Display Name: Integration Name
65785
+ * * Display Name: Integration
64374
65786
  * * SQL Data Type: nvarchar(100)
64375
65787
  */
64376
65788
  get Integration() {
@@ -67383,6 +68795,109 @@ MJMCPToolExecutionLogEntity = __decorate([
67383
68795
  RegisterClass(BaseEntity, 'MJ: MCP Tool Execution Logs')
67384
68796
  ], MJMCPToolExecutionLogEntity);
67385
68797
  export { MJMCPToolExecutionLogEntity };
68798
+ /**
68799
+ * MJ: MCP Tool Favorites - strongly typed entity sub-class
68800
+ * * Schema: __mj
68801
+ * * Base Table: MCPToolFavorite
68802
+ * * Base View: vwMCPToolFavorites
68803
+ * * @description Per-user favorite marker for an MCP Server Tool. Lets users star tools for quick access in the MCP Dashboard and Test dialog.
68804
+ * * Primary Key: ID
68805
+ * @extends {BaseEntity}
68806
+ * @class
68807
+ * @public
68808
+ */
68809
+ let MJMCPToolFavoriteEntity = class MJMCPToolFavoriteEntity extends BaseEntity {
68810
+ /**
68811
+ * Loads the MJ: MCP Tool Favorites record from the database
68812
+ * @param ID: string - primary key value to load the MJ: MCP Tool Favorites record.
68813
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
68814
+ * @returns {Promise<boolean>} - true if successful, false otherwise
68815
+ * @public
68816
+ * @async
68817
+ * @memberof MJMCPToolFavoriteEntity
68818
+ * @method
68819
+ * @override
68820
+ */
68821
+ async Load(ID, EntityRelationshipsToLoad) {
68822
+ const compositeKey = new CompositeKey();
68823
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
68824
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
68825
+ }
68826
+ /**
68827
+ * * Field Name: ID
68828
+ * * Display Name: ID
68829
+ * * SQL Data Type: uniqueidentifier
68830
+ * * Default Value: newsequentialid()
68831
+ */
68832
+ get ID() {
68833
+ return this.Get('ID');
68834
+ }
68835
+ set ID(value) {
68836
+ this.Set('ID', value);
68837
+ }
68838
+ /**
68839
+ * * Field Name: UserID
68840
+ * * Display Name: User ID
68841
+ * * SQL Data Type: uniqueidentifier
68842
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
68843
+ */
68844
+ get UserID() {
68845
+ return this.Get('UserID');
68846
+ }
68847
+ set UserID(value) {
68848
+ this.Set('UserID', value);
68849
+ }
68850
+ /**
68851
+ * * Field Name: MCPServerToolID
68852
+ * * Display Name: MCP Server Tool ID
68853
+ * * SQL Data Type: uniqueidentifier
68854
+ * * Related Entity/Foreign Key: MJ: MCP Server Tools (vwMCPServerTools.ID)
68855
+ */
68856
+ get MCPServerToolID() {
68857
+ return this.Get('MCPServerToolID');
68858
+ }
68859
+ set MCPServerToolID(value) {
68860
+ this.Set('MCPServerToolID', value);
68861
+ }
68862
+ /**
68863
+ * * Field Name: __mj_CreatedAt
68864
+ * * Display Name: Created At
68865
+ * * SQL Data Type: datetimeoffset
68866
+ * * Default Value: getutcdate()
68867
+ */
68868
+ get __mj_CreatedAt() {
68869
+ return this.Get('__mj_CreatedAt');
68870
+ }
68871
+ /**
68872
+ * * Field Name: __mj_UpdatedAt
68873
+ * * Display Name: Updated At
68874
+ * * SQL Data Type: datetimeoffset
68875
+ * * Default Value: getutcdate()
68876
+ */
68877
+ get __mj_UpdatedAt() {
68878
+ return this.Get('__mj_UpdatedAt');
68879
+ }
68880
+ /**
68881
+ * * Field Name: User
68882
+ * * Display Name: User
68883
+ * * SQL Data Type: nvarchar(100)
68884
+ */
68885
+ get User() {
68886
+ return this.Get('User');
68887
+ }
68888
+ /**
68889
+ * * Field Name: MCPServerTool
68890
+ * * Display Name: MCP Server Tool
68891
+ * * SQL Data Type: nvarchar(255)
68892
+ */
68893
+ get MCPServerTool() {
68894
+ return this.Get('MCPServerTool');
68895
+ }
68896
+ };
68897
+ MJMCPToolFavoriteEntity = __decorate([
68898
+ RegisterClass(BaseEntity, 'MJ: MCP Tool Favorites')
68899
+ ], MJMCPToolFavoriteEntity);
68900
+ export { MJMCPToolFavoriteEntity };
67386
68901
  /**
67387
68902
  * MJ: O Auth Auth Server Metadata Caches - strongly typed entity sub-class
67388
68903
  * * Schema: __mj
@@ -72481,6 +73996,7 @@ let MJRecordChangeEntity = class MJRecordChangeEntity extends BaseEntity {
72481
73996
  * * Possible Values
72482
73997
  * * External
72483
73998
  * * Internal
73999
+ * * Restore
72484
74000
  * * Description: Internal or External
72485
74001
  */
72486
74002
  get Source() {
@@ -72528,7 +74044,7 @@ let MJRecordChangeEntity = class MJRecordChangeEntity extends BaseEntity {
72528
74044
  }
72529
74045
  /**
72530
74046
  * * Field Name: FullRecordJSON
72531
- * * Display Name: Full Record Snapshot
74047
+ * * Display Name: Full Record JSON
72532
74048
  * * SQL Data Type: nvarchar(MAX)
72533
74049
  * * Description: A complete snapshot of the record AFTER the change was applied in a JSON format that can be parsed.
72534
74050
  */
@@ -72624,8 +74140,33 @@ let MJRecordChangeEntity = class MJRecordChangeEntity extends BaseEntity {
72624
74140
  return this.Get('UpdatedAt');
72625
74141
  }
72626
74142
  /**
74143
+ * * Field Name: RestoredFromID
74144
+ * * Display Name: Restored From ID
74145
+ * * SQL Data Type: uniqueidentifier
74146
+ * * Related Entity/Foreign Key: MJ: Record Changes (vwRecordChanges.ID)
74147
+ * * Description: When this RecordChange was produced by a restore operation, points at the historical RecordChange whose state was restored. NULL for ordinary changes. Together with Source='Restore' this builds the version-chain lineage for auditing and timeline navigation.
74148
+ */
74149
+ get RestoredFromID() {
74150
+ return this.Get('RestoredFromID');
74151
+ }
74152
+ set RestoredFromID(value) {
74153
+ this.Set('RestoredFromID', value);
74154
+ }
74155
+ /**
74156
+ * * Field Name: RestoreReason
74157
+ * * Display Name: Restore Reason
74158
+ * * SQL Data Type: nvarchar(MAX)
74159
+ * * Description: Optional user-entered explanation captured at restore time. Persisted for audit purposes (regulated industries often require a reason for every reversal). NULL when the user did not enter one or when the change was not a restore.
74160
+ */
74161
+ get RestoreReason() {
74162
+ return this.Get('RestoreReason');
74163
+ }
74164
+ set RestoreReason(value) {
74165
+ this.Set('RestoreReason', value);
74166
+ }
74167
+ /**
72627
74168
  * * Field Name: Entity
72628
- * * Display Name: Entity
74169
+ * * Display Name: Entity Name
72629
74170
  * * SQL Data Type: nvarchar(255)
72630
74171
  */
72631
74172
  get Entity() {
@@ -72655,6 +74196,22 @@ let MJRecordChangeEntity = class MJRecordChangeEntity extends BaseEntity {
72655
74196
  get Integration() {
72656
74197
  return this.Get('Integration');
72657
74198
  }
74199
+ /**
74200
+ * * Field Name: RestoredFrom
74201
+ * * Display Name: Restored From
74202
+ * * SQL Data Type: nvarchar(750)
74203
+ */
74204
+ get RestoredFrom() {
74205
+ return this.Get('RestoredFrom');
74206
+ }
74207
+ /**
74208
+ * * Field Name: RootRestoredFromID
74209
+ * * Display Name: Root Restored From ID
74210
+ * * SQL Data Type: uniqueidentifier
74211
+ */
74212
+ get RootRestoredFromID() {
74213
+ return this.Get('RootRestoredFromID');
74214
+ }
72658
74215
  };
72659
74216
  MJRecordChangeEntity = __decorate([
72660
74217
  RegisterClass(BaseEntity, 'MJ: Record Changes')
@@ -84458,7 +86015,7 @@ let MJVersionLabelItemEntity = class MJVersionLabelItemEntity extends BaseEntity
84458
86015
  /**
84459
86016
  * * Field Name: RecordChange
84460
86017
  * * Display Name: Record Change
84461
- * * SQL Data Type: nvarchar(MAX)
86018
+ * * SQL Data Type: nvarchar(750)
84462
86019
  */
84463
86020
  get RecordChange() {
84464
86021
  return this.Get('RecordChange');