@salesforce/lds-adapters-uiapi 1.361.0 → 1.363.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.
@@ -1,6 +1,6 @@
1
1
  import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, ResourceIngest as $64$luvio_engine_ResourceIngest, FragmentSelection as $64$luvio_engine_FragmentSelection, LinkSelection as $64$luvio_engine_LinkSelection, StoreLink as $64$luvio_engine_StoreLink, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
2
2
  import { RecordRepresentation as RecordRepresentation_RecordRepresentation } from './RecordRepresentation';
3
- export declare const VERSION = "195d918987a35f45e1aa4dce9a11d8c5";
3
+ export declare const VERSION = "2738fe8faf98ecd076d7c4df86fd5bf0";
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: FieldValueRepresentation, existing: FieldValueRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FieldValueRepresentationNormalized;
@@ -27,7 +27,7 @@ export interface FieldValueRepresentationNormalized {
27
27
  /** The displayable value for a field. For a date, this will be a value familiar to users rather than an ISO 8601 formatted date value, which is what the raw value would be. Similarly, currency values will also have a formatted display value. For data that can be localized to the context user's language using the toLabel() function, that value will also be displayed here. */
28
28
  displayValue: string | null;
29
29
  /** The value of a field in its raw data form. */
30
- value: $64$luvio_engine_StoreLink | boolean | number | string | null;
30
+ value: $64$luvio_engine_StoreLink | boolean | number | string | Array<string> | null;
31
31
  }
32
32
  /**
33
33
  * Contains both the raw and displayable field values for a field in a Record.
@@ -37,5 +37,5 @@ export interface FieldValueRepresentationNormalized {
37
37
  */
38
38
  export interface FieldValueRepresentation {
39
39
  displayValue: string | null;
40
- value: RecordRepresentation_RecordRepresentation | boolean | number | string | null;
40
+ value: RecordRepresentation_RecordRepresentation | boolean | number | string | Array<string> | null;
41
41
  }
@@ -2,7 +2,7 @@ import type { PathSelection } from '@luvio/engine';
2
2
  import type { RecordFieldTrie } from '../util/records';
3
3
  import type { RecordRepresentation } from '../generated/types/RecordRepresentation';
4
4
  import type { FieldMapRepresentation } from '../util/fields';
5
- export declare function isSpanningRecord(fieldValue: null | string | number | boolean | RecordRepresentation): fieldValue is RecordRepresentation;
5
+ export declare function isSpanningRecord(fieldValue: null | string | string[] | number | boolean | RecordRepresentation): fieldValue is RecordRepresentation;
6
6
  export declare function createRecordSelection(fieldDefinition: RecordFieldTrie): PathSelection[];
