@salesforce/lds-adapters-service-einstein-copilot-bot 1.314.0 → 1.315.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.
@@ -113,12 +113,19 @@ function createLink(ref) {
113
113
  }
114
114
 
115
115
  const TTL$7 = 30000;
116
- const VERSION$e = "ab85410a28124cfed3d8eae7b8236853";
116
+ const VERSION$e = "c27669d0d0ba84ade6d5a4c97336c0ef";
117
117
  function validate$l(obj, path = 'CopilotBotInfoRepresentation') {
118
118
  const v_error = (() => {
119
119
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
120
120
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
121
121
  }
122
+ if (obj.apiEndpoint !== undefined) {
123
+ const obj_apiEndpoint = obj.apiEndpoint;
124
+ const path_apiEndpoint = path + '.apiEndpoint';
125
+ if (typeof obj_apiEndpoint !== 'string') {
126
+ return new TypeError('Expected "string" but received "' + typeof obj_apiEndpoint + '" (at "' + path_apiEndpoint + '")');
127
+ }
128
+ }
122
129
  if (obj.botId !== undefined) {
123
130
  const obj_botId = obj.botId;
124
131
  const path_botId = path + '.botId';
@@ -138,6 +145,20 @@ function validate$l(obj, path = 'CopilotBotInfoRepresentation') {
138
145
  if (typeof obj_isSuccess !== 'boolean') {
139
146
  return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
140
147
  }
148
+ if (obj.targetRegion !== undefined) {
149
+ const obj_targetRegion = obj.targetRegion;
150
+ const path_targetRegion = path + '.targetRegion';
151
+ if (typeof obj_targetRegion !== 'string') {
152
+ return new TypeError('Expected "string" but received "' + typeof obj_targetRegion + '" (at "' + path_targetRegion + '")');
153
+ }
154
+ }
155
+ if (obj.tenantGuid !== undefined) {
156
+ const obj_tenantGuid = obj.tenantGuid;
157
+ const path_tenantGuid = path + '.tenantGuid';
158
+ if (typeof obj_tenantGuid !== 'string') {
159
+ return new TypeError('Expected "string" but received "' + typeof obj_tenantGuid + '" (at "' + path_tenantGuid + '")');
160
+ }
161
+ }
141
162
  })();
142
163
  return v_error === undefined ? null : v_error;
143
164
  }
@@ -151,6 +172,11 @@ const select$l = function CopilotBotInfoRepresentationSelect() {
151
172
  version: VERSION$e,
152
173
  private: [],
153
174
  selections: [
175
+ {
176
+ name: 'apiEndpoint',
177
+ kind: 'Scalar',
178
+ required: false
179
+ },
154
180
  {
155
181
  name: 'botId',
156
182
  kind: 'Scalar',
@@ -164,6 +190,16 @@ const select$l = function CopilotBotInfoRepresentationSelect() {
164
190
  {
165
191
  name: 'isSuccess',
166
192
  kind: 'Scalar'
193
+ },
194
+ {
195
+ name: 'targetRegion',
196
+ kind: 'Scalar',
197
+ required: false
198
+ },
199
+ {
200
+ name: 'tenantGuid',
201
+ kind: 'Scalar',
202
+ required: false
167
203
  }
168
204
  ]
169
205
  };
@@ -174,6 +210,19 @@ function equals$e(existing, incoming) {
174
210
  if (!(existing_isSuccess === incoming_isSuccess)) {
175
211
  return false;
176
212
  }
213
+ const existing_apiEndpoint = existing.apiEndpoint;
214
+ const incoming_apiEndpoint = incoming.apiEndpoint;
215
+ // if at least one of these optionals is defined
216
+ if (existing_apiEndpoint !== undefined || incoming_apiEndpoint !== undefined) {
217
+ // if one of these is not defined we know the other is defined and therefore
218
+ // not equal
219
+ if (existing_apiEndpoint === undefined || incoming_apiEndpoint === undefined) {
220
+ return false;
221
+ }
222
+ if (!(existing_apiEndpoint === incoming_apiEndpoint)) {
223
+ return false;
224
+ }
225
+ }
177
226
  const existing_botId = existing.botId;
178
227
  const incoming_botId = incoming.botId;
179
228
  // if at least one of these optionals is defined
@@ -200,6 +249,32 @@ function equals$e(existing, incoming) {
200
249
  return false;
201
250
  }
202
251
  }
252
+ const existing_targetRegion = existing.targetRegion;
253
+ const incoming_targetRegion = incoming.targetRegion;
254
+ // if at least one of these optionals is defined
255
+ if (existing_targetRegion !== undefined || incoming_targetRegion !== undefined) {
256
+ // if one of these is not defined we know the other is defined and therefore
257
+ // not equal
258
+ if (existing_targetRegion === undefined || incoming_targetRegion === undefined) {
259
+ return false;
260
+ }
261
+ if (!(existing_targetRegion === incoming_targetRegion)) {
262
+ return false;
263
+ }
264
+ }
265
+ const existing_tenantGuid = existing.tenantGuid;
266
+ const incoming_tenantGuid = incoming.tenantGuid;
267
+ // if at least one of these optionals is defined
268
+ if (existing_tenantGuid !== undefined || incoming_tenantGuid !== undefined) {
269
+ // if one of these is not defined we know the other is defined and therefore
270
+ // not equal
271
+ if (existing_tenantGuid === undefined || incoming_tenantGuid === undefined) {
272
+ return false;
273
+ }
274
+ if (!(existing_tenantGuid === incoming_tenantGuid)) {
275
+ return false;
276
+ }
277
+ }
203
278
  return true;
204
279
  }
205
280
  const ingest$7 = function CopilotBotInfoRepresentationIngest(input, path, luvio, store, timestamp) {
@@ -1,6 +1,6 @@
1
1
  import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
2
2
  export declare const TTL = 30000;
3
- export declare const VERSION = "ab85410a28124cfed3d8eae7b8236853";
3
+ export declare const VERSION = "c27669d0d0ba84ade6d5a4c97336c0ef";
4
4
  export declare function validate(obj: any, path?: string): TypeError | null;
5
5
  export declare const RepresentationType: string;
6
6
  export declare function normalize(input: CopilotBotInfoRepresentation, existing: CopilotBotInfoRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): CopilotBotInfoRepresentationNormalized;
@@ -15,12 +15,18 @@ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableSto
15
15
  * (none)
16
16
  */
17
17
  export interface CopilotBotInfoRepresentationNormalized {
18
- /** ID of the internal Copilot Bot. */
18
+ /** Target runtime API endpoint - send traffic here. can be a targeted MESH endpoint, or an SFAP URL */
19
+ apiEndpoint?: string;
20
+ /** ID of the internal Copilot bot ID - used in the URL when starting agent sessions */
19
21
  botId?: string;
20
22
  /** Error message for the failed get operation. */
21
23
  errorMessage?: string;
22
24
  /** Success indicator of the get operation. */
23
25
  isSuccess: boolean;
26
+ /** Target runtime region - pass through x-salesforce-region header for SFAP */
27
+ targetRegion?: string;
28
+ /** Core C2C tenant GUID - pass through x-sfdc-tenant-id header for SFAP */
29
+ tenantGuid?: string;
24
30
  }
25
31
  /**
26
32
  * Represents the results of a get internal copilot bot id request
@@ -29,7 +35,10 @@ export interface CopilotBotInfoRepresentationNormalized {
29
35
  * (none)
30
36
  */
31
37
  export interface CopilotBotInfoRepresentation {
38
+ apiEndpoint?: string;
32
39
  botId?: string;
33
40
  errorMessage?: string;
34
41
  isSuccess: boolean;
42
+ targetRegion?: string;
43
+ tenantGuid?: string;
35
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-service-einstein-copilot-bot",
3
- "version": "1.314.0",
3
+ "version": "1.315.0",
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.314.0"
43
+ "@salesforce/lds-bindings": "^1.315.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@salesforce/lds-compiler-plugins": "^1.314.0"
46
+ "@salesforce/lds-compiler-plugins": "^1.315.0"
47
47
  },
48
48
  "nx": {
49
49
  "targets": {
package/sfdc/index.js CHANGED
@@ -123,12 +123,19 @@ function createLink(ref) {
123
123
  }
124
124
 
125
125
  const TTL$7 = 30000;
126
- const VERSION$e = "ab85410a28124cfed3d8eae7b8236853";
126
+ const VERSION$e = "c27669d0d0ba84ade6d5a4c97336c0ef";
127
127
  function validate$l(obj, path = 'CopilotBotInfoRepresentation') {
128
128
  const v_error = (() => {
129
129
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
130
130
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
131
131
  }
132
+ if (obj.apiEndpoint !== undefined) {
133
+ const obj_apiEndpoint = obj.apiEndpoint;
134
+ const path_apiEndpoint = path + '.apiEndpoint';
135
+ if (typeof obj_apiEndpoint !== 'string') {
136
+ return new TypeError('Expected "string" but received "' + typeof obj_apiEndpoint + '" (at "' + path_apiEndpoint + '")');
137
+ }
138
+ }
132
139
  if (obj.botId !== undefined) {
133
140
  const obj_botId = obj.botId;
134
141
  const path_botId = path + '.botId';
@@ -148,6 +155,20 @@ function validate$l(obj, path = 'CopilotBotInfoRepresentation') {
148
155
  if (typeof obj_isSuccess !== 'boolean') {
149
156
  return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
150
157
  }
158
+ if (obj.targetRegion !== undefined) {
159
+ const obj_targetRegion = obj.targetRegion;
160
+ const path_targetRegion = path + '.targetRegion';
161
+ if (typeof obj_targetRegion !== 'string') {
162
+ return new TypeError('Expected "string" but received "' + typeof obj_targetRegion + '" (at "' + path_targetRegion + '")');
163
+ }
164
+ }
165
+ if (obj.tenantGuid !== undefined) {
166
+ const obj_tenantGuid = obj.tenantGuid;
167
+ const path_tenantGuid = path + '.tenantGuid';
168
+ if (typeof obj_tenantGuid !== 'string') {
169
+ return new TypeError('Expected "string" but received "' + typeof obj_tenantGuid + '" (at "' + path_tenantGuid + '")');
170
+ }
171
+ }
151
172
  })();
152
173
  return v_error === undefined ? null : v_error;
153
174
  }
@@ -161,6 +182,11 @@ const select$l = function CopilotBotInfoRepresentationSelect() {
161
182
  version: VERSION$e,
162
183
  private: [],
163
184
  selections: [
185
+ {
186
+ name: 'apiEndpoint',
187
+ kind: 'Scalar',
188
+ required: false
189
+ },
164
190
  {
165
191
  name: 'botId',
166
192
  kind: 'Scalar',
@@ -174,6 +200,16 @@ const select$l = function CopilotBotInfoRepresentationSelect() {
174
200
  {
175
201
  name: 'isSuccess',
176
202
  kind: 'Scalar'
203
+ },
204
+ {
205
+ name: 'targetRegion',
206
+ kind: 'Scalar',
207
+ required: false
208
+ },
209
+ {
210
+ name: 'tenantGuid',
211
+ kind: 'Scalar',
212
+ required: false
177
213
  }
178
214
  ]
179
215
  };
@@ -184,6 +220,19 @@ function equals$e(existing, incoming) {
184
220
  if (!(existing_isSuccess === incoming_isSuccess)) {
185
221
  return false;
186
222
  }
223
+ const existing_apiEndpoint = existing.apiEndpoint;
224
+ const incoming_apiEndpoint = incoming.apiEndpoint;
225
+ // if at least one of these optionals is defined
226
+ if (existing_apiEndpoint !== undefined || incoming_apiEndpoint !== undefined) {
227
+ // if one of these is not defined we know the other is defined and therefore
228
+ // not equal
229
+ if (existing_apiEndpoint === undefined || incoming_apiEndpoint === undefined) {
230
+ return false;
231
+ }
232
+ if (!(existing_apiEndpoint === incoming_apiEndpoint)) {
233
+ return false;
234
+ }
235
+ }
187
236
  const existing_botId = existing.botId;
188
237
  const incoming_botId = incoming.botId;
189
238
  // if at least one of these optionals is defined
@@ -210,6 +259,32 @@ function equals$e(existing, incoming) {
210
259
  return false;
211
260
  }
212
261
  }
262
+ const existing_targetRegion = existing.targetRegion;
263
+ const incoming_targetRegion = incoming.targetRegion;
264
+ // if at least one of these optionals is defined
265
+ if (existing_targetRegion !== undefined || incoming_targetRegion !== undefined) {
266
+ // if one of these is not defined we know the other is defined and therefore
267
+ // not equal
268
+ if (existing_targetRegion === undefined || incoming_targetRegion === undefined) {
269
+ return false;
270
+ }
271
+ if (!(existing_targetRegion === incoming_targetRegion)) {
272
+ return false;
273
+ }
274
+ }
275
+ const existing_tenantGuid = existing.tenantGuid;
276
+ const incoming_tenantGuid = incoming.tenantGuid;
277
+ // if at least one of these optionals is defined
278
+ if (existing_tenantGuid !== undefined || incoming_tenantGuid !== undefined) {
279
+ // if one of these is not defined we know the other is defined and therefore
280
+ // not equal
281
+ if (existing_tenantGuid === undefined || incoming_tenantGuid === undefined) {
282
+ return false;
283
+ }
284
+ if (!(existing_tenantGuid === incoming_tenantGuid)) {
285
+ return false;
286
+ }
287
+ }
213
288
  return true;
214
289
  }
215
290
  const ingest$7 = function CopilotBotInfoRepresentationIngest(input, path, luvio, store, timestamp) {
@@ -3713,4 +3788,4 @@ withDefaultLuvio((luvio) => {
3713
3788
  });
3714
3789
 
3715
3790
  export { getBotId, getBotId_imperative, getCopilotObjects, getCopilotObjects_imperative, getFollowUpActions, getFollowUpActions_imperative, getRecommendedActions, getRecommendedActions_imperative, getRecommendedPlanTemplates, getRecommendedPlanTemplates_imperative, sendMessage, submitFeedback };
3716
- // version: 1.314.0-022b0c843b
3791
+ // version: 1.315.0-b7eff13c6d
package/src/raml/api.raml CHANGED
@@ -222,7 +222,19 @@ types:
222
222
  type: object
223
223
  properties:
224
224
  botId:
225
- description: ID of the internal Copilot Bot.
225
+ description: ID of the internal Copilot bot ID - used in the URL when starting agent sessions
226
+ type: string
227
+ required: false
228
+ tenantGuid:
229
+ description: Core C2C tenant GUID - pass through x-sfdc-tenant-id header for SFAP
230
+ type: string
231
+ required: false
232
+ targetRegion:
233
+ description: Target runtime region - pass through x-salesforce-region header for SFAP
234
+ type: string
235
+ required: false
236
+ apiEndpoint:
237
+ description: Target runtime API endpoint - send traffic here. can be a targeted MESH endpoint, or an SFAP URL
226
238
  type: string
227
239
  required: false
228
240
  errorMessage: