@salesforce/lds-adapters-marketing-assetcreation 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/marketing-assetcreation.js +15 -42
- package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +1 -1
- package/dist/es/es2018/types/src/generated/adapters/createAsset.d.ts +1 -1
- package/dist/es/es2018/types/src/generated/adapters/getStarterTemplateById.d.ts +1 -1
- package/dist/es/es2018/types/src/generated/adapters/getStarterTemplates.d.ts +1 -1
- package/package.json +1 -1
- package/sfdc/index.js +16 -43
|
@@ -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, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2,
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$3, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2, typeCheckConfig as typeCheckConfig$3 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = 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
|
}
|
|
@@ -246,17 +249,10 @@ function createResourceRequest$2(config) {
|
|
|
246
249
|
|
|
247
250
|
const adapterName$2 = 'createAsset';
|
|
248
251
|
const createAsset_ConfigPropertyMetadata = [
|
|
249
|
-
generateParamConfigMetadata('AssetInput', true),
|
|
252
|
+
generateParamConfigMetadata('AssetInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
250
253
|
];
|
|
251
254
|
const createAsset_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, createAsset_ConfigPropertyMetadata);
|
|
252
|
-
|
|
253
|
-
const resourceParams = {
|
|
254
|
-
body: {
|
|
255
|
-
AssetInput: config.AssetInput
|
|
256
|
-
}
|
|
257
|
-
};
|
|
258
|
-
return resourceParams;
|
|
259
|
-
}
|
|
255
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(createAsset_ConfigPropertyMetadata);
|
|
260
256
|
function typeCheckConfig$2(untrustedConfig) {
|
|
261
257
|
const config = {};
|
|
262
258
|
const untrustedConfig_AssetInput = untrustedConfig.AssetInput;
|
|
@@ -520,28 +516,18 @@ function createResourceRequest$1(config) {
|
|
|
520
516
|
|
|
521
517
|
const adapterName$1 = 'getStarterTemplates';
|
|
522
518
|
const getStarterTemplates_ConfigPropertyMetadata = [
|
|
523
|
-
generateParamConfigMetadata('filter', false),
|
|
524
|
-
generateParamConfigMetadata('type', false),
|
|
519
|
+
generateParamConfigMetadata('filter', false, 1 /* QueryParameter */, 0 /* String */),
|
|
520
|
+
generateParamConfigMetadata('type', false, 1 /* QueryParameter */, 0 /* String */),
|
|
525
521
|
];
|
|
526
522
|
const getStarterTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getStarterTemplates_ConfigPropertyMetadata);
|
|
527
|
-
|
|
528
|
-
const resourceParams = {
|
|
529
|
-
queryParams: {
|
|
530
|
-
filter: config.filter, type: config.type
|
|
531
|
-
}
|
|
532
|
-
};
|
|
533
|
-
return resourceParams;
|
|
534
|
-
}
|
|
523
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(getStarterTemplates_ConfigPropertyMetadata);
|
|
535
524
|
function keyBuilder$2(luvio, config) {
|
|
536
525
|
const resourceParams = createResourceParams$1(config);
|
|
537
526
|
return keyBuilder$3(luvio, resourceParams);
|
|
538
527
|
}
|
|
539
528
|
function typeCheckConfig$1(untrustedConfig) {
|
|
540
529
|
const config = {};
|
|
541
|
-
|
|
542
|
-
filter: 0 /* String */,
|
|
543
|
-
type: 0 /* String */,
|
|
544
|
-
});
|
|
530
|
+
typeCheckConfig$3(untrustedConfig, config, getStarterTemplates_ConfigPropertyMetadata);
|
|
545
531
|
return config;
|
|
546
532
|
}
|
|
547
533
|
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
@@ -815,31 +801,18 @@ function createResourceRequest(config) {
|
|
|
815
801
|
|
|
816
802
|
const adapterName = 'getStarterTemplateById';
|
|
817
803
|
const getStarterTemplateById_ConfigPropertyMetadata = [
|
|
818
|
-
generateParamConfigMetadata('starterTemplateId', true),
|
|
819
|
-
generateParamConfigMetadata('type', false),
|
|
804
|
+
generateParamConfigMetadata('starterTemplateId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
805
|
+
generateParamConfigMetadata('type', false, 1 /* QueryParameter */, 0 /* String */),
|
|
820
806
|
];
|
|
821
807
|
const getStarterTemplateById_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getStarterTemplateById_ConfigPropertyMetadata);
|
|
822
|
-
|
|
823
|
-
const resourceParams = {
|
|
824
|
-
urlParams: {
|
|
825
|
-
starterTemplateId: config.starterTemplateId
|
|
826
|
-
},
|
|
827
|
-
queryParams: {
|
|
828
|
-
type: config.type
|
|
829
|
-
}
|
|
830
|
-
};
|
|
831
|
-
return resourceParams;
|
|
832
|
-
}
|
|
808
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$3(getStarterTemplateById_ConfigPropertyMetadata);
|
|
833
809
|
function keyBuilder(luvio, config) {
|
|
834
810
|
const resourceParams = createResourceParams(config);
|
|
835
811
|
return keyBuilder$1(luvio, resourceParams);
|
|
836
812
|
}
|
|
837
813
|
function typeCheckConfig(untrustedConfig) {
|
|
838
814
|
const config = {};
|
|
839
|
-
|
|
840
|
-
starterTemplateId: 0 /* String */,
|
|
841
|
-
type: 0 /* String */,
|
|
842
|
-
});
|
|
815
|
+
typeCheckConfig$3(untrustedConfig, config, getStarterTemplateById_ConfigPropertyMetadata);
|
|
843
816
|
return config;
|
|
844
817
|
}
|
|
845
818
|
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 = "assetcreation";
|
|
@@ -9,7 +9,7 @@ export declare const createAsset_ConfigPropertyNames: adapter$45$utils_AdapterVa
|
|
|
9
9
|
export interface CreateAssetConfig {
|
|
10
10
|
AssetInput: types_AssetInputRepresentation_AssetInputRepresentation;
|
|
11
11
|
}
|
|
12
|
-
export declare
|
|
12
|
+
export declare const createResourceParams: (config: CreateAssetConfig) => resources_postAssetCreationObjects_ResourceRequestConfig;
|
|
13
13
|
export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<CreateAssetConfig>): adapter$45$utils_Untrusted<CreateAssetConfig>;
|
|
14
14
|
export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): CreateAssetConfig | null;
|
|
15
15
|
export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: CreateAssetConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<import("@luvio/engine").FulfilledSnapshot<types_AssetOutputRepresentation_AssetOutputRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_AssetOutputRepresentation_AssetOutputRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_AssetOutputRepresentation_AssetOutputRepresentation, any>>;
|
|
@@ -9,7 +9,7 @@ export interface GetStarterTemplateByIdConfig {
|
|
|
9
9
|
starterTemplateId: string;
|
|
10
10
|
type?: string;
|
|
11
11
|
}
|
|
12
|
-
export declare
|
|
12
|
+
export declare const createResourceParams: (config: GetStarterTemplateByIdConfig) => resources_getAssetCreationStarterTemplatesByStarterTemplateId_ResourceRequestConfig;
|
|
13
13
|
export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: GetStarterTemplateByIdConfig): string;
|
|
14
14
|
export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, config: GetStarterTemplateByIdConfig): $64$luvio_engine_NormalizedKeyMetadata;
|
|
15
15
|
export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<GetStarterTemplateByIdConfig>): adapter$45$utils_Untrusted<GetStarterTemplateByIdConfig>;
|
|
@@ -9,7 +9,7 @@ export interface GetStarterTemplatesConfig {
|
|
|
9
9
|
filter?: string;
|
|
10
10
|
type?: string;
|
|
11
11
|
}
|
|
12
|
-
export declare
|
|
12
|
+
export declare const createResourceParams: (config: GetStarterTemplatesConfig) => resources_getAssetCreationStarterTemplates_ResourceRequestConfig;
|
|
13
13
|
export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: GetStarterTemplatesConfig): string;
|
|
14
14
|
export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, config: GetStarterTemplatesConfig): $64$luvio_engine_NormalizedKeyMetadata;
|
|
15
15
|
export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<GetStarterTemplatesConfig>): adapter$45$utils_Untrusted<GetStarterTemplatesConfig>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-marketing-assetcreation",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.216.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "APIs to create assets based on templates",
|
|
6
6
|
"main": "dist/es/es2018/marketing-assetcreation.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$2,
|
|
17
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$3, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2, typeCheckConfig as typeCheckConfig$3 } from 'force/luvioEngine';
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
20
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = 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
|
}
|
|
@@ -256,17 +259,10 @@ function createResourceRequest$2(config) {
|
|
|
256
259
|
|
|
257
260
|
const adapterName$2 = 'createAsset';
|
|
258
261
|
const createAsset_ConfigPropertyMetadata = [
|
|
259
|
-
generateParamConfigMetadata('AssetInput', true),
|
|
262
|
+
generateParamConfigMetadata('AssetInput', true, 2 /* Body */, 4 /* Unsupported */),
|
|
260
263
|
];
|
|
261
264
|
const createAsset_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, createAsset_ConfigPropertyMetadata);
|
|
262
|
-
|
|
263
|
-
const resourceParams = {
|
|
264
|
-
body: {
|
|
265
|
-
AssetInput: config.AssetInput
|
|
266
|
-
}
|
|
267
|
-
};
|
|
268
|
-
return resourceParams;
|
|
269
|
-
}
|
|
265
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(createAsset_ConfigPropertyMetadata);
|
|
270
266
|
function typeCheckConfig$2(untrustedConfig) {
|
|
271
267
|
const config = {};
|
|
272
268
|
const untrustedConfig_AssetInput = untrustedConfig.AssetInput;
|
|
@@ -518,31 +514,18 @@ function createResourceRequest$1(config) {
|
|
|
518
514
|
|
|
519
515
|
const adapterName$1 = 'getStarterTemplateById';
|
|
520
516
|
const getStarterTemplateById_ConfigPropertyMetadata = [
|
|
521
|
-
generateParamConfigMetadata('starterTemplateId', true),
|
|
522
|
-
generateParamConfigMetadata('type', false),
|
|
517
|
+
generateParamConfigMetadata('starterTemplateId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
518
|
+
generateParamConfigMetadata('type', false, 1 /* QueryParameter */, 0 /* String */),
|
|
523
519
|
];
|
|
524
520
|
const getStarterTemplateById_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getStarterTemplateById_ConfigPropertyMetadata);
|
|
525
|
-
|
|
526
|
-
const resourceParams = {
|
|
527
|
-
urlParams: {
|
|
528
|
-
starterTemplateId: config.starterTemplateId
|
|
529
|
-
},
|
|
530
|
-
queryParams: {
|
|
531
|
-
type: config.type
|
|
532
|
-
}
|
|
533
|
-
};
|
|
534
|
-
return resourceParams;
|
|
535
|
-
}
|
|
521
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(getStarterTemplateById_ConfigPropertyMetadata);
|
|
536
522
|
function keyBuilder$2(luvio, config) {
|
|
537
523
|
const resourceParams = createResourceParams$1(config);
|
|
538
524
|
return keyBuilder$3(luvio, resourceParams);
|
|
539
525
|
}
|
|
540
526
|
function typeCheckConfig$1(untrustedConfig) {
|
|
541
527
|
const config = {};
|
|
542
|
-
|
|
543
|
-
starterTemplateId: 0 /* String */,
|
|
544
|
-
type: 0 /* String */,
|
|
545
|
-
});
|
|
528
|
+
typeCheckConfig$3(untrustedConfig, config, getStarterTemplateById_ConfigPropertyMetadata);
|
|
546
529
|
return config;
|
|
547
530
|
}
|
|
548
531
|
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
@@ -828,28 +811,18 @@ function createResourceRequest(config) {
|
|
|
828
811
|
|
|
829
812
|
const adapterName = 'getStarterTemplates';
|
|
830
813
|
const getStarterTemplates_ConfigPropertyMetadata = [
|
|
831
|
-
generateParamConfigMetadata('filter', false),
|
|
832
|
-
generateParamConfigMetadata('type', false),
|
|
814
|
+
generateParamConfigMetadata('filter', false, 1 /* QueryParameter */, 0 /* String */),
|
|
815
|
+
generateParamConfigMetadata('type', false, 1 /* QueryParameter */, 0 /* String */),
|
|
833
816
|
];
|
|
834
817
|
const getStarterTemplates_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getStarterTemplates_ConfigPropertyMetadata);
|
|
835
|
-
|
|
836
|
-
const resourceParams = {
|
|
837
|
-
queryParams: {
|
|
838
|
-
filter: config.filter, type: config.type
|
|
839
|
-
}
|
|
840
|
-
};
|
|
841
|
-
return resourceParams;
|
|
842
|
-
}
|
|
818
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$3(getStarterTemplates_ConfigPropertyMetadata);
|
|
843
819
|
function keyBuilder(luvio, config) {
|
|
844
820
|
const resourceParams = createResourceParams(config);
|
|
845
821
|
return keyBuilder$1(luvio, resourceParams);
|
|
846
822
|
}
|
|
847
823
|
function typeCheckConfig(untrustedConfig) {
|
|
848
824
|
const config = {};
|
|
849
|
-
|
|
850
|
-
filter: 0 /* String */,
|
|
851
|
-
type: 0 /* String */,
|
|
852
|
-
});
|
|
825
|
+
typeCheckConfig$3(untrustedConfig, config, getStarterTemplates_ConfigPropertyMetadata);
|
|
853
826
|
return config;
|
|
854
827
|
}
|
|
855
828
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -959,4 +932,4 @@ withDefaultLuvio((luvio) => {
|
|
|
959
932
|
});
|
|
960
933
|
|
|
961
934
|
export { createAsset, getStarterTemplateById, getStarterTemplateById_imperative, getStarterTemplates, getStarterTemplates_imperative };
|
|
962
|
-
// version: 1.
|
|
935
|
+
// version: 1.216.0-1d57d45fe
|