@salesforce/lds-adapters-industries-einstein-aiaccelerator 1.308.0 → 1.310.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.
- package/dist/es/es2018/industries-einstein-aiaccelerator.js +31 -10
- package/dist/es/es2018/types/src/generated/types/PredictionOutput.d.ts +4 -1
- package/dist/es/es2018/types/src/generated/types/PredictionOutputObject.d.ts +3 -3
- package/dist/es/es2018/types/src/generated/types/PredictionResponseRepresentation.d.ts +1 -4
- package/package.json +4 -4
- package/sfdc/index.js +32 -11
- package/src/raml/api.raml +5 -5
|
@@ -3812,6 +3812,13 @@ function validate$4(obj, path = 'PredictionOutput') {
|
|
|
3812
3812
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3813
3813
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3814
3814
|
}
|
|
3815
|
+
if (obj.customPredictionLabel !== undefined) {
|
|
3816
|
+
const obj_customPredictionLabel = obj.customPredictionLabel;
|
|
3817
|
+
const path_customPredictionLabel = path + '.customPredictionLabel';
|
|
3818
|
+
if (typeof obj_customPredictionLabel !== 'string') {
|
|
3819
|
+
return new TypeError('Expected "string" but received "' + typeof obj_customPredictionLabel + '" (at "' + path_customPredictionLabel + '")');
|
|
3820
|
+
}
|
|
3821
|
+
}
|
|
3815
3822
|
if (obj.predictionScore !== undefined) {
|
|
3816
3823
|
const obj_predictionScore = obj.predictionScore;
|
|
3817
3824
|
const path_predictionScore = path + '.predictionScore';
|
|
@@ -3927,8 +3934,29 @@ function validate$1(obj, path = 'PredictionOutputObject') {
|
|
|
3927
3934
|
}
|
|
3928
3935
|
const obj_isSuccess = obj.isSuccess;
|
|
3929
3936
|
const path_isSuccess = path + '.isSuccess';
|
|
3930
|
-
|
|
3931
|
-
|
|
3937
|
+
let obj_isSuccess_union0 = null;
|
|
3938
|
+
const obj_isSuccess_union0_error = (() => {
|
|
3939
|
+
if (typeof obj_isSuccess !== 'boolean') {
|
|
3940
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
|
|
3941
|
+
}
|
|
3942
|
+
})();
|
|
3943
|
+
if (obj_isSuccess_union0_error != null) {
|
|
3944
|
+
obj_isSuccess_union0 = obj_isSuccess_union0_error.message;
|
|
3945
|
+
}
|
|
3946
|
+
let obj_isSuccess_union1 = null;
|
|
3947
|
+
const obj_isSuccess_union1_error = (() => {
|
|
3948
|
+
if (obj_isSuccess !== null) {
|
|
3949
|
+
return new TypeError('Expected "null" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
|
|
3950
|
+
}
|
|
3951
|
+
})();
|
|
3952
|
+
if (obj_isSuccess_union1_error != null) {
|
|
3953
|
+
obj_isSuccess_union1 = obj_isSuccess_union1_error.message;
|
|
3954
|
+
}
|
|
3955
|
+
if (obj_isSuccess_union0 && obj_isSuccess_union1) {
|
|
3956
|
+
let message = 'Object doesn\'t match union (at "' + path_isSuccess + '")';
|
|
3957
|
+
message += '\n' + obj_isSuccess_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
3958
|
+
message += '\n' + obj_isSuccess_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
3959
|
+
return new TypeError(message);
|
|
3932
3960
|
}
|
|
3933
3961
|
if (obj.predictionOutput !== undefined) {
|
|
3934
3962
|
const obj_predictionOutput = obj.predictionOutput;
|
|
@@ -3967,19 +3995,12 @@ function validate$1(obj, path = 'PredictionOutputObject') {
|
|
|
3967
3995
|
}
|
|
3968
3996
|
|
|
3969
3997
|
const TTL = 1000;
|
|
3970
|
-
const VERSION = "
|
|
3998
|
+
const VERSION = "c1431b6652fb0e211a1e2149b42f10f4";
|
|
3971
3999
|
function validate(obj, path = 'PredictionResponseRepresentation') {
|
|
3972
4000
|
const v_error = (() => {
|
|
3973
4001
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3974
4002
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3975
4003
|
}
|
|
3976
|
-
if (obj.customPredictionLabel !== undefined) {
|
|
3977
|
-
const obj_customPredictionLabel = obj.customPredictionLabel;
|
|
3978
|
-
const path_customPredictionLabel = path + '.customPredictionLabel';
|
|
3979
|
-
if (typeof obj_customPredictionLabel !== 'string') {
|
|
3980
|
-
return new TypeError('Expected "string" but received "' + typeof obj_customPredictionLabel + '" (at "' + path_customPredictionLabel + '")');
|
|
3981
|
-
}
|
|
3982
|
-
}
|
|
3983
4004
|
if (obj.predictionModel !== undefined) {
|
|
3984
4005
|
const obj_predictionModel = obj.predictionModel;
|
|
3985
4006
|
const path_predictionModel = path + '.predictionModel';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Predictor as Predictor_Predictor } from './Predictor';
|
|
2
2
|
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';
|
|
3
|
-
export declare const VERSION = "
|
|
3
|
+
export declare const VERSION = "15d35df1b335cdf9e43188dc82611b5f";
|
|
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: PredictionOutput, existing: PredictionOutputNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): PredictionOutputNormalized;
|
|
@@ -15,6 +15,8 @@ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableSto
|
|
|
15
15
|
* (none)
|
|
16
16
|
*/
|
|
17
17
|
export interface PredictionOutputNormalized {
|
|
18
|
+
/** . */
|
|
19
|
+
customPredictionLabel?: string;
|
|
18
20
|
/** . */
|
|
19
21
|
predictionScore?: number;
|
|
20
22
|
/** . */
|
|
@@ -27,6 +29,7 @@ export interface PredictionOutputNormalized {
|
|
|
27
29
|
* (none)
|
|
28
30
|
*/
|
|
29
31
|
export interface PredictionOutput {
|
|
32
|
+
customPredictionLabel?: string;
|
|
30
33
|
predictionScore?: number;
|
|
31
34
|
topPredictors?: Array<Predictor_Predictor>;
|
|
32
35
|
}
|
|
@@ -2,7 +2,7 @@ import { Error as Error_Error } from './Error';
|
|
|
2
2
|
import { PredictionOutput as PredictionOutput_PredictionOutput } from './PredictionOutput';
|
|
3
3
|
import { PredictionWarning as PredictionWarning_PredictionWarning } from './PredictionWarning';
|
|
4
4
|
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';
|
|
5
|
-
export declare const VERSION = "
|
|
5
|
+
export declare const VERSION = "fe0822978f2a5f907536c414e65532a7";
|
|
6
6
|
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
7
7
|
export declare const RepresentationType: string;
|
|
8
8
|
export declare function normalize(input: PredictionOutputObject, existing: PredictionOutputObjectNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): PredictionOutputObjectNormalized;
|
|
@@ -20,7 +20,7 @@ export interface PredictionOutputObjectNormalized {
|
|
|
20
20
|
/** . */
|
|
21
21
|
errors?: Array<Error_Error>;
|
|
22
22
|
/** . */
|
|
23
|
-
isSuccess:
|
|
23
|
+
isSuccess: boolean | null;
|
|
24
24
|
/** . */
|
|
25
25
|
predictionOutput?: Array<PredictionOutput_PredictionOutput>;
|
|
26
26
|
predictionWarning?: PredictionWarning_PredictionWarning;
|
|
@@ -35,7 +35,7 @@ export interface PredictionOutputObjectNormalized {
|
|
|
35
35
|
*/
|
|
36
36
|
export interface PredictionOutputObject {
|
|
37
37
|
errors?: Array<Error_Error>;
|
|
38
|
-
isSuccess:
|
|
38
|
+
isSuccess: boolean | null;
|
|
39
39
|
predictionOutput?: Array<PredictionOutput_PredictionOutput>;
|
|
40
40
|
predictionWarning?: PredictionWarning_PredictionWarning;
|
|
41
41
|
recordId: string;
|
|
@@ -2,7 +2,7 @@ import { PredictionOutputObject as PredictionOutputObject_PredictionOutputObject
|
|
|
2
2
|
import { Status as Status_Status } from './Status';
|
|
3
3
|
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';
|
|
4
4
|
export declare const TTL = 1000;
|
|
5
|
-
export declare const VERSION = "
|
|
5
|
+
export declare const VERSION = "c1431b6652fb0e211a1e2149b42f10f4";
|
|
6
6
|
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
7
7
|
export declare const RepresentationType: string;
|
|
8
8
|
export interface KeyParams extends $64$luvio_engine_KeyMetadata {
|
|
@@ -26,8 +26,6 @@ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableSto
|
|
|
26
26
|
* status (string): status.message
|
|
27
27
|
*/
|
|
28
28
|
export interface PredictionResponseRepresentationNormalized {
|
|
29
|
-
/** . */
|
|
30
|
-
customPredictionLabel?: string;
|
|
31
29
|
/** . */
|
|
32
30
|
predictionModel?: string;
|
|
33
31
|
/** . */
|
|
@@ -47,7 +45,6 @@ export interface PredictionResponseRepresentationNormalized {
|
|
|
47
45
|
* status (string): status.message
|
|
48
46
|
*/
|
|
49
47
|
export interface PredictionResponseRepresentation {
|
|
50
|
-
customPredictionLabel?: string;
|
|
51
48
|
predictionModel?: string;
|
|
52
49
|
predictionOutputObjects?: Array<PredictionOutputObject_PredictionOutputObject>;
|
|
53
50
|
predictionPlatform?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-industries-einstein-aiaccelerator",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.310.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "AI Accelerator Connect API to make predictions",
|
|
6
6
|
"main": "dist/es/es2018/industries-einstein-aiaccelerator.js",
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"test": "nx build:karma && karma start --single-run"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@salesforce/lds-bindings": "^1.
|
|
41
|
+
"@salesforce/lds-bindings": "^1.310.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@salesforce/lds-compiler-plugins": "^1.
|
|
45
|
-
"@salesforce/lds-karma": "^1.
|
|
44
|
+
"@salesforce/lds-compiler-plugins": "^1.310.0",
|
|
45
|
+
"@salesforce/lds-karma": "^1.310.0"
|
|
46
46
|
},
|
|
47
47
|
"nx": {
|
|
48
48
|
"targets": {
|
package/sfdc/index.js
CHANGED
|
@@ -1544,6 +1544,13 @@ function validate$n(obj, path = 'PredictionOutput') {
|
|
|
1544
1544
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1545
1545
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1546
1546
|
}
|
|
1547
|
+
if (obj.customPredictionLabel !== undefined) {
|
|
1548
|
+
const obj_customPredictionLabel = obj.customPredictionLabel;
|
|
1549
|
+
const path_customPredictionLabel = path + '.customPredictionLabel';
|
|
1550
|
+
if (typeof obj_customPredictionLabel !== 'string') {
|
|
1551
|
+
return new TypeError('Expected "string" but received "' + typeof obj_customPredictionLabel + '" (at "' + path_customPredictionLabel + '")');
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1547
1554
|
if (obj.predictionScore !== undefined) {
|
|
1548
1555
|
const obj_predictionScore = obj.predictionScore;
|
|
1549
1556
|
const path_predictionScore = path + '.predictionScore';
|
|
@@ -1659,8 +1666,29 @@ function validate$k(obj, path = 'PredictionOutputObject') {
|
|
|
1659
1666
|
}
|
|
1660
1667
|
const obj_isSuccess = obj.isSuccess;
|
|
1661
1668
|
const path_isSuccess = path + '.isSuccess';
|
|
1662
|
-
|
|
1663
|
-
|
|
1669
|
+
let obj_isSuccess_union0 = null;
|
|
1670
|
+
const obj_isSuccess_union0_error = (() => {
|
|
1671
|
+
if (typeof obj_isSuccess !== 'boolean') {
|
|
1672
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
|
|
1673
|
+
}
|
|
1674
|
+
})();
|
|
1675
|
+
if (obj_isSuccess_union0_error != null) {
|
|
1676
|
+
obj_isSuccess_union0 = obj_isSuccess_union0_error.message;
|
|
1677
|
+
}
|
|
1678
|
+
let obj_isSuccess_union1 = null;
|
|
1679
|
+
const obj_isSuccess_union1_error = (() => {
|
|
1680
|
+
if (obj_isSuccess !== null) {
|
|
1681
|
+
return new TypeError('Expected "null" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
|
|
1682
|
+
}
|
|
1683
|
+
})();
|
|
1684
|
+
if (obj_isSuccess_union1_error != null) {
|
|
1685
|
+
obj_isSuccess_union1 = obj_isSuccess_union1_error.message;
|
|
1686
|
+
}
|
|
1687
|
+
if (obj_isSuccess_union0 && obj_isSuccess_union1) {
|
|
1688
|
+
let message = 'Object doesn\'t match union (at "' + path_isSuccess + '")';
|
|
1689
|
+
message += '\n' + obj_isSuccess_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1690
|
+
message += '\n' + obj_isSuccess_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1691
|
+
return new TypeError(message);
|
|
1664
1692
|
}
|
|
1665
1693
|
if (obj.predictionOutput !== undefined) {
|
|
1666
1694
|
const obj_predictionOutput = obj.predictionOutput;
|
|
@@ -1699,19 +1727,12 @@ function validate$k(obj, path = 'PredictionOutputObject') {
|
|
|
1699
1727
|
}
|
|
1700
1728
|
|
|
1701
1729
|
const TTL$1 = 1000;
|
|
1702
|
-
const VERSION$1 = "
|
|
1730
|
+
const VERSION$1 = "c1431b6652fb0e211a1e2149b42f10f4";
|
|
1703
1731
|
function validate$j(obj, path = 'PredictionResponseRepresentation') {
|
|
1704
1732
|
const v_error = (() => {
|
|
1705
1733
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1706
1734
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1707
1735
|
}
|
|
1708
|
-
if (obj.customPredictionLabel !== undefined) {
|
|
1709
|
-
const obj_customPredictionLabel = obj.customPredictionLabel;
|
|
1710
|
-
const path_customPredictionLabel = path + '.customPredictionLabel';
|
|
1711
|
-
if (typeof obj_customPredictionLabel !== 'string') {
|
|
1712
|
-
return new TypeError('Expected "string" but received "' + typeof obj_customPredictionLabel + '" (at "' + path_customPredictionLabel + '")');
|
|
1713
|
-
}
|
|
1714
|
-
}
|
|
1715
1736
|
if (obj.predictionModel !== undefined) {
|
|
1716
1737
|
const obj_predictionModel = obj.predictionModel;
|
|
1717
1738
|
const path_predictionModel = path + '.predictionModel';
|
|
@@ -4209,4 +4230,4 @@ withDefaultLuvio((luvio) => {
|
|
|
4209
4230
|
});
|
|
4210
4231
|
|
|
4211
4232
|
export { fetchRecommendations, getPredictions, predictions };
|
|
4212
|
-
// version: 1.
|
|
4233
|
+
// version: 1.310.0-51b4ab090c
|
package/src/raml/api.raml
CHANGED
|
@@ -316,6 +316,10 @@ types:
|
|
|
316
316
|
description: Predicted object representation for prediction.
|
|
317
317
|
type: object
|
|
318
318
|
properties:
|
|
319
|
+
customPredictionLabel:
|
|
320
|
+
description: .
|
|
321
|
+
type: string
|
|
322
|
+
required: false # TODO Hand-rolled W-9314597
|
|
319
323
|
predictionScore:
|
|
320
324
|
description: .
|
|
321
325
|
format: float
|
|
@@ -339,7 +343,7 @@ types:
|
|
|
339
343
|
required: false # TODO Hand-rolled W-16235747
|
|
340
344
|
isSuccess:
|
|
341
345
|
description: .
|
|
342
|
-
type:
|
|
346
|
+
type: boolean | nil
|
|
343
347
|
required: true # TODO Hand-rolled W-16235747
|
|
344
348
|
predictionOutput:
|
|
345
349
|
description: .
|
|
@@ -526,10 +530,6 @@ types:
|
|
|
526
530
|
description: .
|
|
527
531
|
type: string
|
|
528
532
|
required: true # TODO Hand-rolled W-9314597
|
|
529
|
-
customPredictionLabel:
|
|
530
|
-
description: .
|
|
531
|
-
type: string
|
|
532
|
-
required: false # TODO Hand-rolled W-9314597
|
|
533
533
|
# TODO Hand-rolled W-16235747
|
|
534
534
|
PredictionRequestWrapperRepresentation:
|
|
535
535
|
description: Wrapper for PredictionRequestRepresentation.
|