@salesforce/lds-adapters-industries-einstein-aiaccelerator 1.215.0 → 1.216.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 +9 -20
- package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +1 -1
- package/dist/es/es2018/types/src/generated/adapters/fetchRecommendations.d.ts +1 -1
- package/dist/es/es2018/types/src/generated/adapters/predictions.d.ts +1 -1
- package/package.json +1 -1
- package/sfdc/index.js +10 -21
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap } from '@luvio/engine';
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$2 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -41,10 +41,13 @@ function untrustedIsObject(untrusted) {
|
|
|
41
41
|
function areRequiredParametersPresent(config, configPropertyNames) {
|
|
42
42
|
return configPropertyNames.parameters.required.every(req => req in config);
|
|
43
43
|
}
|
|
44
|
-
function generateParamConfigMetadata(name, required, coerceFn) {
|
|
44
|
+
function generateParamConfigMetadata(name, required, resourceType, typeCheckShape, isArrayShape = false, coerceFn) {
|
|
45
45
|
return {
|
|
46
46
|
name,
|
|
47
47
|
required,
|
|
48
|
+
resourceType,
|
|
49
|
+
typeCheckShape,
|
|
50
|
+
isArrayShape,
|
|
48
51
|
coerceFn,
|
|
49
52
|
};
|
|
50
53
|
}
|
|
@@ -2353,17 +2356,10 @@ function createResourceRequest$1(config) {
|
|
|
2353
2356
|
|
|
2354
2357
|
const adapterName$1 = 'predictions';
|
|
2355
2358
|
const predictions_ConfigPropertyMetadata = [
|
|
2356
|
-
generateParamConfigMetadata('predictionInput', true),
|
|
2359
|
+
generateParamConfigMetadata('predictionInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
2357
2360
|
];
|
|
2358
2361
|
const predictions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, predictions_ConfigPropertyMetadata);
|
|
2359
|
-
|
|
2360
|
-
const resourceParams = {
|
|
2361
|
-
body: {
|
|
2362
|
-
predictionInput: config.predictionInput
|
|
2363
|
-
}
|
|
2364
|
-
};
|
|
2365
|
-
return resourceParams;
|
|
2366
|
-
}
|
|
2362
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$2(predictions_ConfigPropertyMetadata);
|
|
2367
2363
|
function typeCheckConfig$1(untrustedConfig) {
|
|
2368
2364
|
const config = {};
|
|
2369
2365
|
const untrustedConfig_predictionInput = untrustedConfig.predictionInput;
|
|
@@ -3594,17 +3590,10 @@ function createResourceRequest(config) {
|
|
|
3594
3590
|
|
|
3595
3591
|
const adapterName = 'fetchRecommendations';
|
|
3596
3592
|
const fetchRecommendations_ConfigPropertyMetadata = [
|
|
3597
|
-
generateParamConfigMetadata('recommendationInput', true),
|
|
3593
|
+
generateParamConfigMetadata('recommendationInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
3598
3594
|
];
|
|
3599
3595
|
const fetchRecommendations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, fetchRecommendations_ConfigPropertyMetadata);
|
|
3600
|
-
|
|
3601
|
-
const resourceParams = {
|
|
3602
|
-
body: {
|
|
3603
|
-
recommendationInput: config.recommendationInput
|
|
3604
|
-
}
|
|
3605
|
-
};
|
|
3606
|
-
return resourceParams;
|
|
3607
|
-
}
|
|
3596
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$2(fetchRecommendations_ConfigPropertyMetadata);
|
|
3608
3597
|
function typeCheckConfig(untrustedConfig) {
|
|
3609
3598
|
const config = {};
|
|
3610
3599
|
const untrustedConfig_recommendationInput = untrustedConfig.recommendationInput;
|
|
@@ -57,6 +57,6 @@ export declare const snapshotRefreshOptions: {
|
|
|
57
57
|
export declare function stableJSONStringify(node: any): string | undefined;
|
|
58
58
|
export declare function getFetchResponseStatusText(status: number): string;
|
|
59
59
|
export declare function isUnfulfilledSnapshot<T, U>(snapshot: $64$luvio_engine_Snapshot<T, U>): snapshot is $64$luvio_engine_UnfulfilledSnapshot<T, U>;
|
|
60
|
-
export declare function generateParamConfigMetadata(name: string, required: boolean, coerceFn?: (v: unknown) => unknown): $64$luvio_engine_AdapterConfigMetadata;
|
|
60
|
+
export declare function generateParamConfigMetadata(name: string, required: boolean, resourceType: $64$luvio_engine_AdapterConfigMetadata['resourceType'], typeCheckShape: $64$luvio_engine_AdapterConfigMetadata['typeCheckShape'], isArrayShape?: boolean, coerceFn?: (v: unknown) => unknown): $64$luvio_engine_AdapterConfigMetadata;
|
|
61
61
|
export declare function buildAdapterValidationConfig(displayName: string, paramsMeta: $64$luvio_engine_AdapterConfigMetadata[]): AdapterValidationConfig;
|
|
62
62
|
export declare const keyPrefix = "Einstein-AIAccelerator";
|
|
@@ -9,7 +9,7 @@ export declare const fetchRecommendations_ConfigPropertyNames: adapter$45$utils_
|
|
|
9
9
|
export interface FetchRecommendationsConfig {
|
|
10
10
|
recommendationInput: types_RecommendationInputRepresentation_RecommendationInputRepresentation;
|
|
11
11
|
}
|
|
12
|
-
export declare
|
|
12
|
+
export declare const createResourceParams: (config: FetchRecommendationsConfig) => resources_postConnectAiacceleratorRecommendations_ResourceRequestConfig;
|
|
13
13
|
export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<FetchRecommendationsConfig>): adapter$45$utils_Untrusted<FetchRecommendationsConfig>;
|
|
14
14
|
export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): FetchRecommendationsConfig | null;
|
|
15
15
|
export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: FetchRecommendationsConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<import("@luvio/engine").FulfilledSnapshot<types_RecommendationOutputRepresentation_RecommendationOutputRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_RecommendationOutputRepresentation_RecommendationOutputRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_RecommendationOutputRepresentation_RecommendationOutputRepresentation, any>>;
|
|
@@ -9,7 +9,7 @@ export declare const predictions_ConfigPropertyNames: adapter$45$utils_AdapterVa
|
|
|
9
9
|
export interface PredictionsConfig {
|
|
10
10
|
predictionInput: types_PredictionInputRepresentation_PredictionInputRepresentation;
|
|
11
11
|
}
|
|
12
|
-
export declare
|
|
12
|
+
export declare const createResourceParams: (config: PredictionsConfig) => resources_postConnectAiacceleratorPredictions_ResourceRequestConfig;
|
|
13
13
|
export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<PredictionsConfig>): adapter$45$utils_Untrusted<PredictionsConfig>;
|
|
14
14
|
export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): PredictionsConfig | null;
|
|
15
15
|
export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: PredictionsConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<import("@luvio/engine").FulfilledSnapshot<types_PredictionOutputRepresentation_PredictionOutputRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_PredictionOutputRepresentation_PredictionOutputRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_PredictionOutputRepresentation_PredictionOutputRepresentation, any>>;
|
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.216.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",
|
package/sfdc/index.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
16
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap } from 'force/luvioEngine';
|
|
16
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$2 } from 'force/luvioEngine';
|
|
17
17
|
|
|
18
18
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
19
19
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -50,10 +50,13 @@ function untrustedIsObject(untrusted) {
|
|
|
50
50
|
function areRequiredParametersPresent(config, configPropertyNames) {
|
|
51
51
|
return configPropertyNames.parameters.required.every(req => req in config);
|
|
52
52
|
}
|
|
53
|
-
function generateParamConfigMetadata(name, required, coerceFn) {
|
|
53
|
+
function generateParamConfigMetadata(name, required, resourceType, typeCheckShape, isArrayShape = false, coerceFn) {
|
|
54
54
|
return {
|
|
55
55
|
name,
|
|
56
56
|
required,
|
|
57
|
+
resourceType,
|
|
58
|
+
typeCheckShape,
|
|
59
|
+
isArrayShape,
|
|
57
60
|
coerceFn,
|
|
58
61
|
};
|
|
59
62
|
}
|
|
@@ -1277,17 +1280,10 @@ function createResourceRequest$1(config) {
|
|
|
1277
1280
|
|
|
1278
1281
|
const adapterName$1 = 'fetchRecommendations';
|
|
1279
1282
|
const fetchRecommendations_ConfigPropertyMetadata = [
|
|
1280
|
-
generateParamConfigMetadata('recommendationInput', true),
|
|
1283
|
+
generateParamConfigMetadata('recommendationInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1281
1284
|
];
|
|
1282
1285
|
const fetchRecommendations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, fetchRecommendations_ConfigPropertyMetadata);
|
|
1283
|
-
|
|
1284
|
-
const resourceParams = {
|
|
1285
|
-
body: {
|
|
1286
|
-
recommendationInput: config.recommendationInput
|
|
1287
|
-
}
|
|
1288
|
-
};
|
|
1289
|
-
return resourceParams;
|
|
1290
|
-
}
|
|
1286
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$2(fetchRecommendations_ConfigPropertyMetadata);
|
|
1291
1287
|
function typeCheckConfig$1(untrustedConfig) {
|
|
1292
1288
|
const config = {};
|
|
1293
1289
|
const untrustedConfig_recommendationInput = untrustedConfig.recommendationInput;
|
|
@@ -3603,17 +3599,10 @@ function createResourceRequest(config) {
|
|
|
3603
3599
|
|
|
3604
3600
|
const adapterName = 'predictions';
|
|
3605
3601
|
const predictions_ConfigPropertyMetadata = [
|
|
3606
|
-
generateParamConfigMetadata('predictionInput', true),
|
|
3602
|
+
generateParamConfigMetadata('predictionInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
3607
3603
|
];
|
|
3608
3604
|
const predictions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, predictions_ConfigPropertyMetadata);
|
|
3609
|
-
|
|
3610
|
-
const resourceParams = {
|
|
3611
|
-
body: {
|
|
3612
|
-
predictionInput: config.predictionInput
|
|
3613
|
-
}
|
|
3614
|
-
};
|
|
3615
|
-
return resourceParams;
|
|
3616
|
-
}
|
|
3605
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$2(predictions_ConfigPropertyMetadata);
|
|
3617
3606
|
function typeCheckConfig(untrustedConfig) {
|
|
3618
3607
|
const config = {};
|
|
3619
3608
|
const untrustedConfig_predictionInput = untrustedConfig.predictionInput;
|
|
@@ -3686,4 +3675,4 @@ withDefaultLuvio((luvio) => {
|
|
|
3686
3675
|
});
|
|
3687
3676
|
|
|
3688
3677
|
export { fetchRecommendations, predictions };
|
|
3689
|
-
// version: 1.
|
|
3678
|
+
// version: 1.216.0-1d57d45fe
|