7
7
  /**
8
8
  * Convert a list of fields and optional fields into RecordRepresentation its equivalent
@@ -2152,7 +2152,7 @@ function equals$1c(existing, incoming) {
2152
2152
  return true;
2153
2153
  }
2154
2154
 
2155
- const VERSION$2W = "195d918987a35f45e1aa4dce9a11d8c5";
2155
+ const VERSION$2W = "2738fe8faf98ecd076d7c4df86fd5bf0";
2156
2156
  function validate$20(obj, path = 'FieldValueRepresentation') {
2157
2157
  const v_error = (() => {
2158
2158
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -2224,20 +2224,37 @@ function validate$20(obj, path = 'FieldValueRepresentation') {
2224
2224
  }
2225
2225
  let obj_value_union4 = null;
2226
2226
  const obj_value_union4_error = (() => {
2227
- if (obj_value !== null) {
2228
- return new TypeError('Expected "null" but received "' + typeof obj_value + '" (at "' + path_value + '")');
2227
+ if (!ArrayIsArray(obj_value)) {
2228
+ return new TypeError('Expected "array" but received "' + typeof obj_value + '" (at "' + path_value + '")');
2229
+ }
2230
+ for (let i = 0; i < obj_value.length; i++) {
2231
+ const obj_value_item = obj_value[i];
2232
+ const path_value_item = path_value + '[' + i + ']';
2233
+ if (typeof obj_value_item !== 'string') {
2234
+ return new TypeError('Expected "string" but received "' + typeof obj_value_item + '" (at "' + path_value_item + '")');
2235
+ }
2229
2236
  }
2230
2237
  })();
2231
2238
  if (obj_value_union4_error != null) {
2232
2239
  obj_value_union4 = obj_value_union4_error.message;
2233
2240
  }
2234
- if (obj_value_union0 && obj_value_union1 && obj_value_union2 && obj_value_union3 && obj_value_union4) {
2241
+ let obj_value_union5 = null;
2242
+ const obj_value_union5_error = (() => {
2243
+ if (obj_value !== null) {
2244
+ return new TypeError('Expected "null" but received "' + typeof obj_value + '" (at "' + path_value + '")');
2245
+ }
2246
+ })();
2247
+ if (obj_value_union5_error != null) {
2248
+ obj_value_union5 = obj_value_union5_error.message;
2249
+ }
2250
+ if (obj_value_union0 && obj_value_union1 && obj_value_union2 && obj_value_union3 && obj_value_union4 && obj_value_union5) {
2235
2251
  let message = 'Object doesn\'t match union (at "' + path_value + '")';
2236
2252
  message += '\n' + obj_value_union0.split('\n').map((line) => '\t' + line).join('\n');
2237
2253
  message += '\n' + obj_value_union1.split('\n').map((line) => '\t' + line).join('\n');
2238
2254
  message += '\n' + obj_value_union2.split('\n').map((line) => '\t' + line).join('\n');
2239
2255
  message += '\n' + obj_value_union3.split('\n').map((line) => '\t' + line).join('\n');
2240
2256
  message += '\n' + obj_value_union4.split('\n').map((line) => '\t' + line).join('\n');
2257
+ message += '\n' + obj_value_union5.split('\n').map((line) => '\t' + line).join('\n');
2241
2258
  return new TypeError(message);
2242
2259
  }
2243
2260
  })();
@@ -2272,10 +2289,10 @@ const select$3B = function FieldValueRepresentationSelect() {
2272
2289
  kind: 'Scalar'
2273
2290
  },
2274
2291
  {
2292
+ kind: 'Object',
2275
2293
  name: 'value',
2276
- kind: 'Link',
2277
2294
  nullable: true,
2278
- fragment: select$3z()
2295
+ // Complex union deep
2279
2296
  }
2280
2297
  ]
2281
2298
  };
@@ -2288,12 +2305,32 @@ function equals$1b(existing, incoming) {
2288
2305
  }
2289
2306
  const existing_value = existing.value;
2290
2307
  const incoming_value = incoming.value;
2291
- if (!(existing_value === incoming_value
2292
- || (existing_value != null &&
2293
- incoming_value != null &&
2294
- existing_value.__ref != null &&
2295
- incoming_value.__ref != null &&
2296
- existing_value.__ref === incoming_value.__ref))) {
2308
+ if (!((() => {
2309
+ if (existing_value === null || incoming_value === null) {
2310
+ return existing_value === incoming_value;
2311
+ }
2312
+ if (Array.isArray(existing_value) && Array.isArray(incoming_value)) {
2313
+ const equals_value_items = equalsArray(existing_value, incoming_value, (existing_value_item, incoming_value_item) => {
2314
+ if (!(existing_value_item === incoming_value_item)) {
2315
+ return false;
2316
+ }
2317
+ });
2318
+ if (equals_value_items === false) {
2319
+ return false;
2320
+ }
2321
+ }
2322
+ else {
2323
+ if (!(existing_value === incoming_value
2324
+ || (existing_value != null &&
2325
+ incoming_value != null &&
2326
+ existing_value.__ref != null &&
2327
+ incoming_value.__ref != null &&
2328
+ existing_value.__ref === incoming_value.__ref))) {
2329
+ return false;
2330
+ }
2331
+ }
2332
+ return true;
2333
+ })())) {
2297
2334
  return false;
2298
2335
  }
2299
2336
  return true;
@@ -4724,6 +4761,11 @@ const SCALAR_VALUE_SELECTION = {
4724
4761
  kind: 'Scalar',
4725
4762
  name: 'value',
4726
4763
  };
4764
+ const ARRAY_VALUE_SELECTION = {
4765
+ kind: 'Scalar',
4766
+ name: 'value',
4767
+ plural: true,
4768
+ };
4727
4769
  const DISPLAY_VALUE_SELECTION = {
4728
4770
  kind: 'Scalar',
4729
4771
  name: 'displayValue',
@@ -4809,6 +4851,10 @@ function createPathSelectionFromValue(fields) {
4809
4851
  },
4810
4852
  };
4811
4853
  }
4854
+ else if (Array.isArray(fieldValue)) {
4855
+ // this should change if we ever accept arrays of non-scalars
4856
+ fieldValueSelection = ARRAY_VALUE_SELECTION;
4857
+ }
4812
4858
  const fieldSelection = {
4813
4859
  kind: 'Link',
4814
4860
  name: fieldName,
@@ -4910,7 +4956,7 @@ const DRAFTS_SELECTION = {
4910
4956
  required: false,
4911
4957
  };
4912
4958
  function isSpanningRecord(fieldValue) {
4913
- return fieldValue !== null && typeof fieldValue === 'object';
4959
+ return fieldValue !== null && typeof fieldValue === 'object' && !Array.isArray(fieldValue);
4914
4960
  }
4915
4961
  function createRecordSelection(fieldDefinition) {
4916
4962
  const sel = dynamicSelect$8({
@@ -4965,6 +5011,7 @@ function addScalarField(current, leafNodeFieldKey) {
4965
5011
  }
4966
5012
  }
4967
5013
  function extractTrackedFieldsToTrie(recordId, node, root, config, visitedRecordIds = {}, depth = 0) {
5014
+ var _a, _b;
4968
5015
  // Filter Error and null nodes
4969
5016
  if (!isGraphNode(node)) {
4970
5017
  return;
@@ -5003,7 +5050,7 @@ function extractTrackedFieldsToTrie(recordId, node, root, config, visitedRecordI
5003
5050
  continue;
5004
5051
  }
5005
5052
  const { maxDepth, onlyFetchLeafNodeIdAndName } = config;
5006
- if (field.isScalar('value') === false) {
5053
+ if (field.isScalar('value') === false && !Array.isArray((_a = field.data) === null || _a === void 0 ? void 0 : _a.value)) {
5007
5054
  if (depth + 1 > maxDepth) {
5008
5055
  if (onlyFetchLeafNodeIdAndName === true) {
5009
5056
  addScalarFieldId(current);
@@ -5040,7 +5087,7 @@ function extractTrackedFieldsToTrie(recordId, node, root, config, visitedRecordI
5040
5087
  addScalarFieldName(current);
5041
5088
  continue;
5042
5089
  }
5043
- if (field.scalar('value') === null) {
5090
+ if (field.scalar('value') === null && !Array.isArray((_b = field.data) === null || _b === void 0 ? void 0 : _b.value)) {
5044
5091
  continue;
5045
5092
  }
5046
5093
  }
@@ -5351,6 +5398,7 @@ function markMissingOptionalFields(record, optionalFields) {
5351
5398
  }
5352
5399
  }
5353
5400
  function markNulledOutPath(record, path) {
5401
+ var _a;
5354
5402
  if (!isGraphNode(record)) {
5355
5403
  return;
5356
5404
  }
@@ -5362,7 +5410,7 @@ function markNulledOutPath(record, path) {
5362
5410
  const link = fieldValueRepresentation.link(fieldName);
5363
5411
  const resolved = link.follow();
5364
5412
  if (isGraphNode(resolved) &&
5365
- resolved.isScalar('value') &&
5413
+ (resolved.isScalar('value') || !Array.isArray((_a = resolved.data) === null || _a === void 0 ? void 0 : _a.value)) &&
5366
5414
  path.length > 0 && // TODO [W-14082782]: temporary fix
5367
5415
  !isFrozen(link.data)) {
5368
5416
  const linkState = link.linkData();
@@ -5385,6 +5433,7 @@ function markNulledOutRequiredFields(record, fields) {
5385
5433
  }
5386
5434
  }
5387
5435
  function _markMissingPath(record, path) {
5436
+ var _a;
5388
5437
  // Filter out Error and null nodes
5389
5438
  if (!isGraphNode(record)) {
5390
5439
  return;
@@ -5406,7 +5455,7 @@ function _markMissingPath(record, path) {
5406
5455
  return;
5407
5456
  }
5408
5457
  // if value is not a scalar, follow the link and mark it as missing
5409
- if (fieldValue.isScalar('value') === false) {
5458
+ if (fieldValue.isScalar('value') === false && !Array.isArray((_a = fieldValue.data) === null || _a === void 0 ? void 0 : _a.value)) {
5410
5459
  _markMissingPath(fieldValue
5411
5460
  .link('value')
5412
5461
  .follow(), path);
@@ -5504,6 +5553,7 @@ function ingestRecordResponse(luvio, response, recordId, recordIngest, conflictM
5504
5553
  // This function sets fields that we are refreshing to pending
5505
5554
  // These values will go into the store
5506
5555
  function mergePendingFields(newRecord, oldRecord, existingNode) {
5556
+ var _a;
5507
5557
  const mergedFields = { ...newRecord.fields };
5508
5558
  const merged = { ...newRecord, fields: mergedFields };
5509
5559
  const existingFields = keys(oldRecord.fields);
@@ -5527,7 +5577,7 @@ function mergePendingFields(newRecord, oldRecord, existingNode) {
5527
5577
  .link(spanningFieldName);
5528
5578
  const field = fieldValueRep.follow();
5529
5579
  if (isGraphNode(field)) {
5530
- if (field.isScalar('value') === false) {
5580
+ if (field.isScalar('value') === false && !Array.isArray((_a = field.data) === null || _a === void 0 ? void 0 : _a.value)) {
5531
5581
  const record = field
5532
5582
  .link('value')
5533
5583
  .follow();
@@ -5769,7 +5819,7 @@ function fixDisplayValue(existing, incoming, path) {
5769
5819
  function normalize$S(input, existing, path, luvio, store, timestamp, fieldsTrie, optionalFieldsTrie, recordConflictMap) {
5770
5820
  const input_value = input.value;
5771
5821
  const input_value_id = path.fullPath + '__value';
5772
- if (input_value !== null && typeof input_value === 'object') {
5822
+ if (input_value !== null && typeof input_value === 'object' && !Array.isArray(input_value)) {
5773
5823
  const ingest = createRecordIngest(fieldsTrie, optionalFieldsTrie, recordConflictMap);
5774
5824
  input.value = ingest(input_value, {
5775
5825
  fullPath: input_value_id,
@@ -39993,7 +40043,9 @@ function selectType$13(typename, sel, fieldData, reader, key, sink, variables, f
39993
40043
  reader.markSeenId(fieldDataRef);
39994
40044
  const { value: spanningFieldResult } = resolvedSpanningFieldValue;
39995
40045
  // Handle null values - graphql will return it at the field level, not return nested { value: null }
39996
- if (spanningFieldResult === null || typeof spanningFieldResult !== 'object') {
40046
+ if (spanningFieldResult === null ||
40047
+ typeof spanningFieldResult !== 'object' ||
40048
+ Array.isArray(spanningFieldResult)) {
39997
40049
  reader.assignScalar(key, sink, null);
39998
40050
  break;
39999
40051
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-uiapi",
3
- "version": "1.361.0",
3
+ "version": "1.363.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "Wire adapters for record related UI API endpoints",
6
6
  "main": "dist/es/es2018/uiapi-records-service.js",
@@ -68,13 +68,13 @@
68
68
  }
69
69
  },
70
70
  "dependencies": {
71
- "@salesforce/lds-bindings": "^1.361.0",
72
- "@salesforce/lds-default-luvio": "^1.361.0"
71
+ "@salesforce/lds-bindings": "^1.363.0",
72
+ "@salesforce/lds-default-luvio": "^1.363.0"
73
73
  },
74
74
  "devDependencies": {
75
- "@salesforce/lds-compiler-plugins": "^1.361.0",
76
- "@salesforce/lds-jest": "^1.361.0",
77
- "@salesforce/lds-store-binary": "^1.361.0"
75
+ "@salesforce/lds-compiler-plugins": "^1.363.0",
76
+ "@salesforce/lds-jest": "^1.363.0",
77
+ "@salesforce/lds-store-binary": "^1.363.0"
78
78
  },
79
79
  "luvioBundlesize": [
80
80
  {
@@ -4472,12 +4472,39 @@ function getFieldType$1l(field) {
4472
4472
  }
4473
4473
  }
4474
4474
 
4475
+ const RepresentationType$3 = 'RecordCollectionRepresentation';
4476
+ function getTypeCacheKeys$1b(rootKeySet, luvio, input, fullPathFactory) {
4477
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
4478
+ const rootKey = fullPathFactory();
4479
+ rootKeySet.set(rootKey, {
4480
+ namespace: keyPrefix,
4481
+ representationName: RepresentationType$3,
4482
+ mergeable: false
4483
+ });
4484
+ const input_records_length = input.records.length;
4485
+ for (let i = 0; i < input_records_length; i++) {
4486
+ getTypeCacheKeys$1a(rootKeySet, luvio, input.records[i]);
4487
+ }
4488
+ }
4489
+
4490
+ const VERSION$1h = "98c5b18512e48ca8d28727549507e4ba";
4491
+ const RepresentationType$2 = 'RecordRepresentation';
4492
+ function keyBuilder$18(luvio, config) {
4493
+ return keyPrefix + '::' + RepresentationType$2 + ':' + config.recordId;
4494
+ }
4495
+ function keyBuilderFromType(luvio, object) {
4496
+ const keyParams = {
4497
+ recordId: object.id
4498
+ };
4499
+ return keyBuilder$18(luvio, keyParams);
4500
+ }
4501
+
4475
4502
  const { assign, create, freeze, isFrozen, keys } = Object;
4476
4503
  const { isArray } = Array;
4477
4504
  const { concat, filter, includes, push, reduce } = Array.prototype;
4478
4505
 
4479
4506
  // we override the generated so we can set "mergeable: true" on the root key
4480
- const getTypeCacheKeys$1b = (rootKeySet, luvio, input, _fullPathFactory) => {
4507
+ const getTypeCacheKeys$1a = (rootKeySet, luvio, input, _fullPathFactory) => {
4481
4508
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
4482
4509
  const rootKey = keyBuilderFromType(luvio, input);
4483
4510
  rootKeySet.set(rootKey, {
@@ -4490,7 +4517,7 @@ const getTypeCacheKeys$1b = (rootKeySet, luvio, input, _fullPathFactory) => {
4490
4517
  const input_childRelationships_length = input_childRelationships_keys.length;
4491
4518
  for (let i = 0; i < input_childRelationships_length; i++) {
4492
4519
  const key = input_childRelationships_keys[i];
4493
- getTypeCacheKeys$1a(rootKeySet, luvio, input_childRelationships[key], () => rootKey + '__childRelationships' + '__' + key);
4520
+ getTypeCacheKeys$1b(rootKeySet, luvio, input_childRelationships[key], () => rootKey + '__childRelationships' + '__' + key);
4494
4521
  }
4495
4522
  const input_fields = input.fields;
4496
4523
  const input_fields_keys = keys(input_fields);
@@ -4502,34 +4529,7 @@ const getTypeCacheKeys$1b = (rootKeySet, luvio, input, _fullPathFactory) => {
4502
4529
  return rootKeySet;
4503
4530
  };
4504
4531
 
4505
- const RepresentationType$3 = 'RecordCollectionRepresentation';
4506
- function getTypeCacheKeys$1a(rootKeySet, luvio, input, fullPathFactory) {
4507
- // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
4508
- const rootKey = fullPathFactory();
4509
- rootKeySet.set(rootKey, {
4510
- namespace: keyPrefix,
4511
- representationName: RepresentationType$3,
4512
- mergeable: false
4513
- });
4514
- const input_records_length = input.records.length;
4515
- for (let i = 0; i < input_records_length; i++) {
4516
- getTypeCacheKeys$1b(rootKeySet, luvio, input.records[i]);
4517
- }
4518
- }
4519
-
4520
- const VERSION$1h = "98c5b18512e48ca8d28727549507e4ba";
4521
- const RepresentationType$2 = 'RecordRepresentation';
4522
- function keyBuilder$18(luvio, config) {
4523
- return keyPrefix + '::' + RepresentationType$2 + ':' + config.recordId;
4524
- }
4525
- function keyBuilderFromType(luvio, object) {
4526
- const keyParams = {
4527
- recordId: object.id
4528
- };
4529
- return keyBuilder$18(luvio, keyParams);
4530
- }
4531
-
4532
- const VERSION$1g = "195d918987a35f45e1aa4dce9a11d8c5";
4532
+ const VERSION$1g = "2738fe8faf98ecd076d7c4df86fd5bf0";
4533
4533
  const RepresentationType$1 = 'FieldValueRepresentation';
4534
4534
  function getTypeCacheKeys$19(rootKeySet, luvio, input, fullPathFactory) {
4535
4535
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
@@ -4540,7 +4540,7 @@ function getTypeCacheKeys$19(rootKeySet, luvio, input, fullPathFactory) {
4540
4540
  mergeable: false
4541
4541
  });
4542
4542
  if (!Array.isArray(input.value) && input.value !== null && typeof input.value === 'object') {
4543
- getTypeCacheKeys$1b(rootKeySet, luvio, input.value);
4543
+ getTypeCacheKeys$1a(rootKeySet, luvio, input.value);
4544
4544
  }
4545
4545
  }
4546
4546
 
@@ -5683,7 +5683,9 @@ function selectType$13(typename, sel, fieldData, reader, key, sink, variables, f
5683
5683
  reader.markSeenId(fieldDataRef);
5684
5684
  const { value: spanningFieldResult } = resolvedSpanningFieldValue;
5685
5685
  // Handle null values - graphql will return it at the field level, not return nested { value: null }
5686
- if (spanningFieldResult === null || typeof spanningFieldResult !== 'object') {
5686
+ if (spanningFieldResult === null ||
5687
+ typeof spanningFieldResult !== 'object' ||
5688
+ Array.isArray(spanningFieldResult)) {
5687
5689
  reader.assignScalar(key, sink, null);
5688
5690
  break;
5689
5691
  }
@@ -6017,7 +6019,7 @@ function getTypeCacheKeys$15(cacheKeySink, astNode, state) {
6017
6019
 
6018
6020
  function getMappedTypeCacheKeys(cache, astNode, state) {
6019
6021
  const convertedData = convertGraphQLToRaml(astNode, state);
6020
- getTypeCacheKeys$1b(cache, state.luvio, convertedData.recordRepresentation);
6022
+ getTypeCacheKeys$1a(cache, state.luvio, convertedData.recordRepresentation);
6021
6023
  }
6022
6024
 
6023
6025
  const name$11 = 'RecordRepresentation';
@@ -25458,4 +25460,4 @@ register({
25458
25460
  });
25459
25461
 
25460
25462
  export { configurationForGraphQLAdapters as configuration, graphql, factory$1 as graphqlAdapterFactory, graphqlBatch, graphqlBatch_imperative, graphql_imperative };
25461
- // version: 1.361.0-eb406138cb
25463
+ // version: 1.363.0-112332910d
package/sfdc/index.js CHANGED
@@ -2209,7 +2209,7 @@ function equals$18(existing, incoming) {
2209
2209
  return true;
2210
2210
  }
2211
2211
 
2212
- const VERSION$1i = "195d918987a35f45e1aa4dce9a11d8c5";
2212
+ const VERSION$1i = "2738fe8faf98ecd076d7c4df86fd5bf0";
2213
2213
  function validate$1Y(obj, path = 'FieldValueRepresentation') {
2214
2214
  const v_error = (() => {
2215
2215
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -2281,20 +2281,37 @@ function validate$1Y(obj, path = 'FieldValueRepresentation') {
2281
2281
  }
2282
2282
  let obj_value_union4 = null;
2283
2283
  const obj_value_union4_error = (() => {
2284
- if (obj_value !== null) {
2285
- return new TypeError('Expected "null" but received "' + typeof obj_value + '" (at "' + path_value + '")');
2284
+ if (!ArrayIsArray(obj_value)) {
2285
+ return new TypeError('Expected "array" but received "' + typeof obj_value + '" (at "' + path_value + '")');
2286
+ }
2287
+ for (let i = 0; i < obj_value.length; i++) {
2288
+ const obj_value_item = obj_value[i];
2289
+ const path_value_item = path_value + '[' + i + ']';
2290
+ if (typeof obj_value_item !== 'string') {
2291
+ return new TypeError('Expected "string" but received "' + typeof obj_value_item + '" (at "' + path_value_item + '")');
2292
+ }
2286
2293
  }
2287
2294
  })();
2288
2295
  if (obj_value_union4_error != null) {
2289
2296
  obj_value_union4 = obj_value_union4_error.message;
2290
2297
  }
2291
- if (obj_value_union0 && obj_value_union1 && obj_value_union2 && obj_value_union3 && obj_value_union4) {
2298
+ let obj_value_union5 = null;
2299
+ const obj_value_union5_error = (() => {
2300
+ if (obj_value !== null) {
2301
+ return new TypeError('Expected "null" but received "' + typeof obj_value + '" (at "' + path_value + '")');
2302
+ }
2303
+ })();
2304
+ if (obj_value_union5_error != null) {
2305
+ obj_value_union5 = obj_value_union5_error.message;
2306
+ }
2307
+ if (obj_value_union0 && obj_value_union1 && obj_value_union2 && obj_value_union3 && obj_value_union4 && obj_value_union5) {
2292
2308
  let message = 'Object doesn\'t match union (at "' + path_value + '")';
2293
2309
  message += '\n' + obj_value_union0.split('\n').map((line) => '\t' + line).join('\n');
2294
2310
  message += '\n' + obj_value_union1.split('\n').map((line) => '\t' + line).join('\n');
2295
2311
  message += '\n' + obj_value_union2.split('\n').map((line) => '\t' + line).join('\n');
2296
2312
  message += '\n' + obj_value_union3.split('\n').map((line) => '\t' + line).join('\n');
2297
2313
  message += '\n' + obj_value_union4.split('\n').map((line) => '\t' + line).join('\n');
2314
+ message += '\n' + obj_value_union5.split('\n').map((line) => '\t' + line).join('\n');
2298
2315
  return new TypeError(message);
2299
2316
  }
2300
2317
  })();
@@ -2329,10 +2346,10 @@ const select$1X = function FieldValueRepresentationSelect() {
2329
2346
  kind: 'Scalar'
2330
2347
  },
2331
2348
  {
2349
+ kind: 'Object',
2332
2350
  name: 'value',
2333
- kind: 'Link',
2334
2351
  nullable: true,
2335
- fragment: select$1V()
2352
+ // Complex union deep
2336
2353
  }
2337
2354
  ]
2338
2355
  };
@@ -2345,12 +2362,32 @@ function equals$17(existing, incoming) {
2345
2362
  }
2346
2363
  const existing_value = existing.value;
2347
2364
  const incoming_value = incoming.value;
2348
- if (!(existing_value === incoming_value
2349
- || (existing_value != null &&
2350
- incoming_value != null &&
2351
- existing_value.__ref != null &&
2352
- incoming_value.__ref != null &&
2353
- existing_value.__ref === incoming_value.__ref))) {
2365
+ if (!((() => {
2366
+ if (existing_value === null || incoming_value === null) {
2367
+ return existing_value === incoming_value;
2368
+ }
2369
+ if (Array.isArray(existing_value) && Array.isArray(incoming_value)) {
2370
+ const equals_value_items = equalsArray(existing_value, incoming_value, (existing_value_item, incoming_value_item) => {
2371
+ if (!(existing_value_item === incoming_value_item)) {
2372
+ return false;
2373
+ }
2374
+ });
2375
+ if (equals_value_items === false) {
2376
+ return false;
2377
+ }
2378
+ }
2379
+ else {
2380
+ if (!(existing_value === incoming_value
2381
+ || (existing_value != null &&
2382
+ incoming_value != null &&
2383
+ existing_value.__ref != null &&
2384
+ incoming_value.__ref != null &&
2385
+ existing_value.__ref === incoming_value.__ref))) {
2386
+ return false;
2387
+ }
2388
+ }
2389
+ return true;
2390
+ })())) {
2354
2391
  return false;
2355
2392
  }
2356
2393
  return true;
@@ -4781,6 +4818,11 @@ const SCALAR_VALUE_SELECTION = {
4781
4818
  kind: 'Scalar',
4782
4819
  name: 'value',
4783
4820
  };
4821
+ const ARRAY_VALUE_SELECTION = {
4822
+ kind: 'Scalar',
4823
+ name: 'value',
4824
+ plural: true,
4825
+ };
4784
4826
  const DISPLAY_VALUE_SELECTION = {
4785
4827
  kind: 'Scalar',
4786
4828
  name: 'displayValue',
@@ -4866,6 +4908,10 @@ function createPathSelectionFromValue(fields) {
4866
4908
  },
4867
4909
  };
4868
4910
  }
4911
+ else if (Array.isArray(fieldValue)) {
4912
+ // this should change if we ever accept arrays of non-scalars
4913
+ fieldValueSelection = ARRAY_VALUE_SELECTION;
4914
+ }
4869
4915
  const fieldSelection = {
4870
4916
  kind: 'Link',
4871
4917
  name: fieldName,
@@ -4967,7 +5013,7 @@ const DRAFTS_SELECTION = {
4967
5013
  required: false,
4968
5014
  };
4969
5015
  function isSpanningRecord(fieldValue) {
4970
- return fieldValue !== null && typeof fieldValue === 'object';
5016
+ return fieldValue !== null && typeof fieldValue === 'object' && !Array.isArray(fieldValue);
4971
5017
  }
4972
5018
  function createRecordSelection(fieldDefinition) {
4973
5019
  const sel = dynamicSelect$8({
@@ -5060,7 +5106,7 @@ function extractTrackedFieldsToTrie(recordId, node, root, config, visitedRecordI
5060
5106
  continue;
5061
5107
  }
5062
5108
  const { maxDepth, onlyFetchLeafNodeIdAndName } = config;
5063
- if (field.isScalar('value') === false) {
5109
+ if (field.isScalar('value') === false && !Array.isArray(field.data?.value)) {
5064
5110
  if (depth + 1 > maxDepth) {
5065
5111
  if (onlyFetchLeafNodeIdAndName === true) {
5066
5112
  addScalarFieldId(current);
@@ -5097,7 +5143,7 @@ function extractTrackedFieldsToTrie(recordId, node, root, config, visitedRecordI
5097
5143
  addScalarFieldName(current);
5098
5144
  continue;
5099
5145
  }
5100
- if (field.scalar('value') === null) {
5146
+ if (field.scalar('value') === null && !Array.isArray(field.data?.value)) {
5101
5147
  continue;
5102
5148
  }
5103
5149
  }
@@ -5237,7 +5283,7 @@ function markNulledOutPath(record, path) {
5237
5283
  const link = fieldValueRepresentation.link(fieldName);
5238
5284
  const resolved = link.follow();
5239
5285
  if (isGraphNode(resolved) &&
5240
- resolved.isScalar('value') &&
5286
+ (resolved.isScalar('value') || !Array.isArray(resolved.data?.value)) &&
5241
5287
  path.length > 0 && // TODO [W-14082782]: temporary fix
5242
5288
  !isFrozen(link.data)) {
5243
5289
  const linkState = link.linkData();
@@ -5281,7 +5327,7 @@ function _markMissingPath(record, path) {
5281
5327
  return;
5282
5328
  }
5283
5329
  // if value is not a scalar, follow the link and mark it as missing
5284
- if (fieldValue.isScalar('value') === false) {
5330
+ if (fieldValue.isScalar('value') === false && !Array.isArray(fieldValue.data?.value)) {
5285
5331
  _markMissingPath(fieldValue
5286
5332
  .link('value')
5287
5333
  .follow(), path);
@@ -5402,7 +5448,7 @@ function mergePendingFields(newRecord, oldRecord, existingNode) {
5402
5448
  .link(spanningFieldName);
5403
5449
  const field = fieldValueRep.follow();
5404
5450
  if (isGraphNode(field)) {
5405
- if (field.isScalar('value') === false) {
5451
+ if (field.isScalar('value') === false && !Array.isArray(field.data?.value)) {
5406
5452
  const record = field
5407
5453
  .link('value')
5408
5454
  .follow();
@@ -5644,7 +5690,7 @@ function fixDisplayValue(existing, incoming, path) {
5644
5690
  function normalize$O(input, existing, path, luvio, store, timestamp, fieldsTrie, optionalFieldsTrie, recordConflictMap) {
5645
5691
  const input_value = input.value;
5646
5692
  const input_value_id = path.fullPath + '__value';
5647
- if (input_value !== null && typeof input_value === 'object') {
5693
+ if (input_value !== null && typeof input_value === 'object' && !Array.isArray(input_value)) {
5648
5694
  const ingest = createRecordIngest(fieldsTrie, optionalFieldsTrie, recordConflictMap);
5649
5695
  input.value = ingest(input_value, {
5650
5696
  fullPath: input_value_id,
@@ -38954,4 +39000,4 @@ withDefaultLuvio((luvio) => {
38954
39000
  });
38955
39001
 
38956
39002
  export { API_NAMESPACE, InMemoryRecordRepresentationQueryEvaluator, MRU, RepresentationType$J as ObjectInfoDirectoryEntryRepresentationType, RepresentationType$O as ObjectInfoRepresentationType, RECORD_FIELDS_KEY_JUNCTION, RECORD_ID_PREFIX, RECORD_REPRESENTATION_NAME, RECORD_VIEW_ENTITY_ID_PREFIX, RECORD_VIEW_ENTITY_REPRESENTATION_NAME, RepresentationType$V as RecordRepresentationRepresentationType, TTL$z as RecordRepresentationTTL, RepresentationType$V as RecordRepresentationType, VERSION$1g as RecordRepresentationVersion, keyPrefix as UiApiNamespace, buildRecordRepKeyFromId, getFieldApiNamesArray as coerceFieldIdArray, getObjectApiName$1 as coerceObjectId, getObjectApiNamesArray as coerceObjectIdArray, configurationForRestAdapters as configuration, createContentDocumentAndVersion, createContentVersion, createIngestRecordWithFields, createLDSAdapterWithPrediction, createListInfo, createRecord, createRelatedListAdapterWithPrediction, createRelatedListPlusAdapterWithPrediction, deleteListInfo, deleteRecord, executeBatchRecordOperations, extractRecordIdFromStoreKey, getActionOverrides, getActionOverrides_imperative, getAllApps, getAllApps_imperative, getAppDetails, getAppDetails_imperative, getDuplicateConfiguration, getDuplicateConfiguration_imperative, getDuplicates, getDuplicates_imperative, getFlexipageFormulaOverrides, getFlexipageFormulaOverrides_imperative, getGlobalActions, getGlobalActions_imperative, getKeywordSearchResults, getKeywordSearchResults_imperative, getLayout, getLayoutUserState, getLayoutUserState_imperative, getLayout_imperative, getListInfoByName, getListInfoByNameAdapterFactory, getListInfoByName_imperative, getListInfosByName, getListInfosByName_imperative, getListInfosByObjectName, getListInfosByObjectNameAdapterFactory, getListInfosByObjectName_imperative, getListObjectInfo, getListObjectInfoAdapterFactory, getListObjectInfo_imperative, getListPreferences, getListPreferences_imperative, getListRecordsByName, factory$a as getListRecordsByNameAdapterFactory, getListRecordsByName_imperative, getListUi, getListUi_imperative, getLookupActions, getLookupActions_imperative, getLookupMetadata, getLookupMetadata_imperative, getLookupRecords, getLookupRecords_imperative, getNavItems, getNavItems_imperative, getObjectCreateActions, getObjectCreateActions_imperative, getObjectInfo, getObjectInfoAdapterFactory, getObjectInfoDirectoryAdapterFactory, getObjectInfo_imperative, getObjectInfos, getObjectInfosAdapterFactory, getObjectInfos_imperative, getPathLayout, getPathLayout_imperative, getPicklistValues, getPicklistValuesByRecordType, getPicklistValuesByRecordType_imperative, getPicklistValues_imperative, getQuickActionDefaults, getQuickActionDefaults_imperative, getQuickActionInfo, getQuickActionInfo_imperative, getQuickActionLayout, getQuickActionLayout_imperative, getRecord, getRecordActions, getRecordActionsAdapterFactory, getRecordActions_imperative, factory$f as getRecordAdapterFactory, getRecordAvatars, getRecordAvatarsAdapterFactory, getRecordAvatars_imperative, getRecordCreateDefaults, getRecordCreateDefaults_imperative, getRecordEditActions, getRecordEditActions_imperative, getRecordId18, getRecordId18Array, getRecordIngestionOverride, getRecordNotifyChange, getRecordTemplateClone, getRecordTemplateClone_imperative, getRecordTemplateCreate, getRecordTemplateCreate_imperative, getRecordUi, getRecordUi_imperative, getRecord_imperative, getRecords, getRecordsAdapterFactory, getRecords_imperative, getRelatedListActions, getRelatedListActionsAdapterFactory, getRelatedListActions_imperative, getRelatedListCount, getRelatedListCount_imperative, getRelatedListInfo, getRelatedListInfoAdapterFactory, getRelatedListInfoBatch, getRelatedListInfoBatchAdapterFactory, getRelatedListInfoBatch_imperative, getRelatedListInfo_imperative, getRelatedListPreferences, getRelatedListPreferencesBatch, getRelatedListPreferencesBatch_imperative, getRelatedListPreferences_imperative, getRelatedListRecordActions, getRelatedListRecordActions_imperative, getRelatedListRecords, getRelatedListRecordsAdapterFactory, getRelatedListRecordsBatch, getRelatedListRecordsBatchAdapterFactory, getRelatedListRecordsBatch_imperative, getRelatedListRecords_imperative, getRelatedListsActions, getRelatedListsActionsAdapterFactory, getRelatedListsActions_imperative, getRelatedListsCount, getRelatedListsCount_imperative, getRelatedListsInfo, getRelatedListsInfoAdapterFactory, getRelatedListsInfo_imperative, getResponseCacheKeys as getResponseCacheKeysContentDocumentCompositeRepresentation, getSearchFilterMetadata, getSearchFilterMetadata_imperative, getSearchFilterOptions, getSearchFilterOptions_imperative, getSearchResults, getSearchResults_imperative, getTypeCacheKeys$X as getTypeCacheKeysRecord, ingest as ingestContentDocumentCompositeRepresentation, ingest$H as ingestObjectInfo, ingest$B as ingestQuickActionExecutionRepresentation, ingest$O as ingestRecord, instrument, isStoreKeyRecordViewEntity, isSupportedEntity, keyBuilder as keyBuilderContentDocumentCompositeRepresentation, keyBuilderFromType as keyBuilderFromTypeContentDocumentCompositeRepresentation, keyBuilderFromType$D as keyBuilderFromTypeRecordRepresentation, keyBuilder$1Y as keyBuilderObjectInfo, keyBuilder$1R as keyBuilderQuickActionExecutionRepresentation, keyBuilder$29 as keyBuilderRecord, notifyAllListInfoSummaryUpdateAvailable, notifyAllListRecordUpdateAvailable, notifyListInfoSummaryUpdateAvailable, notifyListInfoUpdateAvailable, notifyListRecordCollectionUpdateAvailable, notifyListViewSummaryUpdateAvailable, notifyQuickActionDefaultsUpdateAvailable, notifyRecordUpdateAvailable, performQuickAction, performUpdateRecordQuickAction, refresh, registerPrefetcher, updateLayoutUserState, updateListInfoByName, updateListPreferences, updateRecord, updateRecordAvatar, updateRelatedListInfo, updateRelatedListPreferences };
38957
- // version: 1.361.0-eb406138cb
39003
+ // version: 1.363.0-112332910d
package/src/raml/api.raml CHANGED
@@ -1109,7 +1109,7 @@ types:
1109
1109
  type: string | nil # TODO: nil union hand rolled
1110
1110
  value:
1111
1111
  description: The value of a field in its raw data form.
1112
- type: RecordRepresentation | boolean | number | string | nil # TODO: integer -> number hand rolled
1112
+ type: RecordRepresentation | boolean | number | string | string[] | nil # TODO: integer -> number hand rolled
1113
1113
  FilteredLookupInfoRepresentation:
1114
1114
  description: Filtered lookup info.
1115
1115
  type: object