@salesforce/lds-adapters-experience-model 1.428.0-dev3 → 1.428.0-dev5
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.
|
@@ -8,6 +8,7 @@ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCa
|
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
11
|
+
const { stringify: JSONStringify$1 } = JSON;
|
|
11
12
|
const { isArray: ArrayIsArray$1 } = Array;
|
|
12
13
|
/**
|
|
13
14
|
* Validates an adapter config is well-formed.
|
|
@@ -48,6 +49,61 @@ const snapshotRefreshOptions = {
|
|
|
48
49
|
},
|
|
49
50
|
}
|
|
50
51
|
};
|
|
52
|
+
/**
|
|
53
|
+
* A deterministic JSON stringify implementation. Heavily adapted from https://github.com/epoberezkin/fast-json-stable-stringify.
|
|
54
|
+
* This is needed because insertion order for JSON.stringify(object) affects output:
|
|
55
|
+
* JSON.stringify({a: 1, b: 2})
|
|
56
|
+
* "{"a":1,"b":2}"
|
|
57
|
+
* JSON.stringify({b: 2, a: 1})
|
|
58
|
+
* "{"b":2,"a":1}"
|
|
59
|
+
* @param data Data to be JSON-stringified.
|
|
60
|
+
* @returns JSON.stringified value with consistent ordering of keys.
|
|
61
|
+
*/
|
|
62
|
+
function stableJSONStringify(node) {
|
|
63
|
+
// This is for Date values.
|
|
64
|
+
if (node && node.toJSON && typeof node.toJSON === 'function') {
|
|
65
|
+
// eslint-disable-next-line no-param-reassign
|
|
66
|
+
node = node.toJSON();
|
|
67
|
+
}
|
|
68
|
+
if (node === undefined) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
if (typeof node === 'number') {
|
|
72
|
+
return isFinite(node) ? '' + node : 'null';
|
|
73
|
+
}
|
|
74
|
+
if (typeof node !== 'object') {
|
|
75
|
+
return JSONStringify$1(node);
|
|
76
|
+
}
|
|
77
|
+
let i;
|
|
78
|
+
let out;
|
|
79
|
+
if (ArrayIsArray$1(node)) {
|
|
80
|
+
out = '[';
|
|
81
|
+
for (i = 0; i < node.length; i++) {
|
|
82
|
+
if (i) {
|
|
83
|
+
out += ',';
|
|
84
|
+
}
|
|
85
|
+
out += stableJSONStringify(node[i]) || 'null';
|
|
86
|
+
}
|
|
87
|
+
return out + ']';
|
|
88
|
+
}
|
|
89
|
+
if (node === null) {
|
|
90
|
+
return 'null';
|
|
91
|
+
}
|
|
92
|
+
const keys = ObjectKeys$1(node).sort();
|
|
93
|
+
out = '';
|
|
94
|
+
for (i = 0; i < keys.length; i++) {
|
|
95
|
+
const key = keys[i];
|
|
96
|
+
const value = stableJSONStringify(node[key]);
|
|
97
|
+
if (!value) {
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
if (out) {
|
|
101
|
+
out += ',';
|
|
102
|
+
}
|
|
103
|
+
out += JSONStringify$1(key) + ':' + value;
|
|
104
|
+
}
|
|
105
|
+
return '{' + out + '}';
|
|
106
|
+
}
|
|
51
107
|
function generateParamConfigMetadata(name, required, resourceType, typeCheckShape, isArrayShape = false, coerceFn) {
|
|
52
108
|
return {
|
|
53
109
|
name,
|
|
@@ -1832,6 +1888,22 @@ function validate$5(obj, path = 'ExperienceModelSchemaConfigInputRepresentation'
|
|
|
1832
1888
|
return new TypeError(message);
|
|
1833
1889
|
}
|
|
1834
1890
|
}
|
|
1891
|
+
if (obj.schema !== undefined) {
|
|
1892
|
+
const obj_schema = obj.schema;
|
|
1893
|
+
const path_schema = path + '.schema';
|
|
1894
|
+
if (typeof obj_schema !== 'object' || ArrayIsArray(obj_schema) || obj_schema === null) {
|
|
1895
|
+
return new TypeError('Expected "object" but received "' + typeof obj_schema + '" (at "' + path_schema + '")');
|
|
1896
|
+
}
|
|
1897
|
+
const obj_schema_keys = ObjectKeys(obj_schema);
|
|
1898
|
+
for (let i = 0; i < obj_schema_keys.length; i++) {
|
|
1899
|
+
const key = obj_schema_keys[i];
|
|
1900
|
+
const obj_schema_prop = obj_schema[key];
|
|
1901
|
+
const path_schema_prop = path_schema + '["' + key + '"]';
|
|
1902
|
+
if (typeof obj_schema_prop !== 'object' || ArrayIsArray(obj_schema_prop) || obj_schema_prop === null) {
|
|
1903
|
+
return new TypeError('Expected "object" but received "' + typeof obj_schema_prop + '" (at "' + path_schema_prop + '")');
|
|
1904
|
+
}
|
|
1905
|
+
}
|
|
1906
|
+
}
|
|
1835
1907
|
if (obj.subSchemaDefinitions !== undefined) {
|
|
1836
1908
|
const obj_subSchemaDefinitions = obj.subSchemaDefinitions;
|
|
1837
1909
|
const path_subSchemaDefinitions = path + '.subSchemaDefinitions';
|
|
@@ -1839,6 +1911,13 @@ function validate$5(obj, path = 'ExperienceModelSchemaConfigInputRepresentation'
|
|
|
1839
1911
|
return new TypeError('Expected "boolean" but received "' + typeof obj_subSchemaDefinitions + '" (at "' + path_subSchemaDefinitions + '")');
|
|
1840
1912
|
}
|
|
1841
1913
|
}
|
|
1914
|
+
if (obj.type !== undefined) {
|
|
1915
|
+
const obj_type = obj.type;
|
|
1916
|
+
const path_type = path + '.type';
|
|
1917
|
+
if (typeof obj_type !== 'string') {
|
|
1918
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
1919
|
+
}
|
|
1920
|
+
}
|
|
1842
1921
|
})();
|
|
1843
1922
|
return v_error === undefined ? null : v_error;
|
|
1844
1923
|
}
|
|
@@ -2096,7 +2175,7 @@ function select(luvio, params) {
|
|
|
2096
2175
|
return select$1();
|
|
2097
2176
|
}
|
|
2098
2177
|
function keyBuilder$1(luvio, params) {
|
|
2099
|
-
return keyPrefix + '::ExperienceModelTypesCollectionRepresentation:(' + 'language:' + params.body.language + '::' + '[' + params.body.typeConfigs.map(element => { var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5; return 'typeConfigs.descriptor:' + element.descriptor + '::' + (((_a = element.designConfig) === null || _a === void 0 ? void 0 : _a.target) === undefined ? 'typeConfigs.designConfig.target' : 'typeConfigs.designConfig.target:' + ((_b = element.designConfig) === null || _b === void 0 ? void 0 : _b.target)) + '::' + (((_c = element.designConfig) === null || _c === void 0 ? void 0 : _c.subViewDefinitions) === undefined ? 'typeConfigs.designConfig.subViewDefinitions' : 'typeConfigs.designConfig.subViewDefinitions:' + ((_d = element.designConfig) === null || _d === void 0 ? void 0 : _d.subViewDefinitions)) + '::' + (((_e = element.designConfig) === null || _e === void 0 ? void 0 : _e.maxViewDepth) === undefined ? 'typeConfigs.designConfig.maxViewDepth' : 'typeConfigs.designConfig.maxViewDepth:' + ((_f = element.designConfig) === null || _f === void 0 ? void 0 : _f.maxViewDepth)) + '::' + (((_g = element.designConfig) === null || _g === void 0 ? void 0 : _g.actionConfig) === undefined ? 'typeConfigs.designConfig.actionConfig' : 'typeConfigs.designConfig.actionConfig:' + ((_h = element.designConfig) === null || _h === void 0 ? void 0 : _h.actionConfig)) + '::' + (((_j = element.designConfig) === null || _j === void 0 ? void 0 : _j.forceDefaultGeneration) === undefined ? 'typeConfigs.designConfig.forceDefaultGeneration' : 'typeConfigs.designConfig.forceDefaultGeneration:' + ((_k = element.designConfig) === null || _k === void 0 ? void 0 : _k.forceDefaultGeneration)) + '::' + (((_l = element.renditionConfig) === null || _l === void 0 ? void 0 : _l.target) === undefined ? 'typeConfigs.renditionConfig.target' : 'typeConfigs.renditionConfig.target:' + ((_m = element.renditionConfig) === null || _m === void 0 ? void 0 : _m.target)) + '::' + (((_o = element.renditionConfig) === null || _o === void 0 ? void 0 : _o.subViewDefinitions) === undefined ? 'typeConfigs.renditionConfig.subViewDefinitions' : 'typeConfigs.renditionConfig.subViewDefinitions:' + ((_p = element.renditionConfig) === null || _p === void 0 ? void 0 : _p.subViewDefinitions)) + '::' + (((_q = element.renditionConfig) === null || _q === void 0 ? void 0 : _q.maxViewDepth) === undefined ? 'typeConfigs.renditionConfig.maxViewDepth' : 'typeConfigs.renditionConfig.maxViewDepth:' + ((_r = element.renditionConfig) === null || _r === void 0 ? void 0 : _r.maxViewDepth)) + '::' + (((_s = element.renditionConfig) === null || _s === void 0 ? void 0 : _s.actionConfig) === undefined ? 'typeConfigs.renditionConfig.actionConfig' : 'typeConfigs.renditionConfig.actionConfig:' + ((_t = element.renditionConfig) === null || _t === void 0 ? void 0 : _t.actionConfig)) + '::' + (((_u = element.renditionConfig) === null || _u === void 0 ? void 0 : _u.forceDefaultGeneration) === undefined ? 'typeConfigs.renditionConfig.forceDefaultGeneration' : 'typeConfigs.renditionConfig.forceDefaultGeneration:' + ((_v = element.renditionConfig) === null || _v === void 0 ? void 0 : _v.forceDefaultGeneration)) + '::' + (((_x = (_w = element.schemaConfig) === null || _w === void 0 ? void 0 : _w.filterConfig) === null || _x === void 0 ? void 0 : _x.propertyNames) === undefined ? 'typeConfigs.schemaConfig.filterConfig.propertyNames' : 'typeConfigs.schemaConfig.filterConfig.propertyNames:' + ((_z = (_y = element.schemaConfig) === null || _y === void 0 ? void 0 : _y.filterConfig) === null || _z === void 0 ? void 0 : _z.propertyNames)) + '::' + (((_0 = element.schemaConfig) === null || _0 === void 0 ? void 0 : _0.
|
|
2178
|
+
return keyPrefix + '::ExperienceModelTypesCollectionRepresentation:(' + 'language:' + params.body.language + '::' + '[' + params.body.typeConfigs.map(element => { var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8; return 'typeConfigs.descriptor:' + element.descriptor + '::' + (((_a = element.designConfig) === null || _a === void 0 ? void 0 : _a.target) === undefined ? 'typeConfigs.designConfig.target' : 'typeConfigs.designConfig.target:' + ((_b = element.designConfig) === null || _b === void 0 ? void 0 : _b.target)) + '::' + (((_c = element.designConfig) === null || _c === void 0 ? void 0 : _c.subViewDefinitions) === undefined ? 'typeConfigs.designConfig.subViewDefinitions' : 'typeConfigs.designConfig.subViewDefinitions:' + ((_d = element.designConfig) === null || _d === void 0 ? void 0 : _d.subViewDefinitions)) + '::' + (((_e = element.designConfig) === null || _e === void 0 ? void 0 : _e.maxViewDepth) === undefined ? 'typeConfigs.designConfig.maxViewDepth' : 'typeConfigs.designConfig.maxViewDepth:' + ((_f = element.designConfig) === null || _f === void 0 ? void 0 : _f.maxViewDepth)) + '::' + (((_g = element.designConfig) === null || _g === void 0 ? void 0 : _g.actionConfig) === undefined ? 'typeConfigs.designConfig.actionConfig' : 'typeConfigs.designConfig.actionConfig:' + ((_h = element.designConfig) === null || _h === void 0 ? void 0 : _h.actionConfig)) + '::' + (((_j = element.designConfig) === null || _j === void 0 ? void 0 : _j.forceDefaultGeneration) === undefined ? 'typeConfigs.designConfig.forceDefaultGeneration' : 'typeConfigs.designConfig.forceDefaultGeneration:' + ((_k = element.designConfig) === null || _k === void 0 ? void 0 : _k.forceDefaultGeneration)) + '::' + (((_l = element.renditionConfig) === null || _l === void 0 ? void 0 : _l.target) === undefined ? 'typeConfigs.renditionConfig.target' : 'typeConfigs.renditionConfig.target:' + ((_m = element.renditionConfig) === null || _m === void 0 ? void 0 : _m.target)) + '::' + (((_o = element.renditionConfig) === null || _o === void 0 ? void 0 : _o.subViewDefinitions) === undefined ? 'typeConfigs.renditionConfig.subViewDefinitions' : 'typeConfigs.renditionConfig.subViewDefinitions:' + ((_p = element.renditionConfig) === null || _p === void 0 ? void 0 : _p.subViewDefinitions)) + '::' + (((_q = element.renditionConfig) === null || _q === void 0 ? void 0 : _q.maxViewDepth) === undefined ? 'typeConfigs.renditionConfig.maxViewDepth' : 'typeConfigs.renditionConfig.maxViewDepth:' + ((_r = element.renditionConfig) === null || _r === void 0 ? void 0 : _r.maxViewDepth)) + '::' + (((_s = element.renditionConfig) === null || _s === void 0 ? void 0 : _s.actionConfig) === undefined ? 'typeConfigs.renditionConfig.actionConfig' : 'typeConfigs.renditionConfig.actionConfig:' + ((_t = element.renditionConfig) === null || _t === void 0 ? void 0 : _t.actionConfig)) + '::' + (((_u = element.renditionConfig) === null || _u === void 0 ? void 0 : _u.forceDefaultGeneration) === undefined ? 'typeConfigs.renditionConfig.forceDefaultGeneration' : 'typeConfigs.renditionConfig.forceDefaultGeneration:' + ((_v = element.renditionConfig) === null || _v === void 0 ? void 0 : _v.forceDefaultGeneration)) + '::' + (((_x = (_w = element.schemaConfig) === null || _w === void 0 ? void 0 : _w.filterConfig) === null || _x === void 0 ? void 0 : _x.propertyNames) === undefined ? 'typeConfigs.schemaConfig.filterConfig.propertyNames' : 'typeConfigs.schemaConfig.filterConfig.propertyNames:' + ((_z = (_y = element.schemaConfig) === null || _y === void 0 ? void 0 : _y.filterConfig) === null || _z === void 0 ? void 0 : _z.propertyNames)) + '::' + (((_0 = element.schemaConfig) === null || _0 === void 0 ? void 0 : _0.type) === undefined ? 'typeConfigs.schemaConfig.type' : 'typeConfigs.schemaConfig.type:' + ((_1 = element.schemaConfig) === null || _1 === void 0 ? void 0 : _1.type)) + '::' + stableJSONStringify((_2 = element.schemaConfig) === null || _2 === void 0 ? void 0 : _2.schema) + '::' + (((_3 = element.schemaConfig) === null || _3 === void 0 ? void 0 : _3.subSchemaDefinitions) === undefined ? 'typeConfigs.schemaConfig.subSchemaDefinitions' : 'typeConfigs.schemaConfig.subSchemaDefinitions:' + ((_4 = element.schemaConfig) === null || _4 === void 0 ? void 0 : _4.subSchemaDefinitions)) + '::' + (((_5 = element.sourceDescriptor) === null || _5 === void 0 ? void 0 : _5.descriptor) === undefined ? 'typeConfigs.sourceDescriptor.descriptor' : 'typeConfigs.sourceDescriptor.descriptor:' + ((_6 = element.sourceDescriptor) === null || _6 === void 0 ? void 0 : _6.descriptor)) + '::' + (((_7 = element.sourceDescriptor) === null || _7 === void 0 ? void 0 : _7.propertyName) === undefined ? 'typeConfigs.sourceDescriptor.propertyName' : 'typeConfigs.sourceDescriptor.propertyName:' + ((_8 = element.sourceDescriptor) === null || _8 === void 0 ? void 0 : _8.propertyName)); }).join(',') + ']' + ')';
|
|
2100
2179
|
}
|
|
2101
2180
|
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
2102
2181
|
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
package/dist/es/es2018/types/src/generated/types/ExperienceModelSchemaConfigInputRepresentation.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExperienceModelFilterConfigInputRepresentation as ExperienceModelFilterConfigInputRepresentation_ExperienceModelFilterConfigInputRepresentation } from './ExperienceModelFilterConfigInputRepresentation';
|
|
2
2
|
import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
|
|
3
|
-
export declare const VERSION = "
|
|
3
|
+
export declare const VERSION = "d971237b9151c6b726bbd39a7c9c2a35";
|
|
4
4
|
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
5
5
|
export declare const RepresentationType: string;
|
|
6
6
|
export declare function normalize(input: ExperienceModelSchemaConfigInputRepresentation, existing: ExperienceModelSchemaConfigInputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): ExperienceModelSchemaConfigInputRepresentationNormalized;
|
|
@@ -16,8 +16,14 @@ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableSto
|
|
|
16
16
|
*/
|
|
17
17
|
export interface ExperienceModelSchemaConfigInputRepresentationNormalized {
|
|
18
18
|
filterConfig?: ExperienceModelFilterConfigInputRepresentation_ExperienceModelFilterConfigInputRepresentation;
|
|
19
|
+
/** Raw schema JSON for transient type registration (INTERNAL USE ONLY) */
|
|
20
|
+
schema?: {
|
|
21
|
+
[key: string]: {};
|
|
22
|
+
};
|
|
19
23
|
/** Boolean property if sub-schema should be included */
|
|
20
24
|
subSchemaDefinitions?: boolean;
|
|
25
|
+
/** Type of schema JSON being provided (INTERNAL USE ONLY) */
|
|
26
|
+
type?: string;
|
|
21
27
|
}
|
|
22
28
|
/**
|
|
23
29
|
* Input Representation for Experience Model type schema configuration
|
|
@@ -27,5 +33,9 @@ export interface ExperienceModelSchemaConfigInputRepresentationNormalized {
|
|
|
27
33
|
*/
|
|
28
34
|
export interface ExperienceModelSchemaConfigInputRepresentation {
|
|
29
35
|
filterConfig?: ExperienceModelFilterConfigInputRepresentation_ExperienceModelFilterConfigInputRepresentation;
|
|
36
|
+
schema?: {
|
|
37
|
+
[key: string]: {};
|
|
38
|
+
};
|
|
30
39
|
subSchemaDefinitions?: boolean;
|
|
40
|
+
type?: string;
|
|
31
41
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-experience-model",
|
|
3
|
-
"version": "1.428.0-
|
|
3
|
+
"version": "1.428.0-dev5",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "APIs to read and query all the 'types' in the Unified Experience Model",
|
|
6
6
|
"main": "dist/es/es2018/experience-model.js",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"test:unit": "jest"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@salesforce/lds-bindings": "^1.428.0-
|
|
47
|
+
"@salesforce/lds-bindings": "^1.428.0-dev5"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@salesforce/lds-compiler-plugins": "^1.428.0-
|
|
51
|
-
"@salesforce/lds-karma": "^1.428.0-
|
|
50
|
+
"@salesforce/lds-compiler-plugins": "^1.428.0-dev5",
|
|
51
|
+
"@salesforce/lds-karma": "^1.428.0-dev5"
|
|
52
52
|
},
|
|
53
53
|
"nx": {
|
|
54
54
|
"targets": {
|
package/sfdc/index.js
CHANGED
|
@@ -18,6 +18,7 @@ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCa
|
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
20
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
21
|
+
const { stringify: JSONStringify$1 } = JSON;
|
|
21
22
|
const { isArray: ArrayIsArray$1 } = Array;
|
|
22
23
|
/**
|
|
23
24
|
* Validates an adapter config is well-formed.
|
|
@@ -58,6 +59,61 @@ const snapshotRefreshOptions = {
|
|
|
58
59
|
},
|
|
59
60
|
}
|
|
60
61
|
};
|
|
62
|
+
/**
|
|
63
|
+
* A deterministic JSON stringify implementation. Heavily adapted from https://github.com/epoberezkin/fast-json-stable-stringify.
|
|
64
|
+
* This is needed because insertion order for JSON.stringify(object) affects output:
|
|
65
|
+
* JSON.stringify({a: 1, b: 2})
|
|
66
|
+
* "{"a":1,"b":2}"
|
|
67
|
+
* JSON.stringify({b: 2, a: 1})
|
|
68
|
+
* "{"b":2,"a":1}"
|
|
69
|
+
* @param data Data to be JSON-stringified.
|
|
70
|
+
* @returns JSON.stringified value with consistent ordering of keys.
|
|
71
|
+
*/
|
|
72
|
+
function stableJSONStringify(node) {
|
|
73
|
+
// This is for Date values.
|
|
74
|
+
if (node && node.toJSON && typeof node.toJSON === 'function') {
|
|
75
|
+
// eslint-disable-next-line no-param-reassign
|
|
76
|
+
node = node.toJSON();
|
|
77
|
+
}
|
|
78
|
+
if (node === undefined) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (typeof node === 'number') {
|
|
82
|
+
return isFinite(node) ? '' + node : 'null';
|
|
83
|
+
}
|
|
84
|
+
if (typeof node !== 'object') {
|
|
85
|
+
return JSONStringify$1(node);
|
|
86
|
+
}
|
|
87
|
+
let i;
|
|
88
|
+
let out;
|
|
89
|
+
if (ArrayIsArray$1(node)) {
|
|
90
|
+
out = '[';
|
|
91
|
+
for (i = 0; i < node.length; i++) {
|
|
92
|
+
if (i) {
|
|
93
|
+
out += ',';
|
|
94
|
+
}
|
|
95
|
+
out += stableJSONStringify(node[i]) || 'null';
|
|
96
|
+
}
|
|
97
|
+
return out + ']';
|
|
98
|
+
}
|
|
99
|
+
if (node === null) {
|
|
100
|
+
return 'null';
|
|
101
|
+
}
|
|
102
|
+
const keys = ObjectKeys$1(node).sort();
|
|
103
|
+
out = '';
|
|
104
|
+
for (i = 0; i < keys.length; i++) {
|
|
105
|
+
const key = keys[i];
|
|
106
|
+
const value = stableJSONStringify(node[key]);
|
|
107
|
+
if (!value) {
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
if (out) {
|
|
111
|
+
out += ',';
|
|
112
|
+
}
|
|
113
|
+
out += JSONStringify$1(key) + ':' + value;
|
|
114
|
+
}
|
|
115
|
+
return '{' + out + '}';
|
|
116
|
+
}
|
|
61
117
|
function generateParamConfigMetadata(name, required, resourceType, typeCheckShape, isArrayShape = false, coerceFn) {
|
|
62
118
|
return {
|
|
63
119
|
name,
|
|
@@ -1842,6 +1898,22 @@ function validate$5(obj, path = 'ExperienceModelSchemaConfigInputRepresentation'
|
|
|
1842
1898
|
return new TypeError(message);
|
|
1843
1899
|
}
|
|
1844
1900
|
}
|
|
1901
|
+
if (obj.schema !== undefined) {
|
|
1902
|
+
const obj_schema = obj.schema;
|
|
1903
|
+
const path_schema = path + '.schema';
|
|
1904
|
+
if (typeof obj_schema !== 'object' || ArrayIsArray(obj_schema) || obj_schema === null) {
|
|
1905
|
+
return new TypeError('Expected "object" but received "' + typeof obj_schema + '" (at "' + path_schema + '")');
|
|
1906
|
+
}
|
|
1907
|
+
const obj_schema_keys = ObjectKeys(obj_schema);
|
|
1908
|
+
for (let i = 0; i < obj_schema_keys.length; i++) {
|
|
1909
|
+
const key = obj_schema_keys[i];
|
|
1910
|
+
const obj_schema_prop = obj_schema[key];
|
|
1911
|
+
const path_schema_prop = path_schema + '["' + key + '"]';
|
|
1912
|
+
if (typeof obj_schema_prop !== 'object' || ArrayIsArray(obj_schema_prop) || obj_schema_prop === null) {
|
|
1913
|
+
return new TypeError('Expected "object" but received "' + typeof obj_schema_prop + '" (at "' + path_schema_prop + '")');
|
|
1914
|
+
}
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1845
1917
|
if (obj.subSchemaDefinitions !== undefined) {
|
|
1846
1918
|
const obj_subSchemaDefinitions = obj.subSchemaDefinitions;
|
|
1847
1919
|
const path_subSchemaDefinitions = path + '.subSchemaDefinitions';
|
|
@@ -1849,6 +1921,13 @@ function validate$5(obj, path = 'ExperienceModelSchemaConfigInputRepresentation'
|
|
|
1849
1921
|
return new TypeError('Expected "boolean" but received "' + typeof obj_subSchemaDefinitions + '" (at "' + path_subSchemaDefinitions + '")');
|
|
1850
1922
|
}
|
|
1851
1923
|
}
|
|
1924
|
+
if (obj.type !== undefined) {
|
|
1925
|
+
const obj_type = obj.type;
|
|
1926
|
+
const path_type = path + '.type';
|
|
1927
|
+
if (typeof obj_type !== 'string') {
|
|
1928
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
1929
|
+
}
|
|
1930
|
+
}
|
|
1852
1931
|
})();
|
|
1853
1932
|
return v_error === undefined ? null : v_error;
|
|
1854
1933
|
}
|
|
@@ -2106,7 +2185,7 @@ function select(luvio, params) {
|
|
|
2106
2185
|
return select$1();
|
|
2107
2186
|
}
|
|
2108
2187
|
function keyBuilder$1(luvio, params) {
|
|
2109
|
-
return keyPrefix + '::ExperienceModelTypesCollectionRepresentation:(' + 'language:' + params.body.language + '::' + '[' + params.body.typeConfigs.map(element => 'typeConfigs.descriptor:' + element.descriptor + '::' + (element.designConfig?.target === undefined ? 'typeConfigs.designConfig.target' : 'typeConfigs.designConfig.target:' + element.designConfig?.target) + '::' + (element.designConfig?.subViewDefinitions === undefined ? 'typeConfigs.designConfig.subViewDefinitions' : 'typeConfigs.designConfig.subViewDefinitions:' + element.designConfig?.subViewDefinitions) + '::' + (element.designConfig?.maxViewDepth === undefined ? 'typeConfigs.designConfig.maxViewDepth' : 'typeConfigs.designConfig.maxViewDepth:' + element.designConfig?.maxViewDepth) + '::' + (element.designConfig?.actionConfig === undefined ? 'typeConfigs.designConfig.actionConfig' : 'typeConfigs.designConfig.actionConfig:' + element.designConfig?.actionConfig) + '::' + (element.designConfig?.forceDefaultGeneration === undefined ? 'typeConfigs.designConfig.forceDefaultGeneration' : 'typeConfigs.designConfig.forceDefaultGeneration:' + element.designConfig?.forceDefaultGeneration) + '::' + (element.renditionConfig?.target === undefined ? 'typeConfigs.renditionConfig.target' : 'typeConfigs.renditionConfig.target:' + element.renditionConfig?.target) + '::' + (element.renditionConfig?.subViewDefinitions === undefined ? 'typeConfigs.renditionConfig.subViewDefinitions' : 'typeConfigs.renditionConfig.subViewDefinitions:' + element.renditionConfig?.subViewDefinitions) + '::' + (element.renditionConfig?.maxViewDepth === undefined ? 'typeConfigs.renditionConfig.maxViewDepth' : 'typeConfigs.renditionConfig.maxViewDepth:' + element.renditionConfig?.maxViewDepth) + '::' + (element.renditionConfig?.actionConfig === undefined ? 'typeConfigs.renditionConfig.actionConfig' : 'typeConfigs.renditionConfig.actionConfig:' + element.renditionConfig?.actionConfig) + '::' + (element.renditionConfig?.forceDefaultGeneration === undefined ? 'typeConfigs.renditionConfig.forceDefaultGeneration' : 'typeConfigs.renditionConfig.forceDefaultGeneration:' + element.renditionConfig?.forceDefaultGeneration) + '::' + (element.schemaConfig?.filterConfig?.propertyNames === undefined ? 'typeConfigs.schemaConfig.filterConfig.propertyNames' : 'typeConfigs.schemaConfig.filterConfig.propertyNames:' + element.schemaConfig?.filterConfig?.propertyNames) + '::' + (element.schemaConfig?.subSchemaDefinitions === undefined ? 'typeConfigs.schemaConfig.subSchemaDefinitions' : 'typeConfigs.schemaConfig.subSchemaDefinitions:' + element.schemaConfig?.subSchemaDefinitions) + '::' + (element.sourceDescriptor?.descriptor === undefined ? 'typeConfigs.sourceDescriptor.descriptor' : 'typeConfigs.sourceDescriptor.descriptor:' + element.sourceDescriptor?.descriptor) + '::' + (element.sourceDescriptor?.propertyName === undefined ? 'typeConfigs.sourceDescriptor.propertyName' : 'typeConfigs.sourceDescriptor.propertyName:' + element.sourceDescriptor?.propertyName)).join(',') + ']' + ')';
|
|
2188
|
+
return keyPrefix + '::ExperienceModelTypesCollectionRepresentation:(' + 'language:' + params.body.language + '::' + '[' + params.body.typeConfigs.map(element => 'typeConfigs.descriptor:' + element.descriptor + '::' + (element.designConfig?.target === undefined ? 'typeConfigs.designConfig.target' : 'typeConfigs.designConfig.target:' + element.designConfig?.target) + '::' + (element.designConfig?.subViewDefinitions === undefined ? 'typeConfigs.designConfig.subViewDefinitions' : 'typeConfigs.designConfig.subViewDefinitions:' + element.designConfig?.subViewDefinitions) + '::' + (element.designConfig?.maxViewDepth === undefined ? 'typeConfigs.designConfig.maxViewDepth' : 'typeConfigs.designConfig.maxViewDepth:' + element.designConfig?.maxViewDepth) + '::' + (element.designConfig?.actionConfig === undefined ? 'typeConfigs.designConfig.actionConfig' : 'typeConfigs.designConfig.actionConfig:' + element.designConfig?.actionConfig) + '::' + (element.designConfig?.forceDefaultGeneration === undefined ? 'typeConfigs.designConfig.forceDefaultGeneration' : 'typeConfigs.designConfig.forceDefaultGeneration:' + element.designConfig?.forceDefaultGeneration) + '::' + (element.renditionConfig?.target === undefined ? 'typeConfigs.renditionConfig.target' : 'typeConfigs.renditionConfig.target:' + element.renditionConfig?.target) + '::' + (element.renditionConfig?.subViewDefinitions === undefined ? 'typeConfigs.renditionConfig.subViewDefinitions' : 'typeConfigs.renditionConfig.subViewDefinitions:' + element.renditionConfig?.subViewDefinitions) + '::' + (element.renditionConfig?.maxViewDepth === undefined ? 'typeConfigs.renditionConfig.maxViewDepth' : 'typeConfigs.renditionConfig.maxViewDepth:' + element.renditionConfig?.maxViewDepth) + '::' + (element.renditionConfig?.actionConfig === undefined ? 'typeConfigs.renditionConfig.actionConfig' : 'typeConfigs.renditionConfig.actionConfig:' + element.renditionConfig?.actionConfig) + '::' + (element.renditionConfig?.forceDefaultGeneration === undefined ? 'typeConfigs.renditionConfig.forceDefaultGeneration' : 'typeConfigs.renditionConfig.forceDefaultGeneration:' + element.renditionConfig?.forceDefaultGeneration) + '::' + (element.schemaConfig?.filterConfig?.propertyNames === undefined ? 'typeConfigs.schemaConfig.filterConfig.propertyNames' : 'typeConfigs.schemaConfig.filterConfig.propertyNames:' + element.schemaConfig?.filterConfig?.propertyNames) + '::' + (element.schemaConfig?.type === undefined ? 'typeConfigs.schemaConfig.type' : 'typeConfigs.schemaConfig.type:' + element.schemaConfig?.type) + '::' + stableJSONStringify(element.schemaConfig?.schema) + '::' + (element.schemaConfig?.subSchemaDefinitions === undefined ? 'typeConfigs.schemaConfig.subSchemaDefinitions' : 'typeConfigs.schemaConfig.subSchemaDefinitions:' + element.schemaConfig?.subSchemaDefinitions) + '::' + (element.sourceDescriptor?.descriptor === undefined ? 'typeConfigs.sourceDescriptor.descriptor' : 'typeConfigs.sourceDescriptor.descriptor:' + element.sourceDescriptor?.descriptor) + '::' + (element.sourceDescriptor?.propertyName === undefined ? 'typeConfigs.sourceDescriptor.propertyName' : 'typeConfigs.sourceDescriptor.propertyName:' + element.sourceDescriptor?.propertyName)).join(',') + ']' + ')';
|
|
2110
2189
|
}
|
|
2111
2190
|
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
2112
2191
|
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
@@ -2341,4 +2420,4 @@ withDefaultLuvio((luvio) => {
|
|
|
2341
2420
|
});
|
|
2342
2421
|
|
|
2343
2422
|
export { getBlockType, getBlockType_imperative, getBlockTypes, getBlockTypes_imperative, getContentType, getContentType_imperative, getContentTypes, getContentTypes_imperative, getPropertyType, getPropertyType_imperative, getPropertyTypes, getPropertyTypes_imperative, getTypes, getTypes_imperative };
|
|
2344
|
-
// version: 1.428.0-
|
|
2423
|
+
// version: 1.428.0-dev5-c6fe0903b6
|
package/src/raml/api.raml
CHANGED
|
@@ -421,6 +421,20 @@ types:
|
|
|
421
421
|
description: Filter configuration for schema
|
|
422
422
|
type: ExperienceModelFilterConfigInputRepresentation
|
|
423
423
|
required: false # TODO waiting on W-8253396
|
|
424
|
+
type:
|
|
425
|
+
description: Type of schema JSON being provided (INTERNAL USE ONLY)
|
|
426
|
+
type: string
|
|
427
|
+
required: false
|
|
428
|
+
enum:
|
|
429
|
+
- AgentScriptJson
|
|
430
|
+
- TypeSchemaJson
|
|
431
|
+
schema:
|
|
432
|
+
description: Raw schema JSON for transient type registration (INTERNAL USE ONLY)
|
|
433
|
+
type: object
|
|
434
|
+
required: false
|
|
435
|
+
properties:
|
|
436
|
+
//:
|
|
437
|
+
type: object
|
|
424
438
|
subSchemaDefinitions:
|
|
425
439
|
description: Boolean property if sub-schema should be included
|
|
426
440
|
type: boolean
|
package/src/raml/luvio.raml
CHANGED
|
@@ -55,7 +55,11 @@ types:
|
|
|
55
55
|
{
|
|
56
56
|
"descriptor": "copilotActionOutput/exp_builder__backgroundImage",
|
|
57
57
|
"schemaConfig": {
|
|
58
|
-
"subSchemaDefinitions": true
|
|
58
|
+
"subSchemaDefinitions": true,
|
|
59
|
+
"type": "TypeSchemaJson",
|
|
60
|
+
"schema": {
|
|
61
|
+
"$schema": "https://example.com/schema"
|
|
62
|
+
}
|
|
59
63
|
},
|
|
60
64
|
"designConfig": {},
|
|
61
65
|
"renditionConfig": {}
|