@memberjunction/core-entities 6.2.0-edge.0 → 6.2.0-edge.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/artifact-extraction/artifact-extractor.d.ts +1 -1
  3. package/dist/artifact-extraction/artifact-extractor.js +2 -2
  4. package/dist/custom/MJConversationDetailEntityExtended.d.ts +1 -1
  5. package/dist/custom/MJConversationDetailEntityExtended.js +5 -5
  6. package/dist/custom/MJTemplateEntityExtended.d.ts +2 -2
  7. package/dist/custom/MJTemplateEntityExtended.js +6 -6
  8. package/dist/custom/MJUserViewEntityExtended.d.ts +4 -4
  9. package/dist/custom/MJUserViewEntityExtended.js +22 -22
  10. package/dist/custom/MJUserViewEntityExtended.js.map +1 -1
  11. package/dist/custom/Permissions/BaseShareEntityExtended.d.ts +8 -0
  12. package/dist/custom/Permissions/BaseShareEntityExtended.d.ts.map +1 -1
  13. package/dist/custom/Permissions/BaseShareEntityExtended.js +20 -4
  14. package/dist/custom/Permissions/BaseShareEntityExtended.js.map +1 -1
  15. package/dist/custom/Permissions/MJAccessControlRuleEntityExtended.js +4 -4
  16. package/dist/custom/Permissions/MJArtifactPermissionEntityExtended.js +5 -5
  17. package/dist/custom/Permissions/MJCollectionPermissionEntityExtended.js +5 -5
  18. package/dist/custom/Permissions/MJDashboardPermissionEntityExtended.js +5 -5
  19. package/dist/custom/ResourcePermissions/MJResourcePermissionEntityExtended.js +2 -2
  20. package/dist/custom/ResourcePermissions/ResourcePermissionEngine.d.ts +2 -2
  21. package/dist/custom/ResourcePermissions/ResourcePermissionEngine.js +5 -5
  22. package/dist/engines/ApplicationSettingEngine.d.ts +1 -1
  23. package/dist/engines/ApplicationSettingEngine.js +8 -8
  24. package/dist/engines/AuditLogTypeEngine.d.ts +1 -1
  25. package/dist/engines/AuditLogTypeEngine.js +4 -4
  26. package/dist/engines/InstanceConfigEngine.d.ts +1 -1
  27. package/dist/engines/InstanceConfigEngine.js +2 -2
  28. package/dist/engines/MCPEngine.d.ts +4 -4
  29. package/dist/engines/MCPEngine.js +24 -24
  30. package/dist/engines/PermissionEngine.d.ts +2 -0
  31. package/dist/engines/PermissionEngine.d.ts.map +1 -1
  32. package/dist/engines/PermissionEngine.js +5 -1
  33. package/dist/engines/PermissionEngine.js.map +1 -1
  34. package/dist/engines/ResourceTypeEngine.d.ts +1 -1
  35. package/dist/engines/ResourceTypeEngine.js +4 -4
  36. package/dist/engines/TypeTablesCache.d.ts +1 -1
  37. package/dist/engines/TypeTablesCache.js +3 -3
  38. package/dist/engines/UserInfoEngine.d.ts +8 -8
  39. package/dist/engines/UserInfoEngine.js +48 -48
  40. package/dist/engines/UserRoutineEngine.d.ts +3 -3
  41. package/dist/engines/UserRoutineEngine.js +15 -15
  42. package/dist/engines/conversations.d.ts +192 -12
  43. package/dist/engines/conversations.d.ts.map +1 -1
  44. package/dist/engines/conversations.js +547 -102
  45. package/dist/engines/conversations.js.map +1 -1
  46. package/dist/generated/entities/__mj.d.ts +623 -14
  47. package/dist/generated/entities/__mj.d.ts.map +1 -1
  48. package/dist/generated/entities/__mj.js +112 -8
  49. package/dist/generated/entities/__mj.js.map +1 -1
  50. package/package.json +5 -5
