@salesforce/lds-adapters-industries-serviceprocess 1.100.2

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/sfdc/index.js ADDED
@@ -0,0 +1,526 @@
1
+ /**
2
+ * Copyright (c) 2022, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+
7
+ /* *******************************************************************************************
8
+ * ATTENTION!
9
+ * THIS IS A GENERATED FILE FROM https://github.com/salesforce-experience-platform-emu/lds-lightning-platform
10
+ * If you would like to contribute to LDS, please follow the steps outlined in the git repo.
11
+ * Any changes made to this file in p4 will be automatically overwritten.
12
+ * *******************************************************************************************
13
+ */
14
+ /* proxy-compat-disable */
15
+ import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
16
+ import { withDefaultLuvio } from 'force/ldsEngine';
17
+ import { serializeStructuredKey, StoreKeyMap } from 'force/luvioEngine';
18
+
19
+ const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
20
+ const { keys: ObjectKeys$1, freeze: ObjectFreeze$1, create: ObjectCreate$1 } = Object;
21
+ const { isArray: ArrayIsArray$1 } = Array;
22
+ /**
23
+ * Validates an adapter config is well-formed.
24
+ * @param config The config to validate.
25
+ * @param adapter The adapter validation configuration.
26
+ * @param oneOf The keys the config must contain at least one of.
27
+ * @throws A TypeError if config doesn't satisfy the adapter's config validation.
28
+ */
29
+ function validateConfig(config, adapter, oneOf) {
30
+ const { displayName } = adapter;
31
+ const { required, optional, unsupported } = adapter.parameters;
32
+ if (config === undefined ||
33
+ required.every(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
34
+ throw new TypeError(`adapter ${displayName} configuration must specify ${required.sort().join(', ')}`);
35
+ }
36
+ if (oneOf && oneOf.some(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
37
+ throw new TypeError(`adapter ${displayName} configuration must specify one of ${oneOf.sort().join(', ')}`);
38
+ }
39
+ if (unsupported !== undefined &&
40
+ unsupported.some(req => ObjectPrototypeHasOwnProperty.call(config, req))) {
41
+ throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
42
+ }
43
+ const supported = required.concat(optional);
44
+ if (ObjectKeys$1(config).some(key => !supported.includes(key))) {
45
+ throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
46
+ }
47
+ }
48
+ function untrustedIsObject(untrusted) {
49
+ return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
50
+ }
51
+ function areRequiredParametersPresent(config, configPropertyNames) {
52
+ return configPropertyNames.parameters.required.every(req => req in config);
53
+ }
54
+ const snapshotRefreshOptions = {
55
+ overrides: {
56
+ headers: {
57
+ 'Cache-Control': 'no-cache',
58
+ },
59
+ }
60
+ };
61
+ const keyPrefix = 'serviceprocess';
62
+
63
+ const { freeze: ObjectFreeze, keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
64
+ const { isArray: ArrayIsArray } = Array;
65
+ const { stringify: JSONStringify } = JSON;
66
+ function createLink(ref) {
67
+ return {
68
+ __ref: serializeStructuredKey(ref),
69
+ };
70
+ }
71
+
72
+ function validate$4(obj, path = 'GenericObjectOutput') {
73
+ const v_error = (() => {
74
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
75
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
76
+ }
77
+ const obj_value = obj.value;
78
+ const path_value = path + '.value';
79
+ if (typeof obj_value !== 'object' || ArrayIsArray(obj_value) || obj_value === null) {
80
+ return new TypeError('Expected "object" but received "' + typeof obj_value + '" (at "' + path_value + '")');
81
+ }
82
+ })();
83
+ return v_error === undefined ? null : v_error;
84
+ }
85
+ function deepFreeze$4(input) {
86
+ const input_value = input.value;
87
+ ObjectFreeze(input_value);
88
+ ObjectFreeze(input);
89
+ }
90
+
91
+ function validate$3(obj, path = 'ServiceCatalogRequestDataRepresentation') {
92
+ const v_error = (() => {
93
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
94
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
95
+ }
96
+ const obj_data = obj.data;
97
+ const path_data = path + '.data';
98
+ if (typeof obj_data !== 'object' || ArrayIsArray(obj_data) || obj_data === null) {
99
+ return new TypeError('Expected "object" but received "' + typeof obj_data + '" (at "' + path_data + '")');
100
+ }
101
+ const obj_data_keys = ObjectKeys(obj_data);
102
+ for (let i = 0; i < obj_data_keys.length; i++) {
103
+ const key = obj_data_keys[i];
104
+ const obj_data_prop = obj_data[key];
105
+ const path_data_prop = path_data + '["' + key + '"]';
106
+ const referencepath_data_propValidationError = validate$4(obj_data_prop, path_data_prop);
107
+ if (referencepath_data_propValidationError !== null) {
108
+ let message = 'Object doesn\'t match GenericObjectOutput (at "' + path_data_prop + '")\n';
109
+ message += referencepath_data_propValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
110
+ return new TypeError(message);
111
+ }
112
+ }
113
+ })();
114
+ return v_error === undefined ? null : v_error;
115
+ }
116
+ function deepFreeze$3(input) {
117
+ const input_data = input.data;
118
+ const input_data_keys = Object.keys(input_data);
119
+ const input_data_length = input_data_keys.length;
120
+ for (let i = 0; i < input_data_length; i++) {
121
+ const key = input_data_keys[i];
122
+ const input_data_prop = input_data[key];
123
+ deepFreeze$4(input_data_prop);
124
+ }
125
+ ObjectFreeze(input_data);
126
+ ObjectFreeze(input);
127
+ }
128
+
129
+ function validate$2(obj, path = 'AttributeRepresentation') {
130
+ const v_error = (() => {
131
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
132
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
133
+ }
134
+ const obj_apiName = obj.apiName;
135
+ const path_apiName = path + '.apiName';
136
+ if (typeof obj_apiName !== 'string') {
137
+ return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
138
+ }
139
+ const obj_attributeId = obj.attributeId;
140
+ const path_attributeId = path + '.attributeId';
141
+ if (typeof obj_attributeId !== 'string') {
142
+ return new TypeError('Expected "string" but received "' + typeof obj_attributeId + '" (at "' + path_attributeId + '")');
143
+ }
144
+ const obj_attributeName = obj.attributeName;
145
+ const path_attributeName = path + '.attributeName';
146
+ if (typeof obj_attributeName !== 'string') {
147
+ return new TypeError('Expected "string" but received "' + typeof obj_attributeName + '" (at "' + path_attributeName + '")');
148
+ }
149
+ const obj_childAttributes = obj.childAttributes;
150
+ const path_childAttributes = path + '.childAttributes';
151
+ if (!ArrayIsArray(obj_childAttributes)) {
152
+ return new TypeError('Expected "array" but received "' + typeof obj_childAttributes + '" (at "' + path_childAttributes + '")');
153
+ }
154
+ for (let i = 0; i < obj_childAttributes.length; i++) {
155
+ const obj_childAttributes_item = obj_childAttributes[i];
156
+ const path_childAttributes_item = path_childAttributes + '[' + i + ']';
157
+ const referencepath_childAttributes_itemValidationError = validate$2(obj_childAttributes_item, path_childAttributes_item);
158
+ if (referencepath_childAttributes_itemValidationError !== null) {
159
+ let message = 'Object doesn\'t match AttributeRepresentation (at "' + path_childAttributes_item + '")\n';
160
+ message += referencepath_childAttributes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
161
+ return new TypeError(message);
162
+ }
163
+ }
164
+ const obj_dataType = obj.dataType;
165
+ const path_dataType = path + '.dataType';
166
+ if (typeof obj_dataType !== 'string') {
167
+ return new TypeError('Expected "string" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
168
+ }
169
+ const obj_sortOrder = obj.sortOrder;
170
+ const path_sortOrder = path + '.sortOrder';
171
+ if (typeof obj_sortOrder !== 'string') {
172
+ return new TypeError('Expected "string" but received "' + typeof obj_sortOrder + '" (at "' + path_sortOrder + '")');
173
+ }
174
+ })();
175
+ return v_error === undefined ? null : v_error;
176
+ }
177
+ function deepFreeze$2(input) {
178
+ const input_childAttributes = input.childAttributes;
179
+ for (let i = 0; i < input_childAttributes.length; i++) {
180
+ const input_childAttributes_item = input_childAttributes[i];
181
+ deepFreeze$2(input_childAttributes_item);
182
+ }
183
+ ObjectFreeze(input_childAttributes);
184
+ ObjectFreeze(input);
185
+ }
186
+
187
+ function validate$1(obj, path = 'SectionRepresentation') {
188
+ const v_error = (() => {
189
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
190
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
191
+ }
192
+ const obj_apiName = obj.apiName;
193
+ const path_apiName = path + '.apiName';
194
+ if (typeof obj_apiName !== 'string') {
195
+ return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
196
+ }
197
+ const obj_attributes = obj.attributes;
198
+ const path_attributes = path + '.attributes';
199
+ if (!ArrayIsArray(obj_attributes)) {
200
+ return new TypeError('Expected "array" but received "' + typeof obj_attributes + '" (at "' + path_attributes + '")');
201
+ }
202
+ for (let i = 0; i < obj_attributes.length; i++) {
203
+ const obj_attributes_item = obj_attributes[i];
204
+ const path_attributes_item = path_attributes + '[' + i + ']';
205
+ const referencepath_attributes_itemValidationError = validate$2(obj_attributes_item, path_attributes_item);
206
+ if (referencepath_attributes_itemValidationError !== null) {
207
+ let message = 'Object doesn\'t match AttributeRepresentation (at "' + path_attributes_item + '")\n';
208
+ message += referencepath_attributes_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
209
+ return new TypeError(message);
210
+ }
211
+ }
212
+ const obj_sectionId = obj.sectionId;
213
+ const path_sectionId = path + '.sectionId';
214
+ if (typeof obj_sectionId !== 'string') {
215
+ return new TypeError('Expected "string" but received "' + typeof obj_sectionId + '" (at "' + path_sectionId + '")');
216
+ }
217
+ const obj_sectionName = obj.sectionName;
218
+ const path_sectionName = path + '.sectionName';
219
+ if (typeof obj_sectionName !== 'string') {
220
+ return new TypeError('Expected "string" but received "' + typeof obj_sectionName + '" (at "' + path_sectionName + '")');
221
+ }
222
+ const obj_sectionOrder = obj.sectionOrder;
223
+ const path_sectionOrder = path + '.sectionOrder';
224
+ if (typeof obj_sectionOrder !== 'string') {
225
+ return new TypeError('Expected "string" but received "' + typeof obj_sectionOrder + '" (at "' + path_sectionOrder + '")');
226
+ }
227
+ })();
228
+ return v_error === undefined ? null : v_error;
229
+ }
230
+ function deepFreeze$1(input) {
231
+ const input_attributes = input.attributes;
232
+ for (let i = 0; i < input_attributes.length; i++) {
233
+ const input_attributes_item = input_attributes[i];
234
+ deepFreeze$2(input_attributes_item);
235
+ }
236
+ ObjectFreeze(input_attributes);
237
+ ObjectFreeze(input);
238
+ }
239
+
240
+ const TTL = 60000;
241
+ const VERSION = "07b60c128d5c52337e1ff98961cd73e6";
242
+ function validate(obj, path = 'ServiceProcessRequestLayoutDataRepresentation') {
243
+ const v_error = (() => {
244
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
245
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
246
+ }
247
+ const obj_data = obj.data;
248
+ const path_data = path + '.data';
249
+ const referencepath_dataValidationError = validate$3(obj_data, path_data);
250
+ if (referencepath_dataValidationError !== null) {
251
+ let message = 'Object doesn\'t match ServiceCatalogRequestDataRepresentation (at "' + path_data + '")\n';
252
+ message += referencepath_dataValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
253
+ return new TypeError(message);
254
+ }
255
+ const obj_sections = obj.sections;
256
+ const path_sections = path + '.sections';
257
+ if (!ArrayIsArray(obj_sections)) {
258
+ return new TypeError('Expected "array" but received "' + typeof obj_sections + '" (at "' + path_sections + '")');
259
+ }
260
+ for (let i = 0; i < obj_sections.length; i++) {
261
+ const obj_sections_item = obj_sections[i];
262
+ const path_sections_item = path_sections + '[' + i + ']';
263
+ const referencepath_sections_itemValidationError = validate$1(obj_sections_item, path_sections_item);
264
+ if (referencepath_sections_itemValidationError !== null) {
265
+ let message = 'Object doesn\'t match SectionRepresentation (at "' + path_sections_item + '")\n';
266
+ message += referencepath_sections_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
267
+ return new TypeError(message);
268
+ }
269
+ }
270
+ })();
271
+ return v_error === undefined ? null : v_error;
272
+ }
273
+ const RepresentationType = 'ServiceProcessRequestLayoutDataRepresentation';
274
+ function normalize(input, existing, path, luvio, store, timestamp) {
275
+ return input;
276
+ }
277
+ const select$1 = function ServiceProcessRequestLayoutDataRepresentationSelect() {
278
+ return {
279
+ kind: 'Fragment',
280
+ version: VERSION,
281
+ private: [],
282
+ opaque: true
283
+ };
284
+ };
285
+ function equals(existing, incoming) {
286
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
287
+ return false;
288
+ }
289
+ return true;
290
+ }
291
+ function deepFreeze(input) {
292
+ const input_data = input.data;
293
+ deepFreeze$3(input_data);
294
+ const input_sections = input.sections;
295
+ for (let i = 0; i < input_sections.length; i++) {
296
+ const input_sections_item = input_sections[i];
297
+ deepFreeze$1(input_sections_item);
298
+ }
299
+ ObjectFreeze(input_sections);
300
+ ObjectFreeze(input);
301
+ }
302
+ const ingest = function ServiceProcessRequestLayoutDataRepresentationIngest(input, path, luvio, store, timestamp) {
303
+ if (process.env.NODE_ENV !== 'production') {
304
+ const validateError = validate(input);
305
+ if (validateError !== null) {
306
+ throw validateError;
307
+ }
308
+ }
309
+ const key = path.fullPath;
310
+ const existingRecord = store.readEntry(key);
311
+ const ttlToUse = TTL;
312
+ let incomingRecord = normalize(input, store.readEntry(key), {
313
+ fullPath: key,
314
+ parent: path.parent,
315
+ propertyName: path.propertyName,
316
+ ttl: ttlToUse
317
+ });
318
+ deepFreeze(input);
319
+ if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
320
+ luvio.storePublish(key, incomingRecord);
321
+ }
322
+ {
323
+ const storeMetadataParams = {
324
+ ttl: ttlToUse,
325
+ namespace: "serviceprocess",
326
+ version: VERSION,
327
+ representationName: RepresentationType,
328
+ };
329
+ luvio.publishStoreMetadata(key, storeMetadataParams);
330
+ }
331
+ return createLink(key);
332
+ };
333
+ function getTypeCacheKeys(luvio, input, fullPathFactory) {
334
+ const rootKeySet = new StoreKeyMap();
335
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
336
+ const rootKey = fullPathFactory();
337
+ rootKeySet.set(rootKey, {
338
+ namespace: keyPrefix,
339
+ representationName: RepresentationType,
340
+ mergeable: false
341
+ });
342
+ return rootKeySet;
343
+ }
344
+
345
+ function select(luvio, params) {
346
+ return select$1();
347
+ }
348
+ function keyBuilder$1(luvio, params) {
349
+ return keyPrefix + '::ServiceProcessRequestLayoutDataRepresentation:(' + 'Id:' + params.urlParams.Id + ')';
350
+ }
351
+ function getResponseCacheKeys(luvio, resourceParams, response) {
352
+ return getTypeCacheKeys(luvio, response, () => keyBuilder$1(luvio, resourceParams));
353
+ }
354
+ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
355
+ const { body } = response;
356
+ const key = keyBuilder$1(luvio, resourceParams);
357
+ luvio.storeIngest(key, ingest, body);
358
+ const snapshot = luvio.storeLookup({
359
+ recordId: key,
360
+ node: select(),
361
+ variables: {},
362
+ }, snapshotRefresh);
363
+ if (process.env.NODE_ENV !== 'production') {
364
+ if (snapshot.state !== 'Fulfilled') {
365
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
366
+ }
367
+ }
368
+ return snapshot;
369
+ }
370
+ function ingestError(luvio, params, error, snapshotRefresh) {
371
+ const key = keyBuilder$1(luvio, params);
372
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
373
+ const storeMetadataParams = {
374
+ ttl: TTL,
375
+ namespace: keyPrefix,
376
+ version: VERSION,
377
+ representationName: RepresentationType
378
+ };
379
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
380
+ return errorSnapshot;
381
+ }
382
+ function createResourceRequest(config) {
383
+ const headers = {};
384
+ return {
385
+ baseUri: '/services/data/v58.0',
386
+ basePath: '/connect/service-excellence/service-catalog-request/layout-data/case/' + config.urlParams.Id + '',
387
+ method: 'get',
388
+ body: null,
389
+ urlParams: config.urlParams,
390
+ queryParams: {},
391
+ headers,
392
+ priority: 'normal',
393
+ };
394
+ }
395
+
396
+ const getCaseServiceProcessLayoutData_ConfigPropertyNames = {
397
+ displayName: 'getCaseServiceProcessLayoutData',
398
+ parameters: {
399
+ required: ['Id'],
400
+ optional: []
401
+ }
402
+ };
403
+ function createResourceParams(config) {
404
+ const resourceParams = {
405
+ urlParams: {
406
+ Id: config.Id
407
+ }
408
+ };
409
+ return resourceParams;
410
+ }
411
+ function keyBuilder(luvio, config) {
412
+ const resourceParams = createResourceParams(config);
413
+ return keyBuilder$1(luvio, resourceParams);
414
+ }
415
+ function typeCheckConfig(untrustedConfig) {
416
+ const config = {};
417
+ const untrustedConfig_Id = untrustedConfig.Id;
418
+ if (typeof untrustedConfig_Id === 'string') {
419
+ config.Id = untrustedConfig_Id;
420
+ }
421
+ return config;
422
+ }
423
+ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
424
+ if (!untrustedIsObject(untrustedConfig)) {
425
+ return null;
426
+ }
427
+ if (process.env.NODE_ENV !== 'production') {
428
+ validateConfig(untrustedConfig, configPropertyNames);
429
+ }
430
+ const config = typeCheckConfig(untrustedConfig);
431
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
432
+ return null;
433
+ }
434
+ return config;
435
+ }
436
+ function adapterFragment(luvio, config) {
437
+ createResourceParams(config);
438
+ return select();
439
+ }
440
+ function onFetchResponseSuccess(luvio, config, resourceParams, response) {
441
+ const snapshot = ingestSuccess(luvio, resourceParams, response, {
442
+ config,
443
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
444
+ });
445
+ return luvio.storeBroadcast().then(() => snapshot);
446
+ }
447
+ function onFetchResponseError(luvio, config, resourceParams, response) {
448
+ const snapshot = ingestError(luvio, resourceParams, response, {
449
+ config,
450
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
451
+ });
452
+ return luvio.storeBroadcast().then(() => snapshot);
453
+ }
454
+ function buildNetworkSnapshot(luvio, config, options) {
455
+ const resourceParams = createResourceParams(config);
456
+ const request = createResourceRequest(resourceParams);
457
+ return luvio.dispatchResourceRequest(request, options)
458
+ .then((response) => {
459
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => getResponseCacheKeys(luvio, resourceParams, response.body));
460
+ }, (response) => {
461
+ return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
462
+ });
463
+ }
464
+ function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
465
+ const { luvio, config } = context;
466
+ const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
467
+ const dispatchOptions = {
468
+ resourceRequestContext: {
469
+ requestCorrelator,
470
+ luvioRequestMethod: undefined,
471
+ },
472
+ eventObservers
473
+ };
474
+ if (networkPriority !== 'normal') {
475
+ dispatchOptions.overrides = {
476
+ priority: networkPriority
477
+ };
478
+ }
479
+ return buildNetworkSnapshot(luvio, config, dispatchOptions);
480
+ }
481
+ function buildCachedSnapshotCachePolicy(context, storeLookup) {
482
+ const { luvio, config } = context;
483
+ const selector = {
484
+ recordId: keyBuilder(luvio, config),
485
+ node: adapterFragment(luvio, config),
486
+ variables: {},
487
+ };
488
+ const cacheSnapshot = storeLookup(selector, {
489
+ config,
490
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
491
+ });
492
+ return cacheSnapshot;
493
+ }
494
+ const getCaseServiceProcessLayoutDataAdapterFactory = (luvio) => function serviceprocess__getCaseServiceProcessLayoutData(untrustedConfig, requestContext) {
495
+ const config = validateAdapterConfig(untrustedConfig, getCaseServiceProcessLayoutData_ConfigPropertyNames);
496
+ // Invalid or incomplete config
497
+ if (config === null) {
498
+ return null;
499
+ }
500
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
501
+ buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
502
+ };
503
+
504
+ let getCaseServiceProcessLayoutData;
505
+ // Imperative GET Adapters
506
+ let getCaseServiceProcessLayoutData_imperative;
507
+ // Adapter Metadata
508
+ const getCaseServiceProcessLayoutDataMetadata = { apiFamily: 'serviceprocess', name: 'getCaseServiceProcessLayoutData', ttl: 60000 };
509
+ function bindExportsTo(luvio) {
510
+ // LDS Adapters
511
+ const getCaseServiceProcessLayoutData_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getCaseServiceProcessLayoutData', getCaseServiceProcessLayoutDataAdapterFactory), getCaseServiceProcessLayoutDataMetadata);
512
+ return {
513
+ getCaseServiceProcessLayoutData: createWireAdapterConstructor(luvio, getCaseServiceProcessLayoutData_ldsAdapter, getCaseServiceProcessLayoutDataMetadata),
514
+ // Imperative GET Adapters
515
+ getCaseServiceProcessLayoutData_imperative: createImperativeAdapter(luvio, getCaseServiceProcessLayoutData_ldsAdapter, getCaseServiceProcessLayoutDataMetadata)
516
+ };
517
+ }
518
+ withDefaultLuvio((luvio) => {
519
+ ({
520
+ getCaseServiceProcessLayoutData,
521
+ getCaseServiceProcessLayoutData_imperative
522
+ } = bindExportsTo(luvio));
523
+ });
524
+
525
+ export { getCaseServiceProcessLayoutData, getCaseServiceProcessLayoutData_imperative };
526
+ // version: 1.100.2-ca56bb821
@@ -0,0 +1,115 @@
1
+ #%RAML 1.0
2
+ securedBy:
3
+ - OAuth2
4
+ title: Salesforce Connect API
5
+ version: '58.0'
6
+ mediaType: application/json
7
+ protocols:
8
+ - https
9
+ baseUri: /services/data/v58.0
10
+ securitySchemes:
11
+ OAuth2:
12
+ type: OAuth 2.0
13
+ settings:
14
+ authorizationUri: https://example.com/oauth/authorize
15
+ accessTokenUri: ''
16
+ authorizationGrants:
17
+ - implicit
18
+ annotationTypes:
19
+ oas-readOnly:
20
+ type: boolean
21
+ allowedTargets: TypeDeclaration
22
+ oas-collectionFormat:
23
+ type: string
24
+ oas-body-name:
25
+ type: string
26
+ allowedTargets: TypeDeclaration
27
+ types:
28
+ AttributeRepresentation:
29
+ description: Service process attribute representation
30
+ type: object
31
+ properties:
32
+ apiName:
33
+ description: svc catalog item attribute api name
34
+ type: string
35
+ attributeId:
36
+ description: svc catalog item attribute id
37
+ type: string
38
+ attributeName:
39
+ description: svc catalog item attribute name
40
+ type: string
41
+ childAttributes:
42
+ description: svc catalog item attribute's child attributes
43
+ type: array
44
+ items:
45
+ type: AttributeRepresentation
46
+ dataType:
47
+ description: svc catalog item attribute data type
48
+ type: string
49
+ sortOrder:
50
+ description: svc catalog item attribute order
51
+ type: string
52
+ GenericObjectOutput:
53
+ description: Generic attributes value object
54
+ type: object
55
+ properties:
56
+ value:
57
+ description: Value
58
+ type: object
59
+ SectionRepresentation:
60
+ description: Service process section representation
61
+ type: object
62
+ properties:
63
+ apiName:
64
+ description: svc catalog item section api name
65
+ type: string
66
+ attributes:
67
+ description: svc catalog item section attributes
68
+ type: array
69
+ items:
70
+ type: AttributeRepresentation
71
+ sectionId:
72
+ description: svc catalog item section id
73
+ type: string
74
+ sectionName:
75
+ description: svc catalog item section name
76
+ type: string
77
+ sectionOrder:
78
+ description: svc catalog item section order
79
+ type: string
80
+ ServiceCatalogRequestDataRepresentation:
81
+ description: Service catalog request data representation
82
+ type: object
83
+ properties:
84
+ data:
85
+ description: service catalog request data
86
+ type: object
87
+ properties:
88
+ //:
89
+ type: GenericObjectOutput
90
+ ServiceProcessRequestLayoutDataRepresentation:
91
+ description: Service process layout data output representation
92
+ type: object
93
+ properties:
94
+ data:
95
+ description: svc catalog request
96
+ type: ServiceCatalogRequestDataRepresentation
97
+ sections:
98
+ description: svc catalog item sections
99
+ type: array
100
+ items:
101
+ type: SectionRepresentation
102
+ /connect/service-excellence/service-catalog-request:
103
+ /layout-data/case/{Id}:
104
+ get:
105
+ description: get svc catalog request layout data
106
+ responses:
107
+ '200':
108
+ description: Success
109
+ body:
110
+ application/json:
111
+ type: ServiceProcessRequestLayoutDataRepresentation
112
+ uriParameters:
113
+ Id:
114
+ type: string
115
+ required: true
@@ -0,0 +1,18 @@
1
+ #%RAML 1.0 Overlay
2
+ extends: ./api.raml
3
+
4
+ uses:
5
+ luvio: luvio://annotations.raml
6
+
7
+ (luvio.keyPrefix): 'serviceprocess'
8
+ (luvio.ttl): 360000
9
+
10
+ types:
11
+ ServiceProcessRequestLayoutDataRepresentation:
12
+ (luvio.ttl): 60000
13
+ (luvio.opaque): true
14
+
15
+ /connect/service-excellence/service-catalog-request/layout-data/case/{Id}:
16
+ get:
17
+ (luvio.adapter):
18
+ name: getCaseServiceProcessLayoutData