@salesforce/lds-adapters-service-einstein-copilot-bot 1.266.0-dev20 → 1.266.0-dev22

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.
@@ -640,7 +640,7 @@ function equals$4(existing, incoming) {
640
640
  }
641
641
 
642
642
  const TTL$2 = 30000;
643
- const VERSION$3 = "55ac02bd055f57a2a12aa0fa4844d1a2";
643
+ const VERSION$3 = "205b55ee28d637afd2916e42363d735f";
644
644
  function validate$3(obj, path = 'ConversationRuntimeProxyMessageRepresentation') {
645
645
  const v_error = (() => {
646
646
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -772,6 +772,34 @@ function validate$3(obj, path = 'ConversationRuntimeProxyMessageRepresentation')
772
772
  if (typeof obj_id !== 'string') {
773
773
  return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
774
774
  }
775
+ if (obj.isContentSafe !== undefined) {
776
+ const obj_isContentSafe = obj.isContentSafe;
777
+ const path_isContentSafe = path + '.isContentSafe';
778
+ let obj_isContentSafe_union0 = null;
779
+ const obj_isContentSafe_union0_error = (() => {
780
+ if (typeof obj_isContentSafe !== 'boolean') {
781
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isContentSafe + '" (at "' + path_isContentSafe + '")');
782
+ }
783
+ })();
784
+ if (obj_isContentSafe_union0_error != null) {
785
+ obj_isContentSafe_union0 = obj_isContentSafe_union0_error.message;
786
+ }
787
+ let obj_isContentSafe_union1 = null;
788
+ const obj_isContentSafe_union1_error = (() => {
789
+ if (obj_isContentSafe !== null) {
790
+ return new TypeError('Expected "null" but received "' + typeof obj_isContentSafe + '" (at "' + path_isContentSafe + '")');
791
+ }
792
+ })();
793
+ if (obj_isContentSafe_union1_error != null) {
794
+ obj_isContentSafe_union1 = obj_isContentSafe_union1_error.message;
795
+ }
796
+ if (obj_isContentSafe_union0 && obj_isContentSafe_union1) {
797
+ let message = 'Object doesn\'t match union (at "' + path_isContentSafe + '")';
798
+ message += '\n' + obj_isContentSafe_union0.split('\n').map((line) => '\t' + line).join('\n');
799
+ message += '\n' + obj_isContentSafe_union1.split('\n').map((line) => '\t' + line).join('\n');
800
+ return new TypeError(message);
801
+ }
802
+ }
775
803
  if (obj.message !== undefined) {
776
804
  const obj_message = obj.message;
777
805
  const path_message = path + '.message';
@@ -1002,6 +1030,11 @@ const select$5 = function ConversationRuntimeProxyMessageRepresentationSelect()
1002
1030
  name: 'id',
1003
1031
  kind: 'Scalar'
1004
1032
  },
1033
+ {
1034
+ name: 'isContentSafe',
1035
+ kind: 'Scalar',
1036
+ required: false
1037
+ },
1005
1038
  {
1006
1039
  name: 'message',
1007
1040
  kind: 'Scalar',
@@ -1159,6 +1192,19 @@ function equals$3(existing, incoming) {
1159
1192
  return false;
1160
1193
  }
1161
1194
  }
1195
+ const existing_isContentSafe = existing.isContentSafe;
1196
+ const incoming_isContentSafe = incoming.isContentSafe;
1197
+ // if at least one of these optionals is defined
1198
+ if (existing_isContentSafe !== undefined || incoming_isContentSafe !== undefined) {
1199
+ // if one of these is not defined we know the other is defined and therefore
1200
+ // not equal
1201
+ if (existing_isContentSafe === undefined || incoming_isContentSafe === undefined) {
1202
+ return false;
1203
+ }
1204
+ if (!(existing_isContentSafe === incoming_isContentSafe)) {
1205
+ return false;
1206
+ }
1207
+ }
1162
1208
  const existing_message = existing.message;
1163
1209
  const incoming_message = incoming.message;
1164
1210
  // if at least one of these optionals is defined
@@ -3,7 +3,7 @@ import { CollectMessageRepresentation as CollectMessageRepresentation_CollectMes
3
3
  import { EsTypeMessageRepresentation as EsTypeMessageRepresentation_EsTypeMessageRepresentation } from './EsTypeMessageRepresentation';
4
4
  import { KeyMetadata as $64$luvio_engine_KeyMetadata, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Luvio as $64$luvio_engine_Luvio, IngestPath as $64$luvio_engine_IngestPath, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap } from '@luvio/engine';
5
5
  export declare const TTL = 30000;
6
- export declare const VERSION = "55ac02bd055f57a2a12aa0fa4844d1a2";
6
+ export declare const VERSION = "205b55ee28d637afd2916e42363d735f";
7
7
  export declare function validate(obj: any, path?: string): TypeError | null;
8
8
  export declare const RepresentationType: string;
9
9
  export interface KeyParams extends $64$luvio_engine_KeyMetadata {
@@ -41,6 +41,8 @@ export interface ConversationRuntimeProxyMessageRepresentationNormalized {
41
41
  feedbackId?: string | null;
42
42
  /** Unique id of this message */
43
43
  id: string;
44
+ /** Boolean flag to indicate safety score. */
45
+ isContentSafe?: boolean | null;
44
46
  /** The message for an ES Type message. */
45
47
  message?: string | null;
46
48
  /** The message type for an ES Type message. */
@@ -70,6 +72,7 @@ export interface ConversationRuntimeProxyMessageRepresentation {
70
72
  failureCode?: string | null;
71
73
  feedbackId?: string | null;
72
74
  id: string;
75
+ isContentSafe?: boolean | null;
73
76
  message?: string | null;
74
77
  messageType?: string | null;
75
78
  planId?: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-service-einstein-copilot-bot",
3
- "version": "1.266.0-dev20",
3
+ "version": "1.266.0-dev22",
4
4
  "description": "Einstein Copilot Bot API Family",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "dist/es/es2018/service-einstein-copilot-bot.js",
@@ -40,10 +40,10 @@
40
40
  "test:unit": "jest"
41
41
  },
42
42
  "dependencies": {
43
- "@salesforce/lds-bindings": "^1.266.0-dev20"
43
+ "@salesforce/lds-bindings": "^1.266.0-dev22"
44
44
  },
45
45
  "devDependencies": {
46
- "@salesforce/lds-compiler-plugins": "^1.266.0-dev20"
46
+ "@salesforce/lds-compiler-plugins": "^1.266.0-dev22"
47
47
  },
48
48
  "nx": {
49
49
  "targets": {
package/sfdc/index.js CHANGED
@@ -1015,7 +1015,7 @@ function equals$2(existing, incoming) {
1015
1015
  }
1016
1016
 
1017
1017
  const TTL$1 = 30000;
1018
- const VERSION$1 = "55ac02bd055f57a2a12aa0fa4844d1a2";
1018
+ const VERSION$1 = "205b55ee28d637afd2916e42363d735f";
1019
1019
  function validate$1(obj, path = 'ConversationRuntimeProxyMessageRepresentation') {
1020
1020
  const v_error = (() => {
1021
1021
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -1147,6 +1147,34 @@ function validate$1(obj, path = 'ConversationRuntimeProxyMessageRepresentation')
1147
1147
  if (typeof obj_id !== 'string') {
1148
1148
  return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
1149
1149
  }
1150
+ if (obj.isContentSafe !== undefined) {
1151
+ const obj_isContentSafe = obj.isContentSafe;
1152
+ const path_isContentSafe = path + '.isContentSafe';
1153
+ let obj_isContentSafe_union0 = null;
1154
+ const obj_isContentSafe_union0_error = (() => {
1155
+ if (typeof obj_isContentSafe !== 'boolean') {
1156
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isContentSafe + '" (at "' + path_isContentSafe + '")');
1157
+ }
1158
+ })();
1159
+ if (obj_isContentSafe_union0_error != null) {
1160
+ obj_isContentSafe_union0 = obj_isContentSafe_union0_error.message;
1161
+ }
1162
+ let obj_isContentSafe_union1 = null;
1163
+ const obj_isContentSafe_union1_error = (() => {
1164
+ if (obj_isContentSafe !== null) {
1165
+ return new TypeError('Expected "null" but received "' + typeof obj_isContentSafe + '" (at "' + path_isContentSafe + '")');
1166
+ }
1167
+ })();
1168
+ if (obj_isContentSafe_union1_error != null) {
1169
+ obj_isContentSafe_union1 = obj_isContentSafe_union1_error.message;
1170
+ }
1171
+ if (obj_isContentSafe_union0 && obj_isContentSafe_union1) {
1172
+ let message = 'Object doesn\'t match union (at "' + path_isContentSafe + '")';
1173
+ message += '\n' + obj_isContentSafe_union0.split('\n').map((line) => '\t' + line).join('\n');
1174
+ message += '\n' + obj_isContentSafe_union1.split('\n').map((line) => '\t' + line).join('\n');
1175
+ return new TypeError(message);
1176
+ }
1177
+ }
1150
1178
  if (obj.message !== undefined) {
1151
1179
  const obj_message = obj.message;
1152
1180
  const path_message = path + '.message';
@@ -1377,6 +1405,11 @@ const select$2 = function ConversationRuntimeProxyMessageRepresentationSelect()
1377
1405
  name: 'id',
1378
1406
  kind: 'Scalar'
1379
1407
  },
1408
+ {
1409
+ name: 'isContentSafe',
1410
+ kind: 'Scalar',
1411
+ required: false
1412
+ },
1380
1413
  {
1381
1414
  name: 'message',
1382
1415
  kind: 'Scalar',
@@ -1534,6 +1567,19 @@ function equals$1(existing, incoming) {
1534
1567
  return false;
1535
1568
  }
1536
1569
  }
1570
+ const existing_isContentSafe = existing.isContentSafe;
1571
+ const incoming_isContentSafe = incoming.isContentSafe;
1572
+ // if at least one of these optionals is defined
1573
+ if (existing_isContentSafe !== undefined || incoming_isContentSafe !== undefined) {
1574
+ // if one of these is not defined we know the other is defined and therefore
1575
+ // not equal
1576
+ if (existing_isContentSafe === undefined || incoming_isContentSafe === undefined) {
1577
+ return false;
1578
+ }
1579
+ if (!(existing_isContentSafe === incoming_isContentSafe)) {
1580
+ return false;
1581
+ }
1582
+ }
1537
1583
  const existing_message = existing.message;
1538
1584
  const incoming_message = incoming.message;
1539
1585
  // if at least one of these optionals is defined
@@ -2001,4 +2047,4 @@ withDefaultLuvio((luvio) => {
2001
2047
  });
2002
2048
 
2003
2049
  export { getBotId, getBotId_imperative, getRecommendedPlanTemplates, getRecommendedPlanTemplates_imperative, sendMessage };
2004
- // version: 1.266.0-dev20-1e6923024
2050
+ // version: 1.266.0-dev22-50eb098ff
package/src/raml/api.raml CHANGED
@@ -145,6 +145,10 @@ types:
145
145
  id:
146
146
  description: Unique id of this message
147
147
  type: string
148
+ isContentSafe:
149
+ description: Boolean flag to indicate safety score.
150
+ type: boolean | nil
151
+ required: false
148
152
  message:
149
153
  description: The message for an ES Type message.
150
154
  type: string | nil