@salesforce/lds-adapters-service-gis 1.370.0 → 1.372.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/service-gis.js +1173 -109
- package/dist/es/es2018/types/src/generated/adapters/getGisExternalAuthAccessToken.d.ts +27 -0
- package/dist/es/es2018/types/src/generated/adapters/getGisExtlMapObjectConfig.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/adapters/getGisRelatedObjectConfig.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +3 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +7 -1
- package/dist/es/es2018/types/src/generated/resources/getGisConfigGisExtlMapObjectConfig.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/resources/getGisConfigGisRelatedObjectConfig.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/types/GisExternalAccessTokenOutputRepresentation.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/types/GisExtlMapObjectConfigCollectionRepresentation.d.ts +42 -0
- package/dist/es/es2018/types/src/generated/types/GisExtlMapObjectConfigOutputRepresentation.d.ts +50 -0
- package/dist/es/es2018/types/src/generated/types/GisRelatedObjectConfigCollectionRepresentation.d.ts +42 -0
- package/dist/es/es2018/types/src/generated/types/GisRelatedObjectConfigOutputRepresentation.d.ts +59 -0
- package/package.json +3 -3
- package/sfdc/index.js +1218 -118
- package/src/raml/api.raml +157 -43
- package/src/raml/luvio.raml +43 -0
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, createResourceParams as createResourceParams$
|
|
17
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$5, typeCheckConfig as typeCheckConfig$5, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$4 } from 'force/luvioEngine';
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
20
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -101,9 +101,9 @@ function createLink(ref) {
|
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
const TTL$
|
|
105
|
-
const VERSION$
|
|
106
|
-
function validate$
|
|
104
|
+
const TTL$6 = 300;
|
|
105
|
+
const VERSION$6 = "0f69e4358dd6aed8111c869611c4526c";
|
|
106
|
+
function validate$6(obj, path = 'GisExternalAuthIdentityProviderOutputRepresentation') {
|
|
107
107
|
const v_error = (() => {
|
|
108
108
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
109
109
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -146,23 +146,23 @@ function validate$1(obj, path = 'GisExternalAuthIdentityProviderOutputRepresenta
|
|
|
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$6 = 'GisExternalAuthIdentityProviderOutputRepresentation';
|
|
150
|
+
function keyBuilder$a(luvio, config) {
|
|
151
|
+
return keyPrefix + '::' + RepresentationType$6 + ':' + config.id;
|
|
152
152
|
}
|
|
153
|
-
function keyBuilderFromType(luvio, object) {
|
|
153
|
+
function keyBuilderFromType$2(luvio, object) {
|
|
154
154
|
const keyParams = {
|
|
155
155
|
id: object.id
|
|
156
156
|
};
|
|
157
|
-
return keyBuilder$
|
|
157
|
+
return keyBuilder$a(luvio, keyParams);
|
|
158
158
|
}
|
|
159
|
-
function normalize$
|
|
159
|
+
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
160
160
|
return input;
|
|
161
161
|
}
|
|
162
|
-
const select$
|
|
162
|
+
const select$b = function GisExternalAuthIdentityProviderOutputRepresentationSelect() {
|
|
163
163
|
return {
|
|
164
164
|
kind: 'Fragment',
|
|
165
|
-
version: VERSION$
|
|
165
|
+
version: VERSION$6,
|
|
166
166
|
private: [],
|
|
167
167
|
selections: [
|
|
168
168
|
{
|
|
@@ -196,7 +196,7 @@ const select$3 = function GisExternalAuthIdentityProviderOutputRepresentationSel
|
|
|
196
196
|
]
|
|
197
197
|
};
|
|
198
198
|
};
|
|
199
|
-
function equals$
|
|
199
|
+
function equals$6(existing, incoming) {
|
|
200
200
|
const existing_authType = existing.authType;
|
|
201
201
|
const incoming_authType = incoming.authType;
|
|
202
202
|
if (!(existing_authType === incoming_authType)) {
|
|
@@ -234,41 +234,41 @@ function equals$1(existing, incoming) {
|
|
|
234
234
|
}
|
|
235
235
|
return true;
|
|
236
236
|
}
|
|
237
|
-
const ingest$
|
|
237
|
+
const ingest$6 = function GisExternalAuthIdentityProviderOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
238
238
|
if (process.env.NODE_ENV !== 'production') {
|
|
239
|
-
const validateError = validate$
|
|
239
|
+
const validateError = validate$6(input);
|
|
240
240
|
if (validateError !== null) {
|
|
241
241
|
throw validateError;
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
-
const key = keyBuilderFromType(luvio, input);
|
|
245
|
-
const ttlToUse = TTL$
|
|
246
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
244
|
+
const key = keyBuilderFromType$2(luvio, input);
|
|
245
|
+
const ttlToUse = TTL$6;
|
|
246
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "gis", VERSION$6, RepresentationType$6, equals$6);
|
|
247
247
|
return createLink(key);
|
|
248
248
|
};
|
|
249
|
-
function getTypeCacheKeys$
|
|
249
|
+
function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
|
|
250
250
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
251
|
-
const rootKey = keyBuilderFromType(luvio, input);
|
|
251
|
+
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
252
252
|
rootKeySet.set(rootKey, {
|
|
253
253
|
namespace: keyPrefix,
|
|
254
|
-
representationName: RepresentationType$
|
|
254
|
+
representationName: RepresentationType$6,
|
|
255
255
|
mergeable: false
|
|
256
256
|
});
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
-
function select$
|
|
260
|
-
return select$
|
|
259
|
+
function select$a(luvio, params) {
|
|
260
|
+
return select$b();
|
|
261
261
|
}
|
|
262
|
-
function getResponseCacheKeys$
|
|
263
|
-
getTypeCacheKeys$
|
|
262
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
263
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response);
|
|
264
264
|
}
|
|
265
|
-
function ingestSuccess$
|
|
265
|
+
function ingestSuccess$4(luvio, resourceParams, response) {
|
|
266
266
|
const { body } = response;
|
|
267
|
-
const key = keyBuilderFromType(luvio, body);
|
|
268
|
-
luvio.storeIngest(key, ingest$
|
|
267
|
+
const key = keyBuilderFromType$2(luvio, body);
|
|
268
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
269
269
|
const snapshot = luvio.storeLookup({
|
|
270
270
|
recordId: key,
|
|
271
|
-
node: select$
|
|
271
|
+
node: select$a(),
|
|
272
272
|
variables: {},
|
|
273
273
|
});
|
|
274
274
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -279,7 +279,7 @@ function ingestSuccess$1(luvio, resourceParams, response) {
|
|
|
279
279
|
deepFreeze(snapshot.data);
|
|
280
280
|
return snapshot;
|
|
281
281
|
}
|
|
282
|
-
function createResourceRequest$
|
|
282
|
+
function createResourceRequest$4(config) {
|
|
283
283
|
const headers = {};
|
|
284
284
|
return {
|
|
285
285
|
baseUri: '/services/data/v65.0',
|
|
@@ -293,7 +293,7 @@ function createResourceRequest$1(config) {
|
|
|
293
293
|
};
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
const adapterName$
|
|
296
|
+
const adapterName$4 = 'createGisExternalAuthIdentityProvider';
|
|
297
297
|
const createGisExternalAuthIdentityProvider_ConfigPropertyMetadata = [
|
|
298
298
|
generateParamConfigMetadata('authType', true, 2 /* Body */, 0 /* String */),
|
|
299
299
|
generateParamConfigMetadata('baseUrl', true, 2 /* Body */, 0 /* String */),
|
|
@@ -302,37 +302,37 @@ const createGisExternalAuthIdentityProvider_ConfigPropertyMetadata = [
|
|
|
302
302
|
generateParamConfigMetadata('gisProvider', true, 2 /* Body */, 0 /* String */),
|
|
303
303
|
generateParamConfigMetadata('name', true, 2 /* Body */, 0 /* String */),
|
|
304
304
|
];
|
|
305
|
-
const createGisExternalAuthIdentityProvider_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
306
|
-
const createResourceParams$
|
|
307
|
-
function typeCheckConfig$
|
|
305
|
+
const createGisExternalAuthIdentityProvider_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, createGisExternalAuthIdentityProvider_ConfigPropertyMetadata);
|
|
306
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$5(createGisExternalAuthIdentityProvider_ConfigPropertyMetadata);
|
|
307
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
308
308
|
const config = {};
|
|
309
|
-
typeCheckConfig$
|
|
309
|
+
typeCheckConfig$5(untrustedConfig, config, createGisExternalAuthIdentityProvider_ConfigPropertyMetadata);
|
|
310
310
|
return config;
|
|
311
311
|
}
|
|
312
|
-
function validateAdapterConfig$
|
|
312
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
313
313
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
314
314
|
return null;
|
|
315
315
|
}
|
|
316
316
|
if (process.env.NODE_ENV !== 'production') {
|
|
317
317
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
318
318
|
}
|
|
319
|
-
const config = typeCheckConfig$
|
|
319
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
320
320
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
321
321
|
return null;
|
|
322
322
|
}
|
|
323
323
|
return config;
|
|
324
324
|
}
|
|
325
|
-
function buildNetworkSnapshot$
|
|
326
|
-
const resourceParams = createResourceParams$
|
|
327
|
-
const request = createResourceRequest$
|
|
325
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
326
|
+
const resourceParams = createResourceParams$4(config);
|
|
327
|
+
const request = createResourceRequest$4(resourceParams);
|
|
328
328
|
return luvio.dispatchResourceRequest(request, options)
|
|
329
329
|
.then((response) => {
|
|
330
330
|
return luvio.handleSuccessResponse(() => {
|
|
331
|
-
const snapshot = ingestSuccess$
|
|
331
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response);
|
|
332
332
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
333
333
|
}, () => {
|
|
334
334
|
const cache = new StoreKeyMap();
|
|
335
|
-
getResponseCacheKeys$
|
|
335
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
336
336
|
return cache;
|
|
337
337
|
});
|
|
338
338
|
}, (response) => {
|
|
@@ -342,18 +342,246 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
342
342
|
}
|
|
343
343
|
const createGisExternalAuthIdentityProviderAdapterFactory = (luvio) => {
|
|
344
344
|
return function createGisExternalAuthIdentityProvider(untrustedConfig) {
|
|
345
|
-
const config = validateAdapterConfig$
|
|
345
|
+
const config = validateAdapterConfig$4(untrustedConfig, createGisExternalAuthIdentityProvider_ConfigPropertyNames);
|
|
346
346
|
// Invalid or incomplete config
|
|
347
347
|
if (config === null) {
|
|
348
348
|
throw new Error('Invalid config for "createGisExternalAuthIdentityProvider"');
|
|
349
349
|
}
|
|
350
|
-
return buildNetworkSnapshot$
|
|
350
|
+
return buildNetworkSnapshot$4(luvio, config);
|
|
351
351
|
};
|
|
352
352
|
};
|
|
353
353
|
|
|
354
|
-
const TTL = 300;
|
|
355
|
-
const VERSION = "
|
|
356
|
-
function validate(obj, path = '
|
|
354
|
+
const TTL$5 = 300;
|
|
355
|
+
const VERSION$5 = "534766993185fd21f5aac8e706c226bf";
|
|
356
|
+
function validate$5(obj, path = 'GisExternalAccessTokenOutputRepresentation') {
|
|
357
|
+
const v_error = (() => {
|
|
358
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
359
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
360
|
+
}
|
|
361
|
+
const obj_expiresIn = obj.expiresIn;
|
|
362
|
+
const path_expiresIn = path + '.expiresIn';
|
|
363
|
+
if (typeof obj_expiresIn !== 'number' || (typeof obj_expiresIn === 'number' && Math.floor(obj_expiresIn) !== obj_expiresIn)) {
|
|
364
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_expiresIn + '" (at "' + path_expiresIn + '")');
|
|
365
|
+
}
|
|
366
|
+
const obj_token = obj.token;
|
|
367
|
+
const path_token = path + '.token';
|
|
368
|
+
if (typeof obj_token !== 'string') {
|
|
369
|
+
return new TypeError('Expected "string" but received "' + typeof obj_token + '" (at "' + path_token + '")');
|
|
370
|
+
}
|
|
371
|
+
const obj_type = obj.type;
|
|
372
|
+
const path_type = path + '.type';
|
|
373
|
+
if (typeof obj_type !== 'string') {
|
|
374
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
375
|
+
}
|
|
376
|
+
})();
|
|
377
|
+
return v_error === undefined ? null : v_error;
|
|
378
|
+
}
|
|
379
|
+
const RepresentationType$5 = 'GisExternalAccessTokenOutputRepresentation';
|
|
380
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
381
|
+
return input;
|
|
382
|
+
}
|
|
383
|
+
const select$9 = function GisExternalAccessTokenOutputRepresentationSelect() {
|
|
384
|
+
return {
|
|
385
|
+
kind: 'Fragment',
|
|
386
|
+
version: VERSION$5,
|
|
387
|
+
private: [],
|
|
388
|
+
selections: [
|
|
389
|
+
{
|
|
390
|
+
name: 'expiresIn',
|
|
391
|
+
kind: 'Scalar'
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
name: 'token',
|
|
395
|
+
kind: 'Scalar'
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
name: 'type',
|
|
399
|
+
kind: 'Scalar'
|
|
400
|
+
}
|
|
401
|
+
]
|
|
402
|
+
};
|
|
403
|
+
};
|
|
404
|
+
function equals$5(existing, incoming) {
|
|
405
|
+
const existing_expiresIn = existing.expiresIn;
|
|
406
|
+
const incoming_expiresIn = incoming.expiresIn;
|
|
407
|
+
if (!(existing_expiresIn === incoming_expiresIn)) {
|
|
408
|
+
return false;
|
|
409
|
+
}
|
|
410
|
+
const existing_token = existing.token;
|
|
411
|
+
const incoming_token = incoming.token;
|
|
412
|
+
if (!(existing_token === incoming_token)) {
|
|
413
|
+
return false;
|
|
414
|
+
}
|
|
415
|
+
const existing_type = existing.type;
|
|
416
|
+
const incoming_type = incoming.type;
|
|
417
|
+
if (!(existing_type === incoming_type)) {
|
|
418
|
+
return false;
|
|
419
|
+
}
|
|
420
|
+
return true;
|
|
421
|
+
}
|
|
422
|
+
const ingest$5 = function GisExternalAccessTokenOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
423
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
424
|
+
const validateError = validate$5(input);
|
|
425
|
+
if (validateError !== null) {
|
|
426
|
+
throw validateError;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
const key = path.fullPath;
|
|
430
|
+
const ttlToUse = TTL$5;
|
|
431
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "gis", VERSION$5, RepresentationType$5, equals$5);
|
|
432
|
+
return createLink(key);
|
|
433
|
+
};
|
|
434
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
435
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
436
|
+
const rootKey = fullPathFactory();
|
|
437
|
+
rootKeySet.set(rootKey, {
|
|
438
|
+
namespace: keyPrefix,
|
|
439
|
+
representationName: RepresentationType$5,
|
|
440
|
+
mergeable: false
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
function select$8(luvio, params) {
|
|
445
|
+
return select$9();
|
|
446
|
+
}
|
|
447
|
+
function keyBuilder$9(luvio, params) {
|
|
448
|
+
return keyPrefix + '::GisExternalAccessTokenOutputRepresentation:(' + 'authSettingsId:' + params.queryParams.authSettingsId + ')';
|
|
449
|
+
}
|
|
450
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
451
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response, () => keyBuilder$9(luvio, resourceParams));
|
|
452
|
+
}
|
|
453
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
454
|
+
const { body } = response;
|
|
455
|
+
const key = keyBuilder$9(luvio, resourceParams);
|
|
456
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
457
|
+
const snapshot = luvio.storeLookup({
|
|
458
|
+
recordId: key,
|
|
459
|
+
node: select$8(),
|
|
460
|
+
variables: {},
|
|
461
|
+
}, snapshotRefresh);
|
|
462
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
463
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
464
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
deepFreeze(snapshot.data);
|
|
468
|
+
return snapshot;
|
|
469
|
+
}
|
|
470
|
+
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
471
|
+
const key = keyBuilder$9(luvio, params);
|
|
472
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
473
|
+
const storeMetadataParams = {
|
|
474
|
+
ttl: TTL$5,
|
|
475
|
+
namespace: keyPrefix,
|
|
476
|
+
version: VERSION$5,
|
|
477
|
+
representationName: RepresentationType$5
|
|
478
|
+
};
|
|
479
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
480
|
+
return errorSnapshot;
|
|
481
|
+
}
|
|
482
|
+
function createResourceRequest$3(config) {
|
|
483
|
+
const headers = {};
|
|
484
|
+
return {
|
|
485
|
+
baseUri: '/services/data/v65.0',
|
|
486
|
+
basePath: '/gis/auth/GisExternalAccessToken',
|
|
487
|
+
method: 'get',
|
|
488
|
+
body: null,
|
|
489
|
+
urlParams: {},
|
|
490
|
+
queryParams: config.queryParams,
|
|
491
|
+
headers,
|
|
492
|
+
priority: 'normal',
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
const adapterName$3 = 'getGisExternalAuthAccessToken';
|
|
497
|
+
const getGisExternalAuthAccessToken_ConfigPropertyMetadata = [
|
|
498
|
+
generateParamConfigMetadata('authSettingsId', true, 1 /* QueryParameter */, 0 /* String */),
|
|
499
|
+
];
|
|
500
|
+
const getGisExternalAuthAccessToken_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getGisExternalAuthAccessToken_ConfigPropertyMetadata);
|
|
501
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$5(getGisExternalAuthAccessToken_ConfigPropertyMetadata);
|
|
502
|
+
function keyBuilder$8(luvio, config) {
|
|
503
|
+
const resourceParams = createResourceParams$3(config);
|
|
504
|
+
return keyBuilder$9(luvio, resourceParams);
|
|
505
|
+
}
|
|
506
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
507
|
+
const config = {};
|
|
508
|
+
typeCheckConfig$5(untrustedConfig, config, getGisExternalAuthAccessToken_ConfigPropertyMetadata);
|
|
509
|
+
return config;
|
|
510
|
+
}
|
|
511
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
512
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
513
|
+
return null;
|
|
514
|
+
}
|
|
515
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
516
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
517
|
+
}
|
|
518
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
519
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
520
|
+
return null;
|
|
521
|
+
}
|
|
522
|
+
return config;
|
|
523
|
+
}
|
|
524
|
+
function adapterFragment$3(luvio, config) {
|
|
525
|
+
createResourceParams$3(config);
|
|
526
|
+
return select$8();
|
|
527
|
+
}
|
|
528
|
+
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
529
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
530
|
+
config,
|
|
531
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
532
|
+
});
|
|
533
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
534
|
+
}
|
|
535
|
+
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
536
|
+
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
537
|
+
config,
|
|
538
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
539
|
+
});
|
|
540
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
541
|
+
}
|
|
542
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
543
|
+
const resourceParams = createResourceParams$3(config);
|
|
544
|
+
const request = createResourceRequest$3(resourceParams);
|
|
545
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
546
|
+
.then((response) => {
|
|
547
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
548
|
+
const cache = new StoreKeyMap();
|
|
549
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
550
|
+
return cache;
|
|
551
|
+
});
|
|
552
|
+
}, (response) => {
|
|
553
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
557
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
558
|
+
}
|
|
559
|
+
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
560
|
+
const { luvio, config } = context;
|
|
561
|
+
const selector = {
|
|
562
|
+
recordId: keyBuilder$8(luvio, config),
|
|
563
|
+
node: adapterFragment$3(luvio, config),
|
|
564
|
+
variables: {},
|
|
565
|
+
};
|
|
566
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
567
|
+
config,
|
|
568
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
569
|
+
});
|
|
570
|
+
return cacheSnapshot;
|
|
571
|
+
}
|
|
572
|
+
const getGisExternalAuthAccessTokenAdapterFactory = (luvio) => function gis__getGisExternalAuthAccessToken(untrustedConfig, requestContext) {
|
|
573
|
+
const config = validateAdapterConfig$3(untrustedConfig, getGisExternalAuthAccessToken_ConfigPropertyNames);
|
|
574
|
+
// Invalid or incomplete config
|
|
575
|
+
if (config === null) {
|
|
576
|
+
return null;
|
|
577
|
+
}
|
|
578
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
579
|
+
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
580
|
+
};
|
|
581
|
+
|
|
582
|
+
const TTL$4 = 300;
|
|
583
|
+
const VERSION$4 = "a7ac614251e70adfb9330b0fcdbfcbf2";
|
|
584
|
+
function validate$4(obj, path = 'GisExternalAuthIdentityProviderCollectionRepresentation') {
|
|
357
585
|
const v_error = (() => {
|
|
358
586
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
359
587
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -378,14 +606,14 @@ function validate(obj, path = 'GisExternalAuthIdentityProviderCollectionRepresen
|
|
|
378
606
|
})();
|
|
379
607
|
return v_error === undefined ? null : v_error;
|
|
380
608
|
}
|
|
381
|
-
const RepresentationType = 'GisExternalAuthIdentityProviderCollectionRepresentation';
|
|
382
|
-
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
609
|
+
const RepresentationType$4 = 'GisExternalAuthIdentityProviderCollectionRepresentation';
|
|
610
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
383
611
|
const input_gisExternalAuthIdentityProviderOutputRepresentation = input.gisExternalAuthIdentityProviderOutputRepresentation;
|
|
384
612
|
const input_gisExternalAuthIdentityProviderOutputRepresentation_id = path.fullPath + '__gisExternalAuthIdentityProviderOutputRepresentation';
|
|
385
613
|
for (let i = 0; i < input_gisExternalAuthIdentityProviderOutputRepresentation.length; i++) {
|
|
386
614
|
const input_gisExternalAuthIdentityProviderOutputRepresentation_item = input_gisExternalAuthIdentityProviderOutputRepresentation[i];
|
|
387
615
|
let input_gisExternalAuthIdentityProviderOutputRepresentation_item_id = input_gisExternalAuthIdentityProviderOutputRepresentation_id + '__' + i;
|
|
388
|
-
input_gisExternalAuthIdentityProviderOutputRepresentation[i] = ingest$
|
|
616
|
+
input_gisExternalAuthIdentityProviderOutputRepresentation[i] = ingest$6(input_gisExternalAuthIdentityProviderOutputRepresentation_item, {
|
|
389
617
|
fullPath: input_gisExternalAuthIdentityProviderOutputRepresentation_item_id,
|
|
390
618
|
propertyName: i,
|
|
391
619
|
parent: {
|
|
@@ -398,10 +626,10 @@ function normalize(input, existing, path, luvio, store, timestamp) {
|
|
|
398
626
|
}
|
|
399
627
|
return input;
|
|
400
628
|
}
|
|
401
|
-
const select$
|
|
629
|
+
const select$7 = function GisExternalAuthIdentityProviderCollectionRepresentationSelect() {
|
|
402
630
|
return {
|
|
403
631
|
kind: 'Fragment',
|
|
404
|
-
version: VERSION,
|
|
632
|
+
version: VERSION$4,
|
|
405
633
|
private: [],
|
|
406
634
|
selections: [
|
|
407
635
|
{
|
|
@@ -412,12 +640,12 @@ const select$1 = function GisExternalAuthIdentityProviderCollectionRepresentatio
|
|
|
412
640
|
name: 'gisExternalAuthIdentityProviderOutputRepresentation',
|
|
413
641
|
kind: 'Link',
|
|
414
642
|
plural: true,
|
|
415
|
-
fragment: select$
|
|
643
|
+
fragment: select$b()
|
|
416
644
|
}
|
|
417
645
|
]
|
|
418
646
|
};
|
|
419
647
|
};
|
|
420
|
-
function equals(existing, incoming) {
|
|
648
|
+
function equals$4(existing, incoming) {
|
|
421
649
|
const existing_count = existing.count;
|
|
422
650
|
const incoming_count = incoming.count;
|
|
423
651
|
if (!(existing_count === incoming_count)) {
|
|
@@ -435,48 +663,48 @@ function equals(existing, incoming) {
|
|
|
435
663
|
}
|
|
436
664
|
return true;
|
|
437
665
|
}
|
|
438
|
-
const ingest = function GisExternalAuthIdentityProviderCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
666
|
+
const ingest$4 = function GisExternalAuthIdentityProviderCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
439
667
|
if (process.env.NODE_ENV !== 'production') {
|
|
440
|
-
const validateError = validate(input);
|
|
668
|
+
const validateError = validate$4(input);
|
|
441
669
|
if (validateError !== null) {
|
|
442
670
|
throw validateError;
|
|
443
671
|
}
|
|
444
672
|
}
|
|
445
673
|
const key = path.fullPath;
|
|
446
|
-
const ttlToUse = TTL;
|
|
447
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "gis", VERSION, RepresentationType, equals);
|
|
674
|
+
const ttlToUse = TTL$4;
|
|
675
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "gis", VERSION$4, RepresentationType$4, equals$4);
|
|
448
676
|
return createLink(key);
|
|
449
677
|
};
|
|
450
|
-
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
678
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
451
679
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
452
680
|
const rootKey = fullPathFactory();
|
|
453
681
|
rootKeySet.set(rootKey, {
|
|
454
682
|
namespace: keyPrefix,
|
|
455
|
-
representationName: RepresentationType,
|
|
683
|
+
representationName: RepresentationType$4,
|
|
456
684
|
mergeable: false
|
|
457
685
|
});
|
|
458
686
|
const input_gisExternalAuthIdentityProviderOutputRepresentation_length = input.gisExternalAuthIdentityProviderOutputRepresentation.length;
|
|
459
687
|
for (let i = 0; i < input_gisExternalAuthIdentityProviderOutputRepresentation_length; i++) {
|
|
460
|
-
getTypeCacheKeys$
|
|
688
|
+
getTypeCacheKeys$6(rootKeySet, luvio, input.gisExternalAuthIdentityProviderOutputRepresentation[i]);
|
|
461
689
|
}
|
|
462
690
|
}
|
|
463
691
|
|
|
464
|
-
function select(luvio, params) {
|
|
465
|
-
return select$
|
|
692
|
+
function select$6(luvio, params) {
|
|
693
|
+
return select$7();
|
|
466
694
|
}
|
|
467
|
-
function keyBuilder$
|
|
695
|
+
function keyBuilder$7(luvio, params) {
|
|
468
696
|
return keyPrefix + '::GisExternalAuthIdentityProviderCollectionRepresentation:(' + 'limitByProfile:' + params.queryParams.limitByProfile + ')';
|
|
469
697
|
}
|
|
470
|
-
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
471
|
-
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$
|
|
698
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
699
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response, () => keyBuilder$7(luvio, resourceParams));
|
|
472
700
|
}
|
|
473
|
-
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
701
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
474
702
|
const { body } = response;
|
|
475
|
-
const key = keyBuilder$
|
|
476
|
-
luvio.storeIngest(key, ingest, body);
|
|
703
|
+
const key = keyBuilder$7(luvio, resourceParams);
|
|
704
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
477
705
|
const snapshot = luvio.storeLookup({
|
|
478
706
|
recordId: key,
|
|
479
|
-
node: select(),
|
|
707
|
+
node: select$6(),
|
|
480
708
|
variables: {},
|
|
481
709
|
}, snapshotRefresh);
|
|
482
710
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -487,19 +715,19 @@ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
487
715
|
deepFreeze(snapshot.data);
|
|
488
716
|
return snapshot;
|
|
489
717
|
}
|
|
490
|
-
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
491
|
-
const key = keyBuilder$
|
|
718
|
+
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
719
|
+
const key = keyBuilder$7(luvio, params);
|
|
492
720
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
493
721
|
const storeMetadataParams = {
|
|
494
|
-
ttl: TTL,
|
|
722
|
+
ttl: TTL$4,
|
|
495
723
|
namespace: keyPrefix,
|
|
496
|
-
version: VERSION,
|
|
497
|
-
representationName: RepresentationType
|
|
724
|
+
version: VERSION$4,
|
|
725
|
+
representationName: RepresentationType$4
|
|
498
726
|
};
|
|
499
727
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
500
728
|
return errorSnapshot;
|
|
501
729
|
}
|
|
502
|
-
function createResourceRequest(config) {
|
|
730
|
+
function createResourceRequest$2(config) {
|
|
503
731
|
const headers = {};
|
|
504
732
|
return {
|
|
505
733
|
baseUri: '/services/data/v65.0',
|
|
@@ -513,124 +741,996 @@ function createResourceRequest(config) {
|
|
|
513
741
|
};
|
|
514
742
|
}
|
|
515
743
|
|
|
516
|
-
const adapterName = 'getGisExternalAuthIdentityProviders';
|
|
744
|
+
const adapterName$2 = 'getGisExternalAuthIdentityProviders';
|
|
517
745
|
const getGisExternalAuthIdentityProviders_ConfigPropertyMetadata = [
|
|
518
746
|
generateParamConfigMetadata('limitByProfile', true, 1 /* QueryParameter */, 1 /* Boolean */),
|
|
519
747
|
];
|
|
520
|
-
const getGisExternalAuthIdentityProviders_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getGisExternalAuthIdentityProviders_ConfigPropertyMetadata);
|
|
521
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
522
|
-
function keyBuilder(luvio, config) {
|
|
523
|
-
const resourceParams = createResourceParams(config);
|
|
524
|
-
return keyBuilder$
|
|
748
|
+
const getGisExternalAuthIdentityProviders_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getGisExternalAuthIdentityProviders_ConfigPropertyMetadata);
|
|
749
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$5(getGisExternalAuthIdentityProviders_ConfigPropertyMetadata);
|
|
750
|
+
function keyBuilder$6(luvio, config) {
|
|
751
|
+
const resourceParams = createResourceParams$2(config);
|
|
752
|
+
return keyBuilder$7(luvio, resourceParams);
|
|
525
753
|
}
|
|
526
|
-
function typeCheckConfig(untrustedConfig) {
|
|
754
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
527
755
|
const config = {};
|
|
528
|
-
typeCheckConfig$
|
|
756
|
+
typeCheckConfig$5(untrustedConfig, config, getGisExternalAuthIdentityProviders_ConfigPropertyMetadata);
|
|
529
757
|
return config;
|
|
530
758
|
}
|
|
531
|
-
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
759
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
532
760
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
533
761
|
return null;
|
|
534
762
|
}
|
|
535
763
|
if (process.env.NODE_ENV !== 'production') {
|
|
536
764
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
537
765
|
}
|
|
538
|
-
const config = typeCheckConfig(untrustedConfig);
|
|
766
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
539
767
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
540
768
|
return null;
|
|
541
769
|
}
|
|
542
770
|
return config;
|
|
543
771
|
}
|
|
544
|
-
function adapterFragment(luvio, config) {
|
|
545
|
-
createResourceParams(config);
|
|
546
|
-
return select();
|
|
772
|
+
function adapterFragment$2(luvio, config) {
|
|
773
|
+
createResourceParams$2(config);
|
|
774
|
+
return select$6();
|
|
547
775
|
}
|
|
548
|
-
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
549
|
-
const snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
776
|
+
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
777
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
550
778
|
config,
|
|
551
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
779
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
552
780
|
});
|
|
553
781
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
554
782
|
}
|
|
555
|
-
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
556
|
-
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
783
|
+
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
784
|
+
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
557
785
|
config,
|
|
558
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
786
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
559
787
|
});
|
|
560
788
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
561
789
|
}
|
|
562
|
-
function buildNetworkSnapshot(luvio, config, options) {
|
|
563
|
-
const resourceParams = createResourceParams(config);
|
|
564
|
-
const request = createResourceRequest(resourceParams);
|
|
790
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
791
|
+
const resourceParams = createResourceParams$2(config);
|
|
792
|
+
const request = createResourceRequest$2(resourceParams);
|
|
565
793
|
return luvio.dispatchResourceRequest(request, options)
|
|
566
794
|
.then((response) => {
|
|
567
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
795
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
568
796
|
const cache = new StoreKeyMap();
|
|
569
|
-
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
797
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
570
798
|
return cache;
|
|
571
799
|
});
|
|
572
800
|
}, (response) => {
|
|
573
|
-
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
801
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
574
802
|
});
|
|
575
803
|
}
|
|
576
|
-
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
577
|
-
return buildNetworkSnapshotCachePolicy$
|
|
804
|
+
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
805
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
578
806
|
}
|
|
579
|
-
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
807
|
+
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
580
808
|
const { luvio, config } = context;
|
|
581
809
|
const selector = {
|
|
582
|
-
recordId: keyBuilder(luvio, config),
|
|
583
|
-
node: adapterFragment(luvio, config),
|
|
810
|
+
recordId: keyBuilder$6(luvio, config),
|
|
811
|
+
node: adapterFragment$2(luvio, config),
|
|
584
812
|
variables: {},
|
|
585
813
|
};
|
|
586
814
|
const cacheSnapshot = storeLookup(selector, {
|
|
587
815
|
config,
|
|
588
|
-
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
816
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
589
817
|
});
|
|
590
818
|
return cacheSnapshot;
|
|
591
819
|
}
|
|
592
820
|
const getGisExternalAuthIdentityProvidersAdapterFactory = (luvio) => function gis__getGisExternalAuthIdentityProviders(untrustedConfig, requestContext) {
|
|
593
|
-
const config = validateAdapterConfig(untrustedConfig, getGisExternalAuthIdentityProviders_ConfigPropertyNames);
|
|
821
|
+
const config = validateAdapterConfig$2(untrustedConfig, getGisExternalAuthIdentityProviders_ConfigPropertyNames);
|
|
594
822
|
// Invalid or incomplete config
|
|
595
823
|
if (config === null) {
|
|
596
824
|
return null;
|
|
597
825
|
}
|
|
598
826
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
599
|
-
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
827
|
+
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
600
828
|
};
|
|
601
829
|
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
830
|
+
const TTL$3 = 300;
|
|
831
|
+
const VERSION$3 = "d1f7afbf8cf734038f702e4ff23870c9";
|
|
832
|
+
function validate$3(obj, path = 'GisExtlMapObjectConfigOutputRepresentation') {
|
|
833
|
+
const v_error = (() => {
|
|
834
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
835
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
836
|
+
}
|
|
837
|
+
const obj_defaultMapId = obj.defaultMapId;
|
|
838
|
+
const path_defaultMapId = path + '.defaultMapId';
|
|
839
|
+
if (typeof obj_defaultMapId !== 'string') {
|
|
840
|
+
return new TypeError('Expected "string" but received "' + typeof obj_defaultMapId + '" (at "' + path_defaultMapId + '")');
|
|
841
|
+
}
|
|
842
|
+
const obj_id = obj.id;
|
|
843
|
+
const path_id = path + '.id';
|
|
844
|
+
if (typeof obj_id !== 'string') {
|
|
845
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
846
|
+
}
|
|
847
|
+
const obj_mapIdFieldName = obj.mapIdFieldName;
|
|
848
|
+
const path_mapIdFieldName = path + '.mapIdFieldName';
|
|
849
|
+
let obj_mapIdFieldName_union0 = null;
|
|
850
|
+
const obj_mapIdFieldName_union0_error = (() => {
|
|
851
|
+
if (typeof obj_mapIdFieldName !== 'string') {
|
|
852
|
+
return new TypeError('Expected "string" but received "' + typeof obj_mapIdFieldName + '" (at "' + path_mapIdFieldName + '")');
|
|
853
|
+
}
|
|
854
|
+
})();
|
|
855
|
+
if (obj_mapIdFieldName_union0_error != null) {
|
|
856
|
+
obj_mapIdFieldName_union0 = obj_mapIdFieldName_union0_error.message;
|
|
857
|
+
}
|
|
858
|
+
let obj_mapIdFieldName_union1 = null;
|
|
859
|
+
const obj_mapIdFieldName_union1_error = (() => {
|
|
860
|
+
if (obj_mapIdFieldName !== null) {
|
|
861
|
+
return new TypeError('Expected "null" but received "' + typeof obj_mapIdFieldName + '" (at "' + path_mapIdFieldName + '")');
|
|
862
|
+
}
|
|
863
|
+
})();
|
|
864
|
+
if (obj_mapIdFieldName_union1_error != null) {
|
|
865
|
+
obj_mapIdFieldName_union1 = obj_mapIdFieldName_union1_error.message;
|
|
866
|
+
}
|
|
867
|
+
if (obj_mapIdFieldName_union0 && obj_mapIdFieldName_union1) {
|
|
868
|
+
let message = 'Object doesn\'t match union (at "' + path_mapIdFieldName + '")';
|
|
869
|
+
message += '\n' + obj_mapIdFieldName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
870
|
+
message += '\n' + obj_mapIdFieldName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
871
|
+
return new TypeError(message);
|
|
872
|
+
}
|
|
873
|
+
const obj_objectName = obj.objectName;
|
|
874
|
+
const path_objectName = path + '.objectName';
|
|
875
|
+
if (typeof obj_objectName !== 'string') {
|
|
876
|
+
return new TypeError('Expected "string" but received "' + typeof obj_objectName + '" (at "' + path_objectName + '")');
|
|
877
|
+
}
|
|
878
|
+
const obj_recordType = obj.recordType;
|
|
879
|
+
const path_recordType = path + '.recordType';
|
|
880
|
+
let obj_recordType_union0 = null;
|
|
881
|
+
const obj_recordType_union0_error = (() => {
|
|
882
|
+
if (typeof obj_recordType !== 'string') {
|
|
883
|
+
return new TypeError('Expected "string" but received "' + typeof obj_recordType + '" (at "' + path_recordType + '")');
|
|
884
|
+
}
|
|
885
|
+
})();
|
|
886
|
+
if (obj_recordType_union0_error != null) {
|
|
887
|
+
obj_recordType_union0 = obj_recordType_union0_error.message;
|
|
888
|
+
}
|
|
889
|
+
let obj_recordType_union1 = null;
|
|
890
|
+
const obj_recordType_union1_error = (() => {
|
|
891
|
+
if (obj_recordType !== null) {
|
|
892
|
+
return new TypeError('Expected "null" but received "' + typeof obj_recordType + '" (at "' + path_recordType + '")');
|
|
893
|
+
}
|
|
894
|
+
})();
|
|
895
|
+
if (obj_recordType_union1_error != null) {
|
|
896
|
+
obj_recordType_union1 = obj_recordType_union1_error.message;
|
|
897
|
+
}
|
|
898
|
+
if (obj_recordType_union0 && obj_recordType_union1) {
|
|
899
|
+
let message = 'Object doesn\'t match union (at "' + path_recordType + '")';
|
|
900
|
+
message += '\n' + obj_recordType_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
901
|
+
message += '\n' + obj_recordType_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
902
|
+
return new TypeError(message);
|
|
903
|
+
}
|
|
904
|
+
})();
|
|
905
|
+
return v_error === undefined ? null : v_error;
|
|
906
|
+
}
|
|
907
|
+
const RepresentationType$3 = 'GisExtlMapObjectConfigOutputRepresentation';
|
|
908
|
+
function keyBuilder$5(luvio, config) {
|
|
909
|
+
return keyPrefix + '::' + RepresentationType$3 + ':' + config.id;
|
|
910
|
+
}
|
|
911
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
912
|
+
const keyParams = {
|
|
913
|
+
id: object.id
|
|
914
|
+
};
|
|
915
|
+
return keyBuilder$5(luvio, keyParams);
|
|
916
|
+
}
|
|
917
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
918
|
+
return input;
|
|
919
|
+
}
|
|
920
|
+
const select$5 = function GisExtlMapObjectConfigOutputRepresentationSelect() {
|
|
921
|
+
return {
|
|
922
|
+
kind: 'Fragment',
|
|
923
|
+
version: VERSION$3,
|
|
924
|
+
private: [],
|
|
925
|
+
selections: [
|
|
926
|
+
{
|
|
927
|
+
name: 'defaultMapId',
|
|
928
|
+
kind: 'Scalar'
|
|
929
|
+
},
|
|
930
|
+
{
|
|
931
|
+
name: 'id',
|
|
932
|
+
kind: 'Scalar'
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
name: 'mapIdFieldName',
|
|
936
|
+
kind: 'Scalar'
|
|
937
|
+
},
|
|
938
|
+
{
|
|
939
|
+
name: 'objectName',
|
|
940
|
+
kind: 'Scalar'
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
name: 'recordType',
|
|
944
|
+
kind: 'Scalar'
|
|
945
|
+
}
|
|
946
|
+
]
|
|
947
|
+
};
|
|
948
|
+
};
|
|
949
|
+
function equals$3(existing, incoming) {
|
|
950
|
+
const existing_defaultMapId = existing.defaultMapId;
|
|
951
|
+
const incoming_defaultMapId = incoming.defaultMapId;
|
|
952
|
+
if (!(existing_defaultMapId === incoming_defaultMapId)) {
|
|
953
|
+
return false;
|
|
954
|
+
}
|
|
955
|
+
const existing_id = existing.id;
|
|
956
|
+
const incoming_id = incoming.id;
|
|
957
|
+
if (!(existing_id === incoming_id)) {
|
|
958
|
+
return false;
|
|
959
|
+
}
|
|
960
|
+
const existing_objectName = existing.objectName;
|
|
961
|
+
const incoming_objectName = incoming.objectName;
|
|
962
|
+
if (!(existing_objectName === incoming_objectName)) {
|
|
963
|
+
return false;
|
|
964
|
+
}
|
|
965
|
+
const existing_mapIdFieldName = existing.mapIdFieldName;
|
|
966
|
+
const incoming_mapIdFieldName = incoming.mapIdFieldName;
|
|
967
|
+
if (!(existing_mapIdFieldName === incoming_mapIdFieldName)) {
|
|
968
|
+
return false;
|
|
969
|
+
}
|
|
970
|
+
const existing_recordType = existing.recordType;
|
|
971
|
+
const incoming_recordType = incoming.recordType;
|
|
972
|
+
if (!(existing_recordType === incoming_recordType)) {
|
|
973
|
+
return false;
|
|
974
|
+
}
|
|
975
|
+
return true;
|
|
976
|
+
}
|
|
977
|
+
const ingest$3 = function GisExtlMapObjectConfigOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
978
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
979
|
+
const validateError = validate$3(input);
|
|
980
|
+
if (validateError !== null) {
|
|
981
|
+
throw validateError;
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
985
|
+
const ttlToUse = TTL$3;
|
|
986
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "gis", VERSION$3, RepresentationType$3, equals$3);
|
|
987
|
+
return createLink(key);
|
|
988
|
+
};
|
|
989
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
990
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
991
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
992
|
+
rootKeySet.set(rootKey, {
|
|
993
|
+
namespace: keyPrefix,
|
|
994
|
+
representationName: RepresentationType$3,
|
|
995
|
+
mergeable: false
|
|
996
|
+
});
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
const TTL$2 = 300;
|
|
1000
|
+
const VERSION$2 = "9cba8584dbb15a650cd322528530d375";
|
|
1001
|
+
function validate$2(obj, path = 'GisExtlMapObjectConfigCollectionRepresentation') {
|
|
1002
|
+
const v_error = (() => {
|
|
1003
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1004
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1005
|
+
}
|
|
1006
|
+
const obj_count = obj.count;
|
|
1007
|
+
const path_count = path + '.count';
|
|
1008
|
+
if (typeof obj_count !== 'number' || (typeof obj_count === 'number' && Math.floor(obj_count) !== obj_count)) {
|
|
1009
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_count + '" (at "' + path_count + '")');
|
|
1010
|
+
}
|
|
1011
|
+
const obj_gisExtlMapObjectConfigs = obj.gisExtlMapObjectConfigs;
|
|
1012
|
+
const path_gisExtlMapObjectConfigs = path + '.gisExtlMapObjectConfigs';
|
|
1013
|
+
if (!ArrayIsArray(obj_gisExtlMapObjectConfigs)) {
|
|
1014
|
+
return new TypeError('Expected "array" but received "' + typeof obj_gisExtlMapObjectConfigs + '" (at "' + path_gisExtlMapObjectConfigs + '")');
|
|
1015
|
+
}
|
|
1016
|
+
for (let i = 0; i < obj_gisExtlMapObjectConfigs.length; i++) {
|
|
1017
|
+
const obj_gisExtlMapObjectConfigs_item = obj_gisExtlMapObjectConfigs[i];
|
|
1018
|
+
const path_gisExtlMapObjectConfigs_item = path_gisExtlMapObjectConfigs + '[' + i + ']';
|
|
1019
|
+
if (typeof obj_gisExtlMapObjectConfigs_item !== 'object' || Array.isArray(obj_gisExtlMapObjectConfigs_item)) {
|
|
1020
|
+
return new TypeError('Expected "object" but received "' + typeof obj_gisExtlMapObjectConfigs_item + '" (at "' + path_gisExtlMapObjectConfigs_item + '")');
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
})();
|
|
1024
|
+
return v_error === undefined ? null : v_error;
|
|
1025
|
+
}
|
|
1026
|
+
const RepresentationType$2 = 'GisExtlMapObjectConfigCollectionRepresentation';
|
|
1027
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
1028
|
+
const input_gisExtlMapObjectConfigs = input.gisExtlMapObjectConfigs;
|
|
1029
|
+
const input_gisExtlMapObjectConfigs_id = path.fullPath + '__gisExtlMapObjectConfigs';
|
|
1030
|
+
for (let i = 0; i < input_gisExtlMapObjectConfigs.length; i++) {
|
|
1031
|
+
const input_gisExtlMapObjectConfigs_item = input_gisExtlMapObjectConfigs[i];
|
|
1032
|
+
let input_gisExtlMapObjectConfigs_item_id = input_gisExtlMapObjectConfigs_id + '__' + i;
|
|
1033
|
+
input_gisExtlMapObjectConfigs[i] = ingest$3(input_gisExtlMapObjectConfigs_item, {
|
|
1034
|
+
fullPath: input_gisExtlMapObjectConfigs_item_id,
|
|
1035
|
+
propertyName: i,
|
|
1036
|
+
parent: {
|
|
1037
|
+
data: input,
|
|
1038
|
+
key: path.fullPath,
|
|
1039
|
+
existing: existing,
|
|
1040
|
+
},
|
|
1041
|
+
ttl: path.ttl
|
|
1042
|
+
}, luvio, store, timestamp);
|
|
1043
|
+
}
|
|
1044
|
+
return input;
|
|
1045
|
+
}
|
|
1046
|
+
const select$4 = function GisExtlMapObjectConfigCollectionRepresentationSelect() {
|
|
1047
|
+
return {
|
|
1048
|
+
kind: 'Fragment',
|
|
1049
|
+
version: VERSION$2,
|
|
1050
|
+
private: [],
|
|
1051
|
+
selections: [
|
|
1052
|
+
{
|
|
1053
|
+
name: 'count',
|
|
1054
|
+
kind: 'Scalar'
|
|
1055
|
+
},
|
|
1056
|
+
{
|
|
1057
|
+
name: 'gisExtlMapObjectConfigs',
|
|
1058
|
+
kind: 'Link',
|
|
1059
|
+
plural: true,
|
|
1060
|
+
fragment: select$5()
|
|
1061
|
+
}
|
|
1062
|
+
]
|
|
1063
|
+
};
|
|
1064
|
+
};
|
|
1065
|
+
function equals$2(existing, incoming) {
|
|
1066
|
+
const existing_count = existing.count;
|
|
1067
|
+
const incoming_count = incoming.count;
|
|
1068
|
+
if (!(existing_count === incoming_count)) {
|
|
1069
|
+
return false;
|
|
1070
|
+
}
|
|
1071
|
+
const existing_gisExtlMapObjectConfigs = existing.gisExtlMapObjectConfigs;
|
|
1072
|
+
const incoming_gisExtlMapObjectConfigs = incoming.gisExtlMapObjectConfigs;
|
|
1073
|
+
const equals_gisExtlMapObjectConfigs_items = equalsArray(existing_gisExtlMapObjectConfigs, incoming_gisExtlMapObjectConfigs, (existing_gisExtlMapObjectConfigs_item, incoming_gisExtlMapObjectConfigs_item) => {
|
|
1074
|
+
if (!(existing_gisExtlMapObjectConfigs_item.__ref === incoming_gisExtlMapObjectConfigs_item.__ref)) {
|
|
1075
|
+
return false;
|
|
1076
|
+
}
|
|
1077
|
+
});
|
|
1078
|
+
if (equals_gisExtlMapObjectConfigs_items === false) {
|
|
1079
|
+
return false;
|
|
1080
|
+
}
|
|
1081
|
+
return true;
|
|
1082
|
+
}
|
|
1083
|
+
const ingest$2 = function GisExtlMapObjectConfigCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1084
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1085
|
+
const validateError = validate$2(input);
|
|
1086
|
+
if (validateError !== null) {
|
|
1087
|
+
throw validateError;
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
const key = path.fullPath;
|
|
1091
|
+
const ttlToUse = TTL$2;
|
|
1092
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "gis", VERSION$2, RepresentationType$2, equals$2);
|
|
1093
|
+
return createLink(key);
|
|
1094
|
+
};
|
|
1095
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
1096
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1097
|
+
const rootKey = fullPathFactory();
|
|
1098
|
+
rootKeySet.set(rootKey, {
|
|
1099
|
+
namespace: keyPrefix,
|
|
1100
|
+
representationName: RepresentationType$2,
|
|
1101
|
+
mergeable: false
|
|
1102
|
+
});
|
|
1103
|
+
const input_gisExtlMapObjectConfigs_length = input.gisExtlMapObjectConfigs.length;
|
|
1104
|
+
for (let i = 0; i < input_gisExtlMapObjectConfigs_length; i++) {
|
|
1105
|
+
getTypeCacheKeys$3(rootKeySet, luvio, input.gisExtlMapObjectConfigs[i]);
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
function select$3(luvio, params) {
|
|
1110
|
+
return select$4();
|
|
1111
|
+
}
|
|
1112
|
+
function keyBuilder$4(luvio, params) {
|
|
1113
|
+
return keyPrefix + '::GisExtlMapObjectConfigCollectionRepresentation:(' + 'id:' + params.queryParams.id + ',' + 'objectName:' + params.queryParams.objectName + ')';
|
|
1114
|
+
}
|
|
1115
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
1116
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$4(luvio, resourceParams));
|
|
1117
|
+
}
|
|
1118
|
+
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
1119
|
+
const { body } = response;
|
|
1120
|
+
const key = keyBuilder$4(luvio, resourceParams);
|
|
1121
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
1122
|
+
const snapshot = luvio.storeLookup({
|
|
1123
|
+
recordId: key,
|
|
1124
|
+
node: select$3(),
|
|
1125
|
+
variables: {},
|
|
1126
|
+
}, snapshotRefresh);
|
|
1127
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1128
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1129
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
deepFreeze(snapshot.data);
|
|
1133
|
+
return snapshot;
|
|
1134
|
+
}
|
|
1135
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
1136
|
+
const key = keyBuilder$4(luvio, params);
|
|
1137
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1138
|
+
const storeMetadataParams = {
|
|
1139
|
+
ttl: TTL$2,
|
|
1140
|
+
namespace: keyPrefix,
|
|
1141
|
+
version: VERSION$2,
|
|
1142
|
+
representationName: RepresentationType$2
|
|
1143
|
+
};
|
|
1144
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1145
|
+
return errorSnapshot;
|
|
1146
|
+
}
|
|
1147
|
+
function createResourceRequest$1(config) {
|
|
1148
|
+
const headers = {};
|
|
1149
|
+
return {
|
|
1150
|
+
baseUri: '/services/data/v65.0',
|
|
1151
|
+
basePath: '/gis/config/GisExtlMapObjectConfig',
|
|
1152
|
+
method: 'get',
|
|
1153
|
+
body: null,
|
|
1154
|
+
urlParams: {},
|
|
1155
|
+
queryParams: config.queryParams,
|
|
1156
|
+
headers,
|
|
1157
|
+
priority: 'normal',
|
|
1158
|
+
};
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
const adapterName$1 = 'getGisExtlMapObjectConfig';
|
|
1162
|
+
const getGisExtlMapObjectConfig_ConfigPropertyMetadata = [
|
|
1163
|
+
generateParamConfigMetadata('id', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1164
|
+
generateParamConfigMetadata('objectName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1165
|
+
];
|
|
1166
|
+
const getGisExtlMapObjectConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getGisExtlMapObjectConfig_ConfigPropertyMetadata);
|
|
1167
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$5(getGisExtlMapObjectConfig_ConfigPropertyMetadata);
|
|
1168
|
+
function keyBuilder$3(luvio, config) {
|
|
1169
|
+
const resourceParams = createResourceParams$1(config);
|
|
1170
|
+
return keyBuilder$4(luvio, resourceParams);
|
|
1171
|
+
}
|
|
1172
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
1173
|
+
const config = {};
|
|
1174
|
+
typeCheckConfig$5(untrustedConfig, config, getGisExtlMapObjectConfig_ConfigPropertyMetadata);
|
|
1175
|
+
return config;
|
|
1176
|
+
}
|
|
1177
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
1178
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1179
|
+
return null;
|
|
1180
|
+
}
|
|
1181
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1182
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1183
|
+
}
|
|
1184
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
1185
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1186
|
+
return null;
|
|
1187
|
+
}
|
|
1188
|
+
return config;
|
|
1189
|
+
}
|
|
1190
|
+
function adapterFragment$1(luvio, config) {
|
|
1191
|
+
createResourceParams$1(config);
|
|
1192
|
+
return select$3();
|
|
1193
|
+
}
|
|
1194
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
1195
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
1196
|
+
config,
|
|
1197
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1198
|
+
});
|
|
1199
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1200
|
+
}
|
|
1201
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
1202
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
1203
|
+
config,
|
|
1204
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1205
|
+
});
|
|
1206
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1207
|
+
}
|
|
1208
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
1209
|
+
const resourceParams = createResourceParams$1(config);
|
|
1210
|
+
const request = createResourceRequest$1(resourceParams);
|
|
1211
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1212
|
+
.then((response) => {
|
|
1213
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
1214
|
+
const cache = new StoreKeyMap();
|
|
1215
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
1216
|
+
return cache;
|
|
1217
|
+
});
|
|
1218
|
+
}, (response) => {
|
|
1219
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
1220
|
+
});
|
|
1221
|
+
}
|
|
1222
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
1223
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
1224
|
+
}
|
|
1225
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
1226
|
+
const { luvio, config } = context;
|
|
1227
|
+
const selector = {
|
|
1228
|
+
recordId: keyBuilder$3(luvio, config),
|
|
1229
|
+
node: adapterFragment$1(luvio, config),
|
|
1230
|
+
variables: {},
|
|
1231
|
+
};
|
|
1232
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1233
|
+
config,
|
|
1234
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1235
|
+
});
|
|
1236
|
+
return cacheSnapshot;
|
|
1237
|
+
}
|
|
1238
|
+
const getGisExtlMapObjectConfigAdapterFactory = (luvio) => function gis__getGisExtlMapObjectConfig(untrustedConfig, requestContext) {
|
|
1239
|
+
const config = validateAdapterConfig$1(untrustedConfig, getGisExtlMapObjectConfig_ConfigPropertyNames);
|
|
1240
|
+
// Invalid or incomplete config
|
|
1241
|
+
if (config === null) {
|
|
1242
|
+
return null;
|
|
1243
|
+
}
|
|
1244
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1245
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
1246
|
+
};
|
|
1247
|
+
|
|
1248
|
+
const TTL$1 = 300;
|
|
1249
|
+
const VERSION$1 = "7313d898b396963c9d42c06b6f84abd7";
|
|
1250
|
+
function validate$1(obj, path = 'GisRelatedObjectConfigOutputRepresentation') {
|
|
1251
|
+
const v_error = (() => {
|
|
1252
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1253
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1254
|
+
}
|
|
1255
|
+
const obj_defaultColor = obj.defaultColor;
|
|
1256
|
+
const path_defaultColor = path + '.defaultColor';
|
|
1257
|
+
if (typeof obj_defaultColor !== 'string') {
|
|
1258
|
+
return new TypeError('Expected "string" but received "' + typeof obj_defaultColor + '" (at "' + path_defaultColor + '")');
|
|
1259
|
+
}
|
|
1260
|
+
const obj_defaultIcon = obj.defaultIcon;
|
|
1261
|
+
const path_defaultIcon = path + '.defaultIcon';
|
|
1262
|
+
if (typeof obj_defaultIcon !== 'string') {
|
|
1263
|
+
return new TypeError('Expected "string" but received "' + typeof obj_defaultIcon + '" (at "' + path_defaultIcon + '")');
|
|
1264
|
+
}
|
|
1265
|
+
const obj_fieldName = obj.fieldName;
|
|
1266
|
+
const path_fieldName = path + '.fieldName';
|
|
1267
|
+
if (typeof obj_fieldName !== 'string') {
|
|
1268
|
+
return new TypeError('Expected "string" but received "' + typeof obj_fieldName + '" (at "' + path_fieldName + '")');
|
|
1269
|
+
}
|
|
1270
|
+
const obj_fieldType = obj.fieldType;
|
|
1271
|
+
const path_fieldType = path + '.fieldType';
|
|
1272
|
+
if (typeof obj_fieldType !== 'string') {
|
|
1273
|
+
return new TypeError('Expected "string" but received "' + typeof obj_fieldType + '" (at "' + path_fieldType + '")');
|
|
1274
|
+
}
|
|
1275
|
+
const obj_id = obj.id;
|
|
1276
|
+
const path_id = path + '.id';
|
|
1277
|
+
if (typeof obj_id !== 'string') {
|
|
1278
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1279
|
+
}
|
|
1280
|
+
const obj_objectName = obj.objectName;
|
|
1281
|
+
const path_objectName = path + '.objectName';
|
|
1282
|
+
if (typeof obj_objectName !== 'string') {
|
|
1283
|
+
return new TypeError('Expected "string" but received "' + typeof obj_objectName + '" (at "' + path_objectName + '")');
|
|
1284
|
+
}
|
|
1285
|
+
const obj_recordType = obj.recordType;
|
|
1286
|
+
const path_recordType = path + '.recordType';
|
|
1287
|
+
if (typeof obj_recordType !== 'string') {
|
|
1288
|
+
return new TypeError('Expected "string" but received "' + typeof obj_recordType + '" (at "' + path_recordType + '")');
|
|
1289
|
+
}
|
|
1290
|
+
const obj_referenceObjectName = obj.referenceObjectName;
|
|
1291
|
+
const path_referenceObjectName = path + '.referenceObjectName';
|
|
1292
|
+
if (typeof obj_referenceObjectName !== 'string') {
|
|
1293
|
+
return new TypeError('Expected "string" but received "' + typeof obj_referenceObjectName + '" (at "' + path_referenceObjectName + '")');
|
|
1294
|
+
}
|
|
1295
|
+
})();
|
|
1296
|
+
return v_error === undefined ? null : v_error;
|
|
1297
|
+
}
|
|
1298
|
+
const RepresentationType$1 = 'GisRelatedObjectConfigOutputRepresentation';
|
|
1299
|
+
function keyBuilder$2(luvio, config) {
|
|
1300
|
+
return keyPrefix + '::' + RepresentationType$1 + ':' + config.id;
|
|
1301
|
+
}
|
|
1302
|
+
function keyBuilderFromType(luvio, object) {
|
|
1303
|
+
const keyParams = {
|
|
1304
|
+
id: object.id
|
|
1305
|
+
};
|
|
1306
|
+
return keyBuilder$2(luvio, keyParams);
|
|
1307
|
+
}
|
|
1308
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
1309
|
+
return input;
|
|
1310
|
+
}
|
|
1311
|
+
const select$2 = function GisRelatedObjectConfigOutputRepresentationSelect() {
|
|
1312
|
+
return {
|
|
1313
|
+
kind: 'Fragment',
|
|
1314
|
+
version: VERSION$1,
|
|
1315
|
+
private: [],
|
|
1316
|
+
selections: [
|
|
1317
|
+
{
|
|
1318
|
+
name: 'defaultColor',
|
|
1319
|
+
kind: 'Scalar'
|
|
1320
|
+
},
|
|
1321
|
+
{
|
|
1322
|
+
name: 'defaultIcon',
|
|
1323
|
+
kind: 'Scalar'
|
|
1324
|
+
},
|
|
1325
|
+
{
|
|
1326
|
+
name: 'fieldName',
|
|
1327
|
+
kind: 'Scalar'
|
|
1328
|
+
},
|
|
1329
|
+
{
|
|
1330
|
+
name: 'fieldType',
|
|
1331
|
+
kind: 'Scalar'
|
|
1332
|
+
},
|
|
1333
|
+
{
|
|
1334
|
+
name: 'id',
|
|
1335
|
+
kind: 'Scalar'
|
|
1336
|
+
},
|
|
1337
|
+
{
|
|
1338
|
+
name: 'objectName',
|
|
1339
|
+
kind: 'Scalar'
|
|
1340
|
+
},
|
|
1341
|
+
{
|
|
1342
|
+
name: 'recordType',
|
|
1343
|
+
kind: 'Scalar'
|
|
1344
|
+
},
|
|
1345
|
+
{
|
|
1346
|
+
name: 'referenceObjectName',
|
|
1347
|
+
kind: 'Scalar'
|
|
1348
|
+
}
|
|
1349
|
+
]
|
|
1350
|
+
};
|
|
1351
|
+
};
|
|
1352
|
+
function equals$1(existing, incoming) {
|
|
1353
|
+
const existing_defaultColor = existing.defaultColor;
|
|
1354
|
+
const incoming_defaultColor = incoming.defaultColor;
|
|
1355
|
+
if (!(existing_defaultColor === incoming_defaultColor)) {
|
|
1356
|
+
return false;
|
|
1357
|
+
}
|
|
1358
|
+
const existing_defaultIcon = existing.defaultIcon;
|
|
1359
|
+
const incoming_defaultIcon = incoming.defaultIcon;
|
|
1360
|
+
if (!(existing_defaultIcon === incoming_defaultIcon)) {
|
|
1361
|
+
return false;
|
|
1362
|
+
}
|
|
1363
|
+
const existing_fieldName = existing.fieldName;
|
|
1364
|
+
const incoming_fieldName = incoming.fieldName;
|
|
1365
|
+
if (!(existing_fieldName === incoming_fieldName)) {
|
|
1366
|
+
return false;
|
|
1367
|
+
}
|
|
1368
|
+
const existing_fieldType = existing.fieldType;
|
|
1369
|
+
const incoming_fieldType = incoming.fieldType;
|
|
1370
|
+
if (!(existing_fieldType === incoming_fieldType)) {
|
|
1371
|
+
return false;
|
|
1372
|
+
}
|
|
1373
|
+
const existing_id = existing.id;
|
|
1374
|
+
const incoming_id = incoming.id;
|
|
1375
|
+
if (!(existing_id === incoming_id)) {
|
|
1376
|
+
return false;
|
|
1377
|
+
}
|
|
1378
|
+
const existing_objectName = existing.objectName;
|
|
1379
|
+
const incoming_objectName = incoming.objectName;
|
|
1380
|
+
if (!(existing_objectName === incoming_objectName)) {
|
|
1381
|
+
return false;
|
|
1382
|
+
}
|
|
1383
|
+
const existing_recordType = existing.recordType;
|
|
1384
|
+
const incoming_recordType = incoming.recordType;
|
|
1385
|
+
if (!(existing_recordType === incoming_recordType)) {
|
|
1386
|
+
return false;
|
|
1387
|
+
}
|
|
1388
|
+
const existing_referenceObjectName = existing.referenceObjectName;
|
|
1389
|
+
const incoming_referenceObjectName = incoming.referenceObjectName;
|
|
1390
|
+
if (!(existing_referenceObjectName === incoming_referenceObjectName)) {
|
|
1391
|
+
return false;
|
|
1392
|
+
}
|
|
1393
|
+
return true;
|
|
1394
|
+
}
|
|
1395
|
+
const ingest$1 = function GisRelatedObjectConfigOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1396
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1397
|
+
const validateError = validate$1(input);
|
|
1398
|
+
if (validateError !== null) {
|
|
1399
|
+
throw validateError;
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
const key = keyBuilderFromType(luvio, input);
|
|
1403
|
+
const ttlToUse = TTL$1;
|
|
1404
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "gis", VERSION$1, RepresentationType$1, equals$1);
|
|
1405
|
+
return createLink(key);
|
|
1406
|
+
};
|
|
1407
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
1408
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1409
|
+
const rootKey = keyBuilderFromType(luvio, input);
|
|
1410
|
+
rootKeySet.set(rootKey, {
|
|
1411
|
+
namespace: keyPrefix,
|
|
1412
|
+
representationName: RepresentationType$1,
|
|
1413
|
+
mergeable: false
|
|
1414
|
+
});
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
const TTL = 300;
|
|
1418
|
+
const VERSION = "a58708a8e997c383af8c127b5e1e55b4";
|
|
1419
|
+
function validate(obj, path = 'GisRelatedObjectConfigCollectionRepresentation') {
|
|
1420
|
+
const v_error = (() => {
|
|
1421
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1422
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1423
|
+
}
|
|
1424
|
+
const obj_count = obj.count;
|
|
1425
|
+
const path_count = path + '.count';
|
|
1426
|
+
if (typeof obj_count !== 'number' || (typeof obj_count === 'number' && Math.floor(obj_count) !== obj_count)) {
|
|
1427
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_count + '" (at "' + path_count + '")');
|
|
1428
|
+
}
|
|
1429
|
+
const obj_gisRelatedObjectConfigOutputRepresentation = obj.gisRelatedObjectConfigOutputRepresentation;
|
|
1430
|
+
const path_gisRelatedObjectConfigOutputRepresentation = path + '.gisRelatedObjectConfigOutputRepresentation';
|
|
1431
|
+
if (!ArrayIsArray(obj_gisRelatedObjectConfigOutputRepresentation)) {
|
|
1432
|
+
return new TypeError('Expected "array" but received "' + typeof obj_gisRelatedObjectConfigOutputRepresentation + '" (at "' + path_gisRelatedObjectConfigOutputRepresentation + '")');
|
|
1433
|
+
}
|
|
1434
|
+
for (let i = 0; i < obj_gisRelatedObjectConfigOutputRepresentation.length; i++) {
|
|
1435
|
+
const obj_gisRelatedObjectConfigOutputRepresentation_item = obj_gisRelatedObjectConfigOutputRepresentation[i];
|
|
1436
|
+
const path_gisRelatedObjectConfigOutputRepresentation_item = path_gisRelatedObjectConfigOutputRepresentation + '[' + i + ']';
|
|
1437
|
+
if (typeof obj_gisRelatedObjectConfigOutputRepresentation_item !== 'object' || Array.isArray(obj_gisRelatedObjectConfigOutputRepresentation_item)) {
|
|
1438
|
+
return new TypeError('Expected "object" but received "' + typeof obj_gisRelatedObjectConfigOutputRepresentation_item + '" (at "' + path_gisRelatedObjectConfigOutputRepresentation_item + '")');
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
})();
|
|
1442
|
+
return v_error === undefined ? null : v_error;
|
|
1443
|
+
}
|
|
1444
|
+
const RepresentationType = 'GisRelatedObjectConfigCollectionRepresentation';
|
|
1445
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
1446
|
+
const input_gisRelatedObjectConfigOutputRepresentation = input.gisRelatedObjectConfigOutputRepresentation;
|
|
1447
|
+
const input_gisRelatedObjectConfigOutputRepresentation_id = path.fullPath + '__gisRelatedObjectConfigOutputRepresentation';
|
|
1448
|
+
for (let i = 0; i < input_gisRelatedObjectConfigOutputRepresentation.length; i++) {
|
|
1449
|
+
const input_gisRelatedObjectConfigOutputRepresentation_item = input_gisRelatedObjectConfigOutputRepresentation[i];
|
|
1450
|
+
let input_gisRelatedObjectConfigOutputRepresentation_item_id = input_gisRelatedObjectConfigOutputRepresentation_id + '__' + i;
|
|
1451
|
+
input_gisRelatedObjectConfigOutputRepresentation[i] = ingest$1(input_gisRelatedObjectConfigOutputRepresentation_item, {
|
|
1452
|
+
fullPath: input_gisRelatedObjectConfigOutputRepresentation_item_id,
|
|
1453
|
+
propertyName: i,
|
|
1454
|
+
parent: {
|
|
1455
|
+
data: input,
|
|
1456
|
+
key: path.fullPath,
|
|
1457
|
+
existing: existing,
|
|
1458
|
+
},
|
|
1459
|
+
ttl: path.ttl
|
|
1460
|
+
}, luvio, store, timestamp);
|
|
1461
|
+
}
|
|
1462
|
+
return input;
|
|
1463
|
+
}
|
|
1464
|
+
const select$1 = function GisRelatedObjectConfigCollectionRepresentationSelect() {
|
|
1465
|
+
return {
|
|
1466
|
+
kind: 'Fragment',
|
|
1467
|
+
version: VERSION,
|
|
1468
|
+
private: [],
|
|
1469
|
+
selections: [
|
|
1470
|
+
{
|
|
1471
|
+
name: 'count',
|
|
1472
|
+
kind: 'Scalar'
|
|
1473
|
+
},
|
|
1474
|
+
{
|
|
1475
|
+
name: 'gisRelatedObjectConfigOutputRepresentation',
|
|
1476
|
+
kind: 'Link',
|
|
1477
|
+
plural: true,
|
|
1478
|
+
fragment: select$2()
|
|
1479
|
+
}
|
|
1480
|
+
]
|
|
1481
|
+
};
|
|
1482
|
+
};
|
|
1483
|
+
function equals(existing, incoming) {
|
|
1484
|
+
const existing_count = existing.count;
|
|
1485
|
+
const incoming_count = incoming.count;
|
|
1486
|
+
if (!(existing_count === incoming_count)) {
|
|
1487
|
+
return false;
|
|
1488
|
+
}
|
|
1489
|
+
const existing_gisRelatedObjectConfigOutputRepresentation = existing.gisRelatedObjectConfigOutputRepresentation;
|
|
1490
|
+
const incoming_gisRelatedObjectConfigOutputRepresentation = incoming.gisRelatedObjectConfigOutputRepresentation;
|
|
1491
|
+
const equals_gisRelatedObjectConfigOutputRepresentation_items = equalsArray(existing_gisRelatedObjectConfigOutputRepresentation, incoming_gisRelatedObjectConfigOutputRepresentation, (existing_gisRelatedObjectConfigOutputRepresentation_item, incoming_gisRelatedObjectConfigOutputRepresentation_item) => {
|
|
1492
|
+
if (!(existing_gisRelatedObjectConfigOutputRepresentation_item.__ref === incoming_gisRelatedObjectConfigOutputRepresentation_item.__ref)) {
|
|
1493
|
+
return false;
|
|
1494
|
+
}
|
|
1495
|
+
});
|
|
1496
|
+
if (equals_gisRelatedObjectConfigOutputRepresentation_items === false) {
|
|
1497
|
+
return false;
|
|
1498
|
+
}
|
|
1499
|
+
return true;
|
|
1500
|
+
}
|
|
1501
|
+
const ingest = function GisRelatedObjectConfigCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1502
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1503
|
+
const validateError = validate(input);
|
|
1504
|
+
if (validateError !== null) {
|
|
1505
|
+
throw validateError;
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
const key = path.fullPath;
|
|
1509
|
+
const ttlToUse = TTL;
|
|
1510
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "gis", VERSION, RepresentationType, equals);
|
|
1511
|
+
return createLink(key);
|
|
1512
|
+
};
|
|
1513
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
1514
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1515
|
+
const rootKey = fullPathFactory();
|
|
1516
|
+
rootKeySet.set(rootKey, {
|
|
1517
|
+
namespace: keyPrefix,
|
|
1518
|
+
representationName: RepresentationType,
|
|
1519
|
+
mergeable: false
|
|
1520
|
+
});
|
|
1521
|
+
const input_gisRelatedObjectConfigOutputRepresentation_length = input.gisRelatedObjectConfigOutputRepresentation.length;
|
|
1522
|
+
for (let i = 0; i < input_gisRelatedObjectConfigOutputRepresentation_length; i++) {
|
|
1523
|
+
getTypeCacheKeys$1(rootKeySet, luvio, input.gisRelatedObjectConfigOutputRepresentation[i]);
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
|
|
1527
|
+
function select(luvio, params) {
|
|
1528
|
+
return select$1();
|
|
1529
|
+
}
|
|
1530
|
+
function keyBuilder$1(luvio, params) {
|
|
1531
|
+
return keyPrefix + '::GisRelatedObjectConfigCollectionRepresentation:(' + 'id:' + params.queryParams.id + ',' + 'objectName:' + params.queryParams.objectName + ')';
|
|
1532
|
+
}
|
|
1533
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
1534
|
+
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
1535
|
+
}
|
|
1536
|
+
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
1537
|
+
const { body } = response;
|
|
1538
|
+
const key = keyBuilder$1(luvio, resourceParams);
|
|
1539
|
+
luvio.storeIngest(key, ingest, body);
|
|
1540
|
+
const snapshot = luvio.storeLookup({
|
|
1541
|
+
recordId: key,
|
|
1542
|
+
node: select(),
|
|
1543
|
+
variables: {},
|
|
1544
|
+
}, snapshotRefresh);
|
|
1545
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1546
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1547
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
deepFreeze(snapshot.data);
|
|
1551
|
+
return snapshot;
|
|
1552
|
+
}
|
|
1553
|
+
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
1554
|
+
const key = keyBuilder$1(luvio, params);
|
|
1555
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1556
|
+
const storeMetadataParams = {
|
|
1557
|
+
ttl: TTL,
|
|
1558
|
+
namespace: keyPrefix,
|
|
1559
|
+
version: VERSION,
|
|
1560
|
+
representationName: RepresentationType
|
|
1561
|
+
};
|
|
1562
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1563
|
+
return errorSnapshot;
|
|
1564
|
+
}
|
|
1565
|
+
function createResourceRequest(config) {
|
|
1566
|
+
const headers = {};
|
|
1567
|
+
return {
|
|
1568
|
+
baseUri: '/services/data/v65.0',
|
|
1569
|
+
basePath: '/gis/config/GisRelatedObjectConfig',
|
|
1570
|
+
method: 'get',
|
|
1571
|
+
body: null,
|
|
1572
|
+
urlParams: {},
|
|
1573
|
+
queryParams: config.queryParams,
|
|
1574
|
+
headers,
|
|
1575
|
+
priority: 'normal',
|
|
1576
|
+
};
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1579
|
+
const adapterName = 'getGisRelatedObjectConfig';
|
|
1580
|
+
const getGisRelatedObjectConfig_ConfigPropertyMetadata = [
|
|
1581
|
+
generateParamConfigMetadata('id', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1582
|
+
generateParamConfigMetadata('objectName', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1583
|
+
];
|
|
1584
|
+
const getGisRelatedObjectConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getGisRelatedObjectConfig_ConfigPropertyMetadata);
|
|
1585
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$5(getGisRelatedObjectConfig_ConfigPropertyMetadata);
|
|
1586
|
+
function keyBuilder(luvio, config) {
|
|
1587
|
+
const resourceParams = createResourceParams(config);
|
|
1588
|
+
return keyBuilder$1(luvio, resourceParams);
|
|
1589
|
+
}
|
|
1590
|
+
function typeCheckConfig(untrustedConfig) {
|
|
1591
|
+
const config = {};
|
|
1592
|
+
typeCheckConfig$5(untrustedConfig, config, getGisRelatedObjectConfig_ConfigPropertyMetadata);
|
|
1593
|
+
return config;
|
|
1594
|
+
}
|
|
1595
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
1596
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1597
|
+
return null;
|
|
1598
|
+
}
|
|
1599
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1600
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1601
|
+
}
|
|
1602
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
1603
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1604
|
+
return null;
|
|
1605
|
+
}
|
|
1606
|
+
return config;
|
|
1607
|
+
}
|
|
1608
|
+
function adapterFragment(luvio, config) {
|
|
1609
|
+
createResourceParams(config);
|
|
1610
|
+
return select();
|
|
1611
|
+
}
|
|
1612
|
+
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
1613
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
1614
|
+
config,
|
|
1615
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1616
|
+
});
|
|
1617
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1618
|
+
}
|
|
1619
|
+
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
1620
|
+
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
1621
|
+
config,
|
|
1622
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1623
|
+
});
|
|
1624
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1625
|
+
}
|
|
1626
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
1627
|
+
const resourceParams = createResourceParams(config);
|
|
1628
|
+
const request = createResourceRequest(resourceParams);
|
|
1629
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1630
|
+
.then((response) => {
|
|
1631
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
1632
|
+
const cache = new StoreKeyMap();
|
|
1633
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
1634
|
+
return cache;
|
|
1635
|
+
});
|
|
1636
|
+
}, (response) => {
|
|
1637
|
+
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
1638
|
+
});
|
|
1639
|
+
}
|
|
1640
|
+
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
1641
|
+
return buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
1642
|
+
}
|
|
1643
|
+
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
1644
|
+
const { luvio, config } = context;
|
|
1645
|
+
const selector = {
|
|
1646
|
+
recordId: keyBuilder(luvio, config),
|
|
1647
|
+
node: adapterFragment(luvio, config),
|
|
1648
|
+
variables: {},
|
|
1649
|
+
};
|
|
1650
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1651
|
+
config,
|
|
1652
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1653
|
+
});
|
|
1654
|
+
return cacheSnapshot;
|
|
1655
|
+
}
|
|
1656
|
+
const getGisRelatedObjectConfigAdapterFactory = (luvio) => function gis__getGisRelatedObjectConfig(untrustedConfig, requestContext) {
|
|
1657
|
+
const config = validateAdapterConfig(untrustedConfig, getGisRelatedObjectConfig_ConfigPropertyNames);
|
|
1658
|
+
// Invalid or incomplete config
|
|
1659
|
+
if (config === null) {
|
|
1660
|
+
return null;
|
|
1661
|
+
}
|
|
1662
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1663
|
+
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
1664
|
+
};
|
|
1665
|
+
|
|
1666
|
+
let createGisExternalAuthIdentityProvider;
|
|
1667
|
+
let getGisExternalAuthAccessToken;
|
|
1668
|
+
let getGisExternalAuthIdentityProviders;
|
|
1669
|
+
let getGisExtlMapObjectConfig;
|
|
1670
|
+
let getGisRelatedObjectConfig;
|
|
1671
|
+
// Imperative GET Adapters
|
|
1672
|
+
let getGisExternalAuthAccessToken_imperative;
|
|
1673
|
+
let getGisExternalAuthIdentityProviders_imperative;
|
|
1674
|
+
let getGisExtlMapObjectConfig_imperative;
|
|
1675
|
+
let getGisRelatedObjectConfig_imperative;
|
|
1676
|
+
const getGisExternalAuthAccessTokenMetadata = {
|
|
1677
|
+
apiFamily: 'gis',
|
|
1678
|
+
name: 'getGisExternalAuthAccessToken',
|
|
1679
|
+
ttl: 300,
|
|
1680
|
+
};
|
|
1681
|
+
const getGisExternalAuthIdentityProvidersMetadata = {
|
|
1682
|
+
apiFamily: 'gis',
|
|
1683
|
+
name: 'getGisExternalAuthIdentityProviders',
|
|
1684
|
+
ttl: 300,
|
|
1685
|
+
};
|
|
1686
|
+
const getGisExtlMapObjectConfigMetadata = {
|
|
1687
|
+
apiFamily: 'gis',
|
|
1688
|
+
name: 'getGisExtlMapObjectConfig',
|
|
1689
|
+
ttl: 300,
|
|
1690
|
+
};
|
|
1691
|
+
const getGisRelatedObjectConfigMetadata = {
|
|
1692
|
+
apiFamily: 'gis',
|
|
1693
|
+
name: 'getGisRelatedObjectConfig',
|
|
609
1694
|
ttl: 300,
|
|
610
1695
|
};
|
|
611
1696
|
// Notify Update Available
|
|
612
1697
|
function bindExportsTo(luvio) {
|
|
613
1698
|
// LDS Adapters
|
|
1699
|
+
const getGisExternalAuthAccessToken_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getGisExternalAuthAccessToken', getGisExternalAuthAccessTokenAdapterFactory), getGisExternalAuthAccessTokenMetadata);
|
|
614
1700
|
const getGisExternalAuthIdentityProviders_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getGisExternalAuthIdentityProviders', getGisExternalAuthIdentityProvidersAdapterFactory), getGisExternalAuthIdentityProvidersMetadata);
|
|
1701
|
+
const getGisExtlMapObjectConfig_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getGisExtlMapObjectConfig', getGisExtlMapObjectConfigAdapterFactory), getGisExtlMapObjectConfigMetadata);
|
|
1702
|
+
const getGisRelatedObjectConfig_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getGisRelatedObjectConfig', getGisRelatedObjectConfigAdapterFactory), getGisRelatedObjectConfigMetadata);
|
|
615
1703
|
function unwrapSnapshotData(factory) {
|
|
616
1704
|
const adapter = factory(luvio);
|
|
617
1705
|
return (config) => adapter(config).then((snapshot) => snapshot.data);
|
|
618
1706
|
}
|
|
619
1707
|
return {
|
|
620
1708
|
createGisExternalAuthIdentityProvider: unwrapSnapshotData(createGisExternalAuthIdentityProviderAdapterFactory),
|
|
1709
|
+
getGisExternalAuthAccessToken: createWireAdapterConstructor(luvio, getGisExternalAuthAccessToken_ldsAdapter, getGisExternalAuthAccessTokenMetadata),
|
|
621
1710
|
getGisExternalAuthIdentityProviders: createWireAdapterConstructor(luvio, getGisExternalAuthIdentityProviders_ldsAdapter, getGisExternalAuthIdentityProvidersMetadata),
|
|
1711
|
+
getGisExtlMapObjectConfig: createWireAdapterConstructor(luvio, getGisExtlMapObjectConfig_ldsAdapter, getGisExtlMapObjectConfigMetadata),
|
|
1712
|
+
getGisRelatedObjectConfig: createWireAdapterConstructor(luvio, getGisRelatedObjectConfig_ldsAdapter, getGisRelatedObjectConfigMetadata),
|
|
622
1713
|
// Imperative GET Adapters
|
|
1714
|
+
getGisExternalAuthAccessToken_imperative: createImperativeAdapter(luvio, getGisExternalAuthAccessToken_ldsAdapter, getGisExternalAuthAccessTokenMetadata),
|
|
623
1715
|
getGisExternalAuthIdentityProviders_imperative: createImperativeAdapter(luvio, getGisExternalAuthIdentityProviders_ldsAdapter, getGisExternalAuthIdentityProvidersMetadata),
|
|
1716
|
+
getGisExtlMapObjectConfig_imperative: createImperativeAdapter(luvio, getGisExtlMapObjectConfig_ldsAdapter, getGisExtlMapObjectConfigMetadata),
|
|
1717
|
+
getGisRelatedObjectConfig_imperative: createImperativeAdapter(luvio, getGisRelatedObjectConfig_ldsAdapter, getGisRelatedObjectConfigMetadata),
|
|
624
1718
|
// Notify Update Availables
|
|
625
1719
|
};
|
|
626
1720
|
}
|
|
627
1721
|
withDefaultLuvio((luvio) => {
|
|
628
1722
|
({
|
|
629
1723
|
createGisExternalAuthIdentityProvider,
|
|
1724
|
+
getGisExternalAuthAccessToken,
|
|
630
1725
|
getGisExternalAuthIdentityProviders,
|
|
1726
|
+
getGisExtlMapObjectConfig,
|
|
1727
|
+
getGisRelatedObjectConfig,
|
|
1728
|
+
getGisExternalAuthAccessToken_imperative,
|
|
631
1729
|
getGisExternalAuthIdentityProviders_imperative,
|
|
1730
|
+
getGisExtlMapObjectConfig_imperative,
|
|
1731
|
+
getGisRelatedObjectConfig_imperative,
|
|
632
1732
|
} = bindExportsTo(luvio));
|
|
633
1733
|
});
|
|
634
1734
|
|
|
635
|
-
export { createGisExternalAuthIdentityProvider, getGisExternalAuthIdentityProviders, getGisExternalAuthIdentityProviders_imperative };
|
|
636
|
-
// version: 1.
|
|
1735
|
+
export { createGisExternalAuthIdentityProvider, getGisExternalAuthAccessToken, getGisExternalAuthAccessToken_imperative, getGisExternalAuthIdentityProviders, getGisExternalAuthIdentityProviders_imperative, getGisExtlMapObjectConfig, getGisExtlMapObjectConfig_imperative, getGisRelatedObjectConfig, getGisRelatedObjectConfig_imperative };
|
|
1736
|
+
// version: 1.372.0-59e8aa192f
|