@@ -2463,8 +2463,8 @@ export const MJAIAgentRunSchema = z.object({
2463
2463
  TotalCost: z.number().nullable().describe(`
2464
2464
  * * Field Name: TotalCost
2465
2465
  * * Display Name: Total Cost
2466
- * * SQL Data Type: decimal(18, 6)
2467
- * * Default Value: 0.000000
2466
+ * * SQL Data Type: decimal(19, 8)
2467
+ * * Default Value: 0.00000000
2468
2468
  * * Description: Total estimated cost for all AI model usage during this agent run`),
2469
2469
  __mj_CreatedAt: z.date().describe(`
2470
2470
  * * Field Name: __mj_CreatedAt
@@ -6230,7 +6230,7 @@ export const MJAIPromptRunSchema = z.object({
6230
6230
  TotalCost: z.number().nullable().describe(`
6231
6231
  * * Field Name: TotalCost
6232
6232
  * * Display Name: Total Cost
6233
- * * SQL Data Type: decimal(18, 6)
6233
+ * * SQL Data Type: decimal(19, 8)
6234
6234
  * * Description: Total cost of this prompt run including its own cost plus all descendant costs. Calculated as Cost + DescendantCost. This value is stored (not computed) for query performance. Currency is specified in CostCurrency field.`),
6235
6235
  Success: z.boolean().describe(`
6236
6236
  * * Field Name: Success
@@ -6359,7 +6359,7 @@ export const MJAIPromptRunSchema = z.object({
6359
6359
  DescendantCost: z.number().nullable().describe(`
6360
6360
  * * Field Name: DescendantCost
6361
6361
  * * Display Name: Descendant Cost
6362
- * * SQL Data Type: decimal(18, 6)
6362
+ * * SQL Data Type: decimal(19, 8)
6363
6363
  * * Description: The total cost of all descendant (child and grandchild) prompt runs, excluding this run's own cost. For leaf nodes (no children), this is 0. Updated when child costs change.`),
6364
6364
  ValidationAttemptCount: z.number().nullable().describe(`
6365
6365
  * * Field Name: ValidationAttemptCount
@@ -6656,6 +6656,12 @@ export const MJAIPromptRunSchema = z.object({
6656
6656
  * * NativeFallback
6657
6657
  * * NativeImplicit
6658
6658
  * * Description: Which tool-calling path this run actually took. 'Native' = Actions declared as tools, control flow in the JSON envelope (the hybrid). 'NativeImplicit' = Actions, sub-agents, payload_change_request and ask_user declared as tools; a tool call continues the loop and plain text ends the turn. 'Envelope' = no tools declared — the vendor-agnostic JSON-envelope path, including a prompt that asked for native mode on a model/vendor without the capability (also logs a warning). 'NativeFallback' = a native attempt failed in a tools-specific way and completed via a single envelope retry. NULL = pre-feature rows or a run that never reached a model call.`),
6659
+ UserID: z.string().nullable().describe(`
6660
+ * * Field Name: UserID
6661
+ * * Display Name: User ID
6662
+ * * SQL Data Type: uniqueidentifier
6663
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
6664
+ * * Description: The user on whose behalf this prompt was executed, written when the run is created. NULL for automated/unauthenticated runs and for runs that pre-date this column. For an agent-driven run the agent run's user is also reachable through AIAgentRunStep.TargetLogID, which vwAIUsageFacts falls back to.`),
6659
6665
  Prompt: z.string().describe(`
6660
6666
  * * Field Name: Prompt
6661
6667
  * * Display Name: Prompt
@@ -6704,6 +6710,10 @@ export const MJAIPromptRunSchema = z.object({
6704
6710
  * * Field Name: UsageType
6705
6711
  * * Display Name: Usage Type
6706
6712
  * * SQL Data Type: nvarchar(50)`),
6713
+ User: z.string().nullable().describe(`
6714
+ * * Field Name: User
6715
+ * * Display Name: User
6716
+ * * SQL Data Type: nvarchar(100)`),
6707
6717
  RootParentID: z.string().nullable().describe(`
6708
6718
  * * Field Name: RootParentID
6709
6719
  * * Display Name: Root Parent
@@ -7857,6 +7867,12 @@ export const MJAIVendorSchema = z.object({
7857
7867
  * * SQL Data Type: uniqueidentifier
7858
7868
  * * Related Entity/Foreign Key: MJ: Credential Types (vwCredentialTypes.ID)
7859
7869
  * * Description: Reference to the type of credential this vendor expects (e.g., API Key, GCP Service Account, Azure Service Principal). Used for type-based default credential resolution when no explicit binding exists, and for UI guidance when creating credentials.`),
7870
+ Configuration: z.any().nullable().describe(`
7871
+ * * Field Name: Configuration
7872
+ * * Display Name: Configuration
7873
+ * * SQL Data Type: nvarchar(MAX)
7874
+ * * JSON Type: MJAIVendorEntity_IAIVendorConfiguration
7875
+ * * Description: Vendor configuration bag (JSON, IAIVendorConfiguration shape). Its ModelDefaults key is an IAIModelConfiguration bag (LLM / Realtime / Vision / Audio sections) that forms the default model configuration for every model this vendor serves: the vendor layer of the ModelConfiguration cascade, above AIModelType and AIModel and below AIModelVendor, which may override it per key. NULL = contributes nothing.`),
7860
7876
  CredentialType: z.string().nullable().describe(`
7861
7877
  * * Field Name: CredentialType
7862
7878
  * * Display Name: Credential Type
@@ -25062,6 +25078,12 @@ export const MJProjectSchema = z.object({
25062
25078
  * * Display Name: Updated At
25063
25079
  * * SQL Data Type: datetimeoffset
25064
25080
  * * Default Value: getutcdate()`),
25081
+ OwnerUserID: z.string().nullable().describe(`
25082
+ * * Field Name: OwnerUserID
25083
+ * * Display Name: Owner User ID
25084
+ * * SQL Data Type: uniqueidentifier
25085
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
25086
+ * * Description: The user who owns this folder, or NULL when the folder is shared with the whole environment. NULL (the value every pre-existing folder carries) means SHARED: visible to anyone who can read projects in the environment, which was the only possible behaviour before this column existed. A set value means PERSONAL: the folder belongs to that user and consumers filter it to them, so it stays out of other people's sidebars. Personal is opt-in at create time; nothing is migrated.`),
25065
25087
  Environment: z.string().describe(`
25066
25088
  * * Field Name: Environment
25067
25089
  * * Display Name: Environment
@@ -25070,6 +25092,10 @@ export const MJProjectSchema = z.object({
25070
25092
  * * Field Name: Parent
25071
25093
  * * Display Name: Parent
25072
25094
  * * SQL Data Type: nvarchar(255)`),
25095
+ OwnerUser: z.string().nullable().describe(`
25096
+ * * Field Name: OwnerUser
25097
+ * * Display Name: Owner User
25098
+ * * SQL Data Type: nvarchar(100)`),
25073
25099
  RootParentID: z.string().nullable().describe(`
25074
25100
  * * Field Name: RootParentID
25075
25101
  * * Display Name: Root Parent ID
@@ -40204,8 +40230,8 @@ let MJAIAgentRunEntity = class MJAIAgentRunEntity extends BaseEntity {
40204
40230
  /**
40205
40231
  * * Field Name: TotalCost
40206
40232
  * * Display Name: Total Cost
40207
- * * SQL Data Type: decimal(18, 6)
40208
- * * Default Value: 0.000000
40233
+ * * SQL Data Type: decimal(19, 8)
40234
+ * * Default Value: 0.00000000
40209
40235
  * * Description: Total estimated cost for all AI model usage during this agent run
40210
40236
  */
40211
40237
  get TotalCost() {
@@ -50191,7 +50217,7 @@ let MJAIPromptRunEntity = class MJAIPromptRunEntity extends BaseEntity {
50191
50217
  /**
50192
50218
  * * Field Name: TotalCost
50193
50219
  * * Display Name: Total Cost
50194
- * * SQL Data Type: decimal(18, 6)
50220
+ * * SQL Data Type: decimal(19, 8)
50195
50221
  * * Description: Total cost of this prompt run including its own cost plus all descendant costs. Calculated as Cost + DescendantCost. This value is stored (not computed) for query performance. Currency is specified in CostCurrency field.
50196
50222
  */
50197
50223
  get TotalCost() {
@@ -50482,7 +50508,7 @@ let MJAIPromptRunEntity = class MJAIPromptRunEntity extends BaseEntity {
50482
50508
  /**
50483
50509
  * * Field Name: DescendantCost
50484
50510
  * * Display Name: Descendant Cost
50485
- * * SQL Data Type: decimal(18, 6)
50511
+ * * SQL Data Type: decimal(19, 8)
50486
50512
  * * Description: The total cost of all descendant (child and grandchild) prompt runs, excluding this run's own cost. For leaf nodes (no children), this is 0. Updated when child costs change.
50487
50513
  */
50488
50514
  get DescendantCost() {
@@ -51158,6 +51184,19 @@ let MJAIPromptRunEntity = class MJAIPromptRunEntity extends BaseEntity {
51158
51184
  this.Set('ToolCallingMode', value);
51159
51185
  }
51160
51186
  /**
51187
+ * * Field Name: UserID
51188
+ * * Display Name: User ID
51189
+ * * SQL Data Type: uniqueidentifier
51190
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
51191
+ * * Description: The user on whose behalf this prompt was executed, written when the run is created. NULL for automated/unauthenticated runs and for runs that pre-date this column. For an agent-driven run the agent run's user is also reachable through AIAgentRunStep.TargetLogID, which vwAIUsageFacts falls back to.
51192
+ */
51193
+ get UserID() {
51194
+ return this.Get('UserID');
51195
+ }
51196
+ set UserID(value) {
51197
+ this.Set('UserID', value);
51198
+ }
51199
+ /**
51161
51200
  * * Field Name: Prompt
51162
51201
  * * Display Name: Prompt
51163
51202
  * * SQL Data Type: nvarchar(255)
@@ -51254,6 +51293,14 @@ let MJAIPromptRunEntity = class MJAIPromptRunEntity extends BaseEntity {
51254
51293
  return this.Get('UsageType');
51255
51294
  }
51256
51295
  /**
51296
+ * * Field Name: User
51297
+ * * Display Name: User
51298
+ * * SQL Data Type: nvarchar(100)
51299
+ */
51300
+ get User() {
51301
+ return this.Get('User');
51302
+ }
51303
+ /**
51257
51304
  * * Field Name: RootParentID
51258
51305
  * * Display Name: Root Parent
51259
51306
  * * SQL Data Type: uniqueidentifier
@@ -54053,6 +54100,11 @@ export { MJAIVendorTypeEntity };
54053
54100
  * @public
54054
54101
  */
54055
54102
  let MJAIVendorEntity = class MJAIVendorEntity extends BaseEntity {
54103
+ constructor() {
54104
+ super(...arguments);
54105
+ this._ConfigurationObject_cached = undefined;
54106
+ this._ConfigurationObject_lastRaw = null;
54107
+ }
54056
54108
  /**
54057
54109
  * Loads the MJ: AI Vendors record from the database
54058
54110
  * @param ID: string - primary key value to load the MJ: AI Vendors record.
@@ -54137,6 +54189,37 @@ let MJAIVendorEntity = class MJAIVendorEntity extends BaseEntity {
54137
54189
  this.Set('CredentialTypeID', value);
54138
54190
  }
54139
54191
  /**
54192
+ * * Field Name: Configuration
54193
+ * * Display Name: Configuration
54194
+ * * SQL Data Type: nvarchar(MAX)
54195
+ * * JSON Type: MJAIVendorEntity_IAIVendorConfiguration
54196
+ * * Description: Vendor configuration bag (JSON, IAIVendorConfiguration shape). Its ModelDefaults key is an IAIModelConfiguration bag (LLM / Realtime / Vision / Audio sections) that forms the default model configuration for every model this vendor serves: the vendor layer of the ModelConfiguration cascade, above AIModelType and AIModel and below AIModelVendor, which may override it per key. NULL = contributes nothing.
54197
+ */
54198
+ get Configuration() {
54199
+ return this.Get('Configuration');
54200
+ }
54201
+ set Configuration(value) {
54202
+ this.Set('Configuration', value);
54203
+ }
54204
+ /**
54205
+ * Typed accessor for Configuration — returns parsed JSON as MJAIVendorEntity_IAIVendorConfiguration.
54206
+ * Uses lazy parsing with cache invalidation when the underlying raw value changes.
54207
+ */
54208
+ get ConfigurationObject() {
54209
+ const raw = this.Configuration;
54210
+ if (raw !== this._ConfigurationObject_lastRaw) {
54211
+ this._ConfigurationObject_cached = raw ? JSON.parse(raw) : null;
54212
+ this._ConfigurationObject_lastRaw = raw;
54213
+ }
54214
+ return this._ConfigurationObject_cached;
54215
+ }
54216
+ set ConfigurationObject(value) {
54217
+ const raw = value ? JSON.stringify(value) : null;
54218
+ this.Configuration = raw;
54219
+ this._ConfigurationObject_cached = value;
54220
+ this._ConfigurationObject_lastRaw = raw;
54221
+ }
54222
+ /**
54140
54223
  * * Field Name: CredentialType
54141
54224
  * * Display Name: Credential Type
54142
54225
  * * SQL Data Type: nvarchar(100)
@@ -96752,6 +96835,19 @@ let MJProjectEntity = class MJProjectEntity extends BaseEntity {
96752
96835
  return this.Get('__mj_UpdatedAt');
96753
96836
  }
96754
96837
  /**
96838
+ * * Field Name: OwnerUserID
96839
+ * * Display Name: Owner User ID
96840
+ * * SQL Data Type: uniqueidentifier
96841
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
96842
+ * * Description: The user who owns this folder, or NULL when the folder is shared with the whole environment. NULL (the value every pre-existing folder carries) means SHARED: visible to anyone who can read projects in the environment, which was the only possible behaviour before this column existed. A set value means PERSONAL: the folder belongs to that user and consumers filter it to them, so it stays out of other people's sidebars. Personal is opt-in at create time; nothing is migrated.
96843
+ */
96844
+ get OwnerUserID() {
96845
+ return this.Get('OwnerUserID');
96846
+ }
96847
+ set OwnerUserID(value) {
96848
+ this.Set('OwnerUserID', value);
96849
+ }
96850
+ /**
96755
96851
  * * Field Name: Environment
96756
96852
  * * Display Name: Environment
96757
96853
  * * SQL Data Type: nvarchar(255)
@@ -96768,6 +96864,14 @@ let MJProjectEntity = class MJProjectEntity extends BaseEntity {
96768
96864
  return this.Get('Parent');
96769
96865
  }
96770
96866
  /**
96867
+ * * Field Name: OwnerUser
96868
+ * * Display Name: Owner User
96869
+ * * SQL Data Type: nvarchar(100)
96870
+ */
96871
+ get OwnerUser() {
96872
+ return this.Get('OwnerUser');
96873
+ }
96874
+ /**
96771
96875
  * * Field Name: RootParentID
96772
96876
  * * Display Name: Root Parent ID
96773
96877
  * * SQL Data Type: uniqueidentifier