@salesforce/lds-worker-api 1.242.0 → 1.243.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.
|
@@ -3899,7 +3899,7 @@ function createResourceParamsImpl(config, configMetadata) {
|
|
|
3899
3899
|
}
|
|
3900
3900
|
return resourceParams;
|
|
3901
3901
|
}
|
|
3902
|
-
// engine version: 0.150.
|
|
3902
|
+
// engine version: 0.150.2-5dcb5d26
|
|
3903
3903
|
|
|
3904
3904
|
/**
|
|
3905
3905
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -4027,7 +4027,7 @@ function withDefaultLuvio(callback) {
|
|
|
4027
4027
|
}
|
|
4028
4028
|
callbacks.push(callback);
|
|
4029
4029
|
}
|
|
4030
|
-
// version: 1.
|
|
4030
|
+
// version: 1.243.0-87f38263e
|
|
4031
4031
|
|
|
4032
4032
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4033
4033
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -15488,7 +15488,7 @@ function gql(literals, ...subs) {
|
|
|
15488
15488
|
}
|
|
15489
15489
|
return superResult;
|
|
15490
15490
|
}
|
|
15491
|
-
// version: 1.
|
|
15491
|
+
// version: 1.243.0-87f38263e
|
|
15492
15492
|
|
|
15493
15493
|
function unwrap(data) {
|
|
15494
15494
|
// The lwc-luvio bindings import a function from lwc called "unwrap".
|
|
@@ -16413,7 +16413,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
|
|
|
16413
16413
|
const { apiFamily, name } = metadata;
|
|
16414
16414
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
16415
16415
|
}
|
|
16416
|
-
// version: 1.
|
|
16416
|
+
// version: 1.243.0-87f38263e
|
|
16417
16417
|
|
|
16418
16418
|
/**
|
|
16419
16419
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -16512,7 +16512,7 @@ var TypeCheckShapes;
|
|
|
16512
16512
|
TypeCheckShapes[TypeCheckShapes["Integer"] = 3] = "Integer";
|
|
16513
16513
|
TypeCheckShapes[TypeCheckShapes["Unsupported"] = 4] = "Unsupported";
|
|
16514
16514
|
})(TypeCheckShapes || (TypeCheckShapes = {}));
|
|
16515
|
-
// engine version: 0.150.
|
|
16515
|
+
// engine version: 0.150.2-5dcb5d26
|
|
16516
16516
|
|
|
16517
16517
|
const { keys: ObjectKeys$3, create: ObjectCreate$3 } = Object;
|
|
16518
16518
|
|
|
@@ -17100,60 +17100,11 @@ function assignMetadataLink$1(entry, metadataKey) {
|
|
|
17100
17100
|
entry['__metadata'] = createLink$3(metadataKey);
|
|
17101
17101
|
}
|
|
17102
17102
|
|
|
17103
|
-
const VERSION$
|
|
17104
|
-
|
|
17105
|
-
const v_error = (() => {
|
|
17106
|
-
if (typeof obj !== 'object' || ArrayIsArray$2(obj) || obj === null) {
|
|
17107
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
17108
|
-
}
|
|
17109
|
-
const obj_fieldApiName = obj.fieldApiName;
|
|
17110
|
-
const path_fieldApiName = path + '.fieldApiName';
|
|
17111
|
-
if (typeof obj_fieldApiName !== 'string') {
|
|
17112
|
-
return new TypeError('Expected "string" but received "' + typeof obj_fieldApiName + '" (at "' + path_fieldApiName + '")');
|
|
17113
|
-
}
|
|
17114
|
-
const obj_label = obj.label;
|
|
17115
|
-
const path_label = path + '.label';
|
|
17116
|
-
if (typeof obj_label !== 'string') {
|
|
17117
|
-
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
17118
|
-
}
|
|
17119
|
-
const obj_lookupId = obj.lookupId;
|
|
17120
|
-
const path_lookupId = path + '.lookupId';
|
|
17121
|
-
let obj_lookupId_union0 = null;
|
|
17122
|
-
const obj_lookupId_union0_error = (() => {
|
|
17123
|
-
if (typeof obj_lookupId !== 'string') {
|
|
17124
|
-
return new TypeError('Expected "string" but received "' + typeof obj_lookupId + '" (at "' + path_lookupId + '")');
|
|
17125
|
-
}
|
|
17126
|
-
})();
|
|
17127
|
-
if (obj_lookupId_union0_error != null) {
|
|
17128
|
-
obj_lookupId_union0 = obj_lookupId_union0_error.message;
|
|
17129
|
-
}
|
|
17130
|
-
let obj_lookupId_union1 = null;
|
|
17131
|
-
const obj_lookupId_union1_error = (() => {
|
|
17132
|
-
if (obj_lookupId !== null) {
|
|
17133
|
-
return new TypeError('Expected "null" but received "' + typeof obj_lookupId + '" (at "' + path_lookupId + '")');
|
|
17134
|
-
}
|
|
17135
|
-
})();
|
|
17136
|
-
if (obj_lookupId_union1_error != null) {
|
|
17137
|
-
obj_lookupId_union1 = obj_lookupId_union1_error.message;
|
|
17138
|
-
}
|
|
17139
|
-
if (obj_lookupId_union0 && obj_lookupId_union1) {
|
|
17140
|
-
let message = 'Object doesn\'t match union (at "' + path_lookupId + '")';
|
|
17141
|
-
message += '\n' + obj_lookupId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
17142
|
-
message += '\n' + obj_lookupId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
17143
|
-
return new TypeError(message);
|
|
17144
|
-
}
|
|
17145
|
-
const obj_sortable = obj.sortable;
|
|
17146
|
-
const path_sortable = path + '.sortable';
|
|
17147
|
-
if (typeof obj_sortable !== 'boolean') {
|
|
17148
|
-
return new TypeError('Expected "boolean" but received "' + typeof obj_sortable + '" (at "' + path_sortable + '")');
|
|
17149
|
-
}
|
|
17150
|
-
})();
|
|
17151
|
-
return v_error === undefined ? null : v_error;
|
|
17152
|
-
}
|
|
17153
|
-
const select$1U = function ListColumnRepresentationSelect() {
|
|
17103
|
+
const VERSION$1o = "275ae22194003d1e53f548b81219c5cb";
|
|
17104
|
+
const select$1W$1 = function ListColumnRepresentationSelect() {
|
|
17154
17105
|
return {
|
|
17155
17106
|
kind: 'Fragment',
|
|
17156
|
-
version: VERSION$
|
|
17107
|
+
version: VERSION$1o,
|
|
17157
17108
|
private: [],
|
|
17158
17109
|
selections: [
|
|
17159
17110
|
{
|
|
@@ -17176,46 +17127,11 @@ const select$1U = function ListColumnRepresentationSelect() {
|
|
|
17176
17127
|
};
|
|
17177
17128
|
};
|
|
17178
17129
|
|
|
17179
|
-
const VERSION$
|
|
17180
|
-
|
|
17181
|
-
const v_error = (() => {
|
|
17182
|
-
if (typeof obj !== 'object' || ArrayIsArray$2(obj) || obj === null) {
|
|
17183
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
17184
|
-
}
|
|
17185
|
-
const obj_fieldApiName = obj.fieldApiName;
|
|
17186
|
-
const path_fieldApiName = path + '.fieldApiName';
|
|
17187
|
-
if (typeof obj_fieldApiName !== 'string') {
|
|
17188
|
-
return new TypeError('Expected "string" but received "' + typeof obj_fieldApiName + '" (at "' + path_fieldApiName + '")');
|
|
17189
|
-
}
|
|
17190
|
-
const obj_label = obj.label;
|
|
17191
|
-
const path_label = path + '.label';
|
|
17192
|
-
if (typeof obj_label !== 'string') {
|
|
17193
|
-
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
17194
|
-
}
|
|
17195
|
-
const obj_operandLabels = obj.operandLabels;
|
|
17196
|
-
const path_operandLabels = path + '.operandLabels';
|
|
17197
|
-
if (!ArrayIsArray$2(obj_operandLabels)) {
|
|
17198
|
-
return new TypeError('Expected "array" but received "' + typeof obj_operandLabels + '" (at "' + path_operandLabels + '")');
|
|
17199
|
-
}
|
|
17200
|
-
for (let i = 0; i < obj_operandLabels.length; i++) {
|
|
17201
|
-
const obj_operandLabels_item = obj_operandLabels[i];
|
|
17202
|
-
const path_operandLabels_item = path_operandLabels + '[' + i + ']';
|
|
17203
|
-
if (typeof obj_operandLabels_item !== 'string') {
|
|
17204
|
-
return new TypeError('Expected "string" but received "' + typeof obj_operandLabels_item + '" (at "' + path_operandLabels_item + '")');
|
|
17205
|
-
}
|
|
17206
|
-
}
|
|
17207
|
-
const obj_operator = obj.operator;
|
|
17208
|
-
const path_operator = path + '.operator';
|
|
17209
|
-
if (typeof obj_operator !== 'string') {
|
|
17210
|
-
return new TypeError('Expected "string" but received "' + typeof obj_operator + '" (at "' + path_operator + '")');
|
|
17211
|
-
}
|
|
17212
|
-
})();
|
|
17213
|
-
return v_error === undefined ? null : v_error;
|
|
17214
|
-
}
|
|
17215
|
-
const select$1T = function ListFilterByInfoRepresentationSelect() {
|
|
17130
|
+
const VERSION$1n = "623aa9ce3a11031e35faf5671a41746e";
|
|
17131
|
+
const select$1V = function ListFilterByInfoRepresentationSelect() {
|
|
17216
17132
|
return {
|
|
17217
17133
|
kind: 'Fragment',
|
|
17218
|
-
version: VERSION$
|
|
17134
|
+
version: VERSION$1n,
|
|
17219
17135
|
private: [],
|
|
17220
17136
|
selections: [
|
|
17221
17137
|
{
|
|
@@ -17239,11 +17155,11 @@ const select$1T = function ListFilterByInfoRepresentationSelect() {
|
|
|
17239
17155
|
};
|
|
17240
17156
|
};
|
|
17241
17157
|
|
|
17242
|
-
const VERSION$
|
|
17243
|
-
const select$
|
|
17158
|
+
const VERSION$1m = "76042ff4af603b2ac0ec69fa0bd12046";
|
|
17159
|
+
const select$1U = function ListReferenceRepresentationSelect() {
|
|
17244
17160
|
return {
|
|
17245
17161
|
kind: 'Fragment',
|
|
17246
|
-
version: VERSION$
|
|
17162
|
+
version: VERSION$1m,
|
|
17247
17163
|
private: [],
|
|
17248
17164
|
selections: [
|
|
17249
17165
|
{
|
|
@@ -17289,6 +17205,47 @@ function equals$11(existing, incoming) {
|
|
|
17289
17205
|
return true;
|
|
17290
17206
|
}
|
|
17291
17207
|
|
|
17208
|
+
const VERSION$1l = "494e0262f07ff2cc5f82d1e0262fec4f";
|
|
17209
|
+
const select$1T = function ListInfoShareRepresentationSelect() {
|
|
17210
|
+
return {
|
|
17211
|
+
kind: 'Fragment',
|
|
17212
|
+
version: VERSION$1l,
|
|
17213
|
+
private: [],
|
|
17214
|
+
selections: [
|
|
17215
|
+
{
|
|
17216
|
+
name: 'groupApiName',
|
|
17217
|
+
kind: 'Scalar'
|
|
17218
|
+
},
|
|
17219
|
+
{
|
|
17220
|
+
name: 'label',
|
|
17221
|
+
kind: 'Scalar'
|
|
17222
|
+
}
|
|
17223
|
+
]
|
|
17224
|
+
};
|
|
17225
|
+
};
|
|
17226
|
+
|
|
17227
|
+
const VERSION$1k = "561657f32721ec1dac1601575b029640";
|
|
17228
|
+
const select$1S = function ListInfoShareCategoryRepresentationSelect() {
|
|
17229
|
+
const { selections: ListInfoShareRepresentation__selections, opaque: ListInfoShareRepresentation__opaque, } = select$1T();
|
|
17230
|
+
return {
|
|
17231
|
+
kind: 'Fragment',
|
|
17232
|
+
version: VERSION$1k,
|
|
17233
|
+
private: [],
|
|
17234
|
+
selections: [
|
|
17235
|
+
{
|
|
17236
|
+
name: 'shareType',
|
|
17237
|
+
kind: 'Scalar'
|
|
17238
|
+
},
|
|
17239
|
+
{
|
|
17240
|
+
name: 'shares',
|
|
17241
|
+
kind: 'Object',
|
|
17242
|
+
plural: true,
|
|
17243
|
+
selections: ListInfoShareRepresentation__selections
|
|
17244
|
+
}
|
|
17245
|
+
]
|
|
17246
|
+
};
|
|
17247
|
+
};
|
|
17248
|
+
|
|
17292
17249
|
const VERSION$1j = "32def9b631252c12b91a8209c1f49f5a";
|
|
17293
17250
|
const select$1R = function ListOrderByInfoRepresentationSelect() {
|
|
17294
17251
|
return {
|
|
@@ -17313,24 +17270,6 @@ const select$1R = function ListOrderByInfoRepresentationSelect() {
|
|
|
17313
17270
|
};
|
|
17314
17271
|
|
|
17315
17272
|
const VERSION$1i = "2634258f216db34315c06d759a35676d";
|
|
17316
|
-
function validate$1G(obj, path = 'ListScopeEntityRepresentation') {
|
|
17317
|
-
const v_error = (() => {
|
|
17318
|
-
if (typeof obj !== 'object' || ArrayIsArray$2(obj) || obj === null) {
|
|
17319
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
17320
|
-
}
|
|
17321
|
-
const obj_id = obj.id;
|
|
17322
|
-
const path_id = path + '.id';
|
|
17323
|
-
if (typeof obj_id !== 'string') {
|
|
17324
|
-
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
17325
|
-
}
|
|
17326
|
-
const obj_label = obj.label;
|
|
17327
|
-
const path_label = path + '.label';
|
|
17328
|
-
if (typeof obj_label !== 'string') {
|
|
17329
|
-
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
17330
|
-
}
|
|
17331
|
-
})();
|
|
17332
|
-
return v_error === undefined ? null : v_error;
|
|
17333
|
-
}
|
|
17334
17273
|
const select$1Q = function ListScopeEntityRepresentationSelect() {
|
|
17335
17274
|
return {
|
|
17336
17275
|
kind: 'Fragment',
|
|
@@ -17350,29 +17289,6 @@ const select$1Q = function ListScopeEntityRepresentationSelect() {
|
|
|
17350
17289
|
};
|
|
17351
17290
|
|
|
17352
17291
|
const VERSION$1h = "3b85c5a08d50ce328481b9f8ab56127b";
|
|
17353
|
-
function validate$1F(obj, path = 'ListScopeRelatedEntityRepresentation') {
|
|
17354
|
-
const v_error = (() => {
|
|
17355
|
-
if (typeof obj !== 'object' || ArrayIsArray$2(obj) || obj === null) {
|
|
17356
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
17357
|
-
}
|
|
17358
|
-
const obj_id = obj.id;
|
|
17359
|
-
const path_id = path + '.id';
|
|
17360
|
-
if (typeof obj_id !== 'string') {
|
|
17361
|
-
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
17362
|
-
}
|
|
17363
|
-
const obj_label = obj.label;
|
|
17364
|
-
const path_label = path + '.label';
|
|
17365
|
-
if (typeof obj_label !== 'string') {
|
|
17366
|
-
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
17367
|
-
}
|
|
17368
|
-
const obj_type = obj.type;
|
|
17369
|
-
const path_type = path + '.type';
|
|
17370
|
-
if (typeof obj_type !== 'string') {
|
|
17371
|
-
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
17372
|
-
}
|
|
17373
|
-
})();
|
|
17374
|
-
return v_error === undefined ? null : v_error;
|
|
17375
|
-
}
|
|
17376
17292
|
const select$1P = function ListScopeRelatedEntityRepresentationSelect() {
|
|
17377
17293
|
return {
|
|
17378
17294
|
kind: 'Fragment',
|
|
@@ -17395,83 +17311,7 @@ const select$1P = function ListScopeRelatedEntityRepresentationSelect() {
|
|
|
17395
17311
|
};
|
|
17396
17312
|
};
|
|
17397
17313
|
|
|
17398
|
-
const VERSION$1g = "
|
|
17399
|
-
function validate$1E(obj, path = 'ListScopeRepresentation') {
|
|
17400
|
-
const v_error = (() => {
|
|
17401
|
-
if (typeof obj !== 'object' || ArrayIsArray$2(obj) || obj === null) {
|
|
17402
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
17403
|
-
}
|
|
17404
|
-
const obj_apiName = obj.apiName;
|
|
17405
|
-
const path_apiName = path + '.apiName';
|
|
17406
|
-
if (typeof obj_apiName !== 'string') {
|
|
17407
|
-
return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
|
|
17408
|
-
}
|
|
17409
|
-
const obj_entity = obj.entity;
|
|
17410
|
-
const path_entity = path + '.entity';
|
|
17411
|
-
let obj_entity_union0 = null;
|
|
17412
|
-
const obj_entity_union0_error = (() => {
|
|
17413
|
-
const referencepath_entityValidationError = validate$1G(obj_entity, path_entity);
|
|
17414
|
-
if (referencepath_entityValidationError !== null) {
|
|
17415
|
-
let message = 'Object doesn\'t match ListScopeEntityRepresentation (at "' + path_entity + '")\n';
|
|
17416
|
-
message += referencepath_entityValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
17417
|
-
return new TypeError(message);
|
|
17418
|
-
}
|
|
17419
|
-
})();
|
|
17420
|
-
if (obj_entity_union0_error != null) {
|
|
17421
|
-
obj_entity_union0 = obj_entity_union0_error.message;
|
|
17422
|
-
}
|
|
17423
|
-
let obj_entity_union1 = null;
|
|
17424
|
-
const obj_entity_union1_error = (() => {
|
|
17425
|
-
if (obj_entity !== null) {
|
|
17426
|
-
return new TypeError('Expected "null" but received "' + typeof obj_entity + '" (at "' + path_entity + '")');
|
|
17427
|
-
}
|
|
17428
|
-
})();
|
|
17429
|
-
if (obj_entity_union1_error != null) {
|
|
17430
|
-
obj_entity_union1 = obj_entity_union1_error.message;
|
|
17431
|
-
}
|
|
17432
|
-
if (obj_entity_union0 && obj_entity_union1) {
|
|
17433
|
-
let message = 'Object doesn\'t match union (at "' + path_entity + '")';
|
|
17434
|
-
message += '\n' + obj_entity_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
17435
|
-
message += '\n' + obj_entity_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
17436
|
-
return new TypeError(message);
|
|
17437
|
-
}
|
|
17438
|
-
const obj_label = obj.label;
|
|
17439
|
-
const path_label = path + '.label';
|
|
17440
|
-
if (typeof obj_label !== 'string') {
|
|
17441
|
-
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
17442
|
-
}
|
|
17443
|
-
const obj_relatedEntity = obj.relatedEntity;
|
|
17444
|
-
const path_relatedEntity = path + '.relatedEntity';
|
|
17445
|
-
let obj_relatedEntity_union0 = null;
|
|
17446
|
-
const obj_relatedEntity_union0_error = (() => {
|
|
17447
|
-
const referencepath_relatedEntityValidationError = validate$1F(obj_relatedEntity, path_relatedEntity);
|
|
17448
|
-
if (referencepath_relatedEntityValidationError !== null) {
|
|
17449
|
-
let message = 'Object doesn\'t match ListScopeRelatedEntityRepresentation (at "' + path_relatedEntity + '")\n';
|
|
17450
|
-
message += referencepath_relatedEntityValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
17451
|
-
return new TypeError(message);
|
|
17452
|
-
}
|
|
17453
|
-
})();
|
|
17454
|
-
if (obj_relatedEntity_union0_error != null) {
|
|
17455
|
-
obj_relatedEntity_union0 = obj_relatedEntity_union0_error.message;
|
|
17456
|
-
}
|
|
17457
|
-
let obj_relatedEntity_union1 = null;
|
|
17458
|
-
const obj_relatedEntity_union1_error = (() => {
|
|
17459
|
-
if (obj_relatedEntity !== null) {
|
|
17460
|
-
return new TypeError('Expected "null" but received "' + typeof obj_relatedEntity + '" (at "' + path_relatedEntity + '")');
|
|
17461
|
-
}
|
|
17462
|
-
})();
|
|
17463
|
-
if (obj_relatedEntity_union1_error != null) {
|
|
17464
|
-
obj_relatedEntity_union1 = obj_relatedEntity_union1_error.message;
|
|
17465
|
-
}
|
|
17466
|
-
if (obj_relatedEntity_union0 && obj_relatedEntity_union1) {
|
|
17467
|
-
let message = 'Object doesn\'t match union (at "' + path_relatedEntity + '")';
|
|
17468
|
-
message += '\n' + obj_relatedEntity_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
17469
|
-
message += '\n' + obj_relatedEntity_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
17470
|
-
return new TypeError(message);
|
|
17471
|
-
}
|
|
17472
|
-
})();
|
|
17473
|
-
return v_error === undefined ? null : v_error;
|
|
17474
|
-
}
|
|
17314
|
+
const VERSION$1g = "2fe9814e7124b47f59da585483c1b3f9";
|
|
17475
17315
|
const select$1O = function ListScopeRepresentationSelect() {
|
|
17476
17316
|
const { selections: ListScopeEntityRepresentation__selections, opaque: ListScopeEntityRepresentation__opaque, } = select$1Q();
|
|
17477
17317
|
const { selections: ListScopeRelatedEntityRepresentation__selections, opaque: ListScopeRelatedEntityRepresentation__opaque, } = select$1P();
|
|
@@ -17526,7 +17366,7 @@ const select$1N = function ListUserPreferenceRepresentationSelect() {
|
|
|
17526
17366
|
};
|
|
17527
17367
|
|
|
17528
17368
|
const TTL$y = 900000;
|
|
17529
|
-
const VERSION$1e = "
|
|
17369
|
+
const VERSION$1e = "0dbff3feaaa7ced2709e9ae46c58a3e7";
|
|
17530
17370
|
const RepresentationType$R = 'ListInfoRepresentation';
|
|
17531
17371
|
function keyBuilder$1V(luvio, config) {
|
|
17532
17372
|
return keyPrefix$1 + '::' + RepresentationType$R + ':' + (config.listViewApiName === null ? '' : config.listViewApiName) + ':' + config.objectApiName + ':' + config.type;
|
|
@@ -17543,9 +17383,10 @@ function normalize$L(input, existing, path, luvio, store, timestamp) {
|
|
|
17543
17383
|
return input;
|
|
17544
17384
|
}
|
|
17545
17385
|
const select$1M = function ListInfoRepresentationSelect() {
|
|
17546
|
-
const { selections: ListColumnRepresentation__selections, opaque: ListColumnRepresentation__opaque, } = select$
|
|
17547
|
-
const { selections: ListFilterByInfoRepresentation__selections, opaque: ListFilterByInfoRepresentation__opaque, } = select$
|
|
17548
|
-
const { selections: ListReferenceRepresentation__selections, opaque: ListReferenceRepresentation__opaque, } = select$
|
|
17386
|
+
const { selections: ListColumnRepresentation__selections, opaque: ListColumnRepresentation__opaque, } = select$1W$1();
|
|
17387
|
+
const { selections: ListFilterByInfoRepresentation__selections, opaque: ListFilterByInfoRepresentation__opaque, } = select$1V();
|
|
17388
|
+
const { selections: ListReferenceRepresentation__selections, opaque: ListReferenceRepresentation__opaque, } = select$1U();
|
|
17389
|
+
const { selections: ListInfoShareCategoryRepresentation__selections, opaque: ListInfoShareCategoryRepresentation__opaque, } = select$1S();
|
|
17549
17390
|
const { selections: ListOrderByInfoRepresentation__selections, opaque: ListOrderByInfoRepresentation__opaque, } = select$1R();
|
|
17550
17391
|
const { selections: ListScopeRepresentation__selections, opaque: ListScopeRepresentation__opaque, } = select$1O();
|
|
17551
17392
|
const { selections: ListUserPreferenceRepresentation__selections, opaque: ListUserPreferenceRepresentation__opaque, } = select$1N();
|
|
@@ -17593,6 +17434,13 @@ const select$1M = function ListInfoRepresentationSelect() {
|
|
|
17593
17434
|
kind: 'Object',
|
|
17594
17435
|
selections: ListReferenceRepresentation__selections
|
|
17595
17436
|
},
|
|
17437
|
+
{
|
|
17438
|
+
name: 'listShares',
|
|
17439
|
+
kind: 'Object',
|
|
17440
|
+
plural: true,
|
|
17441
|
+
selections: ListInfoShareCategoryRepresentation__selections,
|
|
17442
|
+
required: false
|
|
17443
|
+
},
|
|
17596
17444
|
{
|
|
17597
17445
|
name: 'objectApiNames',
|
|
17598
17446
|
kind: 'Scalar',
|
|
@@ -20505,6 +20353,7 @@ function createChildRecordNormalize(fieldsTrie, optionalFieldsTrie, recordConfli
|
|
|
20505
20353
|
const createRecordIngest = (fieldsTrie, optionalFieldsTrie, recordConflictMap) => {
|
|
20506
20354
|
const childNormalize = createChildRecordNormalize(fieldsTrie, optionalFieldsTrie, recordConflictMap);
|
|
20507
20355
|
return (input, path, luvio, store, timestamp) => {
|
|
20356
|
+
input.eTag = ''; //[W-13724550] Record Reps ALWAYS have '' etag, to be consistent with GraphQL, as it is not queryable via GraphQL.
|
|
20508
20357
|
const key = keyBuilderFromType$z(luvio, input);
|
|
20509
20358
|
let existingRecord = store.readEntry(key);
|
|
20510
20359
|
const recordPath = {
|
|
@@ -21206,6 +21055,7 @@ function resolveConflict(luvio, map) {
|
|
|
21206
21055
|
|
|
21207
21056
|
const createIngestRecordWithFields = (fields, optionalFields) => {
|
|
21208
21057
|
return (input, path, luvio, store, timestamp) => {
|
|
21058
|
+
input.eTag = ''; //[W-13724550] Record Reps ALWAYS have '' etag, to be consistent with GraphQL, as it is not queryable via GraphQL.
|
|
21209
21059
|
const conflictMap = {
|
|
21210
21060
|
conflicts: {},
|
|
21211
21061
|
serverRequestCount: 0,
|
|
@@ -21358,7 +21208,7 @@ function normalize$H(input, existing, path, luvio, store, timestamp) {
|
|
|
21358
21208
|
return input;
|
|
21359
21209
|
}
|
|
21360
21210
|
const select$1H = function ListRecordCollectionRepresentationSelect(paginationParams) {
|
|
21361
|
-
const { selections: ListReferenceRepresentation__selections, opaque: ListReferenceRepresentation__opaque, } = select$
|
|
21211
|
+
const { selections: ListReferenceRepresentation__selections, opaque: ListReferenceRepresentation__opaque, } = select$1U();
|
|
21362
21212
|
return {
|
|
21363
21213
|
kind: 'Fragment',
|
|
21364
21214
|
reader: true,
|
|
@@ -21472,7 +21322,7 @@ const dynamicSelect$7 = function dynamicListRecordCollectionRepresentationSelect
|
|
|
21472
21322
|
kind: 'Link',
|
|
21473
21323
|
fragment: select$1I()
|
|
21474
21324
|
} : params.records;
|
|
21475
|
-
const { selections: ListReferenceRepresentation__selections, opaque: ListReferenceRepresentation__opaque, } = select$
|
|
21325
|
+
const { selections: ListReferenceRepresentation__selections, opaque: ListReferenceRepresentation__opaque, } = select$1U();
|
|
21476
21326
|
return {
|
|
21477
21327
|
kind: 'Fragment',
|
|
21478
21328
|
reader: true,
|
|
@@ -27374,7 +27224,7 @@ const getRecordEditActionsAdapterFactory = (luvio) => function UiApi__getRecordE
|
|
|
27374
27224
|
buildCachedSnapshotCachePolicy$B, buildNetworkSnapshotCachePolicy$B);
|
|
27375
27225
|
};
|
|
27376
27226
|
|
|
27377
|
-
function validate$
|
|
27227
|
+
function validate$19(obj, path = 'ActionRelatedListSingleBatchInputRepresentation') {
|
|
27378
27228
|
const v_error = (() => {
|
|
27379
27229
|
if (typeof obj !== 'object' || ArrayIsArray$2(obj) || obj === null) {
|
|
27380
27230
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -27785,7 +27635,7 @@ function typeCheckConfig$N(untrustedConfig) {
|
|
|
27785
27635
|
const untrustedConfig_relatedListsActionParameters_array = [];
|
|
27786
27636
|
for (let i = 0, arrayLength = untrustedConfig_relatedListsActionParameters.length; i < arrayLength; i++) {
|
|
27787
27637
|
const untrustedConfig_relatedListsActionParameters_item = untrustedConfig_relatedListsActionParameters[i];
|
|
27788
|
-
const referenceActionRelatedListSingleBatchInputRepresentationValidationError = validate$
|
|
27638
|
+
const referenceActionRelatedListSingleBatchInputRepresentationValidationError = validate$19(untrustedConfig_relatedListsActionParameters_item);
|
|
27789
27639
|
if (referenceActionRelatedListSingleBatchInputRepresentationValidationError === null) {
|
|
27790
27640
|
untrustedConfig_relatedListsActionParameters_array.push(untrustedConfig_relatedListsActionParameters_item);
|
|
27791
27641
|
}
|
|
@@ -30024,6 +29874,103 @@ const getListInfosByNameAdapterFactory = (luvio) => function UiApi__getListInfos
|
|
|
30024
29874
|
buildCachedSnapshotCachePolicy$s, buildNetworkSnapshotCachePolicy$s);
|
|
30025
29875
|
};
|
|
30026
29876
|
|
|
29877
|
+
function validate$$(obj, path = 'ListFilterByInfoInputRepresentation') {
|
|
29878
|
+
const v_error = (() => {
|
|
29879
|
+
if (typeof obj !== 'object' || ArrayIsArray$2(obj) || obj === null) {
|
|
29880
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
29881
|
+
}
|
|
29882
|
+
const obj_fieldApiName = obj.fieldApiName;
|
|
29883
|
+
const path_fieldApiName = path + '.fieldApiName';
|
|
29884
|
+
if (typeof obj_fieldApiName !== 'string') {
|
|
29885
|
+
return new TypeError('Expected "string" but received "' + typeof obj_fieldApiName + '" (at "' + path_fieldApiName + '")');
|
|
29886
|
+
}
|
|
29887
|
+
const obj_operandLabels = obj.operandLabels;
|
|
29888
|
+
const path_operandLabels = path + '.operandLabels';
|
|
29889
|
+
if (!ArrayIsArray$2(obj_operandLabels)) {
|
|
29890
|
+
return new TypeError('Expected "array" but received "' + typeof obj_operandLabels + '" (at "' + path_operandLabels + '")');
|
|
29891
|
+
}
|
|
29892
|
+
for (let i = 0; i < obj_operandLabels.length; i++) {
|
|
29893
|
+
const obj_operandLabels_item = obj_operandLabels[i];
|
|
29894
|
+
const path_operandLabels_item = path_operandLabels + '[' + i + ']';
|
|
29895
|
+
if (typeof obj_operandLabels_item !== 'string') {
|
|
29896
|
+
return new TypeError('Expected "string" but received "' + typeof obj_operandLabels_item + '" (at "' + path_operandLabels_item + '")');
|
|
29897
|
+
}
|
|
29898
|
+
}
|
|
29899
|
+
const obj_operator = obj.operator;
|
|
29900
|
+
const path_operator = path + '.operator';
|
|
29901
|
+
if (typeof obj_operator !== 'string') {
|
|
29902
|
+
return new TypeError('Expected "string" but received "' + typeof obj_operator + '" (at "' + path_operator + '")');
|
|
29903
|
+
}
|
|
29904
|
+
})();
|
|
29905
|
+
return v_error === undefined ? null : v_error;
|
|
29906
|
+
}
|
|
29907
|
+
|
|
29908
|
+
function validate$_(obj, path = 'ListScopeInputRepresentation') {
|
|
29909
|
+
const v_error = (() => {
|
|
29910
|
+
if (typeof obj !== 'object' || ArrayIsArray$2(obj) || obj === null) {
|
|
29911
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
29912
|
+
}
|
|
29913
|
+
const obj_apiName = obj.apiName;
|
|
29914
|
+
const path_apiName = path + '.apiName';
|
|
29915
|
+
if (typeof obj_apiName !== 'string') {
|
|
29916
|
+
return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
|
|
29917
|
+
}
|
|
29918
|
+
const obj_entityId = obj.entityId;
|
|
29919
|
+
const path_entityId = path + '.entityId';
|
|
29920
|
+
let obj_entityId_union0 = null;
|
|
29921
|
+
const obj_entityId_union0_error = (() => {
|
|
29922
|
+
if (typeof obj_entityId !== 'string') {
|
|
29923
|
+
return new TypeError('Expected "string" but received "' + typeof obj_entityId + '" (at "' + path_entityId + '")');
|
|
29924
|
+
}
|
|
29925
|
+
})();
|
|
29926
|
+
if (obj_entityId_union0_error != null) {
|
|
29927
|
+
obj_entityId_union0 = obj_entityId_union0_error.message;
|
|
29928
|
+
}
|
|
29929
|
+
let obj_entityId_union1 = null;
|
|
29930
|
+
const obj_entityId_union1_error = (() => {
|
|
29931
|
+
if (obj_entityId !== null) {
|
|
29932
|
+
return new TypeError('Expected "null" but received "' + typeof obj_entityId + '" (at "' + path_entityId + '")');
|
|
29933
|
+
}
|
|
29934
|
+
})();
|
|
29935
|
+
if (obj_entityId_union1_error != null) {
|
|
29936
|
+
obj_entityId_union1 = obj_entityId_union1_error.message;
|
|
29937
|
+
}
|
|
29938
|
+
if (obj_entityId_union0 && obj_entityId_union1) {
|
|
29939
|
+
let message = 'Object doesn\'t match union (at "' + path_entityId + '")';
|
|
29940
|
+
message += '\n' + obj_entityId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
29941
|
+
message += '\n' + obj_entityId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
29942
|
+
return new TypeError(message);
|
|
29943
|
+
}
|
|
29944
|
+
const obj_relatedEntityId = obj.relatedEntityId;
|
|
29945
|
+
const path_relatedEntityId = path + '.relatedEntityId';
|
|
29946
|
+
let obj_relatedEntityId_union0 = null;
|
|
29947
|
+
const obj_relatedEntityId_union0_error = (() => {
|
|
29948
|
+
if (typeof obj_relatedEntityId !== 'string') {
|
|
29949
|
+
return new TypeError('Expected "string" but received "' + typeof obj_relatedEntityId + '" (at "' + path_relatedEntityId + '")');
|
|
29950
|
+
}
|
|
29951
|
+
})();
|
|
29952
|
+
if (obj_relatedEntityId_union0_error != null) {
|
|
29953
|
+
obj_relatedEntityId_union0 = obj_relatedEntityId_union0_error.message;
|
|
29954
|
+
}
|
|
29955
|
+
let obj_relatedEntityId_union1 = null;
|
|
29956
|
+
const obj_relatedEntityId_union1_error = (() => {
|
|
29957
|
+
if (obj_relatedEntityId !== null) {
|
|
29958
|
+
return new TypeError('Expected "null" but received "' + typeof obj_relatedEntityId + '" (at "' + path_relatedEntityId + '")');
|
|
29959
|
+
}
|
|
29960
|
+
})();
|
|
29961
|
+
if (obj_relatedEntityId_union1_error != null) {
|
|
29962
|
+
obj_relatedEntityId_union1 = obj_relatedEntityId_union1_error.message;
|
|
29963
|
+
}
|
|
29964
|
+
if (obj_relatedEntityId_union0 && obj_relatedEntityId_union1) {
|
|
29965
|
+
let message = 'Object doesn\'t match union (at "' + path_relatedEntityId + '")';
|
|
29966
|
+
message += '\n' + obj_relatedEntityId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
29967
|
+
message += '\n' + obj_relatedEntityId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
29968
|
+
return new TypeError(message);
|
|
29969
|
+
}
|
|
29970
|
+
})();
|
|
29971
|
+
return v_error === undefined ? null : v_error;
|
|
29972
|
+
}
|
|
29973
|
+
|
|
30027
29974
|
function select$14$1(luvio, params) {
|
|
30028
29975
|
return select$1M();
|
|
30029
29976
|
}
|
|
@@ -30059,10 +30006,11 @@ function createResourceRequest$B(config) {
|
|
|
30059
30006
|
const adapterName$A = 'createListInfo';
|
|
30060
30007
|
const createListInfo_ConfigPropertyMetadata = [
|
|
30061
30008
|
generateParamConfigMetadata$2('objectApiName', true, 0 /* UrlParameter */, 0 /* String */, false, getObjectApiName$1$1),
|
|
30062
|
-
generateParamConfigMetadata$2('displayColumns', false, 2 /* Body */,
|
|
30063
|
-
generateParamConfigMetadata$2('filterLogicString', false, 2 /* Body */,
|
|
30009
|
+
generateParamConfigMetadata$2('displayColumns', false, 2 /* Body */, 0 /* String */, true),
|
|
30010
|
+
generateParamConfigMetadata$2('filterLogicString', false, 2 /* Body */, 0 /* String */),
|
|
30064
30011
|
generateParamConfigMetadata$2('filteredByInfo', false, 2 /* Body */, 4 /* Unsupported */, true),
|
|
30065
30012
|
generateParamConfigMetadata$2('label', false, 2 /* Body */, 0 /* String */),
|
|
30013
|
+
generateParamConfigMetadata$2('listShares', false, 2 /* Body */, 0 /* String */, true),
|
|
30066
30014
|
generateParamConfigMetadata$2('listViewApiName', false, 2 /* Body */, 0 /* String */),
|
|
30067
30015
|
generateParamConfigMetadata$2('scope', false, 2 /* Body */, 4 /* Unsupported */),
|
|
30068
30016
|
generateParamConfigMetadata$2('visibility', false, 2 /* Body */, 0 /* String */),
|
|
@@ -30072,46 +30020,21 @@ const createResourceParams$A = /*#__PURE__*/ createResourceParams$Z(createListIn
|
|
|
30072
30020
|
function typeCheckConfig$E(untrustedConfig) {
|
|
30073
30021
|
const config = {};
|
|
30074
30022
|
typeCheckConfig$12(untrustedConfig, config, createListInfo_ConfigPropertyMetadata);
|
|
30075
|
-
const untrustedConfig_displayColumns = untrustedConfig.displayColumns;
|
|
30076
|
-
if (ArrayIsArray$1(untrustedConfig_displayColumns)) {
|
|
30077
|
-
const untrustedConfig_displayColumns_array = [];
|
|
30078
|
-
for (let i = 0, arrayLength = untrustedConfig_displayColumns.length; i < arrayLength; i++) {
|
|
30079
|
-
const untrustedConfig_displayColumns_item = untrustedConfig_displayColumns[i];
|
|
30080
|
-
const referenceListColumnRepresentationValidationError = validate$1K(untrustedConfig_displayColumns_item);
|
|
30081
|
-
if (referenceListColumnRepresentationValidationError === null) {
|
|
30082
|
-
untrustedConfig_displayColumns_array.push(untrustedConfig_displayColumns_item);
|
|
30083
|
-
}
|
|
30084
|
-
if (untrustedConfig_displayColumns_item === null) {
|
|
30085
|
-
untrustedConfig_displayColumns_array.push(untrustedConfig_displayColumns_item);
|
|
30086
|
-
}
|
|
30087
|
-
}
|
|
30088
|
-
config.displayColumns = untrustedConfig_displayColumns_array;
|
|
30089
|
-
}
|
|
30090
|
-
const untrustedConfig_filterLogicString = untrustedConfig.filterLogicString;
|
|
30091
|
-
if (typeof untrustedConfig_filterLogicString === 'string') {
|
|
30092
|
-
config.filterLogicString = untrustedConfig_filterLogicString;
|
|
30093
|
-
}
|
|
30094
|
-
if (untrustedConfig_filterLogicString === null) {
|
|
30095
|
-
config.filterLogicString = untrustedConfig_filterLogicString;
|
|
30096
|
-
}
|
|
30097
30023
|
const untrustedConfig_filteredByInfo = untrustedConfig.filteredByInfo;
|
|
30098
30024
|
if (ArrayIsArray$1(untrustedConfig_filteredByInfo)) {
|
|
30099
30025
|
const untrustedConfig_filteredByInfo_array = [];
|
|
30100
30026
|
for (let i = 0, arrayLength = untrustedConfig_filteredByInfo.length; i < arrayLength; i++) {
|
|
30101
30027
|
const untrustedConfig_filteredByInfo_item = untrustedConfig_filteredByInfo[i];
|
|
30102
|
-
const
|
|
30103
|
-
if (
|
|
30028
|
+
const referenceListFilterByInfoInputRepresentationValidationError = validate$$(untrustedConfig_filteredByInfo_item);
|
|
30029
|
+
if (referenceListFilterByInfoInputRepresentationValidationError === null) {
|
|
30104
30030
|
untrustedConfig_filteredByInfo_array.push(untrustedConfig_filteredByInfo_item);
|
|
30105
30031
|
}
|
|
30106
30032
|
}
|
|
30107
30033
|
config.filteredByInfo = untrustedConfig_filteredByInfo_array;
|
|
30108
30034
|
}
|
|
30109
30035
|
const untrustedConfig_scope = untrustedConfig.scope;
|
|
30110
|
-
const
|
|
30111
|
-
if (
|
|
30112
|
-
config.scope = untrustedConfig_scope;
|
|
30113
|
-
}
|
|
30114
|
-
if (untrustedConfig_scope === null) {
|
|
30036
|
+
const referenceListScopeInputRepresentationValidationError = validate$_(untrustedConfig_scope);
|
|
30037
|
+
if (referenceListScopeInputRepresentationValidationError === null) {
|
|
30115
30038
|
config.scope = untrustedConfig_scope;
|
|
30116
30039
|
}
|
|
30117
30040
|
return config;
|
|
@@ -30276,10 +30199,11 @@ const adapterName$y = 'updateListInfoByName';
|
|
|
30276
30199
|
const updateListInfoByName_ConfigPropertyMetadata = [
|
|
30277
30200
|
generateParamConfigMetadata$2('listViewApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
30278
30201
|
generateParamConfigMetadata$2('objectApiName', true, 0 /* UrlParameter */, 0 /* String */, false, getObjectApiName$1$1),
|
|
30279
|
-
generateParamConfigMetadata$2('displayColumns', false, 2 /* Body */,
|
|
30280
|
-
generateParamConfigMetadata$2('filterLogicString', false, 2 /* Body */,
|
|
30202
|
+
generateParamConfigMetadata$2('displayColumns', false, 2 /* Body */, 0 /* String */, true),
|
|
30203
|
+
generateParamConfigMetadata$2('filterLogicString', false, 2 /* Body */, 0 /* String */),
|
|
30281
30204
|
generateParamConfigMetadata$2('filteredByInfo', false, 2 /* Body */, 4 /* Unsupported */, true),
|
|
30282
30205
|
generateParamConfigMetadata$2('label', false, 2 /* Body */, 0 /* String */),
|
|
30206
|
+
generateParamConfigMetadata$2('listShares', false, 2 /* Body */, 0 /* String */, true),
|
|
30283
30207
|
generateParamConfigMetadata$2('scope', false, 2 /* Body */, 4 /* Unsupported */),
|
|
30284
30208
|
generateParamConfigMetadata$2('visibility', false, 2 /* Body */, 0 /* String */),
|
|
30285
30209
|
];
|
|
@@ -30288,46 +30212,21 @@ const createResourceParams$y = /*#__PURE__*/ createResourceParams$Z(updateListIn
|
|
|
30288
30212
|
function typeCheckConfig$C(untrustedConfig) {
|
|
30289
30213
|
const config = {};
|
|
30290
30214
|
typeCheckConfig$12(untrustedConfig, config, updateListInfoByName_ConfigPropertyMetadata);
|
|
30291
|
-
const untrustedConfig_displayColumns = untrustedConfig.displayColumns;
|
|
30292
|
-
if (ArrayIsArray$1(untrustedConfig_displayColumns)) {
|
|
30293
|
-
const untrustedConfig_displayColumns_array = [];
|
|
30294
|
-
for (let i = 0, arrayLength = untrustedConfig_displayColumns.length; i < arrayLength; i++) {
|
|
30295
|
-
const untrustedConfig_displayColumns_item = untrustedConfig_displayColumns[i];
|
|
30296
|
-
const referenceListColumnRepresentationValidationError = validate$1K(untrustedConfig_displayColumns_item);
|
|
30297
|
-
if (referenceListColumnRepresentationValidationError === null) {
|
|
30298
|
-
untrustedConfig_displayColumns_array.push(untrustedConfig_displayColumns_item);
|
|
30299
|
-
}
|
|
30300
|
-
if (untrustedConfig_displayColumns_item === null) {
|
|
30301
|
-
untrustedConfig_displayColumns_array.push(untrustedConfig_displayColumns_item);
|
|
30302
|
-
}
|
|
30303
|
-
}
|
|
30304
|
-
config.displayColumns = untrustedConfig_displayColumns_array;
|
|
30305
|
-
}
|
|
30306
|
-
const untrustedConfig_filterLogicString = untrustedConfig.filterLogicString;
|
|
30307
|
-
if (typeof untrustedConfig_filterLogicString === 'string') {
|
|
30308
|
-
config.filterLogicString = untrustedConfig_filterLogicString;
|
|
30309
|
-
}
|
|
30310
|
-
if (untrustedConfig_filterLogicString === null) {
|
|
30311
|
-
config.filterLogicString = untrustedConfig_filterLogicString;
|
|
30312
|
-
}
|
|
30313
30215
|
const untrustedConfig_filteredByInfo = untrustedConfig.filteredByInfo;
|
|
30314
30216
|
if (ArrayIsArray$1(untrustedConfig_filteredByInfo)) {
|
|
30315
30217
|
const untrustedConfig_filteredByInfo_array = [];
|
|
30316
30218
|
for (let i = 0, arrayLength = untrustedConfig_filteredByInfo.length; i < arrayLength; i++) {
|
|
30317
30219
|
const untrustedConfig_filteredByInfo_item = untrustedConfig_filteredByInfo[i];
|
|
30318
|
-
const
|
|
30319
|
-
if (
|
|
30220
|
+
const referenceListFilterByInfoInputRepresentationValidationError = validate$$(untrustedConfig_filteredByInfo_item);
|
|
30221
|
+
if (referenceListFilterByInfoInputRepresentationValidationError === null) {
|
|
30320
30222
|
untrustedConfig_filteredByInfo_array.push(untrustedConfig_filteredByInfo_item);
|
|
30321
30223
|
}
|
|
30322
30224
|
}
|
|
30323
30225
|
config.filteredByInfo = untrustedConfig_filteredByInfo_array;
|
|
30324
30226
|
}
|
|
30325
30227
|
const untrustedConfig_scope = untrustedConfig.scope;
|
|
30326
|
-
const
|
|
30327
|
-
if (
|
|
30328
|
-
config.scope = untrustedConfig_scope;
|
|
30329
|
-
}
|
|
30330
|
-
if (untrustedConfig_scope === null) {
|
|
30228
|
+
const referenceListScopeInputRepresentationValidationError = validate$_(untrustedConfig_scope);
|
|
30229
|
+
if (referenceListScopeInputRepresentationValidationError === null) {
|
|
30331
30230
|
config.scope = untrustedConfig_scope;
|
|
30332
30231
|
}
|
|
30333
30232
|
return config;
|
|
@@ -34817,16 +34716,6 @@ function createResourceRequest$n(config) {
|
|
|
34817
34716
|
};
|
|
34818
34717
|
}
|
|
34819
34718
|
|
|
34820
|
-
const adapterName$k = 'updateRelatedListInfo';
|
|
34821
|
-
const updateRelatedListInfo_ConfigPropertyMetadata = [
|
|
34822
|
-
generateParamConfigMetadata$2('parentObjectApiName', true, 0 /* UrlParameter */, 0 /* String */, false, getObjectApiName$1$1),
|
|
34823
|
-
generateParamConfigMetadata$2('relatedListId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
34824
|
-
generateParamConfigMetadata$2('recordTypeId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
34825
|
-
generateParamConfigMetadata$2('orderedByInfo', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
34826
|
-
generateParamConfigMetadata$2('userPreferences', true, 2 /* Body */, 4 /* Unsupported */),
|
|
34827
|
-
];
|
|
34828
|
-
const updateRelatedListInfo_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig$2(adapterName$k, updateRelatedListInfo_ConfigPropertyMetadata);
|
|
34829
|
-
const createResourceParams$m = /*#__PURE__*/ createResourceParams$Z(updateRelatedListInfo_ConfigPropertyMetadata);
|
|
34830
34719
|
function typeCheckConfig$o(untrustedConfig) {
|
|
34831
34720
|
const config = {};
|
|
34832
34721
|
typeCheckConfig$12(untrustedConfig, config, updateRelatedListInfo_ConfigPropertyMetadata);
|
|
@@ -34847,8 +34736,22 @@ function typeCheckConfig$o(untrustedConfig) {
|
|
|
34847
34736
|
if (referenceListUserPreferenceInputRepresentationValidationError === null) {
|
|
34848
34737
|
config.userPreferences = untrustedConfig_userPreferences;
|
|
34849
34738
|
}
|
|
34739
|
+
else {
|
|
34740
|
+
throw referenceListUserPreferenceInputRepresentationValidationError;
|
|
34741
|
+
}
|
|
34850
34742
|
return config;
|
|
34851
34743
|
}
|
|
34744
|
+
|
|
34745
|
+
const adapterName$k = 'updateRelatedListInfo';
|
|
34746
|
+
const updateRelatedListInfo_ConfigPropertyMetadata = [
|
|
34747
|
+
generateParamConfigMetadata$2('parentObjectApiName', true, 0 /* UrlParameter */, 0 /* String */, false, getObjectApiName$1$1),
|
|
34748
|
+
generateParamConfigMetadata$2('relatedListId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
34749
|
+
generateParamConfigMetadata$2('recordTypeId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
34750
|
+
generateParamConfigMetadata$2('orderedByInfo', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
34751
|
+
generateParamConfigMetadata$2('userPreferences', true, 2 /* Body */, 4 /* Unsupported */),
|
|
34752
|
+
];
|
|
34753
|
+
const updateRelatedListInfo_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig$2(adapterName$k, updateRelatedListInfo_ConfigPropertyMetadata);
|
|
34754
|
+
const createResourceParams$m = /*#__PURE__*/ createResourceParams$Z(updateRelatedListInfo_ConfigPropertyMetadata);
|
|
34852
34755
|
function validateAdapterConfig$n(untrustedConfig, configPropertyNames) {
|
|
34853
34756
|
if (!untrustedIsObject$2(untrustedConfig)) {
|
|
34854
34757
|
return null;
|
|
@@ -40816,7 +40719,7 @@ const factory$2 = (luvio) => {
|
|
|
40816
40719
|
};
|
|
40817
40720
|
};
|
|
40818
40721
|
|
|
40819
|
-
const VERSION$
|
|
40722
|
+
const VERSION$1p = "5f97eb4f2c3f805ef9d98ba7f0530b3e";
|
|
40820
40723
|
const RepresentationType$S = 'ContentDocumentCompositeRepresentation';
|
|
40821
40724
|
function keyBuilder$1W(luvio, config) {
|
|
40822
40725
|
return keyPrefix$1 + '::' + RepresentationType$S + ':' + config.contentDocumentId;
|
|
@@ -40896,7 +40799,7 @@ function equals$12(existing, incoming) {
|
|
|
40896
40799
|
const ingest$15 = function ContentDocumentCompositeRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
40897
40800
|
const key = keyBuilderFromType$B(luvio, input);
|
|
40898
40801
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 2592000000;
|
|
40899
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "UiApi", VERSION$
|
|
40802
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "UiApi", VERSION$1p, RepresentationType$S, equals$12);
|
|
40900
40803
|
return createLink$3(key);
|
|
40901
40804
|
};
|
|
40902
40805
|
function getTypeCacheKeys$18(rootKeySet, luvio, input, fullPathFactory) {
|
|
@@ -40963,11 +40866,11 @@ function createResourceRequest$1$1(config) {
|
|
|
40963
40866
|
priority: 'normal',
|
|
40964
40867
|
};
|
|
40965
40868
|
}
|
|
40966
|
-
const select$
|
|
40869
|
+
const select$21 = function ContentDocumentCompositeRepresentationSelect(body) {
|
|
40967
40870
|
return {
|
|
40968
40871
|
kind: 'Fragment',
|
|
40969
40872
|
private: [],
|
|
40970
|
-
version: VERSION$
|
|
40873
|
+
version: VERSION$1p,
|
|
40971
40874
|
selections: [
|
|
40972
40875
|
{
|
|
40973
40876
|
name: 'contentDocument',
|
|
@@ -41006,7 +40909,7 @@ const select$1V = function ContentDocumentCompositeRepresentationSelect(body) {
|
|
|
41006
40909
|
function ingestSuccess$1$1(luvio, resourceParams, response) {
|
|
41007
40910
|
const { body } = response;
|
|
41008
40911
|
const key = keyBuilderFromType$B(luvio, body);
|
|
41009
|
-
const node = select$
|
|
40912
|
+
const node = select$21(body);
|
|
41010
40913
|
luvio.storeIngest(key, ingest$15, body);
|
|
41011
40914
|
const snapshot = luvio.storeLookup({
|
|
41012
40915
|
recordId: key,
|
|
@@ -41077,7 +40980,7 @@ function createResourceRequest$14(config) {
|
|
|
41077
40980
|
function ingestSuccess$M(luvio, resourceParams, response) {
|
|
41078
40981
|
const { body } = response;
|
|
41079
40982
|
const key = keyBuilderFromType$B(luvio, body);
|
|
41080
|
-
const node = select$
|
|
40983
|
+
const node = select$21(body);
|
|
41081
40984
|
luvio.storeIngest(key, ingest$15, body);
|
|
41082
40985
|
const snapshot = luvio.storeLookup({
|
|
41083
40986
|
recordId: key,
|
|
@@ -41737,7 +41640,7 @@ withDefaultLuvio((luvio) => {
|
|
|
41737
41640
|
throttle(60, 60000, createLDSAdapter(luvio, 'notifyListInfoUpdateAvailable', notifyUpdateAvailableFactory$1));
|
|
41738
41641
|
throttle(60, 60000, createLDSAdapter(luvio, 'notifyQuickActionDefaultsUpdateAvailable', notifyUpdateAvailableFactory));
|
|
41739
41642
|
});
|
|
41740
|
-
// version: 1.
|
|
41643
|
+
// version: 1.243.0-c7d8ec9e0
|
|
41741
41644
|
|
|
41742
41645
|
var caseSensitiveUserId = '005B0000000GR4OIAW';
|
|
41743
41646
|
|
|
@@ -42379,6 +42282,9 @@ function handleDurableStoreRejection(instrument) {
|
|
|
42379
42282
|
}
|
|
42380
42283
|
|
|
42381
42284
|
function isStoreEntryError(storeRecord) {
|
|
42285
|
+
if (!storeRecord || typeof storeRecord !== 'object') {
|
|
42286
|
+
return false;
|
|
42287
|
+
}
|
|
42382
42288
|
return storeRecord.__type === 'error';
|
|
42383
42289
|
}
|
|
42384
42290
|
|
|
@@ -47919,9 +47825,6 @@ class AbstractResourceRequestActionHandler {
|
|
|
47919
47825
|
}
|
|
47920
47826
|
async buildPendingAction(request, queue) {
|
|
47921
47827
|
const targetId = await this.getIdFromRequest(request);
|
|
47922
|
-
if (targetId === undefined) {
|
|
47923
|
-
return Promise.reject(new Error('Cannot determine target id from the resource request'));
|
|
47924
|
-
}
|
|
47925
47828
|
const tag = this.buildTagForTargetId(targetId);
|
|
47926
47829
|
const handlerActions = queue.filter((x) => x.handler === this.handlerId);
|
|
47927
47830
|
if (request.method === 'post' && actionsForTag(tag, handlerActions).length > 0) {
|
|
@@ -49972,6 +49875,10 @@ function isOperationDefinitionNode(node) {
|
|
|
49972
49875
|
return node.kind === 'OperationDefinition';
|
|
49973
49876
|
}
|
|
49974
49877
|
|
|
49878
|
+
const POLYMORPHIC_PARENT_RELATIONSHIP = 'polymorphicParentRelationship';
|
|
49879
|
+
const PARENT_RELATIONSHIP = 'parentRelationship';
|
|
49880
|
+
const CHILD_RELATIONSHIP = 'childRelationship';
|
|
49881
|
+
const RECORD_QUERY = 'recordQuery';
|
|
49975
49882
|
function requestsDraftsField(recordFieldNode) {
|
|
49976
49883
|
if (!recordFieldNode.selectionSet)
|
|
49977
49884
|
return false;
|
|
@@ -49987,18 +49894,41 @@ function isRecordQuery(recordQueryField) {
|
|
|
49987
49894
|
directive.arguments
|
|
49988
49895
|
.map((argument) => argument.value)
|
|
49989
49896
|
.filter(isStringValueNode)
|
|
49990
|
-
.some((categoryName) => categoryName.value ===
|
|
49897
|
+
.some((categoryName) => categoryName.value === RECORD_QUERY));
|
|
49991
49898
|
});
|
|
49992
49899
|
}
|
|
49993
49900
|
return false;
|
|
49994
49901
|
}
|
|
49995
|
-
// finds field with 'recordQuery' and 'childRelationship' directive
|
|
49996
|
-
function
|
|
49997
|
-
const
|
|
49998
|
-
return
|
|
49902
|
+
// finds connection field with 'recordQuery' and 'childRelationship' directive.
|
|
49903
|
+
function findNearestConnection(ancestors) {
|
|
49904
|
+
const connectionAncestor = findNearestAncesterPath(ancestors, true).node;
|
|
49905
|
+
return connectionAncestor === undefined ? undefined : connectionAncestor;
|
|
49906
|
+
}
|
|
49907
|
+
// convinient method to find nearest connection with its path
|
|
49908
|
+
function findNearestConnectionWithPath(ancestors) {
|
|
49909
|
+
const closestAncestorPath = findNearestAncesterPath(ancestors, true);
|
|
49910
|
+
let connection = undefined;
|
|
49911
|
+
let connectionPath = undefined;
|
|
49912
|
+
if (closestAncestorPath.parentIndex > 0) {
|
|
49913
|
+
const connectionAncestor = closestAncestorPath.node;
|
|
49914
|
+
const connectionAncestors = ancestors.slice(0, closestAncestorPath.parentIndex);
|
|
49915
|
+
connection =
|
|
49916
|
+
connectionAncestor === undefined ? undefined : connectionAncestor;
|
|
49917
|
+
if (connection !== undefined) {
|
|
49918
|
+
const ancesterPath = findAncesterPath(connectionAncestors);
|
|
49919
|
+
connectionPath =
|
|
49920
|
+
ancesterPath === ''
|
|
49921
|
+
? connection.name.value
|
|
49922
|
+
: `${ancesterPath}#${connection.name.value}`;
|
|
49923
|
+
}
|
|
49924
|
+
}
|
|
49925
|
+
return {
|
|
49926
|
+
connection,
|
|
49927
|
+
path: connectionPath,
|
|
49928
|
+
};
|
|
49999
49929
|
}
|
|
50000
|
-
// finds
|
|
50001
|
-
function findNearestAncesterPath(ancestors,
|
|
49930
|
+
// finds closest ancestor. If node with 'parentRelationship' is the ancester, the end result could be 'InlineFragmentNode' since it inherits the 'parent' relationship. 'InlineFragmentNode' makes sure that only one 'apiName' returns when tree is traversed.
|
|
49931
|
+
function findNearestAncesterPath(ancestors, connectionOnly) {
|
|
50002
49932
|
let recordQueryPath = { node: undefined, parentIndex: -1 };
|
|
50003
49933
|
let relationship = '';
|
|
50004
49934
|
for (let i = ancestors.length - 1; i >= 0; i--) {
|
|
@@ -50012,9 +49942,11 @@ function findNearestAncesterPath(ancestors, recordQueryOnly) {
|
|
|
50012
49942
|
continue;
|
|
50013
49943
|
for (let arg of directive.arguments) {
|
|
50014
49944
|
if (arg.value &&
|
|
50015
|
-
(arg.value.value ===
|
|
50016
|
-
arg.value.value ===
|
|
50017
|
-
(!
|
|
49945
|
+
(arg.value.value === RECORD_QUERY ||
|
|
49946
|
+
arg.value.value === CHILD_RELATIONSHIP ||
|
|
49947
|
+
(!connectionOnly &&
|
|
49948
|
+
(arg.value.value === PARENT_RELATIONSHIP ||
|
|
49949
|
+
arg.value.value === POLYMORPHIC_PARENT_RELATIONSHIP)))) {
|
|
50018
49950
|
recordQueryPath = { node: node, parentIndex: i };
|
|
50019
49951
|
relationship = arg.value.value;
|
|
50020
49952
|
break;
|
|
@@ -50029,17 +49961,19 @@ function findNearestAncesterPath(ancestors, recordQueryOnly) {
|
|
|
50029
49961
|
//checks if nearest ancester could be an inline fragment
|
|
50030
49962
|
if (recordQueryPath.node !== undefined &&
|
|
50031
49963
|
recordQueryPath.node.selectionSet &&
|
|
50032
|
-
relationship ===
|
|
50033
|
-
//
|
|
50034
|
-
|
|
50035
|
-
|
|
50036
|
-
|
|
50037
|
-
if (
|
|
49964
|
+
(relationship === PARENT_RELATIONSHIP || relationship === POLYMORPHIC_PARENT_RELATIONSHIP)) {
|
|
49965
|
+
// InlineFragment is usually 3 steps aways from its FieldNode parent within ancester hierarchy if it exists. The below search
|
|
49966
|
+
// is applied to adapt to future AST structure change
|
|
49967
|
+
let parentIndex = recordQueryPath.parentIndex + 1;
|
|
49968
|
+
while (parentIndex < ancestors.length) {
|
|
49969
|
+
if (isInlineFragmentNode(ancestors[parentIndex])) {
|
|
50038
49970
|
recordQueryPath = {
|
|
50039
|
-
node: ancestors[
|
|
50040
|
-
parentIndex
|
|
49971
|
+
node: ancestors[parentIndex],
|
|
49972
|
+
parentIndex,
|
|
50041
49973
|
};
|
|
49974
|
+
break;
|
|
50042
49975
|
}
|
|
49976
|
+
parentIndex++;
|
|
50043
49977
|
}
|
|
50044
49978
|
}
|
|
50045
49979
|
return recordQueryPath;
|
|
@@ -50063,7 +49997,7 @@ function findAncesterPath(ancesters) {
|
|
|
50063
49997
|
? sectionPath
|
|
50064
49998
|
: sectionPath === ''
|
|
50065
49999
|
? path
|
|
50066
|
-
: `${sectionPath}
|
|
50000
|
+
: `${sectionPath}#${path}`;
|
|
50067
50001
|
}
|
|
50068
50002
|
}
|
|
50069
50003
|
boundaryIndex = parentIndex;
|
|
@@ -50121,9 +50055,9 @@ function getRelation(node) {
|
|
|
50121
50055
|
const relationships = args
|
|
50122
50056
|
.map((arg) => arg.value)
|
|
50123
50057
|
.filter(isStringValueNode)
|
|
50124
|
-
.filter((valueNode) => valueNode.value ===
|
|
50125
|
-
valueNode.value ===
|
|
50126
|
-
valueNode.value ===
|
|
50058
|
+
.filter((valueNode) => valueNode.value === CHILD_RELATIONSHIP ||
|
|
50059
|
+
valueNode.value === PARENT_RELATIONSHIP ||
|
|
50060
|
+
valueNode.value === POLYMORPHIC_PARENT_RELATIONSHIP)
|
|
50127
50061
|
.map((relationshipNode) => relationshipNode.value);
|
|
50128
50062
|
if (relationships.length > 0) {
|
|
50129
50063
|
return relationships[0];
|
|
@@ -50180,8 +50114,8 @@ function isFieldSpanning(node, parentNode) {
|
|
|
50180
50114
|
*/
|
|
50181
50115
|
function isParentRelationship(node) {
|
|
50182
50116
|
return (node &&
|
|
50183
|
-
(isRelationship(node,
|
|
50184
|
-
isRelationship(node,
|
|
50117
|
+
(isRelationship(node, PARENT_RELATIONSHIP) ||
|
|
50118
|
+
isRelationship(node, POLYMORPHIC_PARENT_RELATIONSHIP)));
|
|
50185
50119
|
}
|
|
50186
50120
|
/*
|
|
50187
50121
|
checks if the InlineFragment spans
|
|
@@ -51273,7 +51207,7 @@ const parentRelationshipDirective = {
|
|
|
51273
51207
|
},
|
|
51274
51208
|
value: {
|
|
51275
51209
|
kind: Kind$1.STRING,
|
|
51276
|
-
value:
|
|
51210
|
+
value: PARENT_RELATIONSHIP,
|
|
51277
51211
|
block: false,
|
|
51278
51212
|
},
|
|
51279
51213
|
},
|
|
@@ -51287,7 +51221,7 @@ async function injectSyntheticFields(originalAST, objectInfoService, draftFuncti
|
|
|
51287
51221
|
// example 2 'ServiceAppointment' -> ['Owner']; 'Owner' -> ['User', 'Group']
|
|
51288
51222
|
const objectNodeInfoTree = {};
|
|
51289
51223
|
// save the field path to apiName map
|
|
51290
|
-
// example 1: 'ServiceAppointment' -> ['ServiceAppointment']; '
|
|
51224
|
+
// example 1: 'ServiceAppointment' -> ['ServiceAppointment']; 'ServiceAppointment#ccount' -> ['Account']; 'ServiceAppointment#Account#Owner' -> ['User']
|
|
51291
51225
|
const pathToObjectApiNamesMap = {};
|
|
51292
51226
|
let startNodes = new Set();
|
|
51293
51227
|
let totalNodes = new Set();
|
|
@@ -51302,11 +51236,11 @@ async function injectSyntheticFields(originalAST, objectInfoService, draftFuncti
|
|
|
51302
51236
|
visit$1(originalAST, {
|
|
51303
51237
|
Argument: {
|
|
51304
51238
|
enter(node, key, parent, path, ancestors) {
|
|
51305
|
-
const
|
|
51306
|
-
if (!
|
|
51239
|
+
const { connection: recordConnectionNode, path: ancesterPath } = findNearestConnectionWithPath(ancestors);
|
|
51240
|
+
if (!recordConnectionNode || !ancesterPath)
|
|
51307
51241
|
return;
|
|
51308
|
-
if (!objectNodeInfoTree[
|
|
51309
|
-
objectNodeInfoTree[
|
|
51242
|
+
if (!objectNodeInfoTree[ancesterPath]) {
|
|
51243
|
+
objectNodeInfoTree[ancesterPath] = [];
|
|
51310
51244
|
}
|
|
51311
51245
|
switch (node.name.value) {
|
|
51312
51246
|
case 'orderBy':
|
|
@@ -51314,12 +51248,12 @@ async function injectSyntheticFields(originalAST, objectInfoService, draftFuncti
|
|
|
51314
51248
|
if (node.value.kind !== 'ObjectValue') {
|
|
51315
51249
|
return;
|
|
51316
51250
|
}
|
|
51317
|
-
totalNodes.add(
|
|
51251
|
+
totalNodes.add(ancesterPath);
|
|
51318
51252
|
// 'childRelationship' node is not taken as the startNode of the 'NodeInfoTree' graph. The field scanning will construct the graph which lead here.
|
|
51319
|
-
if (isRecordQuery(
|
|
51320
|
-
startNodes.add(
|
|
51253
|
+
if (isRecordQuery(recordConnectionNode)) {
|
|
51254
|
+
startNodes.add(recordConnectionNode.name.value);
|
|
51321
51255
|
}
|
|
51322
|
-
growObjectFieldTree(objectNodeInfoTree,
|
|
51256
|
+
growObjectFieldTree(objectNodeInfoTree, ancesterPath, node.value, totalNodes, startNodes);
|
|
51323
51257
|
break;
|
|
51324
51258
|
case 'scope':
|
|
51325
51259
|
if (!isScopeArgumentNodeWithType(node, 'ASSIGNEDTOME', variables)) {
|
|
@@ -51334,17 +51268,16 @@ async function injectSyntheticFields(originalAST, objectInfoService, draftFuncti
|
|
|
51334
51268
|
name: 'ServiceResources',
|
|
51335
51269
|
});
|
|
51336
51270
|
}
|
|
51337
|
-
if (objectNodeInfoTree['ServiceResources'] === undefined) {
|
|
51338
|
-
objectNodeInfoTree['ServiceResources'] = [
|
|
51339
|
-
|
|
51340
|
-
|
|
51341
|
-
|
|
51342
|
-
|
|
51343
|
-
|
|
51344
|
-
});
|
|
51271
|
+
if (objectNodeInfoTree['ServiceAppointment#ServiceResources'] === undefined) {
|
|
51272
|
+
objectNodeInfoTree['ServiceAppointment#ServiceResources'] = [
|
|
51273
|
+
{
|
|
51274
|
+
relation: 'parent',
|
|
51275
|
+
name: 'ServiceResource',
|
|
51276
|
+
},
|
|
51277
|
+
];
|
|
51345
51278
|
}
|
|
51346
|
-
if (objectNodeInfoTree['ServiceResource'] === undefined) {
|
|
51347
|
-
objectNodeInfoTree['ServiceResource'] = [];
|
|
51279
|
+
if (objectNodeInfoTree['ServiceAppointment#ServiceResources#ServiceResource'] === undefined) {
|
|
51280
|
+
objectNodeInfoTree['ServiceAppointment#ServiceResources#ServiceResource'] = [];
|
|
51348
51281
|
}
|
|
51349
51282
|
break;
|
|
51350
51283
|
default:
|
|
@@ -51358,7 +51291,7 @@ async function injectSyntheticFields(originalAST, objectInfoService, draftFuncti
|
|
|
51358
51291
|
return;
|
|
51359
51292
|
if (!node.selectionSet)
|
|
51360
51293
|
return;
|
|
51361
|
-
const recordQueryField =
|
|
51294
|
+
const recordQueryField = findNearestConnection(ancestors);
|
|
51362
51295
|
//only injects fields for 'recordQuery' field. ignores the 'childRelationship' field since it will be traversed as the child of the 'recordQuery'
|
|
51363
51296
|
if (isRecordQuery(recordQueryField) && recordQueryField) {
|
|
51364
51297
|
totalNodes.add(recordQueryField.name.value);
|
|
@@ -51375,7 +51308,7 @@ async function injectSyntheticFields(originalAST, objectInfoService, draftFuncti
|
|
|
51375
51308
|
visit$1(originalAST, {
|
|
51376
51309
|
Argument: {
|
|
51377
51310
|
leave(node, key, parent, path, ancestors) {
|
|
51378
|
-
const recordQueryField =
|
|
51311
|
+
const recordQueryField = findNearestConnection(ancestors);
|
|
51379
51312
|
if (!recordQueryField)
|
|
51380
51313
|
return;
|
|
51381
51314
|
const ancestorPath = findAncesterPath(ancestors);
|
|
@@ -51423,7 +51356,7 @@ async function injectSyntheticFields(originalAST, objectInfoService, draftFuncti
|
|
|
51423
51356
|
case 'where': {
|
|
51424
51357
|
inlineFragmentSelections[ancestorPath] = [
|
|
51425
51358
|
...inlineFragmentSelections[ancestorPath],
|
|
51426
|
-
...injectFilter(node, idState, ancestorPath, objectInfos, pathToObjectApiNamesMap, draftFunctions, recordReferenceNode),
|
|
51359
|
+
...injectFilter(node, idState, ancestorPath, false, objectInfos, pathToObjectApiNamesMap, draftFunctions, recordReferenceNode),
|
|
51427
51360
|
];
|
|
51428
51361
|
break;
|
|
51429
51362
|
}
|
|
@@ -51439,7 +51372,7 @@ async function injectSyntheticFields(originalAST, objectInfoService, draftFuncti
|
|
|
51439
51372
|
if (!node.selectionSet)
|
|
51440
51373
|
return;
|
|
51441
51374
|
// it could be 'recordQuery' or 'childRelationship'
|
|
51442
|
-
const recordQueryField =
|
|
51375
|
+
const recordQueryField = findNearestConnection(ancestors);
|
|
51443
51376
|
if (!recordQueryField)
|
|
51444
51377
|
return;
|
|
51445
51378
|
const ancestorPath = findAncesterPath(ancestors);
|
|
@@ -51451,7 +51384,7 @@ async function injectSyntheticFields(originalAST, objectInfoService, draftFuncti
|
|
|
51451
51384
|
spanningSelections.push(selection);
|
|
51452
51385
|
}
|
|
51453
51386
|
}
|
|
51454
|
-
const injectedFields = injectFields(spanningSelections, node, ancestors, objectInfos, pathToObjectApiNamesMap);
|
|
51387
|
+
const injectedFields = injectFields(spanningSelections, node, ancestorPath, ancestors, objectInfos, pathToObjectApiNamesMap);
|
|
51455
51388
|
const mergedInjectedFields = mergeSelectionNodes$1(inlineFragmentSelections[ancestorPath], injectedFields);
|
|
51456
51389
|
inlineFragmentSelections[ancestorPath] = mergedInjectedFields;
|
|
51457
51390
|
},
|
|
@@ -51464,7 +51397,7 @@ async function injectSyntheticFields(originalAST, objectInfoService, draftFuncti
|
|
|
51464
51397
|
// removes 'ServicesResources' query field node if 'assignedtome' scope shows up
|
|
51465
51398
|
if (assignedtomeQueryFieldNode !== undefined &&
|
|
51466
51399
|
node.name.value === 'ServiceResources') {
|
|
51467
|
-
const serviceResourcesAncestor =
|
|
51400
|
+
const serviceResourcesAncestor = findNearestConnection(ancestors);
|
|
51468
51401
|
if (serviceResourcesAncestor === assignedtomeQueryFieldNode) {
|
|
51469
51402
|
return null;
|
|
51470
51403
|
}
|
|
@@ -51473,7 +51406,7 @@ async function injectSyntheticFields(originalAST, objectInfoService, draftFuncti
|
|
|
51473
51406
|
return;
|
|
51474
51407
|
if (!node.selectionSet)
|
|
51475
51408
|
return;
|
|
51476
|
-
const recordQueryField =
|
|
51409
|
+
const recordQueryField = findNearestConnection(ancestors);
|
|
51477
51410
|
if (!recordQueryField)
|
|
51478
51411
|
return;
|
|
51479
51412
|
const ancestorPath = findAncesterPath(ancestors);
|
|
@@ -51676,15 +51609,16 @@ function growObjectFieldTree(tree, parentNode, entryNode, totalNodes, startNodes
|
|
|
51676
51609
|
}
|
|
51677
51610
|
// example: 'Account'
|
|
51678
51611
|
const childNode = objectFieldNode.name.value;
|
|
51612
|
+
const childNodepath = `${parentNode}#${childNode}`;
|
|
51679
51613
|
if (!tree[parentNode].some((child) => child.name === childNode)) {
|
|
51680
51614
|
tree[parentNode].push({
|
|
51681
51615
|
relation: 'parent',
|
|
51682
51616
|
name: childNode,
|
|
51683
51617
|
});
|
|
51684
|
-
totalNodes.add(
|
|
51618
|
+
totalNodes.add(childNodepath);
|
|
51685
51619
|
}
|
|
51686
51620
|
// recursively go to deeper level of filter.
|
|
51687
|
-
growObjectFieldTree(tree,
|
|
51621
|
+
growObjectFieldTree(tree, childNodepath, objectFieldNode.value, totalNodes, startNodes);
|
|
51688
51622
|
}
|
|
51689
51623
|
}
|
|
51690
51624
|
}
|
|
@@ -51719,19 +51653,20 @@ function growFieldTree(tree, parentSectionPath, entryNode, parentNode, totalNode
|
|
|
51719
51653
|
}
|
|
51720
51654
|
if (!tree[parentSectionPath].some((field) => field.name === fieldName)) {
|
|
51721
51655
|
tree[parentSectionPath].push({
|
|
51722
|
-
relation: relationType ===
|
|
51723
|
-
relationType ===
|
|
51656
|
+
relation: relationType === PARENT_RELATIONSHIP ||
|
|
51657
|
+
relationType === POLYMORPHIC_PARENT_RELATIONSHIP
|
|
51724
51658
|
? 'parent'
|
|
51725
51659
|
: 'child',
|
|
51726
51660
|
name: fieldName,
|
|
51727
51661
|
});
|
|
51728
|
-
totalNodes.add(fieldName);
|
|
51662
|
+
totalNodes.add(`${parentSectionPath}#${fieldName}`);
|
|
51729
51663
|
}
|
|
51730
51664
|
if (entryNode.selectionSet && entryNode.selectionSet.selections) {
|
|
51731
51665
|
const childNodes = entryNode.selectionSet.selections.filter(isFieldOrInlineFragmentNode);
|
|
51732
51666
|
// recursively build the traversal tree
|
|
51733
51667
|
for (const child of childNodes) {
|
|
51734
|
-
|
|
51668
|
+
const path = `${parentSectionPath}#${fieldName}`;
|
|
51669
|
+
growFieldTree(tree, path, child, entryNode, totalNodes, startNodes);
|
|
51735
51670
|
}
|
|
51736
51671
|
}
|
|
51737
51672
|
}
|
|
@@ -51761,23 +51696,23 @@ function growFieldTree(tree, parentSectionPath, entryNode, parentNode, totalNode
|
|
|
51761
51696
|
}
|
|
51762
51697
|
if (!tree[parentSectionPath].some((field) => field.name === conditionName)) {
|
|
51763
51698
|
tree[parentSectionPath].push({
|
|
51764
|
-
relation: relationType ===
|
|
51765
|
-
relationType ===
|
|
51699
|
+
relation: relationType === PARENT_RELATIONSHIP ||
|
|
51700
|
+
relationType === POLYMORPHIC_PARENT_RELATIONSHIP
|
|
51766
51701
|
? 'parent'
|
|
51767
51702
|
: 'child',
|
|
51768
51703
|
name: conditionName,
|
|
51769
51704
|
});
|
|
51770
|
-
|
|
51705
|
+
const path = `${parentSectionPath}#${conditionName}`;
|
|
51706
|
+
totalNodes.add(path);
|
|
51771
51707
|
}
|
|
51772
51708
|
}
|
|
51773
51709
|
}
|
|
51774
51710
|
// dive deep immediately for 'InlineFragment'
|
|
51775
51711
|
const childNodes = entryNode.selectionSet.selections.filter(isFieldOrInlineFragmentNode);
|
|
51712
|
+
const path = `${parentSectionPath}${entryNode.typeCondition ? '#' + entryNode.typeCondition.name.value : ''}`;
|
|
51776
51713
|
// Navigates into InLineFragment
|
|
51777
51714
|
for (const child of childNodes) {
|
|
51778
|
-
growFieldTree(tree, entryNode
|
|
51779
|
-
? entryNode.typeCondition.name.value
|
|
51780
|
-
: parentSectionPath, child, entryNode, totalNodes, startNodes);
|
|
51715
|
+
growFieldTree(tree, path, child, entryNode, totalNodes, startNodes);
|
|
51781
51716
|
}
|
|
51782
51717
|
}
|
|
51783
51718
|
}
|
|
@@ -51821,7 +51756,7 @@ async function fetchObjectInfos(objectInfotree, pathToObjectApiNamesMap, objectI
|
|
|
51821
51756
|
}
|
|
51822
51757
|
const validObjectInfoNodes = [];
|
|
51823
51758
|
let updatedObjectInfoMap = {};
|
|
51824
|
-
// InlineFragment and polymorphic field support fits into this scenario pathToObjectApiNamesMap Entry: '
|
|
51759
|
+
// InlineFragment and polymorphic field support fits into this scenario pathToObjectApiNamesMap Entry: 'ServiceAppointment#Owner' -> ['User', 'Group']; ServiceAppointment#Owner#User' -> ['User']
|
|
51825
51760
|
if (objectInfoApiNames.length > 0 &&
|
|
51826
51761
|
nodesAtSameLevel.length > 0 &&
|
|
51827
51762
|
objectInfoApiNames.includes(nodesAtSameLevel[0].name)) {
|
|
@@ -51833,7 +51768,7 @@ async function fetchObjectInfos(objectInfotree, pathToObjectApiNamesMap, objectI
|
|
|
51833
51768
|
// eslint-disable-next-line
|
|
51834
51769
|
throw new Error(`Condition ${field.name} does not exists for ${parentPath}`);
|
|
51835
51770
|
}
|
|
51836
|
-
const path = `${parentPath}
|
|
51771
|
+
const path = `${parentPath}#${field.name}`;
|
|
51837
51772
|
pathToObjectApiNamesMap[path] = [field.name];
|
|
51838
51773
|
}
|
|
51839
51774
|
validObjectInfoNodes.push(...nodesAtSameLevel);
|
|
@@ -51849,7 +51784,7 @@ async function fetchObjectInfos(objectInfotree, pathToObjectApiNamesMap, objectI
|
|
|
51849
51784
|
let apiNames = [];
|
|
51850
51785
|
for (const nodeInfo of nodesAtSameLevel) {
|
|
51851
51786
|
const field = nodeInfo.name;
|
|
51852
|
-
const path = `${parentPath}
|
|
51787
|
+
const path = `${parentPath}#${field}`;
|
|
51853
51788
|
// Handle 'parentRelationship'
|
|
51854
51789
|
if (nodeInfo.relation === 'parent') {
|
|
51855
51790
|
const relationshipId = referenceIdFieldForRelationship(field);
|
|
@@ -51867,12 +51802,12 @@ async function fetchObjectInfos(objectInfotree, pathToObjectApiNamesMap, objectI
|
|
|
51867
51802
|
}
|
|
51868
51803
|
}
|
|
51869
51804
|
// This is a polymorphic field
|
|
51870
|
-
if (fieldDefinition.referenceToInfos.length > 1 && objectInfotree[
|
|
51805
|
+
if (fieldDefinition.referenceToInfos.length > 1 && objectInfotree[path]) {
|
|
51871
51806
|
// Fields needs to expand and heterogenous entity ObjectInfo needs to be fetched
|
|
51872
|
-
const referencedNodeInfos = objectInfotree[
|
|
51807
|
+
const referencedNodeInfos = objectInfotree[path];
|
|
51873
51808
|
const requestedApiNames = referencedNodeInfos.map((referenceNodeInfo) => referenceNodeInfo.name);
|
|
51874
51809
|
// Fetches requested ObjectInfo only. Some entity's relation field could define more than 6 references. Only references show up in query need to be handled.
|
|
51875
|
-
if (requestedApiNames.length > 0 && objectInfotree[
|
|
51810
|
+
if (requestedApiNames.length > 0 && objectInfotree[path]) {
|
|
51876
51811
|
fieldDefinition.referenceToInfos
|
|
51877
51812
|
.filter((referenceToInfo) => requestedApiNames.includes(referenceToInfo.apiName))
|
|
51878
51813
|
.forEach((ref) => {
|
|
@@ -51932,8 +51867,8 @@ async function fetchObjectInfos(objectInfotree, pathToObjectApiNamesMap, objectI
|
|
|
51932
51867
|
}
|
|
51933
51868
|
for (const nodeInfo of validObjectInfoNodes) {
|
|
51934
51869
|
const field = nodeInfo.name;
|
|
51935
|
-
const
|
|
51936
|
-
const
|
|
51870
|
+
const path = `${parentPath}#${field}`;
|
|
51871
|
+
const subLevelFields = objectInfotree[path];
|
|
51937
51872
|
if (subLevelFields && subLevelFields.length > 0) {
|
|
51938
51873
|
const subObjectInfos = await fetchObjectInfos(objectInfotree, pathToObjectApiNamesMap, updatedObjectInfoMap, subLevelFields, path, objectInfoService);
|
|
51939
51874
|
updatedObjectInfoMap = { ...updatedObjectInfoMap, ...subObjectInfos };
|
|
@@ -51950,27 +51885,29 @@ async function fetchObjectInfos(objectInfotree, pathToObjectApiNamesMap, objectI
|
|
|
51950
51885
|
* 'path' and 'queryNode' is 1 level above the 'filterNode'
|
|
51951
51886
|
* @param filterNode filter node which needs to be injected. For example, 'State' ObjectFieldNode within filter 'where: { State: { eq: "Nova Scotia" }}'
|
|
51952
51887
|
* @param idState ID state will be updated to determine if the ID fields in AST need to be swapped. The swapping happens later.
|
|
51953
|
-
* @param
|
|
51888
|
+
* @param parentPath path to the current filterNode's parent. For example, path could be 'ServiceApointment' when filterNode is 'State'. If the path does not exist in 'pathToObjectApiNamesMap', parent node is not an field of relationship or recordQuery
|
|
51889
|
+
* @param isParentPolymorphic true if parent points to a polymorphic field.
|
|
51954
51890
|
* @param queryNode referece FieldNode which provides the information if 'filterNode' exist in it nor not.
|
|
51955
51891
|
* @param objectInfos ObjectInfo map used in injection. If ObjectInfo misses or field does not exist in ObjectInfo, the error will be thrown
|
|
51956
51892
|
* @param pathToObjectApiNamesMap map used to locate the ObjectInfo. The key is path to a field, value is the ObjectInfo's apiName array. In the case of polymorphic fields, the apiName array have 2 or more elements. For example, 'ServiceAppointment' -> ['ServiceAppointment']; 'ServiceAppointment_Account' -> ['Account'], 'ServiceAppointment_Owner' -> ['User', 'Group'].
|
|
51957
51893
|
* @param draftFunctions functions for working with record ids that may be draft-created ids
|
|
51958
51894
|
* @returns an array of nodes with injected fields
|
|
51959
51895
|
*/
|
|
51960
|
-
function injectFilter(filterNode, idState,
|
|
51896
|
+
function injectFilter(filterNode, idState, parentPath, isParentPolymorphic, objectInfos, pathToObjectApiNamesMap, draftFunctions, queryNode) {
|
|
51961
51897
|
const injectedSelections = [];
|
|
51898
|
+
let isPolymorphicField = false;
|
|
51962
51899
|
switch (filterNode.kind) {
|
|
51963
51900
|
case Kind$1.ARGUMENT:
|
|
51964
51901
|
if (filterNode.value.kind !== 'ObjectValue')
|
|
51965
51902
|
return [];
|
|
51966
51903
|
filterNode.value.fields.forEach((objectFieldNode) => {
|
|
51967
|
-
let subResults = injectFilter(objectFieldNode, idState,
|
|
51904
|
+
let subResults = injectFilter(objectFieldNode, idState, parentPath, isParentPolymorphic, objectInfos, pathToObjectApiNamesMap, draftFunctions, queryNode);
|
|
51968
51905
|
for (const subResult of subResults) {
|
|
51969
51906
|
mergeOrAddToGroup(injectedSelections, subResult);
|
|
51970
51907
|
}
|
|
51971
51908
|
// multiple Ids might need to be swapped. remember their paths for faster write.
|
|
51972
51909
|
if (idState.swapNeeded) {
|
|
51973
|
-
idState.paths.push(
|
|
51910
|
+
idState.paths.push(parentPath);
|
|
51974
51911
|
}
|
|
51975
51912
|
});
|
|
51976
51913
|
return injectedSelections;
|
|
@@ -51979,7 +51916,7 @@ function injectFilter(filterNode, idState, path, objectInfos, pathToObjectApiNam
|
|
|
51979
51916
|
case Kind$1.LIST: {
|
|
51980
51917
|
filterNode.value.values.filter(isObjectValueNode).forEach((objectValueNode) => {
|
|
51981
51918
|
objectValueNode.fields.forEach((objectFieldNode) => {
|
|
51982
|
-
const subResults = injectFilter(objectFieldNode, idState,
|
|
51919
|
+
const subResults = injectFilter(objectFieldNode, idState, parentPath, isParentPolymorphic, objectInfos, pathToObjectApiNamesMap, draftFunctions, queryNode);
|
|
51983
51920
|
for (const subResult of subResults) {
|
|
51984
51921
|
mergeOrAddToGroup(injectedSelections, subResult);
|
|
51985
51922
|
}
|
|
@@ -51990,7 +51927,7 @@ function injectFilter(filterNode, idState, path, objectInfos, pathToObjectApiNam
|
|
|
51990
51927
|
case Kind$1.OBJECT: {
|
|
51991
51928
|
if (filterNode.name.value === 'not') {
|
|
51992
51929
|
filterNode.value.fields.forEach((objectFieldNode) => {
|
|
51993
|
-
const subResults = injectFilter(objectFieldNode, idState,
|
|
51930
|
+
const subResults = injectFilter(objectFieldNode, idState, parentPath, isParentPolymorphic, objectInfos, pathToObjectApiNamesMap, draftFunctions, queryNode);
|
|
51994
51931
|
for (const subResult of subResults) {
|
|
51995
51932
|
mergeOrAddToGroup(injectedSelections, subResult);
|
|
51996
51933
|
}
|
|
@@ -52000,15 +51937,15 @@ function injectFilter(filterNode, idState, path, objectInfos, pathToObjectApiNam
|
|
|
52000
51937
|
let apiNames = [];
|
|
52001
51938
|
let isScalarField = false;
|
|
52002
51939
|
//It is possible that this is a polymorphic field
|
|
52003
|
-
apiNames = pathToObjectApiNamesMap[
|
|
52004
|
-
// example: path: '
|
|
51940
|
+
apiNames = pathToObjectApiNamesMap[parentPath];
|
|
51941
|
+
// example: path: 'ServiceAppointment#LastModifiedDate'; filterNode: '{eq: {literal: LAST_WEEK}}'. queryNode: 'LastModifedDate { value}' FilterNode's parent has been verifed as a valid node
|
|
52005
51942
|
if (apiNames === undefined) {
|
|
52006
51943
|
isScalarField = true;
|
|
52007
51944
|
}
|
|
52008
51945
|
else {
|
|
52009
51946
|
if (apiNames.some((apiName) => objectInfos[apiName] === undefined)) {
|
|
52010
51947
|
// eslint-disable-next-line
|
|
52011
|
-
throw new Error(`ObjectInfo is missing for ${
|
|
51948
|
+
throw new Error(`ObjectInfo is missing for ${parentPath}`);
|
|
52012
51949
|
}
|
|
52013
51950
|
}
|
|
52014
51951
|
if (isScalarField) {
|
|
@@ -52032,21 +51969,17 @@ function injectFilter(filterNode, idState, path, objectInfos, pathToObjectApiNam
|
|
|
52032
51969
|
let isSpanning = false;
|
|
52033
51970
|
// if true, current node is a polymorphic concrete type node. For example, field node `User` under `Owner`
|
|
52034
51971
|
let isInlineFragment = false;
|
|
52035
|
-
let isPolymorphicField = false;
|
|
52036
51972
|
let isTypeNameExisting = false;
|
|
52037
51973
|
let curPath;
|
|
52038
51974
|
let fieldName = filterNode.name.value;
|
|
52039
|
-
curPath = `${
|
|
51975
|
+
curPath = `${parentPath}#${fieldName}`;
|
|
52040
51976
|
if (pathToObjectApiNamesMap[curPath] &&
|
|
52041
51977
|
pathToObjectApiNamesMap[curPath].length > 0) {
|
|
52042
51978
|
isSpanning = true;
|
|
52043
|
-
|
|
52044
|
-
|
|
52045
|
-
|
|
52046
|
-
|
|
52047
|
-
isInlineFragment = isPolymorphicFieldPath(path, pathToObjectApiNamesMap);
|
|
52048
|
-
}
|
|
52049
|
-
isPolymorphicField = isPolymorphicFieldPath(curPath, pathToObjectApiNamesMap);
|
|
51979
|
+
isInlineFragment =
|
|
51980
|
+
isParentPolymorphic &&
|
|
51981
|
+
pathToObjectApiNamesMap[curPath].length === 1;
|
|
51982
|
+
isPolymorphicField = isPolymorphicFieldPath(curPath, pathToObjectApiNamesMap, objectInfos);
|
|
52050
51983
|
}
|
|
52051
51984
|
// When filter node is at InLineFragment Level(a concrete entity of polymorphic field), query node is one level up. For example, ObjectFieldNode is ...{User:{...}}, queryNode is Owner:[User]
|
|
52052
51985
|
if (isInlineFragment) {
|
|
@@ -52092,7 +52025,7 @@ function injectFilter(filterNode, idState, path, objectInfos, pathToObjectApiNam
|
|
|
52092
52025
|
}
|
|
52093
52026
|
const objectInfoName = pathToObjectApiNamesMap[curPath] !== undefined
|
|
52094
52027
|
? pathToObjectApiNamesMap[curPath][0]
|
|
52095
|
-
: pathToObjectApiNamesMap[
|
|
52028
|
+
: pathToObjectApiNamesMap[parentPath][0];
|
|
52096
52029
|
const isIdField = isFieldAnIdField(filterNode.name.value, objectInfos[objectInfoName]);
|
|
52097
52030
|
if (!isIdField) {
|
|
52098
52031
|
let subSelectionNodes = [];
|
|
@@ -52104,7 +52037,7 @@ function injectFilter(filterNode, idState, path, objectInfos, pathToObjectApiNam
|
|
|
52104
52037
|
updateIDInfo(subFieldNode, idState, draftFunctions);
|
|
52105
52038
|
}
|
|
52106
52039
|
// try injecting the fields within predicate no matter it has relation or not.
|
|
52107
|
-
let subResults = injectFilter(subFieldNode, idState, curPath, objectInfos, pathToObjectApiNamesMap, draftFunctions, existingFields ? existingFields[0] : undefined);
|
|
52040
|
+
let subResults = injectFilter(subFieldNode, idState, curPath, isPolymorphicField, objectInfos, pathToObjectApiNamesMap, draftFunctions, existingFields ? existingFields[0] : undefined);
|
|
52108
52041
|
subSelectionNodes = subSelectionNodes.concat(subResults);
|
|
52109
52042
|
});
|
|
52110
52043
|
if (!subFieldsHasId) {
|
|
@@ -52265,15 +52198,43 @@ function mergeOrAddToGroup(group, element) {
|
|
|
52265
52198
|
}
|
|
52266
52199
|
group.push(element);
|
|
52267
52200
|
}
|
|
52268
|
-
// checks if the path points to a polymorphic field.
|
|
52269
|
-
//
|
|
52270
|
-
//
|
|
52271
|
-
|
|
52272
|
-
|
|
52273
|
-
|
|
52274
|
-
|
|
52275
|
-
|
|
52276
|
-
|
|
52201
|
+
// checks if the path points to a polymorphic field. For example, for the below `pathToObjectApiNamesMap`
|
|
52202
|
+
// {
|
|
52203
|
+
// 'ServiceAppointment' -> ['ServiceAppointment']
|
|
52204
|
+
// 'ServiceAppointment#Owner' --> ['User'],
|
|
52205
|
+
// 'ServiceAppointment#Owner#User' --> ['User']
|
|
52206
|
+
// }
|
|
52207
|
+
// path `ServiceAppointment#Owner` points to a polymorphic field, but path `ServiceAppointment#Owner#User` does not.
|
|
52208
|
+
function isPolymorphicFieldPath(path, pathToObjectApiNamesMap, objectInfos) {
|
|
52209
|
+
const lastSegmentIndex = path.lastIndexOf('#');
|
|
52210
|
+
if (lastSegmentIndex < 0) {
|
|
52211
|
+
return false;
|
|
52212
|
+
}
|
|
52213
|
+
const lastSegment = path.slice(lastSegmentIndex + 1);
|
|
52214
|
+
const parentApiPath = path.slice(0, lastSegmentIndex);
|
|
52215
|
+
if (pathToObjectApiNamesMap[parentApiPath] === undefined) {
|
|
52216
|
+
return false;
|
|
52217
|
+
}
|
|
52218
|
+
const parentObjectApiNames = pathToObjectApiNamesMap[parentApiPath];
|
|
52219
|
+
// If the last segment is a Polymorphic field, its immediate parent is a concrete object entity, which has 1 objectApiName mapped to the parent path in `pathToObjectApiNamesMap`.
|
|
52220
|
+
// For example, we like to check if `ServiceAppointment#Owner` path is polymorphic. The last segment is `Owner` and its parent `ServiceAppointment` has one element (which is also `ServiceAppointment`) array as its value.
|
|
52221
|
+
// Below are the entries in `pathToObjectApiNamesMap`
|
|
52222
|
+
// {
|
|
52223
|
+
// `ServiceAppointmen`t: [`ServiceAppointment`],
|
|
52224
|
+
// `ServiceAppointment#Owner`: [`User`, `Group`],
|
|
52225
|
+
// `ServiceAppointment#Owner#User`: [`User`],
|
|
52226
|
+
// `ServiceAppointment#Owner#Group`: [`Group`],
|
|
52227
|
+
// }
|
|
52228
|
+
if (parentObjectApiNames.length !== 1) {
|
|
52229
|
+
return false;
|
|
52230
|
+
}
|
|
52231
|
+
const parentObjectInfo = objectInfos[parentObjectApiNames[0]];
|
|
52232
|
+
const relationshipField = referenceIdFieldForRelationship(lastSegment);
|
|
52233
|
+
let fieldDefinition = parentObjectInfo.fields[relationshipField];
|
|
52234
|
+
if (fieldDefinition === undefined) {
|
|
52235
|
+
return false;
|
|
52236
|
+
}
|
|
52237
|
+
return fieldDefinition.polymorphicForeignKey;
|
|
52277
52238
|
}
|
|
52278
52239
|
function isFieldAnIdField(fieldName, objectInfo) {
|
|
52279
52240
|
if (fieldName === 'Id')
|
|
@@ -52327,10 +52288,10 @@ function updateIDInfo(fieldNode, idState, draftFunctions) {
|
|
|
52327
52288
|
* @param parentNode parent node of param 1
|
|
52328
52289
|
* @param ancestors ancester of param 1
|
|
52329
52290
|
* @param objectInfos ObjectInfo map used in injection. If ObjectInfo misses or field does not exist in ObjectInfo, the error will be thrown
|
|
52330
|
-
* @param pathToObjectApiNamesMap map used to locate the ObjectInfo. The key is path to a field, value is the ObjectInfo's apiName array. In the case of polymorphic fields, the apiName array have 2 or more elements. For example, 'ServiceAppointment' -> ['ServiceAppointment']; '
|
|
52291
|
+
* @param pathToObjectApiNamesMap map used to locate the ObjectInfo. The key is path to a field, value is the ObjectInfo's apiName array. In the case of polymorphic fields, the apiName array have 2 or more elements. For example, 'ServiceAppointment' -> ['ServiceAppointment']; 'ServiceAppointment#Account' -> ['Account'], 'ServiceAppointment#Owner' -> ['User', 'Group'].
|
|
52331
52292
|
* @return injected SelectionNodes used to construct the InlineFragment.
|
|
52332
52293
|
*/
|
|
52333
|
-
function injectFields(selections, parentNode, ancestors, objectInfos, pathToObjectApiNamesMap) {
|
|
52294
|
+
function injectFields(selections, parentNode, parentPath, ancestors, objectInfos, pathToObjectApiNamesMap) {
|
|
52334
52295
|
/**
|
|
52335
52296
|
* 1 parentship can return 2 FieldNode which need to be flattened
|
|
52336
52297
|
* Concact: { ** Contact { ** ContactId {
|
|
@@ -52348,6 +52309,10 @@ function injectFields(selections, parentNode, ancestors, objectInfos, pathToObje
|
|
|
52348
52309
|
if (!selection.selectionSet) {
|
|
52349
52310
|
return selection;
|
|
52350
52311
|
}
|
|
52312
|
+
const segment = isFieldNode(selection)
|
|
52313
|
+
? selection.name.value
|
|
52314
|
+
: selection.typeCondition.name.value;
|
|
52315
|
+
const curPath = `${parentPath}#${segment}`;
|
|
52351
52316
|
const spanningSubSelections = [];
|
|
52352
52317
|
for (const subSelection of selection.selectionSet.selections) {
|
|
52353
52318
|
if (isFieldSpanning(subSelection, selection)) {
|
|
@@ -52355,7 +52320,7 @@ function injectFields(selections, parentNode, ancestors, objectInfos, pathToObje
|
|
|
52355
52320
|
}
|
|
52356
52321
|
}
|
|
52357
52322
|
// Handles multiple level field injection like 'ServiceAppointment' --> 'Account' --> 'Owner'
|
|
52358
|
-
const subInjectedSelections = injectFields(spanningSubSelections, selection, ancestors, objectInfos, pathToObjectApiNamesMap);
|
|
52323
|
+
const subInjectedSelections = injectFields(spanningSubSelections, selection, curPath, ancestors, objectInfos, pathToObjectApiNamesMap);
|
|
52359
52324
|
if (!selection.selectionSet) {
|
|
52360
52325
|
return selection;
|
|
52361
52326
|
}
|
|
@@ -52398,7 +52363,7 @@ function injectFields(selections, parentNode, ancestors, objectInfos, pathToObje
|
|
|
52398
52363
|
}
|
|
52399
52364
|
}
|
|
52400
52365
|
// For polymorphic fields, the Id field is excluded.
|
|
52401
|
-
const excludeId =
|
|
52366
|
+
const excludeId = isPolymorphicFieldPath(curPath, pathToObjectApiNamesMap, objectInfos);
|
|
52402
52367
|
const idSelection = [];
|
|
52403
52368
|
if (!excludeId && !hasIdAlready) {
|
|
52404
52369
|
idSelection.push({
|
|
@@ -52409,8 +52374,8 @@ function injectFields(selections, parentNode, ancestors, objectInfos, pathToObje
|
|
|
52409
52374
|
},
|
|
52410
52375
|
});
|
|
52411
52376
|
}
|
|
52412
|
-
// Inject '__typename' for
|
|
52413
|
-
// please reference 'removeSyntheticFields'.
|
|
52377
|
+
// Inject '__typename' for InlineFragment. '__typename' field acts as a reference to concrete type of a polymorphic field or a standard field in the returned GQL response, which equals to
|
|
52378
|
+
// `typedCondition` of the InlineFragment in the query AST. It is used to match JSON response with AST node. For more detail, please reference 'removeSyntheticFields'.
|
|
52414
52379
|
if (isInlineFragmentNode(selection) &&
|
|
52415
52380
|
!selection.selectionSet.selections.find((selection) => isFieldNode(selection) && selection.name.value === '__typename')) {
|
|
52416
52381
|
idSelection.push({
|
|
@@ -52444,7 +52409,7 @@ function injectFields(selections, parentNode, ancestors, objectInfos, pathToObje
|
|
|
52444
52409
|
if (isFieldNode(parentNode) && parentNode.selectionSet && parentNode.name.value === 'node') {
|
|
52445
52410
|
if (parentNode.selectionSet.selections
|
|
52446
52411
|
.filter(isFieldOrInlineFragmentNode)
|
|
52447
|
-
.some((selectionNode) => isRelationship(selectionNode,
|
|
52412
|
+
.some((selectionNode) => isRelationship(selectionNode, CHILD_RELATIONSHIP))) {
|
|
52448
52413
|
if (!parentNode.selectionSet.selections
|
|
52449
52414
|
.filter(isFieldNode)
|
|
52450
52415
|
.some((sibling) => sibling.name.value === 'Id')) {
|
|
@@ -52463,7 +52428,7 @@ function injectFields(selections, parentNode, ancestors, objectInfos, pathToObje
|
|
|
52463
52428
|
if (parentInfo.parentIndex >= 0) {
|
|
52464
52429
|
// example node { TimeSheetEntries { edges { node { Id }}}}
|
|
52465
52430
|
const parent = parentInfo.node;
|
|
52466
|
-
if (isRelationship(parent,
|
|
52431
|
+
if (isRelationship(parent, CHILD_RELATIONSHIP)) {
|
|
52467
52432
|
const unVisitedAncestors = ancestors.slice(0, parentInfo.parentIndex);
|
|
52468
52433
|
// path : "TimeSheet"
|
|
52469
52434
|
const grandParentPath = findAncesterPath(unVisitedAncestors);
|
|
@@ -52592,7 +52557,7 @@ const assignedToMeFragmentSelections = [
|
|
|
52592
52557
|
},
|
|
52593
52558
|
value: {
|
|
52594
52559
|
kind: 'StringValue',
|
|
52595
|
-
value:
|
|
52560
|
+
value: CHILD_RELATIONSHIP,
|
|
52596
52561
|
block: false,
|
|
52597
52562
|
},
|
|
52598
52563
|
},
|
|
@@ -52684,7 +52649,7 @@ const assignedToMeFragmentSelections = [
|
|
|
52684
52649
|
},
|
|
52685
52650
|
value: {
|
|
52686
52651
|
kind: 'StringValue',
|
|
52687
|
-
value:
|
|
52652
|
+
value: PARENT_RELATIONSHIP,
|
|
52688
52653
|
block: false,
|
|
52689
52654
|
},
|
|
52690
52655
|
},
|
|
@@ -52821,7 +52786,9 @@ function handleNonArrayJsonProperty(selection, fieldName, jsonInput, jsonOutput)
|
|
|
52821
52786
|
jsonOutput[fieldName] = null;
|
|
52822
52787
|
return;
|
|
52823
52788
|
}
|
|
52824
|
-
jsonOutput[fieldName]
|
|
52789
|
+
if (jsonOutput[fieldName] === undefined) {
|
|
52790
|
+
jsonOutput[fieldName] = {};
|
|
52791
|
+
}
|
|
52825
52792
|
createUserJsonOutput(selection, jsonInput[fieldName], jsonOutput[fieldName]);
|
|
52826
52793
|
}
|
|
52827
52794
|
else {
|
|
@@ -52868,7 +52835,7 @@ const RECORD_ENDPOINT_REGEX$1 = /^\/ui-api\/records\/?(([a-zA-Z0-9]+))?$/;
|
|
|
52868
52835
|
function getRecordIdFromRecordRequest(request) {
|
|
52869
52836
|
const { method, basePath } = request;
|
|
52870
52837
|
if (basePath === undefined) {
|
|
52871
|
-
|
|
52838
|
+
throw Error(`Could not determine record id from request without a basePath`);
|
|
52872
52839
|
}
|
|
52873
52840
|
let recordId = '';
|
|
52874
52841
|
switch (method) {
|
|
@@ -52877,13 +52844,13 @@ function getRecordIdFromRecordRequest(request) {
|
|
|
52877
52844
|
case 'delete': {
|
|
52878
52845
|
const matches = basePath.match(RECORD_ENDPOINT_REGEX$1);
|
|
52879
52846
|
if (!matches || matches.length !== 3) {
|
|
52880
|
-
|
|
52847
|
+
throw Error(`Could not determine record id from request path ${basePath}`);
|
|
52881
52848
|
}
|
|
52882
52849
|
recordId = matches[2];
|
|
52883
52850
|
break;
|
|
52884
52851
|
}
|
|
52885
52852
|
default: {
|
|
52886
|
-
|
|
52853
|
+
throw Error(`Could not determine record id from request type `);
|
|
52887
52854
|
}
|
|
52888
52855
|
}
|
|
52889
52856
|
return recordId;
|
|
@@ -53739,7 +53706,7 @@ class UiApiActionHandler extends AbstractResourceRequestActionHandler {
|
|
|
53739
53706
|
if (request.method === 'post') {
|
|
53740
53707
|
const apiName = request.body.apiName;
|
|
53741
53708
|
if (apiName === undefined) {
|
|
53742
|
-
|
|
53709
|
+
throw Error('Could not determine api name from request body');
|
|
53743
53710
|
}
|
|
53744
53711
|
return this.recordService.synthesizeId(apiName);
|
|
53745
53712
|
}
|
|
@@ -54454,11 +54421,11 @@ class UiApiDraftRecordService {
|
|
|
54454
54421
|
const objectInfo = await getAdapterData(this.objectInfoAdapter, {
|
|
54455
54422
|
objectApiName: apiName,
|
|
54456
54423
|
});
|
|
54457
|
-
if (objectInfo === undefined) {
|
|
54458
|
-
|
|
54424
|
+
if (objectInfo === undefined || objectInfo.keyPrefix === null) {
|
|
54425
|
+
throw Error(`Could not find or fetch object info for ${apiName}`);
|
|
54459
54426
|
}
|
|
54460
54427
|
if (objectInfo.keyPrefix === null) {
|
|
54461
|
-
|
|
54428
|
+
throw Error(`Could not find key prefix for ${apiName}. Cannot synthesize id.`);
|
|
54462
54429
|
}
|
|
54463
54430
|
return this.generateId(objectInfo.keyPrefix);
|
|
54464
54431
|
}
|
|
@@ -54534,7 +54501,7 @@ class QuickActionExecutionRepresentationHandler extends AbstractResourceRequestA
|
|
|
54534
54501
|
getIdFromRequest(request) {
|
|
54535
54502
|
const apiName = request.body.apiName;
|
|
54536
54503
|
if (typeof apiName !== 'string') {
|
|
54537
|
-
throw Error('expected api name not found');
|
|
54504
|
+
throw Error('expected api name not found in request body');
|
|
54538
54505
|
}
|
|
54539
54506
|
const id = this.draftRecordService.synthesizeId(apiName);
|
|
54540
54507
|
return Promise.resolve(id);
|
|
@@ -54996,16 +54963,18 @@ class ContentDocumentCompositeRepresentationActionHandler extends AbstractResour
|
|
|
54996
54963
|
// remember ContentDocument ID
|
|
54997
54964
|
pendingAction.metadata[CONTENT_DOCUMENT_DRAFT_ID_KEY] = targetId;
|
|
54998
54965
|
// generate and remember ContentVersion ID
|
|
54999
|
-
const contentVersionId = await this.draftRecordService
|
|
55000
|
-
|
|
54966
|
+
const contentVersionId = await this.draftRecordService
|
|
54967
|
+
.synthesizeId(CONTENT_VERSION_API_NAME)
|
|
54968
|
+
.catch(() => {
|
|
55001
54969
|
return Promise.reject(new DraftSynthesisError('Cannot generate local ContentVersion synthetic id', 'CANNOT_GENERATE_ID'));
|
|
55002
|
-
}
|
|
54970
|
+
});
|
|
55003
54971
|
pendingAction.metadata[CONTENT_VERSION_DRAFT_ID_KEY] = contentVersionId;
|
|
55004
54972
|
// generate and remember ContentDocumentLink ID
|
|
55005
|
-
const contentDocumentLinkId = await this.draftRecordService
|
|
55006
|
-
|
|
54973
|
+
const contentDocumentLinkId = await this.draftRecordService
|
|
54974
|
+
.synthesizeId(CONTENT_DOCUMENT_LINK_API_NAME)
|
|
54975
|
+
.catch(() => {
|
|
55007
54976
|
return Promise.reject(new DraftSynthesisError('Cannot generate local ContentDocumentLink synthetic id', 'CANNOT_GENERATE_ID'));
|
|
55008
|
-
}
|
|
54977
|
+
});
|
|
55009
54978
|
pendingAction.metadata[CONTENT_DOCUMENT_LINK_DRAFT_ID_KEY] = contentDocumentLinkId;
|
|
55010
54979
|
// assert that object infos and references exist
|
|
55011
54980
|
const metaDataResult = await this.draftRecordService.getRecordDraftMetadata(targetId, pendingAction);
|
|
@@ -55034,8 +55003,7 @@ class ContentDocumentCompositeRepresentationActionHandler extends AbstractResour
|
|
|
55034
55003
|
return false;
|
|
55035
55004
|
}
|
|
55036
55005
|
async getIdFromRequest(_request) {
|
|
55037
|
-
|
|
55038
|
-
return id;
|
|
55006
|
+
return this.draftRecordService.synthesizeId(CONTENT_DOCUMENT_API_NAME);
|
|
55039
55007
|
}
|
|
55040
55008
|
getIdFromResponseBody(responseBody) {
|
|
55041
55009
|
return responseBody.contentDocument.id;
|
|
@@ -57852,6 +57820,9 @@ class PrimingSession extends EventEmitter {
|
|
|
57852
57820
|
this.ldsRecordRefresher = config.ldsRecordRefresher;
|
|
57853
57821
|
this.networkWorkerPool = new AsyncWorkerPool(this.concurrency);
|
|
57854
57822
|
this.useBatchGQL = ldsPrimingGraphqlBatch.isOpen({ fallback: false });
|
|
57823
|
+
if (this.useBatchGQL) {
|
|
57824
|
+
this.batchSize = this.batchSize / DEFAULT_GQL_QUERY_BATCH_SIZE;
|
|
57825
|
+
}
|
|
57855
57826
|
this.conflictPool = new ConflictPool(config.store, this.objectInfoLoader);
|
|
57856
57827
|
}
|
|
57857
57828
|
// function that enqueues priming work
|
|
@@ -58711,7 +58682,7 @@ register$1({
|
|
|
58711
58682
|
id: '@salesforce/lds-network-adapter',
|
|
58712
58683
|
instrument: instrument$2,
|
|
58713
58684
|
});
|
|
58714
|
-
// version: 1.
|
|
58685
|
+
// version: 1.243.0-87f38263e
|
|
58715
58686
|
|
|
58716
58687
|
const { create: create$3, keys: keys$3 } = Object;
|
|
58717
58688
|
const { stringify: stringify$1, parse: parse$1 } = JSON;
|
|
@@ -77179,7 +77150,7 @@ register$1({
|
|
|
77179
77150
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
77180
77151
|
instrument: instrument$1,
|
|
77181
77152
|
});
|
|
77182
|
-
// version: 1.
|
|
77153
|
+
// version: 1.243.0-c7d8ec9e0
|
|
77183
77154
|
|
|
77184
77155
|
// On core the unstable adapters are re-exported with different names,
|
|
77185
77156
|
// we want to match them here.
|
|
@@ -79428,7 +79399,7 @@ withDefaultLuvio((luvio) => {
|
|
|
79428
79399
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
79429
79400
|
graphQLImperative = ldsAdapter;
|
|
79430
79401
|
});
|
|
79431
|
-
// version: 1.
|
|
79402
|
+
// version: 1.243.0-c7d8ec9e0
|
|
79432
79403
|
|
|
79433
79404
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
79434
79405
|
__proto__: null,
|
|
@@ -80126,7 +80097,7 @@ const callbacks$1 = [];
|
|
|
80126
80097
|
function register(r) {
|
|
80127
80098
|
callbacks$1.forEach((callback) => callback(r));
|
|
80128
80099
|
}
|
|
80129
|
-
// version: 1.
|
|
80100
|
+
// version: 1.243.0-87f38263e
|
|
80130
80101
|
|
|
80131
80102
|
/**
|
|
80132
80103
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -84772,4 +84743,4 @@ const { luvio } = getRuntime();
|
|
|
84772
84743
|
setDefaultLuvio({ luvio });
|
|
84773
84744
|
|
|
84774
84745
|
export { createPrimingSession, draftManager, draftQueue, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, invokeAdapter, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, subscribeToAdapter };
|
|
84775
|
-
// version: 1.
|
|
84746
|
+
// version: 1.243.0-87f38263e
|