@salesforce/lds-adapters-industries-nlpservice 1.263.0 → 1.265.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.
@@ -158,7 +158,7 @@ function validate$2(obj, path = 'AINaturalLangProcessResultInputRepresentation')
158
158
  }
159
159
 
160
160
  const TTL$1 = 1000;
161
- const VERSION$1 = "a7ffb713d207799ef863a4bfdf12d246";
161
+ const VERSION$1 = "f7f4769683db141a2eafe84d9a1beb94";
162
162
  function validate$1(obj, path = 'AINaturalLangProcessResultRepresentation') {
163
163
  const v_error = (() => {
164
164
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -223,8 +223,39 @@ function validate$1(obj, path = 'AINaturalLangProcessResultRepresentation') {
223
223
  }
224
224
  const obj_response = obj.response;
225
225
  const path_response = path + '.response';
226
- if (typeof obj_response !== 'object' || ArrayIsArray(obj_response) || obj_response === null) {
227
- return new TypeError('Expected "object" but received "' + typeof obj_response + '" (at "' + path_response + '")');
226
+ let obj_response_union0 = null;
227
+ const obj_response_union0_error = (() => {
228
+ if (typeof obj_response !== 'object' || ArrayIsArray(obj_response) || obj_response === null) {
229
+ return new TypeError('Expected "object" but received "' + typeof obj_response + '" (at "' + path_response + '")');
230
+ }
231
+ })();
232
+ if (obj_response_union0_error != null) {
233
+ obj_response_union0 = obj_response_union0_error.message;
234
+ }
235
+ let obj_response_union1 = null;
236
+ const obj_response_union1_error = (() => {
237
+ if (typeof obj_response !== 'string') {
238
+ return new TypeError('Expected "string" but received "' + typeof obj_response + '" (at "' + path_response + '")');
239
+ }
240
+ })();
241
+ if (obj_response_union1_error != null) {
242
+ obj_response_union1 = obj_response_union1_error.message;
243
+ }
244
+ let obj_response_union2 = null;
245
+ const obj_response_union2_error = (() => {
246
+ if (obj_response !== null) {
247
+ return new TypeError('Expected "null" but received "' + typeof obj_response + '" (at "' + path_response + '")');
248
+ }
249
+ })();
250
+ if (obj_response_union2_error != null) {
251
+ obj_response_union2 = obj_response_union2_error.message;
252
+ }
253
+ if (obj_response_union0 && obj_response_union1 && obj_response_union2) {
254
+ let message = 'Object doesn\'t match union (at "' + path_response + '")';
255
+ message += '\n' + obj_response_union0.split('\n').map((line) => '\t' + line).join('\n');
256
+ message += '\n' + obj_response_union1.split('\n').map((line) => '\t' + line).join('\n');
257
+ message += '\n' + obj_response_union2.split('\n').map((line) => '\t' + line).join('\n');
258
+ return new TypeError(message);
228
259
  }
229
260
  const obj_serviceType = obj.serviceType;
230
261
  const path_serviceType = path + '.serviceType';
@@ -1,6 +1,6 @@
1
1
  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, BaseFragment as $64$luvio_engine_BaseFragment, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap } from '@luvio/engine';
2
2
  export declare const TTL = 1000;
3
- export declare const VERSION = "a7ffb713d207799ef863a4bfdf12d246";
3
+ export declare const VERSION = "f7f4769683db141a2eafe84d9a1beb94";
4
4
  export declare function validate(obj: any, path?: string): TypeError | null;
5
5
  export declare const RepresentationType: string;
6
6
  export interface KeyParams extends $64$luvio_engine_KeyMetadata {
@@ -31,7 +31,7 @@ export interface AINaturalLangProcessResultRepresentationNormalized {
31
31
  /** The Request Tex for the NLP operation */
32
32
  requestText: string | null;
33
33
  /** The Response of the NLP operation */
34
- response: {};
34
+ response: {} | string | null;
35
35
  /** The type of NLP service and operation */
36
36
  serviceType: string;
37
37
  /** The original source record id on which the NLP operation was performed */
@@ -49,7 +49,7 @@ export interface AINaturalLangProcessResultRepresentation {
49
49
  id: string;
50
50
  referenceRecord: string | null;
51
51
  requestText: string | null;
52
- response: {};
52
+ response: {} | string | null;
53
53
  serviceType: string;
54
54
  sourceRecord: string | null;
55
55
  status: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-industries-nlpservice",
3
- "version": "1.263.0",
3
+ "version": "1.265.0",
4
4
  "description": "Ai Natural Language Processing Service",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "dist/es/es2018/industries-nlpservice.js",
@@ -42,11 +42,11 @@
42
42
  "test": "nx build:karma && karma start --single-run"
43
43
  },
44
44
  "dependencies": {
45
- "@salesforce/lds-bindings": "^1.263.0"
45
+ "@salesforce/lds-bindings": "^1.265.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@salesforce/lds-compiler-plugins": "^1.263.0",
49
- "@salesforce/lds-karma": "^1.263.0"
48
+ "@salesforce/lds-compiler-plugins": "^1.265.0",
49
+ "@salesforce/lds-karma": "^1.265.0"
50
50
  },
51
51
  "nx": {
52
52
  "targets": {
package/sfdc/index.js CHANGED
@@ -168,7 +168,7 @@ function validate$2(obj, path = 'AINaturalLangProcessResultInputRepresentation')
168
168
  }
169
169
 
170
170
  const TTL$1 = 1000;
171
- const VERSION$1 = "a7ffb713d207799ef863a4bfdf12d246";
171
+ const VERSION$1 = "f7f4769683db141a2eafe84d9a1beb94";
172
172
  function validate$1(obj, path = 'AINaturalLangProcessResultRepresentation') {
173
173
  const v_error = (() => {
174
174
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -233,8 +233,39 @@ function validate$1(obj, path = 'AINaturalLangProcessResultRepresentation') {
233
233
  }
234
234
  const obj_response = obj.response;
235
235
  const path_response = path + '.response';
236
- if (typeof obj_response !== 'object' || ArrayIsArray(obj_response) || obj_response === null) {
237
- return new TypeError('Expected "object" but received "' + typeof obj_response + '" (at "' + path_response + '")');
236
+ let obj_response_union0 = null;
237
+ const obj_response_union0_error = (() => {
238
+ if (typeof obj_response !== 'object' || ArrayIsArray(obj_response) || obj_response === null) {
239
+ return new TypeError('Expected "object" but received "' + typeof obj_response + '" (at "' + path_response + '")');
240
+ }
241
+ })();
242
+ if (obj_response_union0_error != null) {
243
+ obj_response_union0 = obj_response_union0_error.message;
244
+ }
245
+ let obj_response_union1 = null;
246
+ const obj_response_union1_error = (() => {
247
+ if (typeof obj_response !== 'string') {
248
+ return new TypeError('Expected "string" but received "' + typeof obj_response + '" (at "' + path_response + '")');
249
+ }
250
+ })();
251
+ if (obj_response_union1_error != null) {
252
+ obj_response_union1 = obj_response_union1_error.message;
253
+ }
254
+ let obj_response_union2 = null;
255
+ const obj_response_union2_error = (() => {
256
+ if (obj_response !== null) {
257
+ return new TypeError('Expected "null" but received "' + typeof obj_response + '" (at "' + path_response + '")');
258
+ }
259
+ })();
260
+ if (obj_response_union2_error != null) {
261
+ obj_response_union2 = obj_response_union2_error.message;
262
+ }
263
+ if (obj_response_union0 && obj_response_union1 && obj_response_union2) {
264
+ let message = 'Object doesn\'t match union (at "' + path_response + '")';
265
+ message += '\n' + obj_response_union0.split('\n').map((line) => '\t' + line).join('\n');
266
+ message += '\n' + obj_response_union1.split('\n').map((line) => '\t' + line).join('\n');
267
+ message += '\n' + obj_response_union2.split('\n').map((line) => '\t' + line).join('\n');
268
+ return new TypeError(message);
238
269
  }
239
270
  const obj_serviceType = obj.serviceType;
240
271
  const path_serviceType = path + '.serviceType';
@@ -807,4 +838,4 @@ withDefaultLuvio((luvio) => {
807
838
  });
808
839
 
809
840
  export { createAINaturalLangProcessResult, getAINaturalLangProcessResultsByReferenceRecordId, getAINaturalLangProcessResultsByReferenceRecordId_imperative, getAINaturalLangProcessResultsBySourceId, getAINaturalLangProcessResultsBySourceId_imperative };
810
- // version: 1.263.0-378177d88
841
+ // version: 1.265.0-25488bd30
package/src/raml/api.raml CHANGED
@@ -98,7 +98,7 @@ types:
98
98
  type: string | nil
99
99
  response:
100
100
  description: The Response of the NLP operation
101
- type: object
101
+ type: object | string | nil
102
102
  serviceType:
103
103
  description: The type of NLP service and operation
104
104
  type: string