@salesforce/lds-adapters-community-microbatching 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$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
|
}
|
|
@@ -221,26 +224,14 @@ function createResourceRequest(config) {
|
|
|
221
224
|
|
|
222
225
|
const adapterName = 'ingestRecord';
|
|
223
226
|
const ingestRecord_ConfigPropertyMetadata = [
|
|
224
|
-
generateParamConfigMetadata('communityId', true),
|
|
225
|
-
generateParamConfigMetadata('requestIngestionInput', true),
|
|
227
|
+
generateParamConfigMetadata('communityId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
228
|
+
generateParamConfigMetadata('requestIngestionInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
226
229
|
];
|
|
227
230
|
const ingestRecord_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, ingestRecord_ConfigPropertyMetadata);
|
|
228
|
-
|
|
229
|
-
const resourceParams = {
|
|
230
|
-
urlParams: {
|
|
231
|
-
communityId: config.communityId
|
|
232
|
-
},
|
|
233
|
-
body: {
|
|
234
|
-
requestIngestionInput: config.requestIngestionInput
|
|
235
|
-
}
|
|
236
|
-
};
|
|
237
|
-
return resourceParams;
|
|
238
|
-
}
|
|
231
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$1(ingestRecord_ConfigPropertyMetadata);
|
|
239
232
|
function typeCheckConfig(untrustedConfig) {
|
|
240
233
|
const config = {};
|
|
241
|
-
|
|
242
|
-
communityId: 0 /* String */,
|
|
243
|
-
});
|
|
234
|
+
typeCheckConfig$1(untrustedConfig, config, ingestRecord_ConfigPropertyMetadata);
|
|
244
235
|
const untrustedConfig_requestIngestionInput = untrustedConfig.requestIngestionInput;
|
|
245
236
|
const referenceMicrobatchingIngestionInputRepresentationValidationError = validate$1(untrustedConfig_requestIngestionInput);
|
|
246
237
|
if (referenceMicrobatchingIngestionInputRepresentationValidationError === null) {
|
|
@@ -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 = "microbatching";
|
|
@@ -10,7 +10,7 @@ export interface IngestRecordConfig {
|
|
|
10
10
|
communityId: string;
|
|
11
11
|
requestIngestionInput: types_MicrobatchingIngestionInputRepresentation_MicrobatchingIngestionInputRepresentation;
|
|
12
12
|
}
|
|
13
|
-
export declare
|
|
13
|
+
export declare const createResourceParams: (config: IngestRecordConfig) => resources_postConnectCommunitiesMicrobatchingByCommunityId_ResourceRequestConfig;
|
|
14
14
|
export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<IngestRecordConfig>): adapter$45$utils_Untrusted<IngestRecordConfig>;
|
|
15
15
|
export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): IngestRecordConfig | null;
|
|
16
16
|
export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: IngestRecordConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<import("@luvio/engine").FulfilledSnapshot<types_MicrobatchingIngestionOutputRepresentation_MicrobatchingIngestionOutputRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_MicrobatchingIngestionOutputRepresentation_MicrobatchingIngestionOutputRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_MicrobatchingIngestionOutputRepresentation_MicrobatchingIngestionOutputRepresentation, any>>;
|
package/package.json
CHANGED
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$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
|
}
|
|
@@ -230,26 +233,14 @@ function createResourceRequest(config) {
|
|
|
230
233
|
|
|
231
234
|
const adapterName = 'ingestRecord';
|
|
232
235
|
const ingestRecord_ConfigPropertyMetadata = [
|
|
233
|
-
generateParamConfigMetadata('communityId', true),
|
|
234
|
-
generateParamConfigMetadata('requestIngestionInput', true),
|
|
236
|
+
generateParamConfigMetadata('communityId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
237
|
+
generateParamConfigMetadata('requestIngestionInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
235
238
|
];
|
|
236
239
|
const ingestRecord_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, ingestRecord_ConfigPropertyMetadata);
|
|
237
|
-
|
|
238
|
-
const resourceParams = {
|
|
239
|
-
urlParams: {
|
|
240
|
-
communityId: config.communityId
|
|
241
|
-
},
|
|
242
|
-
body: {
|
|
243
|
-
requestIngestionInput: config.requestIngestionInput
|
|
244
|
-
}
|
|
245
|
-
};
|
|
246
|
-
return resourceParams;
|
|
247
|
-
}
|
|
240
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$1(ingestRecord_ConfigPropertyMetadata);
|
|
248
241
|
function typeCheckConfig(untrustedConfig) {
|
|
249
242
|
const config = {};
|
|
250
|
-
|
|
251
|
-
communityId: 0 /* String */,
|
|
252
|
-
});
|
|
243
|
+
typeCheckConfig$1(untrustedConfig, config, ingestRecord_ConfigPropertyMetadata);
|
|
253
244
|
const untrustedConfig_requestIngestionInput = untrustedConfig.requestIngestionInput;
|
|
254
245
|
const referenceMicrobatchingIngestionInputRepresentationValidationError = validate$1(untrustedConfig_requestIngestionInput);
|
|
255
246
|
if (referenceMicrobatchingIngestionInputRepresentationValidationError === null) {
|
|
@@ -317,4 +308,4 @@ withDefaultLuvio((luvio) => {
|
|
|
317
308
|
});
|
|
318
309
|
|
|
319
310
|
export { ingestRecord };
|
|
320
|
-
// version: 1.
|
|
311
|
+
// version: 1.217.0-a59ee1de5
|