@salesforce/lds-worker-api 1.382.0 → 1.384.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.
|
@@ -4280,7 +4280,7 @@
|
|
|
4280
4280
|
}
|
|
4281
4281
|
callbacks.push(callback);
|
|
4282
4282
|
}
|
|
4283
|
-
// version: 1.
|
|
4283
|
+
// version: 1.384.0-cb845692ac
|
|
4284
4284
|
|
|
4285
4285
|
// TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
|
|
4286
4286
|
function instrumentAdapter$1(createFunction, _metadata) {
|
|
@@ -5324,7 +5324,7 @@
|
|
|
5324
5324
|
const { apiFamily, name } = metadata;
|
|
5325
5325
|
return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
|
|
5326
5326
|
}
|
|
5327
|
-
// version: 1.
|
|
5327
|
+
// version: 1.384.0-cb845692ac
|
|
5328
5328
|
|
|
5329
5329
|
/**
|
|
5330
5330
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -34160,7 +34160,7 @@
|
|
|
34160
34160
|
throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
|
|
34161
34161
|
throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
|
|
34162
34162
|
});
|
|
34163
|
-
// version: 1.
|
|
34163
|
+
// version: 1.384.0-835fd13f44
|
|
34164
34164
|
|
|
34165
34165
|
function requestIdleDetectedCallback(_callback) { }
|
|
34166
34166
|
function declareNotifierTaskSingle(_name) {
|
|
@@ -81036,6 +81036,16 @@
|
|
|
81036
81036
|
ldsMobileInstrumentation$2.trackValue(GARBAGE_COLLECTION_AGGRESSIVE_TRIM_TOTAL_RECORDS_BEFORE_TRIM, beforeTrimRecordCount);
|
|
81037
81037
|
ldsMobileInstrumentation$2.trackValue(GARBAGE_COLLECTION_AGGRESSIVE_TRIM_RECORDS_TRIMMED, totalRecordsTrimmed);
|
|
81038
81038
|
}
|
|
81039
|
+
/** One Store Cache Purge */
|
|
81040
|
+
const ONESTORE_CACHE_PURGING_RECORDS_PURGED = 'onestore-cache-purging-records-purged';
|
|
81041
|
+
const ONESTORE_CACHE_PURGING_RECORDS_ERROR = 'onestore-cache-purging-records-error';
|
|
81042
|
+
function reportOneStoreRecordsPurgedFromCache(recordsPurged) {
|
|
81043
|
+
ldsMobileInstrumentation$2.trackValue(ONESTORE_CACHE_PURGING_RECORDS_PURGED, recordsPurged);
|
|
81044
|
+
}
|
|
81045
|
+
function reportOneStoreCachePurgingError(error) {
|
|
81046
|
+
const errorMessage = normalizeError$1(error);
|
|
81047
|
+
ldsMobileInstrumentation$2.error(errorMessage, ONESTORE_CACHE_PURGING_RECORDS_ERROR);
|
|
81048
|
+
}
|
|
81039
81049
|
|
|
81040
81050
|
const QUICK_ACTION_HANDLER = 'QUICK_ACTION_HANDLER';
|
|
81041
81051
|
class QuickActionExecutionRepresentationHandler extends AbstractQuickActionHandler {
|
|
@@ -94274,7 +94284,7 @@
|
|
|
94274
94284
|
}
|
|
94275
94285
|
requestFromNetwork() {
|
|
94276
94286
|
const that = this;
|
|
94277
|
-
return async function* () {
|
|
94287
|
+
return (async function* () {
|
|
94278
94288
|
const result = await that.requestFromNetworkInternal();
|
|
94279
94289
|
if (result.isErr()) {
|
|
94280
94290
|
that.networkError = result;
|
|
@@ -94282,7 +94292,7 @@
|
|
|
94282
94292
|
that.networkData = result;
|
|
94283
94293
|
}
|
|
94284
94294
|
yield result;
|
|
94285
|
-
}();
|
|
94295
|
+
})();
|
|
94286
94296
|
}
|
|
94287
94297
|
writeToCache(cache, networkResult) {
|
|
94288
94298
|
return this.writeToCacheInternal(cache, networkResult);
|
|
@@ -95887,7 +95897,7 @@
|
|
|
95887
95897
|
},
|
|
95888
95898
|
};
|
|
95889
95899
|
}
|
|
95890
|
-
// version: 1.
|
|
95900
|
+
// version: 1.384.0-835fd13f44
|
|
95891
95901
|
|
|
95892
95902
|
/**
|
|
95893
95903
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -95913,7 +95923,7 @@
|
|
|
95913
95923
|
},
|
|
95914
95924
|
};
|
|
95915
95925
|
}
|
|
95916
|
-
// version: 1.
|
|
95926
|
+
// version: 1.384.0-835fd13f44
|
|
95917
95927
|
|
|
95918
95928
|
/*!
|
|
95919
95929
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -96758,7 +96768,7 @@
|
|
|
96758
96768
|
* All rights reserved.
|
|
96759
96769
|
* For full license text, see the LICENSE.txt file
|
|
96760
96770
|
*/
|
|
96761
|
-
function findExecutableOperation$
|
|
96771
|
+
function findExecutableOperation$2(input) {
|
|
96762
96772
|
const operations = input.query.definitions.filter(
|
|
96763
96773
|
(def) => def.kind === Kind$2.OPERATION_DEFINITION
|
|
96764
96774
|
);
|
|
@@ -96781,7 +96791,7 @@
|
|
|
96781
96791
|
return err$1$1(new Error("Multiple operations found in query, and no operation name provided"));
|
|
96782
96792
|
}
|
|
96783
96793
|
function buildGraphQLInputExtension$1(input) {
|
|
96784
|
-
const operationResult = findExecutableOperation$
|
|
96794
|
+
const operationResult = findExecutableOperation$2(input);
|
|
96785
96795
|
if (operationResult.isErr()) {
|
|
96786
96796
|
return err$1$1(operationResult.error);
|
|
96787
96797
|
}
|
|
@@ -96796,7 +96806,7 @@
|
|
|
96796
96806
|
};
|
|
96797
96807
|
return prev;
|
|
96798
96808
|
}, {})) || {};
|
|
96799
|
-
const fragments = input.query.definitions.filter(
|
|
96809
|
+
const fragments = input.query.definitions.filter(isFragmentDefinition$1).reduce((prev, fragment) => {
|
|
96800
96810
|
prev[fragment.name.value] = fragment;
|
|
96801
96811
|
return prev;
|
|
96802
96812
|
}, {});
|
|
@@ -96806,6 +96816,47 @@
|
|
|
96806
96816
|
parentFieldSelection: void 0
|
|
96807
96817
|
});
|
|
96808
96818
|
}
|
|
96819
|
+
const TYPENAME_FIELD = {
|
|
96820
|
+
kind: Kind$2.FIELD,
|
|
96821
|
+
name: {
|
|
96822
|
+
kind: Kind$2.NAME,
|
|
96823
|
+
value: "__typename"
|
|
96824
|
+
}
|
|
96825
|
+
};
|
|
96826
|
+
function addTypenameToDocument(doc) {
|
|
96827
|
+
return visit(doc, {
|
|
96828
|
+
SelectionSet: {
|
|
96829
|
+
enter(node, _key, parent) {
|
|
96830
|
+
if (isOperationDefinition(parent)) {
|
|
96831
|
+
return;
|
|
96832
|
+
}
|
|
96833
|
+
const { selections } = node;
|
|
96834
|
+
if (!selections || selections.length === 0) {
|
|
96835
|
+
return;
|
|
96836
|
+
}
|
|
96837
|
+
const skip = selections.some((selection) => {
|
|
96838
|
+
return isField$1(selection) && (selection.name.value === "__typename" || selection.name.value.lastIndexOf("__", 0) === 0);
|
|
96839
|
+
});
|
|
96840
|
+
if (skip) {
|
|
96841
|
+
return;
|
|
96842
|
+
}
|
|
96843
|
+
return {
|
|
96844
|
+
...node,
|
|
96845
|
+
selections: [...selections, TYPENAME_FIELD]
|
|
96846
|
+
};
|
|
96847
|
+
}
|
|
96848
|
+
}
|
|
96849
|
+
});
|
|
96850
|
+
}
|
|
96851
|
+
function isOperationDefinition(parent) {
|
|
96852
|
+
return !!parent && !Array.isArray(parent) && parent.kind === Kind$2.OPERATION_DEFINITION;
|
|
96853
|
+
}
|
|
96854
|
+
function isField$1(node) {
|
|
96855
|
+
return node.kind === Kind$2.FIELD;
|
|
96856
|
+
}
|
|
96857
|
+
function isFragmentDefinition$1(node) {
|
|
96858
|
+
return node.kind === Kind$2.FRAGMENT_DEFINITION;
|
|
96859
|
+
}
|
|
96809
96860
|
|
|
96810
96861
|
/*!
|
|
96811
96862
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -96929,7 +96980,7 @@
|
|
|
96929
96980
|
if (augmentedQueryResult.isErr()) {
|
|
96930
96981
|
throw augmentedQueryResult.error;
|
|
96931
96982
|
}
|
|
96932
|
-
return augmentedQueryResult.value;
|
|
96983
|
+
return addTypenameToDocument(augmentedQueryResult.value);
|
|
96933
96984
|
}
|
|
96934
96985
|
buildWriteInput(data) {
|
|
96935
96986
|
const extensionResult = buildGraphQLInputExtension$1({
|
|
@@ -97023,7 +97074,7 @@
|
|
|
97023
97074
|
if (augmentedQueryResult.isErr()) {
|
|
97024
97075
|
throw augmentedQueryResult.error;
|
|
97025
97076
|
}
|
|
97026
|
-
return augmentedQueryResult.value;
|
|
97077
|
+
return addTypenameToDocument(augmentedQueryResult.value);
|
|
97027
97078
|
}
|
|
97028
97079
|
buildWriteInput(data) {
|
|
97029
97080
|
const extensionResult = buildGraphQLInputExtension$1({
|
|
@@ -97777,6 +97828,7 @@
|
|
|
97777
97828
|
}
|
|
97778
97829
|
}
|
|
97779
97830
|
|
|
97831
|
+
const PURGE_CACHE_DAYS = 30;
|
|
97780
97832
|
// TODO[@W-18753648]: These services depend on WebApis that aren't available in the worker.
|
|
97781
97833
|
// import { buildServiceDescriptor as buildNdJsonServiceDescriptor } from '@luvio/command-ndjson/v1';
|
|
97782
97834
|
// import { buildServiceDescriptor as buildStreamingCommandServiceDescriptor } from '@luvio/command-streaming/v1';
|
|
@@ -97825,6 +97877,48 @@
|
|
|
97825
97877
|
// buildSseCommandServiceDescriptor(),
|
|
97826
97878
|
];
|
|
97827
97879
|
setServices(services);
|
|
97880
|
+
purgeDurableCacheByDays(PURGE_CACHE_DAYS, sqliteStore);
|
|
97881
|
+
}
|
|
97882
|
+
/**
|
|
97883
|
+
* Manually purges the OneStore cache by days.
|
|
97884
|
+
* Until we have real cache eviction in one store.
|
|
97885
|
+
*
|
|
97886
|
+
* @param days - The number of days to purge the cache by.
|
|
97887
|
+
* @param sqliteStore - The SqliteStorePlugin to purge the cache from.
|
|
97888
|
+
*/
|
|
97889
|
+
async function purgeDurableCacheByDays(days, sqliteStore) {
|
|
97890
|
+
const MILLISECONDS_PER_DAY = 24 * 60 * 60 * 1000;
|
|
97891
|
+
const cutoffTimestamp = Date.now() - days * MILLISECONDS_PER_DAY;
|
|
97892
|
+
try {
|
|
97893
|
+
// This has to be ran in a SELECT since the DELETE query may not support return on SQLite version in mobile
|
|
97894
|
+
const countQuery = `
|
|
97895
|
+
SELECT COUNT(*) FROM lds_one_store_data
|
|
97896
|
+
WHERE json_extract(metadata, '$.cacheControl.generatedTime') < ?
|
|
97897
|
+
`;
|
|
97898
|
+
const countResult = await queryAsync(sqliteStore, countQuery, [cutoffTimestamp]);
|
|
97899
|
+
const deleteCount = countResult.rows[0][0];
|
|
97900
|
+
if (deleteCount === 0) {
|
|
97901
|
+
reportOneStoreRecordsPurgedFromCache(0);
|
|
97902
|
+
return;
|
|
97903
|
+
}
|
|
97904
|
+
const deleteQuery = `
|
|
97905
|
+
DELETE FROM lds_one_store_data
|
|
97906
|
+
WHERE json_extract(metadata, '$.cacheControl.generatedTime') < ?
|
|
97907
|
+
`;
|
|
97908
|
+
await queryAsync(sqliteStore, deleteQuery, [cutoffTimestamp]);
|
|
97909
|
+
reportOneStoreRecordsPurgedFromCache(deleteCount);
|
|
97910
|
+
}
|
|
97911
|
+
catch (error) {
|
|
97912
|
+
reportOneStoreCachePurgingError(error);
|
|
97913
|
+
}
|
|
97914
|
+
}
|
|
97915
|
+
/**
|
|
97916
|
+
* Promisified wrapper for SqliteStorePlugin.query
|
|
97917
|
+
*/
|
|
97918
|
+
function queryAsync(sqliteStore, sql, params) {
|
|
97919
|
+
return new Promise((resolve, reject) => {
|
|
97920
|
+
sqliteStore.query(sql, params, (result) => resolve(result), (error) => reject(error));
|
|
97921
|
+
});
|
|
97828
97922
|
}
|
|
97829
97923
|
|
|
97830
97924
|
// so eslint doesn't complain about nimbus
|
|
@@ -98029,7 +98123,7 @@
|
|
|
98029
98123
|
id: '@salesforce/lds-network-adapter',
|
|
98030
98124
|
instrument: instrument$2,
|
|
98031
98125
|
});
|
|
98032
|
-
// version: 1.
|
|
98126
|
+
// version: 1.384.0-cb845692ac
|
|
98033
98127
|
|
|
98034
98128
|
const { create: create$3, keys: keys$3 } = Object;
|
|
98035
98129
|
const { stringify: stringify$1, parse } = JSON;
|
|
@@ -98949,7 +99043,7 @@
|
|
|
98949
99043
|
}
|
|
98950
99044
|
return target;
|
|
98951
99045
|
}
|
|
98952
|
-
function findExecutableOperation(input) {
|
|
99046
|
+
function findExecutableOperation$1(input) {
|
|
98953
99047
|
const operations = input.query.definitions.filter(
|
|
98954
99048
|
(def) => def.kind === Kind.OPERATION_DEFINITION
|
|
98955
99049
|
);
|
|
@@ -98972,7 +99066,7 @@
|
|
|
98972
99066
|
return err$3(new Error("Multiple operations found in query, and no operation name provided"));
|
|
98973
99067
|
}
|
|
98974
99068
|
function buildGraphQLInputExtension(input) {
|
|
98975
|
-
const operationResult = findExecutableOperation(input);
|
|
99069
|
+
const operationResult = findExecutableOperation$1(input);
|
|
98976
99070
|
if (operationResult.isErr()) {
|
|
98977
99071
|
return err$3(operationResult.error);
|
|
98978
99072
|
}
|
|
@@ -98987,7 +99081,7 @@
|
|
|
98987
99081
|
};
|
|
98988
99082
|
return prev;
|
|
98989
99083
|
}, {})) || {};
|
|
98990
|
-
const fragments = input.query.definitions.filter(
|
|
99084
|
+
const fragments = input.query.definitions.filter(isFragmentDefinition).reduce((prev, fragment) => {
|
|
98991
99085
|
prev[fragment.name.value] = fragment;
|
|
98992
99086
|
return prev;
|
|
98993
99087
|
}, {});
|
|
@@ -98997,14 +99091,24 @@
|
|
|
98997
99091
|
parentFieldSelection: void 0
|
|
98998
99092
|
});
|
|
98999
99093
|
}
|
|
99000
|
-
function
|
|
99094
|
+
function buildAugmentedFieldSelection(newSelection, selections, fragments) {
|
|
99001
99095
|
var _a;
|
|
99096
|
+
if (selectionExists(newSelection, selections)) {
|
|
99097
|
+
return void 0;
|
|
99098
|
+
}
|
|
99002
99099
|
const baseAlias = ((_a = newSelection.alias) == null ? void 0 : _a.value) || newSelection.name.value;
|
|
99003
99100
|
const baseInjectedAlias = `framework_augmented_${baseAlias}`;
|
|
99004
|
-
const
|
|
99005
|
-
|
|
99006
|
-
|
|
99101
|
+
const baseAliasedSelection = {
|
|
99102
|
+
...newSelection,
|
|
99103
|
+
alias: {
|
|
99104
|
+
kind: Kind.NAME,
|
|
99105
|
+
value: baseInjectedAlias
|
|
99106
|
+
}
|
|
99107
|
+
};
|
|
99108
|
+
if (selectionExists(baseAliasedSelection, selections)) {
|
|
99109
|
+
return void 0;
|
|
99007
99110
|
}
|
|
99111
|
+
const fieldName = getUniqueSelectionName(baseInjectedAlias, selections, fragments);
|
|
99008
99112
|
return {
|
|
99009
99113
|
...newSelection,
|
|
99010
99114
|
alias: {
|
|
@@ -99013,6 +99117,94 @@
|
|
|
99013
99117
|
}
|
|
99014
99118
|
};
|
|
99015
99119
|
}
|
|
99120
|
+
function selectionExists(selection, selections) {
|
|
99121
|
+
return selections.some((s) => selectionEquals(selection, s));
|
|
99122
|
+
}
|
|
99123
|
+
function selectionEquals(a, b) {
|
|
99124
|
+
var _a, _b, _c, _d, _e, _f;
|
|
99125
|
+
if (a.kind !== b.kind) {
|
|
99126
|
+
return false;
|
|
99127
|
+
}
|
|
99128
|
+
if (a.kind === Kind.FIELD) {
|
|
99129
|
+
const bField = b;
|
|
99130
|
+
return !!(a.name.value === bField.name.value) && !!(((_a = a.alias) == null ? void 0 : _a.value) === ((_b = bField.alias) == null ? void 0 : _b.value)) && argumentsEqual(a.arguments, bField.arguments) && selectionSetsEqual((_c = a.selectionSet) == null ? void 0 : _c.selections, (_d = bField.selectionSet) == null ? void 0 : _d.selections) && directivesEqual(a.directives, bField.directives);
|
|
99131
|
+
}
|
|
99132
|
+
if (a.kind === Kind.FRAGMENT_SPREAD) {
|
|
99133
|
+
const bFragmentSpread = b;
|
|
99134
|
+
return a.name.value === bFragmentSpread.name.value && directivesEqual(a.directives, bFragmentSpread.directives);
|
|
99135
|
+
}
|
|
99136
|
+
const bInlineFragment = b;
|
|
99137
|
+
return a.typeCondition === bInlineFragment.typeCondition && directivesEqual(a.directives, bInlineFragment.directives) && selectionSetsEqual((_e = a.selectionSet) == null ? void 0 : _e.selections, (_f = bInlineFragment.selectionSet) == null ? void 0 : _f.selections);
|
|
99138
|
+
}
|
|
99139
|
+
function argumentValueEquals(a, b) {
|
|
99140
|
+
if (a.kind !== b.kind) {
|
|
99141
|
+
return false;
|
|
99142
|
+
}
|
|
99143
|
+
switch (a.kind) {
|
|
99144
|
+
case Kind.STRING:
|
|
99145
|
+
case Kind.INT:
|
|
99146
|
+
case Kind.FLOAT:
|
|
99147
|
+
case Kind.BOOLEAN:
|
|
99148
|
+
case Kind.ENUM:
|
|
99149
|
+
return a.value === b.value;
|
|
99150
|
+
case Kind.NULL:
|
|
99151
|
+
return true;
|
|
99152
|
+
case Kind.VARIABLE:
|
|
99153
|
+
return a.name.value === b.name.value;
|
|
99154
|
+
case Kind.LIST:
|
|
99155
|
+
const bList = b;
|
|
99156
|
+
if (a.values.length !== bList.values.length) {
|
|
99157
|
+
return false;
|
|
99158
|
+
}
|
|
99159
|
+
return a.values.every((val, index) => argumentValueEquals(val, bList.values[index]));
|
|
99160
|
+
case Kind.OBJECT:
|
|
99161
|
+
const bObject = b;
|
|
99162
|
+
if (a.fields.length !== bObject.fields.length) {
|
|
99163
|
+
return false;
|
|
99164
|
+
}
|
|
99165
|
+
return a.fields.every((field, index) => {
|
|
99166
|
+
const bField = bObject.fields[index];
|
|
99167
|
+
return field.name.value === bField.name.value && argumentValueEquals(field.value, bField.value);
|
|
99168
|
+
});
|
|
99169
|
+
default:
|
|
99170
|
+
return false;
|
|
99171
|
+
}
|
|
99172
|
+
}
|
|
99173
|
+
function directivesEqual(a, b) {
|
|
99174
|
+
if (a === void 0 && b === void 0) {
|
|
99175
|
+
return true;
|
|
99176
|
+
}
|
|
99177
|
+
if (a === void 0 || b === void 0) {
|
|
99178
|
+
return ((a == null ? void 0 : a.length) || 0) === ((b == null ? void 0 : b.length) || 0);
|
|
99179
|
+
}
|
|
99180
|
+
if (a.length !== b.length) {
|
|
99181
|
+
return false;
|
|
99182
|
+
}
|
|
99183
|
+
return a.every((directive, index) => {
|
|
99184
|
+
const bDirective = b[index];
|
|
99185
|
+
return directive.name.value === bDirective.name.value && argumentsEqual(directive.arguments, bDirective.arguments);
|
|
99186
|
+
});
|
|
99187
|
+
}
|
|
99188
|
+
function argumentsEqual(a, b) {
|
|
99189
|
+
if (a === void 0 && b === void 0) {
|
|
99190
|
+
return true;
|
|
99191
|
+
}
|
|
99192
|
+
if (a === void 0 || b === void 0) {
|
|
99193
|
+
return ((a == null ? void 0 : a.length) || 0) === ((b == null ? void 0 : b.length) || 0);
|
|
99194
|
+
}
|
|
99195
|
+
if (a.length !== b.length) {
|
|
99196
|
+
return false;
|
|
99197
|
+
}
|
|
99198
|
+
return a.every((arg, index) => {
|
|
99199
|
+
const bArg = b[index];
|
|
99200
|
+
return arg.name.value === bArg.name.value && argumentValueEquals(arg.value, bArg.value);
|
|
99201
|
+
});
|
|
99202
|
+
}
|
|
99203
|
+
function selectionSetsEqual(a, b) {
|
|
99204
|
+
return a === void 0 || b === void 0 || !!(a.length === b.length) && !!a.every((selection, index) => {
|
|
99205
|
+
return selectionEquals(selection, b[index]);
|
|
99206
|
+
});
|
|
99207
|
+
}
|
|
99016
99208
|
function getUniqueSelectionName(fieldName, selections, fragments) {
|
|
99017
99209
|
const fieldNames = collectFieldNames(selections, fragments);
|
|
99018
99210
|
if (!fieldNames.includes(fieldName)) {
|
|
@@ -99028,14 +99220,14 @@
|
|
|
99028
99220
|
var _a;
|
|
99029
99221
|
const fieldNames = /* @__PURE__ */ new Set();
|
|
99030
99222
|
for (const selection of selections) {
|
|
99031
|
-
if (selection
|
|
99223
|
+
if (isField(selection)) {
|
|
99032
99224
|
fieldNames.add(((_a = selection.alias) == null ? void 0 : _a.value) || selection.name.value);
|
|
99033
|
-
} else if (selection
|
|
99225
|
+
} else if (isInlineFragment(selection)) {
|
|
99034
99226
|
collectFieldNames(
|
|
99035
99227
|
selection.selectionSet.selections,
|
|
99036
99228
|
fragments
|
|
99037
99229
|
).forEach((name) => fieldNames.add(name));
|
|
99038
|
-
} else if (selection
|
|
99230
|
+
} else if (isFragmentSpread(selection)) {
|
|
99039
99231
|
const fragment = fragments[selection.name.value];
|
|
99040
99232
|
if (fragment) {
|
|
99041
99233
|
collectFieldNames(
|
|
@@ -99065,6 +99257,25 @@
|
|
|
99065
99257
|
}
|
|
99066
99258
|
return ok$4(`${canonicalFieldName}::${stableJSONStringify$3({ args: formattedArguments })}`);
|
|
99067
99259
|
}
|
|
99260
|
+
({
|
|
99261
|
+
kind: Kind.FIELD,
|
|
99262
|
+
name: {
|
|
99263
|
+
kind: Kind.NAME,
|
|
99264
|
+
value: "__typename"
|
|
99265
|
+
}
|
|
99266
|
+
});
|
|
99267
|
+
function isField(node) {
|
|
99268
|
+
return node.kind === Kind.FIELD;
|
|
99269
|
+
}
|
|
99270
|
+
function isFragmentSpread(node) {
|
|
99271
|
+
return node.kind === Kind.FRAGMENT_SPREAD;
|
|
99272
|
+
}
|
|
99273
|
+
function isInlineFragment(node) {
|
|
99274
|
+
return node.kind === Kind.INLINE_FRAGMENT;
|
|
99275
|
+
}
|
|
99276
|
+
function isFragmentDefinition(node) {
|
|
99277
|
+
return node.kind === Kind.FRAGMENT_DEFINITION;
|
|
99278
|
+
}
|
|
99068
99279
|
function extractIfArgument(directive, variables, directiveName) {
|
|
99069
99280
|
var _a;
|
|
99070
99281
|
const ifArg = (_a = directive.arguments) == null ? void 0 : _a.find((arg) => arg.name.value === "if");
|
|
@@ -99348,11 +99559,11 @@
|
|
|
99348
99559
|
const augmentedSelections = [];
|
|
99349
99560
|
let augmentedFragments = { ...input.fragments };
|
|
99350
99561
|
for (const selection of input.selections) {
|
|
99351
|
-
if (selection
|
|
99562
|
+
if (isField(selection)) {
|
|
99352
99563
|
const result = this.augmentFieldSelection(selection, augmentedFragments);
|
|
99353
99564
|
augmentedSelections.push(...result.selections);
|
|
99354
99565
|
augmentedFragments = result.fragments;
|
|
99355
|
-
} else if (selection
|
|
99566
|
+
} else if (isInlineFragment(selection)) {
|
|
99356
99567
|
const augmentedFragmentSelections = this.augmentInlineFragmentSelection(
|
|
99357
99568
|
selection,
|
|
99358
99569
|
augmentedFragments
|
|
@@ -99368,19 +99579,20 @@
|
|
|
99368
99579
|
augmentedFragments = augmentedFragmentSelections.fragments;
|
|
99369
99580
|
}
|
|
99370
99581
|
}
|
|
99371
|
-
|
|
99372
|
-
|
|
99373
|
-
|
|
99374
|
-
|
|
99375
|
-
|
|
99376
|
-
|
|
99377
|
-
|
|
99378
|
-
|
|
99379
|
-
|
|
99380
|
-
|
|
99381
|
-
augmentedFragments
|
|
99382
|
-
)
|
|
99582
|
+
const newTypenameSelection = buildAugmentedFieldSelection(
|
|
99583
|
+
{
|
|
99584
|
+
kind: Kind.FIELD,
|
|
99585
|
+
name: {
|
|
99586
|
+
kind: Kind.NAME,
|
|
99587
|
+
value: "__typename"
|
|
99588
|
+
}
|
|
99589
|
+
},
|
|
99590
|
+
[...augmentedSelections, ...input.selections],
|
|
99591
|
+
augmentedFragments
|
|
99383
99592
|
);
|
|
99593
|
+
if (newTypenameSelection) {
|
|
99594
|
+
augmentedSelections.push(newTypenameSelection);
|
|
99595
|
+
}
|
|
99384
99596
|
return { selections: augmentedSelections, fragments: augmentedFragments };
|
|
99385
99597
|
}
|
|
99386
99598
|
augmentFieldSelection(selection, fragments) {
|
|
@@ -99443,21 +99655,21 @@
|
|
|
99443
99655
|
fragment
|
|
99444
99656
|
);
|
|
99445
99657
|
if (satisfiedFragmentTypeConditionResult.isErr() || !satisfiedFragmentTypeConditionResult.value) {
|
|
99446
|
-
return { selections: [], fragments };
|
|
99658
|
+
return { selections: [selection], fragments };
|
|
99447
99659
|
}
|
|
99448
|
-
const
|
|
99660
|
+
const augmentedFragment = this.augmentSelections({
|
|
99449
99661
|
selections: ((_a = fragment.selectionSet) == null ? void 0 : _a.selections) || [],
|
|
99450
99662
|
fragments
|
|
99451
99663
|
});
|
|
99452
99664
|
return {
|
|
99453
99665
|
selections: [selection],
|
|
99454
99666
|
fragments: {
|
|
99455
|
-
...fragments,
|
|
99667
|
+
...augmentedFragment.fragments,
|
|
99456
99668
|
[fragment.name.value]: {
|
|
99457
99669
|
...fragment,
|
|
99458
99670
|
selectionSet: {
|
|
99459
99671
|
kind: Kind.SELECTION_SET,
|
|
99460
|
-
selections:
|
|
99672
|
+
selections: augmentedFragment.selections
|
|
99461
99673
|
}
|
|
99462
99674
|
}
|
|
99463
99675
|
}
|
|
@@ -99467,14 +99679,14 @@
|
|
|
99467
99679
|
const normalized = {};
|
|
99468
99680
|
const errors = [];
|
|
99469
99681
|
for (const selection of input.selections) {
|
|
99470
|
-
if (selection
|
|
99682
|
+
if (isField(selection)) {
|
|
99471
99683
|
deepMerge$2(
|
|
99472
99684
|
normalized,
|
|
99473
99685
|
this.normalizeFieldSelection(cache, input, selection, errors)
|
|
99474
99686
|
);
|
|
99475
99687
|
} else {
|
|
99476
99688
|
let fragment;
|
|
99477
|
-
if (selection
|
|
99689
|
+
if (isInlineFragment(selection)) {
|
|
99478
99690
|
fragment = selection;
|
|
99479
99691
|
} else {
|
|
99480
99692
|
const fragmentDefinition = input.request.definitions.fragments[selection.name.value];
|
|
@@ -99579,14 +99791,14 @@
|
|
|
99579
99791
|
const errors = [];
|
|
99580
99792
|
const denormalized = {};
|
|
99581
99793
|
for (const selection of input.selections) {
|
|
99582
|
-
if (selection
|
|
99794
|
+
if (isField(selection)) {
|
|
99583
99795
|
deepMerge$2(
|
|
99584
99796
|
denormalized,
|
|
99585
99797
|
this.denormalizeFieldSelection(cache, input, selection, errors)
|
|
99586
99798
|
);
|
|
99587
99799
|
} else {
|
|
99588
99800
|
let fragment;
|
|
99589
|
-
if (selection
|
|
99801
|
+
if (isInlineFragment(selection)) {
|
|
99590
99802
|
fragment = selection;
|
|
99591
99803
|
} else {
|
|
99592
99804
|
const fragmentDefinition = input.request.definitions.fragments[selection.name.value];
|
|
@@ -99776,19 +99988,20 @@
|
|
|
99776
99988
|
const result = super.augmentSelections(input);
|
|
99777
99989
|
const augmentedSelections = result.selections;
|
|
99778
99990
|
let augmentedFragments = result.fragments;
|
|
99779
|
-
|
|
99780
|
-
|
|
99781
|
-
|
|
99782
|
-
|
|
99783
|
-
|
|
99784
|
-
|
|
99785
|
-
|
|
99786
|
-
|
|
99787
|
-
|
|
99788
|
-
|
|
99789
|
-
augmentedFragments
|
|
99790
|
-
)
|
|
99991
|
+
const newSelection = buildAugmentedFieldSelection(
|
|
99992
|
+
{
|
|
99993
|
+
kind: Kind.FIELD,
|
|
99994
|
+
name: {
|
|
99995
|
+
kind: Kind.NAME,
|
|
99996
|
+
value: this.idField
|
|
99997
|
+
}
|
|
99998
|
+
},
|
|
99999
|
+
[...augmentedSelections, ...input.selections],
|
|
100000
|
+
augmentedFragments
|
|
99791
100001
|
);
|
|
100002
|
+
if (newSelection) {
|
|
100003
|
+
augmentedSelections.push(newSelection);
|
|
100004
|
+
}
|
|
99792
100005
|
return { selections: augmentedSelections, fragments: augmentedFragments };
|
|
99793
100006
|
}
|
|
99794
100007
|
};
|
|
@@ -99844,6 +100057,19 @@
|
|
|
99844
100057
|
buildFieldKey(selection, variables) {
|
|
99845
100058
|
return this.graphqlRepository.buildFieldKey(selection, variables);
|
|
99846
100059
|
}
|
|
100060
|
+
buildKeyParams(input) {
|
|
100061
|
+
var _a;
|
|
100062
|
+
const idField = input.selections.find(
|
|
100063
|
+
(selection) => selection.kind === Kind.FIELD && selection.name.value === this.idField
|
|
100064
|
+
);
|
|
100065
|
+
if (!idField) {
|
|
100066
|
+
throw new Error(`Id field ${this.idField} not found in selections`);
|
|
100067
|
+
}
|
|
100068
|
+
const idFieldDataProperty = ((_a = idField.alias) == null ? void 0 : _a.value) || idField.name.value;
|
|
100069
|
+
return {
|
|
100070
|
+
[this.idField]: input.data[idFieldDataProperty]
|
|
100071
|
+
};
|
|
100072
|
+
}
|
|
99847
100073
|
}
|
|
99848
100074
|
class GraphQLDocumentRootTypeRepository extends IdentifiableGraphQLTypeRepository {
|
|
99849
100075
|
constructor() {
|
|
@@ -99890,7 +100116,7 @@
|
|
|
99890
100116
|
}
|
|
99891
100117
|
buildAugmentedQuery(input) {
|
|
99892
100118
|
var _a;
|
|
99893
|
-
const operationResult = findExecutableOperation(input);
|
|
100119
|
+
const operationResult = findExecutableOperation$1(input);
|
|
99894
100120
|
if (operationResult.isErr()) {
|
|
99895
100121
|
return err$3(operationResult.error);
|
|
99896
100122
|
}
|
|
@@ -100035,13 +100261,14 @@
|
|
|
100035
100261
|
);
|
|
100036
100262
|
augmentedSelections.push(...result.selections);
|
|
100037
100263
|
augmentedFragments = result.fragments;
|
|
100038
|
-
|
|
100039
|
-
|
|
100040
|
-
|
|
100041
|
-
|
|
100042
|
-
input.fragments
|
|
100043
|
-
)
|
|
100264
|
+
const newSelection = buildAugmentedFieldSelection(
|
|
100265
|
+
{ kind: Kind.FIELD, name: { kind: Kind.NAME, value: "__typename" } },
|
|
100266
|
+
augmentedSelections,
|
|
100267
|
+
input.fragments
|
|
100044
100268
|
);
|
|
100269
|
+
if (newSelection) {
|
|
100270
|
+
augmentedSelections.push(newSelection);
|
|
100271
|
+
}
|
|
100045
100272
|
return { selections: augmentedSelections, fragments: augmentedFragments };
|
|
100046
100273
|
}
|
|
100047
100274
|
getTypeDiscriminator(data, _selections) {
|
|
@@ -100389,6 +100616,56 @@
|
|
|
100389
100616
|
(validationError) => validationError instanceof MissingRequiredPropertyError
|
|
100390
100617
|
) !== void 0;
|
|
100391
100618
|
}
|
|
100619
|
+
function findExecutableOperation(document, operationName) {
|
|
100620
|
+
const operations = document.definitions.filter(
|
|
100621
|
+
(def) => def.kind === Kind$1.OPERATION_DEFINITION
|
|
100622
|
+
);
|
|
100623
|
+
if (operations.length === 0) {
|
|
100624
|
+
return void 0;
|
|
100625
|
+
}
|
|
100626
|
+
if (operations.length === 1 && !operationName) {
|
|
100627
|
+
return operations[0];
|
|
100628
|
+
}
|
|
100629
|
+
if (operationName) {
|
|
100630
|
+
return operations.find((op) => {
|
|
100631
|
+
var _a;
|
|
100632
|
+
return ((_a = op.name) == null ? void 0 : _a.value) === operationName;
|
|
100633
|
+
});
|
|
100634
|
+
}
|
|
100635
|
+
return void 0;
|
|
100636
|
+
}
|
|
100637
|
+
function validateGraphQLOperations(config, options) {
|
|
100638
|
+
const executableOperation = findExecutableOperation(config.query, config.operationName);
|
|
100639
|
+
if (executableOperation) {
|
|
100640
|
+
const operationType = executableOperation.operation;
|
|
100641
|
+
if (!options.acceptedOperations.includes(operationType)) {
|
|
100642
|
+
const operationTypeCapitalized = operationType.charAt(0).toUpperCase() + operationType.slice(1);
|
|
100643
|
+
throw new Error(
|
|
100644
|
+
`${operationTypeCapitalized} operations are not supported in this context`
|
|
100645
|
+
);
|
|
100646
|
+
}
|
|
100647
|
+
}
|
|
100648
|
+
}
|
|
100649
|
+
function resolveAst(ast) {
|
|
100650
|
+
if (ast === null) {
|
|
100651
|
+
return;
|
|
100652
|
+
}
|
|
100653
|
+
const result = astResolver(ast);
|
|
100654
|
+
if (result === void 0) {
|
|
100655
|
+
throw new Error("Could not resolve AST. Did you parse the query with gql?");
|
|
100656
|
+
}
|
|
100657
|
+
return result;
|
|
100658
|
+
}
|
|
100659
|
+
function wrapConfigAndVerify(config) {
|
|
100660
|
+
if (config == null ? void 0 : config.query) {
|
|
100661
|
+
config = { ...config, query: resolveAst(config.query) };
|
|
100662
|
+
if (config.query === void 0) {
|
|
100663
|
+
throw new Error("Internal error in GraphQL adapter occurred: Unable to resolve query");
|
|
100664
|
+
}
|
|
100665
|
+
validateGraphQLOperations(config, { acceptedOperations: ["query"] });
|
|
100666
|
+
}
|
|
100667
|
+
return config;
|
|
100668
|
+
}
|
|
100392
100669
|
class GraphQLCommandWireAdapterConstructor extends CommandWireAdapterConstructor {
|
|
100393
100670
|
emit(result) {
|
|
100394
100671
|
try {
|
|
@@ -100457,15 +100734,110 @@
|
|
|
100457
100734
|
}
|
|
100458
100735
|
update(config, _context) {
|
|
100459
100736
|
this.unsubscribe();
|
|
100737
|
+
const resolvedQuery = resolveAst(config.query);
|
|
100738
|
+
if (resolvedQuery) {
|
|
100739
|
+
validateGraphQLOperations(
|
|
100740
|
+
{ query: resolvedQuery, operationName: config == null ? void 0 : config.operationName },
|
|
100741
|
+
{ acceptedOperations: ["query"] }
|
|
100742
|
+
);
|
|
100743
|
+
}
|
|
100460
100744
|
this.config = {
|
|
100461
100745
|
...sanitize(config),
|
|
100462
|
-
query:
|
|
100746
|
+
query: resolvedQuery
|
|
100463
100747
|
};
|
|
100464
100748
|
this.invokeAdapter();
|
|
100465
100749
|
}
|
|
100466
100750
|
}
|
|
100751
|
+
function buildAsyncGraphQLImperativeInvoker(getCommand, exposeRefresh = false) {
|
|
100752
|
+
return async (...params) => {
|
|
100753
|
+
try {
|
|
100754
|
+
if (params.length) {
|
|
100755
|
+
params[0] = wrapConfigAndVerify(params[0]);
|
|
100756
|
+
}
|
|
100757
|
+
const command = getCommand({ params, assertIsValid });
|
|
100758
|
+
const result = await command.execute();
|
|
100759
|
+
const consumerEmittedData = {
|
|
100760
|
+
data: void 0,
|
|
100761
|
+
errors: void 0
|
|
100762
|
+
};
|
|
100763
|
+
if (result.isOk()) {
|
|
100764
|
+
deepFreeze(result.value);
|
|
100765
|
+
consumerEmittedData.data = result.value.data.data;
|
|
100766
|
+
consumerEmittedData.subscribe = (cb) => {
|
|
100767
|
+
result.value.subscribe((res) => {
|
|
100768
|
+
const consumerEmittedData2 = {
|
|
100769
|
+
data: void 0,
|
|
100770
|
+
errors: void 0
|
|
100771
|
+
};
|
|
100772
|
+
if (res.isOk()) {
|
|
100773
|
+
consumerEmittedData2.data = res.value.data;
|
|
100774
|
+
} else {
|
|
100775
|
+
if (isUserVisibleError(res.error)) {
|
|
100776
|
+
consumerEmittedData2.data = res.error.data.data;
|
|
100777
|
+
consumerEmittedData2.errors = res.error.data.errors;
|
|
100778
|
+
} else {
|
|
100779
|
+
logError(res.error);
|
|
100780
|
+
consumerEmittedData2.errors = [
|
|
100781
|
+
{
|
|
100782
|
+
message: "Internal error in GraphQL adapter occurred",
|
|
100783
|
+
locations: []
|
|
100784
|
+
}
|
|
100785
|
+
];
|
|
100786
|
+
}
|
|
100787
|
+
}
|
|
100788
|
+
cb(consumerEmittedData2);
|
|
100789
|
+
});
|
|
100790
|
+
};
|
|
100791
|
+
if (exposeRefresh) {
|
|
100792
|
+
consumerEmittedData.refresh = () => {
|
|
100793
|
+
return new Promise((resolve, reject) => {
|
|
100794
|
+
try {
|
|
100795
|
+
result.value.refresh().then((res) => {
|
|
100796
|
+
if (res.isOk()) {
|
|
100797
|
+
resolve();
|
|
100798
|
+
} else {
|
|
100799
|
+
reject(
|
|
100800
|
+
new Error(
|
|
100801
|
+
"Internal error in GraphQL adapter occurred: Failed to refresh GraphQL data"
|
|
100802
|
+
)
|
|
100803
|
+
);
|
|
100804
|
+
}
|
|
100805
|
+
});
|
|
100806
|
+
} catch (error) {
|
|
100807
|
+
logError(error);
|
|
100808
|
+
reject(
|
|
100809
|
+
new Error(
|
|
100810
|
+
"Internal error in GraphQL adapter occurred: Failed to refresh GraphQL data"
|
|
100811
|
+
)
|
|
100812
|
+
);
|
|
100813
|
+
}
|
|
100814
|
+
});
|
|
100815
|
+
};
|
|
100816
|
+
}
|
|
100817
|
+
} else {
|
|
100818
|
+
if (isUserVisibleError(result.error)) {
|
|
100819
|
+
consumerEmittedData.data = result.error.data.data;
|
|
100820
|
+
consumerEmittedData.errors = result.error.data.errors;
|
|
100821
|
+
} else {
|
|
100822
|
+
logError(result.error);
|
|
100823
|
+
consumerEmittedData.errors = [
|
|
100824
|
+
{ message: "Internal error in GraphQL adapter occurred", locations: [] }
|
|
100825
|
+
];
|
|
100826
|
+
}
|
|
100827
|
+
}
|
|
100828
|
+
return consumerEmittedData;
|
|
100829
|
+
} catch (error) {
|
|
100830
|
+
logError(error);
|
|
100831
|
+
return {
|
|
100832
|
+
data: void 0,
|
|
100833
|
+
errors: [{ message: "Internal error in GraphQL adapter occurred", locations: [] }]
|
|
100834
|
+
};
|
|
100835
|
+
}
|
|
100836
|
+
};
|
|
100837
|
+
}
|
|
100467
100838
|
function buildAsyncGraphQLImperativeLegacyInvoker(getCommand) {
|
|
100468
100839
|
const invoke = async (config, requestContext, callback) => {
|
|
100840
|
+
config = wrapConfigAndVerify(config);
|
|
100469
100841
|
const command = getCommand({ config, assertIsValid });
|
|
100470
100842
|
try {
|
|
100471
100843
|
const overrides = requestContextIsCachePolicy(requestContext) ? { cacheControlConfig: { type: "no-cache" } } : {};
|
|
@@ -100498,6 +100870,7 @@
|
|
|
100498
100870
|
}
|
|
100499
100871
|
};
|
|
100500
100872
|
const subscribe = (config, requestContext, callback) => {
|
|
100873
|
+
config = wrapConfigAndVerify(config);
|
|
100501
100874
|
const command = getCommand({ config, assertIsValid });
|
|
100502
100875
|
let unsubscribe = () => {
|
|
100503
100876
|
};
|
|
@@ -100558,14 +100931,7 @@
|
|
|
100558
100931
|
function requestContextIsCachePolicy(requestContext) {
|
|
100559
100932
|
return typeof requestContext === "object" && requestContext !== null && "cachePolicy" in requestContext && typeof requestContext.cachePolicy === "object" && requestContext.cachePolicy !== null && "type" in requestContext.cachePolicy && requestContext.cachePolicy.type === "no-cache";
|
|
100560
100933
|
}
|
|
100561
|
-
|
|
100562
|
-
const result = astResolver(ast);
|
|
100563
|
-
if (result === void 0) {
|
|
100564
|
-
throw new Error("Could not resolve AST. Did you parse the query with gql?");
|
|
100565
|
-
}
|
|
100566
|
-
return result;
|
|
100567
|
-
}
|
|
100568
|
-
// version: 1.382.0-73d929ea11
|
|
100934
|
+
// version: 1.384.0-835fd13f44
|
|
100569
100935
|
|
|
100570
100936
|
class Analytics__AnalyticsBrowseRepository extends UnidentifiableGraphQLTypeRepository {
|
|
100571
100937
|
constructor(services, typeRegistry) {
|
|
@@ -100630,6 +100996,7 @@
|
|
|
100630
100996
|
this.namespace = "oas";
|
|
100631
100997
|
this.typeName = "Analytics__AnalyticsRepresentation";
|
|
100632
100998
|
this.implementedInterfaces = ["Analytics__AnalyticsRepresentationInterface"];
|
|
100999
|
+
this.idField = "Id";
|
|
100633
101000
|
}
|
|
100634
101001
|
get fields() {
|
|
100635
101002
|
return {
|
|
@@ -100648,9 +101015,6 @@
|
|
|
100648
101015
|
Dataspaces: new BaseArrayFieldDef(new BaseObjectFieldDef(this.typeRegistry.Analytics__DataspaceRepresentation, true), true),
|
|
100649
101016
|
};
|
|
100650
101017
|
}
|
|
100651
|
-
buildKeyParams(input) {
|
|
100652
|
-
return { Id: input.data.Id };
|
|
100653
|
-
}
|
|
100654
101018
|
get cacheControl() {
|
|
100655
101019
|
return { type: "max-age", maxAge: 60 };
|
|
100656
101020
|
}
|
|
@@ -100721,6 +101085,7 @@
|
|
|
100721
101085
|
this.namespace = "oas";
|
|
100722
101086
|
this.typeName = "Analytics__AnalyticsWorkspace";
|
|
100723
101087
|
this.implementedInterfaces = [];
|
|
101088
|
+
this.idField = "Id";
|
|
100724
101089
|
}
|
|
100725
101090
|
get fields() {
|
|
100726
101091
|
return {
|
|
@@ -100735,9 +101100,6 @@
|
|
|
100735
101100
|
ApiName: new BaseScalarFieldDef(false),
|
|
100736
101101
|
};
|
|
100737
101102
|
}
|
|
100738
|
-
buildKeyParams(input) {
|
|
100739
|
-
return { Id: input.data.Id };
|
|
100740
|
-
}
|
|
100741
101103
|
get cacheControl() {
|
|
100742
101104
|
return { type: "max-age", maxAge: 60 };
|
|
100743
101105
|
}
|
|
@@ -100751,6 +101113,7 @@
|
|
|
100751
101113
|
this.namespace = "oas";
|
|
100752
101114
|
this.typeName = "Analytics__DataspaceRepresentation";
|
|
100753
101115
|
this.implementedInterfaces = [];
|
|
101116
|
+
this.idField = "Id";
|
|
100754
101117
|
}
|
|
100755
101118
|
get fields() {
|
|
100756
101119
|
return {
|
|
@@ -100761,9 +101124,6 @@
|
|
|
100761
101124
|
DeveloperName: new BaseScalarFieldDef(true),
|
|
100762
101125
|
};
|
|
100763
101126
|
}
|
|
100764
|
-
buildKeyParams(input) {
|
|
100765
|
-
return { Id: input.data.Id };
|
|
100766
|
-
}
|
|
100767
101127
|
get cacheControl() {
|
|
100768
101128
|
return { type: "max-age", maxAge: 60 };
|
|
100769
101129
|
}
|
|
@@ -101941,6 +102301,7 @@
|
|
|
101941
102301
|
this.namespace = "oas";
|
|
101942
102302
|
this.typeName = "RecordRepresentation";
|
|
101943
102303
|
this.implementedInterfaces = ["Record"];
|
|
102304
|
+
this.idField = "Id";
|
|
101944
102305
|
}
|
|
101945
102306
|
get fields() {
|
|
101946
102307
|
return {
|
|
@@ -101984,9 +102345,6 @@
|
|
|
101984
102345
|
AnyType: new BaseObjectFieldDef(this.typeRegistry.AnyType, true),
|
|
101985
102346
|
};
|
|
101986
102347
|
}
|
|
101987
|
-
buildKeyParams(input) {
|
|
101988
|
-
return { Id: input.data.Id };
|
|
101989
|
-
}
|
|
101990
102348
|
get cacheControl() {
|
|
101991
102349
|
return { type: "max-age", maxAge: 60 };
|
|
101992
102350
|
}
|
|
@@ -102116,6 +102474,7 @@
|
|
|
102116
102474
|
this.namespace = "oas";
|
|
102117
102475
|
this.typeName = "Setup__EntityRepresentation";
|
|
102118
102476
|
this.implementedInterfaces = [];
|
|
102477
|
+
this.idField = "Id";
|
|
102119
102478
|
}
|
|
102120
102479
|
get fields() {
|
|
102121
102480
|
return {
|
|
@@ -102154,9 +102513,6 @@
|
|
|
102154
102513
|
AnyType: new BaseObjectFieldDef(this.typeRegistry.AnyType, true),
|
|
102155
102514
|
};
|
|
102156
102515
|
}
|
|
102157
|
-
buildKeyParams(input) {
|
|
102158
|
-
return { Id: input.data.Id };
|
|
102159
|
-
}
|
|
102160
102516
|
get cacheControl() {
|
|
102161
102517
|
return { type: "max-age", maxAge: 60 };
|
|
102162
102518
|
}
|
|
@@ -102331,6 +102687,7 @@
|
|
|
102331
102687
|
this.namespace = "oas";
|
|
102332
102688
|
this.typeName = "Setup__ListViewRow";
|
|
102333
102689
|
this.implementedInterfaces = [];
|
|
102690
|
+
this.idField = "id";
|
|
102334
102691
|
}
|
|
102335
102692
|
get fields() {
|
|
102336
102693
|
return {
|
|
@@ -102339,9 +102696,6 @@
|
|
|
102339
102696
|
columns: new BaseArrayFieldDef(new BaseObjectFieldDef(this.typeRegistry.Setup__ListScalarField, true), false),
|
|
102340
102697
|
};
|
|
102341
102698
|
}
|
|
102342
|
-
buildKeyParams(input) {
|
|
102343
|
-
return { id: input.data.id };
|
|
102344
|
-
}
|
|
102345
102699
|
get cacheControl() {
|
|
102346
102700
|
return { type: "max-age", maxAge: 60 };
|
|
102347
102701
|
}
|
|
@@ -103377,6 +103731,61 @@
|
|
|
103377
103731
|
return data.__genericTypename || data.__typename;
|
|
103378
103732
|
}
|
|
103379
103733
|
|
|
103734
|
+
/**
|
|
103735
|
+
* Finds the typename field name from GraphQL selections, looking for __typename or aliased fields.
|
|
103736
|
+
*
|
|
103737
|
+
* @param input - The normalize/denormalize data input containing selections
|
|
103738
|
+
* @returns The field name to use for typename lookup, or '__typename' as fallback
|
|
103739
|
+
*/
|
|
103740
|
+
function findTypenameFieldFromSelections(input) {
|
|
103741
|
+
// For normalize inputs, check if selections exist and find __typename field
|
|
103742
|
+
if (input && 'selections' in input && Array.isArray(input.selections)) {
|
|
103743
|
+
const typenameSelection = input.selections.find((selection) => selection.kind === 'Field' && selection.name?.value === '__typename');
|
|
103744
|
+
if (typenameSelection) {
|
|
103745
|
+
// If there's an alias, use the alias name, otherwise use the field name
|
|
103746
|
+
return typenameSelection.alias?.value || typenameSelection.name.value;
|
|
103747
|
+
}
|
|
103748
|
+
}
|
|
103749
|
+
// Fallback to standard __typename field name
|
|
103750
|
+
return '__typename';
|
|
103751
|
+
}
|
|
103752
|
+
/**
|
|
103753
|
+
* Checks if the input data satisfies a fragment type condition by comparing the typename
|
|
103754
|
+
* from the input data with the fragment's conditional type name.
|
|
103755
|
+
*
|
|
103756
|
+
* @param input - The normalize/denormalize data input containing the typename
|
|
103757
|
+
* @param fragment - The fragment containing the type condition
|
|
103758
|
+
* @returns Result<boolean, Error> - true if the type condition is satisfied
|
|
103759
|
+
*/
|
|
103760
|
+
function dataSatisfiesFragmentTypeCondition(input, fragment) {
|
|
103761
|
+
const conditionalTypeName = fragment?.typeCondition?.name.value;
|
|
103762
|
+
const typename = input?.data?.[findTypenameFieldFromSelections(input)] ||
|
|
103763
|
+
input?.normalizedData?.__typename?.data;
|
|
103764
|
+
if (conditionalTypeName && typename === conditionalTypeName) {
|
|
103765
|
+
return ok(true);
|
|
103766
|
+
}
|
|
103767
|
+
return ok(false);
|
|
103768
|
+
}
|
|
103769
|
+
/**
|
|
103770
|
+
* Generic implementation of satisfiesFragmentTypeCondition for repositories.
|
|
103771
|
+
* Combines the base class type condition check with custom typename validation.
|
|
103772
|
+
*
|
|
103773
|
+
* @param superSatisfiesFragmentTypeCondition - The super class method to call first
|
|
103774
|
+
* @param input - The normalize/denormalize data input
|
|
103775
|
+
* @param fragment - The fragment containing the type condition
|
|
103776
|
+
* @param typeName - The repository type name for error messages
|
|
103777
|
+
* @returns Result<boolean, Error> - true if the fragment type condition is satisfied
|
|
103778
|
+
*/
|
|
103779
|
+
function genericSatisfiesFragmentTypeCondition(superSatisfiesFragmentTypeCondition, input, fragment, typeName) {
|
|
103780
|
+
// First try the base class implementation
|
|
103781
|
+
const result = superSatisfiesFragmentTypeCondition(input, fragment);
|
|
103782
|
+
if (result.isErr() || result.value) {
|
|
103783
|
+
return result;
|
|
103784
|
+
}
|
|
103785
|
+
// Then try our custom typename checking
|
|
103786
|
+
return dataSatisfiesFragmentTypeCondition(input, fragment);
|
|
103787
|
+
}
|
|
103788
|
+
|
|
103380
103789
|
class RecordRepresentationBaseRepository extends BaseGraphQLTypeRepository {
|
|
103381
103790
|
constructor(namespace, typeName, implementedInterfaces, fields, idField, services) {
|
|
103382
103791
|
super();
|
|
@@ -103403,15 +103812,8 @@
|
|
|
103403
103812
|
getFieldDef(_input, selection) {
|
|
103404
103813
|
return buildGenericTypeFieldDef(selection, this.fields, this.staticFieldNames, this.typeName);
|
|
103405
103814
|
}
|
|
103406
|
-
satisfiesFragmentTypeCondition(
|
|
103407
|
-
|
|
103408
|
-
if (result.isErr()) {
|
|
103409
|
-
return result;
|
|
103410
|
-
}
|
|
103411
|
-
if (result.value) {
|
|
103412
|
-
return result;
|
|
103413
|
-
}
|
|
103414
|
-
return err(new Error(`${this.typeName}: unsupported fragment type condition: ${fragment.typeCondition?.name.value}`));
|
|
103815
|
+
satisfiesFragmentTypeCondition(input, fragment) {
|
|
103816
|
+
return genericSatisfiesFragmentTypeCondition(super.satisfiesFragmentTypeCondition.bind(this), input, fragment, this.typeName);
|
|
103415
103817
|
}
|
|
103416
103818
|
}
|
|
103417
103819
|
|
|
@@ -103420,7 +103822,7 @@
|
|
|
103420
103822
|
super(services, typeRegistry);
|
|
103421
103823
|
this.services = services;
|
|
103422
103824
|
this.typeRegistry = typeRegistry;
|
|
103423
|
-
this.namespace = '
|
|
103825
|
+
this.namespace = 'uiapi';
|
|
103424
103826
|
this.typeName = 'RecordRepresentation';
|
|
103425
103827
|
this.implementedInterfaces = ['Record'];
|
|
103426
103828
|
this._graphqlRepositoryOverride = undefined;
|
|
@@ -103572,14 +103974,7 @@
|
|
|
103572
103974
|
return super.getFieldDef(undefined, selection) !== undefined;
|
|
103573
103975
|
}
|
|
103574
103976
|
satisfiesFragmentTypeCondition(_input, fragment) {
|
|
103575
|
-
|
|
103576
|
-
if (result.isErr()) {
|
|
103577
|
-
return result;
|
|
103578
|
-
}
|
|
103579
|
-
if (result.value) {
|
|
103580
|
-
return result;
|
|
103581
|
-
}
|
|
103582
|
-
return err(new Error(`${this.typeName}: unsupported fragment type condition: ${fragment.typeCondition?.name.value}`));
|
|
103977
|
+
return genericSatisfiesFragmentTypeCondition(super.satisfiesFragmentTypeCondition.bind(this), _input, fragment, this.typeName);
|
|
103583
103978
|
}
|
|
103584
103979
|
}
|
|
103585
103980
|
|
|
@@ -103603,14 +103998,7 @@
|
|
|
103603
103998
|
return buildGenericTypeFieldDef(selection, this.fields, this.staticFieldNames, this.typeName);
|
|
103604
103999
|
}
|
|
103605
104000
|
satisfiesFragmentTypeCondition(_input, fragment) {
|
|
103606
|
-
|
|
103607
|
-
if (result.isErr()) {
|
|
103608
|
-
return result;
|
|
103609
|
-
}
|
|
103610
|
-
if (result.value) {
|
|
103611
|
-
return result;
|
|
103612
|
-
}
|
|
103613
|
-
return err(new Error(`${this.typeName}: unsupported fragment type condition: ${fragment.typeCondition?.name.value}`));
|
|
104001
|
+
return genericSatisfiesFragmentTypeCondition(super.satisfiesFragmentTypeCondition.bind(this), _input, fragment, this.typeName);
|
|
103614
104002
|
}
|
|
103615
104003
|
}
|
|
103616
104004
|
|
|
@@ -103646,7 +104034,7 @@
|
|
|
103646
104034
|
super(services);
|
|
103647
104035
|
this.services = services;
|
|
103648
104036
|
this.typeRegistry = typeRegistry;
|
|
103649
|
-
this.namespace = '
|
|
104037
|
+
this.namespace = 'uiapi';
|
|
103650
104038
|
this.typeName = 'Setup__EntityRepresentation';
|
|
103651
104039
|
this.implementedInterfaces = [];
|
|
103652
104040
|
}
|
|
@@ -103696,14 +104084,7 @@
|
|
|
103696
104084
|
return blobTypeDef;
|
|
103697
104085
|
}
|
|
103698
104086
|
satisfiesFragmentTypeCondition(input, fragment) {
|
|
103699
|
-
|
|
103700
|
-
if (result.isErr()) {
|
|
103701
|
-
return result;
|
|
103702
|
-
}
|
|
103703
|
-
if (result.value) {
|
|
103704
|
-
return result;
|
|
103705
|
-
}
|
|
103706
|
-
return err(new Error(`${this.typeName}: unsupported fragment type condition: ${fragment.typeCondition?.name.value}`));
|
|
104087
|
+
return genericSatisfiesFragmentTypeCondition(super.satisfiesFragmentTypeCondition.bind(this), input, fragment, this.typeName);
|
|
103707
104088
|
}
|
|
103708
104089
|
}
|
|
103709
104090
|
|
|
@@ -103743,14 +104124,7 @@
|
|
|
103743
104124
|
return blobTypeDef;
|
|
103744
104125
|
}
|
|
103745
104126
|
satisfiesFragmentTypeCondition(_input, fragment) {
|
|
103746
|
-
|
|
103747
|
-
if (result.isErr()) {
|
|
103748
|
-
return result;
|
|
103749
|
-
}
|
|
103750
|
-
if (result.value) {
|
|
103751
|
-
return result;
|
|
103752
|
-
}
|
|
103753
|
-
return err(new Error(`${this.typeName}: unsupported fragment type condition: ${fragment.typeCondition?.name.value}`));
|
|
104127
|
+
return genericSatisfiesFragmentTypeCondition(super.satisfiesFragmentTypeCondition.bind(this), _input, fragment, this.typeName);
|
|
103754
104128
|
}
|
|
103755
104129
|
}
|
|
103756
104130
|
|
|
@@ -103769,7 +104143,7 @@
|
|
|
103769
104143
|
constructor(services, typeRegistry) {
|
|
103770
104144
|
super(services);
|
|
103771
104145
|
this.typeRegistry = typeRegistry;
|
|
103772
|
-
this.namespace = '
|
|
104146
|
+
this.namespace = 'uiapi';
|
|
103773
104147
|
this.typeName = 'Setup__Setup';
|
|
103774
104148
|
this.implementedInterfaces = [];
|
|
103775
104149
|
this.cacheControl = {
|
|
@@ -103790,14 +104164,7 @@
|
|
|
103790
104164
|
|
|
103791
104165
|
class SetupEdgeRepository extends Setup__SetupEdgeRepository {
|
|
103792
104166
|
satisfiesFragmentTypeCondition(_input, fragment) {
|
|
103793
|
-
|
|
103794
|
-
if (result.isErr()) {
|
|
103795
|
-
return result;
|
|
103796
|
-
}
|
|
103797
|
-
if (result.value) {
|
|
103798
|
-
return result;
|
|
103799
|
-
}
|
|
103800
|
-
return err(new Error(`${this.typeName}: unsupported fragment type condition: ${fragment.typeCondition?.name.value}`));
|
|
104167
|
+
return genericSatisfiesFragmentTypeCondition(super.satisfiesFragmentTypeCondition.bind(this), _input, fragment, this.typeName);
|
|
103801
104168
|
}
|
|
103802
104169
|
}
|
|
103803
104170
|
|
|
@@ -103811,118 +104178,55 @@
|
|
|
103811
104178
|
|
|
103812
104179
|
class RecordAggregateConnectionRepository extends RecordAggregateConnectionRepository$1 {
|
|
103813
104180
|
satisfiesFragmentTypeCondition(_input, fragment) {
|
|
103814
|
-
|
|
103815
|
-
if (result.isErr()) {
|
|
103816
|
-
return result;
|
|
103817
|
-
}
|
|
103818
|
-
if (result.value) {
|
|
103819
|
-
return result;
|
|
103820
|
-
}
|
|
103821
|
-
return err(new Error(`${this.typeName}: unsupported fragment type condition: ${fragment.typeCondition?.name.value}`));
|
|
104181
|
+
return genericSatisfiesFragmentTypeCondition(super.satisfiesFragmentTypeCondition.bind(this), _input, fragment, this.typeName);
|
|
103822
104182
|
}
|
|
103823
104183
|
}
|
|
103824
104184
|
|
|
103825
104185
|
class RecordAggregateEdgeRepository extends RecordAggregateEdgeRepository$1 {
|
|
103826
104186
|
satisfiesFragmentTypeCondition(_input, fragment) {
|
|
103827
|
-
|
|
103828
|
-
if (result.isErr()) {
|
|
103829
|
-
return result;
|
|
103830
|
-
}
|
|
103831
|
-
if (result.value) {
|
|
103832
|
-
return result;
|
|
103833
|
-
}
|
|
103834
|
-
return err(new Error(`${this.typeName}: unsupported fragment type condition: ${fragment.typeCondition?.name.value}`));
|
|
104187
|
+
return genericSatisfiesFragmentTypeCondition(super.satisfiesFragmentTypeCondition.bind(this), _input, fragment, this.typeName);
|
|
103835
104188
|
}
|
|
103836
104189
|
}
|
|
103837
104190
|
|
|
103838
104191
|
class RecordConnectionRepository extends RecordConnectionRepository$1 {
|
|
103839
104192
|
satisfiesFragmentTypeCondition(_input, fragment) {
|
|
103840
|
-
|
|
103841
|
-
if (result.isErr()) {
|
|
103842
|
-
return result;
|
|
103843
|
-
}
|
|
103844
|
-
if (result.value) {
|
|
103845
|
-
return result;
|
|
103846
|
-
}
|
|
103847
|
-
return err(new Error(`${this.typeName}: unsupported fragment type condition: ${fragment.typeCondition?.name.value}`));
|
|
104193
|
+
return genericSatisfiesFragmentTypeCondition(super.satisfiesFragmentTypeCondition.bind(this), _input, fragment, this.typeName);
|
|
103848
104194
|
}
|
|
103849
104195
|
}
|
|
103850
104196
|
|
|
103851
104197
|
class RecordEdgeRepository extends RecordEdgeRepository$1 {
|
|
103852
104198
|
satisfiesFragmentTypeCondition(_input, fragment) {
|
|
103853
|
-
|
|
103854
|
-
if (result.isErr()) {
|
|
103855
|
-
return result;
|
|
103856
|
-
}
|
|
103857
|
-
if (result.value) {
|
|
103858
|
-
return result;
|
|
103859
|
-
}
|
|
103860
|
-
return err(new Error(`${this.typeName}: unsupported fragment type condition: ${fragment.typeCondition?.name.value}`));
|
|
104199
|
+
return genericSatisfiesFragmentTypeCondition(super.satisfiesFragmentTypeCondition.bind(this), _input, fragment, this.typeName);
|
|
103861
104200
|
}
|
|
103862
104201
|
}
|
|
103863
104202
|
|
|
103864
104203
|
class RecordResultRepository extends RecordResultRepository$1 {
|
|
103865
104204
|
satisfiesFragmentTypeCondition(_input, fragment) {
|
|
103866
|
-
|
|
103867
|
-
if (result.isErr()) {
|
|
103868
|
-
return result;
|
|
103869
|
-
}
|
|
103870
|
-
if (result.value) {
|
|
103871
|
-
return result;
|
|
103872
|
-
}
|
|
103873
|
-
return err(new Error(`${this.typeName}: unsupported fragment type condition: ${fragment.typeCondition?.name.value}`));
|
|
104205
|
+
return genericSatisfiesFragmentTypeCondition(super.satisfiesFragmentTypeCondition.bind(this), _input, fragment, this.typeName);
|
|
103874
104206
|
}
|
|
103875
104207
|
}
|
|
103876
104208
|
|
|
103877
104209
|
class SetupRecordResultRepository extends Setup__SetupRecordResultRepository {
|
|
103878
104210
|
satisfiesFragmentTypeCondition(_input, fragment) {
|
|
103879
|
-
|
|
103880
|
-
if (result.isErr()) {
|
|
103881
|
-
return result;
|
|
103882
|
-
}
|
|
103883
|
-
if (result.value) {
|
|
103884
|
-
return result;
|
|
103885
|
-
}
|
|
103886
|
-
return err(new Error(`${this.typeName}: unsupported fragment type condition: ${fragment.typeCondition?.name.value}`));
|
|
104211
|
+
return genericSatisfiesFragmentTypeCondition(super.satisfiesFragmentTypeCondition.bind(this), _input, fragment, this.typeName);
|
|
103887
104212
|
}
|
|
103888
104213
|
}
|
|
103889
104214
|
|
|
103890
104215
|
class SetupAggregateConnectionRepository extends Setup__SetupAggregateConnectionRepository {
|
|
103891
104216
|
satisfiesFragmentTypeCondition(_input, fragment) {
|
|
103892
|
-
|
|
103893
|
-
if (result.isErr()) {
|
|
103894
|
-
return result;
|
|
103895
|
-
}
|
|
103896
|
-
if (result.value) {
|
|
103897
|
-
return result;
|
|
103898
|
-
}
|
|
103899
|
-
return err(new Error(`${this.typeName}: unsupported fragment type condition: ${fragment.typeCondition?.name.value}`));
|
|
104217
|
+
return genericSatisfiesFragmentTypeCondition(super.satisfiesFragmentTypeCondition.bind(this), _input, fragment, this.typeName);
|
|
103900
104218
|
}
|
|
103901
104219
|
}
|
|
103902
104220
|
|
|
103903
104221
|
class SetupAggregateEdgeRepository extends Setup__SetupAggregateEdgeRepository {
|
|
103904
104222
|
satisfiesFragmentTypeCondition(_input, fragment) {
|
|
103905
|
-
|
|
103906
|
-
if (result.isErr()) {
|
|
103907
|
-
return result;
|
|
103908
|
-
}
|
|
103909
|
-
if (result.value) {
|
|
103910
|
-
return result;
|
|
103911
|
-
}
|
|
103912
|
-
return err(new Error(`${this.typeName}: unsupported fragment type condition: ${fragment.typeCondition?.name.value}`));
|
|
104223
|
+
return genericSatisfiesFragmentTypeCondition(super.satisfiesFragmentTypeCondition.bind(this), _input, fragment, this.typeName);
|
|
103913
104224
|
}
|
|
103914
104225
|
}
|
|
103915
104226
|
|
|
103916
104227
|
class SetupConnectionRepository extends Setup__SetupConnectionRepository {
|
|
103917
104228
|
satisfiesFragmentTypeCondition(_input, fragment) {
|
|
103918
|
-
|
|
103919
|
-
if (result.isErr()) {
|
|
103920
|
-
return result;
|
|
103921
|
-
}
|
|
103922
|
-
if (result.value) {
|
|
103923
|
-
return result;
|
|
103924
|
-
}
|
|
103925
|
-
return err(new Error(`${this.typeName}: unsupported fragment type condition: ${fragment.typeCondition?.name.value}`));
|
|
104229
|
+
return genericSatisfiesFragmentTypeCondition(super.satisfiesFragmentTypeCondition.bind(this), _input, fragment, this.typeName);
|
|
103926
104230
|
}
|
|
103927
104231
|
}
|
|
103928
104232
|
|
|
@@ -104341,6 +104645,7 @@
|
|
|
104341
104645
|
|
|
104342
104646
|
let graphql$1;
|
|
104343
104647
|
let graphql_imperative$1;
|
|
104648
|
+
let graphql_imperative_legacy;
|
|
104344
104649
|
let useOneStoreGraphQL = false;
|
|
104345
104650
|
const serviceRequirements = {
|
|
104346
104651
|
instrumentCommand: {
|
|
@@ -104400,18 +104705,24 @@
|
|
|
104400
104705
|
this.exposeRefresh = true;
|
|
104401
104706
|
}
|
|
104402
104707
|
getCommand() {
|
|
104403
|
-
return new graphql_ctor(
|
|
104708
|
+
return new graphql_ctor(this.config, documentRootType, services);
|
|
104404
104709
|
}
|
|
104405
104710
|
};
|
|
104406
104711
|
const graphql_imperative_ctor = services.instrumentCommand(buildCommandClass(services.auraGraphQLNormalizedCacheControlCommand), 'graphql_imperative');
|
|
104407
|
-
graphql_imperative$1 =
|
|
104712
|
+
graphql_imperative$1 = buildAsyncGraphQLImperativeInvoker(({ params, assertIsValid }) => {
|
|
104713
|
+
const config = params[0];
|
|
104714
|
+
const _ = assertIsValid;
|
|
104715
|
+
_(config, CONFIG_SCHEMA);
|
|
104716
|
+
return new graphql_imperative_ctor(config, documentRootType, services);
|
|
104717
|
+
}, true);
|
|
104718
|
+
graphql_imperative_legacy = buildAsyncGraphQLImperativeLegacyInvoker(({ config, assertIsValid }) => {
|
|
104408
104719
|
const _ = assertIsValid;
|
|
104409
104720
|
_(config, CONFIG_SCHEMA);
|
|
104410
|
-
return new graphql_imperative_ctor(
|
|
104721
|
+
return new graphql_imperative_ctor(config, documentRootType, services);
|
|
104411
104722
|
});
|
|
104412
104723
|
useOneStoreGraphQL = services.featureFlags?.get('useOneStoreGraphQL') ?? false;
|
|
104413
104724
|
if (provisionedCallback) {
|
|
104414
|
-
provisionedCallback(graphql$1, graphql_imperative$1, useOneStoreGraphQL);
|
|
104725
|
+
provisionedCallback(graphql$1, graphql_imperative$1, graphql_imperative_legacy, useOneStoreGraphQL);
|
|
104415
104726
|
}
|
|
104416
104727
|
}, (_err) => { });
|
|
104417
104728
|
function registerCallback(cb) {
|
|
@@ -104419,10 +104730,10 @@
|
|
|
104419
104730
|
provisionedCallback = cb;
|
|
104420
104731
|
}
|
|
104421
104732
|
else {
|
|
104422
|
-
cb(graphql$1, graphql_imperative$1, useOneStoreGraphQL);
|
|
104733
|
+
cb(graphql$1, graphql_imperative$1, graphql_imperative_legacy, useOneStoreGraphQL);
|
|
104423
104734
|
}
|
|
104424
104735
|
}
|
|
104425
|
-
// version: 1.
|
|
104736
|
+
// version: 1.384.0-835fd13f44
|
|
104426
104737
|
|
|
104427
104738
|
function createFragmentMap(documentNode) {
|
|
104428
104739
|
const fragments = {};
|
|
@@ -130374,11 +130685,15 @@
|
|
|
130374
130685
|
return cacheSnapshot;
|
|
130375
130686
|
}
|
|
130376
130687
|
|
|
130688
|
+
// Wire Adapters
|
|
130377
130689
|
let graphql;
|
|
130378
130690
|
let graphqlBatch;
|
|
130379
130691
|
// Imperative GET Adapters
|
|
130380
130692
|
let graphql_imperative;
|
|
130381
130693
|
let graphqlBatch_imperative;
|
|
130694
|
+
let refreshGraphQL = (data) => {
|
|
130695
|
+
return refresh$3(data, 'refreshUiApi');
|
|
130696
|
+
};
|
|
130382
130697
|
// Adapter Metadata
|
|
130383
130698
|
const graphqlMetadata = { apiFamily: keyPrefix$1, name: 'graphql', ttl: 900000 };
|
|
130384
130699
|
const graphqlBatchMetadata = { apiFamily: keyPrefix$1, name: 'graphqlBatch' };
|
|
@@ -130400,10 +130715,16 @@
|
|
|
130400
130715
|
({ graphql, graphqlBatch, graphql_imperative, graphqlBatch_imperative } = bindExportsTo(luvio));
|
|
130401
130716
|
// We register the callback here rather than above withDefaultLuvio because we want environments
|
|
130402
130717
|
// that don't have onestore bootstrapped with the required services to default to the luvio versions of the adapters
|
|
130403
|
-
registerCallback((oneStoreGraphql, oneStoreGraphql_imperative, useOneStoreGraphQL) => {
|
|
130718
|
+
registerCallback((oneStoreGraphql, oneStoreGraphql_imperative, oneStoreGraphql_imperative_legacy, useOneStoreGraphQL) => {
|
|
130404
130719
|
if (useOneStoreGraphQL) {
|
|
130405
130720
|
graphql = oneStoreGraphql;
|
|
130406
|
-
graphql_imperative =
|
|
130721
|
+
graphql_imperative = oneStoreGraphql_imperative_legacy;
|
|
130722
|
+
refreshGraphQL = (data) => {
|
|
130723
|
+
if (typeof data?.refresh === 'function') {
|
|
130724
|
+
return data.refresh();
|
|
130725
|
+
}
|
|
130726
|
+
throw new Error('Component attempted to refresh a GraphQL result that is not refreshable');
|
|
130727
|
+
};
|
|
130407
130728
|
}
|
|
130408
130729
|
});
|
|
130409
130730
|
});
|
|
@@ -130910,14 +131231,7 @@
|
|
|
130910
131231
|
configuration: { ...configurationForGraphQLAdapters$1 },
|
|
130911
131232
|
instrument: instrument$1,
|
|
130912
131233
|
});
|
|
130913
|
-
|
|
130914
|
-
// If OneStore data, call its refresh instead
|
|
130915
|
-
if (typeof data?.refresh === 'function') {
|
|
130916
|
-
return data.refresh();
|
|
130917
|
-
}
|
|
130918
|
-
return refresh$3(data, 'refreshUiApi');
|
|
130919
|
-
}
|
|
130920
|
-
// version: 1.382.0-73d929ea11
|
|
131234
|
+
// version: 1.384.0-835fd13f44
|
|
130921
131235
|
|
|
130922
131236
|
// On core the unstable adapters are re-exported with different names,
|
|
130923
131237
|
// we want to match them here.
|
|
@@ -130929,7 +131243,7 @@
|
|
|
130929
131243
|
gql: gql,
|
|
130930
131244
|
get graphql () { return graphql; },
|
|
130931
131245
|
get graphqlBatch () { return graphqlBatch; },
|
|
130932
|
-
refreshGraphQL
|
|
131246
|
+
get refreshGraphQL () { return refreshGraphQL; },
|
|
130933
131247
|
get unstable_getActionOverrides_imperative () { return unstable_getActionOverrides_imperative; },
|
|
130934
131248
|
get unstable_getFlexipageFormulaOverrides_imperative () { return unstable_getFlexipageFormulaOverrides_imperative; },
|
|
130935
131249
|
get unstable_getGlobalActions_imperative () { return unstable_getGlobalActions_imperative; },
|
|
@@ -131069,7 +131383,7 @@
|
|
|
131069
131383
|
unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
|
|
131070
131384
|
graphQLImperative = ldsAdapter;
|
|
131071
131385
|
});
|
|
131072
|
-
// version: 1.
|
|
131386
|
+
// version: 1.384.0-835fd13f44
|
|
131073
131387
|
|
|
131074
131388
|
var gqlApi = /*#__PURE__*/Object.freeze({
|
|
131075
131389
|
__proto__: null,
|
|
@@ -131868,7 +132182,7 @@
|
|
|
131868
132182
|
function register(r) {
|
|
131869
132183
|
callbacks$1.forEach((callback) => callback(r));
|
|
131870
132184
|
}
|
|
131871
|
-
// version: 1.
|
|
132185
|
+
// version: 1.384.0-cb845692ac
|
|
131872
132186
|
|
|
131873
132187
|
/**
|
|
131874
132188
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -133205,4 +133519,4 @@
|
|
|
133205
133519
|
exports.subscribeToAdapter = subscribeToAdapter;
|
|
133206
133520
|
|
|
133207
133521
|
}));
|
|
133208
|
-
// version: 1.
|
|
133522
|
+
// version: 1.384.0-cb845692ac
|