@salesforce/lds-adapters-platform-applications 1.348.0 → 1.349.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.
@@ -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$1, typeCheckConfig as typeCheckConfig$1, StoreKeyMap, createResourceParams as createResourceParams$1 } from '@luvio/engine';
7
+ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2, typeCheckConfig as typeCheckConfig$2, StoreKeyMap, createResourceParams as createResourceParams$2 } from '@luvio/engine';
8
8
 
9
9
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
10
  const { keys: ObjectKeys, create: ObjectCreate } = Object;
@@ -79,7 +79,7 @@ function createLink(ref) {
79
79
  };
80
80
  }
81
81
 
82
- function validate$1(obj, path = 'ExplorerViewItem') {
82
+ function validate$3(obj, path = 'ExplorerViewItem') {
83
83
  const v_error = (() => {
84
84
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
85
85
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -102,7 +102,7 @@ function validate$1(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$1(obj_items_item, path_items_item);
105
+ const referencepath_items_itemValidationError = validate$3(obj_items_item, path_items_item);
106
106
  if (referencepath_items_itemValidationError !== null) {
107
107
  let message = 'Object doesn\'t match ExplorerViewItem (at "' + path_items_item + '")\n';
108
108
  message += referencepath_items_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -123,9 +123,9 @@ function validate$1(obj, path = 'ExplorerViewItem') {
123
123
  return v_error === undefined ? null : v_error;
124
124
  }
125
125
 
126
- const TTL = 100000;
127
- const VERSION = "f7fb4db32a91c595a968707c48621271";
128
- function validate(obj, path = 'ExplorerViewRepresentation') {
126
+ const TTL$1 = 100000;
127
+ const VERSION$1 = "f7fb4db32a91c595a968707c48621271";
128
+ function validate$2(obj, path = 'ExplorerViewRepresentation') {
129
129
  const v_error = (() => {
130
130
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
131
131
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -137,7 +137,7 @@ function validate(obj, path = 'ExplorerViewRepresentation') {
137
137
  }
138
138
  const obj_rootItem = obj.rootItem;
139
139
  const path_rootItem = path + '.rootItem';
140
- const referencepath_rootItemValidationError = validate$1(obj_rootItem, path_rootItem);
140
+ const referencepath_rootItemValidationError = validate$3(obj_rootItem, path_rootItem);
141
141
  if (referencepath_rootItemValidationError !== null) {
142
142
  let message = 'Object doesn\'t match ExplorerViewItem (at "' + path_rootItem + '")\n';
143
143
  message += referencepath_rootItemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -146,20 +146,244 @@ function validate(obj, path = 'ExplorerViewRepresentation') {
146
146
  })();
147
147
  return v_error === undefined ? null : v_error;
148
148
  }
149
- const RepresentationType = 'ExplorerViewRepresentation';
150
- function keyBuilder$2(luvio, config) {
151
- return keyPrefix + '::' + RepresentationType + ':' + config.metadataId;
149
+ const RepresentationType$1 = 'ExplorerViewRepresentation';
150
+ function keyBuilder$4(luvio, config) {
151
+ return keyPrefix + '::' + RepresentationType$1 + ':' + config.metadataId;
152
152
  }
153
153
  function keyBuilderFromType(luvio, object) {
154
154
  const keyParams = {
155
155
  metadataId: object.metadataId
156
156
  };
157
- return keyBuilder$2(luvio, keyParams);
157
+ return keyBuilder$4(luvio, keyParams);
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);
158
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/v64.0',
242
+ basePath: '/connect/explorer-view/' + config.urlParams.metadataId + '',
243
+ method: 'get',
244
+ body: null,
245
+ urlParams: config.urlParams,
246
+ queryParams: {},
247
+ headers,
248
+ priority: 'normal',
249
+ };
250
+ }
251
+
252
+ const adapterName$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 = 'MetadataGroupDomainSetItemRepresentation') {
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_entityName = obj.entityName;
344
+ const path_entityName = path + '.entityName';
345
+ if (typeof obj_entityName !== 'string') {
346
+ return new TypeError('Expected "string" but received "' + typeof obj_entityName + '" (at "' + path_entityName + '")');
347
+ }
348
+ const obj_label = obj.label;
349
+ const path_label = path + '.label';
350
+ if (typeof obj_label !== 'string') {
351
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
352
+ }
353
+ })();
354
+ return v_error === undefined ? null : v_error;
355
+ }
356
+
357
+ const TTL = 500000;
358
+ const VERSION = "007a449fdb5318904cabb4949cc2fc8a";
359
+ function validate(obj, path = 'MetadataGroupDomainSetOutputRepresentation') {
360
+ const v_error = (() => {
361
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
362
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
363
+ }
364
+ const obj_metadataGroupDomainSet = obj.metadataGroupDomainSet;
365
+ const path_metadataGroupDomainSet = path + '.metadataGroupDomainSet';
366
+ if (!ArrayIsArray(obj_metadataGroupDomainSet)) {
367
+ return new TypeError('Expected "array" but received "' + typeof obj_metadataGroupDomainSet + '" (at "' + path_metadataGroupDomainSet + '")');
368
+ }
369
+ for (let i = 0; i < obj_metadataGroupDomainSet.length; i++) {
370
+ const obj_metadataGroupDomainSet_item = obj_metadataGroupDomainSet[i];
371
+ const path_metadataGroupDomainSet_item = path_metadataGroupDomainSet + '[' + i + ']';
372
+ const referencepath_metadataGroupDomainSet_itemValidationError = validate$1(obj_metadataGroupDomainSet_item, path_metadataGroupDomainSet_item);
373
+ if (referencepath_metadataGroupDomainSet_itemValidationError !== null) {
374
+ let message = 'Object doesn\'t match MetadataGroupDomainSetItemRepresentation (at "' + path_metadataGroupDomainSet_item + '")\n';
375
+ message += referencepath_metadataGroupDomainSet_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
376
+ return new TypeError(message);
377
+ }
378
+ }
379
+ })();
380
+ return v_error === undefined ? null : v_error;
381
+ }
382
+ const RepresentationType = 'MetadataGroupDomainSetOutputRepresentation';
159
383
  function normalize(input, existing, path, luvio, store, timestamp) {
160
384
  return input;
161
385
  }
162
- const select$1 = function ExplorerViewRepresentationSelect() {
386
+ const select$1 = function MetadataGroupDomainSetOutputRepresentationSelect() {
163
387
  return {
164
388
  kind: 'Fragment',
165
389
  version: VERSION,
@@ -173,21 +397,21 @@ function equals(existing, incoming) {
173
397
  }
174
398
  return true;
175
399
  }
176
- const ingest = function ExplorerViewRepresentationIngest(input, path, luvio, store, timestamp) {
400
+ const ingest = function MetadataGroupDomainSetOutputRepresentationIngest(input, path, luvio, store, timestamp) {
177
401
  if (process.env.NODE_ENV !== 'production') {
178
402
  const validateError = validate(input);
179
403
  if (validateError !== null) {
180
404
  throw validateError;
181
405
  }
182
406
  }
183
- const key = keyBuilderFromType(luvio, input);
407
+ const key = path.fullPath;
184
408
  const ttlToUse = TTL;
185
409
  ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "applications", VERSION, RepresentationType, equals);
186
410
  return createLink(key);
187
411
  };
188
412
  function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
189
413
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
190
- const rootKey = keyBuilderFromType(luvio, input);
414
+ const rootKey = fullPathFactory();
191
415
  rootKeySet.set(rootKey, {
192
416
  namespace: keyPrefix,
193
417
  representationName: RepresentationType,
@@ -199,12 +423,10 @@ function select(luvio, params) {
199
423
  return select$1();
200
424
  }
201
425
  function keyBuilder$1(luvio, params) {
202
- return keyBuilder$2(luvio, {
203
- metadataId: params.urlParams.metadataId
204
- });
426
+ return keyPrefix + '::MetadataGroupDomainSetOutputRepresentation:(' + 'metadataName:' + params.queryParams.metadataName + ')';
205
427
  }
206
428
  function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
207
- getTypeCacheKeys(storeKeyMap, luvio, response);
429
+ getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
208
430
  }
209
431
  function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
210
432
  const { body } = response;
@@ -239,29 +461,29 @@ function createResourceRequest(config) {
239
461
  const headers = {};
240
462
  return {
241
463
  baseUri: '/services/data/v64.0',
242
- basePath: '/connect/explorer-view/' + config.urlParams.metadataId + '',
464
+ basePath: '/connect/salesforce-apps/domain-set',
243
465
  method: 'get',
244
466
  body: null,
245
- urlParams: config.urlParams,
246
- queryParams: {},
467
+ urlParams: {},
468
+ queryParams: config.queryParams,
247
469
  headers,
248
470
  priority: 'normal',
249
471
  };
250
472
  }
251
473
 
252
- const adapterName = 'getExplorerView';
253
- const getExplorerView_ConfigPropertyMetadata = [
254
- generateParamConfigMetadata('metadataId', true, 0 /* UrlParameter */, 0 /* String */),
474
+ const adapterName = 'getMetadataGroupDomainSet';
475
+ const getMetadataGroupDomainSet_ConfigPropertyMetadata = [
476
+ generateParamConfigMetadata('metadataName', false, 1 /* QueryParameter */, 0 /* String */),
255
477
  ];
256
- const getExplorerView_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getExplorerView_ConfigPropertyMetadata);
257
- const createResourceParams = /*#__PURE__*/ createResourceParams$1(getExplorerView_ConfigPropertyMetadata);
478
+ const getMetadataGroupDomainSet_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getMetadataGroupDomainSet_ConfigPropertyMetadata);
479
+ const createResourceParams = /*#__PURE__*/ createResourceParams$2(getMetadataGroupDomainSet_ConfigPropertyMetadata);
258
480
  function keyBuilder(luvio, config) {
259
481
  const resourceParams = createResourceParams(config);
260
482
  return keyBuilder$1(luvio, resourceParams);
261
483
  }
262
484
  function typeCheckConfig(untrustedConfig) {
263
485
  const config = {};
264
- typeCheckConfig$1(untrustedConfig, config, getExplorerView_ConfigPropertyMetadata);
486
+ typeCheckConfig$2(untrustedConfig, config, getMetadataGroupDomainSet_ConfigPropertyMetadata);
265
487
  return config;
266
488
  }
267
489
  function validateAdapterConfig(untrustedConfig, configPropertyNames) {
@@ -310,7 +532,7 @@ function buildNetworkSnapshot(luvio, config, options) {
310
532
  });
311
533
  }
312
534
  function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
313
- return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
535
+ return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
314
536
  }
315
537
  function buildCachedSnapshotCachePolicy(context, storeLookup) {
316
538
  const { luvio, config } = context;
@@ -325,8 +547,8 @@ function buildCachedSnapshotCachePolicy(context, storeLookup) {
325
547
  });
326
548
  return cacheSnapshot;
327
549
  }
328
- const getExplorerViewAdapterFactory = (luvio) => function applications__getExplorerView(untrustedConfig, requestContext) {
329
- const config = validateAdapterConfig(untrustedConfig, getExplorerView_ConfigPropertyNames);
550
+ const getMetadataGroupDomainSetAdapterFactory = (luvio) => function applications__getMetadataGroupDomainSet(untrustedConfig, requestContext) {
551
+ const config = validateAdapterConfig(untrustedConfig, getMetadataGroupDomainSet_ConfigPropertyNames);
330
552
  // Invalid or incomplete config
331
553
  if (config === null) {
332
554
  return null;
@@ -335,4 +557,4 @@ const getExplorerViewAdapterFactory = (luvio) => function applications__getExplo
335
557
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
336
558
  };
337
559
 
338
- export { getExplorerViewAdapterFactory };
560
+ export { getExplorerViewAdapterFactory, getMetadataGroupDomainSetAdapterFactory };
@@ -0,0 +1,27 @@
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_getConnectSalesforceAppsDomainSet_ResourceRequestConfig } from '../resources/getConnectSalesforceAppsDomainSet';
4
+ import { MetadataGroupDomainSetOutputRepresentation as types_MetadataGroupDomainSetOutputRepresentation_MetadataGroupDomainSetOutputRepresentation } from '../types/MetadataGroupDomainSetOutputRepresentation';
5
+ export declare const adapterName = "getMetadataGroupDomainSet";
6
+ export declare const getMetadataGroupDomainSet_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
7
+ export declare const getMetadataGroupDomainSet_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
8
+ export interface GetMetadataGroupDomainSetConfig {
9
+ metadataName?: string;
10
+ }
11
+ export declare const createResourceParams: (config: GetMetadataGroupDomainSetConfig) => resources_getConnectSalesforceAppsDomainSet_ResourceRequestConfig;
12
+ export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: GetMetadataGroupDomainSetConfig): string;
13
+ export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, config: GetMetadataGroupDomainSetConfig): $64$luvio_engine_NormalizedKeyMetadata;
14
+ export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<GetMetadataGroupDomainSetConfig>): adapter$45$utils_Untrusted<GetMetadataGroupDomainSetConfig>;
15
+ export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): GetMetadataGroupDomainSetConfig | null;
16
+ export declare function adapterFragment(luvio: $64$luvio_engine_Luvio, config: GetMetadataGroupDomainSetConfig): $64$luvio_engine_Fragment;
17
+ export declare function buildCachedSnapshot(luvio: $64$luvio_engine_Luvio, config: GetMetadataGroupDomainSetConfig): $64$luvio_engine_Snapshot<types_MetadataGroupDomainSetOutputRepresentation_MetadataGroupDomainSetOutputRepresentation, any>;
18
+ export declare function onFetchResponseSuccess(luvio: $64$luvio_engine_Luvio, config: GetMetadataGroupDomainSetConfig, resourceParams: resources_getConnectSalesforceAppsDomainSet_ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_MetadataGroupDomainSetOutputRepresentation_MetadataGroupDomainSetOutputRepresentation>): Promise<import("@luvio/engine").FulfilledSnapshot<types_MetadataGroupDomainSetOutputRepresentation_MetadataGroupDomainSetOutputRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_MetadataGroupDomainSetOutputRepresentation_MetadataGroupDomainSetOutputRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_MetadataGroupDomainSetOutputRepresentation_MetadataGroupDomainSetOutputRepresentation, any>>;
19
+ export declare function onFetchResponseError(luvio: $64$luvio_engine_Luvio, config: GetMetadataGroupDomainSetConfig, resourceParams: resources_getConnectSalesforceAppsDomainSet_ResourceRequestConfig, response: $64$luvio_engine_ErrorResponse): Promise<import("@luvio/engine").ErrorSnapshot>;
20
+ export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: GetMetadataGroupDomainSetConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<$64$luvio_engine_Snapshot<types_MetadataGroupDomainSetOutputRepresentation_MetadataGroupDomainSetOutputRepresentation, any>>;
21
+ export type BuildSnapshotContext = {
22
+ luvio: $64$luvio_engine_Luvio;
23
+ config: GetMetadataGroupDomainSetConfig;
24
+ };
25
+ export declare function buildNetworkSnapshotCachePolicy(context: BuildSnapshotContext, coercedAdapterRequestContext: $64$luvio_engine_CoercedAdapterRequestContext): Promise<$64$luvio_engine_Snapshot<types_MetadataGroupDomainSetOutputRepresentation_MetadataGroupDomainSetOutputRepresentation, any>>;
26
+ export declare function buildCachedSnapshotCachePolicy(context: BuildSnapshotContext, storeLookup: $64$luvio_engine_StoreLookup<types_MetadataGroupDomainSetOutputRepresentation_MetadataGroupDomainSetOutputRepresentation>): $64$luvio_engine_Snapshot<types_MetadataGroupDomainSetOutputRepresentation_MetadataGroupDomainSetOutputRepresentation, any>;
27
+ export declare const getMetadataGroupDomainSetAdapterFactory: $64$luvio_engine_AdapterFactory<GetMetadataGroupDomainSetConfig, types_MetadataGroupDomainSetOutputRepresentation_MetadataGroupDomainSetOutputRepresentation>;
@@ -1 +1,2 @@
1
1
  export { getExplorerViewAdapterFactory } from '../adapters/getExplorerView';
