@salesforce/lds-adapters-experience-marketing-integration 1.214.2 → 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/experience-marketing-integration.js +18 -50
- package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +1 -1
- package/dist/es/es2018/types/src/generated/adapters/getForm.d.ts +1 -1
- package/dist/es/es2018/types/src/generated/adapters/saveForm.d.ts +1 -1
- package/dist/es/es2018/types/src/generated/adapters/submitForm.d.ts +1 -1
- package/package.json +1 -1
- package/sfdc/index.js +19 -51
|
@@ -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$3, typeCheckConfig as typeCheckConfig$3, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -48,10 +48,13 @@ const snapshotRefreshOptions = {
|
|
|
48
48
|
},
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
|
-
function generateParamConfigMetadata(name, required, coerceFn) {
|
|
51
|
+
function generateParamConfigMetadata(name, required, resourceType, typeCheckShape, isArrayShape = false, coerceFn) {
|
|
52
52
|
return {
|
|
53
53
|
name,
|
|
54
54
|
required,
|
|
55
|
+
resourceType,
|
|
56
|
+
typeCheckShape,
|
|
57
|
+
isArrayShape,
|
|
55
58
|
coerceFn,
|
|
56
59
|
};
|
|
57
60
|
}
|
|
@@ -419,26 +422,14 @@ function createResourceRequest$2(config) {
|
|
|
419
422
|
|
|
420
423
|
const adapterName$2 = 'saveForm';
|
|
421
424
|
const saveForm_ConfigPropertyMetadata = [
|
|
422
|
-
generateParamConfigMetadata('siteId', true),
|
|
423
|
-
generateParamConfigMetadata('formInput', true),
|
|
425
|
+
generateParamConfigMetadata('siteId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
426
|
+
generateParamConfigMetadata('formInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
424
427
|
];
|
|
425
428
|
const saveForm_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, saveForm_ConfigPropertyMetadata);
|
|
426
|
-
|
|
427
|
-
const resourceParams = {
|
|
428
|
-
urlParams: {
|
|
429
|
-
siteId: config.siteId
|
|
430
|
-
},
|
|
431
|
-
body: {
|
|
432
|
-
formInput: config.formInput
|
|
433
|
-
}
|
|
434
|
-
};
|
|
435
|
-
return resourceParams;
|
|
436
|
-
}
|
|
429
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(saveForm_ConfigPropertyMetadata);
|
|
437
430
|
function typeCheckConfig$2(untrustedConfig) {
|
|
438
431
|
const config = {};
|
|
439
|
-
|
|
440
|
-
siteId: 0 /* String */,
|
|
441
|
-
});
|
|
432
|
+
typeCheckConfig$3(untrustedConfig, config, saveForm_ConfigPropertyMetadata);
|
|
442
433
|
const untrustedConfig_formInput = untrustedConfig.formInput;
|
|
443
434
|
const referenceFormInputRepresentationValidationError = validate$7(untrustedConfig_formInput);
|
|
444
435
|
if (referenceFormInputRepresentationValidationError === null) {
|
|
@@ -544,28 +535,18 @@ function createResourceRequest$1(config) {
|
|
|
544
535
|
|
|
545
536
|
const adapterName$1 = 'getForm';
|
|
546
537
|
const getForm_ConfigPropertyMetadata = [
|
|
547
|
-
generateParamConfigMetadata('formId', true),
|
|
548
|
-
generateParamConfigMetadata('siteId', true),
|
|
538
|
+
generateParamConfigMetadata('formId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
539
|
+
generateParamConfigMetadata('siteId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
549
540
|
];
|
|
550
541
|
const getForm_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getForm_ConfigPropertyMetadata);
|
|
551
|
-
|
|
552
|
-
const resourceParams = {
|
|
553
|
-
urlParams: {
|
|
554
|
-
formId: config.formId, siteId: config.siteId
|
|
555
|
-
}
|
|
556
|
-
};
|
|
557
|
-
return resourceParams;
|
|
558
|
-
}
|
|
542
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(getForm_ConfigPropertyMetadata);
|
|
559
543
|
function keyBuilder$1(luvio, config) {
|
|
560
544
|
const resourceParams = createResourceParams$1(config);
|
|
561
545
|
return keyBuilder$2(luvio, resourceParams);
|
|
562
546
|
}
|
|
563
547
|
function typeCheckConfig$1(untrustedConfig) {
|
|
564
548
|
const config = {};
|
|
565
|
-
|
|
566
|
-
formId: 0 /* String */,
|
|
567
|
-
siteId: 0 /* String */,
|
|
568
|
-
});
|
|
549
|
+
typeCheckConfig$3(untrustedConfig, config, getForm_ConfigPropertyMetadata);
|
|
569
550
|
return config;
|
|
570
551
|
}
|
|
571
552
|
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
@@ -809,28 +790,15 @@ function createResourceRequest(config) {
|
|
|
809
790
|
|
|
810
791
|
const adapterName = 'submitForm';
|
|
811
792
|
const submitForm_ConfigPropertyMetadata = [
|
|
812
|
-
generateParamConfigMetadata('formId', true),
|
|
813
|
-
generateParamConfigMetadata('siteId', true),
|
|
814
|
-
generateParamConfigMetadata('formSubmissionInput', true),
|
|
793
|
+
generateParamConfigMetadata('formId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
794
|
+
generateParamConfigMetadata('siteId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
795
|
+
generateParamConfigMetadata('formSubmissionInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
815
796
|
];
|
|
816
797
|
const submitForm_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, submitForm_ConfigPropertyMetadata);
|
|
817
|
-
|
|
818
|
-
const resourceParams = {
|
|
819
|
-
urlParams: {
|
|
820
|
-
formId: config.formId, siteId: config.siteId
|
|
821
|
-
},
|
|
822
|
-
body: {
|
|
823
|
-
formSubmissionInput: config.formSubmissionInput
|
|
824
|
-
}
|
|
825
|
-
};
|
|
826
|
-
return resourceParams;
|
|
827
|
-
}
|
|
798
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$3(submitForm_ConfigPropertyMetadata);
|
|
828
799
|
function typeCheckConfig(untrustedConfig) {
|
|
829
800
|
const config = {};
|
|
830
|
-
|
|
831
|
-
formId: 0 /* String */,
|
|
832
|
-
siteId: 0 /* String */,
|
|
833
|
-
});
|
|
801
|
+
typeCheckConfig$3(untrustedConfig, config, submitForm_ConfigPropertyMetadata);
|
|
834
802
|
const untrustedConfig_formSubmissionInput = untrustedConfig.formSubmissionInput;
|
|
835
803
|
const referenceFormSubmissionInputRepresentationValidationError = validate$1(untrustedConfig_formSubmissionInput);
|
|
836
804
|
if (referenceFormSubmissionInputRepresentationValidationError === 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 = "marketing-integration";
|
|
@@ -9,7 +9,7 @@ export interface GetFormConfig {
|
|
|
9
9
|
formId: string;
|
|
10
10
|
siteId: string;
|
|
11
11
|
}
|
|
12
|
-
export declare
|
|
12
|
+
export declare const createResourceParams: (config: GetFormConfig) => resources_getSitesMarketingIntegrationFormsByFormIdAndSiteId_ResourceRequestConfig;
|
|
13
13
|
export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: GetFormConfig): string;
|
|
14
14
|
export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, config: GetFormConfig): $64$luvio_engine_NormalizedKeyMetadata;
|
|
15
15
|
export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<GetFormConfig>): adapter$45$utils_Untrusted<GetFormConfig>;
|
|
@@ -10,7 +10,7 @@ export interface SaveFormConfig {
|
|
|
10
10
|
siteId: string;
|
|
11
11
|
formInput: types_FormInputRepresentation_FormInputRepresentation;
|
|
12
12
|
}
|
|
13
|
-
export declare
|
|
13
|
+
export declare const createResourceParams: (config: SaveFormConfig) => resources_postSitesMarketingIntegrationFormsBySiteId_ResourceRequestConfig;
|
|
14
14
|
export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<SaveFormConfig>): adapter$45$utils_Untrusted<SaveFormConfig>;
|
|
15
15
|
export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): SaveFormConfig | null;
|
|
16
16
|
export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: SaveFormConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<import("@luvio/engine").FulfilledSnapshot<types_FormRepresentation_FormRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_FormRepresentation_FormRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_FormRepresentation_FormRepresentation, any>>;
|
|
@@ -11,7 +11,7 @@ export interface SubmitFormConfig {
|
|
|
11
11
|
siteId: string;
|
|
12
12
|
formSubmissionInput: types_FormSubmissionInputRepresentation_FormSubmissionInputRepresentation;
|
|
13
13
|
}
|
|
14
|
-
export declare
|
|
14
|
+
export declare const createResourceParams: (config: SubmitFormConfig) => resources_postSitesMarketingIntegrationFormsDataByFormIdAndSiteId_ResourceRequestConfig;
|
|
15
15
|
export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<SubmitFormConfig>): adapter$45$utils_Untrusted<SubmitFormConfig>;
|
|
16
16
|
export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): SubmitFormConfig | null;
|
|
17
17
|
export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: SubmitFormConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<import("@luvio/engine").FulfilledSnapshot<types_FormSubmissionRepresentation_FormSubmissionRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_FormSubmissionRepresentation_FormSubmissionRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_FormSubmissionRepresentation_FormSubmissionRepresentation, any>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-experience-marketing-integration",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.216.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "With this API, you can CRUD data in Marketing Cloud's storage, Data Extensions.",
|
|
6
6
|
"main": "dist/es/es2018/experience-marketing-integration.js",
|
package/sfdc/index.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
|
|
16
16
|
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
17
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1,
|
|
17
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1, typeCheckConfig as typeCheckConfig$3, createResourceParams as createResourceParams$3 } from 'force/luvioEngine';
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
20
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -58,10 +58,13 @@ const snapshotRefreshOptions = {
|
|
|
58
58
|
},
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
|
-
function generateParamConfigMetadata(name, required, coerceFn) {
|
|
61
|
+
function generateParamConfigMetadata(name, required, resourceType, typeCheckShape, isArrayShape = false, coerceFn) {
|
|
62
62
|
return {
|
|
63
63
|
name,
|
|
64
64
|
required,
|
|
65
|
+
resourceType,
|
|
66
|
+
typeCheckShape,
|
|
67
|
+
isArrayShape,
|
|
65
68
|
coerceFn,
|
|
66
69
|
};
|
|
67
70
|
}
|
|
@@ -383,28 +386,18 @@ function createResourceRequestFromRepresentation(representation) {
|
|
|
383
386
|
|
|
384
387
|
const adapterName$2 = 'getForm';
|
|
385
388
|
const getForm_ConfigPropertyMetadata = [
|
|
386
|
-
generateParamConfigMetadata('formId', true),
|
|
387
|
-
generateParamConfigMetadata('siteId', true),
|
|
389
|
+
generateParamConfigMetadata('formId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
390
|
+
generateParamConfigMetadata('siteId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
388
391
|
];
|
|
389
392
|
const getForm_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getForm_ConfigPropertyMetadata);
|
|
390
|
-
|
|
391
|
-
const resourceParams = {
|
|
392
|
-
urlParams: {
|
|
393
|
-
formId: config.formId, siteId: config.siteId
|
|
394
|
-
}
|
|
395
|
-
};
|
|
396
|
-
return resourceParams;
|
|
397
|
-
}
|
|
393
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(getForm_ConfigPropertyMetadata);
|
|
398
394
|
function keyBuilder$1(luvio, config) {
|
|
399
395
|
const resourceParams = createResourceParams$2(config);
|
|
400
396
|
return keyBuilder$2(luvio, resourceParams);
|
|
401
397
|
}
|
|
402
398
|
function typeCheckConfig$2(untrustedConfig) {
|
|
403
399
|
const config = {};
|
|
404
|
-
|
|
405
|
-
formId: 0 /* String */,
|
|
406
|
-
siteId: 0 /* String */,
|
|
407
|
-
});
|
|
400
|
+
typeCheckConfig$3(untrustedConfig, config, getForm_ConfigPropertyMetadata);
|
|
408
401
|
return config;
|
|
409
402
|
}
|
|
410
403
|
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
@@ -621,26 +614,14 @@ function createResourceRequest$1(config) {
|
|
|
621
614
|
|
|
622
615
|
const adapterName$1 = 'saveForm';
|
|
623
616
|
const saveForm_ConfigPropertyMetadata = [
|
|
624
|
-
generateParamConfigMetadata('siteId', true),
|
|
625
|
-
generateParamConfigMetadata('formInput', true),
|
|
617
|
+
generateParamConfigMetadata('siteId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
618
|
+
generateParamConfigMetadata('formInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
626
619
|
];
|
|
627
620
|
const saveForm_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, saveForm_ConfigPropertyMetadata);
|
|
628
|
-
|
|
629
|
-
const resourceParams = {
|
|
630
|
-
urlParams: {
|
|
631
|
-
siteId: config.siteId
|
|
632
|
-
},
|
|
633
|
-
body: {
|
|
634
|
-
formInput: config.formInput
|
|
635
|
-
}
|
|
636
|
-
};
|
|
637
|
-
return resourceParams;
|
|
638
|
-
}
|
|
621
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(saveForm_ConfigPropertyMetadata);
|
|
639
622
|
function typeCheckConfig$1(untrustedConfig) {
|
|
640
623
|
const config = {};
|
|
641
|
-
|
|
642
|
-
siteId: 0 /* String */,
|
|
643
|
-
});
|
|
624
|
+
typeCheckConfig$3(untrustedConfig, config, saveForm_ConfigPropertyMetadata);
|
|
644
625
|
const untrustedConfig_formInput = untrustedConfig.formInput;
|
|
645
626
|
const referenceFormInputRepresentationValidationError = validate$4(untrustedConfig_formInput);
|
|
646
627
|
if (referenceFormInputRepresentationValidationError === null) {
|
|
@@ -860,28 +841,15 @@ function createResourceRequest(config) {
|
|
|
860
841
|
|
|
861
842
|
const adapterName = 'submitForm';
|
|
862
843
|
const submitForm_ConfigPropertyMetadata = [
|
|
863
|
-
generateParamConfigMetadata('formId', true),
|
|
864
|
-
generateParamConfigMetadata('siteId', true),
|
|
865
|
-
generateParamConfigMetadata('formSubmissionInput', true),
|
|
844
|
+
generateParamConfigMetadata('formId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
845
|
+
generateParamConfigMetadata('siteId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
846
|
+
generateParamConfigMetadata('formSubmissionInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
866
847
|
];
|
|
867
848
|
const submitForm_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, submitForm_ConfigPropertyMetadata);
|
|
868
|
-
|
|
869
|
-
const resourceParams = {
|
|
870
|
-
urlParams: {
|
|
871
|
-
formId: config.formId, siteId: config.siteId
|
|
872
|
-
},
|
|
873
|
-
body: {
|
|
874
|
-
formSubmissionInput: config.formSubmissionInput
|
|
875
|
-
}
|
|
876
|
-
};
|
|
877
|
-
return resourceParams;
|
|
878
|
-
}
|
|
849
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$3(submitForm_ConfigPropertyMetadata);
|
|
879
850
|
function typeCheckConfig(untrustedConfig) {
|
|
880
851
|
const config = {};
|
|
881
|
-
|
|
882
|
-
formId: 0 /* String */,
|
|
883
|
-
siteId: 0 /* String */,
|
|
884
|
-
});
|
|
852
|
+
typeCheckConfig$3(untrustedConfig, config, submitForm_ConfigPropertyMetadata);
|
|
885
853
|
const untrustedConfig_formSubmissionInput = untrustedConfig.formSubmissionInput;
|
|
886
854
|
const referenceFormSubmissionInputRepresentationValidationError = validate$1(untrustedConfig_formSubmissionInput);
|
|
887
855
|
if (referenceFormSubmissionInputRepresentationValidationError === null) {
|
|
@@ -966,4 +934,4 @@ withDefaultLuvio((luvio) => {
|
|
|
966
934
|
});
|
|
967
935
|
|
|
968
936
|
export { getForm, getFormNotifyChange, getForm_imperative, saveForm, submitForm };
|
|
969
|
-
// version: 1.
|
|
937
|
+
// version: 1.216.0-1d57d45fe
|