@salesforce/lds-adapters-industries-sustainability-reference-data 1.215.0 → 1.217.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.
|
@@ -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,
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$1, typeCheckConfig as typeCheckConfig$1 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys, create: ObjectCreate } = 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
|
}
|
|
@@ -177,27 +180,14 @@ function createResourceRequest(config) {
|
|
|
177
180
|
|
|
178
181
|
const adapterName = 'uploadReferenceData';
|
|
179
182
|
const uploadReferenceData_ConfigPropertyMetadata = [
|
|
180
|
-
generateParamConfigMetadata('category', true),
|
|
181
|
-
generateParamConfigMetadata('recordTypeId', false),
|
|
183
|
+
generateParamConfigMetadata('category', true, 0 /* UrlParameter */, 0 /* String */),
|
|
184
|
+
generateParamConfigMetadata('recordTypeId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
182
185
|
];
|
|
183
186
|
const uploadReferenceData_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, uploadReferenceData_ConfigPropertyMetadata);
|
|
184
|
-
|
|
185
|
-
const resourceParams = {
|
|
186
|
-
urlParams: {
|
|
187
|
-
category: config.category
|
|
188
|
-
},
|
|
189
|
-
queryParams: {
|
|
190
|
-
recordTypeId: config.recordTypeId
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
|
-
return resourceParams;
|
|
194
|
-
}
|
|
187
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$1(uploadReferenceData_ConfigPropertyMetadata);
|
|
195
188
|
function typeCheckConfig(untrustedConfig) {
|
|
196
189
|
const config = {};
|
|
197
|
-
|
|
198
|
-
category: 0 /* String */,
|
|
199
|
-
recordTypeId: 0 /* String */,
|
|
200
|
-
});
|
|
190
|
+
typeCheckConfig$1(untrustedConfig, config, uploadReferenceData_ConfigPropertyMetadata);
|
|
201
191
|
return config;
|
|
202
192
|
}
|
|
203
193
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -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 = "sustainability-reference-data";
|
|
@@ -9,7 +9,7 @@ export interface UploadReferenceDataConfig {
|
|
|
9
9
|
category: string;
|
|
10
10
|
recordTypeId?: string;
|
|
11
11
|
}
|
|
12
|
-
export declare
|
|
12
|
+
export declare const createResourceParams: (config: UploadReferenceDataConfig) => resources_postConnectSustainabilityReferenceDataUploadByCategory_ResourceRequestConfig;
|
|
13
13
|
export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<UploadReferenceDataConfig>): adapter$45$utils_Untrusted<UploadReferenceDataConfig>;
|
|
14
14
|
export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): UploadReferenceDataConfig | null;
|
|
15
15
|
export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: UploadReferenceDataConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<import("@luvio/engine").FulfilledSnapshot<types_SCReferenceDataOutputRepresentation_SCReferenceDataOutputRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_SCReferenceDataOutputRepresentation_SCReferenceDataOutputRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_SCReferenceDataOutputRepresentation_SCReferenceDataOutputRepresentation, any>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-industries-sustainability-reference-data",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.217.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "Sustainability Reference Data",
|
|
6
6
|
"main": "dist/es/es2018/industries-sustainability-reference-data.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,
|
|
16
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$1, typeCheckConfig as typeCheckConfig$1 } from 'force/luvioEngine';
|
|
17
17
|
|
|
18
18
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
19
19
|
const { keys: ObjectKeys, create: ObjectCreate } = 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
|
}
|
|
@@ -186,27 +189,14 @@ function createResourceRequest(config) {
|
|
|
186
189
|
|
|
187
190
|
const adapterName = 'uploadReferenceData';
|
|
188
191
|
const uploadReferenceData_ConfigPropertyMetadata = [
|
|
189
|
-
generateParamConfigMetadata('category', true),
|
|
190
|
-
generateParamConfigMetadata('recordTypeId', false),
|
|
192
|
+
generateParamConfigMetadata('category', true, 0 /* UrlParameter */, 0 /* String */),
|
|
193
|
+
generateParamConfigMetadata('recordTypeId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
191
194
|
];
|
|
192
195
|
const uploadReferenceData_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, uploadReferenceData_ConfigPropertyMetadata);
|
|
193
|
-
|
|
194
|
-
const resourceParams = {
|
|
195
|
-
urlParams: {
|
|
196
|
-
category: config.category
|
|
197
|
-
},
|
|
198
|
-
queryParams: {
|
|
199
|
-
recordTypeId: config.recordTypeId
|
|
200
|
-
}
|
|
201
|
-
};
|
|
202
|
-
return resourceParams;
|
|
203
|
-
}
|
|
196
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$1(uploadReferenceData_ConfigPropertyMetadata);
|
|
204
197
|
function typeCheckConfig(untrustedConfig) {
|
|
205
198
|
const config = {};
|
|
206
|
-
|
|
207
|
-
category: 0 /* String */,
|
|
208
|
-
recordTypeId: 0 /* String */,
|
|
209
|
-
});
|
|
199
|
+
typeCheckConfig$1(untrustedConfig, config, uploadReferenceData_ConfigPropertyMetadata);
|
|
210
200
|
return config;
|
|
211
201
|
}
|
|
212
202
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -269,4 +259,4 @@ withDefaultLuvio((luvio) => {
|
|
|
269
259
|
});
|
|
270
260
|
|
|
271
261
|
export { uploadReferenceData };
|
|
272
|
-
// version: 1.
|
|
262
|
+
// version: 1.217.0-a59ee1de5
|