2
+ export { getMetadataGroupDomainSetAdapterFactory } from '../adapters/getMetadataGroupDomainSet';
@@ -1,4 +1,6 @@
1
1
  declare let getExplorerView: any;
2
2
  declare let getExplorerViewNotifyChange: any;
3
+ declare let getMetadataGroupDomainSet: any;
3
4
  declare let getExplorerView_imperative: any;
4
- export { getExplorerView, getExplorerViewNotifyChange, getExplorerView_imperative };
5
+ declare let getMetadataGroupDomainSet_imperative: any;
6
+ export { getExplorerView, getExplorerViewNotifyChange, getMetadataGroupDomainSet, getExplorerView_imperative, getMetadataGroupDomainSet_imperative, };
@@ -0,0 +1,15 @@
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 { MetadataGroupDomainSetOutputRepresentation as types_MetadataGroupDomainSetOutputRepresentation_MetadataGroupDomainSetOutputRepresentation } from '../types/MetadataGroupDomainSetOutputRepresentation';
3
+ export interface ResourceRequestConfig {
4
+ queryParams: {
5
+ metadataName?: string;
6
+ };
7
+ }
8
+ export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
9
+ export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): string;
10
+ export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_NormalizedKeyMetadata;
11
+ export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_MetadataGroupDomainSetOutputRepresentation_MetadataGroupDomainSetOutputRepresentation): void;
12
+ export declare function ingestSuccess(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_MetadataGroupDomainSetOutputRepresentation_MetadataGroupDomainSetOutputRepresentation>, snapshotRefresh?: $64$luvio_engine_SnapshotRefresh<types_MetadataGroupDomainSetOutputRepresentation_MetadataGroupDomainSetOutputRepresentation>): $64$luvio_engine_FulfilledSnapshot<types_MetadataGroupDomainSetOutputRepresentation_MetadataGroupDomainSetOutputRepresentation, {}> | $64$luvio_engine_StaleSnapshot<types_MetadataGroupDomainSetOutputRepresentation_MetadataGroupDomainSetOutputRepresentation, {}> | $64$luvio_engine_PendingSnapshot<types_MetadataGroupDomainSetOutputRepresentation_MetadataGroupDomainSetOutputRepresentation, any>;
13
+ export declare function ingestError(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig, error: $64$luvio_engine_ErrorResponse, snapshotRefresh?: $64$luvio_engine_SnapshotRefresh<types_MetadataGroupDomainSetOutputRepresentation_MetadataGroupDomainSetOutputRepresentation>): $64$luvio_engine_ErrorSnapshot;
14
+ export declare function createResourceRequest(config: ResourceRequestConfig): $64$luvio_engine_ResourceRequest;
15
+ export default createResourceRequest;
@@ -0,0 +1,31 @@
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 = "c1a274050c1108f2b3f752234669330c";
3
+ export declare function validate(obj: any, path?: string): TypeError | null;
4
+ export declare const RepresentationType: string;
5
+ export declare function normalize(input: MetadataGroupDomainSetItemRepresentation, existing: MetadataGroupDomainSetItemRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): MetadataGroupDomainSetItemRepresentationNormalized;
6
+ export declare const select: () => $64$luvio_engine_FragmentSelection;
7
+ export declare function equals(existing: MetadataGroupDomainSetItemRepresentationNormalized, incoming: MetadataGroupDomainSetItemRepresentationNormalized): 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: MetadataGroupDomainSetItemRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
10
+ /**
11
+ * Representation for Metadata Group Domain Set Item
12
+ *
13
+ * Keys:
14
+ * (none)
15
+ */
16
+ export interface MetadataGroupDomainSetItemRepresentationNormalized {
17
+ /** Returns the entity name of the domain */
18
+ entityName: string;
19
+ /** Returns the label of the domain */
20
+ label: string;
21
+ }
22
+ /**
23
+ * Representation for Metadata Group Domain Set Item
24
+ *
25
+ * Keys:
26
+ * (none)
27
+ */
28
+ export interface MetadataGroupDomainSetItemRepresentation {
29
+ entityName: string;
30
+ label: string;
31
+ }
@@ -0,0 +1,30 @@
1
+ import { MetadataGroupDomainSetItemRepresentation as MetadataGroupDomainSetItemRepresentation_MetadataGroupDomainSetItemRepresentation } from './MetadataGroupDomainSetItemRepresentation';
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 = 500000;
4
+ export declare const VERSION = "007a449fdb5318904cabb4949cc2fc8a";
5
+ export declare function validate(obj: any, path?: string): TypeError | null;
6
+ export declare const RepresentationType: string;
7
+ export declare function normalize(input: MetadataGroupDomainSetOutputRepresentation, existing: MetadataGroupDomainSetOutputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): MetadataGroupDomainSetOutputRepresentationNormalized;
8
+ export declare const select: () => $64$luvio_engine_BaseFragment;
9
+ export declare function equals(existing: MetadataGroupDomainSetOutputRepresentationNormalized, incoming: MetadataGroupDomainSetOutputRepresentationNormalized): 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: MetadataGroupDomainSetOutputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
12
+ /**
13
+ * Representation for Metadata Group Domain Set
14
+ *
15
+ * Keys:
16
+ * (none)
17
+ */
18
+ export interface MetadataGroupDomainSetOutputRepresentationNormalized {
19
+ /** Returns the Metadata Group Domain Set */
20
+ metadataGroupDomainSet: Array<MetadataGroupDomainSetItemRepresentation_MetadataGroupDomainSetItemRepresentation>;
21
+ }
22
+ /**
23
+ * Representation for Metadata Group Domain Set
24
+ *
25
+ * Keys:
26
+ * (none)
27
+ */
28
+ export interface MetadataGroupDomainSetOutputRepresentation {
29
+ metadataGroupDomainSet: Array<MetadataGroupDomainSetItemRepresentation_MetadataGroupDomainSetItemRepresentation>;
30
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-platform-applications",
3
- "version": "1.348.0",
3
+ "version": "1.349.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.348.0"
43
+ "@salesforce/lds-bindings": "^1.349.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@salesforce/lds-compiler-plugins": "^1.348.0"
46
+ "@salesforce/lds-compiler-plugins": "^1.349.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$1, typeCheckConfig as typeCheckConfig$1, createResourceParams as createResourceParams$1 } from 'force/luvioEngine';
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$1(obj, path = 'ExplorerViewItem') {
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$1(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$1(obj_items_item, path_items_item);
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$1(obj, path = 'ExplorerViewItem') {
133
133
  return v_error === undefined ? null : v_error;
134
134
  }
135
135
 
136
- const TTL = 100000;
137
- const VERSION = "f7fb4db32a91c595a968707c48621271";
138
- function validate(obj, path = 'ExplorerViewRepresentation') {
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(obj, path = 'ExplorerViewRepresentation') {
147
147
  }
148
148
  const obj_rootItem = obj.rootItem;
149
149
  const path_rootItem = path + '.rootItem';
150
- const referencepath_rootItemValidationError = validate$1(obj_rootItem, path_rootItem);
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,20 +156,285 @@ function validate(obj, path = 'ExplorerViewRepresentation') {
156
156
  })();
157
157
  return v_error === undefined ? null : v_error;
158
158
  }
159
- const RepresentationType = 'ExplorerViewRepresentation';
160
- function keyBuilder$2(luvio, config) {
161
- return keyPrefix + '::' + RepresentationType + ':' + config.metadataId;
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$2(luvio, keyParams);
167
+ return keyBuilder$4(luvio, keyParams);
168
+ }
169
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
170
+ return input;
171
+ }
172
+ const select$3 = function ExplorerViewRepresentationSelect() {
173
+ return {
174
+ kind: 'Fragment',
175
+ version: VERSION$1,
176
+ private: [],
177
+ opaque: true
178
+ };
179
+ };
180
+ function equals$1(existing, incoming) {
181
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
182
+ return false;
183
+ }
184
+ return true;
185
+ }
186
+ const ingest$1 = function ExplorerViewRepresentationIngest(input, path, luvio, store, timestamp) {
187
+ if (process.env.NODE_ENV !== 'production') {
188
+ const validateError = validate$2(input);
189
+ if (validateError !== null) {
190
+ throw validateError;
191
+ }
192
+ }
193
+ const key = keyBuilderFromType(luvio, input);
194
+ const ttlToUse = TTL$1;
195
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "applications", VERSION$1, RepresentationType$1, equals$1);
196
+ return createLink(key);
197
+ };
198
+ function getTypeCacheKeys$1(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$1,
204
+ mergeable: false
205
+ });
206
+ }
207
+
208
+ function select$2(luvio, params) {
209
+ return select$3();
210
+ }
211
+ function keyBuilder$3(luvio, params) {
212
+ return keyBuilder$4(luvio, {
213
+ metadataId: params.urlParams.metadataId
214
+ });
215
+ }
216
+ function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
217
+ getTypeCacheKeys$1(storeKeyMap, luvio, response);
218
+ }
219
+ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
220
+ const { body } = response;
221
+ const key = keyBuilder$3(luvio, resourceParams);
222
+ luvio.storeIngest(key, ingest$1, body);
223
+ const snapshot = luvio.storeLookup({
224
+ recordId: key,
225
+ node: select$2(),
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$1(luvio, params, error, snapshotRefresh) {
237
+ const key = keyBuilder$3(luvio, params);
238
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
239
+ const storeMetadataParams = {
240
+ ttl: TTL$1,
241
+ namespace: keyPrefix,
242
+ version: VERSION$1,
243
+ representationName: RepresentationType$1
244
+ };
245
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
246
+ return errorSnapshot;
247
+ }
248
+ function createResourceRequest$1(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
+ };
168
260
  }
261
+ function createResourceRequestFromRepresentation(representation) {
262
+ const config = {
263
+ urlParams: {},
264
+ };
265
+ config.urlParams.metadataId = representation.metadataId;
266
+ return createResourceRequest$1(config);
267
+ }
268
+
269
+ const adapterName$1 = 'getExplorerView';
270
+ const getExplorerView_ConfigPropertyMetadata = [
271
+ generateParamConfigMetadata('metadataId', true, 0 /* UrlParameter */, 0 /* String */),
272
+ ];
273
+ const getExplorerView_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getExplorerView_ConfigPropertyMetadata);
274
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$2(getExplorerView_ConfigPropertyMetadata);
275
+ function keyBuilder$2(luvio, config) {
276
+ const resourceParams = createResourceParams$1(config);
277
+ return keyBuilder$3(luvio, resourceParams);
278
+ }
279
+ function typeCheckConfig$1(untrustedConfig) {
280
+ const config = {};
281
+ typeCheckConfig$2(untrustedConfig, config, getExplorerView_ConfigPropertyMetadata);
282
+ return config;
283
+ }
284
+ function validateAdapterConfig$1(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$1(untrustedConfig);
292
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
293
+ return null;
294
+ }
295
+ return config;
296
+ }
297
+ function adapterFragment$1(luvio, config) {
298
+ createResourceParams$1(config);
299
+ return select$2();
300
+ }
301
+ function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
302
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
303
+ config,
304
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
305
+ });
306
+ return luvio.storeBroadcast().then(() => snapshot);
307
+ }
308
+ function onFetchResponseError$1(luvio, config, resourceParams, response) {
309
+ const snapshot = ingestError$1(luvio, resourceParams, response, {
310
+ config,
311
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
312
+ });
313
+ return luvio.storeBroadcast().then(() => snapshot);
314
+ }
315
+ function buildNetworkSnapshot$1(luvio, config, options) {
316
+ const resourceParams = createResourceParams$1(config);
317
+ const request = createResourceRequest$1(resourceParams);
318
+ return luvio.dispatchResourceRequest(request, options)
319
+ .then((response) => {
320
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
321
+ const cache = new StoreKeyMap();
322
+ getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
323
+ return cache;
324
+ });
325
+ }, (response) => {
326
+ return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
327
+ });
328
+ }
329
+ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
330
+ return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
331
+ }
332
+ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
333
+ const { luvio, config } = context;
334
+ const selector = {
335
+ recordId: keyBuilder$2(luvio, config),
336
+ node: adapterFragment$1(luvio, config),
337
+ variables: {},
338
+ };
339
+ const cacheSnapshot = storeLookup(selector, {
340
+ config,
341
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
342
+ });
343
+ return cacheSnapshot;
344
+ }
345
+ const getExplorerViewAdapterFactory = (luvio) => function applications__getExplorerView(untrustedConfig, requestContext) {
346
+ const config = validateAdapterConfig$1(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$1, buildNetworkSnapshotCachePolicy$1);
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
+ };
388
+
389
+ function validate$1(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;
406
+ }
407
+
408
+ const TTL = 500000;
409
+ const VERSION = "007a449fdb5318904cabb4949cc2fc8a";
410
+ function validate(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$1(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 = 'MetadataGroupDomainSetOutputRepresentation';
169
434
  function normalize(input, existing, path, luvio, store, timestamp) {
170
435
  return input;
171
436
  }
172
- const select$1 = function ExplorerViewRepresentationSelect() {
437
+ const select$1 = function MetadataGroupDomainSetOutputRepresentationSelect() {
173
438
  return {
174
439
  kind: 'Fragment',
175
440
  version: VERSION,
@@ -183,21 +448,21 @@ function equals(existing, incoming) {
183
448
  }
184
449
  return true;
185
450
  }
186
- const ingest = function ExplorerViewRepresentationIngest(input, path, luvio, store, timestamp) {
451
+ const ingest = function MetadataGroupDomainSetOutputRepresentationIngest(input, path, luvio, store, timestamp) {
187
452
  if (process.env.NODE_ENV !== 'production') {
188
453
  const validateError = validate(input);
189
454
  if (validateError !== null) {
190
455
  throw validateError;
191
456
  }
192
457
  }
193
- const key = keyBuilderFromType(luvio, input);
458
+ const key = path.fullPath;
194
459
  const ttlToUse = TTL;
195
460
  ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "applications", VERSION, RepresentationType, equals);
196
461
  return createLink(key);
197
462
  };
198
463
  function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
199
464
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
200
- const rootKey = keyBuilderFromType(luvio, input);
465
+ const rootKey = fullPathFactory();
201
466
  rootKeySet.set(rootKey, {
202
467
  namespace: keyPrefix,
203
468
  representationName: RepresentationType,
@@ -209,12 +474,10 @@ function select(luvio, params) {
209
474
  return select$1();
210
475
  }
211
476
  function keyBuilder$1(luvio, params) {
212
- return keyBuilder$2(luvio, {
213
- metadataId: params.urlParams.metadataId
214
- });
477
+ return keyPrefix + '::MetadataGroupDomainSetOutputRepresentation:(' + 'metadataName:' + params.queryParams.metadataName + ')';
215
478
  }
216
479
  function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
217
- getTypeCacheKeys(storeKeyMap, luvio, response);
480
+ getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
218
481
  }
219
482
  function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
220
483
  const { body } = response;
@@ -249,36 +512,29 @@ function createResourceRequest(config) {
249
512
  const headers = {};
250
513
  return {
251
514
  baseUri: '/services/data/v64.0',
252
- basePath: '/connect/explorer-view/' + config.urlParams.metadataId + '',
515
+ basePath: '/connect/salesforce-apps/domain-set',
253
516
  method: 'get',
254
517
  body: null,
255
- urlParams: config.urlParams,
256
- queryParams: {},
518
+ urlParams: {},
519
+ queryParams: config.queryParams,
257
520
  headers,
258
521
  priority: 'normal',
259
522
  };
260
523
  }
261
- function createResourceRequestFromRepresentation(representation) {
262
- const config = {
263
- urlParams: {},
264
- };
265
- config.urlParams.metadataId = representation.metadataId;
266
- return createResourceRequest(config);
267
- }
268
524
 
269
- const adapterName = 'getExplorerView';
270
- const getExplorerView_ConfigPropertyMetadata = [
271
- generateParamConfigMetadata('metadataId', true, 0 /* UrlParameter */, 0 /* String */),
525
+ const adapterName = 'getMetadataGroupDomainSet';
526
+ const getMetadataGroupDomainSet_ConfigPropertyMetadata = [
527
+ generateParamConfigMetadata('metadataName', false, 1 /* QueryParameter */, 0 /* String */),
272
528
  ];
273
- const getExplorerView_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getExplorerView_ConfigPropertyMetadata);
274
- const createResourceParams = /*#__PURE__*/ createResourceParams$1(getExplorerView_ConfigPropertyMetadata);
529
+ const getMetadataGroupDomainSet_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getMetadataGroupDomainSet_ConfigPropertyMetadata);
530
+ const createResourceParams = /*#__PURE__*/ createResourceParams$2(getMetadataGroupDomainSet_ConfigPropertyMetadata);
275
531
  function keyBuilder(luvio, config) {
276
532
  const resourceParams = createResourceParams(config);
277
533
  return keyBuilder$1(luvio, resourceParams);
278
534
  }
279
535
  function typeCheckConfig(untrustedConfig) {
280
536
  const config = {};
281
- typeCheckConfig$1(untrustedConfig, config, getExplorerView_ConfigPropertyMetadata);
537
+ typeCheckConfig$2(untrustedConfig, config, getMetadataGroupDomainSet_ConfigPropertyMetadata);
282
538
  return config;
283
539
  }
284
540
  function validateAdapterConfig(untrustedConfig, configPropertyNames) {
@@ -327,7 +583,7 @@ function buildNetworkSnapshot(luvio, config, options) {
327
583
  });
328
584
  }
329
585
  function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
330
- return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
586
+ return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
331
587
  }
332
588
  function buildCachedSnapshotCachePolicy(context, storeLookup) {
333
589
  const { luvio, config } = context;
@@ -342,8 +598,8 @@ function buildCachedSnapshotCachePolicy(context, storeLookup) {
342
598
  });
343
599
  return cacheSnapshot;
344
600
  }
345
- const getExplorerViewAdapterFactory = (luvio) => function applications__getExplorerView(untrustedConfig, requestContext) {
346
- const config = validateAdapterConfig(untrustedConfig, getExplorerView_ConfigPropertyNames);
601
+ const getMetadataGroupDomainSetAdapterFactory = (luvio) => function applications__getMetadataGroupDomainSet(untrustedConfig, requestContext) {
602
+ const config = validateAdapterConfig(untrustedConfig, getMetadataGroupDomainSet_ConfigPropertyNames);
347
603
  // Invalid or incomplete config
348
604
  if (config === null) {
349
605
  return null;
@@ -351,63 +607,44 @@ const getExplorerViewAdapterFactory = (luvio) => function applications__getExplo
351
607
  return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
352
608
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
353
609
  };
354
- const notifyChangeFactory = (luvio, options) => {
355
- return function getConnectExplorerViewByMetadataIdNotifyChange(configs) {
356
- const keys = configs.map(c => keyBuilder$2(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, body);
366
- return luvio.storeBroadcast();
367
- }, () => {
368
- const cache = new StoreKeyMap();
369
- getTypeCacheKeys(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,
377
- namespace: keyPrefix,
378
- version: VERSION,
379
- representationName: RepresentationType
380
- });
381
- return luvio.storeBroadcast().then(() => errorSnapshot);
382
- });
383
- });
384
- }
385
- });
386
- };
387
- };
388
610
 
