@salesforce/lds-adapters-platform-applications 1.354.0-dev2 → 1.354.0-dev21
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
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
declare let getExplorerView: any;
|
|
2
2
|
declare let getExplorerViewNotifyChange: any;
|
|
3
|
-
declare let getMetadataGroupDomainSet: any;
|
|
4
3
|
declare let getSalesforceApp: any;
|
|
5
4
|
declare let getExplorerView_imperative: any;
|
|
6
|
-
declare let getMetadataGroupDomainSet_imperative: any;
|
|
7
5
|
declare let getSalesforceApp_imperative: any;
|
|
8
|
-
export { getExplorerView, getExplorerViewNotifyChange,
|
|
6
|
+
export { getExplorerView, getExplorerViewNotifyChange, getSalesforceApp, getExplorerView_imperative, getSalesforceApp_imperative, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-platform-applications",
|
|
3
|
-
"version": "1.354.0-
|
|
3
|
+
"version": "1.354.0-dev21",
|
|
4
4
|
"description": "salesforce applications",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "dist/es/es2018/platform-applications.js",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"test:unit": "jest"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@salesforce/lds-bindings": "^1.354.0-
|
|
43
|
+
"@salesforce/lds-bindings": "^1.354.0-dev21"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@salesforce/lds-compiler-plugins": "^1.354.0-
|
|
46
|
+
"@salesforce/lds-compiler-plugins": "^1.354.0-dev21"
|
|
47
47
|
},
|
|
48
48
|
"nx": {
|
|
49
49
|
"targets": {
|
package/sfdc/index.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
|
|
16
16
|
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
17
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$
|
|
17
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2, typeCheckConfig as typeCheckConfig$2, createResourceParams as createResourceParams$2 } from 'force/luvioEngine';
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
20
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -89,7 +89,7 @@ function createLink(ref) {
|
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
function validate$
|
|
92
|
+
function validate$3(obj, path = 'ExplorerViewItem') {
|
|
93
93
|
const v_error = (() => {
|
|
94
94
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
95
95
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -112,7 +112,7 @@ function validate$5(obj, path = 'ExplorerViewItem') {
|
|
|
112
112
|
for (let i = 0; i < obj_items.length; i++) {
|
|
113
113
|
const obj_items_item = obj_items[i];
|
|
114
114
|
const path_items_item = path_items + '[' + i + ']';
|
|
115
|
-
const referencepath_items_itemValidationError = validate$
|
|
115
|
+
const referencepath_items_itemValidationError = validate$3(obj_items_item, path_items_item);
|
|
116
116
|
if (referencepath_items_itemValidationError !== null) {
|
|
117
117
|
let message = 'Object doesn\'t match ExplorerViewItem (at "' + path_items_item + '")\n';
|
|
118
118
|
message += referencepath_items_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -133,9 +133,9 @@ function validate$5(obj, path = 'ExplorerViewItem') {
|
|
|
133
133
|
return v_error === undefined ? null : v_error;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
const TTL$
|
|
137
|
-
const VERSION$
|
|
138
|
-
function validate$
|
|
136
|
+
const TTL$1 = 100000;
|
|
137
|
+
const VERSION$1 = "f7fb4db32a91c595a968707c48621271";
|
|
138
|
+
function validate$2(obj, path = 'ExplorerViewRepresentation') {
|
|
139
139
|
const v_error = (() => {
|
|
140
140
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
141
141
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -147,7 +147,7 @@ function validate$4(obj, path = 'ExplorerViewRepresentation') {
|
|
|
147
147
|
}
|
|
148
148
|
const obj_rootItem = obj.rootItem;
|
|
149
149
|
const path_rootItem = path + '.rootItem';
|
|
150
|
-
const referencepath_rootItemValidationError = validate$
|
|
150
|
+
const referencepath_rootItemValidationError = validate$3(obj_rootItem, path_rootItem);
|
|
151
151
|
if (referencepath_rootItemValidationError !== null) {
|
|
152
152
|
let message = 'Object doesn\'t match ExplorerViewItem (at "' + path_rootItem + '")\n';
|
|
153
153
|
message += referencepath_rootItemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -156,285 +156,20 @@ function validate$4(obj, path = 'ExplorerViewRepresentation') {
|
|
|
156
156
|
})();
|
|
157
157
|
return v_error === undefined ? null : v_error;
|
|
158
158
|
}
|
|
159
|
-
const RepresentationType$
|
|
160
|
-
function keyBuilder$
|
|
161
|
-
return keyPrefix + '::' + RepresentationType$
|
|
159
|
+
const RepresentationType$1 = 'ExplorerViewRepresentation';
|
|
160
|
+
function keyBuilder$4(luvio, config) {
|
|
161
|
+
return keyPrefix + '::' + RepresentationType$1 + ':' + config.metadataId;
|
|
162
162
|
}
|
|
163
163
|
function keyBuilderFromType(luvio, object) {
|
|
164
164
|
const keyParams = {
|
|
165
165
|
metadataId: object.metadataId
|
|
166
166
|
};
|
|
167
|
-
return keyBuilder$
|
|
168
|
-
}
|
|
169
|
-
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
170
|
-
return input;
|
|
171
|
-
}
|
|
172
|
-
const select$5 = function ExplorerViewRepresentationSelect() {
|
|
173
|
-
return {
|
|
174
|
-
kind: 'Fragment',
|
|
175
|
-
version: VERSION$2,
|
|
176
|
-
private: [],
|
|
177
|
-
opaque: true
|
|
178
|
-
};
|
|
179
|
-
};
|
|
180
|
-
function equals$2(existing, incoming) {
|
|
181
|
-
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
182
|
-
return false;
|
|
183
|
-
}
|
|
184
|
-
return true;
|
|
185
|
-
}
|
|
186
|
-
const ingest$2 = function ExplorerViewRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
187
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
188
|
-
const validateError = validate$4(input);
|
|
189
|
-
if (validateError !== null) {
|
|
190
|
-
throw validateError;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
const key = keyBuilderFromType(luvio, input);
|
|
194
|
-
const ttlToUse = TTL$2;
|
|
195
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "applications", VERSION$2, RepresentationType$2, equals$2);
|
|
196
|
-
return createLink(key);
|
|
197
|
-
};
|
|
198
|
-
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
199
|
-
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
200
|
-
const rootKey = keyBuilderFromType(luvio, input);
|
|
201
|
-
rootKeySet.set(rootKey, {
|
|
202
|
-
namespace: keyPrefix,
|
|
203
|
-
representationName: RepresentationType$2,
|
|
204
|
-
mergeable: false
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
function select$4(luvio, params) {
|
|
209
|
-
return select$5();
|
|
210
|
-
}
|
|
211
|
-
function keyBuilder$5(luvio, params) {
|
|
212
|
-
return keyBuilder$6(luvio, {
|
|
213
|
-
metadataId: params.urlParams.metadataId
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
217
|
-
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
218
|
-
}
|
|
219
|
-
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
220
|
-
const { body } = response;
|
|
221
|
-
const key = keyBuilder$5(luvio, resourceParams);
|
|
222
|
-
luvio.storeIngest(key, ingest$2, body);
|
|
223
|
-
const snapshot = luvio.storeLookup({
|
|
224
|
-
recordId: key,
|
|
225
|
-
node: select$4(),
|
|
226
|
-
variables: {},
|
|
227
|
-
}, snapshotRefresh);
|
|
228
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
229
|
-
if (snapshot.state !== 'Fulfilled') {
|
|
230
|
-
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
deepFreeze(snapshot.data);
|
|
234
|
-
return snapshot;
|
|
235
|
-
}
|
|
236
|
-
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
237
|
-
const key = keyBuilder$5(luvio, params);
|
|
238
|
-
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
239
|
-
const storeMetadataParams = {
|
|
240
|
-
ttl: TTL$2,
|
|
241
|
-
namespace: keyPrefix,
|
|
242
|
-
version: VERSION$2,
|
|
243
|
-
representationName: RepresentationType$2
|
|
244
|
-
};
|
|
245
|
-
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
246
|
-
return errorSnapshot;
|
|
247
|
-
}
|
|
248
|
-
function createResourceRequest$2(config) {
|
|
249
|
-
const headers = {};
|
|
250
|
-
return {
|
|
251
|
-
baseUri: '/services/data/v64.0',
|
|
252
|
-
basePath: '/connect/explorer-view/' + config.urlParams.metadataId + '',
|
|
253
|
-
method: 'get',
|
|
254
|
-
body: null,
|
|
255
|
-
urlParams: config.urlParams,
|
|
256
|
-
queryParams: {},
|
|
257
|
-
headers,
|
|
258
|
-
priority: 'normal',
|
|
259
|
-
};
|
|
260
|
-
}
|
|
261
|
-
function createResourceRequestFromRepresentation(representation) {
|
|
262
|
-
const config = {
|
|
263
|
-
urlParams: {},
|
|
264
|
-
};
|
|
265
|
-
config.urlParams.metadataId = representation.metadataId;
|
|
266
|
-
return createResourceRequest$2(config);
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
const adapterName$2 = 'getExplorerView';
|
|
270
|
-
const getExplorerView_ConfigPropertyMetadata = [
|
|
271
|
-
generateParamConfigMetadata('metadataId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
272
|
-
];
|
|
273
|
-
const getExplorerView_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getExplorerView_ConfigPropertyMetadata);
|
|
274
|
-
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(getExplorerView_ConfigPropertyMetadata);
|
|
275
|
-
function keyBuilder$4(luvio, config) {
|
|
276
|
-
const resourceParams = createResourceParams$2(config);
|
|
277
|
-
return keyBuilder$5(luvio, resourceParams);
|
|
278
|
-
}
|
|
279
|
-
function typeCheckConfig$2(untrustedConfig) {
|
|
280
|
-
const config = {};
|
|
281
|
-
typeCheckConfig$3(untrustedConfig, config, getExplorerView_ConfigPropertyMetadata);
|
|
282
|
-
return config;
|
|
283
|
-
}
|
|
284
|
-
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
285
|
-
if (!untrustedIsObject(untrustedConfig)) {
|
|
286
|
-
return null;
|
|
287
|
-
}
|
|
288
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
289
|
-
validateConfig(untrustedConfig, configPropertyNames);
|
|
290
|
-
}
|
|
291
|
-
const config = typeCheckConfig$2(untrustedConfig);
|
|
292
|
-
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
293
|
-
return null;
|
|
294
|
-
}
|
|
295
|
-
return config;
|
|
296
|
-
}
|
|
297
|
-
function adapterFragment$2(luvio, config) {
|
|
298
|
-
createResourceParams$2(config);
|
|
299
|
-
return select$4();
|
|
300
|
-
}
|
|
301
|
-
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
302
|
-
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
303
|
-
config,
|
|
304
|
-
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
305
|
-
});
|
|
306
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
307
|
-
}
|
|
308
|
-
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
309
|
-
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
310
|
-
config,
|
|
311
|
-
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
312
|
-
});
|
|
313
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
314
|
-
}
|
|
315
|
-
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
316
|
-
const resourceParams = createResourceParams$2(config);
|
|
317
|
-
const request = createResourceRequest$2(resourceParams);
|
|
318
|
-
return luvio.dispatchResourceRequest(request, options)
|
|
319
|
-
.then((response) => {
|
|
320
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
321
|
-
const cache = new StoreKeyMap();
|
|
322
|
-
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
323
|
-
return cache;
|
|
324
|
-
});
|
|
325
|
-
}, (response) => {
|
|
326
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
327
|
-
});
|
|
328
|
-
}
|
|
329
|
-
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
330
|
-
return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
331
|
-
}
|
|
332
|
-
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
333
|
-
const { luvio, config } = context;
|
|
334
|
-
const selector = {
|
|
335
|
-
recordId: keyBuilder$4(luvio, config),
|
|
336
|
-
node: adapterFragment$2(luvio, config),
|
|
337
|
-
variables: {},
|
|
338
|
-
};
|
|
339
|
-
const cacheSnapshot = storeLookup(selector, {
|
|
340
|
-
config,
|
|
341
|
-
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
342
|
-
});
|
|
343
|
-
return cacheSnapshot;
|
|
344
|
-
}
|
|
345
|
-
const getExplorerViewAdapterFactory = (luvio) => function applications__getExplorerView(untrustedConfig, requestContext) {
|
|
346
|
-
const config = validateAdapterConfig$2(untrustedConfig, getExplorerView_ConfigPropertyNames);
|
|
347
|
-
// Invalid or incomplete config
|
|
348
|
-
if (config === null) {
|
|
349
|
-
return null;
|
|
350
|
-
}
|
|
351
|
-
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
352
|
-
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
353
|
-
};
|
|
354
|
-
const notifyChangeFactory = (luvio, options) => {
|
|
355
|
-
return function getConnectExplorerViewByMetadataIdNotifyChange(configs) {
|
|
356
|
-
const keys = configs.map(c => keyBuilder$6(luvio, c));
|
|
357
|
-
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
358
|
-
for (let i = 0, len = entries.length; i < len; i++) {
|
|
359
|
-
const { key, record: val } = entries[i];
|
|
360
|
-
const refreshRequest = createResourceRequestFromRepresentation(val);
|
|
361
|
-
luvio.dispatchResourceRequest(refreshRequest, options)
|
|
362
|
-
.then((response) => {
|
|
363
|
-
return luvio.handleSuccessResponse(() => {
|
|
364
|
-
const { body } = response;
|
|
365
|
-
luvio.storeIngest(key, ingest$2, body);
|
|
366
|
-
return luvio.storeBroadcast();
|
|
367
|
-
}, () => {
|
|
368
|
-
const cache = new StoreKeyMap();
|
|
369
|
-
getTypeCacheKeys$2(cache, luvio, response.body);
|
|
370
|
-
return cache;
|
|
371
|
-
});
|
|
372
|
-
}, (error) => {
|
|
373
|
-
return luvio.handleErrorResponse(() => {
|
|
374
|
-
const errorSnapshot = luvio.errorSnapshot(error);
|
|
375
|
-
luvio.storeIngestError(key, errorSnapshot, {
|
|
376
|
-
ttl: TTL$2,
|
|
377
|
-
namespace: keyPrefix,
|
|
378
|
-
version: VERSION$2,
|
|
379
|
-
representationName: RepresentationType$2
|
|
380
|
-
});
|
|
381
|
-
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
382
|
-
});
|
|
383
|
-
});
|
|
384
|
-
}
|
|
385
|
-
});
|
|
386
|
-
};
|
|
387
|
-
};
|
|
388
|
-
|
|
389
|
-
function validate$3(obj, path = 'MetadataGroupDomainSetItemRepresentation') {
|
|
390
|
-
const v_error = (() => {
|
|
391
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
392
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
393
|
-
}
|
|
394
|
-
const obj_entityName = obj.entityName;
|
|
395
|
-
const path_entityName = path + '.entityName';
|
|
396
|
-
if (typeof obj_entityName !== 'string') {
|
|
397
|
-
return new TypeError('Expected "string" but received "' + typeof obj_entityName + '" (at "' + path_entityName + '")');
|
|
398
|
-
}
|
|
399
|
-
const obj_label = obj.label;
|
|
400
|
-
const path_label = path + '.label';
|
|
401
|
-
if (typeof obj_label !== 'string') {
|
|
402
|
-
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
403
|
-
}
|
|
404
|
-
})();
|
|
405
|
-
return v_error === undefined ? null : v_error;
|
|
167
|
+
return keyBuilder$4(luvio, keyParams);
|
|
406
168
|
}
|
|
407
|
-
|
|
408
|
-
const TTL$1 = 500000;
|
|
409
|
-
const VERSION$1 = "007a449fdb5318904cabb4949cc2fc8a";
|
|
410
|
-
function validate$2(obj, path = 'MetadataGroupDomainSetOutputRepresentation') {
|
|
411
|
-
const v_error = (() => {
|
|
412
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
413
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
414
|
-
}
|
|
415
|
-
const obj_metadataGroupDomainSet = obj.metadataGroupDomainSet;
|
|
416
|
-
const path_metadataGroupDomainSet = path + '.metadataGroupDomainSet';
|
|
417
|
-
if (!ArrayIsArray(obj_metadataGroupDomainSet)) {
|
|
418
|
-
return new TypeError('Expected "array" but received "' + typeof obj_metadataGroupDomainSet + '" (at "' + path_metadataGroupDomainSet + '")');
|
|
419
|
-
}
|
|
420
|
-
for (let i = 0; i < obj_metadataGroupDomainSet.length; i++) {
|
|
421
|
-
const obj_metadataGroupDomainSet_item = obj_metadataGroupDomainSet[i];
|
|
422
|
-
const path_metadataGroupDomainSet_item = path_metadataGroupDomainSet + '[' + i + ']';
|
|
423
|
-
const referencepath_metadataGroupDomainSet_itemValidationError = validate$3(obj_metadataGroupDomainSet_item, path_metadataGroupDomainSet_item);
|
|
424
|
-
if (referencepath_metadataGroupDomainSet_itemValidationError !== null) {
|
|
425
|
-
let message = 'Object doesn\'t match MetadataGroupDomainSetItemRepresentation (at "' + path_metadataGroupDomainSet_item + '")\n';
|
|
426
|
-
message += referencepath_metadataGroupDomainSet_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
427
|
-
return new TypeError(message);
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
})();
|
|
431
|
-
return v_error === undefined ? null : v_error;
|
|
432
|
-
}
|
|
433
|
-
const RepresentationType$1 = 'MetadataGroupDomainSetOutputRepresentation';
|
|
434
169
|
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
435
170
|
return input;
|
|
436
171
|
}
|
|
437
|
-
const select$3 = function
|
|
172
|
+
const select$3 = function ExplorerViewRepresentationSelect() {
|
|
438
173
|
return {
|
|
439
174
|
kind: 'Fragment',
|
|
440
175
|
version: VERSION$1,
|
|
@@ -448,21 +183,21 @@ function equals$1(existing, incoming) {
|
|
|
448
183
|
}
|
|
449
184
|
return true;
|
|
450
185
|
}
|
|
451
|
-
const ingest$1 = function
|
|
186
|
+
const ingest$1 = function ExplorerViewRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
452
187
|
if (process.env.NODE_ENV !== 'production') {
|
|
453
188
|
const validateError = validate$2(input);
|
|
454
189
|
if (validateError !== null) {
|
|
455
190
|
throw validateError;
|
|
456
191
|
}
|
|
457
192
|
}
|
|
458
|
-
const key =
|
|
193
|
+
const key = keyBuilderFromType(luvio, input);
|
|
459
194
|
const ttlToUse = TTL$1;
|
|
460
195
|
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "applications", VERSION$1, RepresentationType$1, equals$1);
|
|
461
196
|
return createLink(key);
|
|
462
197
|
};
|
|
463
198
|
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
464
199
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
465
|
-
const rootKey =
|
|
200
|
+
const rootKey = keyBuilderFromType(luvio, input);
|
|
466
201
|
rootKeySet.set(rootKey, {
|
|
467
202
|
namespace: keyPrefix,
|
|
468
203
|
representationName: RepresentationType$1,
|
|
@@ -474,10 +209,12 @@ function select$2(luvio, params) {
|
|
|
474
209
|
return select$3();
|
|
475
210
|
}
|
|
476
211
|
function keyBuilder$3(luvio, params) {
|
|
477
|
-
return
|
|
212
|
+
return keyBuilder$4(luvio, {
|
|
213
|
+
metadataId: params.urlParams.metadataId
|
|
214
|
+
});
|
|
478
215
|
}
|
|
479
216
|
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
480
|
-
getTypeCacheKeys$1(storeKeyMap, luvio, response
|
|
217
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
481
218
|
}
|
|
482
219
|
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
483
220
|
const { body } = response;
|
|
@@ -512,29 +249,36 @@ function createResourceRequest$1(config) {
|
|
|
512
249
|
const headers = {};
|
|
513
250
|
return {
|
|
514
251
|
baseUri: '/services/data/v64.0',
|
|
515
|
-
basePath: '/connect/
|
|
252
|
+
basePath: '/connect/explorer-view/' + config.urlParams.metadataId + '',
|
|
516
253
|
method: 'get',
|
|
517
254
|
body: null,
|
|
518
|
-
urlParams:
|
|
519
|
-
queryParams:
|
|
255
|
+
urlParams: config.urlParams,
|
|
256
|
+
queryParams: {},
|
|
520
257
|
headers,
|
|
521
258
|
priority: 'normal',
|
|
522
259
|
};
|
|
523
260
|
}
|
|
261
|
+
function createResourceRequestFromRepresentation(representation) {
|
|
262
|
+
const config = {
|
|
263
|
+
urlParams: {},
|
|
264
|
+
};
|
|
265
|
+
config.urlParams.metadataId = representation.metadataId;
|
|
266
|
+
return createResourceRequest$1(config);
|
|
267
|
+
}
|
|
524
268
|
|
|
525
|
-
const adapterName$1 = '
|
|
526
|
-
const
|
|
527
|
-
generateParamConfigMetadata('
|
|
269
|
+
const adapterName$1 = 'getExplorerView';
|
|
270
|
+
const getExplorerView_ConfigPropertyMetadata = [
|
|
271
|
+
generateParamConfigMetadata('metadataId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
528
272
|
];
|
|
529
|
-
const
|
|
530
|
-
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$
|
|
273
|
+
const getExplorerView_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getExplorerView_ConfigPropertyMetadata);
|
|
274
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$2(getExplorerView_ConfigPropertyMetadata);
|
|
531
275
|
function keyBuilder$2(luvio, config) {
|
|
532
276
|
const resourceParams = createResourceParams$1(config);
|
|
533
277
|
return keyBuilder$3(luvio, resourceParams);
|
|
534
278
|
}
|
|
535
279
|
function typeCheckConfig$1(untrustedConfig) {
|
|
536
280
|
const config = {};
|
|
537
|
-
typeCheckConfig$
|
|
281
|
+
typeCheckConfig$2(untrustedConfig, config, getExplorerView_ConfigPropertyMetadata);
|
|
538
282
|
return config;
|
|
539
283
|
}
|
|
540
284
|
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
@@ -583,7 +327,7 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
583
327
|
});
|
|
584
328
|
}
|
|
585
329
|
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
586
|
-
return buildNetworkSnapshotCachePolicy$
|
|
330
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
587
331
|
}
|
|
588
332
|
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
589
333
|
const { luvio, config } = context;
|
|
@@ -598,8 +342,8 @@ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
|
598
342
|
});
|
|
599
343
|
return cacheSnapshot;
|
|
600
344
|
}
|
|
601
|
-
const
|
|
602
|
-
const config = validateAdapterConfig$1(untrustedConfig,
|
|
345
|
+
const getExplorerViewAdapterFactory = (luvio) => function applications__getExplorerView(untrustedConfig, requestContext) {
|
|
346
|
+
const config = validateAdapterConfig$1(untrustedConfig, getExplorerView_ConfigPropertyNames);
|
|
603
347
|
// Invalid or incomplete config
|
|
604
348
|
if (config === null) {
|
|
605
349
|
return null;
|
|
@@ -607,6 +351,40 @@ const getMetadataGroupDomainSetAdapterFactory = (luvio) => function applications
|
|
|
607
351
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
608
352
|
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
609
353
|
};
|
|
354
|
+
const notifyChangeFactory = (luvio, options) => {
|
|
355
|
+
return function getConnectExplorerViewByMetadataIdNotifyChange(configs) {
|
|
356
|
+
const keys = configs.map(c => keyBuilder$4(luvio, c));
|
|
357
|
+
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
358
|
+
for (let i = 0, len = entries.length; i < len; i++) {
|
|
359
|
+
const { key, record: val } = entries[i];
|
|
360
|
+
const refreshRequest = createResourceRequestFromRepresentation(val);
|
|
361
|
+
luvio.dispatchResourceRequest(refreshRequest, options)
|
|
362
|
+
.then((response) => {
|
|
363
|
+
return luvio.handleSuccessResponse(() => {
|
|
364
|
+
const { body } = response;
|
|
365
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
366
|
+
return luvio.storeBroadcast();
|
|
367
|
+
}, () => {
|
|
368
|
+
const cache = new StoreKeyMap();
|
|
369
|
+
getTypeCacheKeys$1(cache, luvio, response.body);
|
|
370
|
+
return cache;
|
|
371
|
+
});
|
|
372
|
+
}, (error) => {
|
|
373
|
+
return luvio.handleErrorResponse(() => {
|
|
374
|
+
const errorSnapshot = luvio.errorSnapshot(error);
|
|
375
|
+
luvio.storeIngestError(key, errorSnapshot, {
|
|
376
|
+
ttl: TTL$1,
|
|
377
|
+
namespace: keyPrefix,
|
|
378
|
+
version: VERSION$1,
|
|
379
|
+
representationName: RepresentationType$1
|
|
380
|
+
});
|
|
381
|
+
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
382
|
+
});
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
});
|
|
386
|
+
};
|
|
387
|
+
};
|
|
610
388
|
|
|
611
389
|
function validate$1(obj, path = 'SalesforceAppItemDetailsRepresentation') {
|
|
612
390
|
const v_error = (() => {
|
|
@@ -762,7 +540,7 @@ function createResourceRequest(config) {
|
|
|
762
540
|
const adapterName = 'getSalesforceApp';
|
|
763
541
|
const getSalesforceApp_ConfigPropertyMetadata = [];
|
|
764
542
|
const getSalesforceApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getSalesforceApp_ConfigPropertyMetadata);
|
|
765
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
543
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$2(getSalesforceApp_ConfigPropertyMetadata);
|
|
766
544
|
function keyBuilder(luvio, config) {
|
|
767
545
|
createResourceParams(config);
|
|
768
546
|
return keyBuilder$1();
|
|
@@ -817,7 +595,7 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
817
595
|
});
|
|
818
596
|
}
|
|
819
597
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
820
|
-
return buildNetworkSnapshotCachePolicy$
|
|
598
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
821
599
|
}
|
|
822
600
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
823
601
|
const { luvio, config } = context;
|
|
@@ -844,19 +622,12 @@ const getSalesforceAppAdapterFactory = (luvio) => function applications__getSale
|
|
|
844
622
|
|
|
845
623
|
let getExplorerView;
|
|
846
624
|
let getExplorerViewNotifyChange;
|
|
847
|
-
let getMetadataGroupDomainSet;
|
|
848
625
|
let getSalesforceApp;
|
|
849
626
|
// Imperative GET Adapters
|
|
850
627
|
let getExplorerView_imperative;
|
|
851
|
-
let getMetadataGroupDomainSet_imperative;
|
|
852
628
|
let getSalesforceApp_imperative;
|
|
853
629
|
// Adapter Metadata
|
|
854
630
|
const getExplorerViewMetadata = { apiFamily: 'applications', name: 'getExplorerView', ttl: 100000 };
|
|
855
|
-
const getMetadataGroupDomainSetMetadata = {
|
|
856
|
-
apiFamily: 'applications',
|
|
857
|
-
name: 'getMetadataGroupDomainSet',
|
|
858
|
-
ttl: 500000,
|
|
859
|
-
};
|
|
860
631
|
const getSalesforceAppMetadata = {
|
|
861
632
|
apiFamily: 'applications',
|
|
862
633
|
name: 'getSalesforceApp',
|
|
@@ -866,16 +637,13 @@ const getSalesforceAppMetadata = {
|
|
|
866
637
|
function bindExportsTo(luvio) {
|
|
867
638
|
// LDS Adapters
|
|
868
639
|
const getExplorerView_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getExplorerView', getExplorerViewAdapterFactory), getExplorerViewMetadata);
|
|
869
|
-
const getMetadataGroupDomainSet_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getMetadataGroupDomainSet', getMetadataGroupDomainSetAdapterFactory), getMetadataGroupDomainSetMetadata);
|
|
870
640
|
const getSalesforceApp_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getSalesforceApp', getSalesforceAppAdapterFactory), getSalesforceAppMetadata);
|
|
871
641
|
return {
|
|
872
642
|
getExplorerView: createWireAdapterConstructor(luvio, getExplorerView_ldsAdapter, getExplorerViewMetadata),
|
|
873
643
|
getExplorerViewNotifyChange: createLDSAdapter(luvio, 'getExplorerViewNotifyChange', notifyChangeFactory),
|
|
874
|
-
getMetadataGroupDomainSet: createWireAdapterConstructor(luvio, getMetadataGroupDomainSet_ldsAdapter, getMetadataGroupDomainSetMetadata),
|
|
875
644
|
getSalesforceApp: createWireAdapterConstructor(luvio, getSalesforceApp_ldsAdapter, getSalesforceAppMetadata),
|
|
876
645
|
// Imperative GET Adapters
|
|
877
646
|
getExplorerView_imperative: createImperativeAdapter(luvio, getExplorerView_ldsAdapter, getExplorerViewMetadata),
|
|
878
|
-
getMetadataGroupDomainSet_imperative: createImperativeAdapter(luvio, getMetadataGroupDomainSet_ldsAdapter, getMetadataGroupDomainSetMetadata),
|
|
879
647
|
getSalesforceApp_imperative: createImperativeAdapter(luvio, getSalesforceApp_ldsAdapter, getSalesforceAppMetadata),
|
|
880
648
|
// Notify Update Availables
|
|
881
649
|
};
|
|
@@ -884,13 +652,11 @@ withDefaultLuvio((luvio) => {
|
|
|
884
652
|
({
|
|
885
653
|
getExplorerView,
|
|
886
654
|
getExplorerViewNotifyChange,
|
|
887
|
-
getMetadataGroupDomainSet,
|
|
888
655
|
getSalesforceApp,
|
|
889
656
|
getExplorerView_imperative,
|
|
890
|
-
getMetadataGroupDomainSet_imperative,
|
|
891
657
|
getSalesforceApp_imperative,
|
|
892
658
|
} = bindExportsTo(luvio));
|
|
893
659
|
});
|
|
894
660
|
|
|
895
|
-
export { getExplorerView, getExplorerViewNotifyChange, getExplorerView_imperative,
|
|
896
|
-
// version: 1.354.0-
|
|
661
|
+
export { getExplorerView, getExplorerViewNotifyChange, getExplorerView_imperative, getSalesforceApp, getSalesforceApp_imperative };
|
|
662
|
+
// version: 1.354.0-dev21-5f69ab6bb6
|
package/src/raml/api.raml
CHANGED
|
@@ -85,25 +85,6 @@ types:
|
|
|
85
85
|
type: array
|
|
86
86
|
items:
|
|
87
87
|
type: SalesforceAppItemDetailsRepresentation
|
|
88
|
-
MetadataGroupDomainSetItemRepresentation:
|
|
89
|
-
description: Representation for Metadata Group Domain Set Item
|
|
90
|
-
type: object
|
|
91
|
-
properties:
|
|
92
|
-
entityName:
|
|
93
|
-
description: Returns the entity name of the domain
|
|
94
|
-
type: string
|
|
95
|
-
label:
|
|
96
|
-
description: Returns the label of the domain
|
|
97
|
-
type: string
|
|
98
|
-
MetadataGroupDomainSetOutputRepresentation:
|
|
99
|
-
description: Representation for Metadata Group Domain Set
|
|
100
|
-
type: object
|
|
101
|
-
properties:
|
|
102
|
-
metadataGroupDomainSet:
|
|
103
|
-
description: Returns the Metadata Group Domain Set
|
|
104
|
-
type: array
|
|
105
|
-
items:
|
|
106
|
-
type: MetadataGroupDomainSetItemRepresentation
|
|
107
88
|
|
|
108
89
|
/connect:
|
|
109
90
|
/explorer-view/{metadataId}:
|
|
@@ -130,19 +111,3 @@ types:
|
|
|
130
111
|
body:
|
|
131
112
|
application/json:
|
|
132
113
|
type: SalesforceAppsRepresentation
|
|
133
|
-
/salesforce-apps/domain-set:
|
|
134
|
-
get:
|
|
135
|
-
displayName: getMetadataGroupDomainSet
|
|
136
|
-
description: Get Metadata domain set for the given Metadata
|
|
137
|
-
responses:
|
|
138
|
-
'200':
|
|
139
|
-
description: Success
|
|
140
|
-
body:
|
|
141
|
-
application/json:
|
|
142
|
-
type: MetadataGroupDomainSetOutputRepresentation
|
|
143
|
-
queryParameters:
|
|
144
|
-
metadataName:
|
|
145
|
-
type: string
|
|
146
|
-
required: false
|
|
147
|
-
enum:
|
|
148
|
-
- SalesforceApp
|
package/src/raml/luvio.raml
CHANGED
|
@@ -15,10 +15,6 @@ types:
|
|
|
15
15
|
SalesforceAppsRepresentation:
|
|
16
16
|
(luvio.ttl): 100000
|
|
17
17
|
(luvio.opaque): true
|
|
18
|
-
MetadataGroupDomainSetOutputRepresentation:
|
|
19
|
-
(luvio.ttl): 500000
|
|
20
|
-
(luvio.opaque): true
|
|
21
|
-
|
|
22
18
|
/connect:
|
|
23
19
|
/explorer-view/{metadataId}:
|
|
24
20
|
get:
|
|
@@ -30,7 +26,3 @@ types:
|
|
|
30
26
|
get:
|
|
31
27
|
(luvio.adapter):
|
|
32
28
|
name: getSalesforceApp
|
|
33
|
-
/salesforce-apps/domain-set:
|
|
34
|
-
get:
|
|
35
|
-
(luvio.adapter):
|
|
36
|
-
name: getMetadataGroupDomainSet
|