@memberjunction/core-entities 6.1.4 → 6.1.5

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.
@@ -34,8 +34,13 @@ export declare class MJConversationDetailEntityExtended extends MJConversationDe
34
34
  */
35
35
  private dirtyRatingFieldNames;
36
36
  /**
37
- * Populate `LatestResult.Message` so callers that inspect the save result
38
- * see why the write was refused rather than a generic failure.
37
+ * Records WHY the write was refused as a NEW `ResultHistory` entry, so callers that read
38
+ * `LatestResult.CompleteMessage` see the reason (issue #4791).
39
+ *
40
+ * It must be a new entry, not an edit of `LatestResult`: on a brand-new record there IS no
41
+ * `LatestResult` yet (nothing has been saved), so editing it silently dropped the denial and
42
+ * every caller logged "unknown error". Appending also leaves an earlier successful save's
43
+ * entry untouched. Mirrors `ReadOnlyExternalBaseEntity.rejectMutation`.
39
44
  */
40
45
  private RecordDenied;
41
46
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MJConversationDetailEntityExtended.d.ts","sourceRoot":"","sources":["../../src/custom/MJConversationDetailEntityExtended.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,mBAAmB,EACnB,iBAAiB,EAGpB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACH,0BAA0B,EAG7B,MAAM,gCAAgC,CAAC;AAcxC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBACa,kCAAmC,SAAQ,0BAA0B;IAC/D,IAAI,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;IAOnD,MAAM,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;YAOxD,mBAAmB;IA0EjC;;;;OAIG;IACH,OAAO,CAAC,qBAAqB;IAS7B;;;OAGG;IACH,OAAO,CAAC,YAAY;CAOvB;AAED,6FAA6F;AAC7F,wBAAgB,sCAAsC,IAAI,IAAI,CAE7D"}
1
+ {"version":3,"file":"MJConversationDetailEntityExtended.d.ts","sourceRoot":"","sources":["../../src/custom/MJConversationDetailEntityExtended.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,mBAAmB,EACnB,iBAAiB,EAGpB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACH,0BAA0B,EAG7B,MAAM,gCAAgC,CAAC;AAcxC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBACa,kCAAmC,SAAQ,0BAA0B;IAC/D,IAAI,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;IAOnD,MAAM,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;YAOxD,mBAAmB;IA6EjC;;;;OAIG;IACH,OAAO,CAAC,qBAAqB;IAS7B;;;;;;;;OAQG;IACH,OAAO,CAAC,YAAY;CASvB;AAED,6FAA6F;AAC7F,wBAAgB,sCAAsC,IAAI,IAAI,CAE7D"}
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { BaseEntity, LogError } from '@memberjunction/core';
7
+ import { BaseEntity, BaseEntityResult, LogError } from '@memberjunction/core';
8
8
  import { RegisterClass, UUIDsEqual } from '@memberjunction/global';
9
9
  import { MJConversationDetailEntity } from '../generated/entity_subclasses.js';
10
10
  import { ResourcePermissionEngine } from './ResourcePermissions/ResourcePermissionEngine.js';
@@ -42,18 +42,19 @@ const OWNER_ONLY_RATING_FIELDS = ['UserRating', 'UserFeedback'];
42
42
  */
43
43
  let MJConversationDetailEntityExtended = class MJConversationDetailEntityExtended extends MJConversationDetailEntity {
44
44
  async Save(options) {
45
- if (!(await this.currentUserMayWrite())) {
45
+ if (!(await this.currentUserMayWrite('save'))) {
46
46
  return false;
47
47
  }
48
48
  return super.Save(options);
49
49
  }
50
50
  async Delete(options) {
51
- if (!(await this.currentUserMayWrite())) {
51
+ if (!(await this.currentUserMayWrite('delete'))) {
52
52
  return false;
53
53
  }
54
54
  return super.Delete(options);
55
55
  }
56
- async currentUserMayWrite() {
56
+ async currentUserMayWrite(operation) {
57
+ const resultType = operation === 'delete' ? 'delete' : this.IsSaved ? 'update' : 'create';
57
58
  const provider = this.ProviderToUse;
58
59
  if (provider?.ProviderType !== 'Database') {
59
60
  // Client-side path — trust the enforcement that already ran upstream.
@@ -80,7 +81,7 @@ let MJConversationDetailEntityExtended = class MJConversationDetailEntityExtende
80
81
  // and UserFeedback represent the owner's evaluation of an AI
81
82
  // message and there is no per-user storage to overwrite.
82
83
  if (this.dirtyRatingFieldNames().length > 0) {
83
- this.RecordDenied('Only the conversation owner can set or change the rating and feedback on this message.');
84
+ this.RecordDenied('Only the conversation owner can set or change the rating and feedback on this message.', resultType);
84
85
  return false;
85
86
  }
86
87
  const engine = ResourcePermissionEngine.GetProviderInstance(provider, ResourcePermissionEngine);
@@ -89,20 +90,22 @@ let MJConversationDetailEntityExtended = class MJConversationDetailEntityExtende
89
90
  .GetUserAvailableResources(user, CONVERSATIONS_RESOURCE_TYPE_ID)
90
91
  .find((p) => UUIDsEqual(p.ResourceRecordID, this.ConversationID));
91
92
  if (!grant) {
92
- this.RecordDenied('You do not have access to this conversation.');
93
+ this.RecordDenied('You do not have access to this conversation.', resultType);
93
94
  return false;
94
95
  }
95
96
  if (grant.PermissionLevel === 'Edit' || grant.PermissionLevel === 'Owner') {
96
97
  return true;
97
98
  }
98
99
  // Only View — block writes.
99
- this.RecordDenied('You have view-only access to this conversation.');
100
+ this.RecordDenied('You have view-only access to this conversation.', resultType);
100
101
  return false;
101
102
  }
102
103
  catch (error) {
103
- LogError(`MJConversationDetailEntityExtended.currentUserMayWrite failed: ${error instanceof Error ? error.message : String(error)}`);
104
+ const message = error instanceof Error ? error.message : String(error);
105
+ LogError(`MJConversationDetailEntityExtended.currentUserMayWrite failed ` +
106
+ `(${operation} on conversation ${this.ConversationID}, user ${user.ID}): ${message}`);
104
107
  // Fail closed — safer to deny than silently allow a compromised write.
105
- this.RecordDenied('Unable to verify conversation permissions.');
108
+ this.RecordDenied('Unable to verify conversation permissions.', resultType);
106
109
  return false;
107
110
  }
108
111
  }
@@ -121,15 +124,22 @@ let MJConversationDetailEntityExtended = class MJConversationDetailEntityExtende
121
124
  return matches;
122
125
  }
123
126
  /**
124
- * Populate `LatestResult.Message` so callers that inspect the save result
125
- * see why the write was refused rather than a generic failure.
127
+ * Records WHY the write was refused as a NEW `ResultHistory` entry, so callers that read
128
+ * `LatestResult.CompleteMessage` see the reason (issue #4791).
129
+ *
130
+ * It must be a new entry, not an edit of `LatestResult`: on a brand-new record there IS no
131
+ * `LatestResult` yet (nothing has been saved), so editing it silently dropped the denial and
132
+ * every caller logged "unknown error". Appending also leaves an earlier successful save's
133
+ * entry untouched. Mirrors `ReadOnlyExternalBaseEntity.rejectMutation`.
126
134
  */
127
- RecordDenied(message) {
128
- const result = this.LatestResult;
129
- if (result) {
130
- result.Success = false;
131
- result.Message = message;
132
- }
135
+ RecordDenied(message, type) {
136
+ const result = new BaseEntityResult();
137
+ result.Success = false;
138
+ result.Type = type;
139
+ result.Message = message;
140
+ result.StartedAt = new Date();
141
+ result.EndedAt = new Date();
142
+ this.RegisterResultHistoryEntry(result);
133
143
  }
134
144
  };
135
145
  MJConversationDetailEntityExtended = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"MJConversationDetailEntityExtended.js","sourceRoot":"","sources":["../../src/custom/MJConversationDetailEntityExtended.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACH,UAAU,EAIV,QAAQ,EACX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EACH,0BAA0B,EAG7B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,wB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I,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CACzD,EAAE,CACL,CAAC;YACF,uEAAuE;YACvE,IAAI,CAAC,YAAY,CAAC,4CAA4C,CAAC,CAAC;YAChE,OAAO,KAAK,CAAC;QACjB,CAAC;IACL,CAAC;IAED;;;;OAIG;IACK,qBAAqB;QACzB,MAAM,OAAO,GAAa,EAAE,CAAC;QAC7B,KAAK,MAAM,IAAI,IAAI,wBAAwB,EAAE,CAAC;YAC1C,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;YACvD,IAAI,KAAK,EAAE,KAAK;gBAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,CAAC;QACD,OAAO,OAAO,CAAC;IACnB,CAAC;IAED;;;OAGG;IACK,YAAY,CAAC,OAAe;QAChC,MAAM,MAAM,GAAG,IAAI,CAAC,YAA6E,CAAC;QAClG,IAAI,MAAM,EAAE,CAAC;YACT,MAAM,CAAC,OAAO,GAAG,KAAK,CAAC;YACvB,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;QAC7B,CAAC;IACL,CAAC;CACJ,CAAA;AAlHY,kCAAkC;IAD9C,aAAa,CAAC,UAAU,EAAE,0BAA0B,CAAC;GACzC,kCAAkC,CAkH9C;;AAED,6FAA6F;AAC7F,MAAM,UAAU,sCAAsC;IAClD,sBAAsB;AAC1B,CAAC"}
1
+ {"version":3,"file":"MJConversationDetailEntityExtended.js","sourceRoot":"","sources":["../../src/custom/MJConversationDetailEntityExtended.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACH,UAAU,EACV,gBAAgB,EAIhB,QAAQ,EACX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,wBAAwB,CA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CAAC;QACnB,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;QACzB,MAAM,CAAC,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;QAC9B,MAAM,CAAC,OAAO,GAAG,IAAI,IAAI,EAAE,CAAC;QAC5B,IAAI,CAAC,0BAA0B,CAAC,MAAM,CAAC,CAAC;IAC5C,CAAC;CACJ,CAAA;AA5HY,kCAAkC;IAD9C,aAAa,CAAC,UAAU,EAAE,0BAA0B,CAAC;GACzC,kCAAkC,CA4H9C;;AAED,6FAA6F;AAC7F,MAAM,UAAU,sCAAsC;IAClD,sBAAsB;AAC1B,CAAC"}
@@ -30681,6 +30681,12 @@ export interface MJAIModelTypeEntity_LLMConfigurationSettings {
30681
30681
  * only when the gate resolves native.
30682
30682
  */
30683
30683
  NativeToolResults?: boolean | null;
30684
+ /**
30685
+ * **Catalog layers only.** Whether this model accepts a forced tool choice — a named tool or
30686
+ * `'required'`. Absent means it does. When `false`, the prompt runner sends `'auto'` in place of a
30687
+ * forced choice, and the agent's prompt is what steers the model to the tool.
30688
+ */
30689
+ SupportsForcedToolChoice?: boolean | null;
30684
30690
  }
30685
30691
  /**
30686
30692
  * MJ-normalized turn-detection settings for realtime (speech-to-speech) models. Every field is
@@ -31009,6 +31015,12 @@ export interface MJAIModelVendorEntity_LLMConfigurationSettings {
31009
31015
  * only when the gate resolves native.
31010
31016
  */
31011
31017
  NativeToolResults?: boolean | null;
31018
+ /**
31019
+ * **Catalog layers only.** Whether this model accepts a forced tool choice — a named tool or
31020
+ * `'required'`. Absent means it does. When `false`, the prompt runner sends `'auto'` in place of a
31021
+ * forced choice, and the agent's prompt is what steers the model to the tool.
31022
+ */
31023
+ SupportsForcedToolChoice?: boolean | null;
31012
31024
  }
31013
31025
  /**
31014
31026
  * MJ-normalized turn-detection settings for realtime (speech-to-speech) models. Every field is
@@ -31457,6 +31469,12 @@ export interface MJAIModelEntity_LLMConfigurationSettings {
31457
31469
  * only when the gate resolves native.
31458
31470
  */
31459
31471
  NativeToolResults?: boolean | null;
31472
+ /**
31473
+ * **Catalog layers only.** Whether this model accepts a forced tool choice — a named tool or
31474
+ * `'required'`. Absent means it does. When `false`, the prompt runner sends `'auto'` in place of a
31475
+ * forced choice, and the agent's prompt is what steers the model to the tool.
31476
+ */
31477
+ SupportsForcedToolChoice?: boolean | null;
31460
31478
  }
31461
31479
  /**
31462
31480
  * MJ-normalized turn-detection settings for realtime (speech-to-speech) models. Every field is
@@ -32365,6 +32383,12 @@ export interface MJAIPromptModelEntity_LLMConfigurationSettings {
32365
32383
  * only when the gate resolves native.
32366
32384
  */
32367
32385
  NativeToolResults?: boolean | null;
32386
+ /**
32387
+ * **Catalog layers only.** Whether this model accepts a forced tool choice — a named tool or
32388
+ * `'required'`. Absent means it does. When `false`, the prompt runner sends `'auto'` in place of a
32389
+ * forced choice, and the agent's prompt is what steers the model to the tool.
32390
+ */
32391
+ SupportsForcedToolChoice?: boolean | null;
32368
32392
  }
32369
32393
  /**
32370
32394
  * MJ-normalized turn-detection settings for realtime (speech-to-speech) models. Every field is
@@ -34010,6 +34034,12 @@ export interface MJAIPromptEntity_LLMConfigurationSettings {
34010
34034
  * only when the gate resolves native.
34011
34035
  */
34012
34036
  NativeToolResults?: boolean | null;
34037
+ /**
34038
+ * **Catalog layers only.** Whether this model accepts a forced tool choice — a named tool or
34039
+ * `'required'`. Absent means it does. When `false`, the prompt runner sends `'auto'` in place of a
34040
+ * forced choice, and the agent's prompt is what steers the model to the tool.
34041
+ */
34042
+ SupportsForcedToolChoice?: boolean | null;
34013
34043
  }
34014
34044
  /**
34015
34045
  * MJ-normalized turn-detection settings for realtime (speech-to-speech) models. Every field is