389
611
  let getExplorerView;
390
612
  let getExplorerViewNotifyChange;
613
+ let getMetadataGroupDomainSet;
391
614
  // Imperative GET Adapters
392
615
  let getExplorerView_imperative;
616
+ let getMetadataGroupDomainSet_imperative;
393
617
  // Adapter Metadata
394
618
  const getExplorerViewMetadata = { apiFamily: 'applications', name: 'getExplorerView', ttl: 100000 };
619
+ const getMetadataGroupDomainSetMetadata = {
620
+ apiFamily: 'applications',
621
+ name: 'getMetadataGroupDomainSet',
622
+ ttl: 500000,
623
+ };
395
624
  // Notify Update Available
396
625
  function bindExportsTo(luvio) {
397
626
  // LDS Adapters
398
627
  const getExplorerView_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getExplorerView', getExplorerViewAdapterFactory), getExplorerViewMetadata);
628
+ const getMetadataGroupDomainSet_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getMetadataGroupDomainSet', getMetadataGroupDomainSetAdapterFactory), getMetadataGroupDomainSetMetadata);
399
629
  return {
400
630
  getExplorerView: createWireAdapterConstructor(luvio, getExplorerView_ldsAdapter, getExplorerViewMetadata),
401
631
  getExplorerViewNotifyChange: createLDSAdapter(luvio, 'getExplorerViewNotifyChange', notifyChangeFactory),
632
+ getMetadataGroupDomainSet: createWireAdapterConstructor(luvio, getMetadataGroupDomainSet_ldsAdapter, getMetadataGroupDomainSetMetadata),
402
633
  // Imperative GET Adapters
403
634
  getExplorerView_imperative: createImperativeAdapter(luvio, getExplorerView_ldsAdapter, getExplorerViewMetadata),
635
+ getMetadataGroupDomainSet_imperative: createImperativeAdapter(luvio, getMetadataGroupDomainSet_ldsAdapter, getMetadataGroupDomainSetMetadata),
404
636
  // Notify Update Availables
405
637
  };
406
638
  }
