@salesforce/lds-adapters-platform-applications 1.365.0 → 1.366.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.
- package/dist/es/es2018/platform-applications.js +38 -272
- 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 +81 -330
- package/src/raml/api.raml +0 -38
- package/src/raml/luvio.raml +0 -7
- package/dist/es/es2018/types/src/generated/adapters/getSalesforceApp.d.ts +0 -26
- package/dist/es/es2018/types/src/generated/resources/getConnectSalesforceApps.d.ts +0 -12
- package/dist/es/es2018/types/src/generated/types/SalesforceAppItemDetailsRepresentation.d.ts +0 -40
- package/dist/es/es2018/types/src/generated/types/SalesforceAppsRepresentation.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$1, typeCheckConfig as typeCheckConfig$1, StoreKeyMap, createResourceParams as createResourceParams$1 } 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$1(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$3(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$1(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$3(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 = 100000;
|
|
127
|
+
const VERSION = "f7fb4db32a91c595a968707c48621271";
|
|
128
|
+
function validate(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$2(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$1(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$2(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 = 'ExplorerViewRepresentation';
|
|
150
|
+
function keyBuilder$2(luvio, config) {
|
|
151
|
+
return keyPrefix + '::' + RepresentationType + ':' + 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$1(input, existing, path, luvio, store, timestamp) {
|
|
160
|
-
return input;
|
|
161
|
-
}
|
|
162
|
-
const select$3 = function ExplorerViewRepresentationSelect() {
|
|
163
|
-
return {
|
|
164
|
-
kind: 'Fragment',
|
|
165
|
-
version: VERSION$1,
|
|
166
|
-
private: [],
|
|
167
|
-
opaque: true
|
|
168
|
-
};
|
|
169
|
-
};
|
|
170
|
-
function equals$1(existing, incoming) {
|
|
171
|
-
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
172
|
-
return false;
|
|
173
|
-
}
|
|
174
|
-
return true;
|
|
175
|
-
}
|
|
176
|
-
const ingest$1 = function ExplorerViewRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
177
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
178
|
-
const validateError = validate$2(input);
|
|
179
|
-
if (validateError !== null) {
|
|
180
|
-
throw validateError;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
const key = keyBuilderFromType(luvio, input);
|
|
184
|
-
const ttlToUse = TTL$1;
|
|
185
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "applications", VERSION$1, RepresentationType$1, equals$1);
|
|
186
|
-
return createLink(key);
|
|
187
|
-
};
|
|
188
|
-
function getTypeCacheKeys$1(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$1,
|
|
194
|
-
mergeable: false
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
function select$2(luvio, params) {
|
|
199
|
-
return select$3();
|
|
200
|
-
}
|
|
201
|
-
function keyBuilder$3(luvio, params) {
|
|
202
|
-
return keyBuilder$4(luvio, {
|
|
203
|
-
metadataId: params.urlParams.metadataId
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
207
|
-
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
208
|
-
}
|
|
209
|
-
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
210
|
-
const { body } = response;
|
|
211
|
-
const key = keyBuilder$3(luvio, resourceParams);
|
|
212
|
-
luvio.storeIngest(key, ingest$1, body);
|
|
213
|
-
const snapshot = luvio.storeLookup({
|
|
214
|
-
recordId: key,
|
|
215
|
-
node: select$2(),
|
|
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$1(luvio, params, error, snapshotRefresh) {
|
|
227
|
-
const key = keyBuilder$3(luvio, params);
|
|
228
|
-
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
229
|
-
const storeMetadataParams = {
|
|
230
|
-
ttl: TTL$1,
|
|
231
|
-
namespace: keyPrefix,
|
|
232
|
-
version: VERSION$1,
|
|
233
|
-
representationName: RepresentationType$1
|
|
234
|
-
};
|
|
235
|
-
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
236
|
-
return errorSnapshot;
|
|
237
|
-
}
|
|
238
|
-
function createResourceRequest$1(config) {
|
|
239
|
-
const headers = {};
|
|
240
|
-
return {
|
|
241
|
-
baseUri: '/services/data/v65.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$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);
|
|
258
|
-
function keyBuilder$2(luvio, config) {
|
|
259
|
-
const resourceParams = createResourceParams$1(config);
|
|
260
|
-
return keyBuilder$3(luvio, resourceParams);
|
|
261
|
-
}
|
|
262
|
-
function typeCheckConfig$1(untrustedConfig) {
|
|
263
|
-
const config = {};
|
|
264
|
-
typeCheckConfig$2(untrustedConfig, config, getExplorerView_ConfigPropertyMetadata);
|
|
265
|
-
return config;
|
|
266
|
-
}
|
|
267
|
-
function validateAdapterConfig$1(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$1(untrustedConfig);
|
|
275
|
-
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
276
|
-
return null;
|
|
277
|
-
}
|
|
278
|
-
return config;
|
|
279
|
-
}
|
|
280
|
-
function adapterFragment$1(luvio, config) {
|
|
281
|
-
createResourceParams$1(config);
|
|
282
|
-
return select$2();
|
|
283
|
-
}
|
|
284
|
-
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
285
|
-
const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
286
|
-
config,
|
|
287
|
-
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
288
|
-
});
|
|
289
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
290
|
-
}
|
|
291
|
-
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
292
|
-
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
293
|
-
config,
|
|
294
|
-
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
295
|
-
});
|
|
296
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
297
|
-
}
|
|
298
|
-
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
299
|
-
const resourceParams = createResourceParams$1(config);
|
|
300
|
-
const request = createResourceRequest$1(resourceParams);
|
|
301
|
-
return luvio.dispatchResourceRequest(request, options)
|
|
302
|
-
.then((response) => {
|
|
303
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
304
|
-
const cache = new StoreKeyMap();
|
|
305
|
-
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
306
|
-
return cache;
|
|
307
|
-
});
|
|
308
|
-
}, (response) => {
|
|
309
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
313
|
-
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
314
|
-
}
|
|
315
|
-
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
316
|
-
const { luvio, config } = context;
|
|
317
|
-
const selector = {
|
|
318
|
-
recordId: keyBuilder$2(luvio, config),
|
|
319
|
-
node: adapterFragment$1(luvio, config),
|
|
320
|
-
variables: {},
|
|
321
|
-
};
|
|
322
|
-
const cacheSnapshot = storeLookup(selector, {
|
|
323
|
-
config,
|
|
324
|
-
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
325
|
-
});
|
|
326
|
-
return cacheSnapshot;
|
|
327
|
-
}
|
|
328
|
-
const getExplorerViewAdapterFactory = (luvio) => function applications__getExplorerView(untrustedConfig, requestContext) {
|
|
329
|
-
const config = validateAdapterConfig$1(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$1, buildNetworkSnapshotCachePolicy$1);
|
|
336
|
-
};
|
|
337
|
-
|
|
338
|
-
function validate$1(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 = 100000;
|
|
373
|
-
const VERSION = "fd96561b9186438b07fe0b9d011009a5";
|
|
374
|
-
function validate(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$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');
|
|
391
|
-
return new TypeError(message);
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
})();
|
|
395
|
-
return v_error === undefined ? null : v_error;
|
|
157
|
+
return keyBuilder$2(luvio, keyParams);
|
|
396
158
|
}
|
|
397
|
-
const RepresentationType = 'SalesforceAppsRepresentation';
|
|
398
159
|
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
399
160
|
return input;
|
|
400
161
|
}
|
|
401
|
-
const select$1 = function
|
|
162
|
+
const select$1 = function ExplorerViewRepresentationSelect() {
|
|
402
163
|
return {
|
|
403
164
|
kind: 'Fragment',
|
|
404
165
|
version: VERSION,
|
|
@@ -412,21 +173,21 @@ function equals(existing, incoming) {
|
|
|
412
173
|
}
|
|
413
174
|
return true;
|
|
414
175
|
}
|
|
415
|
-
const ingest = function
|
|
176
|
+
const ingest = function ExplorerViewRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
416
177
|
if (process.env.NODE_ENV !== 'production') {
|
|
417
178
|
const validateError = validate(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;
|
|
424
185
|
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "applications", VERSION, RepresentationType, equals);
|
|
425
186
|
return createLink(key);
|
|
426
187
|
};
|
|
427
188
|
function getTypeCacheKeys(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,
|
|
@@ -438,14 +199,16 @@ function select(luvio, params) {
|
|
|
438
199
|
return select$1();
|
|
439
200
|
}
|
|
440
201
|
function keyBuilder$1(luvio, params) {
|
|
441
|
-
return
|
|
202
|
+
return keyBuilder$2(luvio, {
|
|
203
|
+
metadataId: params.urlParams.metadataId
|
|
204
|
+
});
|
|
442
205
|
}
|
|
443
206
|
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
444
|
-
getTypeCacheKeys(storeKeyMap, luvio, response
|
|
207
|
+
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
445
208
|
}
|
|
446
209
|
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
447
210
|
const { body } = response;
|
|
448
|
-
const key = keyBuilder$1();
|
|
211
|
+
const key = keyBuilder$1(luvio, resourceParams);
|
|
449
212
|
luvio.storeIngest(key, ingest, body);
|
|
450
213
|
const snapshot = luvio.storeLookup({
|
|
451
214
|
recordId: key,
|
|
@@ -461,7 +224,7 @@ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
461
224
|
return snapshot;
|
|
462
225
|
}
|
|
463
226
|
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
464
|
-
const key = keyBuilder$1();
|
|
227
|
+
const key = keyBuilder$1(luvio, params);
|
|
465
228
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
466
229
|
const storeMetadataParams = {
|
|
467
230
|
ttl: TTL,
|
|
@@ -476,26 +239,29 @@ function createResourceRequest(config) {
|
|
|
476
239
|
const headers = {};
|
|
477
240
|
return {
|
|
478
241
|
baseUri: '/services/data/v65.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 = '
|
|
490
|
-
const
|
|
491
|
-
|
|
492
|
-
|
|
252
|
+
const adapterName = 'getExplorerView';
|
|
253
|
+
const getExplorerView_ConfigPropertyMetadata = [
|
|
254
|
+
generateParamConfigMetadata('metadataId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
255
|
+
];
|
|
256
|
+
const getExplorerView_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getExplorerView_ConfigPropertyMetadata);
|
|
257
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$1(getExplorerView_ConfigPropertyMetadata);
|
|
493
258
|
function keyBuilder(luvio, config) {
|
|
494
|
-
createResourceParams(config);
|
|
495
|
-
return keyBuilder$1();
|
|
259
|
+
const resourceParams = createResourceParams(config);
|
|
260
|
+
return keyBuilder$1(luvio, resourceParams);
|
|
496
261
|
}
|
|
497
262
|
function typeCheckConfig(untrustedConfig) {
|
|
498
263
|
const config = {};
|
|
264
|
+
typeCheckConfig$1(untrustedConfig, config, getExplorerView_ConfigPropertyMetadata);
|
|
499
265
|
return config;
|
|
500
266
|
}
|
|
501
267
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -505,7 +271,7 @@ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
|
505
271
|
if (process.env.NODE_ENV !== 'production') {
|
|
506
272
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
507
273
|
}
|
|
508
|
-
const config = typeCheckConfig();
|
|
274
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
509
275
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
510
276
|
return null;
|
|
511
277
|
}
|
|
@@ -531,7 +297,7 @@ function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
|
531
297
|
}
|
|
532
298
|
function buildNetworkSnapshot(luvio, config, options) {
|
|
533
299
|
const resourceParams = createResourceParams(config);
|
|
534
|
-
const request = createResourceRequest();
|
|
300
|
+
const request = createResourceRequest(resourceParams);
|
|
535
301
|
return luvio.dispatchResourceRequest(request, options)
|
|
536
302
|
.then((response) => {
|
|
537
303
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
@@ -544,7 +310,7 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
544
310
|
});
|
|
545
311
|
}
|
|
546
312
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
547
|
-
return buildNetworkSnapshotCachePolicy$
|
|
313
|
+
return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
548
314
|
}
|
|
549
315
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
550
316
|
const { luvio, config } = context;
|
|
@@ -559,8 +325,8 @@ function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
|
559
325
|
});
|
|
560
326
|
return cacheSnapshot;
|
|
561
327
|
}
|
|
562
|
-
const
|
|
563
|
-
const config = validateAdapterConfig(untrustedConfig,
|
|
328
|
+
const getExplorerViewAdapterFactory = (luvio) => function applications__getExplorerView(untrustedConfig, requestContext) {
|
|
329
|
+
const config = validateAdapterConfig(untrustedConfig, getExplorerView_ConfigPropertyNames);
|
|
564
330
|
// Invalid or incomplete config
|
|
565
331
|
if (config === null) {
|
|
566
332
|
return null;
|
|
@@ -569,4 +335,4 @@ const getSalesforceAppAdapterFactory = (luvio) => function applications__getSale
|
|
|
569
335
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
570
336
|
};
|
|
571
337
|
|
|
572
|
-
export { getExplorerViewAdapterFactory
|
|
338
|
+
export { getExplorerViewAdapterFactory };
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
declare let getExplorerView: any;
|
|
2
2
|
declare let getExplorerViewNotifyChange: any;
|
|
3
|
-
declare let getSalesforceApp: any;
|
|
4
3
|
declare let getExplorerView_imperative: any;
|
|
5
|
-
|
|
6
|
-
export { getExplorerView, getExplorerViewNotifyChange, getSalesforceApp, getExplorerView_imperative, getSalesforceApp_imperative, };
|
|
4
|
+
export { getExplorerView, getExplorerViewNotifyChange, getExplorerView_imperative };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-platform-applications",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.366.0",
|
|
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.
|
|
43
|
+
"@salesforce/lds-bindings": "^1.366.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@salesforce/lds-compiler-plugins": "^1.
|
|
46
|
+
"@salesforce/lds-compiler-plugins": "^1.366.0"
|
|
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$1, typeCheckConfig as typeCheckConfig$1, createResourceParams as createResourceParams$1 } 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$1(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$3(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$1(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$3(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 = 100000;
|
|
137
|
+
const VERSION = "f7fb4db32a91c595a968707c48621271";
|
|
138
|
+
function validate(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$2(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$1(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,73 +156,73 @@ function validate$2(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 = 'ExplorerViewRepresentation';
|
|
160
|
+
function keyBuilder$2(luvio, config) {
|
|
161
|
+
return keyPrefix + '::' + RepresentationType + ':' + config.metadataId;
|
|
162
162
|
}
|
|
163
163
|
function keyBuilderFromType(luvio, object) {
|
|
164
164
|
const keyParams = {
|
|
165
165
|
metadataId: object.metadataId
|
|
166
166
|
};
|
|
167
|
-
return keyBuilder$
|
|
167
|
+
return keyBuilder$2(luvio, keyParams);
|
|
168
168
|
}
|
|
169
|
-
function normalize
|
|
169
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
170
170
|
return input;
|
|
171
171
|
}
|
|
172
|
-
const select$
|
|
172
|
+
const select$1 = function ExplorerViewRepresentationSelect() {
|
|
173
173
|
return {
|
|
174
174
|
kind: 'Fragment',
|
|
175
|
-
version: VERSION
|
|
175
|
+
version: VERSION,
|
|
176
176
|
private: [],
|
|
177
177
|
opaque: true
|
|
178
178
|
};
|
|
179
179
|
};
|
|
180
|
-
function equals
|
|
180
|
+
function equals(existing, incoming) {
|
|
181
181
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
182
182
|
return false;
|
|
183
183
|
}
|
|
184
184
|
return true;
|
|
185
185
|
}
|
|
186
|
-
const ingest
|
|
186
|
+
const ingest = function ExplorerViewRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
187
187
|
if (process.env.NODE_ENV !== 'production') {
|
|
188
|
-
const validateError = validate
|
|
188
|
+
const validateError = validate(input);
|
|
189
189
|
if (validateError !== null) {
|
|
190
190
|
throw validateError;
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
const key = keyBuilderFromType(luvio, input);
|
|
194
|
-
const ttlToUse = TTL
|
|
195
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize
|
|
194
|
+
const ttlToUse = TTL;
|
|
195
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "applications", VERSION, RepresentationType, equals);
|
|
196
196
|
return createLink(key);
|
|
197
197
|
};
|
|
198
|
-
function getTypeCacheKeys
|
|
198
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
199
199
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
200
200
|
const rootKey = keyBuilderFromType(luvio, input);
|
|
201
201
|
rootKeySet.set(rootKey, {
|
|
202
202
|
namespace: keyPrefix,
|
|
203
|
-
representationName: RepresentationType
|
|
203
|
+
representationName: RepresentationType,
|
|
204
204
|
mergeable: false
|
|
205
205
|
});
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
function select
|
|
209
|
-
return select$
|
|
208
|
+
function select(luvio, params) {
|
|
209
|
+
return select$1();
|
|
210
210
|
}
|
|
211
|
-
function keyBuilder$
|
|
212
|
-
return keyBuilder$
|
|
211
|
+
function keyBuilder$1(luvio, params) {
|
|
212
|
+
return keyBuilder$2(luvio, {
|
|
213
213
|
metadataId: params.urlParams.metadataId
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
|
-
function getResponseCacheKeys
|
|
217
|
-
getTypeCacheKeys
|
|
216
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
217
|
+
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
218
218
|
}
|
|
219
|
-
function ingestSuccess
|
|
219
|
+
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
220
220
|
const { body } = response;
|
|
221
|
-
const key = keyBuilder$
|
|
222
|
-
luvio.storeIngest(key, ingest
|
|
221
|
+
const key = keyBuilder$1(luvio, resourceParams);
|
|
222
|
+
luvio.storeIngest(key, ingest, body);
|
|
223
223
|
const snapshot = luvio.storeLookup({
|
|
224
224
|
recordId: key,
|
|
225
|
-
node: select
|
|
225
|
+
node: select(),
|
|
226
226
|
variables: {},
|
|
227
227
|
}, snapshotRefresh);
|
|
228
228
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -233,19 +233,19 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
233
233
|
deepFreeze(snapshot.data);
|
|
234
234
|
return snapshot;
|
|
235
235
|
}
|
|
236
|
-
function ingestError
|
|
237
|
-
const key = keyBuilder$
|
|
236
|
+
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
237
|
+
const key = keyBuilder$1(luvio, params);
|
|
238
238
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
239
239
|
const storeMetadataParams = {
|
|
240
|
-
ttl: TTL
|
|
240
|
+
ttl: TTL,
|
|
241
241
|
namespace: keyPrefix,
|
|
242
|
-
version: VERSION
|
|
243
|
-
representationName: RepresentationType
|
|
242
|
+
version: VERSION,
|
|
243
|
+
representationName: RepresentationType
|
|
244
244
|
};
|
|
245
245
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
246
246
|
return errorSnapshot;
|
|
247
247
|
}
|
|
248
|
-
function createResourceRequest
|
|
248
|
+
function createResourceRequest(config) {
|
|
249
249
|
const headers = {};
|
|
250
250
|
return {
|
|
251
251
|
baseUri: '/services/data/v65.0',
|
|
@@ -263,97 +263,97 @@ function createResourceRequestFromRepresentation(representation) {
|
|
|
263
263
|
urlParams: {},
|
|
264
264
|
};
|
|
265
265
|
config.urlParams.metadataId = representation.metadataId;
|
|
266
|
-
return createResourceRequest
|
|
266
|
+
return createResourceRequest(config);
|
|
267
267
|
}
|
|
268
268
|
|
|
269
|
-
const adapterName
|
|
269
|
+
const adapterName = 'getExplorerView';
|
|
270
270
|
const getExplorerView_ConfigPropertyMetadata = [
|
|
271
271
|
generateParamConfigMetadata('metadataId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
272
272
|
];
|
|
273
|
-
const getExplorerView_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName
|
|
274
|
-
const createResourceParams
|
|
275
|
-
function keyBuilder
|
|
276
|
-
const resourceParams = createResourceParams
|
|
277
|
-
return keyBuilder$
|
|
273
|
+
const getExplorerView_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getExplorerView_ConfigPropertyMetadata);
|
|
274
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$1(getExplorerView_ConfigPropertyMetadata);
|
|
275
|
+
function keyBuilder(luvio, config) {
|
|
276
|
+
const resourceParams = createResourceParams(config);
|
|
277
|
+
return keyBuilder$1(luvio, resourceParams);
|
|
278
278
|
}
|
|
279
|
-
function typeCheckConfig
|
|
279
|
+
function typeCheckConfig(untrustedConfig) {
|
|
280
280
|
const config = {};
|
|
281
|
-
typeCheckConfig$
|
|
281
|
+
typeCheckConfig$1(untrustedConfig, config, getExplorerView_ConfigPropertyMetadata);
|
|
282
282
|
return config;
|
|
283
283
|
}
|
|
284
|
-
function validateAdapterConfig
|
|
284
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
285
285
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
286
286
|
return null;
|
|
287
287
|
}
|
|
288
288
|
if (process.env.NODE_ENV !== 'production') {
|
|
289
289
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
290
290
|
}
|
|
291
|
-
const config = typeCheckConfig
|
|
291
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
292
292
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
293
293
|
return null;
|
|
294
294
|
}
|
|
295
295
|
return config;
|
|
296
296
|
}
|
|
297
|
-
function adapterFragment
|
|
298
|
-
createResourceParams
|
|
299
|
-
return select
|
|
297
|
+
function adapterFragment(luvio, config) {
|
|
298
|
+
createResourceParams(config);
|
|
299
|
+
return select();
|
|
300
300
|
}
|
|
301
|
-
function onFetchResponseSuccess
|
|
302
|
-
const snapshot = ingestSuccess
|
|
301
|
+
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
302
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
303
303
|
config,
|
|
304
|
-
resolve: () => buildNetworkSnapshot
|
|
304
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
305
305
|
});
|
|
306
306
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
307
307
|
}
|
|
308
|
-
function onFetchResponseError
|
|
309
|
-
const snapshot = ingestError
|
|
308
|
+
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
309
|
+
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
310
310
|
config,
|
|
311
|
-
resolve: () => buildNetworkSnapshot
|
|
311
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
312
312
|
});
|
|
313
313
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
314
314
|
}
|
|
315
|
-
function buildNetworkSnapshot
|
|
316
|
-
const resourceParams = createResourceParams
|
|
317
|
-
const request = createResourceRequest
|
|
315
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
316
|
+
const resourceParams = createResourceParams(config);
|
|
317
|
+
const request = createResourceRequest(resourceParams);
|
|
318
318
|
return luvio.dispatchResourceRequest(request, options)
|
|
319
319
|
.then((response) => {
|
|
320
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess
|
|
320
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
321
321
|
const cache = new StoreKeyMap();
|
|
322
|
-
getResponseCacheKeys
|
|
322
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
323
323
|
return cache;
|
|
324
324
|
});
|
|
325
325
|
}, (response) => {
|
|
326
|
-
return luvio.handleErrorResponse(() => onFetchResponseError
|
|
326
|
+
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
327
327
|
});
|
|
328
328
|
}
|
|
329
|
-
function buildNetworkSnapshotCachePolicy
|
|
330
|
-
return buildNetworkSnapshotCachePolicy$
|
|
329
|
+
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
330
|
+
return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
331
331
|
}
|
|
332
|
-
function buildCachedSnapshotCachePolicy
|
|
332
|
+
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
333
333
|
const { luvio, config } = context;
|
|
334
334
|
const selector = {
|
|
335
|
-
recordId: keyBuilder
|
|
336
|
-
node: adapterFragment
|
|
335
|
+
recordId: keyBuilder(luvio, config),
|
|
336
|
+
node: adapterFragment(luvio, config),
|
|
337
337
|
variables: {},
|
|
338
338
|
};
|
|
339
339
|
const cacheSnapshot = storeLookup(selector, {
|
|
340
340
|
config,
|
|
341
|
-
resolve: () => buildNetworkSnapshot
|
|
341
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
342
342
|
});
|
|
343
343
|
return cacheSnapshot;
|
|
344
344
|
}
|
|
345
345
|
const getExplorerViewAdapterFactory = (luvio) => function applications__getExplorerView(untrustedConfig, requestContext) {
|
|
346
|
-
const config = validateAdapterConfig
|
|
346
|
+
const config = validateAdapterConfig(untrustedConfig, getExplorerView_ConfigPropertyNames);
|
|
347
347
|
// Invalid or incomplete config
|
|
348
348
|
if (config === null) {
|
|
349
349
|
return null;
|
|
350
350
|
}
|
|
351
351
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
352
|
-
buildCachedSnapshotCachePolicy
|
|
352
|
+
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
353
353
|
};
|
|
354
354
|
const notifyChangeFactory = (luvio, options) => {
|
|
355
355
|
return function getConnectExplorerViewByMetadataIdNotifyChange(configs) {
|
|
356
|
-
const keys = configs.map(c => keyBuilder$
|
|
356
|
+
const keys = configs.map(c => keyBuilder$2(luvio, c));
|
|
357
357
|
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
358
358
|
for (let i = 0, len = entries.length; i < len; i++) {
|
|
359
359
|
const { key, record: val } = entries[i];
|
|
@@ -362,21 +362,21 @@ const notifyChangeFactory = (luvio, options) => {
|
|
|
362
362
|
.then((response) => {
|
|
363
363
|
return luvio.handleSuccessResponse(() => {
|
|
364
364
|
const { body } = response;
|
|
365
|
-
luvio.storeIngest(key, ingest
|
|
365
|
+
luvio.storeIngest(key, ingest, body);
|
|
366
366
|
return luvio.storeBroadcast();
|
|
367
367
|
}, () => {
|
|
368
368
|
const cache = new StoreKeyMap();
|
|
369
|
-
getTypeCacheKeys
|
|
369
|
+
getTypeCacheKeys(cache, luvio, response.body);
|
|
370
370
|
return cache;
|
|
371
371
|
});
|
|
372
372
|
}, (error) => {
|
|
373
373
|
return luvio.handleErrorResponse(() => {
|
|
374
374
|
const errorSnapshot = luvio.errorSnapshot(error);
|
|
375
375
|
luvio.storeIngestError(key, errorSnapshot, {
|
|
376
|
-
ttl: TTL
|
|
376
|
+
ttl: TTL,
|
|
377
377
|
namespace: keyPrefix,
|
|
378
|
-
version: VERSION
|
|
379
|
-
representationName: RepresentationType
|
|
378
|
+
version: VERSION,
|
|
379
|
+
representationName: RepresentationType
|
|
380
380
|
});
|
|
381
381
|
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
382
382
|
});
|
|
@@ -386,277 +386,28 @@ const notifyChangeFactory = (luvio, options) => {
|
|
|
386
386
|
};
|
|
387
387
|
};
|
|
388
388
|
|
|
389
|
-
function validate$1(obj, path = 'SalesforceAppItemDetailsRepresentation') {
|
|
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_description = obj.description;
|
|
395
|
-
const path_description = path + '.description';
|
|
396
|
-
if (typeof obj_description !== 'string') {
|
|
397
|
-
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
398
|
-
}
|
|
399
|
-
const obj_developerName = obj.developerName;
|
|
400
|
-
const path_developerName = path + '.developerName';
|
|
401
|
-
if (typeof obj_developerName !== 'string') {
|
|
402
|
-
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
403
|
-
}
|
|
404
|
-
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
405
|
-
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
406
|
-
if (typeof obj_lastModifiedDate !== 'string') {
|
|
407
|
-
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
408
|
-
}
|
|
409
|
-
const obj_masterLabel = obj.masterLabel;
|
|
410
|
-
const path_masterLabel = path + '.masterLabel';
|
|
411
|
-
if (typeof obj_masterLabel !== 'string') {
|
|
412
|
-
return new TypeError('Expected "string" but received "' + typeof obj_masterLabel + '" (at "' + path_masterLabel + '")');
|
|
413
|
-
}
|
|
414
|
-
const obj_salesforceAppId = obj.salesforceAppId;
|
|
415
|
-
const path_salesforceAppId = path + '.salesforceAppId';
|
|
416
|
-
if (typeof obj_salesforceAppId !== 'string') {
|
|
417
|
-
return new TypeError('Expected "string" but received "' + typeof obj_salesforceAppId + '" (at "' + path_salesforceAppId + '")');
|
|
418
|
-
}
|
|
419
|
-
})();
|
|
420
|
-
return v_error === undefined ? null : v_error;
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
const TTL = 100000;
|
|
424
|
-
const VERSION = "fd96561b9186438b07fe0b9d011009a5";
|
|
425
|
-
function validate(obj, path = 'SalesforceAppsRepresentation') {
|
|
426
|
-
const v_error = (() => {
|
|
427
|
-
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
428
|
-
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
429
|
-
}
|
|
430
|
-
const obj_salesforceApps = obj.salesforceApps;
|
|
431
|
-
const path_salesforceApps = path + '.salesforceApps';
|
|
432
|
-
if (!ArrayIsArray(obj_salesforceApps)) {
|
|
433
|
-
return new TypeError('Expected "array" but received "' + typeof obj_salesforceApps + '" (at "' + path_salesforceApps + '")');
|
|
434
|
-
}
|
|
435
|
-
for (let i = 0; i < obj_salesforceApps.length; i++) {
|
|
436
|
-
const obj_salesforceApps_item = obj_salesforceApps[i];
|
|
437
|
-
const path_salesforceApps_item = path_salesforceApps + '[' + i + ']';
|
|
438
|
-
const referencepath_salesforceApps_itemValidationError = validate$1(obj_salesforceApps_item, path_salesforceApps_item);
|
|
439
|
-
if (referencepath_salesforceApps_itemValidationError !== null) {
|
|
440
|
-
let message = 'Object doesn\'t match SalesforceAppItemDetailsRepresentation (at "' + path_salesforceApps_item + '")\n';
|
|
441
|
-
message += referencepath_salesforceApps_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
442
|
-
return new TypeError(message);
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
})();
|
|
446
|
-
return v_error === undefined ? null : v_error;
|
|
447
|
-
}
|
|
448
|
-
const RepresentationType = 'SalesforceAppsRepresentation';
|
|
449
|
-
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
450
|
-
return input;
|
|
451
|
-
}
|
|
452
|
-
const select$1 = function SalesforceAppsRepresentationSelect() {
|
|
453
|
-
return {
|
|
454
|
-
kind: 'Fragment',
|
|
455
|
-
version: VERSION,
|
|
456
|
-
private: [],
|
|
457
|
-
opaque: true
|
|
458
|
-
};
|
|
459
|
-
};
|
|
460
|
-
function equals(existing, incoming) {
|
|
461
|
-
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
462
|
-
return false;
|
|
463
|
-
}
|
|
464
|
-
return true;
|
|
465
|
-
}
|
|
466
|
-
const ingest = function SalesforceAppsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
467
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
468
|
-
const validateError = validate(input);
|
|
469
|
-
if (validateError !== null) {
|
|
470
|
-
throw validateError;
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
const key = path.fullPath;
|
|
474
|
-
const ttlToUse = TTL;
|
|
475
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "applications", VERSION, RepresentationType, equals);
|
|
476
|
-
return createLink(key);
|
|
477
|
-
};
|
|
478
|
-
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
479
|
-
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
480
|
-
const rootKey = fullPathFactory();
|
|
481
|
-
rootKeySet.set(rootKey, {
|
|
482
|
-
namespace: keyPrefix,
|
|
483
|
-
representationName: RepresentationType,
|
|
484
|
-
mergeable: false
|
|
485
|
-
});
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
function select(luvio, params) {
|
|
489
|
-
return select$1();
|
|
490
|
-
}
|
|
491
|
-
function keyBuilder$1(luvio, params) {
|
|
492
|
-
return keyPrefix + '::SalesforceAppsRepresentation:(' + ')';
|
|
493
|
-
}
|
|
494
|
-
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
495
|
-
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1());
|
|
496
|
-
}
|
|
497
|
-
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
498
|
-
const { body } = response;
|
|
499
|
-
const key = keyBuilder$1();
|
|
500
|
-
luvio.storeIngest(key, ingest, body);
|
|
501
|
-
const snapshot = luvio.storeLookup({
|
|
502
|
-
recordId: key,
|
|
503
|
-
node: select(),
|
|
504
|
-
variables: {},
|
|
505
|
-
}, snapshotRefresh);
|
|
506
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
507
|
-
if (snapshot.state !== 'Fulfilled') {
|
|
508
|
-
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
deepFreeze(snapshot.data);
|
|
512
|
-
return snapshot;
|
|
513
|
-
}
|
|
514
|
-
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
515
|
-
const key = keyBuilder$1();
|
|
516
|
-
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
517
|
-
const storeMetadataParams = {
|
|
518
|
-
ttl: TTL,
|
|
519
|
-
namespace: keyPrefix,
|
|
520
|
-
version: VERSION,
|
|
521
|
-
representationName: RepresentationType
|
|
522
|
-
};
|
|
523
|
-
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
524
|
-
return errorSnapshot;
|
|
525
|
-
}
|
|
526
|
-
function createResourceRequest(config) {
|
|
527
|
-
const headers = {};
|
|
528
|
-
return {
|
|
529
|
-
baseUri: '/services/data/v65.0',
|
|
530
|
-
basePath: '/connect/salesforce-apps',
|
|
531
|
-
method: 'get',
|
|
532
|
-
body: null,
|
|
533
|
-
urlParams: {},
|
|
534
|
-
queryParams: {},
|
|
535
|
-
headers,
|
|
536
|
-
priority: 'normal',
|
|
537
|
-
};
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
const adapterName = 'getSalesforceApp';
|
|
541
|
-
const getSalesforceApp_ConfigPropertyMetadata = [];
|
|
542
|
-
const getSalesforceApp_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getSalesforceApp_ConfigPropertyMetadata);
|
|
543
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$2(getSalesforceApp_ConfigPropertyMetadata);
|
|
544
|
-
function keyBuilder(luvio, config) {
|
|
545
|
-
createResourceParams(config);
|
|
546
|
-
return keyBuilder$1();
|
|
547
|
-
}
|
|
548
|
-
function typeCheckConfig(untrustedConfig) {
|
|
549
|
-
const config = {};
|
|
550
|
-
return config;
|
|
551
|
-
}
|
|
552
|
-
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
553
|
-
if (!untrustedIsObject(untrustedConfig)) {
|
|
554
|
-
return null;
|
|
555
|
-
}
|
|
556
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
557
|
-
validateConfig(untrustedConfig, configPropertyNames);
|
|
558
|
-
}
|
|
559
|
-
const config = typeCheckConfig();
|
|
560
|
-
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
561
|
-
return null;
|
|
562
|
-
}
|
|
563
|
-
return config;
|
|
564
|
-
}
|
|
565
|
-
function adapterFragment(luvio, config) {
|
|
566
|
-
createResourceParams(config);
|
|
567
|
-
return select();
|
|
568
|
-
}
|
|
569
|
-
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
570
|
-
const snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
571
|
-
config,
|
|
572
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
573
|
-
});
|
|
574
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
575
|
-
}
|
|
576
|
-
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
577
|
-
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
578
|
-
config,
|
|
579
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
580
|
-
});
|
|
581
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
582
|
-
}
|
|
583
|
-
function buildNetworkSnapshot(luvio, config, options) {
|
|
584
|
-
const resourceParams = createResourceParams(config);
|
|
585
|
-
const request = createResourceRequest();
|
|
586
|
-
return luvio.dispatchResourceRequest(request, options)
|
|
587
|
-
.then((response) => {
|
|
588
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
589
|
-
const cache = new StoreKeyMap();
|
|
590
|
-
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
591
|
-
return cache;
|
|
592
|
-
});
|
|
593
|
-
}, (response) => {
|
|
594
|
-
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
595
|
-
});
|
|
596
|
-
}
|
|
597
|
-
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
598
|
-
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
599
|
-
}
|
|
600
|
-
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
601
|
-
const { luvio, config } = context;
|
|
602
|
-
const selector = {
|
|
603
|
-
recordId: keyBuilder(luvio, config),
|
|
604
|
-
node: adapterFragment(luvio, config),
|
|
605
|
-
variables: {},
|
|
606
|
-
};
|
|
607
|
-
const cacheSnapshot = storeLookup(selector, {
|
|
608
|
-
config,
|
|
609
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
610
|
-
});
|
|
611
|
-
return cacheSnapshot;
|
|
612
|
-
}
|
|
613
|
-
const getSalesforceAppAdapterFactory = (luvio) => function applications__getSalesforceApp(untrustedConfig, requestContext) {
|
|
614
|
-
const config = validateAdapterConfig(untrustedConfig, getSalesforceApp_ConfigPropertyNames);
|
|
615
|
-
// Invalid or incomplete config
|
|
616
|
-
if (config === null) {
|
|
617
|
-
return null;
|
|
618
|
-
}
|
|
619
|
-
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
620
|
-
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
621
|
-
};
|
|
622
|
-
|
|
623
389
|
let getExplorerView;
|
|
624
390
|
let getExplorerViewNotifyChange;
|
|
625
|
-
let getSalesforceApp;
|
|
626
391
|
// Imperative GET Adapters
|
|
627
392
|
let getExplorerView_imperative;
|
|
628
|
-
let getSalesforceApp_imperative;
|
|
629
393
|
// Adapter Metadata
|
|
630
394
|
const getExplorerViewMetadata = { apiFamily: 'applications', name: 'getExplorerView', ttl: 100000 };
|
|
631
|
-
const getSalesforceAppMetadata = {
|
|
632
|
-
apiFamily: 'applications',
|
|
633
|
-
name: 'getSalesforceApp',
|
|
634
|
-
ttl: 100000,
|
|
635
|
-
};
|
|
636
395
|
// Notify Update Available
|
|
637
396
|
function bindExportsTo(luvio) {
|
|
638
397
|
// LDS Adapters
|
|
639
398
|
const getExplorerView_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getExplorerView', getExplorerViewAdapterFactory), getExplorerViewMetadata);
|
|
640
|
-
const getSalesforceApp_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getSalesforceApp', getSalesforceAppAdapterFactory), getSalesforceAppMetadata);
|
|
641
399
|
return {
|
|
642
400
|
getExplorerView: createWireAdapterConstructor(luvio, getExplorerView_ldsAdapter, getExplorerViewMetadata),
|
|
643
401
|
getExplorerViewNotifyChange: createLDSAdapter(luvio, 'getExplorerViewNotifyChange', notifyChangeFactory),
|
|
644
|
-
getSalesforceApp: createWireAdapterConstructor(luvio, getSalesforceApp_ldsAdapter, getSalesforceAppMetadata),
|
|
645
402
|
// Imperative GET Adapters
|
|
646
403
|
getExplorerView_imperative: createImperativeAdapter(luvio, getExplorerView_ldsAdapter, getExplorerViewMetadata),
|
|
647
|
-
getSalesforceApp_imperative: createImperativeAdapter(luvio, getSalesforceApp_ldsAdapter, getSalesforceAppMetadata),
|
|
648
404
|
// Notify Update Availables
|
|
649
405
|
};
|
|
650
406
|
}
|
|
651
407
|
withDefaultLuvio((luvio) => {
|
|
652
|
-
({
|
|
653
|
-
|
|
654
|
-
getExplorerViewNotifyChange,
|
|
655
|
-
getSalesforceApp,
|
|
656
|
-
getExplorerView_imperative,
|
|
657
|
-
getSalesforceApp_imperative,
|
|
658
|
-
} = bindExportsTo(luvio));
|
|
408
|
+
({ getExplorerView, getExplorerViewNotifyChange, getExplorerView_imperative } =
|
|
409
|
+
bindExportsTo(luvio));
|
|
659
410
|
});
|
|
660
411
|
|
|
661
|
-
export { getExplorerView, getExplorerViewNotifyChange, getExplorerView_imperative
|
|
662
|
-
// version: 1.
|
|
412
|
+
export { getExplorerView, getExplorerViewNotifyChange, getExplorerView_imperative };
|
|
413
|
+
// version: 1.366.0-bf15f04cce
|
package/src/raml/api.raml
CHANGED
|
@@ -57,34 +57,6 @@ types:
|
|
|
57
57
|
rootItem:
|
|
58
58
|
description: Returns the root node of explorer view
|
|
59
59
|
type: ExplorerViewItem
|
|
60
|
-
SalesforceAppItemDetailsRepresentation:
|
|
61
|
-
description: Representation for Salesforce App
|
|
62
|
-
type: object
|
|
63
|
-
properties:
|
|
64
|
-
description:
|
|
65
|
-
description: The description of Salesforce App
|
|
66
|
-
type: string
|
|
67
|
-
developerName:
|
|
68
|
-
description: The developerName of SalesforceApp
|
|
69
|
-
type: string
|
|
70
|
-
lastModifiedDate:
|
|
71
|
-
description: The lastModifiedDate for Salesforce App
|
|
72
|
-
type: string
|
|
73
|
-
masterLabel:
|
|
74
|
-
description: The masterLabel of Salesforce App
|
|
75
|
-
type: string
|
|
76
|
-
salesforceAppId:
|
|
77
|
-
description: The id of Salesforce App
|
|
78
|
-
type: string
|
|
79
|
-
SalesforceAppsRepresentation:
|
|
80
|
-
description: Representation for Salesforce App Item List
|
|
81
|
-
type: object
|
|
82
|
-
properties:
|
|
83
|
-
salesforceApps:
|
|
84
|
-
description: Returns the list of all Salesforce Apps
|
|
85
|
-
type: array
|
|
86
|
-
items:
|
|
87
|
-
type: SalesforceAppItemDetailsRepresentation
|
|
88
60
|
|
|
89
61
|
/connect:
|
|
90
62
|
/explorer-view/{metadataId}:
|
|
@@ -101,13 +73,3 @@ types:
|
|
|
101
73
|
metadataId:
|
|
102
74
|
type: string
|
|
103
75
|
required: true
|
|
104
|
-
/salesforce-apps:
|
|
105
|
-
get:
|
|
106
|
-
displayName: getSalesforceApps
|
|
107
|
-
description: Get all Salesforce Apps for a User
|
|
108
|
-
responses:
|
|
109
|
-
'200':
|
|
110
|
-
description: Success
|
|
111
|
-
body:
|
|
112
|
-
application/json:
|
|
113
|
-
type: SalesforceAppsRepresentation
|
package/src/raml/luvio.raml
CHANGED
|
@@ -12,9 +12,6 @@ types:
|
|
|
12
12
|
(luvio.opaque): true
|
|
13
13
|
(luvio.key):
|
|
14
14
|
metadataId: metadataId
|
|
15
|
-
SalesforceAppsRepresentation:
|
|
16
|
-
(luvio.ttl): 100000
|
|
17
|
-
(luvio.opaque): true
|
|
18
15
|
/connect:
|
|
19
16
|
/explorer-view/{metadataId}:
|
|
20
17
|
get:
|
|
@@ -22,7 +19,3 @@ types:
|
|
|
22
19
|
name: getExplorerView
|
|
23
20
|
(luvio.key):
|
|
24
21
|
metadataId: urlParams.metadataId
|
|
25
|
-
/salesforce-apps:
|
|
26
|
-
get:
|
|
27
|
-
(luvio.adapter):
|
|
28
|
-
name: getSalesforceApp
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Fragment as $64$luvio_engine_Fragment, Snapshot as $64$luvio_engine_Snapshot, FetchResponse as $64$luvio_engine_FetchResponse, ErrorResponse as $64$luvio_engine_ErrorResponse, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, CoercedAdapterRequestContext as $64$luvio_engine_CoercedAdapterRequestContext, StoreLookup as $64$luvio_engine_StoreLookup, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
|
|
2
|
-
import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
|
|
3
|
-
import { ResourceRequestConfig as resources_getConnectSalesforceApps_ResourceRequestConfig } from '../resources/getConnectSalesforceApps';
|
|
4
|
-
import { SalesforceAppsRepresentation as types_SalesforceAppsRepresentation_SalesforceAppsRepresentation } from '../types/SalesforceAppsRepresentation';
|
|
5
|
-
export declare const adapterName = "getSalesforceApp";
|
|
6
|
-
export declare const getSalesforceApp_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
7
|
-
export declare const getSalesforceApp_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
8
|
-
export interface GetSalesforceAppConfig {
|
|
9
|
-
}
|
|
10
|
-
export declare const createResourceParams: (config: GetSalesforceAppConfig) => resources_getConnectSalesforceApps_ResourceRequestConfig;
|
|
11
|
-
export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: GetSalesforceAppConfig): string;
|
|
12
|
-
export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, config: GetSalesforceAppConfig): $64$luvio_engine_NormalizedKeyMetadata;
|
|
13
|
-
export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<GetSalesforceAppConfig>): adapter$45$utils_Untrusted<GetSalesforceAppConfig>;
|
|
14
|
-
export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): GetSalesforceAppConfig | null;
|
|
15
|
-
export declare function adapterFragment(luvio: $64$luvio_engine_Luvio, config: GetSalesforceAppConfig): $64$luvio_engine_Fragment;
|
|
16
|
-
export declare function buildCachedSnapshot(luvio: $64$luvio_engine_Luvio, config: GetSalesforceAppConfig): $64$luvio_engine_Snapshot<types_SalesforceAppsRepresentation_SalesforceAppsRepresentation, any>;
|
|
17
|
-
export declare function onFetchResponseSuccess(luvio: $64$luvio_engine_Luvio, config: GetSalesforceAppConfig, resourceParams: resources_getConnectSalesforceApps_ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_SalesforceAppsRepresentation_SalesforceAppsRepresentation>): Promise<import("@luvio/engine").FulfilledSnapshot<types_SalesforceAppsRepresentation_SalesforceAppsRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_SalesforceAppsRepresentation_SalesforceAppsRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_SalesforceAppsRepresentation_SalesforceAppsRepresentation, any>>;
|
|
18
|
-
export declare function onFetchResponseError(luvio: $64$luvio_engine_Luvio, config: GetSalesforceAppConfig, resourceParams: resources_getConnectSalesforceApps_ResourceRequestConfig, response: $64$luvio_engine_ErrorResponse): Promise<import("@luvio/engine").ErrorSnapshot>;
|
|
19
|
-
export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: GetSalesforceAppConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<$64$luvio_engine_Snapshot<types_SalesforceAppsRepresentation_SalesforceAppsRepresentation, any>>;
|
|
20
|
-
export type BuildSnapshotContext = {
|
|
21
|
-
luvio: $64$luvio_engine_Luvio;
|
|
22
|
-
config: GetSalesforceAppConfig;
|
|
23
|
-
};
|
|
24
|
-
export declare function buildNetworkSnapshotCachePolicy(context: BuildSnapshotContext, coercedAdapterRequestContext: $64$luvio_engine_CoercedAdapterRequestContext): Promise<$64$luvio_engine_Snapshot<types_SalesforceAppsRepresentation_SalesforceAppsRepresentation, any>>;
|
|
25
|
-
export declare function buildCachedSnapshotCachePolicy(context: BuildSnapshotContext, storeLookup: $64$luvio_engine_StoreLookup<types_SalesforceAppsRepresentation_SalesforceAppsRepresentation>): $64$luvio_engine_Snapshot<types_SalesforceAppsRepresentation_SalesforceAppsRepresentation, any>;
|
|
26
|
-
export declare const getSalesforceAppAdapterFactory: $64$luvio_engine_AdapterFactory<GetSalesforceAppConfig, types_SalesforceAppsRepresentation_SalesforceAppsRepresentation>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, FetchResponse as $64$luvio_engine_FetchResponse, SnapshotRefresh as $64$luvio_engine_SnapshotRefresh, FulfilledSnapshot as $64$luvio_engine_FulfilledSnapshot, StaleSnapshot as $64$luvio_engine_StaleSnapshot, PendingSnapshot as $64$luvio_engine_PendingSnapshot, ErrorResponse as $64$luvio_engine_ErrorResponse, ErrorSnapshot as $64$luvio_engine_ErrorSnapshot, ResourceRequest as $64$luvio_engine_ResourceRequest } from '@luvio/engine';
|
|
2
|
-
import { SalesforceAppsRepresentation as types_SalesforceAppsRepresentation_SalesforceAppsRepresentation } from '../types/SalesforceAppsRepresentation';
|
|
3
|
-
export interface ResourceRequestConfig {
|
|
4
|
-
}
|
|
5
|
-
export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
|
|
6
|
-
export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): string;
|
|
7
|
-
export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_NormalizedKeyMetadata;
|
|
8
|
-
export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_SalesforceAppsRepresentation_SalesforceAppsRepresentation): void;
|
|
9
|
-
export declare function ingestSuccess(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_SalesforceAppsRepresentation_SalesforceAppsRepresentation>, snapshotRefresh?: $64$luvio_engine_SnapshotRefresh<types_SalesforceAppsRepresentation_SalesforceAppsRepresentation>): $64$luvio_engine_FulfilledSnapshot<types_SalesforceAppsRepresentation_SalesforceAppsRepresentation, {}> | $64$luvio_engine_StaleSnapshot<types_SalesforceAppsRepresentation_SalesforceAppsRepresentation, {}> | $64$luvio_engine_PendingSnapshot<types_SalesforceAppsRepresentation_SalesforceAppsRepresentation, any>;
|
|
10
|
-
export declare function ingestError(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig, error: $64$luvio_engine_ErrorResponse, snapshotRefresh?: $64$luvio_engine_SnapshotRefresh<types_SalesforceAppsRepresentation_SalesforceAppsRepresentation>): $64$luvio_engine_ErrorSnapshot;
|
|
11
|
-
export declare function createResourceRequest(config: ResourceRequestConfig): $64$luvio_engine_ResourceRequest;
|
|
12
|
-
export default createResourceRequest;
|
package/dist/es/es2018/types/src/generated/types/SalesforceAppItemDetailsRepresentation.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
|
|
2
|
-
export declare const VERSION = "04dd94fa7fa3772fe770d912fe7004af";
|
|
3
|
-
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
4
|
-
export declare const RepresentationType: string;
|
|
5
|
-
export declare function normalize(input: SalesforceAppItemDetailsRepresentation, existing: SalesforceAppItemDetailsRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): SalesforceAppItemDetailsRepresentationNormalized;
|
|
6
|
-
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
7
|
-
export declare function equals(existing: SalesforceAppItemDetailsRepresentationNormalized, incoming: SalesforceAppItemDetailsRepresentationNormalized): boolean;
|
|
8
|
-
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
9
|
-
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: SalesforceAppItemDetailsRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
10
|
-
/**
|
|
11
|
-
* Representation for Salesforce App
|
|
12
|
-
*
|
|
13
|
-
* Keys:
|
|
14
|
-
* (none)
|
|
15
|
-
*/
|
|
16
|
-
export interface SalesforceAppItemDetailsRepresentationNormalized {
|
|
17
|
-
/** The description of Salesforce App */
|
|
18
|
-
description: string;
|
|
19
|
-
/** The developerName of SalesforceApp */
|
|
20
|
-
developerName: string;
|
|
21
|
-
/** The lastModifiedDate for Salesforce App */
|
|
22
|
-
lastModifiedDate: string;
|
|
23
|
-
/** The masterLabel of Salesforce App */
|
|
24
|
-
masterLabel: string;
|
|
25
|
-
/** The id of Salesforce App */
|
|
26
|
-
salesforceAppId: string;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Representation for Salesforce App
|
|
30
|
-
*
|
|
31
|
-
* Keys:
|
|
32
|
-
* (none)
|
|
33
|
-
*/
|
|
34
|
-
export interface SalesforceAppItemDetailsRepresentation {
|
|
35
|
-
description: string;
|
|
36
|
-
developerName: string;
|
|
37
|
-
lastModifiedDate: string;
|
|
38
|
-
masterLabel: string;
|
|
39
|
-
salesforceAppId: string;
|
|
40
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { SalesforceAppItemDetailsRepresentation as SalesforceAppItemDetailsRepresentation_SalesforceAppItemDetailsRepresentation } from './SalesforceAppItemDetailsRepresentation';
|
|
2
|
-
import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, BaseFragment as $64$luvio_engine_BaseFragment, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
|
|
3
|
-
export declare const TTL = 100000;
|
|
4
|
-
export declare const VERSION = "fd96561b9186438b07fe0b9d011009a5";
|
|
5
|
-
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
6
|
-
export declare const RepresentationType: string;
|
|
7
|
-
export declare function normalize(input: SalesforceAppsRepresentation, existing: SalesforceAppsRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): SalesforceAppsRepresentationNormalized;
|
|
8
|
-
export declare const select: () => $64$luvio_engine_BaseFragment;
|
|
9
|
-
export declare function equals(existing: SalesforceAppsRepresentationNormalized, incoming: SalesforceAppsRepresentationNormalized): boolean;
|
|
10
|
-
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
11
|
-
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: SalesforceAppsRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
12
|
-
/**
|
|
13
|
-
* Representation for Salesforce App Item List
|
|
14
|
-
*
|
|
15
|
-
* Keys:
|
|
16
|
-
* (none)
|
|
17
|
-
*/
|
|
18
|
-
export interface SalesforceAppsRepresentationNormalized {
|
|
19
|
-
/** Returns the list of all Salesforce Apps */
|
|
20
|
-
salesforceApps: Array<SalesforceAppItemDetailsRepresentation_SalesforceAppItemDetailsRepresentation>;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Representation for Salesforce App Item List
|
|
24
|
-
*
|
|
25
|
-
* Keys:
|
|
26
|
-
* (none)
|
|
27
|
-
*/
|
|
28
|
-
export interface SalesforceAppsRepresentation {
|
|
29
|
-
salesforceApps: Array<SalesforceAppItemDetailsRepresentation_SalesforceAppItemDetailsRepresentation>;
|
|
30
|
-
}
|