@salesforce/lds-adapters-platform-applications 1.354.0-dev1 → 1.354.0-dev10
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.
- package/dist/es/es2018/platform-applications.js +96 -318
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +0 -1
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +1 -3
- package/package.json +3 -3
- package/sfdc/index.js +76 -310
- package/src/raml/api.raml +0 -35
- package/src/raml/luvio.raml +0 -8
- package/dist/es/es2018/types/src/generated/adapters/getMetadataGroupDomainSet.d.ts +0 -27
- package/dist/es/es2018/types/src/generated/resources/getConnectSalesforceAppsDomainSet.d.ts +0 -15
- package/dist/es/es2018/types/src/generated/types/MetadataGroupDomainSetItemRepresentation.d.ts +0 -31
- package/dist/es/es2018/types/src/generated/types/MetadataGroupDomainSetOutputRepresentation.d.ts +0 -30
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2, typeCheckConfig as typeCheckConfig$2, StoreKeyMap, createResourceParams as createResourceParams$2 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -79,7 +79,7 @@ function createLink(ref) {
|
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
function validate$
|
|
82
|
+
function validate$3(obj, path = 'ExplorerViewItem') {
|
|
83
83
|
const v_error = (() => {
|
|
84
84
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
85
85
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -102,7 +102,7 @@ function validate$5(obj, path = 'ExplorerViewItem') {
|
|
|
102
102
|
for (let i = 0; i < obj_items.length; i++) {
|
|
103
103
|
const obj_items_item = obj_items[i];
|
|
104
104
|
const path_items_item = path_items + '[' + i + ']';
|
|
105
|
-
const referencepath_items_itemValidationError = validate$
|
|
105
|
+
const referencepath_items_itemValidationError = validate$3(obj_items_item, path_items_item);
|
|
106
106
|
if (referencepath_items_itemValidationError !== null) {
|
|
107
107
|
let message = 'Object doesn\'t match ExplorerViewItem (at "' + path_items_item + '")\n';
|
|
108
108
|
message += referencepath_items_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -123,9 +123,9 @@ function validate$5(obj, path = 'ExplorerViewItem') {
|
|
|
123
123
|
return v_error === undefined ? null : v_error;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
const TTL$
|
|
127
|
-
const VERSION$
|
|
128
|
-
function validate$
|
|
126
|
+
const TTL$1 = 100000;
|
|
127
|
+
const VERSION$1 = "f7fb4db32a91c595a968707c48621271";
|
|
128
|
+
function validate$2(obj, path = 'ExplorerViewRepresentation') {
|
|
129
129
|
const v_error = (() => {
|
|
130
130
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
131
131
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -137,7 +137,7 @@ function validate$4(obj, path = 'ExplorerViewRepresentation') {
|
|
|
137
137
|
}
|
|
138
138
|
const obj_rootItem = obj.rootItem;
|
|
139
139
|
const path_rootItem = path + '.rootItem';
|
|
140
|
-
const referencepath_rootItemValidationError = validate$
|
|
140
|
+
const referencepath_rootItemValidationError = validate$3(obj_rootItem, path_rootItem);
|
|
141
141
|
if (referencepath_rootItemValidationError !== null) {
|
|
142
142
|
let message = 'Object doesn\'t match ExplorerViewItem (at "' + path_rootItem + '")\n';
|
|
143
143
|
message += referencepath_rootItemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -146,259 +146,20 @@ function validate$4(obj, path = 'ExplorerViewRepresentation') {
|
|
|
146
146
|
})();
|
|
147
147
|
return v_error === undefined ? null : v_error;
|
|
148
148
|
}
|
|
149
|
-
const RepresentationType$
|
|
150
|
-
function keyBuilder$
|
|
151
|
-
return keyPrefix + '::' + RepresentationType$
|
|
149
|
+
const RepresentationType$1 = 'ExplorerViewRepresentation';
|
|
150
|
+
function keyBuilder$4(luvio, config) {
|
|
151
|
+
return keyPrefix + '::' + RepresentationType$1 + ':' + config.metadataId;
|
|
152
152
|
}
|
|
153
153
|
function keyBuilderFromType(luvio, object) {
|
|
154
154
|
const keyParams = {
|
|
155
155
|
metadataId: object.metadataId
|
|
156
156
|
};
|
|
157
|
-
return keyBuilder$
|
|
158
|
-
}
|
|
159
|
-
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
160
|
-
return input;
|
|
161
|
-
}
|
|
162
|
-
const select$5 = function ExplorerViewRepresentationSelect() {
|
|
163
|
-
return {
|
|
164
|
-
kind: 'Fragment',
|
|
165
|
-
version: VERSION$2,
|
|
166
|
-
private: [],
|
|
167
|
-
opaque: true
|
|
168
|
-
};
|
|
169
|
-
};
|
|
170
|
-
function equals$2(existing, incoming) {
|
|
171
|
-
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
172
|
-
return false;
|
|
173
|
-
}
|
|
174
|
-
return true;
|
|
175
|
-
}
|
|
176
|
-
const ingest$2 = function ExplorerViewRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
177
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
178
|
-
const validateError = validate$4(input);
|
|
179
|
-
if (validateError !== null) {
|
|
180
|
-
throw validateError;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
const key = keyBuilderFromType(luvio, input);
|
|
184
|
-
const ttlToUse = TTL$2;
|
|
185
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "applications", VERSION$2, RepresentationType$2, equals$2);
|
|
186
|
-
return createLink(key);
|
|
187
|
-
};
|
|
188
|
-
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
189
|
-
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
190
|
-
const rootKey = keyBuilderFromType(luvio, input);
|
|
191
|
-
rootKeySet.set(rootKey, {
|
|
192
|
-
namespace: keyPrefix,
|
|
193
|
-
representationName: RepresentationType$2,
|
|
194
|
-
mergeable: false
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
function select$4(luvio, params) {
|
|
199
|
-
return select$5();
|
|
200
|
-
}
|
|
201
|
-
function keyBuilder$5(luvio, params) {
|
|
202
|
-
return keyBuilder$6(luvio, {
|
|
203
|
-
metadataId: params.urlParams.metadataId
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
207
|
-
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
208
|
-
}
|
|
209
|
-
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
210
|
-
const { body } = response;
|
|
211
|
-
const key = keyBuilder$5(luvio, resourceParams);
|
|
212
|
-
luvio.storeIngest(key, ingest$2, body);
|
|
213
|
-
const snapshot = luvio.storeLookup({
|
|
214
|
-
recordId: key,
|
|
215
|
-
node: select$4(),
|
|
216
|
-
variables: {},
|
|
217
|
-
}, snapshotRefresh);
|
|
218
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
219
|
-
if (snapshot.state !== 'Fulfilled') {
|
|
220
|
-
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
deepFreeze(snapshot.data);
|
|
224
|
-
return snapshot;
|
|
225
|
-
}
|
|
226
|
-
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
227
|
-
const key = keyBuilder$5(luvio, params);
|
|
228
|
-
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
229
|
-
const storeMetadataParams = {
|
|
230
|
-
ttl: TTL$2,
|
|
231
|
-
namespace: keyPrefix,
|
|
232
|
-
version: VERSION$2,
|
|
233
|
-
representationName: RepresentationType$2
|
|
234
|
-
};
|
|
235
|
-
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
236
|
-
return errorSnapshot;
|
|
237
|
-
}
|
|
238
|
-
function createResourceRequest$2(config) {
|
|
239
|
-
const headers = {};
|
|
240
|
-
return {
|
|
241
|
-
baseUri: '/services/data/v64.0',
|
|
242
|
-
basePath: '/connect/explorer-view/' + config.urlParams.metadataId + '',
|
|
243
|
-
method: 'get',
|
|
244
|
-
body: null,
|
|
245
|
-
urlParams: config.urlParams,
|
|
246
|
-
queryParams: {},
|
|
247
|
-
headers,
|
|
248
|
-
priority: 'normal',
|
|
249
|
-
};
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
const adapterName$2 = 'getExplorerView';
|
|
253
|
-
const getExplorerView_ConfigPropertyMetadata = [
|
|
254
|
-
generateParamConfigMetadata('metadataId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
255
|
-
];
|
|
256
|
-
const getExplorerView_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getExplorerView_ConfigPropertyMetadata);
|
|
257
|
-
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(getExplorerView_ConfigPropertyMetadata);
|
|
258
|
-
function keyBuilder$4(luvio, config) {
|
|
259
|
-
const resourceParams = createResourceParams$2(config);
|
|
260
|
-
return keyBuilder$5(luvio, resourceParams);
|
|
261
|
-
}
|
|
262
|
-
function typeCheckConfig$2(untrustedConfig) {
|
|
263
|
-
const config = {};
|
|
264
|
-
typeCheckConfig$3(untrustedConfig, config, getExplorerView_ConfigPropertyMetadata);
|
|
265
|
-
return config;
|
|
266
|
-
}
|
|
267
|
-
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
268
|
-
if (!untrustedIsObject(untrustedConfig)) {
|
|
269
|
-
return null;
|
|
270
|
-
}
|
|
271
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
272
|
-
validateConfig(untrustedConfig, configPropertyNames);
|
|
273
|
-
}
|
|
274
|
-
const config = typeCheckConfig$2(untrustedConfig);
|
|
275
|
-
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
276
|
-
return null;
|
|
277
|
-
}
|
|
278
|
-
return config;
|
|
279
|
-
}
|
|
280
|
-
function adapterFragment$2(luvio, config) {
|
|
281
|
-
createResourceParams$2(config);
|
|
282
|
-
return select$4();
|
|
283
|
-
}
|
|
284
|
-
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
285
|
-
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
286
|
-
config,
|
|
287
|
-
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
288
|
-
});
|
|
289
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
290
|
-
}
|
|
291
|
-
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
292
|
-
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
293
|
-
config,
|
|
294
|
-
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
295
|
-
});
|
|
296
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
297
|
-
}
|
|
298
|
-
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
299
|
-
const resourceParams = createResourceParams$2(config);
|
|
300
|
-
const request = createResourceRequest$2(resourceParams);
|
|
301
|
-
return luvio.dispatchResourceRequest(request, options)
|
|
302
|
-
.then((response) => {
|
|
303
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
304
|
-
const cache = new StoreKeyMap();
|
|
305
|
-
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
306
|
-
return cache;
|
|
307
|
-
});
|
|
308
|
-
}, (response) => {
|
|
309
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
313
|
-
return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
314
|
-
}
|
|
315
|
-
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
316
|
-
const { luvio, config } = context;
|
|
317
|
-
const selector = {
|
|
318
|
-
recordId: keyBuilder$4(luvio, config),
|
|
319
|
-
node: adapterFragment$2(luvio, config),
|
|
320
|
-
variables: {},
|
|
321
|
-
};
|
|
322
|
-
const cacheSnapshot = storeLookup(selector, {
|
|
323
|
-
config,
|
|
324
|
-
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
325
|
-
});
|
|
326
|
-
return cacheSnapshot;
|
|
327
|
-
}
|
|
328
|
-
const getExplorerViewAdapterFactory = (luvio) => function applications__getExplorerView(untrustedConfig, requestContext) {
|
|
329
|
-
const config = validateAdapterConfig$2(untrustedConfig, getExplorerView_ConfigPropertyNames);
|
|
330
|
-
// Invalid or incomplete config
|
|
331
|
-
if (config === null) {
|
|
332
|
-
return null;
|
|
333
|
-
}
|
|
334
|
-
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
335
|
-
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
336
|
-
};
|
|
337
|
-
|
|
338
|
-
function validate$3(obj, path = 'SalesforceAppItemDetailsRepresentation') {
|
|
339
|
-
const v_error = (() => {
|
|
340
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
341
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
342
|
-
}
|
|
343
|
-
const obj_description = obj.description;
|
|
344
|
-
const path_description = path + '.description';
|
|
345
|
-
if (typeof obj_description !== 'string') {
|
|
346
|
-
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
347
|
-
}
|
|
348
|
-
const obj_developerName = obj.developerName;
|
|
349
|
-
const path_developerName = path + '.developerName';
|
|
350
|
-
if (typeof obj_developerName !== 'string') {
|
|
351
|
-
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
352
|
-
}
|
|
353
|
-
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
354
|
-
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
355
|
-
if (typeof obj_lastModifiedDate !== 'string') {
|
|
356
|
-
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
357
|
-
}
|
|
358
|
-
const obj_masterLabel = obj.masterLabel;
|
|
359
|
-
const path_masterLabel = path + '.masterLabel';
|
|
360
|
-
if (typeof obj_masterLabel !== 'string') {
|
|
361
|
-
return new TypeError('Expected "string" but received "' + typeof obj_masterLabel + '" (at "' + path_masterLabel + '")');
|
|
362
|
-
}
|
|
363
|
-
const obj_salesforceAppId = obj.salesforceAppId;
|
|
364
|
-
const path_salesforceAppId = path + '.salesforceAppId';
|
|
365
|
-
if (typeof obj_salesforceAppId !== 'string') {
|
|
366
|
-
return new TypeError('Expected "string" but received "' + typeof obj_salesforceAppId + '" (at "' + path_salesforceAppId + '")');
|
|
367
|
-
}
|
|
368
|
-
})();
|
|
369
|
-
return v_error === undefined ? null : v_error;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
const TTL$1 = 100000;
|
|
373
|
-
const VERSION$1 = "fd96561b9186438b07fe0b9d011009a5";
|
|
374
|
-
function validate$2(obj, path = 'SalesforceAppsRepresentation') {
|
|
375
|
-
const v_error = (() => {
|
|
376
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
377
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
378
|
-
}
|
|
379
|
-
const obj_salesforceApps = obj.salesforceApps;
|
|
380
|
-
const path_salesforceApps = path + '.salesforceApps';
|
|
381
|
-
if (!ArrayIsArray(obj_salesforceApps)) {
|
|
382
|
-
return new TypeError('Expected "array" but received "' + typeof obj_salesforceApps + '" (at "' + path_salesforceApps + '")');
|
|
383
|
-
}
|
|
384
|
-
for (let i = 0; i < obj_salesforceApps.length; i++) {
|
|
385
|
-
const obj_salesforceApps_item = obj_salesforceApps[i];
|
|
386
|
-
const path_salesforceApps_item = path_salesforceApps + '[' + i + ']';
|
|
387
|
-
const referencepath_salesforceApps_itemValidationError = validate$3(obj_salesforceApps_item, path_salesforceApps_item);
|
|
388
|
-
if (referencepath_salesforceApps_itemValidationError !== null) {
|
|
389
|
-
let message = 'Object doesn\'t match SalesforceAppItemDetailsRepresentation (at "' + path_salesforceApps_item + '")\n';
|
|
390
|
-
message += referencepath_salesforceApps_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
391
|
-
return new TypeError(message);
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
})();
|
|
395
|
-
return v_error === undefined ? null : v_error;
|
|
157
|
+
return keyBuilder$4(luvio, keyParams);
|
|
396
158
|
}
|
|
397
|
-
const RepresentationType$1 = 'SalesforceAppsRepresentation';
|
|
398
159
|
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
399
160
|
return input;
|
|
400
161
|
}
|
|
401
|
-
const select$3 = function
|
|
162
|
+
const select$3 = function ExplorerViewRepresentationSelect() {
|
|
402
163
|
return {
|
|
403
164
|
kind: 'Fragment',
|
|
404
165
|
version: VERSION$1,
|
|
@@ -412,21 +173,21 @@ function equals$1(existing, incoming) {
|
|
|
412
173
|
}
|
|
413
174
|
return true;
|
|
414
175
|
}
|
|
415
|
-
const ingest$1 = function
|
|
176
|
+
const ingest$1 = function ExplorerViewRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
416
177
|
if (process.env.NODE_ENV !== 'production') {
|
|
417
178
|
const validateError = validate$2(input);
|
|
418
179
|
if (validateError !== null) {
|
|
419
180
|
throw validateError;
|
|
420
181
|
}
|
|
421
182
|
}
|
|
422
|
-
const key =
|
|
183
|
+
const key = keyBuilderFromType(luvio, input);
|
|
423
184
|
const ttlToUse = TTL$1;
|
|
424
185
|
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "applications", VERSION$1, RepresentationType$1, equals$1);
|
|
425
186
|
return createLink(key);
|
|
426
187
|
};
|
|
427
188
|
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
428
189
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
429
|
-
const rootKey =
|
|
190
|
+
const rootKey = keyBuilderFromType(luvio, input);
|
|
430
191
|
rootKeySet.set(rootKey, {
|
|
431
192
|
namespace: keyPrefix,
|
|
432
193
|
representationName: RepresentationType$1,
|
|
@@ -438,14 +199,16 @@ function select$2(luvio, params) {
|
|
|
438
199
|
return select$3();
|
|
439
200
|
}
|
|
440
201
|
function keyBuilder$3(luvio, params) {
|
|
441
|
-
return
|
|
202
|
+
return keyBuilder$4(luvio, {
|
|
203
|
+
metadataId: params.urlParams.metadataId
|
|
204
|
+
});
|
|
442
205
|
}
|
|
443
206
|
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
444
|
-
getTypeCacheKeys$1(storeKeyMap, luvio, response
|
|
207
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
445
208
|
}
|
|
446
209
|
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
447
210
|
const { body } = response;
|
|
448
|
-
const key = keyBuilder$3();
|
|
211
|
+
const key = keyBuilder$3(luvio, resourceParams);
|
|
449
212
|
luvio.storeIngest(key, ingest$1, body);
|
|
450
213
|
const snapshot = luvio.storeLookup({
|
|
451
214
|
recordId: key,
|
|
@@ -461,7 +224,7 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
461
224
|
return snapshot;
|
|
462
225
|
}
|
|
463
226
|
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
464
|
-
const key = keyBuilder$3();
|
|
227
|
+
const key = keyBuilder$3(luvio, params);
|
|
465
228
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
466
229
|
const storeMetadataParams = {
|
|
467
230
|
ttl: TTL$1,
|
|
@@ -476,26 +239,29 @@ function createResourceRequest$1(config) {
|
|
|
476
239
|
const headers = {};
|
|
477
240
|
return {
|
|
478
241
|
baseUri: '/services/data/v64.0',
|
|
479
|
-
basePath: '/connect/
|
|
242
|
+
basePath: '/connect/explorer-view/' + config.urlParams.metadataId + '',
|
|
480
243
|
method: 'get',
|
|
481
244
|
body: null,
|
|
482
|
-
urlParams:
|
|
245
|
+
urlParams: config.urlParams,
|
|
483
246
|
queryParams: {},
|
|
484
247
|
headers,
|
|
485
248
|
priority: 'normal',
|
|
486
249
|
};
|
|
487
250
|
}
|
|
488
251
|
|
|
489
|
-
const adapterName$1 = '
|
|
490
|
-
const
|
|
491
|
-
|
|
492
|
-
|
|
252
|
+
const adapterName$1 = 'getExplorerView';
|
|
253
|
+
const getExplorerView_ConfigPropertyMetadata = [
|
|
254
|
+
generateParamConfigMetadata('metadataId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
255
|
+
];
|
|
256
|
+
const getExplorerView_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getExplorerView_ConfigPropertyMetadata);
|
|
257
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$2(getExplorerView_ConfigPropertyMetadata);
|
|
493
258
|
function keyBuilder$2(luvio, config) {
|
|
494
|
-
createResourceParams$1(config);
|
|
495
|
-
return keyBuilder$3();
|
|
259
|
+
const resourceParams = createResourceParams$1(config);
|
|
260
|
+
return keyBuilder$3(luvio, resourceParams);
|
|
496
261
|
}
|
|
497
262
|
function typeCheckConfig$1(untrustedConfig) {
|
|
498
263
|
const config = {};
|
|
264
|
+
typeCheckConfig$2(untrustedConfig, config, getExplorerView_ConfigPropertyMetadata);
|
|
499
265
|
return config;
|
|
500
266
|
}
|
|
501
267
|
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
@@ -505,7 +271,7 @@ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
|
505
271
|
if (process.env.NODE_ENV !== 'production') {
|
|
506
272
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
507
273
|
}
|
|
508
|
-
const config = typeCheckConfig$1();
|
|
274
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
509
275
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
510
276
|
return null;
|
|
511
277
|
}
|
|
@@ -531,7 +297,7 @@ function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
|
531
297
|
}
|
|
532
298
|
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
533
299
|
const resourceParams = createResourceParams$1(config);
|
|
534
|
-
const request = createResourceRequest$1();
|
|
300
|
+
const request = createResourceRequest$1(resourceParams);
|
|
535
301
|
return luvio.dispatchResourceRequest(request, options)
|
|
536
302
|
.then((response) => {
|
|
537
303
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
@@ -544,7 +310,7 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
544
310
|
});
|
|
545
311
|
}
|
|
546
312
|
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
547
|
-
return buildNetworkSnapshotCachePolicy$
|
|
313
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
548
314
|
}
|
|
549
315
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
550
316
|
const { luvio, config } = context;
|
|
@@ -559,8 +325,8 @@ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
|
559
325
|
});
|
|
560
326
|
return cacheSnapshot;
|
|
561
327
|
}
|
|
562
|
-
const
|
|
563
|
-
const config = validateAdapterConfig$1(untrustedConfig,
|
|
328
|
+
const getExplorerViewAdapterFactory = (luvio) => function applications__getExplorerView(untrustedConfig, requestContext) {
|
|
329
|
+
const config = validateAdapterConfig$1(untrustedConfig, getExplorerView_ConfigPropertyNames);
|
|
564
330
|
// Invalid or incomplete config
|
|
565
331
|
if (config === null) {
|
|
566
332
|
return null;
|
|
@@ -569,55 +335,70 @@ const getSalesforceAppAdapterFactory = (luvio) => function applications__getSale
|
|
|
569
335
|
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
570
336
|
};
|
|
571
337
|
|
|
572
|
-
function validate$1(obj, path = '
|
|
338
|
+
function validate$1(obj, path = 'SalesforceAppItemDetailsRepresentation') {
|
|
573
339
|
const v_error = (() => {
|
|
574
340
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
575
341
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
576
342
|
}
|
|
577
|
-
const
|
|
578
|
-
const
|
|
579
|
-
if (typeof
|
|
580
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
343
|
+
const obj_description = obj.description;
|
|
344
|
+
const path_description = path + '.description';
|
|
345
|
+
if (typeof obj_description !== 'string') {
|
|
346
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
581
347
|
}
|
|
582
|
-
const
|
|
583
|
-
const
|
|
584
|
-
if (typeof
|
|
585
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
348
|
+
const obj_developerName = obj.developerName;
|
|
349
|
+
const path_developerName = path + '.developerName';
|
|
350
|
+
if (typeof obj_developerName !== 'string') {
|
|
351
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
352
|
+
}
|
|
353
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
354
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
355
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
356
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
357
|
+
}
|
|
358
|
+
const obj_masterLabel = obj.masterLabel;
|
|
359
|
+
const path_masterLabel = path + '.masterLabel';
|
|
360
|
+
if (typeof obj_masterLabel !== 'string') {
|
|
361
|
+
return new TypeError('Expected "string" but received "' + typeof obj_masterLabel + '" (at "' + path_masterLabel + '")');
|
|
362
|
+
}
|
|
363
|
+
const obj_salesforceAppId = obj.salesforceAppId;
|
|
364
|
+
const path_salesforceAppId = path + '.salesforceAppId';
|
|
365
|
+
if (typeof obj_salesforceAppId !== 'string') {
|
|
366
|
+
return new TypeError('Expected "string" but received "' + typeof obj_salesforceAppId + '" (at "' + path_salesforceAppId + '")');
|
|
586
367
|
}
|
|
587
368
|
})();
|
|
588
369
|
return v_error === undefined ? null : v_error;
|
|
589
370
|
}
|
|
590
371
|
|
|
591
|
-
const TTL =
|
|
592
|
-
const VERSION = "
|
|
593
|
-
function validate(obj, path = '
|
|
372
|
+
const TTL = 100000;
|
|
373
|
+
const VERSION = "fd96561b9186438b07fe0b9d011009a5";
|
|
374
|
+
function validate(obj, path = 'SalesforceAppsRepresentation') {
|
|
594
375
|
const v_error = (() => {
|
|
595
376
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
596
377
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
597
378
|
}
|
|
598
|
-
const
|
|
599
|
-
const
|
|
600
|
-
if (!ArrayIsArray(
|
|
601
|
-
return new TypeError('Expected "array" but received "' + typeof
|
|
379
|
+
const obj_salesforceApps = obj.salesforceApps;
|
|
380
|
+
const path_salesforceApps = path + '.salesforceApps';
|
|
381
|
+
if (!ArrayIsArray(obj_salesforceApps)) {
|
|
382
|
+
return new TypeError('Expected "array" but received "' + typeof obj_salesforceApps + '" (at "' + path_salesforceApps + '")');
|
|
602
383
|
}
|
|
603
|
-
for (let i = 0; i <
|
|
604
|
-
const
|
|
605
|
-
const
|
|
606
|
-
const
|
|
607
|
-
if (
|
|
608
|
-
let message = 'Object doesn\'t match
|
|
609
|
-
message +=
|
|
384
|
+
for (let i = 0; i < obj_salesforceApps.length; i++) {
|
|
385
|
+
const obj_salesforceApps_item = obj_salesforceApps[i];
|
|
386
|
+
const path_salesforceApps_item = path_salesforceApps + '[' + i + ']';
|
|
387
|
+
const referencepath_salesforceApps_itemValidationError = validate$1(obj_salesforceApps_item, path_salesforceApps_item);
|
|
388
|
+
if (referencepath_salesforceApps_itemValidationError !== null) {
|
|
389
|
+
let message = 'Object doesn\'t match SalesforceAppItemDetailsRepresentation (at "' + path_salesforceApps_item + '")\n';
|
|
390
|
+
message += referencepath_salesforceApps_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
610
391
|
return new TypeError(message);
|
|
611
392
|
}
|
|
612
393
|
}
|
|
613
394
|
})();
|
|
614
395
|
return v_error === undefined ? null : v_error;
|
|
615
396
|
}
|
|
616
|
-
const RepresentationType = '
|
|
397
|
+
const RepresentationType = 'SalesforceAppsRepresentation';
|
|
617
398
|
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
618
399
|
return input;
|
|
619
400
|
}
|
|
620
|
-
const select$1 = function
|
|
401
|
+
const select$1 = function SalesforceAppsRepresentationSelect() {
|
|
621
402
|
return {
|
|
622
403
|
kind: 'Fragment',
|
|
623
404
|
version: VERSION,
|
|
@@ -631,7 +412,7 @@ function equals(existing, incoming) {
|
|
|
631
412
|
}
|
|
632
413
|
return true;
|
|
633
414
|
}
|
|
634
|
-
const ingest = function
|
|
415
|
+
const ingest = function SalesforceAppsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
635
416
|
if (process.env.NODE_ENV !== 'production') {
|
|
636
417
|
const validateError = validate(input);
|
|
637
418
|
if (validateError !== null) {
|
|
@@ -657,14 +438,14 @@ function select(luvio, params) {
|
|
|
657
438
|
return select$1();
|
|
658
439
|
}
|
|
659
440
|
function keyBuilder$1(luvio, params) {
|
|
660
|
-
return keyPrefix + '::
|
|
441
|
+
return keyPrefix + '::SalesforceAppsRepresentation:(' + ')';
|
|
661
442
|
}
|
|
662
443
|
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
663
|
-
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(
|
|
444
|
+
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1());
|
|
664
445
|
}
|
|
665
446
|
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
666
447
|
const { body } = response;
|
|
667
|
-
const key = keyBuilder$1(
|
|
448
|
+
const key = keyBuilder$1();
|
|
668
449
|
luvio.storeIngest(key, ingest, body);
|
|
669
450
|
const snapshot = luvio.storeLookup({
|
|
670
451
|
recordId: key,
|
|
@@ -680,7 +461,7 @@ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
680
461
|
return snapshot;
|
|
681
462
|
}
|
|
682
463
|
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
683
|
-
const key = keyBuilder$1(
|
|
464
|
+
const key = keyBuilder$1();
|
|
684
465
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
685
466
|
const storeMetadataParams = {
|
|
686
467
|
ttl: TTL,
|
|
@@ -695,29 +476,26 @@ function createResourceRequest(config) {
|
|
|
695
476
|
const headers = {};
|
|
696
477
|
return {
|
|
697
478
|
baseUri: '/services/data/v64.0',
|
|
698
|
-
basePath: '/connect/salesforce-apps
|
|
479
|
+
basePath: '/connect/salesforce-apps',
|
|
699
480
|
method: 'get',
|
|
700
481
|
body: null,
|
|
701
482
|
urlParams: {},
|
|
702
|
-
queryParams:
|
|
483
|
+
queryParams: {},
|
|
703
484
|
headers,
|
|
704
485
|
priority: 'normal',
|
|
705
486
|
};
|
|
706
487
|
}
|
|
707
488
|
|
|
708
|
-
const adapterName = '
|
|
709
|
-
const
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
const getMetadataGroupDomainSet_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getMetadataGroupDomainSet_ConfigPropertyMetadata);
|
|
713
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$3(getMetadataGroupDomainSet_ConfigPropertyMetadata);
|
|
489
|
+
const adapterName = 'getSalesforceApp';
|
|
490
|
+
const getSalesforceApp_ConfigPropertyMetadata = [];
|
|
491
|
+
const getSalesforceApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getSalesforceApp_ConfigPropertyMetadata);
|
|
492
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$2(getSalesforceApp_ConfigPropertyMetadata);
|
|
714
493
|
function keyBuilder(luvio, config) {
|
|
715
|
-
|
|
716
|
-
return keyBuilder$1(
|
|
494
|
+
createResourceParams(config);
|
|
495
|
+
return keyBuilder$1();
|
|
717
496
|
}
|
|
718
497
|
function typeCheckConfig(untrustedConfig) {
|
|
719
498
|
const config = {};
|
|
720
|
-
typeCheckConfig$3(untrustedConfig, config, getMetadataGroupDomainSet_ConfigPropertyMetadata);
|
|
721
499
|
return config;
|
|
722
500
|
}
|
|
723
501
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -727,7 +505,7 @@ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
|
727
505
|
if (process.env.NODE_ENV !== 'production') {
|
|
728
506
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
729
507
|
}
|
|
730
|
-
const config = typeCheckConfig(
|
|
508
|
+
const config = typeCheckConfig();
|
|
731
509
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
732
510
|
return null;
|
|
733
511
|
}
|
|
@@ -753,7 +531,7 @@ function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
|
753
531
|
}
|
|
754
532
|
function buildNetworkSnapshot(luvio, config, options) {
|
|
755
533
|
const resourceParams = createResourceParams(config);
|
|
756
|
-
const request = createResourceRequest(
|
|
534
|
+
const request = createResourceRequest();
|
|
757
535
|
return luvio.dispatchResourceRequest(request, options)
|
|
758
536
|
.then((response) => {
|
|
759
537
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
@@ -766,7 +544,7 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
766
544
|
});
|
|
767
545
|
}
|
|
768
546
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
769
|
-
return buildNetworkSnapshotCachePolicy$
|
|
547
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
770
548
|
}
|
|
771
549
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
772
550
|
const { luvio, config } = context;
|
|
@@ -781,8 +559,8 @@ function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
|
781
559
|
});
|
|
782
560
|
return cacheSnapshot;
|
|
783
561
|
}
|
|
784
|
-
const
|
|
785
|
-
const config = validateAdapterConfig(untrustedConfig,
|
|
562
|
+
const getSalesforceAppAdapterFactory = (luvio) => function applications__getSalesforceApp(untrustedConfig, requestContext) {
|
|
563
|
+
const config = validateAdapterConfig(untrustedConfig, getSalesforceApp_ConfigPropertyNames);
|
|
786
564
|
// Invalid or incomplete config
|
|
787
565
|
if (config === null) {
|
|
788
566
|
return null;
|
|
@@ -791,4 +569,4 @@ const getMetadataGroupDomainSetAdapterFactory = (luvio) => function applications
|
|
|
791
569
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
792
570
|
};
|
|
793
571
|
|
|
794
|
-
export { getExplorerViewAdapterFactory,
|
|
572
|
+
export { getExplorerViewAdapterFactory, getSalesforceAppAdapterFactory };
|