407
639
  withDefaultLuvio((luvio) => {
408
- ({ getExplorerView, getExplorerViewNotifyChange, getExplorerView_imperative } =
409
- bindExportsTo(luvio));
640
+ ({
641
+ getExplorerView,
642
+ getExplorerViewNotifyChange,
643
+ getMetadataGroupDomainSet,
644
+ getExplorerView_imperative,
645
+ getMetadataGroupDomainSet_imperative,
646
+ } = bindExportsTo(luvio));
410
647
  });
411
648
 
412
- export { getExplorerView, getExplorerViewNotifyChange, getExplorerView_imperative };
413
- // version: 1.348.0-4aa8c0c0cb
649
+ export { getExplorerView, getExplorerViewNotifyChange, getExplorerView_imperative, getMetadataGroupDomainSet, getMetadataGroupDomainSet_imperative };
650
+ // version: 1.349.0-2008e7132b
package/src/raml/api.raml CHANGED
@@ -57,18 +57,54 @@ types:
57
57
  rootItem:
58
58
  description: Returns the root node of explorer view
59
59
  type: ExplorerViewItem
60
+ MetadataGroupDomainSetItemRepresentation:
61
+ description: Representation for Metadata Group Domain Set Item
62
+ type: object
63
+ properties:
64
+ entityName:
65
+ description: Returns the entity name of the domain
66
+ type: string
67
+ label:
68
+ description: Returns the label of the domain
69
+ type: string
70
+ MetadataGroupDomainSetOutputRepresentation:
71
+ description: Representation for Metadata Group Domain Set
72
+ type: object
73
+ properties:
74
+ metadataGroupDomainSet:
75
+ description: Returns the Metadata Group Domain Set
76
+ type: array
77
+ items:
78
+ type: MetadataGroupDomainSetItemRepresentation
60
79
 
