@salesforce/lds-adapters-experience-model 1.430.0 → 1.432.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.
@@ -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,
@@ -267,7 +323,7 @@ function ingestError$6(luvio, params, error, snapshotRefresh) {
267
323
  function createResourceRequest$6(config) {
268
324
  const headers = {};
269
325
  return {
270
- baseUri: '/services/data/v67.0',
326
+ baseUri: '/services/data/v68.0',
271
327
  basePath: '/connect/experience-model/block-types',
272
328
  method: 'get',
273
329
  body: null,
@@ -540,7 +596,7 @@ function ingestError$5(luvio, params, error, snapshotRefresh) {
540
596
  function createResourceRequest$5(config) {
541
597
  const headers = {};
542
598
  return {
543
- baseUri: '/services/data/v67.0',
599
+ baseUri: '/services/data/v68.0',
544
600
  basePath: '/connect/experience-model/block-types/' + config.urlParams.fullyQualifiedName + '',
545
601
  method: 'get',
546
602
  body: null,
@@ -820,7 +876,7 @@ function ingestError$4(luvio, params, error, snapshotRefresh) {
820
876
  function createResourceRequest$4(config) {
821
877
  const headers = {};
822
878
  return {
823
- baseUri: '/services/data/v67.0',
879
+ baseUri: '/services/data/v68.0',
824
880
  basePath: '/connect/experience-model/content-types',
825
881
  method: 'get',
826
882
  body: null,
@@ -1077,7 +1133,7 @@ function ingestError$3(luvio, params, error, snapshotRefresh) {
1077
1133
  function createResourceRequest$3(config) {
1078
1134
  const headers = {};
1079
1135
  return {
1080
- baseUri: '/services/data/v67.0',
1136
+ baseUri: '/services/data/v68.0',
1081
1137
  basePath: '/connect/experience-model/content-types/' + config.urlParams.fullyQualifiedName + '',
1082
1138
  method: 'get',
1083
1139
  body: null,
@@ -1355,7 +1411,7 @@ function ingestError$2(luvio, params, error, snapshotRefresh) {
1355
1411
  function createResourceRequest$2(config) {
1356
1412
  const headers = {};
1357
1413
  return {
1358
- baseUri: '/services/data/v67.0',
1414
+ baseUri: '/services/data/v68.0',
1359
1415
  basePath: '/connect/experience-model/property-types',
1360
1416
  method: 'get',
1361
1417
  body: null,
@@ -1607,7 +1663,7 @@ function ingestError$1(luvio, params, error, snapshotRefresh) {
1607
1663
  function createResourceRequest$1(config) {
1608
1664
  const headers = {};
1609
1665
  return {
1610
- baseUri: '/services/data/v67.0',
1666
+ baseUri: '/services/data/v68.0',
1611
1667
  basePath: '/connect/experience-model/property-types/' + config.urlParams.fullyQualifiedName + '',
1612
1668
  method: 'get',
1613
1669
  body: null,
@@ -1832,6 +1888,29 @@ function validate$5(obj, path = 'ExperienceModelSchemaConfigInputRepresentation'
1832
1888
  return new TypeError(message);
1833
1889
  }
1834
1890
  }
1891
+ if (obj.jsonType !== undefined) {
1892
+ const obj_jsonType = obj.jsonType;
1893
+ const path_jsonType = path + '.jsonType';
1894
+ if (typeof obj_jsonType !== 'string') {
1895
+ return new TypeError('Expected "string" but received "' + typeof obj_jsonType + '" (at "' + path_jsonType + '")');
1896
+ }
1897
+ }
1898
+ if (obj.schemaJson !== undefined) {
1899
+ const obj_schemaJson = obj.schemaJson;
1900
+ const path_schemaJson = path + '.schemaJson';
1901
+ if (typeof obj_schemaJson !== 'object' || ArrayIsArray(obj_schemaJson) || obj_schemaJson === null) {
1902
+ return new TypeError('Expected "object" but received "' + typeof obj_schemaJson + '" (at "' + path_schemaJson + '")');
1903
+ }
1904
+ const obj_schemaJson_keys = ObjectKeys(obj_schemaJson);
1905
+ for (let i = 0; i < obj_schemaJson_keys.length; i++) {
1906
+ const key = obj_schemaJson_keys[i];
1907
+ const obj_schemaJson_prop = obj_schemaJson[key];
1908
+ const path_schemaJson_prop = path_schemaJson + '["' + key + '"]';
1909
+ if (typeof obj_schemaJson_prop !== 'object' || ArrayIsArray(obj_schemaJson_prop) || obj_schemaJson_prop === null) {
1910
+ return new TypeError('Expected "object" but received "' + typeof obj_schemaJson_prop + '" (at "' + path_schemaJson_prop + '")');
1911
+ }
1912
+ }
1913
+ }
1835
1914
  if (obj.subSchemaDefinitions !== undefined) {
1836
1915
  const obj_subSchemaDefinitions = obj.subSchemaDefinitions;
1837
1916
  const path_subSchemaDefinitions = path + '.subSchemaDefinitions';
@@ -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.subSchemaDefinitions) === undefined ? 'typeConfigs.schemaConfig.subSchemaDefinitions' : 'typeConfigs.schemaConfig.subSchemaDefinitions:' + ((_1 = element.schemaConfig) === null || _1 === void 0 ? void 0 : _1.subSchemaDefinitions)) + '::' + (((_2 = element.sourceDescriptor) === null || _2 === void 0 ? void 0 : _2.descriptor) === undefined ? 'typeConfigs.sourceDescriptor.descriptor' : 'typeConfigs.sourceDescriptor.descriptor:' + ((_3 = element.sourceDescriptor) === null || _3 === void 0 ? void 0 : _3.descriptor)) + '::' + (((_4 = element.sourceDescriptor) === null || _4 === void 0 ? void 0 : _4.propertyName) === undefined ? 'typeConfigs.sourceDescriptor.propertyName' : 'typeConfigs.sourceDescriptor.propertyName:' + ((_5 = element.sourceDescriptor) === null || _5 === void 0 ? void 0 : _5.propertyName)); }).join(',') + ']' + ')';
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.jsonType) === undefined ? 'typeConfigs.schemaConfig.jsonType' : 'typeConfigs.schemaConfig.jsonType:' + ((_1 = element.schemaConfig) === null || _1 === void 0 ? void 0 : _1.jsonType)) + '::' + stableJSONStringify((_2 = element.schemaConfig) === null || _2 === void 0 ? void 0 : _2.schemaJson) + '::' + (((_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));
@@ -2133,7 +2212,7 @@ function ingestError(luvio, params, error, snapshotRefresh) {
2133
2212
  function createResourceRequest(config) {
2134
2213
  const headers = {};
2135
2214
  return {
2136
- baseUri: '/services/data/v67.0',
2215
+ baseUri: '/services/data/v68.0',
2137
2216
  basePath: '/connect/experience-model/types',
2138
2217
  method: 'post',
2139
2218
  body: config.body,
@@ -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 = "778e400ab1efc3dd0ccd9f38bcdd8865";
3
+ export declare const VERSION = "4bf23b8f5337047c918de886d1838be7";
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,6 +16,12 @@ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableSto
16
16
  */
17
17
  export interface ExperienceModelSchemaConfigInputRepresentationNormalized {
18
18
  filterConfig?: ExperienceModelFilterConfigInputRepresentation_ExperienceModelFilterConfigInputRepresentation;
19
+ /** Type of schema JSON being provided (INTERNAL USE ONLY) */
20
+ jsonType?: string;
21
+ /** Raw schema JSON for transient type registration (INTERNAL USE ONLY) */
22
+ schemaJson?: {
23
+ [key: string]: {};
24
+ };
19
25
  /** Boolean property if sub-schema should be included */
20
26
  subSchemaDefinitions?: boolean;
21
27
  }
@@ -27,5 +33,9 @@ export interface ExperienceModelSchemaConfigInputRepresentationNormalized {
27
33
  */
28
34
  export interface ExperienceModelSchemaConfigInputRepresentation {
29
35
  filterConfig?: ExperienceModelFilterConfigInputRepresentation_ExperienceModelFilterConfigInputRepresentation;
36
+ jsonType?: string;
37
+ schemaJson?: {
38
+ [key: string]: {};
39
+ };
30
40
  subSchemaDefinitions?: boolean;
31
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-experience-model",
3
- "version": "1.430.0",
3
+ "version": "1.432.0",
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.430.0"
47
+ "@salesforce/lds-bindings": "^1.432.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@salesforce/lds-compiler-plugins": "^1.430.0",
51
- "@salesforce/lds-karma": "^1.430.0"
50
+ "@salesforce/lds-compiler-plugins": "^1.432.0",
51
+ "@salesforce/lds-karma": "^1.432.0"
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,
@@ -258,7 +314,7 @@ function ingestError$6(luvio, params, error, snapshotRefresh) {
258
314
  function createResourceRequest$6(config) {
259
315
  const headers = {};
260
316
  return {
261
- baseUri: '/services/data/v67.0',
317
+ baseUri: '/services/data/v68.0',
262
318
  basePath: '/connect/experience-model/block-types/' + config.urlParams.fullyQualifiedName + '',
263
319
  method: 'get',
264
320
  body: null,
@@ -546,7 +602,7 @@ function ingestError$5(luvio, params, error, snapshotRefresh) {
546
602
  function createResourceRequest$5(config) {
547
603
  const headers = {};
548
604
  return {
549
- baseUri: '/services/data/v67.0',
605
+ baseUri: '/services/data/v68.0',
550
606
  basePath: '/connect/experience-model/block-types',
551
607
  method: 'get',
552
608
  body: null,
@@ -803,7 +859,7 @@ function ingestError$4(luvio, params, error, snapshotRefresh) {
803
859
  function createResourceRequest$4(config) {
804
860
  const headers = {};
805
861
  return {
806
- baseUri: '/services/data/v67.0',
862
+ baseUri: '/services/data/v68.0',
807
863
  basePath: '/connect/experience-model/content-types/' + config.urlParams.fullyQualifiedName + '',
808
864
  method: 'get',
809
865
  body: null,
@@ -1083,7 +1139,7 @@ function ingestError$3(luvio, params, error, snapshotRefresh) {
1083
1139
  function createResourceRequest$3(config) {
1084
1140
  const headers = {};
1085
1141
  return {
1086
- baseUri: '/services/data/v67.0',
1142
+ baseUri: '/services/data/v68.0',
1087
1143
  basePath: '/connect/experience-model/content-types',
1088
1144
  method: 'get',
1089
1145
  body: null,
@@ -1338,7 +1394,7 @@ function ingestError$2(luvio, params, error, snapshotRefresh) {
1338
1394
  function createResourceRequest$2(config) {
1339
1395
  const headers = {};
1340
1396
  return {
1341
- baseUri: '/services/data/v67.0',
1397
+ baseUri: '/services/data/v68.0',
1342
1398
  basePath: '/connect/experience-model/property-types/' + config.urlParams.fullyQualifiedName + '',
1343
1399
  method: 'get',
1344
1400
  body: null,
@@ -1616,7 +1672,7 @@ function ingestError$1(luvio, params, error, snapshotRefresh) {
1616
1672
  function createResourceRequest$1(config) {
1617
1673
  const headers = {};
1618
1674
  return {
1619
- baseUri: '/services/data/v67.0',
1675
+ baseUri: '/services/data/v68.0',
1620
1676
  basePath: '/connect/experience-model/property-types',
1621
1677
  method: 'get',
1622
1678
  body: null,
@@ -1842,6 +1898,29 @@ function validate$5(obj, path = 'ExperienceModelSchemaConfigInputRepresentation'
1842
1898
  return new TypeError(message);
1843
1899
  }
1844
1900
  }
1901
+ if (obj.jsonType !== undefined) {
1902
+ const obj_jsonType = obj.jsonType;
1903
+ const path_jsonType = path + '.jsonType';
1904
+ if (typeof obj_jsonType !== 'string') {
1905
+ return new TypeError('Expected "string" but received "' + typeof obj_jsonType + '" (at "' + path_jsonType + '")');
1906
+ }
1907
+ }
1908
+ if (obj.schemaJson !== undefined) {
1909
+ const obj_schemaJson = obj.schemaJson;
1910
+ const path_schemaJson = path + '.schemaJson';
1911
+ if (typeof obj_schemaJson !== 'object' || ArrayIsArray(obj_schemaJson) || obj_schemaJson === null) {
1912
+ return new TypeError('Expected "object" but received "' + typeof obj_schemaJson + '" (at "' + path_schemaJson + '")');
1913
+ }
1914
+ const obj_schemaJson_keys = ObjectKeys(obj_schemaJson);
1915
+ for (let i = 0; i < obj_schemaJson_keys.length; i++) {
1916
+ const key = obj_schemaJson_keys[i];
1917
+ const obj_schemaJson_prop = obj_schemaJson[key];
1918
+ const path_schemaJson_prop = path_schemaJson + '["' + key + '"]';
1919
+ if (typeof obj_schemaJson_prop !== 'object' || ArrayIsArray(obj_schemaJson_prop) || obj_schemaJson_prop === null) {
1920
+ return new TypeError('Expected "object" but received "' + typeof obj_schemaJson_prop + '" (at "' + path_schemaJson_prop + '")');
1921
+ }
1922
+ }
1923
+ }
1845
1924
  if (obj.subSchemaDefinitions !== undefined) {
1846
1925
  const obj_subSchemaDefinitions = obj.subSchemaDefinitions;
1847
1926
  const path_subSchemaDefinitions = path + '.subSchemaDefinitions';
@@ -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?.jsonType === undefined ? 'typeConfigs.schemaConfig.jsonType' : 'typeConfigs.schemaConfig.jsonType:' + element.schemaConfig?.jsonType) + '::' + stableJSONStringify(element.schemaConfig?.schemaJson) + '::' + (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));
@@ -2143,7 +2222,7 @@ function ingestError(luvio, params, error, snapshotRefresh) {
2143
2222
  function createResourceRequest(config) {
2144
2223
  const headers = {};
2145
2224
  return {
2146
- baseUri: '/services/data/v67.0',
2225
+ baseUri: '/services/data/v68.0',
2147
2226
  basePath: '/connect/experience-model/types',
2148
2227
  method: 'post',
2149
2228
  body: config.body,
@@ -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.430.0-8e6a3c46ce
2423
+ // version: 1.432.0-b99ba9d219
package/src/raml/api.raml CHANGED
@@ -6,7 +6,7 @@ version: '56.0'
6
6
  mediaType: application/json
7
7
  protocols:
8
8
  - https
9
- baseUri: /services/data/v67.0
9
+ baseUri: /services/data/v68.0
10
10
  securitySchemes:
11
11
  OAuth2:
12
12
  type: OAuth 2.0
@@ -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
+ jsonType:
425
+ description: Type of schema JSON being provided (INTERNAL USE ONLY)
426
+ type: string
427
+ required: false
428
+ enum:
429
+ - AgentScript
430
+ - TypeSystemSchema
431
+ schemaJson:
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
@@ -55,7 +55,11 @@ types:
55
55
  {
56
56
  "descriptor": "copilotActionOutput/exp_builder__backgroundImage",
57
57
  "schemaConfig": {
58
- "subSchemaDefinitions": true
58
+ "subSchemaDefinitions": true,
59
+ "jsonType": "TypeSystemSchema",
60
+ "schemaJson": {
61
+ "$schema": "https://example.com/schema"
62
+ }
59
63
  },
60
64
  "designConfig": {},
61
65
  "renditionConfig": {}