61
- /connect/explorer-view/{metadataId}:
62
- get:
63
- displayName: getExplorerView
64
- description: Get Explorer view items for a given agent id
65
- responses:
66
- '200':
67
- description: Success
68
- body:
69
- application/json:
70
- type: ExplorerViewRepresentation
71
- uriParameters:
72
- metadataId:
73
- type: string
74
- required: true
80
+ /connect:
81
+ /explorer-view/{metadataId}:
82
+ get:
83
+ displayName: getExplorerView
84
+ description: Get Explorer view items for a given agent id
85
+ responses:
86
+ '200':
87
+ description: Success
88
+ body:
89
+ application/json:
90
+ type: ExplorerViewRepresentation
91
+ uriParameters:
92
+ metadataId:
93
+ type: string
94
+ required: true
95
+ /salesforce-apps/domain-set:
96
+ get:
97
+ displayName: getMetadataGroupDomainSet
98
+ description: Get Metadata domain set for the given Metadata
99
+ responses:
100
+ '200':
101
+ description: Success
102
+ body:
103
+ application/json:
104
+ type: MetadataGroupDomainSetOutputRepresentation
105
+ queryParameters:
106
+ metadataName:
107
+ type: string
108
+ required: false
109
+ enum:
110
+ - SalesforceApp
@@ -12,10 +12,18 @@ types:
12
12
  (luvio.opaque): true
13
13
  (luvio.key):
14
14
  metadataId: metadataId
15
+ MetadataGroupDomainSetOutputRepresentation:
16
+ (luvio.ttl): 500000
17
+ (luvio.opaque): true
15
18
 
16
- /connect/explorer-view/{metadataId}:
17
- get:
18
- (luvio.adapter):
19
- name: getExplorerView
20
- (luvio.key):
21
- metadataId: urlParams.metadataId
19
+ /connect:
20
+ /explorer-view/{metadataId}:
21
+ get:
22
+ (luvio.adapter):
23
+ name: getExplorerView
24
+ (luvio.key):
25
+ metadataId: urlParams.metadataId
26
+ /salesforce-apps/domain-set:
27
+ get:
28
+ (luvio.adapter):
29
+ name: getMetadataGroupDomainSet