@salesforce/lds-network-aura 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.
@@ -0,0 +1,2811 @@
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 { HttpStatusCode, isFormData } from 'force/luvioEngine';
16
+ import { executeGlobalControllerRawResponse } from 'aura';
17
+ import { registerCacheStats } from 'instrumentation/service';
18
+ import { createStorage } from 'force/ldsStorage';
19
+ import { getEnvironmentSetting, EnvironmentSettings } from 'force/ldsEnvironmentSettings';
20
+
21
+ const { create, entries: entries$1, keys: keys$1 } = Object;
22
+ const { parse: parse$1, stringify: stringify$1 } = JSON;
23
+
24
+ const BASE_URI = '/services/data/v58.0';
25
+ const CONNECT_BASE_URI = `${BASE_URI}/connect`;
26
+ const COMMERCE_BASE_URI = `${BASE_URI}/commerce`;
27
+ const GUIDANCE_BASE_URI = `${BASE_URI}/assistant-platform`;
28
+ const WAVE_BASE_URI = `${BASE_URI}/wave`;
29
+ const SMART_DATA_DISCOVERY_BASE_URI = `${BASE_URI}/smartdatadiscovery`;
30
+ const CMS_BASE_URI = `${CONNECT_BASE_URI}/cms`;
31
+ const CMS_NON_CONNECT_BASE_URI = `${BASE_URI}/cms`;
32
+ const SCALECENTER_BASE_URI = `${BASE_URI}/scalecenter`;
33
+ const INTERACTION_BASE_URI = `${CONNECT_BASE_URI}/interaction`;
34
+ const EXPLAINABILITY_BASE_URI = `${CONNECT_BASE_URI}/decision-explainer`;
35
+ const SITES_BASE_URI = `${BASE_URI}/sites`;
36
+ const CIB_BASE_URI = `${CONNECT_BASE_URI}/financialservices`;
37
+ const RCG_TENANTMANAGEMENT_BASE_URI = `${CONNECT_BASE_URI}/consumer-goods`;
38
+ const IDENTITY_VERIFICATION_BASE_URI = `${CONNECT_BASE_URI}/identity-verification`;
39
+ const PSS_SOCIAL_CARE_BASE_URI = `${CONNECT_BASE_URI}/careplan`;
40
+ const CLM_BASE_URI = `${CONNECT_BASE_URI}/clm`;
41
+ const LEARNING_CONTENT_PLATFORM_BASE_URI = `${BASE_URI}/learning-content-platform`;
42
+ const ASSETCREATION_BASE_URI = `${BASE_URI}/asset-creation`;
43
+ const HEALTH_CLOUD_BASE_URI = `${CONNECT_BASE_URI}/health`;
44
+ const SALES_ENABLEMENT_BASE_URI = `${CONNECT_BASE_URI}/enablement`;
45
+ const NAMED_CREDENTIAL_BASE_URI = `${BASE_URI}/named-credentials`;
46
+ const EXTERNAL_SERVICES_BASE_URI = `${BASE_URI}/externalservices`;
47
+ const E_SIGN_BASE_URI = `${CONNECT_BASE_URI}/e-sign`;
48
+ const CLAUSE_LIBRARY_BASE_URI = `${CONNECT_BASE_URI}/clause-library`;
49
+ const SERVICE_EXCELLENCE_BASE_URI = `${CONNECT_BASE_URI}/service-excellence`;
50
+ const EPC_BASE_URI = `${CONNECT_BASE_URI}/epc`;
51
+ const ERI_BASE_URI = `${CONNECT_BASE_URI}/eri`;
52
+ const EXPERIENCE_MODEL_BASE_URI = `${CONNECT_BASE_URI}/experience-model`;
53
+ const TABLEAU_EMBEDDING_BASE_URI = `${BASE_URI}/tableau`;
54
+ const SERVICE_AUTOMATION_SERVIRCE_CATALOG_BASE_URI = `${CONNECT_BASE_URI}/service-automation/service-catalog`;
55
+ const PEOPLE_API_BASE_URI = `${BASE_URI}/people`;
56
+ const SALES_EXCELLENCE_BASE_URI = `${CONNECT_BASE_URI}/sales-excellence`;
57
+ const ENABLEMENT_BASE_URI = `${CONNECT_BASE_URI}/enablement`;
58
+ const EXTERNAL_DOC_BASE_URI = `${CONNECT_BASE_URI}/external-document`;
59
+ const I18N_BASE_URI = `${CONNECT_BASE_URI}/i18n`;
60
+ const GROUP_BASE_URI = `${CONNECT_BASE_URI}/group`;
61
+ const SCHEDULER_BASE_URI = `${CONNECT_BASE_URI}/scheduling`;
62
+ const DATA_PROVIDER_BASE_URI = `${CONNECT_BASE_URI}/data-providers`;
63
+ const CPQ_BASE_URI = `${CONNECT_BASE_URI}/cpq`;
64
+ const LIGHTNING_CARDS_BASE_URI = `${CONNECT_BASE_URI}/lightning-cards`;
65
+
66
+ function getStatusText(status) {
67
+ switch (status) {
68
+ case HttpStatusCode.Ok:
69
+ return 'OK';
70
+ case HttpStatusCode.Created:
71
+ return 'Created';
72
+ case HttpStatusCode.NotModified:
73
+ return 'Not Modified';
74
+ case HttpStatusCode.BadRequest:
75
+ return 'Bad Request';
76
+ case HttpStatusCode.NotFound:
77
+ return 'Not Found';
78
+ case HttpStatusCode.ServerError:
79
+ return 'Server Error';
80
+ default:
81
+ return `Unexpected HTTP Status Code: ${status}`;
82
+ }
83
+ }
84
+ class AuraFetchResponse {
85
+ constructor(status, body, headers) {
86
+ this.status = status;
87
+ this.body = body;
88
+ this.headers = headers || {};
89
+ this.ok = status >= 200 && this.status <= 299;
90
+ this.statusText = getStatusText(status);
91
+ }
92
+ }
93
+
94
+ const router = create(null);
95
+ router.methods = {};
96
+ ['delete', 'get', 'patch', 'post', 'put'].forEach((method) => {
97
+ router[method] = function (predicate, handler) {
98
+ const routes = this.methods[method] || [];
99
+ routes.push({ predicate, handler });
100
+ this.methods[method] = routes;
101
+ };
102
+ });
103
+ router.lookup = function (resourceRequest) {
104
+ const { baseUri, basePath, method } = resourceRequest;
105
+ const path = `${baseUri}${basePath}`;
106
+ const routes = this.methods[method];
107
+ if (routes === undefined || routes.length === 0) {
108
+ return null;
109
+ }
110
+ const matchedRoute = routes.find((route) => route.predicate(path));
111
+ if (matchedRoute !== undefined) {
112
+ return matchedRoute.handler;
113
+ }
114
+ else {
115
+ return null;
116
+ }
117
+ };
118
+
119
+ const NO_OP = () => { };
120
+ // For use by callers within this module to instrument interesting things.
121
+ const instrumentation$1 = {
122
+ logCrud: NO_OP,
123
+ networkRequest: NO_OP,
124
+ networkResponse: NO_OP,
125
+ };
126
+ /**
127
+ * Allows external modules (typically a runtime environment) to set
128
+ * instrumentation hooks for this module. Note that the hooks are
129
+ * incremental - hooks not suppiled in newInstrumentation will retain
130
+ * their previous values. The default instrumentation hooks are no-ops.
131
+ *
132
+ * @param newInstrumentation instrumentation hooks to be overridden
133
+ */
134
+ function instrument$1(newInstrumentation) {
135
+ Object.assign(instrumentation$1, newInstrumentation);
136
+ }
137
+
138
+ /**
139
+ * Create a new instrumentation cache stats and return it.
140
+ *
141
+ * @param name The cache logger name.
142
+ */
143
+ const NAMESPACE = 'lds';
144
+ function registerLdsCacheStats(name) {
145
+ return registerCacheStats(`${NAMESPACE}:${name}`);
146
+ }
147
+ const defaultActionConfig = {
148
+ background: false,
149
+ hotspot: true,
150
+ longRunning: false,
151
+ };
152
+ function createOkResponse$1(body) {
153
+ return new AuraFetchResponse(HttpStatusCode.Ok, body);
154
+ }
155
+ /**
156
+ * Wraps the FetchFromNetwork function to provide instrumentation hooks
157
+ * for network requests and responses.
158
+ */
159
+ function instrumentFetchFromNetwork(fetchFromNetwork) {
160
+ return () => {
161
+ instrumentation$1.networkRequest();
162
+ return fetchFromNetwork()
163
+ .then((response) => {
164
+ instrumentation$1.networkResponse(() => response);
165
+ return response;
166
+ })
167
+ .catch((response) => {
168
+ instrumentation$1.networkResponse(() => response);
169
+ throw response;
170
+ });
171
+ };
172
+ }
173
+ /** Invoke an Aura controller with the pass parameters. */
174
+ function dispatchAction(endpoint, params, config = {}, instrumentationCallbacks = {}) {
175
+ const { action: actionConfig, cache: cacheConfig } = config;
176
+ const fetchFromNetwork = instrumentFetchFromNetwork(() => {
177
+ return executeGlobalControllerRawResponse(endpoint, params, actionConfig).then((body) => {
178
+ // Get the return value from the raw response
179
+ const returnValue = body.getReturnValue();
180
+ // If a cache is passed, store the action body in the cache before returning the
181
+ // value. Even though `AuraStorage.set` is an asynchronous operation we don't
182
+ // need to wait for the store to resolve/reject before returning the value.
183
+ // Swallow the error to not have an unhandled promise rejection.
184
+ if (cacheConfig !== undefined && cacheConfig.storage !== null) {
185
+ cacheConfig.storage.set(cacheConfig.key, returnValue).catch((_error) => { });
186
+ }
187
+ if (instrumentationCallbacks.resolveFn) {
188
+ instrumentationCallbacks.resolveFn({
189
+ body: returnValue,
190
+ params,
191
+ });
192
+ }
193
+ return createOkResponse$1(returnValue);
194
+ }, (error) => {
195
+ let err;
196
+ // TODO [W-12255544]: Expose errors to the consumers. Improve the error messagesnetwork
197
+ if (!error || !error.getError) {
198
+ err = new Error('Failed to get error from response');
199
+ }
200
+ else {
201
+ const actionErrors = error.getError();
202
+ if (actionErrors.length > 0) {
203
+ err = actionErrors[0];
204
+ }
205
+ else {
206
+ err = new Error('Error fetching component');
207
+ }
208
+ }
209
+ if (instrumentationCallbacks.rejectFn) {
210
+ instrumentationCallbacks.rejectFn({
211
+ err,
212
+ params,
213
+ });
214
+ }
215
+ // Handle ConnectInJava exception shapes
216
+ if (err.data !== undefined && err.data.statusCode !== undefined) {
217
+ const { data } = err;
218
+ throw new AuraFetchResponse(data.statusCode, data);
219
+ }
220
+ // Handle all the other kind of errors
221
+ throw new AuraFetchResponse(HttpStatusCode.ServerError, {
222
+ error: err.message,
223
+ });
224
+ });
225
+ });
226
+ // If no cache is passed or if the action should be refreshed, directly fetch the action from
227
+ // the server.
228
+ if (cacheConfig === undefined ||
229
+ cacheConfig.forceRefresh === true ||
230
+ cacheConfig.storage === null) {
231
+ return fetchFromNetwork();
232
+ }
233
+ // Otherwise check for the action body in the cache. If action is not present in the cache or if
234
+ // the cache lookup fails for any reason fallback to the network.
235
+ return cacheConfig.storage.get(cacheConfig.key).then((cacheResult) => {
236
+ if (cacheResult !== undefined) {
237
+ cacheConfig.statsLogger.logHits();
238
+ return createOkResponse$1(cacheResult);
239
+ }
240
+ cacheConfig.statsLogger.logMisses();
241
+ return fetchFromNetwork();
242
+ }, () => {
243
+ return fetchFromNetwork();
244
+ });
245
+ }
246
+ /**
247
+ * All the methods exposed out of the UiApiController accept a clientOption config. This method
248
+ * adds methods returns a new params object with the client option if necessary, otherwise it
249
+ * returns the passed params object.
250
+ */
251
+ function buildUiApiParams(params, resourceRequest) {
252
+ const fixedParams = fixParamsForAuraController(params);
253
+ const ifModifiedSince = resourceRequest.headers['If-Modified-Since'];
254
+ const ifUnmodifiedSince = resourceRequest.headers['If-Unmodified-Since'];
255
+ let clientOptions = {};
256
+ if (ifModifiedSince !== undefined) {
257
+ clientOptions.ifModifiedSince = ifModifiedSince;
258
+ }
259
+ if (ifUnmodifiedSince !== undefined) {
260
+ clientOptions.ifUnmodifiedSince = ifUnmodifiedSince;
261
+ }
262
+ return keys$1(clientOptions).length > 0
263
+ ? { ...fixedParams, clientOptions: clientOptions }
264
+ : fixedParams;
265
+ }
266
+ // parameters that need a "Param" suffix appended
267
+ const SUFFIXED_PARAMETERS = ['desc', 'page', 'sort'];
268
+ const SUFFIX = 'Param';
269
+ /**
270
+ * The connect generation code appends a "Param" suffix to certain parameter names when
271
+ * generating Aura controllers. This function accepts a set of UiApiParams and returns
272
+ * an equivalent UiApiParams suitable for passing to an Aura controller.
273
+ */
274
+ function fixParamsForAuraController(params) {
275
+ let updatedParams = params;
276
+ for (let i = 0; i < SUFFIXED_PARAMETERS.length; ++i) {
277
+ const param = SUFFIXED_PARAMETERS[i];
278
+ if (updatedParams[param] !== undefined) {
279
+ if (updatedParams === params) {
280
+ updatedParams = { ...params };
281
+ }
282
+ updatedParams[param + SUFFIX] = updatedParams[param];
283
+ delete updatedParams[param];
284
+ }
285
+ }
286
+ return updatedParams;
287
+ }
288
+ /** Returns true if an action should ignore the network cache data. */
289
+ function shouldForceRefresh(resourceRequest) {
290
+ const cacheControl = resourceRequest.headers['Cache-Control'];
291
+ return cacheControl !== undefined || cacheControl === 'no-cache';
292
+ }
293
+ function registerApiFamilyRoutes(apiFamily) {
294
+ apiFamily.forEach(({ method, predicate, transport }) => {
295
+ router[method](predicate, function (resourceRequest) {
296
+ const actionConfig = {
297
+ action: transport.action === undefined ? defaultActionConfig : transport.action,
298
+ };
299
+ const { urlParams, queryParams, body } = resourceRequest;
300
+ const params = {
301
+ ...body,
302
+ ...fixParamsForAuraController(urlParams),
303
+ ...fixParamsForAuraController(queryParams),
304
+ };
305
+ return dispatchAction(transport.controller, params, actionConfig, {});
306
+ });
307
+ });
308
+ }
309
+
310
+ function executeSoqlQueryPost(resourceRequest) {
311
+ const { body } = resourceRequest;
312
+ const params = buildUiApiParams({
313
+ query: body,
314
+ }, resourceRequest);
315
+ return dispatchAction('WaveController.executeSoqlQueryPost', params, undefined);
316
+ }
317
+ router.post((path) => path.startsWith(`${WAVE_BASE_URI}/soql`), executeSoqlQueryPost);
318
+
319
+ const LWR_APEX_BASE_URI = '/lwr/apex/v58.0';
320
+ const ApexController = 'ApexActionController.execute';
321
+ const CACHE_CONTROL = 'Cache-Control';
322
+ const X_SFDC_ALLOW_CONTINUATION = 'X-SFDC-Allow-Continuation';
323
+ function splitNamespaceClassname(classname) {
324
+ const split = classname.split('__');
325
+ return split.length > 1 ? [split[0], split[1]] : ['', split[0]];
326
+ }
327
+ function executePostApex(resourceRequest) {
328
+ const { urlParams, body, headers } = resourceRequest;
329
+ const [namespace, classname] = splitNamespaceClassname(urlParams.apexClass);
330
+ const params = {
331
+ namespace,
332
+ classname,
333
+ method: urlParams.apexMethod,
334
+ isContinuation: headers[X_SFDC_ALLOW_CONTINUATION] === 'true',
335
+ params: body,
336
+ cacheable: false,
337
+ };
338
+ return dispatchApexAction(ApexController, params, {
339
+ background: false,
340
+ hotspot: false,
341
+ longRunning: params.isContinuation,
342
+ });
343
+ }
344
+ function executeGetApex(resourceRequest) {
345
+ const { urlParams, queryParams, headers } = resourceRequest;
346
+ const [namespace, classname] = splitNamespaceClassname(urlParams.apexClass);
347
+ const params = {
348
+ namespace,
349
+ classname,
350
+ method: urlParams.apexMethod,
351
+ isContinuation: headers[X_SFDC_ALLOW_CONTINUATION] === 'true',
352
+ params: queryParams.methodParams,
353
+ cacheable: true,
354
+ };
355
+ return dispatchApexAction(ApexController, params, {
356
+ background: false,
357
+ hotspot: false,
358
+ longRunning: params.isContinuation,
359
+ });
360
+ }
361
+ function dispatchApexAction(endpoint, params, config) {
362
+ return executeGlobalControllerRawResponse(endpoint, params, config).then((body) => {
363
+ // Get return value from body
364
+ const returnValue = body.getReturnValue();
365
+ // massage aura action response to
366
+ // headers: { 'Cache-Control' }
367
+ // body: returnValue
368
+ return new AuraFetchResponse(HttpStatusCode.Ok, returnValue === undefined || returnValue.returnValue === undefined
369
+ ? null
370
+ : returnValue.returnValue, { [CACHE_CONTROL]: returnValue.cacheable === true ? 'private' : 'no-cache' });
371
+ }, (error) => {
372
+ let err;
373
+ // TODO [W-12255544]: Expose errors to the consumers. Improve the error messages
374
+ if (!error || !error.getError) {
375
+ err = new Error('Failed to get error from response');
376
+ }
377
+ else {
378
+ const actionErrors = error.getError();
379
+ if (actionErrors.length > 0) {
380
+ err = actionErrors[0];
381
+ }
382
+ else {
383
+ err = new Error('Error fetching component');
384
+ }
385
+ }
386
+ // Handle ConnectInJava exception shapes
387
+ if (err.data !== undefined && err.data.statusCode !== undefined) {
388
+ const { data } = err;
389
+ throw new AuraFetchResponse(data.statusCode, data);
390
+ }
391
+ // Handle all the other kind of errors
392
+ throw new AuraFetchResponse(HttpStatusCode.ServerError, err);
393
+ });
394
+ }
395
+ router.post((path) => path.startsWith(LWR_APEX_BASE_URI), executePostApex);
396
+ router.get((path) => path.startsWith(LWR_APEX_BASE_URI), executeGetApex);
397
+
398
+ const GENERIC_CONNECT_API_PATH = new RegExp(`${HEALTH_CLOUD_BASE_URI}/generic/[A-Z0-9_-]`, 'i');
399
+ const COMMUNITIES_MICROBATCHING_PATH = new RegExp(`${CONNECT_BASE_URI}/communities/([A-Z0-9]){15,18}/microbatching`, 'i');
400
+ const COMMUNITIES_NAVIGATION_MENU_PATH = new RegExp(`${CONNECT_BASE_URI}/communities/([A-Z0-9]){15,18}/navigation-menu`, 'i');
401
+ const GET_PRODUCT_PATH = new RegExp(`${COMMERCE_BASE_URI}/webstores/([A-Z0-9]){15,18}/products/([A-Z0-9]){15,18}`, 'i');
402
+ const GET_PRODUCT_CATEGORY_PATH_PATH = new RegExp(`${COMMERCE_BASE_URI}/webstores/([A-Z0-9]){15,18}/product-category-path/product-categories/([A-Z0-9]){15,18}`, 'i');
403
+ const PRODUCT_SEARCH_PATH = new RegExp(`${COMMERCE_BASE_URI}/webstores/([A-Z0-9]){15,18}/search/product-search`, 'i');
404
+ const GET_PRODUCT_PRICE_PATH = new RegExp(`${COMMERCE_BASE_URI}/webstores/([A-Z0-9]){15,18}/pricing/products/([A-Z0-9]){15,18}`, 'i');
405
+ const GET_GUIDANCE_ASSISTANT_PATH = new RegExp(`${GUIDANCE_BASE_URI}/([A-Z0-9_]){2,80}$`, 'i');
406
+ const GET_LEARNING_CONTENT_PLATFORM_RELATED_LIST_PATH = new RegExp(`${LEARNING_CONTENT_PLATFORM_BASE_URI}/featured-item/list/related$`, 'i');
407
+ const GET_LEARNING_CONTENT_PLATFORM_RECOMMENDED_LIST_PATH = new RegExp(`${LEARNING_CONTENT_PLATFORM_BASE_URI}/featured-item/list/recommended$`, 'i');
408
+ const GET_LEARNING_CONTENT_PLATFORM_SEARCH_DESCRIBE_PATH = new RegExp(`${LEARNING_CONTENT_PLATFORM_BASE_URI}/learning/search/describe$`, 'i');
409
+ const GET_LEARNING_CONTENT_PLATFORM_SEARCH_RESULTS_PATH = new RegExp(`${LEARNING_CONTENT_PLATFORM_BASE_URI}/learning/search/type/([A-Z0-9_]){2,80}$`, 'i');
410
+ const GET_LEARNING_CONFIG_PATH = new RegExp(`${LEARNING_CONTENT_PLATFORM_BASE_URI}/learning/config$`, 'i');
411
+ const GET_LEARNING_ITEM_LIST_PATH = new RegExp(`${LEARNING_CONTENT_PLATFORM_BASE_URI}/learning/item/list$`, 'i');
412
+ const GET_LEARNING_ITEM_PROGRESS_PATH = new RegExp(`${LEARNING_CONTENT_PLATFORM_BASE_URI}/learning/item/progress$`, 'i');
413
+ const EVALUATE_LEARNING_ITEMS_PATH = new RegExp(`${LEARNING_CONTENT_PLATFORM_BASE_URI}/learning/evaluate$`, 'i');
414
+ const GET_LEARNING_TEXT_LESSON_PATH = new RegExp(`${LEARNING_CONTENT_PLATFORM_BASE_URI}/learning/textlesson/([A-Z0-9_]){2,80}$`, 'i');
415
+ const GET_LEARNING_PRACTICE_PATH = new RegExp(`${LEARNING_CONTENT_PLATFORM_BASE_URI}/learning/practice/([A-Z0-9_]){2,80}$`, 'i');
416
+ const GET_LEARNING_MODEL_PATH = new RegExp(`${LEARNING_CONTENT_PLATFORM_BASE_URI}/learning/model/([A-Z0-9_]){2,80}$`, 'i');
417
+ const GET_MODULE_PATH = new RegExp(`${LEARNING_CONTENT_PLATFORM_BASE_URI}/learning/module/([A-Z0-9_]){2,80}$`, 'i');
418
+ const GET_GUIDANCE_ASSISTANT_TARGET_PATH = new RegExp(`${GUIDANCE_BASE_URI}/([A-Z0-9_]){2,80}/info$`, 'i');
419
+ const GET_GUIDANCE_ASSISTANT_LIST_PATH = new RegExp(`${GUIDANCE_BASE_URI}/([A-Z0-9_]){2,80}/list$`, 'i');
420
+ const GET_GUIDANCE_ASSISTANT_INFO_LIST_PATH = new RegExp(`${GUIDANCE_BASE_URI}/([A-Z0-9_]){2,80}/list/info$`, 'i');
421
+ const GET_GUIDANCE_QUESTIONNAIRE_PATH = new RegExp(`${GUIDANCE_BASE_URI}/questionnaire/([A-Z0-9_]){2,80}$`, 'i');
422
+ const GET_GUIDANCE_QUESTIONNAIRES_PATH = new RegExp(`${GUIDANCE_BASE_URI}/([A-Z0-9_]){2,80}/questionnaires$`, 'i');
423
+ const GET_GUIDANCE_STEP_PATH = new RegExp(`${GUIDANCE_BASE_URI}/step/([A-Z0-9_]){2,80}$`, 'i');
424
+ const GET_GUIDANCE_INITIALIZE_PATH = new RegExp(`${GUIDANCE_BASE_URI}/([A-Z0-9_]){2,80}/initialize$`, 'i');
425
+ const STORIES_PATH = new RegExp(`${SMART_DATA_DISCOVERY_BASE_URI}/stories$`, 'i');
426
+ const ANALYTICS_LIMITS_PATH = new RegExp(`${WAVE_BASE_URI}/limits$`, 'i');
427
+ const DATA_CONNECTORS_PATH = new RegExp(`${WAVE_BASE_URI}/dataconnectors$`, 'i');
428
+ const DATA_CONNECTOR_PATH = new RegExp(`${WAVE_BASE_URI}/dataconnectors/([A-Z0-9]){15,18}$`, 'i');
429
+ const DATA_CONNECTOR_SOURCE_OBJECTS_PATH = new RegExp(`${WAVE_BASE_URI}/dataconnectors/([A-Z0-9]){15,18}/sourceObjects$`, 'i');
430
+ const DATA_CONNECTOR_SOURCE_OBJECT_PATH = new RegExp(`${WAVE_BASE_URI}/dataconnectors/([A-Z0-9]){15,18}/sourceObjects/.{1,255}$`, 'i');
431
+ const DATA_CONNECTOR_SOURCE_OBJECT_PREVIEW_PATH = new RegExp(`${WAVE_BASE_URI}/dataconnectors/([A-Z0-9]){15,18}/sourceObjects/.{1,255}/dataPreview$`, 'i');
432
+ const DATA_CONNECTOR_SOURCE_FIELDS_PATH = new RegExp(`${WAVE_BASE_URI}/dataconnectors/([A-Z0-9]){15,18}/sourceObjects/.{1,255}/fields$`, 'i');
433
+ const INGEST_DATA_CONNECTOR_PATH = new RegExp(`${WAVE_BASE_URI}/dataconnectors/([A-Z0-9_]){15,18}/ingest$`, 'i');
434
+ const DATA_CONNECTOR_STATUS_PATH = new RegExp(`${WAVE_BASE_URI}/dataconnectors/([A-Z0-9_]){15,18}/status$`, 'i');
435
+ const DATA_CONNECTOR_TYPES_PATH = new RegExp(`${WAVE_BASE_URI}/dataConnectorTypes$`, 'i');
436
+ const DATAFLOWS_PATH = new RegExp(`${WAVE_BASE_URI}/dataflows$`, 'i');
437
+ const DATAFLOW_JOBS_PATH = new RegExp(`${WAVE_BASE_URI}/dataflowjobs$`, 'i');
438
+ const DATAFLOW_JOB_PATH = new RegExp(`${WAVE_BASE_URI}/dataflowjobs/([A-Z0-9]){15,18}$`, 'i');
439
+ const DATAFLOW_JOB_NODES_PATH = new RegExp(`${WAVE_BASE_URI}/dataflowjobs/([A-Z0-9]){15,18}/nodes$`, 'i');
440
+ const DATAFLOW_JOB_NODE_PATH = new RegExp(`${WAVE_BASE_URI}/dataflowjobs/([A-Z0-9]){15,18}/nodes/([A-Z0-9]){15,18}$`, 'i');
441
+ const EXECUTE_QUERY_PATH = new RegExp(`${WAVE_BASE_URI}/query`, 'i');
442
+ const EXECUTE_SOQL_QUERY_PATH = new RegExp(`${WAVE_BASE_URI}/soql`, 'i');
443
+ const GET_JWT_TABLEAU_EMBEDDING = new RegExp(`${TABLEAU_EMBEDDING_BASE_URI}/jwt`, 'i');
444
+ const GET_EAS_TABLEAU_EMBEDDING = new RegExp(`${TABLEAU_EMBEDDING_BASE_URI}/eas`, 'i');
445
+ const RECIPES_PATH = new RegExp(`${WAVE_BASE_URI}/recipes$`, 'i');
446
+ const RECIPE_PATH = new RegExp(`${WAVE_BASE_URI}/recipes/([A-Z0-9]){15,18}$`, 'i');
447
+ const ACTIONS_PATH = new RegExp(`${WAVE_BASE_URI}/actions/([A-Z0-9]){15,18}$`, 'i');
448
+ const RECIPE_NOTIFICATION_PATH = new RegExp(`${WAVE_BASE_URI}/recipes/([A-Z0-9]){15,18}/notification$`, 'i');
449
+ const REPLICATED_DATASETS_PATH = new RegExp(`${WAVE_BASE_URI}/replicatedDatasets$`, 'i');
450
+ const REPLICATED_DATASET_PATH = new RegExp(`${WAVE_BASE_URI}/replicatedDatasets/([A-Z0-9]){15,18}$`, 'i');
451
+ const REPLICATED_FIELDS_PATH = new RegExp(`${WAVE_BASE_URI}/replicatedDatasets/([A-Z0-9]){15,18}/fields$`, 'i');
452
+ const SCHEDULE_PATH = new RegExp(`${WAVE_BASE_URI}/asset/([A-Z0-9]){15,18}/schedule$`, 'i');
453
+ const DATASETS_PATH = new RegExp(`${WAVE_BASE_URI}/datasets$`, 'i');
454
+ const DATASET_PATH = new RegExp(`${WAVE_BASE_URI}/datasets/([A-Z0-9_]){1,80}$`, 'i');
455
+ const DATASET_VERSIONS_PATH = new RegExp(`${WAVE_BASE_URI}/datasets/([A-Z0-9_]){1,80}/versions$`, 'i');
456
+ const DATASET_VERSION_PATH = new RegExp(`${WAVE_BASE_URI}/datasets/([A-Z0-9_]){1,80}/versions/([A-Z0-9_]){15,18}$`, 'i');
457
+ const SECURITY_COVERAGE_DATASET_VERSION_PATH = new RegExp(`${WAVE_BASE_URI}/security/coverage/datasets/([A-Z0-9_]){1,80}/versions/([A-Z0-9_]){15,18}$`, 'i');
458
+ const XMD_PATH = new RegExp(`${WAVE_BASE_URI}/datasets/([A-Z0-9_]){1,80}/versions/([A-Z0-9_]){15,18}/xmds/[A-Z]+$`, 'i');
459
+ const DEPENDENCIES_PATH = new RegExp(`${WAVE_BASE_URI}/dependencies/([A-Z0-9]){15,18}$`, 'i');
460
+ const WAVE_FOLDERS_PATH = new RegExp(`${WAVE_BASE_URI}/folders$`, 'i');
461
+ const WAVE_TEMPLATES_PATH = new RegExp(`${WAVE_BASE_URI}/templates$`, 'i');
462
+ const WAVE_TEMPLATE_PATH = new RegExp(`${WAVE_BASE_URI}/templates/([A-Z0-9_]){1,80}$`, 'i');
463
+ const WAVE_TEMPLATE_CONFIG_PATH = new RegExp(`${WAVE_BASE_URI}/templates/([A-Z0-9_]){1,80}/configuration$`, 'i');
464
+ const WAVE_TEMPLATE_RELEASE_NOTES_PATH = new RegExp(`${WAVE_BASE_URI}/templates/([A-Z0-9_]){1,80}/releasenotes$`, 'i');
465
+ const GET_COLLECTION_ITEMS_PATH = new RegExp(`${CMS_BASE_URI}/collections/([A-Z0-9_]){1,28}$`, 'i');
466
+ const GET_MANAGED_CONTENT_VARIANT_VERSIONS_PATH = new RegExp(`${CMS_BASE_URI}/contents/variants/([A-Z0-9_]){1,80}/versions$`, 'i');
467
+ const GET_CONTENT_TYPE_INTERNAL_PATH = new RegExp(`${CMS_BASE_URI}/content-types/([A-Z0-9_]){1,80}$`, 'i');
468
+ const GET_MANAGED_CONTENT_VARIANT_PATH = new RegExp(`${CMS_BASE_URI}/contents/variants/([A-Z0-9_]){1,80}$`, 'i');
469
+ const GET_MANAGED_CONTENT_FOLDER_ITEMS_PATH = new RegExp(`${CMS_BASE_URI}/folders/([A-Z0-9]){15,18}/items$`, 'i');
470
+ const GET_MANAGED_CONTENT_REFERENCED_BY_PATH = new RegExp(`${CMS_BASE_URI}/contents/([A-Z0-9_]){1,28}/referenced-by$`, 'i');
471
+ const GET_MANAGED_CONTENT_VARIANT_REFERENCES_PATH = new RegExp(`${CMS_BASE_URI}/contents/([A-Z0-9_]){1,28}/variants/references$`, 'i');
472
+ const GET_MANAGED_CONTENT_VARIANT_RENDITION_PATH = new RegExp(`${CMS_BASE_URI}/contents/([A-Z0-9_]){1,28}/renditions/([-A-Za-z0-9_]){1,100}$`, 'i');
473
+ const GET_MANAGED_CONTENT_PATH = new RegExp(`${CMS_BASE_URI}/contents/([A-Z0-9_]){1,80}$`, 'i');
474
+ const REPLACE_MANAGED_CONTENT_VARIANT_PATH = GET_MANAGED_CONTENT_VARIANT_PATH;
475
+ const DELETE_MANAGED_CONTENT_VARIANT_PATH = GET_MANAGED_CONTENT_VARIANT_PATH;
476
+ const LIST_CONTENT_INTERNAL_PATH = new RegExp(`${CONNECT_BASE_URI}/communities/([A-Z0-9]){15,18}/managed-content/delivery/contents`, 'i');
477
+ const LIST_CONTENT_PATH = new RegExp(`${CONNECT_BASE_URI}/communities/([A-Z0-9]){15,18}/managed-content/delivery`, 'i');
478
+ const GET_COLLECTION_ITEMS_FOR_SITE = new RegExp(`${CONNECT_BASE_URI}/sites/([A-Z0-9]){15,18}/cms/delivery/collections/([A-Z0-9]){1,28}$`, 'i');
479
+ const GET_COLLECTION_METADATA_FOR_SITE = new RegExp(`${CONNECT_BASE_URI}/sites/([A-Z0-9]){15,18}/cms/delivery/collections/([A-Z0-9]){1,28}/metadata$`, 'i');
480
+ const GET_COLLECTION_ITEMS_FOR_CHANNEL = new RegExp(`${CONNECT_BASE_URI}/cms/delivery/channels/([A-Z0-9]){15,18}/collections/([A-Z0-9]){1,28}$`, 'i');
481
+ const GET_COLLECTION_METADATA_FOR_CHANNEL = new RegExp(`${CONNECT_BASE_URI}/cms/delivery/channels/([A-Z0-9]){15,18}/collections/([A-Z0-9]){1,28}/metadata$`, 'i');
482
+ const GET_CMS_SPACES = new RegExp(`${CMS_BASE_URI}/spaces`, 'i');
483
+ const CREATE_MANAGED_CONTENT_IMPORT_V2_JOB_PATH = new RegExp(`${CONNECT_BASE_URI}/cms/spaces/([A-Z0-9]){15,18}/contents/import`, 'i');
484
+ const CREATE_MANAGED_CONTENT_EXPORT_V2_JOB_PATH = new RegExp(`${CONNECT_BASE_URI}/cms/spaces/([A-Z0-9]){15,18}/contents/export`, 'i');
485
+ const CREATE_TRANSLATION_V2_JOB_PATH = new RegExp(`${CONNECT_BASE_URI}/cms/content/spaces/([A-Z0-9]){15,18}/translation`, 'i');
486
+ const GET_SEARCH_RESULTS = new RegExp(`${CONNECT_BASE_URI}/cms/items/search`, 'i');
487
+ const CREATE_DEPLOYMENT_PATH = new RegExp(`${CMS_NON_CONNECT_BASE_URI}/deployments`, 'i');
488
+ const UNPUBLISH_MANAGED_CONTENT_PATH = new RegExp(`${CMS_BASE_URI}/contents/unpublish`, 'i');
489
+ const PUBLISH_MANAGED_CONTENT_PATH = new RegExp(`${CMS_BASE_URI}/contents/publish`, 'i');
490
+ const CREATE_MANAGED_CONTENT_VARIANT_PATH = new RegExp(`${CMS_BASE_URI}/contents/variants`, 'i');
491
+ const CREATE_MANAGED_CONTENT_PATH = new RegExp(`${CMS_BASE_URI}/contents`, 'i');
492
+ const GET_BLOCK_TYPES_PATH = new RegExp(`${EXPERIENCE_MODEL_BASE_URI}/block-types$`, 'i');
493
+ const GET_BLOCK_TYPE_PATH = new RegExp(`${EXPERIENCE_MODEL_BASE_URI}/block-types/([-A-Za-z0-9_]){1,100}$`, 'i');
494
+ const GET_CONTENT_TYPES_PATH = new RegExp(`${EXPERIENCE_MODEL_BASE_URI}/content-types$`, 'i');
495
+ const GET_CONTENT_TYPE_PATH = new RegExp(`${EXPERIENCE_MODEL_BASE_URI}/content-types/([-A-Za-z0-9_]){1,100}$`, 'i');
496
+ const GET_PROPERTY_TYPES_PATH = new RegExp(`${EXPERIENCE_MODEL_BASE_URI}/property-types$`, 'i');
497
+ const GET_PROPERTY_TYPE_PATH = new RegExp(`${EXPERIENCE_MODEL_BASE_URI}/property-types/([-A-Za-z0-9_]){1,100}$`, 'i');
498
+ const RECORD_SEO_PROPERTIES_PATH = new RegExp(`${CONNECT_BASE_URI}/communities/([A-Z0-9]){15,18}/seo/properties/([^\\s]){1,128}`, 'i');
499
+ const GET_ORCHESTRATION_INSTANCE_COLLECTION_PATH = new RegExp(`${CONNECT_BASE_URI}/interaction/orchestration/instances$`, 'i');
500
+ const SITES_SEARCH_PATH = new RegExp(`${CONNECT_BASE_URI}/sites/([A-Z0-9]){15,18}/search`, 'i');
501
+ const INTERACTION_RUNTIME_RUN_FLOW_PATH = new RegExp(`^${INTERACTION_BASE_URI}/runtime/startFlow$`, 'i');
502
+ const INTERACTION_RUNTIME_NAVIGATE_FLOW_PATH = new RegExp(`^${INTERACTION_BASE_URI}/runtime/navigateFlow$`, 'i');
503
+ const INTERACTION_RUNTIME_RESUME_FLOW_PATH = new RegExp(`^${INTERACTION_BASE_URI}/runtime/resumeFlow$`, 'i');
504
+ const INTERACTION_FLOW_BUILDER_RULES_PATH = new RegExp(`^${INTERACTION_BASE_URI}/builder/rules`, 'i');
505
+ const REVENUE_UPDATE_PLACE_QUOTE_PATH = new RegExp(`${COMMERCE_BASE_URI}/quotes/actions/place`, 'i');
506
+ const POST_BATCH_PAYMENTS_SCHEDULERS_PATH = new RegExp(`${COMMERCE_BASE_URI}/payments/payment-schedulers`, 'i');
507
+ const POST_BATCH_INVOICES_SCHEDULERS_PATH = new RegExp(`${COMMERCE_BASE_URI}/invoicing/invoice-schedulers`, 'i');
508
+ const EXPLAINABILITY_ACTION_LOG_PATH = new RegExp(`${EXPLAINABILITY_BASE_URI}/action-logs$`, 'i');
509
+ const DECISION_MATRIX_COLUMNS_PATH = new RegExp(`${CONNECT_BASE_URI}/omnistudio/decision-matrices/([A-Z0-9]){1,18}/columns`, 'i');
510
+ const GET_EXPRESSION_SET_ALIAS_META_INFO_PATH = new RegExp(`${CONNECT_BASE_URI}/ruleengine/expression-set-alias-meta-info$`, 'i');
511
+ const BUSINESS_KNOWLEDGE_MODEL_PATH = new RegExp(`${CONNECT_BASE_URI}/businessknowledgemodel/[A-Z0-9]`, 'i');
512
+ const USAGE_TYPES_PATH = new RegExp(`${CONNECT_BASE_URI}/ruleengine/usage-types`, 'i');
513
+ const CREATE_OBJECT_ALIAS_PATH = new RegExp(`${CONNECT_BASE_URI}/ruleengine/object-alias`, 'i');
514
+ const ALIAS_FIELD_PATH = new RegExp(`${CONNECT_BASE_URI}/ruleengine/object-alias/([A-Z0-9]){1,18}`, 'i');
515
+ const PROCESS_TYPE_PATH = new RegExp(`${CONNECT_BASE_URI}/ruleengine/processType/[A-Z0-9]`, 'i');
516
+ const DECISION_MATRIX_ROWS_PATH = new RegExp(`${CONNECT_BASE_URI}/omnistudio/decision-matrices/([A-Z0-9]){1,18}/versions/([A-Z0-9]){1,18}/rows`, 'i');
517
+ const SERVICE_AUTOMATION_SERVIRCE_CATALOG_GET_COMMUNICATION_PATH = new RegExp(`${SERVICE_AUTOMATION_SERVIRCE_CATALOG_BASE_URI}/communication/([A-Z0-9]){15,18}$`, 'i');
518
+ const SERVICE_AUTOMATION_SERVIRCE_CATALOG_GET_COMMUNICATION_CHANNEL_PATH = new RegExp(`${SERVICE_AUTOMATION_SERVIRCE_CATALOG_BASE_URI}/communication/channels/([A-Z0-9]){15,18}$`, 'i');
519
+ const SERVICE_AUTOMATION_SERVIRCE_CATALOG_MARK_CHANNEL_AS_READ_PATH = new RegExp(`${SERVICE_AUTOMATION_SERVIRCE_CATALOG_BASE_URI}/communication/channels/([A-Z0-9]){15,18}/markAsRead$`, 'i');
520
+ const SERVICE_AUTOMATION_SERVIRCE_CATALOG_CHANNEL_THREAD_CREATE_MESSAGE_AS_READ_PATH = new RegExp(`${SERVICE_AUTOMATION_SERVIRCE_CATALOG_BASE_URI}/communication/channels/([A-Z0-9]){15,18}/threads/.+/messages$`, 'i');
521
+ const SCALE_CENTER_GET_METRICS_PATH = new RegExp(`${SCALECENTER_BASE_URI}/metrics/query`, 'i');
522
+ const GET_DECISION_MATRIC_DETAILS_PATH = new RegExp(`${CONNECT_BASE_URI}/omnistudio/decision-matrices/([A-Z0-9]){1,18}$`, 'i');
523
+ const GET_DECISION_TABLE_DETAILS_PATH = new RegExp(`${CONNECT_BASE_URI}/omnistudio/decision-tables/([A-Z0-9]){15,18}$`, 'i');
524
+ const GET_MESSAGE_TEMPLATE_DETAIL_PATH = new RegExp(`${CONNECT_BASE_URI}/business-rules/explainability/message-templates/([A-Z0-9]){15,18}$`, 'i');
525
+ const GET_CALC_PROC_VERSION_DETAILS_PATH = new RegExp(`${CONNECT_BASE_URI}/omnistudio/evaluation-services/version-definitions/([A-Z0-9]){1,18}$`, 'i');
526
+ const GET_CALC_PROC_DETAILS_PATH = new RegExp(`${CONNECT_BASE_URI}/omnistudio/evaluation-services/([A-Z0-9]){1,18}$`, 'i');
527
+ const POST_CALC_PROC_VERSION_DETAILS_PATH = new RegExp(`${CONNECT_BASE_URI}/omnistudio/evaluation-services/version-definitions$`, 'i');
528
+ const SEARCH_CALCULATION_PROCEDURES_DETAILS_PATH = new RegExp(`${CONNECT_BASE_URI}/omnistudio/evaluation-services$`, 'i');
529
+ const SIMULATION_EVALUATION_SERVICE_PATH = new RegExp(`${CONNECT_BASE_URI}/omnistudio/evaluation-services/version-definitions/([A-Z0-9]){1,18}/simulation$`, 'i');
530
+ const POST_INVOKE_EXPRESSION_SET_PATH = new RegExp(`${CONNECT_BASE_URI}/business-rules/expressionSet/(.+?)$`, 'i');
531
+ const SEARCH_DECISION_MATRICES_PATH = new RegExp(`${CONNECT_BASE_URI}/omnistudio/decision-matrices`, 'i');
532
+ const SEARCH_DECISION_TABLES_PATH = new RegExp(`${CONNECT_BASE_URI}/omnistudio/decision-tables`, 'i');
533
+ const SEARCH_MESSAGE_TEMPLATES_PATH = new RegExp(`${CONNECT_BASE_URI}/business-rules/explainability/message-templates`, 'i');
534
+ const GET_EXPLAINABILITY_LOGS_PATH = new RegExp(`${CONNECT_BASE_URI}/business-rules/explainability/logs`, 'i');
535
+ const GET_ACTION_PLAN_STATUS_INFO_PATH = new RegExp(`${CONNECT_BASE_URI}/action-plan/([A-Z0-9]){15,18}/status-info`, 'i');
536
+ const GET_ACTION_PLANS_PATH = new RegExp(`${CONNECT_BASE_URI}/action-plan$`, 'i');
537
+ const GET_ACTION_PLAN_ITEMS_PATH = new RegExp(`${CONNECT_BASE_URI}/action-plan/([A-Z0-9]){15,18}/action-plan-items$`, 'i');
538
+ const GET_CARE_PLAN_PATH = new RegExp(`${PSS_SOCIAL_CARE_BASE_URI}/care-plans/([A-Z0-9]{15,18})$`, 'i');
539
+ const GET_CARE_PLAN_TEMPLATE_DETAILS = new RegExp(`${PSS_SOCIAL_CARE_BASE_URI}/careplan-templates/([A-Z0-9]){15,18}$`, 'i');
540
+ const GET_CARE_PLAN_DEFINITION = new RegExp(`${PSS_SOCIAL_CARE_BASE_URI}/definitions/([A-Z0-9]{15,18})$`, 'i');
541
+ const POST_CARE_PLAN_TEMPLATE_DETAILS = new RegExp(`${PSS_SOCIAL_CARE_BASE_URI}/careplan-templates/([A-Z0-9]){15,18}/actions/([A-Z]){1,128}$`, 'i');
542
+ const POST_CARE_SERVICE_PLAN_DETAILS = new RegExp(`${PSS_SOCIAL_CARE_BASE_URI}/care-plans$`, 'i');
543
+ const UPDATE_CARE_PLAN_DETAILS = new RegExp(`${PSS_SOCIAL_CARE_BASE_URI}/care-plans/([A-Z0-9]{15,18})$`, 'i');
544
+ const GET_CARE_PLAN_BENEFIT_SESSION = new RegExp(`${PSS_SOCIAL_CARE_BASE_URI}/benefit-session-info/([A-Z0-9]{15,18})$`, 'i');
545
+ const GET_CARE_PLAN_TASK = new RegExp(`${PSS_SOCIAL_CARE_BASE_URI}/care-plans/([A-Z0-9]{15,18})/tasks$`, 'i');
546
+ const POST_CARE_PLAN_TASK = new RegExp(`${PSS_SOCIAL_CARE_BASE_URI}/care-plans/([A-Z0-9]{15,18})/tasks$`, 'i');
547
+ const UPDATE_CARE_PLAN_TASK = new RegExp(`${PSS_SOCIAL_CARE_BASE_URI}/care-plans/([A-Z0-9]{15,18})/tasks$`, 'i');
548
+ const CREATE_BENEFIT_DISBURSEMENTS = new RegExp(`${CONNECT_BASE_URI}/benefit-disbursements$`, 'i');
549
+ const MARKETING_INTEGRATION_GET_FORM_PATH = new RegExp(`${SITES_BASE_URI}/([A-Z0-9]){15,18}/marketing-integration/forms/([A-Z0-9]){15,18}$`, 'i');
550
+ const MARKETING_INTEGRATION_SUBMIT_FORM_PATH = new RegExp(`${SITES_BASE_URI}/([A-Z0-9]){15,18}/marketing-integration/forms/([A-Z0-9]){15,18}/data`, 'i');
551
+ const MARKETING_INTEGRATION_SAVE_FORM_PATH = new RegExp(`${SITES_BASE_URI}/([A-Z0-9]){15,18}/marketing-integration/forms$`, 'i');
552
+ const JOIN_CALL_PATH = new RegExp(`${CONNECT_BASE_URI}/industries/video-call/join-call`, 'i');
553
+ const LEAVE_CALL_PATH = new RegExp(`${CONNECT_BASE_URI}/industries/video-call/leave-call`, 'i');
554
+ const TRANSCRIPTION_CALL_PATH = new RegExp(`${CONNECT_BASE_URI}/industries/video-call/transcription`, 'i');
555
+ const VIDEO_PARTICIPANT_PATH = new RegExp(`${CONNECT_BASE_URI}/industries/video-call/participant`, 'i');
556
+ const VIDEO_CALL_PATH = new RegExp(`${CONNECT_BASE_URI}/industries/video-call`, 'i');
557
+ const HPI_SCORE_PATH = new RegExp(`${CONNECT_BASE_URI}/health/uhs/actions`, 'i');
558
+ const GET_PATIENT_LIST_SCORE = new RegExp(`${CONNECT_BASE_URI}/health/uhslist/[A-Z0-9_-]`, 'i');
559
+ const GET_PATIENT_SCORE_APEX_PATH = new RegExp(`${CONNECT_BASE_URI}/health/uhsscore/apexinterface/[A-Z0-9_-]`, 'i');
560
+ const GET_TAGS_BY_RECORD_PATH = new RegExp(`${CONNECT_BASE_URI}/interest-tags/assignments/entity/([A-Z0-9_]){1,80}$`, 'i');
561
+ const GET_RECORDS_BY_TAGID_PATH = new RegExp(`${CONNECT_BASE_URI}/interest-tags/assignments/tag/([A-Z0-9_]){1,80}$`, 'i');
562
+ const GET_TAGS_BY_CATEGORYID_PATH = new RegExp(`${CONNECT_BASE_URI}/interest-tags/tags$`, 'i');
563
+ const GET_CATEGORIES_BY_TAGID_PATH = new RegExp(`${CONNECT_BASE_URI}/interest-tags/categories$`, 'i');
564
+ const CREATE_INTEREST_TAG_ENTITY_ASSIGNMENT_PATH = new RegExp(`${CONNECT_BASE_URI}/interest-tags/assignments`, 'i');
565
+ const LOYALTY_PROGRAM_PROCESS_RULE_CREATION = new RegExp(`${CONNECT_BASE_URI}/loyalty/programs/([A-Z0-9_]){1,80}/processes/([A-Za-z0-9_%]){1,80}$`, 'i');
566
+ const LOYALTY_PROGRAM_PROCESS_RULE = new RegExp(`${CONNECT_BASE_URI}/loyalty/programs/([A-Z0-9_]){1,80}/processes/([A-Za-z0-9_%]){1,80}/rule/([A-Za-z0-9_%]){1,80}$`, 'i');
567
+ const LOYALTY_PROGRAM_EXECUTION = new RegExp(`${CONNECT_BASE_URI}/realtime/loyalty/programs/([A-Za-z%0-9_]){1,80}$`, 'i');
568
+ const LOYALTY_PROGRAM_EXPLAINABILITY = new RegExp(`${CONNECT_BASE_URI}/loyalty/program-process/transaction-journals/([A-Z0-9]){15,18}$`, 'i');
569
+ const CIB_GET_CONTACTS_INTERACTIONS_PATH = new RegExp(`${CIB_BASE_URI}/contacts-interactions$`, 'i');
570
+ const CIB_GET_INTERACTION_INSIGHTS_PATH = new RegExp(`${CIB_BASE_URI}/interaction-insights/([A-Z0-9]){15,18}$`, 'i');
571
+ const CIB_GET_DEAL_PARTIES_PATH = new RegExp(`${CIB_BASE_URI}/deal-parties/([A-Z0-9]){15,18}$`, 'i');
572
+ const TEARSHEET_GET_TEARSHEETS_PATH = new RegExp(`${CONNECT_BASE_URI}/financialservices/tearsheets/([A-Z0-9]){15,18}$`, 'i');
573
+ const SERVICEPROCESS_GET_CASE_SERVICE_PROCESS_PATH = new RegExp(`${CONNECT_BASE_URI}/service-excellence/service-catalog-request/layout-data/case/([A-Z0-9]){15,18}$`, 'i');
574
+ const ACTIONABLE_LIST_DEFINITION_URI_PATH = new RegExp(`${CONNECT_BASE_URI}/actionable-list-definition$`, 'i');
575
+ const ACTIONABLE_LIST_GET_ACTIONABLE_LIST_MEMBERS_PATH = new RegExp(`${CONNECT_BASE_URI}/actionable-list/([A-Z0-9]){15,18}/members$`, 'i');
576
+ const UPSERT_ACTIONABLE_LIST_URI_PATH = new RegExp(`${CONNECT_BASE_URI}/actionable-list$`, 'i');
577
+ const ACTIONABLE_LIST_DATASET_INFO_URI_PATH = new RegExp(`${CONNECT_BASE_URI}/actionable-list-definition/rows$`, 'i');
578
+ const CLM_CONTRACT_URI_PATH = new RegExp(`${CLM_BASE_URI}/contract/([A-Z0-9]){15,18}/contract-document-version$`, 'i');
579
+ const CLM_GET_DOCUMENT_URI_PATH = new RegExp(`${CLM_BASE_URI}/document-template$`, 'i');
580
+ const CLM_UPDATE_DOCUMENT_URI_PATH = new RegExp(`${CLM_BASE_URI}/contract-document-version/([A-Z0-9]){1,18}$`, 'i');
581
+ const CLM_CONTRACT_CHECKIN_URI_PATH = new RegExp(`${CLM_BASE_URI}/contract-document-version/([A-Z0-9]){1,18}/checkIn$`, 'i');
582
+ const CLM_CONTRACT_UNLOCK_URI_PATH = new RegExp(`${CLM_BASE_URI}/contract-document-version/([A-Z0-9]){1,18}/unlock$`, 'i');
583
+ const CLM_CONTRACT_LOCK_URI_PATH = new RegExp(`${CLM_BASE_URI}/contract-document-version/([A-Z0-9]){1,18}/lock$`, 'i');
584
+ const CLM_CONTRACT_CHECKOUT_URI_PATH = new RegExp(`${CLM_BASE_URI}/contract-document-version/([A-Z0-9]){1,18}/checkout$`, 'i');
585
+ const CLM_CONTENT_DOCUMENTS = new RegExp(`${CLM_BASE_URI}/contract-document-version/([A-Z0-9]){1,18}/content-documents$`, 'i');
586
+ const CLM_GET_DOCUMENT_GENERATION_PROCESS_PATH = new RegExp(`${CLM_BASE_URI}/document-generation-process/status$`, 'i');
587
+ const CLM_GET_CONTRACT_ACTIONS_PATH = new RegExp(`${CLM_BASE_URI}/contract/([A-Z0-9]){1,18}/contract-actions$`, 'i');
588
+ const CLM_CONTRACT_EXECUTE_ACTION_URI_PATH = new RegExp(`${CLM_BASE_URI}/contract/([A-Z0-9]){1,18}$`, 'i');
589
+ const SAVE_EXTERNAL_DOCUMENT_URI_PATH = new RegExp(`${CLM_BASE_URI}/external-document-resource$`, 'i');
590
+ const UPLOAD_REFERENCE_DATA_PATH = new RegExp(`${CONNECT_BASE_URI}/sustainability/reference-data/([A-Z]){2,40}/upload$`, 'i');
591
+ const FETCH_ENTITY_VERSION_PATH = new RegExp(`${CONNECT_BASE_URI}/sustainability/reference-data/v2/entitySection/([A-Za-z]){2,40}/dataSource/([A-Za-z]){2,80}/version$`, 'i');
592
+ const UPLOAD_ENTITY_VERSION_PATH = new RegExp(`${CONNECT_BASE_URI}/sustainability/reference-data/v2/entityVersion/upload$`, 'i');
593
+ const BEI_PATH = new RegExp(`${CONNECT_BASE_URI}/sustainability/bei/recalculate/([A-Z0-9]){1,18}$`, 'i');
594
+ const RCG_TPM_MANAGEMENT_PATH = new RegExp(`${RCG_TENANTMANAGEMENT_BASE_URI}/tenant-registration$`, 'i');
595
+ const RECALCULATE_PATH = new RegExp(`${CONNECT_BASE_URI}/sustainability/footprint-calculation/recalculate`, 'i');
596
+ const LOCK_RECORD_PATH = new RegExp(`${CONNECT_BASE_URI}/sustainability/record-locking/lock/([A-Z0-9]){1,18}$`, 'i');
597
+ const UNLOCK_RECORD_PATH = new RegExp(`${CONNECT_BASE_URI}/sustainability/record-locking/unlock/([A-Z0-9]){1,18}$`, 'i');
598
+ const IDENTIFY_VERIFICATION_BUILD_CONTEXT_PATH = new RegExp(`${IDENTITY_VERIFICATION_BASE_URI}/build-context/([A-Za-z0-9])+`, 'i');
599
+ const DGF_DATE_ISSUE_PATH = new RegExp(`${CONNECT_BASE_URI}/sustainability/dgf/identify-date-issues`, 'i');
600
+ const DGF_DATAGAP_PATH = new RegExp(`${CONNECT_BASE_URI}/sustainability/dgf/compute-datagap-fillers`, 'i');
601
+ const IDENTIFY_VERIFICATION_SEARCH_PATH = new RegExp(`${IDENTITY_VERIFICATION_BASE_URI}/search`, 'i');
602
+ const IDENTIFY_VERIFICATION_VERIFY_RECORD_PATH = new RegExp(`${IDENTITY_VERIFICATION_BASE_URI}/verification`, 'i');
603
+ const FORM_BASED_VERIFICATION_VERIFY_RECORD_PATH = new RegExp(`${IDENTITY_VERIFICATION_BASE_URI}/input-verification`, 'i');
604
+ const SALES_EXCELLENCE_ACTIONABLE_LIST_MEMBER_SEARCH = new RegExp(`${SALES_EXCELLENCE_BASE_URI}/actionable-list-members`, 'i');
605
+ const SALES_EXCELLENCE_ACTIONABLE_LIST_MEMBER_SEARCH_BY_ID = new RegExp(`${SALES_EXCELLENCE_BASE_URI}/actionable-list-members/([A-Za-z0-9_]){1,255}`, 'i');
606
+ const SALES_EXCELLENCE_ASSIGN_ACTIONABLE_LIST = new RegExp(`${SALES_EXCELLENCE_BASE_URI}/actionable-list/assignment/([A-Za-z0-9_]){1,255}`, 'i');
607
+ const SALES_EXCELLENCE_ASSIGNED_ACTIONABLE_LISTS = new RegExp(`${SALES_EXCELLENCE_BASE_URI}/actionable-lists$`, 'i');
608
+ const SALES_EXCELLENCE_GET_ACTIONABLE_LIST_METADATA = new RegExp(`${SALES_EXCELLENCE_BASE_URI}/actionable-lists/metadata/([A-Za-z0-9_]){1,255}$`, 'i');
609
+ const TIMELINE_PATH = new RegExp(`${CONNECT_BASE_URI}/timeline/([A-Z0-9]){15,18}/timeline-definitions/([A-Za-z0-9_]){1,255}/events`, 'i');
610
+ const TIMELINE_METADATA_PATH = new RegExp(`${CONNECT_BASE_URI}/timeline/metadata/configurations`, 'i');
611
+ const CRITERIABASEDSEARCHFILTER_CONFIGURATIONS_PATH = new RegExp(`${CONNECT_BASE_URI}/criteria-based-search/configurations`, 'i');
612
+ const CRITERIABASEDSEARCHFILTER_SEARCH_OBJECT_PATH = new RegExp(`${CONNECT_BASE_URI}/criteria-based-search/searchable-object/results`, 'i');
613
+ const AI_ACCELERATOR_PREDICTIONS = new RegExp(`${CONNECT_BASE_URI}/aiaccelerator/predictions`, 'i');
614
+ const AI_ACCELERATOR_RECOMMENDATIONS = new RegExp(`${CONNECT_BASE_URI}/aiaccelerator/recommendations`, 'i');
615
+ const GET_STARTER_TEMPLATE_BYID_PATH = new RegExp(`${ASSETCREATION_BASE_URI}/starter-templates/([A-Z0-9]){1,18}$`, 'i');
616
+ const GET_STARTER_TEMPLATES_PATH = new RegExp(`${ASSETCREATION_BASE_URI}/starter-templates$`, 'i');
617
+ const POST_ASSET_OBJECT_PATH = new RegExp(`${ASSETCREATION_BASE_URI}/objects`, 'i');
618
+ const MANAGED_CONTENT_ORCHESTRATION_DEFINITIONS_PATH = new RegExp(`${CMS_BASE_URI}/contents/orchestration-definitions$`, 'i');
619
+ const MANAGED_CONTENT_ORCHESTRATION_INSTANCES_PATH = new RegExp(`${CMS_BASE_URI}/contents/orchestration-instances$`, 'i');
620
+ const MANAGED_CONTENT_CHANNEL_MANAGEMENT_PATH = new RegExp(`${CMS_BASE_URI}/management/channels$`, 'i');
621
+ const MANAGED_CONTENT_CHANNEL_MANAGEMENT_RECORD_PATH = new RegExp(`${CMS_BASE_URI}/management/channels/([A-Z0-9]){15,18}$`, 'i');
622
+ const MANAGED_CONTENT_RUNNING_ORCHESTRATION_HISTORY_PATH = new RegExp(`${CMS_BASE_URI}/contents/orchestration-history-events`, 'i');
623
+ const GET_SLOTS_PATH = new RegExp(`${HEALTH_CLOUD_BASE_URI}/advanced-therapy-management/get-slots`, 'i');
624
+ const CANCEL_SLOT_CHAIN_PATH = new RegExp(`${HEALTH_CLOUD_BASE_URI}/advanced-therapy-management/cancel-slot-chain`, 'i');
625
+ const BOOK_SLOTS_PATH = new RegExp(`${HEALTH_CLOUD_BASE_URI}/advanced-therapy-management/book-slot-chain`, 'i');
626
+ const RESCHEDULE_SLOT_CHAIN_PATH = new RegExp(`${HEALTH_CLOUD_BASE_URI}/advanced-therapy-management/reschedule-slot-chain`, 'i');
627
+ const FETCH_SERVICE_TERRITORY_PATH = new RegExp(`${HEALTH_CLOUD_BASE_URI}/advanced-therapy-management/fetch-service-territories`, 'i');
628
+ const MOVE_TO_NEXT_STEP_PATH = new RegExp(`${HEALTH_CLOUD_BASE_URI}/advanced-therapy-management/move-to-next-step`, 'i');
629
+ const GET_SALES_ENABLEMENT_PROGRAM_TEMPLATE_PATH = new RegExp(`${SALES_ENABLEMENT_BASE_URI}/programTemplate/([A-Za-z0-9_]){1,100}$`, 'i');
630
+ const GET_SALES_ENABLEMENT_PROGRAM_TEMPLATES_PATH = new RegExp(`${SALES_ENABLEMENT_BASE_URI}/programTemplate`, 'i');
631
+ const DELETE_SALES_USER_WORKING_HOURS_PATH = new RegExp(`${BASE_URI}/sales/working-hours/time-slots/([A-Za-z0-9_]){1,100}$`, 'i');
632
+ const GET_SALES_USER_WORKING_HOURS_PATH = new RegExp(`${BASE_URI}/sales/working-hours/time-slots`, 'i');
633
+ const PATCH_SALES_USER_WORKING_HOURS_PATH = new RegExp(`${BASE_URI}/sales/working-hours/time-slots`, 'i');
634
+ const POST_SALES_USER_WORKING_HOURS_PATH = new RegExp(`${BASE_URI}/sales/working-hours/time-slots`, 'i');
635
+ const CREDENTIAL_PATH = new RegExp(`${NAMED_CREDENTIAL_BASE_URI}/credential$`, 'i');
636
+ const OAUTH_CREDENTIAL_AUTH_URL_PATH = new RegExp(`${NAMED_CREDENTIAL_BASE_URI}/credential/auth-url/o-auth$`, 'i');
637
+ const EXTERNAL_CREDENTIAL_PATH = new RegExp(`${NAMED_CREDENTIAL_BASE_URI}/external-credentials$`, 'i');
638
+ const EXTERNAL_SERVICES_DATA_SHAPE_PATH = new RegExp(`${EXTERNAL_SERVICES_BASE_URI}/inference/datashape/([A-Za-z0-9]){1,15}$`, 'i');
639
+ const EXTERNAL_SERVICES_OPENAPI_SPEC_PATH = new RegExp(`${EXTERNAL_SERVICES_BASE_URI}/inference/openapispec/([A-Za-z0-9_]){1,15}$`, 'i');
640
+ const EXTERNAL_SERVICES_STATISTICS_PATH = new RegExp(`${EXTERNAL_SERVICES_BASE_URI}/statistics/services$`, 'i');
641
+ // upper limit for registrationName is 97 = 15 (namespace prefix) + 2 ("__" separator) + 80 (external service developer name)
642
+ const EXTERNAL_SERVICES_STATISTICS_FOR_SERVICE_PATH = new RegExp(`${EXTERNAL_SERVICES_BASE_URI}/statistics/services/([A-Z0-9_]){1,97}$`, 'i');
643
+ const EXTERNAL_SERVICES_VALIDATE_SCHEMA_PATH = new RegExp(`${EXTERNAL_SERVICES_BASE_URI}/schemas/([A-Z0-9_]){1,97}/validation`, 'i');
644
+ const GET_COMMUNITY_INFO_PATH = new RegExp(`${CONNECT_BASE_URI}/communities/([A-Z0-9]){15,18}`, 'i');
645
+ const GET_SIGNER_ROLES = new RegExp(`${E_SIGN_BASE_URI}/signer-roles`, 'i');
646
+ const SEND_DOCUMENT_ENVELOPE_FOR_ESIGN = new RegExp(`${E_SIGN_BASE_URI}/signature-requests/([A-Z0-9]){15,18}/envelope/send`, 'i');
647
+ const GET_NOTIFICATION_SETTING = new RegExp(`${E_SIGN_BASE_URI}/notification-settings`, 'i');
648
+ const GET_RECIPIENT = new RegExp(`${E_SIGN_BASE_URI}/recipients`, 'i');
649
+ const GET_DOCUMENTS = new RegExp(`${E_SIGN_BASE_URI}/documents`, 'i');
650
+ const UPDATE_DOCUMENT_ENVELOPE_FOR_ESIGN = new RegExp(`${E_SIGN_BASE_URI}/signature-requests/([A-Z0-9]){15,18}/envelopes/void`, 'i');
651
+ const UPDATE_ENVELOPE_STATUS = new RegExp(`${E_SIGN_BASE_URI}/signature-requests/([A-Z0-9]){15,18}/envelopes/status`, 'i');
652
+ // Clause Library Routes
653
+ const GET_CLAUSE_CATEGORY_CONFIGS = new RegExp(`${CLAUSE_LIBRARY_BASE_URI}/clause-category-configurations`, 'i');
654
+ const GET_DOCUMENT_CLAUSE_SETS = new RegExp(`${CLAUSE_LIBRARY_BASE_URI}/document-clause-sets`, 'i');
655
+ const GET_DOCUMENT_CLAUSE_FIELDS = new RegExp(`${CLAUSE_LIBRARY_BASE_URI}/document-clauses/fields`, 'i');
656
+ const SERVICE_EXCELLENCE_RECENT_ACTIONS_PATH = new RegExp(`${SERVICE_EXCELLENCE_BASE_URI}/service-catalog-items/recent-actions`, 'i');
657
+ const SERVICE_EXCELLENCE_ACTION_LAUNCH_PATH = new RegExp(`${SERVICE_EXCELLENCE_BASE_URI}/service-catalog-items/action-launch`, 'i');
658
+ const SERVICE_EXCELLENCE_GET_SERVICE_CATALOG_ITEMS_PATH = new RegExp(`${SERVICE_EXCELLENCE_BASE_URI}/service-catalog-items/([A-Z0-9]){15,18}$`, 'i');
659
+ const FETCH_ENTITY_DETAILS_PATH = new RegExp(`${HEALTH_CLOUD_BASE_URI}/fetch-entity-details`, 'i');
660
+ const EPC_PRODUCT_ATTRIBUTE_DEFINITION_PATH = new RegExp(`${EPC_BASE_URI}/product-attribute-definition`, 'i');
661
+ const EPC_DEACTIVATE_PATH = new RegExp(`${EPC_BASE_URI}/actions/deactivate`, 'i');
662
+ const GET_ERI_DIGEST_PATH = new RegExp(`${ERI_BASE_URI}/digest`, 'i');
663
+ const NOTIFICATION_SERVICE_CONFIG_PATH = new RegExp(`${CONNECT_BASE_URI}/notification_service/config`, 'i');
664
+ const GET_PEOPLE_API_PATH = new RegExp(`${PEOPLE_API_BASE_URI}`, 'i');
665
+ const ENABLEMENT_PROGRAM_SUMMARY_PATH = new RegExp(`${ENABLEMENT_BASE_URI}/program/summary/([A-Z0-9]){15,18}$`, 'i');
666
+ const ASSIGNED_ENABLEMENT_PROGRAM_SUMMARY_PATH = new RegExp(`${ENABLEMENT_BASE_URI}/program/summary/assigned$`, 'i');
667
+ const ASSESSMENT_ENVELOPES_PATH = new RegExp(`${CONNECT_BASE_URI}/assessments/assessmentenvelopes`, 'i');
668
+ const ASSESSMENT_CONTEXT_SEARCH_PATH = new RegExp(`${CONNECT_BASE_URI}/assessments/([A-Z0-9]){15,18}/assessment-elements`, 'i');
669
+ const EXTERNAL_DOC_API_PATH = new RegExp(`${EXTERNAL_DOC_BASE_URI}`, 'i');
670
+ const DATALOADING_CSV_DATA_TEMPLATE_PATH = new RegExp(`${CONNECT_BASE_URI}/industries/dataloading/csv-data-template/([A-Za-z0-9_]){5,255}`, 'i');
671
+ const GET_DATA_PROVIDER_OUTPUT_SCHEMA_PATH = new RegExp(`${DATA_PROVIDER_BASE_URI}/([A-Z0-9_]){1,80}/schema$`, 'i');
672
+ const CREATE_INDUSTRIES_CONTEXT_DEFINITION_PATH = new RegExp(`${CONNECT_BASE_URI}/contextdefinition`, 'i');
673
+ const GET_INDUSTRIES_CONTEXT_DEFINITION_LIST_PATH = new RegExp(`${CONNECT_BASE_URI}/contextdefinition`, 'i');
674
+ const GET_INDUSTRIES_CONTEXT_DEFINITION_INFO_PATH = new RegExp(`${CONNECT_BASE_URI}/contextdefinition/info/([A-Za-z0-9]){15,18}$`, 'i');
675
+ const INDUSTRIES_CONTEXT_DEFINITION_PATH = new RegExp(`${CONNECT_BASE_URI}/contextdefinition/([A-Za-z0-9]){15,18}$`, 'i');
676
+ const INDUSTRIES_CONTEXT_DEFINITION_VERSION_PATH = new RegExp(`${CONNECT_BASE_URI}/contextdefinition/version/([A-Za-z0-9]){15,18}$`, 'i');
677
+ const CREATE_INDUSTRIES_CONTEXT_DEFINITION_VERSION_PATH = new RegExp(`${CONNECT_BASE_URI}/contextdefinition/version`, 'i');
678
+ const INDUSTRIES_CONTEXT_NODE_PATH = new RegExp(`${CONNECT_BASE_URI}/contextdefinition/node/([A-Za-z0-9]){15,18}$`, 'i');
679
+ const CREATE_INDUSTRIES_CONTEXT_NODE_PATH = new RegExp(`${CONNECT_BASE_URI}/contextdefinition/node`, 'i');
680
+ const INDUSTRIES_CONTEXT_ATTRIBUTE_PATH = new RegExp(`${CONNECT_BASE_URI}/contextdefinition/attributenode/([A-Za-z0-9]){15,18}$`, 'i');
681
+ const CREATE_INDUSTRIES_CONTEXT_ATTRIBUTE_PATH = new RegExp(`${CONNECT_BASE_URI}/contextdefinition/attributenode`, 'i');
682
+ const DATALOADING_FEATURE_OBJECTS_PATH = new RegExp(`${CONNECT_BASE_URI}/industries/([A-Za-z0-9_]){5,255}/objects`, 'i');
683
+ function generateAdapter(method, baseUri, pathRegex, controller) {
684
+ return {
685
+ method,
686
+ predicate: (path) => path.startsWith(baseUri) && pathRegex.test(path),
687
+ transport: {
688
+ controller,
689
+ },
690
+ };
691
+ }
692
+ const I18N_GET_TIMEZONES_PATH = new RegExp(`${I18N_BASE_URI}/timezones/([A-Za-z0-9_-]){1,10}$`, 'i');
693
+ const GET_ALL_RELATED_ENTITY_PATH = new RegExp(`${GROUP_BASE_URI}/accounts/([A-Z0-9]{15,18})/related-records`, 'i');
694
+ const CREATE_GROUP_PATH = new RegExp(`${GROUP_BASE_URI}/group-definitions`, 'i');
695
+ const GET_ENGAGEMENT_CHANNEL_TYPES = new RegExp(`${SCHEDULER_BASE_URI}/engagement-channel-types`, 'i');
696
+ const LIGHTNING_CARDS_ACTIVATION_PATH = new RegExp(`${LIGHTNING_CARDS_BASE_URI}/activationdata/([A-Z0-9]){15,18}`, 'i');
697
+ const CREATE_SERVICE_APPOINTMENTS = new RegExp(`${SCHEDULER_BASE_URI}/service-appointments`, 'i');
698
+ const CPQ_PREVIEW_PATH = new RegExp(`${CPQ_BASE_URI}/preview`, 'i');
699
+ const connect = [
700
+ generateAdapter('get', CONNECT_BASE_URI, NOTIFICATION_SERVICE_CONFIG_PATH, 'NotificationServiceConnectFamilyController.getNotificationServiceConfig'),
701
+ generateAdapter('post', CONNECT_BASE_URI, AI_ACCELERATOR_RECOMMENDATIONS, 'AIAcceleratorConnectFamilyController.fetchRecommendations'),
702
+ generateAdapter('post', CONNECT_BASE_URI, AI_ACCELERATOR_PREDICTIONS, 'AIAcceleratorConnectFamilyController.predictions'),
703
+ generateAdapter('put', CONNECT_BASE_URI, LOCK_RECORD_PATH, 'SustainabilityFamilyController.lockRecord'),
704
+ generateAdapter('put', CONNECT_BASE_URI, UNLOCK_RECORD_PATH, 'SustainabilityFamilyController.unlockRecord'),
705
+ generateAdapter('post', CONNECT_BASE_URI, DGF_DATE_ISSUE_PATH, 'SustainabilityFamilyController.identifyDateIssues'),
706
+ generateAdapter('post', CONNECT_BASE_URI, DGF_DATAGAP_PATH, 'SustainabilityFamilyController.computeDataGapFillers'),
707
+ generateAdapter('post', CONNECT_BASE_URI, COMMUNITIES_MICROBATCHING_PATH, 'CommunitiesController.ingestRecord'),
708
+ generateAdapter('get', CONNECT_BASE_URI, COMMUNITIES_NAVIGATION_MENU_PATH, 'NavigationMenuController.getCommunityNavigationMenu'),
709
+ generateAdapter('get', CMS_BASE_URI, GET_COLLECTION_ITEMS_PATH, 'ManagedContentController.getCollectionItems'),
710
+ generateAdapter('get', CONNECT_BASE_URI, GET_SEARCH_RESULTS, 'ManagedContentController.searchManagedContentForItems'),
711
+ generateAdapter('get', CMS_BASE_URI, GET_MANAGED_CONTENT_PATH, 'ManagedContentController.getManagedContent'),
712
+ generateAdapter('get', CMS_BASE_URI, GET_MANAGED_CONTENT_REFERENCED_BY_PATH, 'ManagedContentController.getManagedContentReferencedBy'),
713
+ generateAdapter('get', CMS_BASE_URI, GET_MANAGED_CONTENT_VARIANT_RENDITION_PATH, 'ManagedContentController.getManagedContentVariantRendition'),
714
+ generateAdapter('get', CMS_BASE_URI, GET_MANAGED_CONTENT_VARIANT_REFERENCES_PATH, 'ManagedContentController.getVariantReferences'),
715
+ generateAdapter('get', CMS_BASE_URI, GET_MANAGED_CONTENT_VARIANT_PATH, 'ManagedContentController.getManagedContentVariant'),
716
+ generateAdapter('get', CMS_BASE_URI, GET_MANAGED_CONTENT_VARIANT_VERSIONS_PATH, 'ManagedContentController.getManagedContentVariantVersions'),
717
+ generateAdapter('get', CMS_BASE_URI, GET_MANAGED_CONTENT_FOLDER_ITEMS_PATH, 'ManagedContentController.getManagedContentSpaceFolderItems'),
718
+ generateAdapter('post', CMS_BASE_URI, UNPUBLISH_MANAGED_CONTENT_PATH, 'ManagedContentController.unpublish'),
719
+ generateAdapter('post', CMS_BASE_URI, PUBLISH_MANAGED_CONTENT_PATH, 'ManagedContentController.publish'),
720
+ generateAdapter('get', CONNECT_BASE_URI, LIST_CONTENT_INTERNAL_PATH, 'ManagedContentController.getPublishedManagedContentListByContentKey'),
721
+ generateAdapter('get', CONNECT_BASE_URI, LIST_CONTENT_PATH, 'ManagedContentController.getManagedContentByTopicsAndContentKeys'),
722
+ generateAdapter('get', CONNECT_BASE_URI, GET_COLLECTION_ITEMS_FOR_SITE, 'ManagedContentDeliveryController.getCollectionItemsForSite'),
723
+ generateAdapter('get', CONNECT_BASE_URI, GET_COLLECTION_METADATA_FOR_SITE, 'ManagedContentDeliveryController.getCollectionMetadataForSite'),
724
+ generateAdapter('get', CONNECT_BASE_URI, GET_COLLECTION_ITEMS_FOR_CHANNEL, 'ManagedContentDeliveryController.getCollectionItemsForChannel'),
725
+ generateAdapter('get', CONNECT_BASE_URI, GET_COLLECTION_METADATA_FOR_CHANNEL, 'ManagedContentDeliveryController.getCollectionMetadataForChannel'),
726
+ generateAdapter('get', CMS_BASE_URI, MANAGED_CONTENT_ORCHESTRATION_DEFINITIONS_PATH, 'ManagedContentController.getManagedContentOrchestrationDefinitions'),
727
+ generateAdapter('get', CMS_BASE_URI, MANAGED_CONTENT_ORCHESTRATION_INSTANCES_PATH, 'ManagedContentController.getManagedContentOrchestrationInstances'),
728
+ generateAdapter('get', CMS_BASE_URI, MANAGED_CONTENT_CHANNEL_MANAGEMENT_PATH, 'ManagedContentController.getAllManagedContentChannels'),
729
+ generateAdapter('post', CMS_BASE_URI, MANAGED_CONTENT_CHANNEL_MANAGEMENT_PATH, 'ManagedContentController.postManagedContentChannel'),
730
+ generateAdapter('get', CMS_BASE_URI, MANAGED_CONTENT_CHANNEL_MANAGEMENT_RECORD_PATH, 'ManagedContentController.getManagedContentChannelRecordByChannelId'),
731
+ generateAdapter('patch', CMS_BASE_URI, MANAGED_CONTENT_CHANNEL_MANAGEMENT_RECORD_PATH, 'ManagedContentController.patchManagedContentChannelRecord'),
732
+ generateAdapter('post', CMS_BASE_URI, MANAGED_CONTENT_ORCHESTRATION_INSTANCES_PATH, 'ManagedContentController.createManagedContentOrchestrationInstance'),
733
+ generateAdapter('get', CMS_BASE_URI, MANAGED_CONTENT_RUNNING_ORCHESTRATION_HISTORY_PATH, 'ManagedContentController.getManagedContentRunningOrchestrationHistoryEvents'),
734
+ generateAdapter('post', CMS_NON_CONNECT_BASE_URI, CREATE_DEPLOYMENT_PATH, 'ManagedContentController.createDeployment'),
735
+ generateAdapter('post', CMS_BASE_URI, CREATE_MANAGED_CONTENT_VARIANT_PATH, 'ManagedContentController.createManagedContentVariant'),
736
+ generateAdapter('post', CMS_BASE_URI, CREATE_MANAGED_CONTENT_PATH, 'ManagedContentController.createManagedContent'),
737
+ generateAdapter('get', CMS_BASE_URI, GET_CMS_SPACES, 'ManagedContentController.getManagedContentSpaces'),
738
+ generateAdapter('post', CONNECT_BASE_URI, CREATE_MANAGED_CONTENT_IMPORT_V2_JOB_PATH, 'ManagedContentController.createManagedContentImportV2Job'),
739
+ generateAdapter('post', CONNECT_BASE_URI, CREATE_MANAGED_CONTENT_EXPORT_V2_JOB_PATH, 'ManagedContentController.createManagedContentExportV2Job'),
740
+ generateAdapter('post', CONNECT_BASE_URI, CREATE_TRANSLATION_V2_JOB_PATH, 'ManagedContentController.createTranslationV2Job'),
741
+ generateAdapter('get', EXPERIENCE_MODEL_BASE_URI, GET_BLOCK_TYPE_PATH, 'ExperienceModelTypeSystemController.getBlockType'),
742
+ generateAdapter('get', EXPERIENCE_MODEL_BASE_URI, GET_BLOCK_TYPES_PATH, 'ExperienceModelTypeSystemController.getBlockTypes'),
743
+ generateAdapter('get', EXPERIENCE_MODEL_BASE_URI, GET_CONTENT_TYPE_PATH, 'ExperienceModelTypeSystemController.getContentType'),
744
+ generateAdapter('get', EXPERIENCE_MODEL_BASE_URI, GET_CONTENT_TYPES_PATH, 'ExperienceModelTypeSystemController.getContentTypes'),
745
+ generateAdapter('get', EXPERIENCE_MODEL_BASE_URI, GET_PROPERTY_TYPE_PATH, 'ExperienceModelTypeSystemController.getPropertyType'),
746
+ generateAdapter('get', EXPERIENCE_MODEL_BASE_URI, GET_PROPERTY_TYPES_PATH, 'ExperienceModelTypeSystemController.getPropertyTypes'),
747
+ generateAdapter('get', CONNECT_BASE_URI, RECORD_SEO_PROPERTIES_PATH, 'SeoPropertiesController.getRecordSeoProperties'),
748
+ generateAdapter('get', CONNECT_BASE_URI, GET_ORCHESTRATION_INSTANCE_COLLECTION_PATH, 'OrchestrationController.getOrchestrationInstanceCollection'),
749
+ generateAdapter('get', CONNECT_BASE_URI, SITES_SEARCH_PATH, 'SitesController.searchSite'),
750
+ generateAdapter('get', CONNECT_BASE_URI, DECISION_MATRIX_COLUMNS_PATH, 'InteractionDecisionMatrixController.getColumns'),
751
+ generateAdapter('get', CONNECT_BASE_URI, BUSINESS_KNOWLEDGE_MODEL_PATH, 'RulesEngineConnectController.getBusinessKnowledgeModel'),
752
+ generateAdapter('get', CONNECT_BASE_URI, USAGE_TYPES_PATH, 'BusinessRuleEngineController.getUsageTypes'),
753
+ generateAdapter('post', CONNECT_BASE_URI, CREATE_OBJECT_ALIAS_PATH, 'InteractionCalculationProceduresController.createObjectAlias'),
754
+ generateAdapter('patch', CONNECT_BASE_URI, ALIAS_FIELD_PATH, 'InteractionCalculationProceduresController.updateAliasField'),
755
+ generateAdapter('get', CONNECT_BASE_URI, PROCESS_TYPE_PATH, 'RulesEngineConnectController.getProcessType'),
756
+ generateAdapter('get', CONNECT_BASE_URI, DECISION_MATRIX_ROWS_PATH, 'InteractionDecisionMatrixController.getRows'),
757
+ generateAdapter('get', CONNECT_BASE_URI, GET_EXPRESSION_SET_ALIAS_META_INFO_PATH, 'InteractionCalculationProceduresController.getExpressionSetAliasMetaInfo'),
758
+ generateAdapter('post', CONNECT_BASE_URI, DECISION_MATRIX_COLUMNS_PATH, 'InteractionDecisionMatrixController.saveColumns'),
759
+ generateAdapter('post', CONNECT_BASE_URI, DECISION_MATRIX_ROWS_PATH, 'InteractionDecisionMatrixController.saveRows'),
760
+ generateAdapter('get', CONNECT_BASE_URI, GET_DECISION_MATRIC_DETAILS_PATH, 'InteractionCalculationProceduresController.getDecisionMatrixDetails'),
761
+ generateAdapter('get', CONNECT_BASE_URI, GET_DECISION_TABLE_DETAILS_PATH, 'InteractionCalculationProceduresController.getDecisionTableDetails'),
762
+ generateAdapter('get', CONNECT_BASE_URI, GET_MESSAGE_TEMPLATE_DETAIL_PATH, 'BusinessRuleEngineController.getMessageTemplateDetail'),
763
+ generateAdapter('get', CONNECT_BASE_URI, GET_CALC_PROC_VERSION_DETAILS_PATH, 'InteractionCalculationProceduresController.getCalcProcVersionDefinition'),
764
+ generateAdapter('patch', CONNECT_BASE_URI, GET_CALC_PROC_VERSION_DETAILS_PATH, 'InteractionCalculationProceduresController.activateCalcProcedureVersion'),
765
+ generateAdapter('get', CONNECT_BASE_URI, GET_CALC_PROC_DETAILS_PATH, 'InteractionCalculationProceduresController.getCalcProcDetails'),
766
+ generateAdapter('post', CONNECT_BASE_URI, POST_CALC_PROC_VERSION_DETAILS_PATH, 'InteractionCalculationProceduresController.createRule'),
767
+ generateAdapter('get', CONNECT_BASE_URI, SEARCH_CALCULATION_PROCEDURES_DETAILS_PATH, 'InteractionCalculationProceduresController.searchCalculationProcedure'),
768
+ generateAdapter('patch', CONNECT_BASE_URI, SIMULATION_EVALUATION_SERVICE_PATH, 'InteractionCalculationProceduresController.simulateEvaluationService'),
769
+ generateAdapter('post', CONNECT_BASE_URI, POST_INVOKE_EXPRESSION_SET_PATH, 'BusinessRuleEngineController.calculate'),
770
+ generateAdapter('put', CMS_BASE_URI, REPLACE_MANAGED_CONTENT_VARIANT_PATH, 'ManagedContentController.replaceManagedContentVariant'),
771
+ generateAdapter('delete', CMS_BASE_URI, DELETE_MANAGED_CONTENT_VARIANT_PATH, 'ManagedContentController.deleteManagedContentVariant'),
772
+ generateAdapter('get', CONNECT_BASE_URI, SEARCH_DECISION_MATRICES_PATH, 'InteractionCalculationProceduresController.searchDecisionMatrixByName'),
773
+ generateAdapter('get', CONNECT_BASE_URI, SEARCH_DECISION_TABLES_PATH, 'InteractionCalculationProceduresController.searchDecisionTableByName'),
774
+ generateAdapter('get', CONNECT_BASE_URI, SEARCH_MESSAGE_TEMPLATES_PATH, 'BusinessRuleEngineController.searchMessageTemplates'),
775
+ generateAdapter('get', CONNECT_BASE_URI, GET_EXPLAINABILITY_LOGS_PATH, 'InteractionCalculationProceduresController.getExplainabilityLogs'),
776
+ generateAdapter('get', CONNECT_BASE_URI, SIMULATION_EVALUATION_SERVICE_PATH, 'InteractionCalculationProceduresController.getSimulationInputVariables'),
777
+ generateAdapter('get', CONNECT_BASE_URI, GET_ACTION_PLAN_STATUS_INFO_PATH, 'ActionPlanController.getActionPlanStatusInfo'),
778
+ generateAdapter('get', CONNECT_BASE_URI, GET_ACTION_PLANS_PATH, 'ActionPlanController.getActionPlanListByTargetRecord'),
779
+ generateAdapter('get', CONNECT_BASE_URI, GET_ACTION_PLAN_ITEMS_PATH, 'ActionPlanController.getActionPlanItems'),
780
+ generateAdapter('get', PSS_SOCIAL_CARE_BASE_URI, GET_CARE_PLAN_PATH, 'PublicSectorFamilyController.getCarePlanDetails'),
781
+ generateAdapter('get', PSS_SOCIAL_CARE_BASE_URI, GET_CARE_PLAN_BENEFIT_SESSION, 'PublicSectorFamilyController.getCarePlanBenefitSessionDetails'),
782
+ generateAdapter('get', PSS_SOCIAL_CARE_BASE_URI, GET_CARE_PLAN_DEFINITION, 'PublicSectorFamilyController.getCarePlanDefinition'),
783
+ generateAdapter('get', PSS_SOCIAL_CARE_BASE_URI, GET_CARE_PLAN_TEMPLATE_DETAILS, 'PublicSectorFamilyController.getCarePlanTemplateDetails'),
784
+ generateAdapter('post', PSS_SOCIAL_CARE_BASE_URI, POST_CARE_PLAN_TEMPLATE_DETAILS, 'PublicSectorFamilyController.postCarePlanTemplateDetails'),
785
+ generateAdapter('post', PSS_SOCIAL_CARE_BASE_URI, POST_CARE_SERVICE_PLAN_DETAILS, 'PublicSectorFamilyController.postCarePlanDetails'),
786
+ generateAdapter('patch', PSS_SOCIAL_CARE_BASE_URI, UPDATE_CARE_PLAN_DETAILS, 'PublicSectorFamilyController.updateCarePlanDetails'),
787
+ generateAdapter('get', PSS_SOCIAL_CARE_BASE_URI, GET_CARE_PLAN_TASK, 'PublicSectorFamilyController.getCarePlanTasks'),
788
+ generateAdapter('post', PSS_SOCIAL_CARE_BASE_URI, POST_CARE_PLAN_TASK, 'PublicSectorFamilyController.createCarePlanTasks'),
789
+ generateAdapter('patch', PSS_SOCIAL_CARE_BASE_URI, UPDATE_CARE_PLAN_TASK, 'PublicSectorFamilyController.updateCarePlanTasks'),
790
+ generateAdapter('post', CONNECT_BASE_URI, CREATE_BENEFIT_DISBURSEMENTS, 'PublicSectorFamilyController.createBenefitDisbursements'),
791
+ generateAdapter('get', CONNECT_BASE_URI, LOYALTY_PROGRAM_PROCESS_RULE, 'LoyaltyEngineConnectController.getProgramProcessRule'),
792
+ generateAdapter('put', CONNECT_BASE_URI, LOYALTY_PROGRAM_PROCESS_RULE_CREATION, 'LoyaltyEngineConnectController.createProgramProcessRule'),
793
+ generateAdapter('patch', CONNECT_BASE_URI, LOYALTY_PROGRAM_PROCESS_RULE, 'LoyaltyEngineConnectController.updateProgramProcessRule'),
794
+ generateAdapter('post', CONNECT_BASE_URI, LOYALTY_PROGRAM_EXECUTION, 'LoyaltyEngineConnectController.executeRealtimeLoyaltyEngine'),
795
+ generateAdapter('get', CONNECT_BASE_URI, LOYALTY_PROGRAM_EXPLAINABILITY, 'LoyaltyEngineConnectController.getJournalExplainabilityInfo'),
796
+ generateAdapter('get', EXPLAINABILITY_BASE_URI, EXPLAINABILITY_ACTION_LOG_PATH, 'ExplainabilityServiceController.getExplainabilityActionLogs'),
797
+ generateAdapter('post', EXPLAINABILITY_BASE_URI, EXPLAINABILITY_ACTION_LOG_PATH, 'ExplainabilityServiceController.storeExplainabilityActionLog'),
798
+ generateAdapter('get', CIB_BASE_URI, CIB_GET_CONTACTS_INTERACTIONS_PATH, 'CibController.getContactsInteractions'),
799
+ generateAdapter('get', CIB_BASE_URI, CIB_GET_INTERACTION_INSIGHTS_PATH, 'CibController.getInteractionInsights'),
800
+ generateAdapter('get', CIB_BASE_URI, CIB_GET_DEAL_PARTIES_PATH, 'CibController.getDealParties'),
801
+ generateAdapter('get', CONNECT_BASE_URI, TEARSHEET_GET_TEARSHEETS_PATH, 'TearsheetController.getTearsheets'),
802
+ generateAdapter('get', CONNECT_BASE_URI, SERVICEPROCESS_GET_CASE_SERVICE_PROCESS_PATH, 'IServiceProcessConnectFamilyController.getCaseServiceProcessLayoutData'),
803
+ generateAdapter('post', CONNECT_BASE_URI, ACTIONABLE_LIST_DEFINITION_URI_PATH, 'IndustriesActionableListDefinitionController.createActionableListDefinition'),
804
+ generateAdapter('get', CONNECT_BASE_URI, ACTIONABLE_LIST_DEFINITION_URI_PATH, 'IndustriesActionableListDefinitionController.getActionableListDefinitions'),
805
+ generateAdapter('get', CONNECT_BASE_URI, ACTIONABLE_LIST_GET_ACTIONABLE_LIST_MEMBERS_PATH, 'IndustriesActionableListController.getActionableListMembers'),
806
+ generateAdapter('post', CONNECT_BASE_URI, UPSERT_ACTIONABLE_LIST_URI_PATH, 'IndustriesActionableListController.upsertActionableList'),
807
+ generateAdapter('post', CONNECT_BASE_URI, ACTIONABLE_LIST_DATASET_INFO_URI_PATH, 'IndustriesActionableListController.getActionableListDatasetInfo'),
808
+ generateAdapter('get', CLM_BASE_URI, CLM_CONTRACT_URI_PATH, 'ClmController.getContractDocumentVersion'),
809
+ generateAdapter('post', CLM_BASE_URI, CLM_CONTRACT_URI_PATH, 'ClmController.createContractDocumentVersionAndInitializeGenerateDocumentProcess'),
810
+ generateAdapter('get', CLM_BASE_URI, CLM_GET_DOCUMENT_URI_PATH, 'ClmController.getTemplates'),
811
+ generateAdapter('patch', CLM_BASE_URI, CLM_CONTRACT_CHECKIN_URI_PATH, 'ClmController.checkIn'),
812
+ generateAdapter('patch', CLM_BASE_URI, CLM_CONTRACT_UNLOCK_URI_PATH, 'ClmController.unlock'),
813
+ generateAdapter('patch', CLM_BASE_URI, CLM_CONTRACT_LOCK_URI_PATH, 'ClmController.lockContractDocumentVersion'),
814
+ generateAdapter('post', CLM_BASE_URI, CLM_CONTRACT_CHECKOUT_URI_PATH, 'ClmController.checkoutContractDocumentVersion'),
815
+ generateAdapter('delete', CLM_BASE_URI, CLM_CONTENT_DOCUMENTS, 'ClmController.deleteAttachment'),
816
+ generateAdapter('get', CLM_BASE_URI, CLM_CONTENT_DOCUMENTS, 'ClmController.getContentDocument'),
817
+ generateAdapter('get', CLM_BASE_URI, CLM_GET_DOCUMENT_GENERATION_PROCESS_PATH, 'ClmController.getDocumentGenerationProcessDetails'),
818
+ generateAdapter('patch', CLM_BASE_URI, CLM_UPDATE_DOCUMENT_URI_PATH, 'ClmController.updateContractDocumentVersionWithTemplate'),
819
+ generateAdapter('get', CLM_BASE_URI, CLM_GET_CONTRACT_ACTIONS_PATH, 'ClmController.getContractActions'),
820
+ generateAdapter('patch', CLM_BASE_URI, CLM_CONTRACT_EXECUTE_ACTION_URI_PATH, 'ClmController.executeContractAction'),
821
+ generateAdapter('patch', CLM_BASE_URI, SAVE_EXTERNAL_DOCUMENT_URI_PATH, 'ClmController.saveExternalDocument'),
822
+ generateAdapter('post', CONNECT_BASE_URI, UPLOAD_REFERENCE_DATA_PATH, 'SustainabilityFamilyController.uploadReferenceData'),
823
+ generateAdapter('get', CONNECT_BASE_URI, FETCH_ENTITY_VERSION_PATH, 'SustainabilityFamilyController.getEntityVersion'),
824
+ generateAdapter('put', CONNECT_BASE_URI, UPLOAD_ENTITY_VERSION_PATH, 'SustainabilityFamilyController.uploadEntityVersion'),
825
+ generateAdapter('post', CONNECT_BASE_URI, BEI_PATH, 'SustainabilityFamilyController.performBuildingEnergyIntensityCalculation'),
826
+ generateAdapter('post', CONNECT_BASE_URI, RECALCULATE_PATH, 'SustainabilityFamilyController.performSustainabilityFootprintCalculationOnRecord'),
827
+ generateAdapter('get', RCG_TENANTMANAGEMENT_BASE_URI, RCG_TPM_MANAGEMENT_PATH, 'RCGTenantManagementController.getTenantRegistrationStatus'),
828
+ generateAdapter('put', RCG_TENANTMANAGEMENT_BASE_URI, RCG_TPM_MANAGEMENT_PATH, 'RCGTenantManagementController.updateTenantCertificate'),
829
+ generateAdapter('get', SERVICE_EXCELLENCE_BASE_URI, SERVICE_EXCELLENCE_GET_SERVICE_CATALOG_ITEMS_PATH, 'ServiceCatalogConnectController.getServiceCatalogItems'),
830
+ generateAdapter('get', SERVICE_EXCELLENCE_BASE_URI, SERVICE_EXCELLENCE_RECENT_ACTIONS_PATH, 'ServiceCatalogConnectController.getRecentActions'),
831
+ generateAdapter('post', SERVICE_EXCELLENCE_BASE_URI, SERVICE_EXCELLENCE_ACTION_LAUNCH_PATH, 'ServiceCatalogConnectController.createActionLaunchDetails'),
832
+ generateAdapter('post', EPC_BASE_URI, EPC_PRODUCT_ATTRIBUTE_DEFINITION_PATH, 'EpcConnectFamilyController.createProductAttributeDefinition'),
833
+ generateAdapter('patch', EPC_BASE_URI, EPC_DEACTIVATE_PATH, 'EpcConnectFamilyController.deactivate'),
834
+ generateAdapter('get', GROUP_BASE_URI, GET_ALL_RELATED_ENTITY_PATH, 'GroupFamilyController.getAllRelatedEntity'),
835
+ generateAdapter('post', GROUP_BASE_URI, CREATE_GROUP_PATH, 'GroupFamilyController.createHousehold'),
836
+ generateAdapter('get', DATA_PROVIDER_BASE_URI, GET_DATA_PROVIDER_OUTPUT_SCHEMA_PATH, 'DataProviderController.getDataProviderSchema'),
837
+ generateAdapter('post', CPQ_BASE_URI, CPQ_PREVIEW_PATH, 'ICpqConnectFeatureController.preview'),
838
+ generateAdapter('get', CONNECT_BASE_URI, LIGHTNING_CARDS_ACTIVATION_PATH, 'LightningCardsActivationController.getCardActivation'),
839
+ ];
840
+ const commerce = [
841
+ generateAdapter('get', COMMERCE_BASE_URI, GET_PRODUCT_PATH, 'CommerceCatalogController.getProduct'),
842
+ generateAdapter('get', COMMERCE_BASE_URI, GET_PRODUCT_CATEGORY_PATH_PATH, 'CommerceCatalogController.getProductCategoryPath'),
843
+ generateAdapter('get', COMMERCE_BASE_URI, GET_PRODUCT_PRICE_PATH, 'CommerceStorePricingController.getProductPrice'),
844
+ generateAdapter('post', COMMERCE_BASE_URI, PRODUCT_SEARCH_PATH, 'CommerceProductSearchController.productSearch'),
845
+ ];
846
+ const scalecenter = [
847
+ {
848
+ method: 'get',
849
+ predicate: (path) => SCALE_CENTER_GET_METRICS_PATH.test(path),
850
+ transport: {
851
+ controller: 'ScaleCenterController.queryMetrics',
852
+ },
853
+ },
854
+ ];
855
+ const serviceAutomationServiceCatalog = [
856
+ {
857
+ method: 'get',
858
+ predicate: (path) => SERVICE_AUTOMATION_SERVIRCE_CATALOG_GET_COMMUNICATION_PATH.test(path),
859
+ transport: {
860
+ controller: 'ServiceAutomationServiceCatalogController.getCommunication',
861
+ },
862
+ },
863
+ {
864
+ method: 'get',
865
+ predicate: (path) => SERVICE_AUTOMATION_SERVIRCE_CATALOG_GET_COMMUNICATION_CHANNEL_PATH.test(path),
866
+ transport: {
867
+ controller: 'ServiceAutomationServiceCatalogController.getCommunicationChannel',
868
+ },
869
+ },
870
+ {
871
+ method: 'post',
872
+ predicate: (path) => SERVICE_AUTOMATION_SERVIRCE_CATALOG_MARK_CHANNEL_AS_READ_PATH.test(path),
873
+ transport: {
874
+ controller: 'ServiceAutomationServiceCatalogController.markCommunicationChannelAsRead',
875
+ },
876
+ },
877
+ {
878
+ method: 'post',
879
+ predicate: (path) => SERVICE_AUTOMATION_SERVIRCE_CATALOG_CHANNEL_THREAD_CREATE_MESSAGE_AS_READ_PATH.test(path),
880
+ transport: {
881
+ controller: 'ServiceAutomationServiceCatalogController.createMessage',
882
+ },
883
+ },
884
+ ];
885
+ const learningContentPlatform = [
886
+ generateAdapter('get', LEARNING_CONTENT_PLATFORM_BASE_URI, GET_LEARNING_CONTENT_PLATFORM_RELATED_LIST_PATH, 'LearningContentPlatformController.getFeaturedItemsRelatedList'),
887
+ generateAdapter('get', LEARNING_CONTENT_PLATFORM_BASE_URI, GET_LEARNING_CONTENT_PLATFORM_RECOMMENDED_LIST_PATH, 'LearningContentPlatformController.getFeaturedItemsRecommendedList'),
888
+ generateAdapter('get', LEARNING_CONTENT_PLATFORM_BASE_URI, GET_LEARNING_CONTENT_PLATFORM_SEARCH_DESCRIBE_PATH, 'LearningContentPlatformController.getLearningSearchDescribe'),
889
+ generateAdapter('get', LEARNING_CONTENT_PLATFORM_BASE_URI, GET_LEARNING_CONTENT_PLATFORM_SEARCH_RESULTS_PATH, 'LearningContentPlatformController.getLearningSearchResults'),
890
+ generateAdapter('get', LEARNING_CONTENT_PLATFORM_BASE_URI, GET_LEARNING_CONFIG_PATH, 'LearningContentPlatformController.getLearningConfig'),
891
+ generateAdapter('get', LEARNING_CONTENT_PLATFORM_BASE_URI, GET_LEARNING_ITEM_LIST_PATH, 'LearningContentPlatformController.getLearningItemsList'),
892
+ generateAdapter('get', LEARNING_CONTENT_PLATFORM_BASE_URI, GET_LEARNING_ITEM_PROGRESS_PATH, 'LearningContentPlatformController.getLearningItemProgress'),
893
+ generateAdapter('post', LEARNING_CONTENT_PLATFORM_BASE_URI, EVALUATE_LEARNING_ITEMS_PATH, 'LearningContentPlatformController.evaluateLearningItems'),
894
+ generateAdapter('get', LEARNING_CONTENT_PLATFORM_BASE_URI, GET_LEARNING_TEXT_LESSON_PATH, 'LearningContentPlatformController.getTextLesson'),
895
+ generateAdapter('get', LEARNING_CONTENT_PLATFORM_BASE_URI, GET_LEARNING_MODEL_PATH, 'LearningContentPlatformController.getLearningModel'),
896
+ generateAdapter('get', LEARNING_CONTENT_PLATFORM_BASE_URI, GET_MODULE_PATH, 'LearningContentPlatformController.getModule'),
897
+ generateAdapter('get', LEARNING_CONTENT_PLATFORM_BASE_URI, GET_LEARNING_PRACTICE_PATH, 'LearningContentPlatformController.getLearningPractice'),
898
+ ];
899
+ const guidance = [
900
+ {
901
+ method: 'get',
902
+ predicate: (path) => path.startsWith(GUIDANCE_BASE_URI) &&
903
+ !GET_GUIDANCE_ASSISTANT_INFO_LIST_PATH.test(path) &&
904
+ GET_GUIDANCE_ASSISTANT_TARGET_PATH.test(path),
905
+ transport: {
906
+ controller: 'LightningExperienceAssistantPlatformController.getAssistantTarget',
907
+ },
908
+ },
909
+ generateAdapter('get', GUIDANCE_BASE_URI, GET_GUIDANCE_ASSISTANT_LIST_PATH, 'LightningExperienceAssistantPlatformController.getAssistantList'),
910
+ generateAdapter('get', GUIDANCE_BASE_URI, GET_GUIDANCE_ASSISTANT_INFO_LIST_PATH, 'LightningExperienceAssistantPlatformController.getAssistantInfoList'),
911
+ generateAdapter('patch', GUIDANCE_BASE_URI, GET_GUIDANCE_ASSISTANT_LIST_PATH, 'LightningExperienceAssistantPlatformController.saveAssistantList'),
912
+ generateAdapter('get', GUIDANCE_BASE_URI, GET_GUIDANCE_ASSISTANT_PATH, 'LightningExperienceAssistantPlatformController.getAssistant'),
913
+ generateAdapter('patch', GUIDANCE_BASE_URI, GET_GUIDANCE_ASSISTANT_PATH, 'LightningExperienceAssistantPlatformController.saveAssistant'),
914
+ generateAdapter('get', GUIDANCE_BASE_URI, GET_GUIDANCE_QUESTIONNAIRES_PATH, 'LightningExperienceAssistantPlatformController.getQuestionnaires'),
915
+ generateAdapter('get', GUIDANCE_BASE_URI, GET_GUIDANCE_QUESTIONNAIRE_PATH, 'LightningExperienceAssistantPlatformController.getQuestionnaire'),
916
+ generateAdapter('patch', GUIDANCE_BASE_URI, GET_GUIDANCE_QUESTIONNAIRE_PATH, 'LightningExperienceAssistantPlatformController.saveQuestionnaire'),
917
+ generateAdapter('patch', GUIDANCE_BASE_URI, GET_GUIDANCE_STEP_PATH, 'LightningExperienceAssistantPlatformController.evaluateStep'),
918
+ generateAdapter('put', GUIDANCE_BASE_URI, GET_GUIDANCE_INITIALIZE_PATH, 'LightningExperienceAssistantPlatformController.initialize'),
919
+ ];
920
+ const analytics = [
921
+ generateAdapter('post', WAVE_BASE_URI, EXECUTE_QUERY_PATH, 'WaveController.executeQueryByInputRep'),
922
+ generateAdapter('get', WAVE_BASE_URI, ANALYTICS_LIMITS_PATH, 'WaveController.getAnalyticsLimits'),
923
+ generateAdapter('get', WAVE_BASE_URI, DATA_CONNECTORS_PATH, 'WaveController.getDataConnectors'),
924
+ generateAdapter('post', WAVE_BASE_URI, DATA_CONNECTORS_PATH, 'WaveController.createDataConnector'),
925
+ generateAdapter('get', WAVE_BASE_URI, DATA_CONNECTOR_PATH, 'WaveController.getDataConnector'),
926
+ generateAdapter('patch', WAVE_BASE_URI, DATA_CONNECTOR_PATH, 'WaveController.updateDataConnector'),
927
+ generateAdapter('delete', WAVE_BASE_URI, DATA_CONNECTOR_PATH, 'WaveController.deleteDataConnector'),
928
+ generateAdapter('get', WAVE_BASE_URI, DATA_CONNECTOR_SOURCE_FIELDS_PATH, 'WaveController.getDataConnectorSourceFields'),
929
+ generateAdapter('get', WAVE_BASE_URI, DATA_CONNECTOR_SOURCE_OBJECTS_PATH, 'WaveController.getDataConnectorSourceObjects'),
930
+ generateAdapter('get', WAVE_BASE_URI, DATA_CONNECTOR_SOURCE_OBJECT_PATH, 'WaveController.getDataConnectorSourceObject'),
931
+ generateAdapter('post', WAVE_BASE_URI, DATA_CONNECTOR_SOURCE_OBJECT_PREVIEW_PATH, 'WaveController.getDataConnectorSourceObjectDataPreviewWithFields'),
932
+ generateAdapter('post', WAVE_BASE_URI, INGEST_DATA_CONNECTOR_PATH, 'WaveController.ingestDataConnector'),
933
+ generateAdapter('get', WAVE_BASE_URI, DATA_CONNECTOR_STATUS_PATH, 'WaveController.getDataConnectorStatus'),
934
+ generateAdapter('get', WAVE_BASE_URI, DATA_CONNECTOR_TYPES_PATH, 'WaveController.getDataConnectorTypes'),
935
+ generateAdapter('get', WAVE_BASE_URI, DATAFLOWS_PATH, 'WaveController.getDataflows'),
936
+ generateAdapter('get', WAVE_BASE_URI, DEPENDENCIES_PATH, 'WaveController.getDependencies'),
937
+ generateAdapter('post', WAVE_BASE_URI, DATAFLOW_JOBS_PATH, 'WaveController.startDataflow'),
938
+ generateAdapter('get', WAVE_BASE_URI, DATAFLOW_JOBS_PATH, 'WaveController.getDataflowJobs'),
939
+ generateAdapter('get', WAVE_BASE_URI, DATAFLOW_JOB_PATH, 'WaveController.getDataflowJob'),
940
+ generateAdapter('patch', WAVE_BASE_URI, DATAFLOW_JOB_PATH, 'WaveController.updateDataflowJob'),
941
+ generateAdapter('get', WAVE_BASE_URI, DATAFLOW_JOB_NODES_PATH, 'WaveController.getDataflowJobNodes'),
942
+ generateAdapter('get', WAVE_BASE_URI, DATAFLOW_JOB_NODE_PATH, 'WaveController.getDataflowJobNode'),
943
+ generateAdapter('get', WAVE_BASE_URI, RECIPE_PATH, 'WaveController.getRecipe'),
944
+ generateAdapter('patch', WAVE_BASE_URI, RECIPE_PATH, 'WaveController.updateRecipe'),
945
+ generateAdapter('get', WAVE_BASE_URI, RECIPES_PATH, 'WaveController.getRecipes'),
946
+ generateAdapter('get', WAVE_BASE_URI, RECIPE_NOTIFICATION_PATH, 'WaveController.getRecipeNotification'),
947
+ generateAdapter('put', WAVE_BASE_URI, RECIPE_NOTIFICATION_PATH, 'WaveController.updateRecipeNotification'),
948
+ generateAdapter('get', WAVE_BASE_URI, ACTIONS_PATH, 'WaveController.getActions'),
949
+ generateAdapter('get', WAVE_BASE_URI, SCHEDULE_PATH, 'WaveController.getSchedule'),
950
+ generateAdapter('put', WAVE_BASE_URI, SCHEDULE_PATH, 'WaveController.updateSchedule'),
951
+ generateAdapter('get', WAVE_BASE_URI, DATASET_PATH, 'WaveController.getDataset'),
952
+ generateAdapter('delete', WAVE_BASE_URI, DATASET_PATH, 'WaveController.deleteDataset'),
953
+ generateAdapter('patch', WAVE_BASE_URI, DATASET_PATH, 'WaveController.updateDataset'),
954
+ generateAdapter('get', WAVE_BASE_URI, DATASETS_PATH, 'WaveController.getDatasets'),
955
+ generateAdapter('post', WAVE_BASE_URI, DATASETS_PATH, 'WaveController.createDataset'),
956
+ generateAdapter('get', WAVE_BASE_URI, DATASET_VERSION_PATH, 'WaveController.getDatasetVersion'),
957
+ generateAdapter('get', WAVE_BASE_URI, DATASET_VERSIONS_PATH, 'WaveController.getDatasetVersions'),
958
+ generateAdapter('patch', WAVE_BASE_URI, DATASET_VERSION_PATH, 'WaveController.updateDatasetVersion'),
959
+ generateAdapter('post', WAVE_BASE_URI, DATASET_VERSIONS_PATH, 'WaveController.createDatasetVersion'),
960
+ generateAdapter('get', WAVE_BASE_URI, SECURITY_COVERAGE_DATASET_VERSION_PATH, 'WaveController.getSecurityCoverageDatasetVersion'),
961
+ generateAdapter('get', WAVE_BASE_URI, XMD_PATH, 'WaveController.getXmd'),
962
+ generateAdapter('put', WAVE_BASE_URI, XMD_PATH, 'WaveController.updateXmd'),
963
+ generateAdapter('delete', WAVE_BASE_URI, RECIPE_PATH, 'WaveController.deleteRecipe'),
964
+ generateAdapter('get', WAVE_BASE_URI, REPLICATED_DATASETS_PATH, 'WaveController.getReplicatedDatasets'),
965
+ generateAdapter('post', WAVE_BASE_URI, REPLICATED_DATASETS_PATH, 'WaveController.createReplicatedDataset'),
966
+ generateAdapter('get', WAVE_BASE_URI, REPLICATED_DATASET_PATH, 'WaveController.getReplicatedDataset'),
967
+ generateAdapter('patch', WAVE_BASE_URI, REPLICATED_DATASET_PATH, 'WaveController.updateReplicatedDataset'),
968
+ generateAdapter('delete', WAVE_BASE_URI, REPLICATED_DATASET_PATH, 'WaveController.deleteReplicatedDataset'),
969
+ generateAdapter('get', WAVE_BASE_URI, REPLICATED_FIELDS_PATH, 'WaveController.getReplicatedFields'),
970
+ generateAdapter('patch', WAVE_BASE_URI, REPLICATED_FIELDS_PATH, 'WaveController.updateReplicatedFields'),
971
+ generateAdapter('get', WAVE_BASE_URI, WAVE_FOLDERS_PATH, 'WaveController.getWaveFolders'),
972
+ generateAdapter('get', WAVE_BASE_URI, WAVE_TEMPLATES_PATH, 'WaveController.getWaveTemplates'),
973
+ generateAdapter('get', WAVE_BASE_URI, WAVE_TEMPLATE_PATH, 'WaveController.getWaveTemplate'),
974
+ generateAdapter('get', WAVE_BASE_URI, WAVE_TEMPLATE_CONFIG_PATH, 'WaveController.getWaveTemplateConfig'),
975
+ generateAdapter('get', WAVE_BASE_URI, WAVE_TEMPLATE_RELEASE_NOTES_PATH, 'WaveController.getWaveTemplateReleaseNotes'),
976
+ ];
977
+ const connectInternal = [
978
+ generateAdapter('get', CMS_BASE_URI, GET_CONTENT_TYPE_INTERNAL_PATH, 'ManagedContentTypeController.getContentTypeSchema'),
979
+ ];
980
+ const analyticsPrivate = [
981
+ generateAdapter('post', WAVE_BASE_URI, EXECUTE_SOQL_QUERY_PATH, 'WaveController.executeSoqlQueryPost'),
982
+ ];
983
+ const tableauEmbedding = [
984
+ generateAdapter('get', TABLEAU_EMBEDDING_BASE_URI, GET_JWT_TABLEAU_EMBEDDING, 'TableauEmbeddingController.getJWT'),
985
+ generateAdapter('get', TABLEAU_EMBEDDING_BASE_URI, GET_EAS_TABLEAU_EMBEDDING, 'TableauEmbeddingController.getEAS'),
986
+ ];
987
+ const smartDataDiscovery = [
988
+ generateAdapter('get', SMART_DATA_DISCOVERY_BASE_URI, STORIES_PATH, 'SmartDataDiscoveryController.getStories'),
989
+ ];
990
+ const flow = [
991
+ generateAdapter('post', INTERACTION_BASE_URI, INTERACTION_RUNTIME_RUN_FLOW_PATH, 'FlowRuntimeConnectController.startFlow'),
992
+ generateAdapter('post', INTERACTION_BASE_URI, INTERACTION_RUNTIME_NAVIGATE_FLOW_PATH, 'FlowRuntimeConnectController.navigateFlow'),
993
+ generateAdapter('post', INTERACTION_BASE_URI, INTERACTION_RUNTIME_RESUME_FLOW_PATH, 'FlowRuntimeConnectController.resumeFlow'),
994
+ ];
995
+ const flowBuilder = [
996
+ generateAdapter('get', INTERACTION_BASE_URI, INTERACTION_FLOW_BUILDER_RULES_PATH, 'FlowBuilderController.getRules'),
997
+ ];
998
+ const billing = [
999
+ generateAdapter('post', COMMERCE_BASE_URI, POST_BATCH_PAYMENTS_SCHEDULERS_PATH, 'BillingBatchApplicationController.createPaymentsBatchScheduler'),
1000
+ generateAdapter('post', COMMERCE_BASE_URI, POST_BATCH_INVOICES_SCHEDULERS_PATH, 'BatchInvoiceApplicationController.createBatchInvoiceScheduler'),
1001
+ ];
1002
+ const marketingIntegration = [
1003
+ generateAdapter('get', SITES_BASE_URI, MARKETING_INTEGRATION_GET_FORM_PATH, 'MarketingIntegrationController.getForm'),
1004
+ generateAdapter('post', SITES_BASE_URI, MARKETING_INTEGRATION_SUBMIT_FORM_PATH, 'MarketingIntegrationController.submitForm'),
1005
+ generateAdapter('post', SITES_BASE_URI, MARKETING_INTEGRATION_SAVE_FORM_PATH, 'MarketingIntegrationController.saveForm'),
1006
+ ];
1007
+ const videovisits = [
1008
+ generateAdapter('post', CONNECT_BASE_URI, JOIN_CALL_PATH, 'VideoCallController.chimeMeeting'),
1009
+ generateAdapter('put', CONNECT_BASE_URI, LEAVE_CALL_PATH, 'VideoCallController.leaveChimeMeeting'),
1010
+ generateAdapter('post', CONNECT_BASE_URI, TRANSCRIPTION_CALL_PATH, 'VideoCallController.toggleTranscription'),
1011
+ generateAdapter('post', CONNECT_BASE_URI, VIDEO_CALL_PATH, 'VideoCallController.setupCall'),
1012
+ generateAdapter('put', CONNECT_BASE_URI, VIDEO_PARTICIPANT_PATH, 'VideoCallController.evaluateVideoCallParticipant'),
1013
+ generateAdapter('put', CONNECT_BASE_URI, VIDEO_CALL_PATH, 'VideoCallController.updateVideoCall'),
1014
+ generateAdapter('get', CONNECT_BASE_URI, VIDEO_PARTICIPANT_PATH, 'VideoCallController.getParticipantData'),
1015
+ ];
1016
+ const hpiscore = [
1017
+ {
1018
+ method: 'get',
1019
+ transport: {
1020
+ controller: 'HolisticPatientIndexController.getActionsDetails',
1021
+ },
1022
+ predicate: (path) => path.startsWith(CONNECT_BASE_URI) && HPI_SCORE_PATH.test(path),
1023
+ },
1024
+ {
1025
+ method: 'get',
1026
+ transport: {
1027
+ controller: 'HolisticPatientIndexController.getMorePatientScores',
1028
+ },
1029
+ predicate: (path) => path.startsWith(CONNECT_BASE_URI) && GET_PATIENT_LIST_SCORE.test(path),
1030
+ },
1031
+ {
1032
+ method: 'get',
1033
+ transport: {
1034
+ controller: 'HolisticPatientIndexController.getApexInterfaceStatus',
1035
+ },
1036
+ predicate: (path) => path.startsWith(CONNECT_BASE_URI) && GET_PATIENT_SCORE_APEX_PATH.test(path),
1037
+ },
1038
+ {
1039
+ method: 'post',
1040
+ transport: {
1041
+ controller: 'HolisticPatientIndexController.saveHistoryForAction',
1042
+ },
1043
+ predicate: (path) => path.startsWith(CONNECT_BASE_URI) && GET_PATIENT_SCORE_APEX_PATH.test(path),
1044
+ },
1045
+ ];
1046
+ const externalDocApi = [
1047
+ generateAdapter('get', EXTERNAL_DOC_BASE_URI, EXTERNAL_DOC_API_PATH, 'ExternalDocumentController.getExternalDocument'),
1048
+ generateAdapter('post', EXTERNAL_DOC_BASE_URI, EXTERNAL_DOC_API_PATH, 'ExternalDocumentController.createExternalDocument'),
1049
+ generateAdapter('patch', EXTERNAL_DOC_BASE_URI, EXTERNAL_DOC_API_PATH, 'ExternalDocumentController.saveExternalDocument'),
1050
+ ];
1051
+ const interesttagging = [
1052
+ generateAdapter('get', CONNECT_BASE_URI, GET_TAGS_BY_RECORD_PATH, 'InterestTaggingFamilyController.getTagsByRecordId'),
1053
+ generateAdapter('get', CONNECT_BASE_URI, GET_RECORDS_BY_TAGID_PATH, 'InterestTaggingFamilyController.getInterestTagEntityAssignments'),
1054
+ generateAdapter('get', CONNECT_BASE_URI, GET_TAGS_BY_CATEGORYID_PATH, 'InterestTaggingFamilyController.getTagsByCategoryId'),
1055
+ generateAdapter('get', CONNECT_BASE_URI, GET_CATEGORIES_BY_TAGID_PATH, 'InterestTaggingFamilyController.getTagCategoriesByTagId'),
1056
+ generateAdapter('post', CONNECT_BASE_URI, CREATE_INTEREST_TAG_ENTITY_ASSIGNMENT_PATH, 'InterestTaggingFamilyController.createInterestTagEntityAssignment'),
1057
+ ];
1058
+ const identityVerification = [
1059
+ generateAdapter('post', CONNECT_BASE_URI, IDENTIFY_VERIFICATION_BUILD_CONTEXT_PATH, 'IdentityVerificationController.buildVerificationContext'),
1060
+ generateAdapter('post', CONNECT_BASE_URI, IDENTIFY_VERIFICATION_SEARCH_PATH, 'IdentityVerificationController.searchRecords'),
1061
+ generateAdapter('post', CONNECT_BASE_URI, IDENTIFY_VERIFICATION_VERIFY_RECORD_PATH, 'IdentityVerificationController.identityVerification'),
1062
+ generateAdapter('post', CONNECT_BASE_URI, FORM_BASED_VERIFICATION_VERIFY_RECORD_PATH, 'IdentityVerificationController.createFormVerification'),
1063
+ ];
1064
+ const salesExcellence = [
1065
+ generateAdapter('post', CONNECT_BASE_URI, SALES_EXCELLENCE_ACTIONABLE_LIST_MEMBER_SEARCH_BY_ID, 'IndustriesActionableListMemberController.searchActionListMembersByListId'),
1066
+ generateAdapter('post', CONNECT_BASE_URI, SALES_EXCELLENCE_ACTIONABLE_LIST_MEMBER_SEARCH, 'IndustriesActionableListMemberController.searchActionListMembers'),
1067
+ generateAdapter('post', CONNECT_BASE_URI, SALES_EXCELLENCE_ASSIGN_ACTIONABLE_LIST, 'IndustriesActionableListMemberController.assignActionableList'),
1068
+ generateAdapter('get', CONNECT_BASE_URI, SALES_EXCELLENCE_ASSIGNED_ACTIONABLE_LISTS, 'IndustriesActionableListMemberController.getAssignedActionableLists'),
1069
+ generateAdapter('get', CONNECT_BASE_URI, SALES_EXCELLENCE_GET_ACTIONABLE_LIST_METADATA, 'IndustriesActionableListMemberController.getActionableListMetadata'),
1070
+ ];
1071
+ const timeline = [
1072
+ generateAdapter('get', CONNECT_BASE_URI, TIMELINE_PATH, 'TimelineController.getTimelineData'),
1073
+ generateAdapter('get', CONNECT_BASE_URI, TIMELINE_METADATA_PATH, 'TimelineController.getTimelineMetadata'),
1074
+ ];
1075
+ const criteriabasedsearchfilter = [
1076
+ generateAdapter('get', CONNECT_BASE_URI, CRITERIABASEDSEARCHFILTER_CONFIGURATIONS_PATH, 'CriteriaBasedSearchController.getSearchCriteriaConfigurations'),
1077
+ generateAdapter('post', CONNECT_BASE_URI, CRITERIABASEDSEARCHFILTER_SEARCH_OBJECT_PATH, 'CriteriaBasedSearchController.searchObject'),
1078
+ ];
1079
+ const assetCreation = [
1080
+ generateAdapter('get', ASSETCREATION_BASE_URI, GET_STARTER_TEMPLATES_PATH, 'AssetCreationController.getStarterTemplates'),
1081
+ generateAdapter('get', ASSETCREATION_BASE_URI, GET_STARTER_TEMPLATE_BYID_PATH, 'AssetCreationController.getStarterTemplateById'),
1082
+ generateAdapter('post', ASSETCREATION_BASE_URI, POST_ASSET_OBJECT_PATH, 'AssetCreationController.createAsset'),
1083
+ ];
1084
+ const advancedTherapyManagement = [
1085
+ generateAdapter('post', HEALTH_CLOUD_BASE_URI, GET_SLOTS_PATH, 'AdvancedTherapyManagementController.getSlots'),
1086
+ generateAdapter('post', HEALTH_CLOUD_BASE_URI, BOOK_SLOTS_PATH, 'AdvancedTherapyManagementController.bookSlotChain'),
1087
+ generateAdapter('post', HEALTH_CLOUD_BASE_URI, CANCEL_SLOT_CHAIN_PATH, 'AdvancedTherapyManagementController.cancelSlotChain'),
1088
+ generateAdapter('post', HEALTH_CLOUD_BASE_URI, FETCH_SERVICE_TERRITORY_PATH, 'AdvancedTherapyManagementController.getWorkTypeServiceTerritories'),
1089
+ generateAdapter('post', HEALTH_CLOUD_BASE_URI, RESCHEDULE_SLOT_CHAIN_PATH, 'AdvancedTherapyManagementController.rescheduleSlotChain'),
1090
+ generateAdapter('post', HEALTH_CLOUD_BASE_URI, FETCH_ENTITY_DETAILS_PATH, 'AdvancedTherapyManagementController.getEntityDetailsInfo'),
1091
+ generateAdapter('post', HEALTH_CLOUD_BASE_URI, GENERIC_CONNECT_API_PATH, 'GenericConnectApiController.genericConnectApiPOST'),
1092
+ generateAdapter('get', HEALTH_CLOUD_BASE_URI, GENERIC_CONNECT_API_PATH, 'GenericConnectApiController.genericConnectApiGET'),
1093
+ generateAdapter('post', HEALTH_CLOUD_BASE_URI, MOVE_TO_NEXT_STEP_PATH, 'AdvancedTherapyManagementController.moveToNextStep'),
1094
+ ];
1095
+ const enablementProgram = [
1096
+ generateAdapter('get', SALES_ENABLEMENT_BASE_URI, GET_SALES_ENABLEMENT_PROGRAM_TEMPLATE_PATH, 'EnablementProgramController.getEnablementProgramTemplate'),
1097
+ generateAdapter('get', SALES_ENABLEMENT_BASE_URI, GET_SALES_ENABLEMENT_PROGRAM_TEMPLATES_PATH, 'EnablementProgramController.getEnablementProgramTemplateList'),
1098
+ ];
1099
+ const salesUserWorkingHours = [
1100
+ generateAdapter('delete', BASE_URI, DELETE_SALES_USER_WORKING_HOURS_PATH, 'ISalesUserWorkingHoursFamilyController.deleteSalesUserWorkingHours'),
1101
+ generateAdapter('get', BASE_URI, GET_SALES_USER_WORKING_HOURS_PATH, 'ISalesUserWorkingHoursFamilyController.getSalesUserWorkingHours'),
1102
+ generateAdapter('patch', BASE_URI, PATCH_SALES_USER_WORKING_HOURS_PATH, 'ISalesUserWorkingHoursFamilyController.updateSalesUserWorkingHours'),
1103
+ generateAdapter('post', BASE_URI, POST_SALES_USER_WORKING_HOURS_PATH, 'ISalesUserWorkingHoursFamilyController.postSalesUserWorkingHours'),
1104
+ ];
1105
+ const namedCredential = [
1106
+ generateAdapter('delete', NAMED_CREDENTIAL_BASE_URI, CREDENTIAL_PATH, 'NamedCredentialsController.deleteCredential'),
1107
+ generateAdapter('post', NAMED_CREDENTIAL_BASE_URI, OAUTH_CREDENTIAL_AUTH_URL_PATH, 'NamedCredentialsController.getOAuthCredentialAuthUrl'),
1108
+ generateAdapter('get', NAMED_CREDENTIAL_BASE_URI, EXTERNAL_CREDENTIAL_PATH, 'NamedCredentialsController.getExternalCredentials'),
1109
+ ];
1110
+ const externalServices = [
1111
+ generateAdapter('post', EXTERNAL_SERVICES_BASE_URI, EXTERNAL_SERVICES_DATA_SHAPE_PATH, 'ExternalServicesController.getDataShape'),
1112
+ generateAdapter('post', EXTERNAL_SERVICES_BASE_URI, EXTERNAL_SERVICES_OPENAPI_SPEC_PATH, 'ExternalServicesController.getOpenApiSpec'),
1113
+ generateAdapter('get', EXTERNAL_SERVICES_BASE_URI, EXTERNAL_SERVICES_STATISTICS_PATH, 'ExternalServicesController.getStatistics'),
1114
+ generateAdapter('get', EXTERNAL_SERVICES_BASE_URI, EXTERNAL_SERVICES_STATISTICS_FOR_SERVICE_PATH, 'ExternalServicesController.getStatisticsForService'),
1115
+ generateAdapter('post', EXTERNAL_SERVICES_BASE_URI, EXTERNAL_SERVICES_VALIDATE_SCHEMA_PATH, 'ExternalServicesController.validateSchema'),
1116
+ ];
1117
+ const communityInfo = [
1118
+ generateAdapter('get', CONNECT_BASE_URI, GET_COMMUNITY_INFO_PATH, 'CommunitiesController.getCommunity'),
1119
+ ];
1120
+ const eSignature = [
1121
+ generateAdapter('get', E_SIGN_BASE_URI, GET_SIGNER_ROLES, 'DocgenController.getSignerRoles'),
1122
+ generateAdapter('post', E_SIGN_BASE_URI, SEND_DOCUMENT_ENVELOPE_FOR_ESIGN, 'DocgenController.sendEnvelopeForEsign'),
1123
+ generateAdapter('get', E_SIGN_BASE_URI, GET_NOTIFICATION_SETTING, 'DocgenController.getESignNotificationSettings'),
1124
+ generateAdapter('get', E_SIGN_BASE_URI, GET_RECIPIENT, 'DocgenController.getRecipients'),
1125
+ generateAdapter('get', E_SIGN_BASE_URI, GET_DOCUMENTS, 'DocgenController.getDocuments'),
1126
+ generateAdapter('patch', E_SIGN_BASE_URI, UPDATE_DOCUMENT_ENVELOPE_FOR_ESIGN, 'DocgenController.voidEnvelope'),
1127
+ generateAdapter('patch', E_SIGN_BASE_URI, UPDATE_ENVELOPE_STATUS, 'DocgenController.updateEnvelopeStatus'),
1128
+ ];
1129
+ const clauseLibrary = [
1130
+ generateAdapter('get', CLAUSE_LIBRARY_BASE_URI, GET_CLAUSE_CATEGORY_CONFIGS, 'ClauseLibraryController.getClauseCategoryConfigurations'),
1131
+ generateAdapter('get', CLAUSE_LIBRARY_BASE_URI, GET_DOCUMENT_CLAUSE_SETS, 'ClauseLibraryController.getDocumentClauseSets'),
1132
+ generateAdapter('get', CLAUSE_LIBRARY_BASE_URI, GET_DOCUMENT_CLAUSE_FIELDS, 'ClauseLibraryController.getDocumentClauseFields'),
1133
+ ];
1134
+ const eriDigest = [
1135
+ generateAdapter('post', ERI_BASE_URI, GET_ERI_DIGEST_PATH, 'ERIDigestController.getERIDigest'),
1136
+ ];
1137
+ const peopleApi = [
1138
+ generateAdapter('get', PEOPLE_API_BASE_URI, GET_PEOPLE_API_PATH, 'PeopleAPIConnectController.getParsedSignatureData'),
1139
+ ];
1140
+ const enablement = [
1141
+ generateAdapter('get', ENABLEMENT_BASE_URI, ENABLEMENT_PROGRAM_SUMMARY_PATH, 'EnablementProgramController.enablementProgramSummary'),
1142
+ generateAdapter('get', ENABLEMENT_BASE_URI, ASSIGNED_ENABLEMENT_PROGRAM_SUMMARY_PATH, 'EnablementProgramController.assignedEnablementProgramSummary'),
1143
+ ];
1144
+ const globalization = [
1145
+ generateAdapter('get', I18N_BASE_URI, I18N_GET_TIMEZONES_PATH, 'TimeZoneAPIController.getTimezonesByLocale'),
1146
+ ];
1147
+ const assessment = [
1148
+ generateAdapter('post', CONNECT_BASE_URI, ASSESSMENT_ENVELOPES_PATH, 'AssessmentController.postAssessmentEnvelope'),
1149
+ generateAdapter('get', CONNECT_BASE_URI, ASSESSMENT_ENVELOPES_PATH, 'AssessmentController.getAssessmentEnvelope'),
1150
+ generateAdapter('post', CONNECT_BASE_URI, ASSESSMENT_CONTEXT_SEARCH_PATH, 'AssessmentSearchController.postAssessmentContextSearch'),
1151
+ ];
1152
+ const dataloading = [
1153
+ generateAdapter('get', CONNECT_BASE_URI, DATALOADING_CSV_DATA_TEMPLATE_PATH, 'DataLoadingController.getCsvDataTemplate'),
1154
+ generateAdapter('get', CONNECT_BASE_URI, DATALOADING_FEATURE_OBJECTS_PATH, 'DataLoadingController.getObjectsForFeature'),
1155
+ ];
1156
+ const scheduler = [
1157
+ generateAdapter('get', SCHEDULER_BASE_URI, GET_ENGAGEMENT_CHANNEL_TYPES, 'LightningSchedulerController.getEngagementChannelTypes'),
1158
+ generateAdapter('post', SCHEDULER_BASE_URI, CREATE_SERVICE_APPOINTMENTS, 'LightningSchedulerController.createServiceAppointment'),
1159
+ generateAdapter('patch', SCHEDULER_BASE_URI, CREATE_SERVICE_APPOINTMENTS, 'LightningSchedulerController.updateServiceAppointment'),
1160
+ ];
1161
+ const industriesContext = [
1162
+ generateAdapter('get', CONNECT_BASE_URI, GET_INDUSTRIES_CONTEXT_DEFINITION_INFO_PATH, 'ContextResourceFamilyController.getContextDefinitionInfo'),
1163
+ generateAdapter('delete', CONNECT_BASE_URI, INDUSTRIES_CONTEXT_DEFINITION_PATH, 'ContextResourceFamilyController.deleteContextDefinition'),
1164
+ generateAdapter('get', CONNECT_BASE_URI, INDUSTRIES_CONTEXT_DEFINITION_PATH, 'ContextResourceFamilyController.getContextDefinition'),
1165
+ generateAdapter('patch', CONNECT_BASE_URI, INDUSTRIES_CONTEXT_DEFINITION_PATH, 'ContextResourceFamilyController.updateContextDefinition'),
1166
+ generateAdapter('post', CONNECT_BASE_URI, CREATE_INDUSTRIES_CONTEXT_DEFINITION_VERSION_PATH, 'ContextResourceFamilyController.createContextDefinitionVersion'),
1167
+ generateAdapter('delete', CONNECT_BASE_URI, INDUSTRIES_CONTEXT_DEFINITION_VERSION_PATH, 'ContextResourceFamilyController.deleteContextDefinitionVersion'),
1168
+ generateAdapter('get', CONNECT_BASE_URI, INDUSTRIES_CONTEXT_DEFINITION_VERSION_PATH, 'ContextResourceFamilyController.getContextDefinitionVersion'),
1169
+ generateAdapter('patch', CONNECT_BASE_URI, INDUSTRIES_CONTEXT_DEFINITION_VERSION_PATH, 'ContextResourceFamilyController.updateContextDefinitionVersion'),
1170
+ generateAdapter('post', CONNECT_BASE_URI, CREATE_INDUSTRIES_CONTEXT_NODE_PATH, 'ContextResourceFamilyController.createContextNode'),
1171
+ generateAdapter('delete', CONNECT_BASE_URI, INDUSTRIES_CONTEXT_NODE_PATH, 'ContextResourceFamilyController.deleteContextNode'),
1172
+ generateAdapter('get', CONNECT_BASE_URI, INDUSTRIES_CONTEXT_NODE_PATH, 'ContextResourceFamilyController.getContextNode'),
1173
+ generateAdapter('patch', CONNECT_BASE_URI, INDUSTRIES_CONTEXT_NODE_PATH, 'ContextResourceFamilyController.updateContextNode'),
1174
+ generateAdapter('post', CONNECT_BASE_URI, CREATE_INDUSTRIES_CONTEXT_ATTRIBUTE_PATH, 'ContextResourceFamilyController.createContextAttribute'),
1175
+ generateAdapter('delete', CONNECT_BASE_URI, INDUSTRIES_CONTEXT_ATTRIBUTE_PATH, 'ContextResourceFamilyController.deleteContextAttribute'),
1176
+ generateAdapter('get', CONNECT_BASE_URI, INDUSTRIES_CONTEXT_ATTRIBUTE_PATH, 'ContextResourceFamilyController.getContextAttribute'),
1177
+ generateAdapter('patch', CONNECT_BASE_URI, INDUSTRIES_CONTEXT_ATTRIBUTE_PATH, 'ContextResourceFamilyController.updateContextAttribute'),
1178
+ generateAdapter('post', CONNECT_BASE_URI, CREATE_INDUSTRIES_CONTEXT_DEFINITION_PATH, 'ContextResourceFamilyController.createContextDefinition'),
1179
+ generateAdapter('get', CONNECT_BASE_URI, GET_INDUSTRIES_CONTEXT_DEFINITION_LIST_PATH, 'ContextResourceFamilyController.getContextDefinitionList'),
1180
+ ];
1181
+ const updateQuote = [
1182
+ generateAdapter('post', COMMERCE_BASE_URI, REVENUE_UPDATE_PLACE_QUOTE_PATH, 'PlaceQuoteController.placeQuote'),
1183
+ ];
1184
+ registerApiFamilyRoutes(updateQuote);
1185
+ registerApiFamilyRoutes(connect);
1186
+ registerApiFamilyRoutes(connectInternal);
1187
+ registerApiFamilyRoutes(commerce);
1188
+ registerApiFamilyRoutes(guidance);
1189
+ registerApiFamilyRoutes(analytics);
1190
+ registerApiFamilyRoutes(analyticsPrivate);
1191
+ registerApiFamilyRoutes(tableauEmbedding);
1192
+ registerApiFamilyRoutes(scalecenter);
1193
+ registerApiFamilyRoutes(serviceAutomationServiceCatalog);
1194
+ registerApiFamilyRoutes(flow);
1195
+ registerApiFamilyRoutes(flowBuilder);
1196
+ registerApiFamilyRoutes(billing);
1197
+ registerApiFamilyRoutes(marketingIntegration);
1198
+ registerApiFamilyRoutes(videovisits);
1199
+ registerApiFamilyRoutes(interesttagging);
1200
+ registerApiFamilyRoutes(identityVerification);
1201
+ registerApiFamilyRoutes(salesExcellence);
1202
+ registerApiFamilyRoutes(hpiscore);
1203
+ registerApiFamilyRoutes(learningContentPlatform);
1204
+ registerApiFamilyRoutes(timeline);
1205
+ registerApiFamilyRoutes(criteriabasedsearchfilter);
1206
+ registerApiFamilyRoutes(smartDataDiscovery);
1207
+ registerApiFamilyRoutes(assetCreation);
1208
+ registerApiFamilyRoutes(advancedTherapyManagement);
1209
+ registerApiFamilyRoutes(enablementProgram);
1210
+ registerApiFamilyRoutes(namedCredential);
1211
+ registerApiFamilyRoutes(externalServices);
1212
+ registerApiFamilyRoutes(communityInfo);
1213
+ registerApiFamilyRoutes(eSignature);
1214
+ registerApiFamilyRoutes(clauseLibrary);
1215
+ registerApiFamilyRoutes(eriDigest);
1216
+ registerApiFamilyRoutes(peopleApi);
1217
+ registerApiFamilyRoutes(enablement);
1218
+ registerApiFamilyRoutes(assessment);
1219
+ registerApiFamilyRoutes(externalDocApi);
1220
+ registerApiFamilyRoutes(globalization);
1221
+ registerApiFamilyRoutes(dataloading);
1222
+ registerApiFamilyRoutes(salesUserWorkingHours);
1223
+ registerApiFamilyRoutes(scheduler);
1224
+ registerApiFamilyRoutes(industriesContext);
1225
+
1226
+ const UI_API_BASE_URI$1 = `${BASE_URI}/ui-api`;
1227
+ const ACTION_CONFIG = {
1228
+ background: false,
1229
+ hotspot: true,
1230
+ longRunning: false,
1231
+ };
1232
+ const actionConfig = {
1233
+ action: ACTION_CONFIG,
1234
+ };
1235
+
1236
+ /** Invoke executeAggregateUi Aura controller. This is only to be used with large getRecord requests that
1237
+ * would otherwise cause a query length exception.
1238
+ */
1239
+ function dispatchSplitRecordAggregateUiAction$1(endpoint, params, config = {}) {
1240
+ const { action: actionConfig } = config;
1241
+ return executeGlobalControllerRawResponse(endpoint, params, actionConfig).then((body) => {
1242
+ // stuff it into FetchResponse to be handled by lds-network-adapter
1243
+ return new AuraFetchResponse(HttpStatusCode.Ok, body.getReturnValue());
1244
+ }, (error) => {
1245
+ let err;
1246
+ // TODO [W-12255544]: Expose errors to the consumers. Improve the error messages
1247
+ if (!error || !error.getError) {
1248
+ err = new Error('Failed to get error from response');
1249
+ }
1250
+ else {
1251
+ const actionErrors = error.getError();
1252
+ if (actionErrors.length > 0) {
1253
+ err = actionErrors[0];
1254
+ }
1255
+ else {
1256
+ err = new Error('Error fetching component');
1257
+ }
1258
+ }
1259
+ // Handle ConnectInJava exception shapes
1260
+ if (err.data !== undefined && err.data.statusCode !== undefined) {
1261
+ const { data } = err;
1262
+ throw new AuraFetchResponse(data.statusCode, data);
1263
+ }
1264
+ // Handle all the other kind of errors
1265
+ throw new AuraFetchResponse(HttpStatusCode.ServerError, {
1266
+ error: err.message,
1267
+ });
1268
+ });
1269
+ }
1270
+
1271
+ var CrudEventType;
1272
+ (function (CrudEventType) {
1273
+ CrudEventType["CREATE"] = "create";
1274
+ CrudEventType["DELETE"] = "delete";
1275
+ CrudEventType["READ"] = "read";
1276
+ CrudEventType["READS"] = "reads";
1277
+ CrudEventType["UPDATE"] = "update";
1278
+ })(CrudEventType || (CrudEventType = {}));
1279
+ var CrudEventState;
1280
+ (function (CrudEventState) {
1281
+ CrudEventState["ERROR"] = "ERROR";
1282
+ CrudEventState["SUCCESS"] = "SUCCESS";
1283
+ })(CrudEventState || (CrudEventState = {}));
1284
+ const forceRecordTransactionsDisabled = getEnvironmentSetting(EnvironmentSettings.ForceRecordTransactionsDisabled);
1285
+
1286
+ var UiApiRecordController$1;
1287
+ (function (UiApiRecordController) {
1288
+ UiApiRecordController["CreateRecord"] = "RecordUiController.createRecord";
1289
+ UiApiRecordController["DeleteRecord"] = "RecordUiController.deleteRecord";
1290
+ UiApiRecordController["ExecuteAggregateUi"] = "RecordUiController.executeAggregateUi";
1291
+ UiApiRecordController["ExecuteGraphQL"] = "RecordUiController.executeGraphQL";
1292
+ UiApiRecordController["ExecuteGraphQLBatch"] = "RecordUiController.executeBatchGraphQL";
1293
+ UiApiRecordController["GetLayout"] = "RecordUiController.getLayout";
1294
+ UiApiRecordController["GetLayoutUserState"] = "RecordUiController.getLayoutUserState";
1295
+ UiApiRecordController["GetRecordAvatars"] = "RecordUiController.getRecordAvatars";
1296
+ UiApiRecordController["GetRecordTemplateClone"] = "RecordUiController.getRecordDefaultsTemplateClone";
1297
+ UiApiRecordController["GetRecordTemplateCreate"] = "RecordUiController.getRecordDefaultsTemplateForCreate";
1298
+ UiApiRecordController["GetRecordCreateDefaults"] = "RecordUiController.getRecordCreateDefaults";
1299
+ UiApiRecordController["GetRecordUi"] = "RecordUiController.getRecordUis";
1300
+ UiApiRecordController["GetRecordWithFields"] = "RecordUiController.getRecordWithFields";
1301
+ UiApiRecordController["GetRecordsWithFields"] = "RecordUiController.getRecordsWithFields";
1302
+ UiApiRecordController["GetRecordWithLayouts"] = "RecordUiController.getRecordWithLayouts";
1303
+ UiApiRecordController["GetObjectInfo"] = "RecordUiController.getObjectInfo";
1304
+ UiApiRecordController["GetObjectInfos"] = "RecordUiController.getObjectInfos";
1305
+ UiApiRecordController["GetPicklistValues"] = "RecordUiController.getPicklistValues";
1306
+ UiApiRecordController["GetPicklistValuesByRecordType"] = "RecordUiController.getPicklistValuesByRecordType";
1307
+ UiApiRecordController["UpdateRecord"] = "RecordUiController.updateRecord";
1308
+ UiApiRecordController["UpdateRecordAvatar"] = "RecordUiController.postRecordAvatarAssociation";
1309
+ UiApiRecordController["UpdateLayoutUserState"] = "RecordUiController.updateLayoutUserState";
1310
+ UiApiRecordController["GetDuplicateConfiguration"] = "RecordUiController.getDuplicateConfig";
1311
+ UiApiRecordController["GetDuplicates"] = "RecordUiController.findDuplicates";
1312
+ })(UiApiRecordController$1 || (UiApiRecordController$1 = {}));
1313
+ const UIAPI_GET_LAYOUT = `${UI_API_BASE_URI$1}/layout/`;
1314
+ const UIAPI_AGGREGATE_UI_PATH = `${UI_API_BASE_URI$1}/aggregate-ui`;
1315
+ const UIAPI_RECORDS_PATH$1 = `${UI_API_BASE_URI$1}/records`;
1316
+ const UIAPI_RECORDS_BATCH_PATH$1 = `${UI_API_BASE_URI$1}/records/batch/`;
1317
+ const UIAPI_RECORD_AVATARS_BASE = `${UI_API_BASE_URI$1}/record-avatars/`;
1318
+ const UIAPI_RECORD_AVATARS_BATCH_PATH = `${UI_API_BASE_URI$1}/record-avatars/batch/`;
1319
+ const UIAPI_RECORD_AVATAR_UPDATE = `/association`;
1320
+ const UIAPI_RECORD_TEMPLATE_CLONE_PATH = `${UI_API_BASE_URI$1}/record-defaults/template/clone/`;
1321
+ const UIAPI_RECORD_TEMPLATE_CREATE_PATH = `${UI_API_BASE_URI$1}/record-defaults/template/create/`;
1322
+ const UIAPI_RECORD_CREATE_DEFAULTS_PATH = `${UI_API_BASE_URI$1}/record-defaults/create/`;
1323
+ const UIAPI_RECORD_UI_PATH = `${UI_API_BASE_URI$1}/record-ui/`;
1324
+ const UIAPI_GET_LAYOUT_USER_STATE = '/user-state';
1325
+ const UIAPI_OBJECT_INFO_PATH = `${UI_API_BASE_URI$1}/object-info/`;
1326
+ const UIAPI_OBJECT_INFO_BATCH_PATH = `${UI_API_BASE_URI$1}/object-info/batch/`;
1327
+ const UIAPI_DUPLICATE_CONFIGURATION_PATH = `${UI_API_BASE_URI$1}/duplicates/`;
1328
+ const UIAPI_DUPLICATES_PATH = `${UI_API_BASE_URI$1}/predupe`;
1329
+ const UIAPI_GRAPHQL_PATH = `${BASE_URI}/graphql`;
1330
+ const UIAPI_GRAPHQL_BATCH_PATH = `${BASE_URI}/graphql/batch`;
1331
+ let crudInstrumentationCallbacks$1 = null;
1332
+ if (forceRecordTransactionsDisabled === false) {
1333
+ crudInstrumentationCallbacks$1 = {
1334
+ createRecordRejectFunction: (config) => {
1335
+ instrumentation$1.logCrud(CrudEventType.CREATE, {
1336
+ recordId: config.params.recordInput.apiName,
1337
+ state: CrudEventState.ERROR,
1338
+ });
1339
+ },
1340
+ createRecordResolveFunction: (config) => {
1341
+ instrumentation$1.logCrud(CrudEventType.CREATE, {
1342
+ recordId: config.body.id,
1343
+ recordType: config.body.apiName,
1344
+ state: CrudEventState.SUCCESS,
1345
+ });
1346
+ },
1347
+ deleteRecordRejectFunction: (config) => {
1348
+ instrumentation$1.logCrud(CrudEventType.DELETE, {
1349
+ recordId: config.params.recordId,
1350
+ state: CrudEventState.ERROR,
1351
+ });
1352
+ },
1353
+ deleteRecordResolveFunction: (config) => {
1354
+ instrumentation$1.logCrud(CrudEventType.DELETE, {
1355
+ recordId: config.params.recordId,
1356
+ state: CrudEventState.SUCCESS,
1357
+ });
1358
+ },
1359
+ getRecordAggregateRejectFunction: (config) => {
1360
+ instrumentation$1.logCrud(CrudEventType.READ, {
1361
+ recordId: config.params.recordId,
1362
+ state: CrudEventState.ERROR,
1363
+ });
1364
+ },
1365
+ getRecordAggregateResolveFunction: (config) => {
1366
+ instrumentation$1.logCrud(CrudEventType.READ, {
1367
+ recordId: config.params.recordId,
1368
+ recordType: config.body.apiName,
1369
+ state: CrudEventState.SUCCESS,
1370
+ });
1371
+ },
1372
+ getRecordRejectFunction: (config) => {
1373
+ instrumentation$1.logCrud(CrudEventType.READ, {
1374
+ recordId: config.params.recordId,
1375
+ state: CrudEventState.ERROR,
1376
+ });
1377
+ },
1378
+ getRecordResolveFunction: (config) => {
1379
+ instrumentation$1.logCrud(CrudEventType.READ, {
1380
+ recordId: config.params.recordId,
1381
+ recordType: config.body.apiName,
1382
+ state: CrudEventState.SUCCESS,
1383
+ });
1384
+ },
1385
+ updateRecordRejectFunction: (config) => {
1386
+ instrumentation$1.logCrud(CrudEventType.UPDATE, {
1387
+ recordId: config.params.recordId,
1388
+ state: CrudEventState.ERROR,
1389
+ });
1390
+ },
1391
+ updateRecordResolveFunction: (config) => {
1392
+ instrumentation$1.logCrud(CrudEventType.UPDATE, {
1393
+ recordId: config.params.recordId,
1394
+ recordType: config.body.apiName,
1395
+ state: CrudEventState.SUCCESS,
1396
+ });
1397
+ },
1398
+ };
1399
+ }
1400
+ const objectInfoStorage = createStorage({
1401
+ name: 'ldsObjectInfo',
1402
+ expiration: 5 * 60, // 5 minutes, TODO [W-6900122]: Make it sync with RAML definition
1403
+ });
1404
+ const objectInfoStorageStatsLogger = registerLdsCacheStats('getObjectInfo:storage');
1405
+ const layoutStorage = createStorage({
1406
+ name: 'ldsLayout',
1407
+ expiration: 15 * 60, // 15 minutes, TODO [W-6900122]: Make it sync with RAML definition
1408
+ });
1409
+ const layoutStorageStatsLogger = registerLdsCacheStats('getLayout:storage');
1410
+ const layoutUserStateStorage = createStorage({
1411
+ name: 'ldsLayoutUserState',
1412
+ expiration: 15 * 60, // 15 minutes, TODO [W-6900122]: Make it sync with RAML definition
1413
+ });
1414
+ const layoutUserStateStorageStatsLogger = registerLdsCacheStats('getLayoutUserState:storage');
1415
+ function getObjectInfo(resourceRequest, cacheKey) {
1416
+ const params = buildUiApiParams({
1417
+ objectApiName: resourceRequest.urlParams.objectApiName,
1418
+ }, resourceRequest);
1419
+ const config = { ...actionConfig };
1420
+ if (objectInfoStorage !== null) {
1421
+ config.cache = {
1422
+ storage: objectInfoStorage,
1423
+ key: cacheKey,
1424
+ statsLogger: objectInfoStorageStatsLogger,
1425
+ forceRefresh: shouldForceRefresh(resourceRequest),
1426
+ };
1427
+ }
1428
+ return dispatchAction(UiApiRecordController$1.GetObjectInfo, params, config);
1429
+ }
1430
+ function getObjectInfos(resourceRequest, cacheKey) {
1431
+ const params = buildUiApiParams({
1432
+ objectApiNames: resourceRequest.urlParams.objectApiNames,
1433
+ }, resourceRequest);
1434
+ const config = { ...actionConfig };
1435
+ if (objectInfoStorage !== null) {
1436
+ config.cache = {
1437
+ storage: objectInfoStorage,
1438
+ key: cacheKey,
1439
+ statsLogger: objectInfoStorageStatsLogger,
1440
+ forceRefresh: shouldForceRefresh(resourceRequest),
1441
+ };
1442
+ }
1443
+ return dispatchAction(UiApiRecordController$1.GetObjectInfos, params, config);
1444
+ }
1445
+ function executeAggregateUi(resourceRequest) {
1446
+ const aggregateUiParams = {
1447
+ input: resourceRequest.body,
1448
+ };
1449
+ return dispatchSplitRecordAggregateUiAction$1(UiApiRecordController$1.ExecuteAggregateUi, aggregateUiParams, actionConfig);
1450
+ }
1451
+ function getRecord(resourceRequest) {
1452
+ const { urlParams, queryParams } = resourceRequest;
1453
+ const { recordId } = urlParams;
1454
+ const { fields, layoutTypes, modes, optionalFields } = queryParams;
1455
+ let getRecordParams = {};
1456
+ let controller;
1457
+ if (layoutTypes !== undefined) {
1458
+ getRecordParams = {
1459
+ recordId,
1460
+ layoutTypes,
1461
+ modes,
1462
+ optionalFields,
1463
+ };
1464
+ controller = UiApiRecordController$1.GetRecordWithLayouts;
1465
+ }
1466
+ else {
1467
+ getRecordParams = {
1468
+ recordId,
1469
+ fields,
1470
+ optionalFields,
1471
+ };
1472
+ controller = UiApiRecordController$1.GetRecordWithFields;
1473
+ }
1474
+ const params = buildUiApiParams(getRecordParams, resourceRequest);
1475
+ const instrumentationCallbacks = crudInstrumentationCallbacks$1 !== null
1476
+ ? {
1477
+ rejectFn: crudInstrumentationCallbacks$1.getRecordRejectFunction,
1478
+ resolveFn: crudInstrumentationCallbacks$1.getRecordResolveFunction,
1479
+ }
1480
+ : {};
1481
+ return dispatchAction(controller, params, actionConfig, instrumentationCallbacks);
1482
+ }
1483
+ function getRecords(resourceRequest) {
1484
+ const { urlParams, queryParams } = resourceRequest;
1485
+ const { recordIds } = urlParams;
1486
+ const { fields, optionalFields } = queryParams;
1487
+ // Note: in getRecords batch case, we don't use the aggregate UI hack.
1488
+ const getRecordsParams = {
1489
+ recordIds,
1490
+ fields,
1491
+ optionalFields,
1492
+ };
1493
+ const params = buildUiApiParams(getRecordsParams, resourceRequest);
1494
+ return dispatchAction(UiApiRecordController$1.GetRecordsWithFields, params, actionConfig);
1495
+ }
1496
+ function createRecord(resourceRequest) {
1497
+ const { body, queryParams: { useDefaultRule, triggerUserEmail, triggerOtherEmail }, } = resourceRequest;
1498
+ const params = buildUiApiParams({
1499
+ useDefaultRule,
1500
+ triggerOtherEmail,
1501
+ triggerUserEmail,
1502
+ recordInput: body,
1503
+ }, resourceRequest);
1504
+ const instrumentationCallbacks = crudInstrumentationCallbacks$1 !== null
1505
+ ? {
1506
+ rejectFn: crudInstrumentationCallbacks$1.createRecordRejectFunction,
1507
+ resolveFn: crudInstrumentationCallbacks$1.createRecordResolveFunction,
1508
+ }
1509
+ : {};
1510
+ return dispatchAction(UiApiRecordController$1.CreateRecord, params, actionConfig, instrumentationCallbacks);
1511
+ }
1512
+ function deleteRecord(resourceRequest) {
1513
+ const { urlParams } = resourceRequest;
1514
+ const params = buildUiApiParams({
1515
+ recordId: urlParams.recordId,
1516
+ }, resourceRequest);
1517
+ const instrumentationCallbacks = crudInstrumentationCallbacks$1 !== null
1518
+ ? {
1519
+ rejectFn: crudInstrumentationCallbacks$1.deleteRecordRejectFunction,
1520
+ resolveFn: crudInstrumentationCallbacks$1.deleteRecordResolveFunction,
1521
+ }
1522
+ : {};
1523
+ return dispatchAction(UiApiRecordController$1.DeleteRecord, params, actionConfig, instrumentationCallbacks);
1524
+ }
1525
+ function updateRecord(resourceRequest) {
1526
+ const { body, urlParams, queryParams: { useDefaultRule, triggerUserEmail, triggerOtherEmail }, } = resourceRequest;
1527
+ const params = buildUiApiParams({
1528
+ useDefaultRule,
1529
+ triggerOtherEmail,
1530
+ triggerUserEmail,
1531
+ recordId: urlParams.recordId,
1532
+ recordInput: body,
1533
+ }, resourceRequest);
1534
+ const instrumentationCallbacks = crudInstrumentationCallbacks$1 !== null
1535
+ ? {
1536
+ rejectFn: crudInstrumentationCallbacks$1.updateRecordRejectFunction,
1537
+ resolveFn: crudInstrumentationCallbacks$1.updateRecordResolveFunction,
1538
+ }
1539
+ : {};
1540
+ return dispatchAction(UiApiRecordController$1.UpdateRecord, params, actionConfig, instrumentationCallbacks);
1541
+ }
1542
+ function updateLayoutUserState(resourceRequest) {
1543
+ const { body, urlParams: { objectApiName }, queryParams: { layoutType, mode, recordTypeId }, } = resourceRequest;
1544
+ const params = buildUiApiParams({
1545
+ objectApiName,
1546
+ layoutType,
1547
+ mode,
1548
+ recordTypeId,
1549
+ userState: body,
1550
+ }, resourceRequest);
1551
+ return dispatchAction(UiApiRecordController$1.UpdateLayoutUserState, params, actionConfig).then((response) => {
1552
+ // eslint-disable-next-line @salesforce/lds/no-invalid-todo
1553
+ // TODO: Instead of surgically evicting the record that has been updated in the cache we
1554
+ // currently dump all the entries. We need a way to recreate the same cache key between
1555
+ // getLayoutUserState and updateLayoutUserState.
1556
+ if (layoutUserStateStorage !== null) {
1557
+ layoutUserStateStorage.clear().catch(() => { }); // intentional noop on error
1558
+ }
1559
+ return response;
1560
+ });
1561
+ }
1562
+ function getRecordAvatars(resourceRequest) {
1563
+ const { urlParams } = resourceRequest;
1564
+ const recordIds = urlParams.recordIds;
1565
+ const params = buildUiApiParams({ recordIds }, resourceRequest);
1566
+ return dispatchAction(UiApiRecordController$1.GetRecordAvatars, params, actionConfig);
1567
+ }
1568
+ function updateRecordAvatar(resourceRequest) {
1569
+ const { urlParams, body } = resourceRequest;
1570
+ const params = buildUiApiParams({ input: body, recordId: urlParams.recordId }, resourceRequest);
1571
+ return dispatchAction(UiApiRecordController$1.UpdateRecordAvatar, params, actionConfig);
1572
+ }
1573
+ function getRecordUi(resourceRequest) {
1574
+ const { urlParams: { recordIds }, queryParams: { layoutTypes, modes, optionalFields }, } = resourceRequest;
1575
+ const params = buildUiApiParams({
1576
+ layoutTypes,
1577
+ modes,
1578
+ optionalFields,
1579
+ recordIds,
1580
+ }, resourceRequest);
1581
+ return dispatchAction(UiApiRecordController$1.GetRecordUi, params, actionConfig);
1582
+ }
1583
+ function getPicklistValues(resourceRequest) {
1584
+ const { urlParams } = resourceRequest;
1585
+ const params = buildUiApiParams({
1586
+ objectApiName: urlParams.objectApiName,
1587
+ recordTypeId: urlParams.recordTypeId,
1588
+ fieldApiName: urlParams.fieldApiName,
1589
+ }, resourceRequest);
1590
+ return dispatchAction(UiApiRecordController$1.GetPicklistValues, params, actionConfig);
1591
+ }
1592
+ function getPicklistValuesByRecordType(resourceRequest) {
1593
+ const { urlParams: { objectApiName, recordTypeId }, } = resourceRequest;
1594
+ const params = buildUiApiParams({
1595
+ objectApiName,
1596
+ recordTypeId,
1597
+ }, resourceRequest);
1598
+ return dispatchAction(UiApiRecordController$1.GetPicklistValuesByRecordType, params, actionConfig);
1599
+ }
1600
+ function getLayout(resourceRequest, cacheKey) {
1601
+ const { urlParams: { objectApiName }, queryParams: { layoutType, mode, recordTypeId }, } = resourceRequest;
1602
+ const params = buildUiApiParams({
1603
+ objectApiName,
1604
+ layoutType,
1605
+ mode,
1606
+ recordTypeId,
1607
+ }, resourceRequest);
1608
+ const config = { ...actionConfig };
1609
+ if (layoutStorage !== null) {
1610
+ config.cache = {
1611
+ storage: layoutStorage,
1612
+ key: cacheKey,
1613
+ statsLogger: layoutStorageStatsLogger,
1614
+ forceRefresh: shouldForceRefresh(resourceRequest),
1615
+ };
1616
+ }
1617
+ return dispatchAction(UiApiRecordController$1.GetLayout, params, config);
1618
+ }
1619
+ function getLayoutUserState(resourceRequest, cacheKey) {
1620
+ const { urlParams: { objectApiName }, queryParams: { layoutType, mode, recordTypeId }, } = resourceRequest;
1621
+ const params = buildUiApiParams({
1622
+ objectApiName,
1623
+ layoutType,
1624
+ mode,
1625
+ recordTypeId,
1626
+ }, resourceRequest);
1627
+ const config = { ...actionConfig };
1628
+ if (layoutUserStateStorage !== null) {
1629
+ config.cache = {
1630
+ storage: layoutUserStateStorage,
1631
+ key: cacheKey,
1632
+ statsLogger: layoutUserStateStorageStatsLogger,
1633
+ forceRefresh: shouldForceRefresh(resourceRequest),
1634
+ };
1635
+ }
1636
+ return dispatchAction(UiApiRecordController$1.GetLayoutUserState, params, config);
1637
+ }
1638
+ function getRecordTemplateClone(resourceRequest) {
1639
+ const { urlParams: { recordId }, queryParams: { optionalFields, recordTypeId }, } = resourceRequest;
1640
+ const params = buildUiApiParams({
1641
+ recordId,
1642
+ recordTypeId,
1643
+ optionalFields,
1644
+ }, resourceRequest);
1645
+ return dispatchAction(UiApiRecordController$1.GetRecordTemplateClone, params, actionConfig);
1646
+ }
1647
+ function getRecordTemplateCreate(resourceRequest) {
1648
+ const { urlParams: { objectApiName }, queryParams: { optionalFields, recordTypeId }, } = resourceRequest;
1649
+ const params = buildUiApiParams({
1650
+ objectApiName,
1651
+ recordTypeId,
1652
+ optionalFields,
1653
+ }, resourceRequest);
1654
+ return dispatchAction(UiApiRecordController$1.GetRecordTemplateCreate, params, actionConfig);
1655
+ }
1656
+ function getRecordCreateDefaults(resourceRequest) {
1657
+ const { urlParams: { objectApiName }, queryParams: { formFactor, optionalFields, recordTypeId }, } = resourceRequest;
1658
+ const params = buildUiApiParams({
1659
+ objectApiName,
1660
+ formFactor,
1661
+ recordTypeId,
1662
+ optionalFields,
1663
+ }, resourceRequest);
1664
+ return dispatchAction(UiApiRecordController$1.GetRecordCreateDefaults, params, actionConfig);
1665
+ }
1666
+ function getDuplicateConfiguration(resourceRequest) {
1667
+ const params = buildUiApiParams({
1668
+ objectApiName: resourceRequest.urlParams.objectApiName,
1669
+ recordTypeId: resourceRequest.queryParams.recordTypeId,
1670
+ }, resourceRequest);
1671
+ return dispatchAction(UiApiRecordController$1.GetDuplicateConfiguration, params, actionConfig);
1672
+ }
1673
+ function getDuplicates(resourceRequest) {
1674
+ const { body } = resourceRequest;
1675
+ const params = buildUiApiParams({
1676
+ recordInput: body,
1677
+ }, resourceRequest);
1678
+ return dispatchAction(UiApiRecordController$1.GetDuplicates, params, actionConfig);
1679
+ }
1680
+ function executeGraphQL(resourceRequest) {
1681
+ const controller = UiApiRecordController$1.ExecuteGraphQL;
1682
+ // The endpoint uses a strange queryInput object wrapper around the parameters.
1683
+ const params = buildUiApiParams({
1684
+ queryInput: resourceRequest.body,
1685
+ }, resourceRequest);
1686
+ return dispatchAction(controller, params, actionConfig);
1687
+ }
1688
+ function executeGraphQLBatch(resourceRequest) {
1689
+ const controller = UiApiRecordController$1.ExecuteGraphQLBatch;
1690
+ // The endpoint uses a strange QUERY_INPUT_PARAMETER object wrapper around the parameters.
1691
+ const params = buildUiApiParams({
1692
+ QUERY_INPUT_PARAMETER: resourceRequest.body,
1693
+ }, resourceRequest);
1694
+ return dispatchAction(controller, params, actionConfig);
1695
+ }
1696
+ router.delete((path) => path.startsWith(UIAPI_RECORDS_PATH$1), deleteRecord);
1697
+ router.patch((path) => path.startsWith(UIAPI_RECORDS_PATH$1), updateRecord);
1698
+ router.patch((path) => path.startsWith(UIAPI_GET_LAYOUT) && path.endsWith(UIAPI_GET_LAYOUT_USER_STATE), updateLayoutUserState);
1699
+ router.post((path) => path === UIAPI_RECORDS_PATH$1, createRecord);
1700
+ router.post((path) => path.startsWith(UIAPI_RECORD_AVATARS_BASE) && path.endsWith(UIAPI_RECORD_AVATAR_UPDATE), updateRecordAvatar);
1701
+ router.get((path) => path.startsWith(UIAPI_GET_LAYOUT) && path.endsWith(UIAPI_GET_LAYOUT_USER_STATE), getLayoutUserState);
1702
+ router.get((path) => path.startsWith(UIAPI_GET_LAYOUT) && path.endsWith(UIAPI_GET_LAYOUT_USER_STATE) === false, getLayout);
1703
+ // object-info/batch/
1704
+ router.get((path) => path.startsWith(UIAPI_OBJECT_INFO_BATCH_PATH), getObjectInfos);
1705
+ // object-info/API_NAME/picklist-values/RECORD_TYPE_ID/FIELD_API_NAME
1706
+ router.get((path) => path.startsWith(UIAPI_OBJECT_INFO_PATH) &&
1707
+ /picklist-values\/[a-zA-Z\d]+\/[a-zA-Z\d]+/.test(path), getPicklistValues);
1708
+ // object-info/API_NAME/picklist-values/RECORD_TYPE_ID
1709
+ router.get((path) => path.startsWith(UIAPI_OBJECT_INFO_PATH) && /picklist-values\/[a-zA-Z\d]+/.test(path), getPicklistValuesByRecordType);
1710
+ router.get((path) => path.startsWith(UIAPI_OBJECT_INFO_PATH) &&
1711
+ path.startsWith(UIAPI_OBJECT_INFO_BATCH_PATH) === false &&
1712
+ /picklist-values\/[a-zA-Z\d]+\/[a-zA-Z\d]+/.test(path) === false &&
1713
+ /picklist-values\/[a-zA-Z\d]+/.test(path) === false, getObjectInfo);
1714
+ router.post((path) => path.startsWith(UIAPI_AGGREGATE_UI_PATH), executeAggregateUi);
1715
+ router.get((path) => path.startsWith(UIAPI_RECORDS_BATCH_PATH$1), getRecords); // Must be registered before getRecord since they both begin with /records.
1716
+ router.get((path) => path.startsWith(UIAPI_RECORDS_PATH$1), getRecord);
1717
+ router.get((path) => path.startsWith(UIAPI_RECORD_TEMPLATE_CLONE_PATH), getRecordTemplateClone);
1718
+ router.get((path) => path.startsWith(UIAPI_RECORD_TEMPLATE_CREATE_PATH), getRecordTemplateCreate);
1719
+ router.get((path) => path.startsWith(UIAPI_RECORD_CREATE_DEFAULTS_PATH), getRecordCreateDefaults);
1720
+ router.get((path) => path.startsWith(UIAPI_RECORD_AVATARS_BATCH_PATH), getRecordAvatars);
1721
+ router.get((path) => path.startsWith(UIAPI_RECORD_UI_PATH), getRecordUi);
1722
+ router.get((path) => path.startsWith(UIAPI_DUPLICATE_CONFIGURATION_PATH), getDuplicateConfiguration);
1723
+ router.post((path) => path.startsWith(UIAPI_DUPLICATES_PATH), getDuplicates);
1724
+ router.post((path) => path === UIAPI_GRAPHQL_PATH, executeGraphQL);
1725
+ router.post((path) => path === UIAPI_GRAPHQL_BATCH_PATH, executeGraphQLBatch);
1726
+
1727
+ var UiApiActionsController;
1728
+ (function (UiApiActionsController) {
1729
+ UiApiActionsController["GetLookupActions"] = "ActionsController.getLookupActions";
1730
+ UiApiActionsController["GetRecordActions"] = "ActionsController.getRecordActions";
1731
+ UiApiActionsController["GetRecordEditActions"] = "ActionsController.getRecordEditActions";
1732
+ UiApiActionsController["GetObjectCreateActions"] = "ActionsController.getObjectCreateActions";
1733
+ UiApiActionsController["PostRelatedListActions"] = "ActionsController.postRelatedListActions";
1734
+ UiApiActionsController["GetRelatedListsActions"] = "ActionsController.getRelatedListsActions";
1735
+ UiApiActionsController["GetRelatedListRecordActions"] = "ActionsController.getRelatedListRecordActions";
1736
+ UiApiActionsController["GetGlobalActions"] = "ActionsController.getGlobalActions";
1737
+ UiApiActionsController["GetQuickActionDefaults"] = "ActionsController.getQuickActionDefaults";
1738
+ UiApiActionsController["GetActionOverrides"] = "ActionsController.getActionOverrides";
1739
+ UiApiActionsController["PerformQuickAction"] = "ActionsController.performQuickAction";
1740
+ UiApiActionsController["PerformUpdateRecordQuickAction"] = "ActionsController.performUpdateRecordQuickAction";
1741
+ UiApiActionsController["PostRelatedListsActions"] = "ActionsController.postRelatedListsActions";
1742
+ })(UiApiActionsController || (UiApiActionsController = {}));
1743
+ const UIAPI_ACTIONS_LOOKUP_PATH = `${UI_API_BASE_URI$1}/actions/lookup/`;
1744
+ const UIAPI_ACTIONS_RECORD_PATH = `${UI_API_BASE_URI$1}/actions/record/`;
1745
+ const UIAPI_ACTIONS_GLOBAL_PATH = `${UI_API_BASE_URI$1}/actions/global`;
1746
+ const UIAPI_ACTIONS_OBJECT_PATH = `${UI_API_BASE_URI$1}/actions/object/`;
1747
+ const UIAPI_ACTIONS_RECORD_EDIT = '/record-edit';
1748
+ const UIAPI_ACTIONS_RELATED_LIST = '/related-list/';
1749
+ const UIAPI_ACTIONS_OBJECT_CREATE = '/record-create';
1750
+ const UIAPI_ACTIONS_RELATED_LIST_BATCH = '/related-list/batch';
1751
+ const UIAPI_ACTIONS_RELATED_LIST_RECORD = '/related-list-record/';
1752
+ const UIAPI_ACTIONS_QUICKACTION_DEFAULTS_PATH = `${UI_API_BASE_URI$1}/actions/record-defaults/`;
1753
+ const UIAPI_ACTIONS_ACTIONOVERRIDES_PATH = `${UI_API_BASE_URI$1}/actions/overrides/`;
1754
+ const UIAPI_ACTIONS_PERFORM_QUICK_ACTION_PATH = `${UI_API_BASE_URI$1}/actions/perform-quick-action/`;
1755
+ function getLookupActions(resourceRequest) {
1756
+ const { urlParams: { objectApiNames }, queryParams, } = resourceRequest;
1757
+ const parameters = buildUiApiParams({ objectApiNames, ...queryParams }, resourceRequest);
1758
+ return dispatchAction(UiApiActionsController.GetLookupActions, parameters);
1759
+ }
1760
+ function getRecordActions(resourceRequest) {
1761
+ const { urlParams: { recordIds }, queryParams, } = resourceRequest;
1762
+ const parameters = buildUiApiParams({ recordIds, ...queryParams }, resourceRequest);
1763
+ return dispatchAction(UiApiActionsController.GetRecordActions, parameters);
1764
+ }
1765
+ function getRecordEditActions(resourceRequest) {
1766
+ const { urlParams: { recordIds }, queryParams, } = resourceRequest;
1767
+ const parameters = buildUiApiParams({ recordIds, ...queryParams }, resourceRequest);
1768
+ return dispatchAction(UiApiActionsController.GetRecordEditActions, parameters);
1769
+ }
1770
+ function postRelatedListActions(resourceRequest) {
1771
+ const { urlParams: { recordIds, relatedListId }, body, } = resourceRequest;
1772
+ const parameters = buildUiApiParams({ recordIds, relatedListId, listRecordActionsQuery: body }, resourceRequest);
1773
+ return dispatchAction(UiApiActionsController.PostRelatedListActions, parameters);
1774
+ }
1775
+ function postRelatedListsActions(resourceRequest) {
1776
+ const { urlParams: { recordIds }, body, } = resourceRequest;
1777
+ const parameters = buildUiApiParams({ recordIds, listRecordActionsQuery: body }, resourceRequest);
1778
+ return dispatchAction(UiApiActionsController.PostRelatedListsActions, parameters);
1779
+ }
1780
+ function getRelatedListsActions(resourceRequest) {
1781
+ const { urlParams: { recordIds, relatedListIds }, queryParams, } = resourceRequest;
1782
+ const parameters = buildUiApiParams({ recordIds, relatedListIds, ...queryParams }, resourceRequest);
1783
+ return dispatchAction(UiApiActionsController.GetRelatedListsActions, parameters);
1784
+ }
1785
+ function getRelatedListRecordActions(resourceRequest) {
1786
+ const { urlParams: { recordIds, relatedListRecordIds }, queryParams, } = resourceRequest;
1787
+ const parameters = buildUiApiParams({ recordIds, relatedListRecordIds, ...queryParams }, resourceRequest);
1788
+ return dispatchAction(UiApiActionsController.GetRelatedListRecordActions, parameters);
1789
+ }
1790
+ function getObjectCreateActions(resourceRequest) {
1791
+ const { urlParams: { objectApiName }, queryParams, } = resourceRequest;
1792
+ const parameters = buildUiApiParams({ objectApiName, ...queryParams }, resourceRequest);
1793
+ return dispatchAction(UiApiActionsController.GetObjectCreateActions, parameters);
1794
+ }
1795
+ function getGlobalActions(resourceRequest) {
1796
+ const { queryParams } = resourceRequest;
1797
+ const parameters = buildUiApiParams({ ...queryParams }, resourceRequest);
1798
+ return dispatchAction(UiApiActionsController.GetGlobalActions, parameters);
1799
+ }
1800
+ function getActionOverrides(resourceRequest) {
1801
+ const { urlParams: { objectApiName }, queryParams, } = resourceRequest;
1802
+ const parameters = buildUiApiParams({ objectApiName, ...queryParams }, resourceRequest);
1803
+ return dispatchAction(UiApiActionsController.GetActionOverrides, parameters);
1804
+ }
1805
+ function getQuickActionDefaults(resourceRequest) {
1806
+ const { urlParams: { actionApiName }, queryParams, } = resourceRequest;
1807
+ const parameters = buildUiApiParams({ actionApiName, ...queryParams }, resourceRequest);
1808
+ return dispatchAction(UiApiActionsController.GetQuickActionDefaults, parameters);
1809
+ }
1810
+ function performUpdateRecordQuickAction(resourceRequest) {
1811
+ const { urlParams: { actionApiName }, body, } = resourceRequest;
1812
+ const parameters = buildUiApiParams({ actionApiName, performQuickActionInput: body }, resourceRequest);
1813
+ return dispatchAction(UiApiActionsController.PerformUpdateRecordQuickAction, parameters);
1814
+ }
1815
+ function performQuickAction(resourceRequest) {
1816
+ const { urlParams: { actionApiName }, body, } = resourceRequest;
1817
+ const parameters = buildUiApiParams({ actionApiName, performQuickActionInput: body }, resourceRequest);
1818
+ return dispatchAction(UiApiActionsController.PerformQuickAction, parameters);
1819
+ }
1820
+ router.get((path) => path.startsWith(UIAPI_ACTIONS_LOOKUP_PATH), getLookupActions);
1821
+ router.get((path) => path.startsWith(UIAPI_ACTIONS_RECORD_PATH) && path.endsWith(UIAPI_ACTIONS_RECORD_EDIT), getRecordEditActions);
1822
+ router.get((path) => path.startsWith(UIAPI_ACTIONS_RECORD_PATH) &&
1823
+ path.indexOf(UIAPI_ACTIONS_RELATED_LIST_RECORD) > 0, getRelatedListRecordActions);
1824
+ router.post((path) => path.startsWith(UIAPI_ACTIONS_RECORD_PATH) &&
1825
+ path.indexOf(UIAPI_ACTIONS_RELATED_LIST) > 0 &&
1826
+ path.indexOf(UIAPI_ACTIONS_RELATED_LIST_BATCH) === -1, postRelatedListActions);
1827
+ router.post((path) => path.startsWith(UIAPI_ACTIONS_RECORD_PATH) &&
1828
+ path.indexOf(UIAPI_ACTIONS_RELATED_LIST_BATCH) > 0, postRelatedListsActions);
1829
+ router.get((path) => path.startsWith(UIAPI_ACTIONS_RECORD_PATH) &&
1830
+ path.indexOf(UIAPI_ACTIONS_RELATED_LIST_BATCH) > 0, getRelatedListsActions);
1831
+ router.get((path) => path.startsWith(UIAPI_ACTIONS_RECORD_PATH) &&
1832
+ path.indexOf(UIAPI_ACTIONS_RELATED_LIST) === -1 &&
1833
+ path.indexOf(UIAPI_ACTIONS_RELATED_LIST_RECORD) === -1 &&
1834
+ !path.endsWith(UIAPI_ACTIONS_RECORD_EDIT), getRecordActions);
1835
+ router.get((path) => path.startsWith(UIAPI_ACTIONS_OBJECT_PATH) && path.indexOf(UIAPI_ACTIONS_OBJECT_CREATE) > 0, getObjectCreateActions);
1836
+ router.get((path) => path.startsWith(UIAPI_ACTIONS_GLOBAL_PATH), getGlobalActions);
1837
+ router.get((path) => path.startsWith(UIAPI_ACTIONS_QUICKACTION_DEFAULTS_PATH), getQuickActionDefaults);
1838
+ router.get((path) => path.startsWith(UIAPI_ACTIONS_ACTIONOVERRIDES_PATH), getActionOverrides);
1839
+ router.patch((path) => path.startsWith(UIAPI_ACTIONS_PERFORM_QUICK_ACTION_PATH), performUpdateRecordQuickAction);
1840
+ router.post((path) => path.startsWith(UIAPI_ACTIONS_PERFORM_QUICK_ACTION_PATH), performQuickAction);
1841
+
1842
+ var UiApiListsController;
1843
+ (function (UiApiListsController) {
1844
+ UiApiListsController["GetListsByObjectName"] = "ListUiController.getListsByObjectName";
1845
+ UiApiListsController["GetListUiById"] = "ListUiController.getListUiById";
1846
+ UiApiListsController["GetListRecordsById"] = "ListUiController.getListRecordsById";
1847
+ UiApiListsController["GetListUiByName"] = "ListUiController.getListUiByName";
1848
+ UiApiListsController["GetListInfoByName"] = "ListUiController.getListInfoByName";
1849
+ UiApiListsController["GetListInfosByName"] = "ListUiController.getListInfosByName";
1850
+ UiApiListsController["GetListRecordsByName"] = "ListUiController.getListRecordsByName";
1851
+ })(UiApiListsController || (UiApiListsController = {}));
1852
+ const UIAPI_LIST_RECORDS_PATH = `${UI_API_BASE_URI$1}/list-records/`;
1853
+ const UIAPI_LIST_UI_PATH = `${UI_API_BASE_URI$1}/list-ui/`;
1854
+ const UIAPI_LIST_INFO_PATH = `${UI_API_BASE_URI$1}/list-info/`;
1855
+ const UIAPI_LIST_INFO_BATCH_PATH = `${UIAPI_LIST_INFO_PATH}batch`;
1856
+ function getListRecordsByName(resourceRequest) {
1857
+ const { urlParams: { objectApiName, listViewApiName }, queryParams: { fields, optionalFields, pageSize, pageToken, sortBy }, } = resourceRequest;
1858
+ const params = buildUiApiParams({
1859
+ objectApiName,
1860
+ listViewApiName,
1861
+ fields,
1862
+ optionalFields,
1863
+ pageSize,
1864
+ pageToken,
1865
+ sortBy,
1866
+ }, resourceRequest);
1867
+ return dispatchAction(UiApiListsController.GetListRecordsByName, params);
1868
+ }
1869
+ function getListRecordsById(resourceRequest) {
1870
+ const { urlParams: { listViewId }, queryParams: { fields, optionalFields, pageSize, pageToken, sortBy }, } = resourceRequest;
1871
+ const params = buildUiApiParams({
1872
+ listViewId,
1873
+ fields,
1874
+ optionalFields,
1875
+ pageSize,
1876
+ pageToken,
1877
+ sortBy,
1878
+ }, resourceRequest);
1879
+ return dispatchAction(UiApiListsController.GetListRecordsById, params);
1880
+ }
1881
+ function getListUiByName(resourceRequest) {
1882
+ const { urlParams: { objectApiName, listViewApiName }, queryParams: { fields, optionalFields, pageSize, pageToken, sortBy }, } = resourceRequest;
1883
+ const params = buildUiApiParams({
1884
+ objectApiName,
1885
+ listViewApiName,
1886
+ fields,
1887
+ optionalFields,
1888
+ pageSize,
1889
+ pageToken,
1890
+ sortBy,
1891
+ }, resourceRequest);
1892
+ return dispatchAction(UiApiListsController.GetListUiByName, params);
1893
+ }
1894
+ function getListUiById(resourceRequest) {
1895
+ const { urlParams: { listViewId }, queryParams: { fields, optionalFields, pageSize, pageToken, sortBy }, } = resourceRequest;
1896
+ const params = buildUiApiParams({
1897
+ listViewId,
1898
+ fields,
1899
+ optionalFields,
1900
+ pageSize,
1901
+ pageToken,
1902
+ sortBy,
1903
+ }, resourceRequest);
1904
+ return dispatchAction(UiApiListsController.GetListUiById, params);
1905
+ }
1906
+ function getListInfoByName(resourceRequest) {
1907
+ const { urlParams: { objectApiName, listViewApiName }, } = resourceRequest;
1908
+ const params = buildUiApiParams({
1909
+ objectApiName,
1910
+ listViewApiName,
1911
+ }, resourceRequest);
1912
+ return dispatchAction(UiApiListsController.GetListInfoByName, params);
1913
+ }
1914
+ function getListInfosByName(resourceRequest) {
1915
+ const { queryParams: { names }, } = resourceRequest;
1916
+ const params = buildUiApiParams({
1917
+ names,
1918
+ }, resourceRequest);
1919
+ return dispatchAction(UiApiListsController.GetListInfosByName, params);
1920
+ }
1921
+ function getListsByObjectName(resourceRequest) {
1922
+ const { urlParams: { objectApiName }, queryParams: { pageSize, pageToken, q, recentListsOnly }, } = resourceRequest;
1923
+ const params = buildUiApiParams({
1924
+ objectApiName,
1925
+ pageSize,
1926
+ pageToken,
1927
+ q,
1928
+ recentListsOnly,
1929
+ }, resourceRequest);
1930
+ return dispatchAction(UiApiListsController.GetListsByObjectName, params);
1931
+ }
1932
+ // .../list-records/${objectApiName}/${listViewApiName}
1933
+ router.get((path) => path.startsWith(UIAPI_LIST_RECORDS_PATH) && /list-records\/.*\//.test(path), getListRecordsByName);
1934
+ // .../list-records/${listViewId}
1935
+ router.get((path) => path.startsWith(UIAPI_LIST_RECORDS_PATH) && /list-records\/.*\//.test(path) === false, getListRecordsById);
1936
+ // .../list-ui/${objectApiName}/${listViewApiName}
1937
+ router.get((path) => path.startsWith(UIAPI_LIST_UI_PATH) && /list-ui\/.*\//.test(path), getListUiByName);
1938
+ // .../list-ui/${listViewId}
1939
+ router.get((path) => path.startsWith(UIAPI_LIST_UI_PATH) && /00B[a-zA-Z\d]{15}$/.test(path), getListUiById);
1940
+ // .../list-ui/${objectApiName}
1941
+ router.get((path) => path.startsWith(UIAPI_LIST_UI_PATH) &&
1942
+ /list-ui\/.*\//.test(path) === false &&
1943
+ /00B[a-zA-Z\d]{15}$/.test(path) === false, getListsByObjectName);
1944
+ // .../list-info/batch
1945
+ router.get((path) => path.startsWith(`${UIAPI_LIST_INFO_BATCH_PATH}`), getListInfosByName);
1946
+ // .../list-info/${objectApiName}/${listViewApiName}
1947
+ router.get((path) => path.startsWith(UIAPI_LIST_INFO_PATH) && /list-info\/.*\//.test(path), getListInfoByName);
1948
+
1949
+ const UIAPI_LOOKUP_RECORDS = `${UI_API_BASE_URI$1}/lookups`;
1950
+ const LookupRecords = 'LookupController.getLookupRecords';
1951
+ function lookupRecords(resourceRequest) {
1952
+ const { urlParams, queryParams } = resourceRequest;
1953
+ const params = buildUiApiParams({
1954
+ ...urlParams,
1955
+ ...queryParams,
1956
+ }, resourceRequest);
1957
+ return dispatchAction(LookupRecords, params);
1958
+ }
1959
+ router.get((path) => path.startsWith(UIAPI_LOOKUP_RECORDS), lookupRecords);
1960
+
1961
+ var UiApiMruListsController;
1962
+ (function (UiApiMruListsController) {
1963
+ UiApiMruListsController["GetMruListUi"] = "MruListUiController.getMruListUi";
1964
+ UiApiMruListsController["GetMruListRecords"] = "MruListUiController.getMruListRecords";
1965
+ })(UiApiMruListsController || (UiApiMruListsController = {}));
1966
+ const UIAPI_MRU_LIST_RECORDS_PATH = `${UI_API_BASE_URI$1}/mru-list-records/`;
1967
+ const UIAPI_MRU_LIST_UI_PATH = `${UI_API_BASE_URI$1}/mru-list-ui/`;
1968
+ function getMruListRecords(resourceRequest) {
1969
+ const { urlParams: { objectApiName }, queryParams: { fields, optionalFields, pageSize, pageToken, sortBy }, } = resourceRequest;
1970
+ const params = buildUiApiParams({
1971
+ objectApiName,
1972
+ fields,
1973
+ optionalFields,
1974
+ pageSize,
1975
+ pageToken,
1976
+ sortBy,
1977
+ }, resourceRequest);
1978
+ return dispatchAction(UiApiMruListsController.GetMruListRecords, params);
1979
+ }
1980
+ function getMruListUi(resourceRequest) {
1981
+ const { urlParams: { objectApiName }, queryParams: { fields, optionalFields, pageSize, pageToken, sortBy }, } = resourceRequest;
1982
+ const params = buildUiApiParams({
1983
+ objectApiName,
1984
+ fields,
1985
+ optionalFields,
1986
+ pageSize,
1987
+ pageToken,
1988
+ sortBy,
1989
+ }, resourceRequest);
1990
+ return dispatchAction(UiApiMruListsController.GetMruListUi, params);
1991
+ }
1992
+ router.get((path) => path.startsWith(UIAPI_MRU_LIST_RECORDS_PATH), getMruListRecords);
1993
+ router.get((path) => path.startsWith(UIAPI_MRU_LIST_UI_PATH), getMruListUi);
1994
+
1995
+ var UiApiRecordController;
1996
+ (function (UiApiRecordController) {
1997
+ UiApiRecordController["GetRelatedListInfo"] = "RelatedListUiController.getRelatedListInfoByApiName";
1998
+ UiApiRecordController["UpdateRelatedListInfo"] = "RelatedListUiController.updateRelatedListInfoByApiName";
1999
+ UiApiRecordController["GetRelatedListsInfo"] = "RelatedListUiController.getRelatedListInfoCollection";
2000
+ UiApiRecordController["PostRelatedListRecords"] = "RelatedListUiController.postRelatedListRecords";
2001
+ UiApiRecordController["GetRelatedListCount"] = "RelatedListUiController.getRelatedListRecordCount";
2002
+ UiApiRecordController["GetRelatedListCounts"] = "RelatedListUiController.getRelatedListsRecordCount";
2003
+ UiApiRecordController["GetRelatedListInfoBatch"] = "RelatedListUiController.getRelatedListInfoBatch";
2004
+ UiApiRecordController["GetRelatedListPreferences"] = "RelatedListUiController.getRelatedListPreferences";
2005
+ UiApiRecordController["UpdateRelatedListPreferences"] = "RelatedListUiController.updateRelatedListPreferences";
2006
+ UiApiRecordController["GetRelatedListPreferencesBatch"] = "RelatedListUiController.getRelatedListPreferencesBatch";
2007
+ UiApiRecordController["PostRelatedListRecordsBatch"] = "RelatedListUiController.postRelatedListRecordsBatch";
2008
+ })(UiApiRecordController || (UiApiRecordController = {}));
2009
+ const UIAPI_RELATED_LIST_INFO_PATH = `${UI_API_BASE_URI$1}/related-list-info`;
2010
+ const UIAPI_RELATED_LIST_INFO_BATCH_PATH = `${UI_API_BASE_URI$1}/related-list-info/batch`;
2011
+ const UIAPI_RELATED_LIST_RECORDS_PATH = `${UI_API_BASE_URI$1}/related-list-records`;
2012
+ const UIAPI_RELATED_LIST_RECORDS_BATCH_PATH = `${UI_API_BASE_URI$1}/related-list-records/batch`;
2013
+ const UIAPI_RELATED_LIST_COUNT_PATH = `${UI_API_BASE_URI$1}/related-list-count`;
2014
+ const UIAPI_RELATED_LIST_PREFERENCES_PATH = `${UI_API_BASE_URI$1}/related-list-preferences`;
2015
+ const UIAPI_RELATED_LIST_PREFERENCES_BATCH_PATH = `${UI_API_BASE_URI$1}/related-list-preferences/batch`;
2016
+ let crudInstrumentationCallbacks = null;
2017
+ if (forceRecordTransactionsDisabled === false) {
2018
+ crudInstrumentationCallbacks = {
2019
+ getRelatedListRecordsRejectFunction: (config) => {
2020
+ instrumentation$1.logCrud(CrudEventType.READS, {
2021
+ parentRecordId: config.params.parentRecordId,
2022
+ relatedListId: config.params.relatedListId,
2023
+ state: CrudEventState.ERROR,
2024
+ });
2025
+ },
2026
+ getRelatedListRecordsResolveFunction: (config) => {
2027
+ logGetRelatedListRecordsInteraction(config.body);
2028
+ },
2029
+ getRelatedListRecordsBatchRejectFunction: (config) => {
2030
+ instrumentation$1.logCrud(CrudEventType.READS, {
2031
+ parentRecordId: config.params.parentRecordId,
2032
+ relatedListIds: config.params.listRecordsQuery.relatedListParameters.map((entry) => entry.relatedListId),
2033
+ state: CrudEventState.ERROR,
2034
+ });
2035
+ },
2036
+ getRelatedListRecordsBatchResolveFunction: (config) => {
2037
+ config.body.results.forEach((res) => {
2038
+ // Log for each RL that was returned from batch endpoint
2039
+ if (res.statusCode === 200) {
2040
+ logGetRelatedListRecordsInteraction(res.result);
2041
+ }
2042
+ });
2043
+ },
2044
+ };
2045
+ }
2046
+ function getRelatedListInfo(resourceRequest) {
2047
+ const { urlParams, queryParams } = resourceRequest;
2048
+ const params = buildUiApiParams({
2049
+ parentObjectApiName: urlParams.parentObjectApiName,
2050
+ relatedListId: urlParams.relatedListId,
2051
+ recordTypeId: queryParams.recordTypeId,
2052
+ fields: queryParams.fields,
2053
+ optionalFields: queryParams.optionalFields,
2054
+ restrictColumnsToLayout: queryParams.restrictColumnsToLayout,
2055
+ }, resourceRequest);
2056
+ return dispatchAction(UiApiRecordController.GetRelatedListInfo, params);
2057
+ }
2058
+ function updateRelatedListInfo(resourceRequest) {
2059
+ const { urlParams, queryParams, body } = resourceRequest;
2060
+ const params = buildUiApiParams({
2061
+ parentObjectApiName: urlParams.parentObjectApiName,
2062
+ relatedListId: urlParams.relatedListId,
2063
+ recordTypeId: queryParams.recordTypeId,
2064
+ relatedListInfoInput: {
2065
+ orderedByInfo: body.orderedByInfo,
2066
+ userPreferences: body.userPreferences,
2067
+ },
2068
+ }, resourceRequest);
2069
+ return dispatchAction(UiApiRecordController.UpdateRelatedListInfo, params);
2070
+ }
2071
+ function getRelatedListsInfo(resourceRequest) {
2072
+ const { urlParams, queryParams } = resourceRequest;
2073
+ const params = buildUiApiParams({
2074
+ parentObjectApiName: urlParams.parentObjectApiName,
2075
+ recordTypeId: queryParams.recordTypeId,
2076
+ }, resourceRequest);
2077
+ return dispatchAction(UiApiRecordController.GetRelatedListsInfo, params);
2078
+ }
2079
+ function postRelatedListRecords(resourceRequest) {
2080
+ const { urlParams: { parentRecordId, relatedListId }, body, } = resourceRequest;
2081
+ const params = buildUiApiParams({
2082
+ parentRecordId: parentRecordId,
2083
+ relatedListId: relatedListId,
2084
+ listRecordsQuery: body,
2085
+ }, resourceRequest);
2086
+ const instrumentationCallbacks = crudInstrumentationCallbacks !== null
2087
+ ? {
2088
+ rejectFn: crudInstrumentationCallbacks.getRelatedListRecordsRejectFunction,
2089
+ resolveFn: crudInstrumentationCallbacks.getRelatedListRecordsResolveFunction,
2090
+ }
2091
+ : {};
2092
+ return dispatchAction(UiApiRecordController.PostRelatedListRecords, params, undefined, instrumentationCallbacks);
2093
+ }
2094
+ function postRelatedListRecordsBatch(resourceRequest) {
2095
+ const { urlParams: { parentRecordId }, body, } = resourceRequest;
2096
+ const params = buildUiApiParams({
2097
+ parentRecordId: parentRecordId,
2098
+ listRecordsQuery: body,
2099
+ }, resourceRequest);
2100
+ const instrumentationCallbacks = crudInstrumentationCallbacks !== null
2101
+ ? {
2102
+ rejectFn: crudInstrumentationCallbacks.getRelatedListRecordsBatchRejectFunction,
2103
+ resolveFn: crudInstrumentationCallbacks.getRelatedListRecordsBatchResolveFunction,
2104
+ }
2105
+ : {};
2106
+ return dispatchAction(UiApiRecordController.PostRelatedListRecordsBatch, params, undefined, instrumentationCallbacks);
2107
+ }
2108
+ function getRelatedListCount(resourceRequest) {
2109
+ const { urlParams } = resourceRequest;
2110
+ const params = buildUiApiParams({
2111
+ parentRecordId: urlParams.parentRecordId,
2112
+ relatedListId: urlParams.relatedListId,
2113
+ }, resourceRequest);
2114
+ return dispatchAction(UiApiRecordController.GetRelatedListCount, params);
2115
+ }
2116
+ function getRelatedListsCount(resourceRequest) {
2117
+ const { urlParams } = resourceRequest;
2118
+ const params = buildUiApiParams({
2119
+ parentRecordId: urlParams.parentRecordId,
2120
+ relatedListNames: urlParams.relatedListNames,
2121
+ }, resourceRequest);
2122
+ return dispatchAction(UiApiRecordController.GetRelatedListCounts, params);
2123
+ }
2124
+ function getRelatedListInfoBatch(resourceRequest) {
2125
+ const { urlParams, queryParams } = resourceRequest;
2126
+ const params = buildUiApiParams({
2127
+ parentObjectApiName: urlParams.parentObjectApiName,
2128
+ relatedListNames: urlParams.relatedListNames,
2129
+ recordTypeId: queryParams.recordTypeId,
2130
+ }, resourceRequest);
2131
+ return dispatchAction(UiApiRecordController.GetRelatedListInfoBatch, params);
2132
+ }
2133
+ function getRelatedListPreferences(resourceRequest) {
2134
+ const { urlParams } = resourceRequest;
2135
+ const params = buildUiApiParams({
2136
+ preferencesId: urlParams.preferencesId,
2137
+ }, resourceRequest);
2138
+ return dispatchAction(UiApiRecordController.GetRelatedListPreferences, params);
2139
+ }
2140
+ function updateRelatedListPreferences(resourceRequest) {
2141
+ const { urlParams, body } = resourceRequest;
2142
+ const params = buildUiApiParams({
2143
+ preferencesId: urlParams.preferencesId,
2144
+ relatedListUserPreferencesInput: {
2145
+ columnWidths: body.columnWidths,
2146
+ columnWrap: body.columnWrap,
2147
+ orderedBy: body.orderedBy,
2148
+ },
2149
+ }, resourceRequest);
2150
+ return dispatchAction(UiApiRecordController.UpdateRelatedListPreferences, params);
2151
+ }
2152
+ function getRelatedListPreferencesBatch(resourceRequest) {
2153
+ const { urlParams } = resourceRequest;
2154
+ const params = buildUiApiParams({
2155
+ preferencesIds: urlParams.preferencesIds,
2156
+ }, resourceRequest);
2157
+ return dispatchAction(UiApiRecordController.GetRelatedListPreferencesBatch, params);
2158
+ }
2159
+ router.patch((path) => path.startsWith(UIAPI_RELATED_LIST_INFO_PATH), updateRelatedListInfo);
2160
+ // related-list-info/batch/API_NAME/RELATED_LIST_IDS
2161
+ router.get((path) => path.startsWith(UIAPI_RELATED_LIST_INFO_BATCH_PATH) &&
2162
+ /related-list-info\/batch\/[a-zA-Z_\d]+\/[a-zA-Z_\d]+/.test(path), getRelatedListInfoBatch);
2163
+ // related-list-info/API_NAME/RELATED_LIST_ID
2164
+ router.get((path) => path.startsWith(UIAPI_RELATED_LIST_INFO_PATH) &&
2165
+ /related-list-info\/[a-zA-Z_\d]+\/[a-zA-Z_\d]+/.test(path), getRelatedListInfo);
2166
+ router.get((path) => path.startsWith(UIAPI_RELATED_LIST_INFO_PATH) &&
2167
+ /related-list-info\/[a-zA-Z_\d]+\/[a-zA-Z_\d]+/.test(path) === false, getRelatedListsInfo);
2168
+ router.post((path) => path.startsWith(UIAPI_RELATED_LIST_RECORDS_PATH) &&
2169
+ path.startsWith(UIAPI_RELATED_LIST_RECORDS_BATCH_PATH) === false, postRelatedListRecords);
2170
+ router.post((path) => path.startsWith(UIAPI_RELATED_LIST_RECORDS_BATCH_PATH), postRelatedListRecordsBatch);
2171
+ // related-list-count/batch/parentRecordId/relatedListNames
2172
+ router.get((path) => path.startsWith(UIAPI_RELATED_LIST_COUNT_PATH + '/batch'), getRelatedListsCount);
2173
+ // related-list-count/parentRecordId/relatedListName
2174
+ router.get((path) => path.startsWith(UIAPI_RELATED_LIST_COUNT_PATH) &&
2175
+ path.startsWith(UIAPI_RELATED_LIST_COUNT_PATH + '/batch') === false, getRelatedListCount);
2176
+ // related-list-preferences/preferencesId
2177
+ router.patch((path) => path.startsWith(UIAPI_RELATED_LIST_PREFERENCES_PATH) &&
2178
+ path.startsWith(UIAPI_RELATED_LIST_PREFERENCES_BATCH_PATH) === false, updateRelatedListPreferences);
2179
+ router.get((path) => path.startsWith(UIAPI_RELATED_LIST_PREFERENCES_PATH) &&
2180
+ path.startsWith(UIAPI_RELATED_LIST_PREFERENCES_BATCH_PATH) === false, getRelatedListPreferences);
2181
+ // related-list-preferences/batch/preferencesIds
2182
+ router.get((path) => path.startsWith(UIAPI_RELATED_LIST_PREFERENCES_BATCH_PATH), getRelatedListPreferencesBatch);
2183
+ function logGetRelatedListRecordsInteraction(body) {
2184
+ const records = body.records;
2185
+ // Don't log anything if the related list has no records.
2186
+ if (records.length === 0) {
2187
+ return;
2188
+ }
2189
+ const recordIds = records.map((record) => {
2190
+ return record.id;
2191
+ });
2192
+ /**
2193
+ * In almost every case - the relatedList records will all be of the same apiName, but there is an edge case for
2194
+ Activities entity that could return Events & Tasks- so handle that case by returning a joined string.
2195
+ ADS Implementation only looks at the first record returned to determine the apiName.
2196
+ See force/recordLibrary/recordMetricsPlugin.js _getRecordType method.
2197
+ */
2198
+ instrumentation$1.logCrud(CrudEventType.READS, {
2199
+ parentRecordId: body.listReference.inContextOfRecordId,
2200
+ relatedListId: body.listReference.relatedListId,
2201
+ recordIds,
2202
+ recordType: body.records[0].apiName,
2203
+ state: CrudEventState.SUCCESS,
2204
+ });
2205
+ }
2206
+
2207
+ var UiApiSearchController;
2208
+ (function (UiApiSearchController) {
2209
+ UiApiSearchController["SearchResults"] = "SearchUiController.searchResults";
2210
+ UiApiSearchController["KeywordSearchResults"] = "SearchUiController.searchResultsKeyword";
2211
+ UiApiSearchController["SearchFilterOptions"] = "SearchUiController.getFilterOptions";
2212
+ UiApiSearchController["SearchFilterMetadata"] = "SearchUiController.getSearchFilterMetadata";
2213
+ UiApiSearchController["LookupMetadata"] = "LookupController.getLookupMetadata";
2214
+ })(UiApiSearchController || (UiApiSearchController = {}));
2215
+ const UIAPI_SEARCH_UI_PATH = `${UI_API_BASE_URI$1}/search`;
2216
+ const UIAPI_SEARCH_UI_RESULTS_PATH = `${UIAPI_SEARCH_UI_PATH}/results`;
2217
+ const UIAPI_SEARCH_UI_KEYWORD_RESULTS_PATH = `${UIAPI_SEARCH_UI_RESULTS_PATH}/keyword`;
2218
+ const UIAPI_SEARCH_UI_SEARCH_INFO_PATH = `${UI_API_BASE_URI$1}/search-info/`;
2219
+ function searchResults(resourceRequest) {
2220
+ const { queryParams, body } = resourceRequest;
2221
+ const params = buildUiApiParams({ options: body, q: queryParams.q }, resourceRequest);
2222
+ return dispatchAction(UiApiSearchController.SearchResults, params, actionConfig);
2223
+ }
2224
+ function searchKeywordResults(resourceRequest) {
2225
+ const { queryParams, body } = resourceRequest;
2226
+ const params = buildUiApiParams({ options: body, q: queryParams.q, objectApiName: queryParams.objectApiName }, resourceRequest);
2227
+ return dispatchAction(UiApiSearchController.KeywordSearchResults, params, actionConfig);
2228
+ }
2229
+ function getSearchFilterOptions(resourceRequest) {
2230
+ const { urlParams, queryParams } = resourceRequest;
2231
+ const params = buildUiApiParams({ ...urlParams, ...queryParams }, resourceRequest);
2232
+ return dispatchAction(UiApiSearchController.SearchFilterOptions, params, actionConfig);
2233
+ }
2234
+ function getSearchFilterMetadata(resourceRequest) {
2235
+ const { urlParams } = resourceRequest;
2236
+ const params = buildUiApiParams({ ...urlParams }, resourceRequest);
2237
+ return dispatchAction(UiApiSearchController.SearchFilterMetadata, params, actionConfig);
2238
+ }
2239
+ function getLookupMetadata(resourceRequest) {
2240
+ const { urlParams } = resourceRequest;
2241
+ const params = buildUiApiParams({ ...urlParams }, resourceRequest);
2242
+ return dispatchAction(UiApiSearchController.LookupMetadata, params, actionConfig);
2243
+ }
2244
+ // .../search/results/keyword
2245
+ router.post((path) => path.startsWith(UIAPI_SEARCH_UI_KEYWORD_RESULTS_PATH), searchKeywordResults);
2246
+ // .../search/results
2247
+ router.post((path) => path.startsWith(UIAPI_SEARCH_UI_RESULTS_PATH), searchResults);
2248
+ // .../search-info/${objectApiName}/filters
2249
+ router.get((path) => path.startsWith(UIAPI_SEARCH_UI_SEARCH_INFO_PATH) && /\w+\/filters$/.test(path), getSearchFilterMetadata);
2250
+ // .../search-info/${objectApiName}/filters/${filterApiName}/options
2251
+ router.get((path) => path.startsWith(UIAPI_SEARCH_UI_SEARCH_INFO_PATH) &&
2252
+ /\w+\/filters\/\w+\/options/.test(path), getSearchFilterOptions);
2253
+ // .../search-info/${objectApiName}/lookup/${fieldApiName}
2254
+ router.get((path) => path.startsWith(UIAPI_SEARCH_UI_SEARCH_INFO_PATH) && /\w+\/lookup\/\w+/.test(path), getLookupMetadata);
2255
+
2256
+ var UiApiAppsController;
2257
+ (function (UiApiAppsController) {
2258
+ UiApiAppsController["GetNavItems"] = "AppsController.getNavItems";
2259
+ UiApiAppsController["GetAllApps"] = "AppsController.getAccessibleApps";
2260
+ UiApiAppsController["GetAppDetails"] = "AppsController.getAppByID";
2261
+ })(UiApiAppsController || (UiApiAppsController = {}));
2262
+ const UIAPI_NAV_ITEMS_PATH = `${UI_API_BASE_URI$1}/nav-items`;
2263
+ const UIAPI_APPS_PATH = `${UI_API_BASE_URI$1}/apps`;
2264
+ function getNavItems(resourceRequest) {
2265
+ const { queryParams: { formFactor, page, pageSize, navItemNames }, } = resourceRequest;
2266
+ const params = buildUiApiParams({
2267
+ formFactor,
2268
+ page,
2269
+ pageSize,
2270
+ navItemNames,
2271
+ }, resourceRequest);
2272
+ return dispatchAction(UiApiAppsController.GetNavItems, params);
2273
+ }
2274
+ function getAllApps(resourceRequest) {
2275
+ const { queryParams: { formFactor, userCustomizations }, } = resourceRequest;
2276
+ const params = buildUiApiParams({
2277
+ formFactor,
2278
+ userCustomizations,
2279
+ }, resourceRequest);
2280
+ return dispatchAction(UiApiAppsController.GetAllApps, params);
2281
+ }
2282
+ function getAppDetails(resourceRequest) {
2283
+ const { urlParams: { appId }, queryParams: { formFactor, userCustomizations }, } = resourceRequest;
2284
+ const params = buildUiApiParams({
2285
+ appId,
2286
+ formFactor,
2287
+ userCustomizations,
2288
+ }, resourceRequest);
2289
+ return dispatchAction(UiApiAppsController.GetAppDetails, params);
2290
+ }
2291
+ router.get((path) => path.startsWith(UIAPI_NAV_ITEMS_PATH), getNavItems);
2292
+ router.get((path) => path === UIAPI_APPS_PATH, getAllApps);
2293
+ router.get((path) => path.startsWith(UIAPI_APPS_PATH), getAppDetails);
2294
+
2295
+ /**
2296
+ * Copyright (c) 2022, Salesforce, Inc.,
2297
+ * All rights reserved.
2298
+ * For full license text, see the LICENSE.txt file
2299
+ */
2300
+
2301
+ const { parse, stringify } = JSON;
2302
+ const { join, push, unshift } = Array.prototype;
2303
+ const { isArray } = Array;
2304
+ const { entries, keys } = Object;
2305
+
2306
+ const UI_API_BASE_URI = '/services/data/v58.0/ui-api';
2307
+
2308
+ let instrumentation = {
2309
+ aggregateUiChunkCount: (_cb) => { },
2310
+ aggregateUiConnectError: () => { },
2311
+ duplicateRequest: (_cb) => { },
2312
+ getRecordAggregateInvoke: () => { },
2313
+ getRecordAggregateResolve: (_cb) => { },
2314
+ getRecordAggregateReject: (_cb) => { },
2315
+ getRecordAggregateRetry: () => { },
2316
+ getRecordNormalInvoke: () => { },
2317
+ networkRateLimitExceeded: () => { },
2318
+ };
2319
+ function instrument(newInstrumentation) {
2320
+ instrumentation = Object.assign(instrumentation, newInstrumentation);
2321
+ }
2322
+
2323
+ const LDS_RECORDS_AGGREGATE_UI = 'LDS_Records_AggregateUi';
2324
+ // Boundary which represents the limit that we start chunking at,
2325
+ // determined by comma separated string length of fields
2326
+ const MAX_STRING_LENGTH_PER_CHUNK = 10000;
2327
+ // UIAPI limit
2328
+ const MAX_AGGREGATE_UI_CHUNK_LIMIT = 50;
2329
+ function createOkResponse(body) {
2330
+ return {
2331
+ status: HttpStatusCode.Ok,
2332
+ body,
2333
+ statusText: 'ok',
2334
+ headers: {},
2335
+ ok: true,
2336
+ };
2337
+ }
2338
+ function getErrorResponseText(status) {
2339
+ switch (status) {
2340
+ case HttpStatusCode.Ok:
2341
+ return 'OK';
2342
+ case HttpStatusCode.NotModified:
2343
+ return 'Not Modified';
2344
+ case HttpStatusCode.NotFound:
2345
+ return 'Not Found';
2346
+ case HttpStatusCode.BadRequest:
2347
+ return 'Bad Request';
2348
+ case HttpStatusCode.ServerError:
2349
+ return 'Server Error';
2350
+ default:
2351
+ return `Unexpected HTTP Status Code: ${status}`;
2352
+ }
2353
+ }
2354
+ function createErrorResponse(status, body) {
2355
+ return {
2356
+ status,
2357
+ body,
2358
+ statusText: getErrorResponseText(status),
2359
+ headers: {},
2360
+ ok: false,
2361
+ };
2362
+ }
2363
+ function isSpanningRecord(fieldValue) {
2364
+ return fieldValue !== null && typeof fieldValue === 'object';
2365
+ }
2366
+ function mergeRecordFields(first, second) {
2367
+ const { fields: targetFields } = first;
2368
+ const { fields: sourceFields } = second;
2369
+ const fieldNames = keys(sourceFields);
2370
+ for (let i = 0, len = fieldNames.length; i < len; i += 1) {
2371
+ const fieldName = fieldNames[i];
2372
+ const sourceField = sourceFields[fieldName];
2373
+ const targetField = targetFields[fieldName];
2374
+ if (isSpanningRecord(sourceField.value)) {
2375
+ if (targetField === undefined) {
2376
+ targetFields[fieldName] = sourceFields[fieldName];
2377
+ continue;
2378
+ }
2379
+ mergeRecordFields(targetField.value, sourceField.value);
2380
+ continue;
2381
+ }
2382
+ targetFields[fieldName] = sourceFields[fieldName];
2383
+ }
2384
+ return first;
2385
+ }
2386
+ /** Invoke executeAggregateUi Aura controller. This is only to be used with large getRecord requests that
2387
+ * would otherwise cause a query length exception.
2388
+ */
2389
+ function dispatchSplitRecordAggregateUiAction(recordId, networkAdapter, resourceRequest, resourceRequestContext) {
2390
+ instrumentation.getRecordAggregateInvoke();
2391
+ return networkAdapter(resourceRequest, resourceRequestContext).then((resp) => {
2392
+ const { body } = resp;
2393
+ // This response body could be an executeAggregateUi, which we don't natively support.
2394
+ // Massage it into looking like a getRecord response.
2395
+ if (body === null ||
2396
+ body === undefined ||
2397
+ body.compositeResponse === undefined ||
2398
+ body.compositeResponse.length === 0) {
2399
+ // We shouldn't even get into this state - a 200 with no body?
2400
+ throw createErrorResponse(HttpStatusCode.ServerError, {
2401
+ error: 'No response body in executeAggregateUi found',
2402
+ });
2403
+ }
2404
+ const merged = body.compositeResponse.reduce((seed, response) => {
2405
+ if (response.httpStatusCode !== HttpStatusCode.Ok) {
2406
+ instrumentation.getRecordAggregateReject(() => recordId);
2407
+ throw createErrorResponse(HttpStatusCode.ServerError, {
2408
+ error: response.message,
2409
+ });
2410
+ }
2411
+ if (seed === null) {
2412
+ return response.body;
2413
+ }
2414
+ return mergeRecordFields(seed, response.body);
2415
+ }, null);
2416
+ instrumentation.getRecordAggregateResolve(() => {
2417
+ return {
2418
+ recordId,
2419
+ apiName: merged.apiName,
2420
+ };
2421
+ });
2422
+ return createOkResponse(merged);
2423
+ }, (err) => {
2424
+ instrumentation.getRecordAggregateReject(() => recordId);
2425
+ // rethrow error
2426
+ throw err;
2427
+ });
2428
+ }
2429
+ function shouldUseAggregateUiForGetRecord(fieldsArray, optionalFieldsArray) {
2430
+ return fieldsArray.length + optionalFieldsArray.length >= MAX_STRING_LENGTH_PER_CHUNK;
2431
+ }
2432
+ function buildAggregateUiUrl(params, resourceRequest) {
2433
+ const { fields, optionalFields } = params;
2434
+ const queryString = [];
2435
+ if (fields !== undefined && fields.length > 0) {
2436
+ const fieldString = join.call(fields, ',');
2437
+ push.call(queryString, `fields=${encodeURIComponent(fieldString)}`);
2438
+ }
2439
+ if (optionalFields !== undefined && optionalFields.length > 0) {
2440
+ const optionalFieldString = join.call(optionalFields, ',');
2441
+ push.call(queryString, `optionalFields=${encodeURIComponent(optionalFieldString)}`);
2442
+ }
2443
+ return `${resourceRequest.baseUri}${resourceRequest.basePath}?${join.call(queryString, '&')}`;
2444
+ }
2445
+ function buildGetRecordByFieldsCompositeRequest(resourceRequest, recordsCompositeRequest) {
2446
+ const { fieldsArray, optionalFieldsArray, fieldsLength, optionalFieldsLength } = recordsCompositeRequest;
2447
+ // Formula: # of fields per chunk = floor(avg field length / max length per chunk)
2448
+ const averageFieldStringLength = Math.floor((fieldsLength + optionalFieldsLength) / (fieldsArray.length + optionalFieldsArray.length));
2449
+ const fieldsPerChunk = Math.floor(MAX_STRING_LENGTH_PER_CHUNK / averageFieldStringLength);
2450
+ const optionalFieldsChunks = [];
2451
+ // Do the same for optional tracked fields
2452
+ for (let i = 0, j = optionalFieldsArray.length; i < j; i += fieldsPerChunk) {
2453
+ const newChunk = optionalFieldsArray.slice(i, i + fieldsPerChunk);
2454
+ push.call(optionalFieldsChunks, newChunk);
2455
+ }
2456
+ const compositeRequest = [];
2457
+ // Add fields as one chunk at the beginning of the compositeRequest
2458
+ if (fieldsArray.length > 0) {
2459
+ const url = buildAggregateUiUrl({
2460
+ fields: fieldsArray,
2461
+ }, resourceRequest);
2462
+ push.call(compositeRequest, {
2463
+ url,
2464
+ referenceId: `${LDS_RECORDS_AGGREGATE_UI}_fields`,
2465
+ });
2466
+ }
2467
+ // Make sure we don't exceed the max subquery chunk limit for aggUi by capping the amount
2468
+ // of optionalFields subqueries at MAX_AGGREGATE_UI_CHUNK_LIMIT - 1 (first chunk is for fields)
2469
+ const maxNumberOfAllowableOptionalFieldsChunks = MAX_AGGREGATE_UI_CHUNK_LIMIT - 1;
2470
+ const optionalFieldsChunksLength = Math.min(optionalFieldsChunks.length, maxNumberOfAllowableOptionalFieldsChunks);
2471
+ for (let i = 0; i < optionalFieldsChunksLength; i += 1) {
2472
+ const fieldChunk = optionalFieldsChunks[i];
2473
+ const url = buildAggregateUiUrl({
2474
+ optionalFields: fieldChunk,
2475
+ }, resourceRequest);
2476
+ push.call(compositeRequest, {
2477
+ url,
2478
+ referenceId: `${LDS_RECORDS_AGGREGATE_UI}_optionalFields_${i}`,
2479
+ });
2480
+ }
2481
+ return compositeRequest;
2482
+ }
2483
+
2484
+ const UIAPI_RECORDS_PATH = `${UI_API_BASE_URI}/records`;
2485
+ const UIAPI_RECORDS_BATCH_PATH = `${UI_API_BASE_URI}/records/batch/`;
2486
+ const QUERY_TOO_COMPLICATED_ERROR_CODE = 'QUERY_TOO_COMPLICATED';
2487
+ function fetchResponseIsQueryTooComplicated(error) {
2488
+ const { body } = error;
2489
+ if (error.status === HttpStatusCode.BadRequest && body !== undefined) {
2490
+ return (body.statusCode === HttpStatusCode.BadRequest &&
2491
+ body.errorCode === QUERY_TOO_COMPLICATED_ERROR_CODE);
2492
+ }
2493
+ return false;
2494
+ }
2495
+ /*
2496
+ * Takes a ResourceRequest, builds the aggregateUi payload, and dispatches via aggregateUi action
2497
+ */
2498
+ function buildAndDispatchGetRecordAggregateUi(recordId, req, params) {
2499
+ const { networkAdapter, resourceRequest, resourceRequestContext } = req;
2500
+ const compositeRequest = buildGetRecordByFieldsCompositeRequest(resourceRequest, params);
2501
+ // W-12245125: Emit chunk size metrics
2502
+ instrumentation.aggregateUiChunkCount(() => compositeRequest.length);
2503
+ const aggregateUiParams = {
2504
+ compositeRequest,
2505
+ };
2506
+ const aggregateUiResourceRequest = {
2507
+ baseUri: UI_API_BASE_URI,
2508
+ basePath: '/aggregate-ui',
2509
+ method: 'post',
2510
+ priority: resourceRequest.priority,
2511
+ urlParams: {},
2512
+ body: aggregateUiParams,
2513
+ queryParams: {},
2514
+ headers: {},
2515
+ };
2516
+ return dispatchSplitRecordAggregateUiAction(recordId, networkAdapter, aggregateUiResourceRequest, resourceRequestContext);
2517
+ }
2518
+ const getRecordDispatcher = (req) => {
2519
+ const { resourceRequest, networkAdapter, resourceRequestContext } = req;
2520
+ const { queryParams, urlParams } = resourceRequest;
2521
+ const { fields, optionalFields } = queryParams;
2522
+ if (process.env.NODE_ENV !== 'production') {
2523
+ if (typeof urlParams.recordId !== 'string') {
2524
+ throw new Error(`Invalid recordId: expected string, recieved "${typeof urlParams.recordId}"`);
2525
+ }
2526
+ }
2527
+ const recordId = urlParams.recordId;
2528
+ const fieldsArray = fields !== undefined && isArray(fields) ? fields : [];
2529
+ const optionalFieldsArray = optionalFields !== undefined && Array.isArray(optionalFields)
2530
+ ? optionalFields
2531
+ : [];
2532
+ const fieldsString = fieldsArray.join(',');
2533
+ const optionalFieldsString = optionalFieldsArray.join(',');
2534
+ // Don't submit a megarequest to UIAPI due to SOQL limit reasons.
2535
+ // Split and aggregate if needed
2536
+ const useAggregateUi = shouldUseAggregateUiForGetRecord(fieldsString, optionalFieldsString);
2537
+ if (useAggregateUi) {
2538
+ return buildAndDispatchGetRecordAggregateUi(recordId, {
2539
+ networkAdapter,
2540
+ resourceRequest,
2541
+ resourceRequestContext,
2542
+ }, {
2543
+ fieldsArray,
2544
+ optionalFieldsArray,
2545
+ fieldsLength: fieldsString.length,
2546
+ optionalFieldsLength: optionalFieldsString.length,
2547
+ });
2548
+ }
2549
+ return defaultDispatcher(req).catch((err) => {
2550
+ if (fetchResponseIsQueryTooComplicated(err)) {
2551
+ // Retry with aggregateUi to see if we can avoid Query Too Complicated
2552
+ return buildAndDispatchGetRecordAggregateUi(recordId, {
2553
+ networkAdapter,
2554
+ resourceRequest,
2555
+ resourceRequestContext,
2556
+ }, {
2557
+ fieldsArray,
2558
+ optionalFieldsArray,
2559
+ fieldsLength: fieldsString.length,
2560
+ optionalFieldsLength: optionalFieldsString.length,
2561
+ });
2562
+ }
2563
+ else {
2564
+ throw err;
2565
+ }
2566
+ });
2567
+ };
2568
+ function matchRecordsHandlers(path, resourceRequest) {
2569
+ const method = resourceRequest.method.toLowerCase();
2570
+ if (method === 'get' &&
2571
+ path.startsWith(UIAPI_RECORDS_PATH) &&
2572
+ path.startsWith(UIAPI_RECORDS_BATCH_PATH) === false) {
2573
+ return getRecordDispatcher;
2574
+ }
2575
+ return null;
2576
+ }
2577
+
2578
+ const defaultDispatcher = (req) => {
2579
+ const { networkAdapter, resourceRequest, resourceRequestContext } = req;
2580
+ return networkAdapter(resourceRequest, resourceRequestContext);
2581
+ };
2582
+ function getDispatcher(resourceRequest) {
2583
+ const { basePath, baseUri } = resourceRequest;
2584
+ const path = `${baseUri}${basePath}`;
2585
+ const recordsMatch = matchRecordsHandlers(path, resourceRequest);
2586
+ if (recordsMatch !== null) {
2587
+ return recordsMatch;
2588
+ }
2589
+ return defaultDispatcher;
2590
+ }
2591
+
2592
+ const inflightRequests = Object.create(null);
2593
+ const TRANSACTION_KEY_SEP$1 = '::';
2594
+ const EMPTY_STRING$1 = '';
2595
+ function isResourceRequestDedupable(resourceRequest) {
2596
+ const resourceRequestContext = resourceRequest.resourceRequestContext;
2597
+ return (resourceRequest.resourceRequest.method.toLowerCase() === 'get' ||
2598
+ (resourceRequestContext && resourceRequestContext.luvioRequestMethod === 'get'));
2599
+ }
2600
+ function getTransactionKey$1(req) {
2601
+ const { resourceRequest } = req;
2602
+ const { baseUri, basePath, queryParams, headers } = resourceRequest;
2603
+ const path = `${baseUri}${basePath}`;
2604
+ const queryParamsString = queryParams ? stringify(queryParams) : EMPTY_STRING$1;
2605
+ const headersString = stringify(headers);
2606
+ const bodyString = resourceRequest.body && isResourceRequestDedupable(req)
2607
+ ? stringify(resourceRequest.body)
2608
+ : EMPTY_STRING$1;
2609
+ return `${path}${TRANSACTION_KEY_SEP$1}${headersString}${TRANSACTION_KEY_SEP$1}${queryParamsString}${bodyString}`;
2610
+ }
2611
+ function getFulfillingRequest(inflightRequests, resourceRequest) {
2612
+ const { fulfill } = resourceRequest;
2613
+ if (fulfill === undefined) {
2614
+ return null;
2615
+ }
2616
+ const handlersMap = entries(inflightRequests);
2617
+ for (let i = 0, len = handlersMap.length; i < len; i += 1) {
2618
+ const [transactionKey, handlers] = handlersMap[i];
2619
+ // check fulfillment against only the first handler ([0]) because it's equal or
2620
+ // fulfills all subsequent handlers in the array
2621
+ const existing = handlers[0].resourceRequest;
2622
+ if (fulfill(existing, resourceRequest) === true) {
2623
+ return transactionKey;
2624
+ }
2625
+ }
2626
+ return null;
2627
+ }
2628
+ /**
2629
+ Dedupes network requests being made to Salesforce APIs
2630
+ This function is only designed to dedupe GET requests.
2631
+
2632
+ If POST/PUT/PATCH/DELETE requests need to be deduped, that should be handled
2633
+ on the server instead of here.
2634
+ */
2635
+ const dedupeRequest = (req) => {
2636
+ const { resourceRequest } = req;
2637
+ if (process.env.NODE_ENV !== 'production') {
2638
+ if (!isResourceRequestDedupable(req)) {
2639
+ throw new Error('Invalid ResourceRequest that cannot be deduped. Only "get" Requests supported.');
2640
+ }
2641
+ }
2642
+ const transactionKey = getTransactionKey$1(req);
2643
+ // if an identical request is in-flight then queue for its response (do not re-issue the request)
2644
+ if (transactionKey in inflightRequests) {
2645
+ return new Promise((resolve, reject) => {
2646
+ push.call(inflightRequests[transactionKey], {
2647
+ resolve,
2648
+ reject,
2649
+ resourceRequest,
2650
+ });
2651
+ });
2652
+ }
2653
+ const dispatch = getDispatcher(resourceRequest);
2654
+ // fallback to checking a custom deduper to find a similar (but not identical) request
2655
+ const similarTransactionKey = getFulfillingRequest(inflightRequests, resourceRequest);
2656
+ if (similarTransactionKey !== null) {
2657
+ return new Promise((resolve) => {
2658
+ // custom dedupers find similar (not identical) requests. if the similar request fails
2659
+ // there's no guarantee the deduped request should fail. thus we re-issue the
2660
+ // original request in the case of a failure
2661
+ push.call(inflightRequests[similarTransactionKey], {
2662
+ resolve,
2663
+ reject: function reissueRequest() {
2664
+ resolve(dispatch(req));
2665
+ },
2666
+ resourceRequest,
2667
+ });
2668
+ });
2669
+ }
2670
+ dispatch(req).then((response) => {
2671
+ const handlers = inflightRequests[transactionKey];
2672
+ delete inflightRequests[transactionKey];
2673
+ // handlers mutate responses so must clone the response for each.
2674
+ // the first handler is given the original version to avoid an
2675
+ // extra clone (particularly when there's only 1 handler).
2676
+ for (let i = 1, len = handlers.length; i < len; i++) {
2677
+ const handler = handlers[i];
2678
+ handler.resolve(parse(stringify(response)));
2679
+ }
2680
+ handlers[0].resolve(response);
2681
+ }, (error) => {
2682
+ const handlers = inflightRequests[transactionKey];
2683
+ delete inflightRequests[transactionKey];
2684
+ for (let i = 0, len = handlers.length; i < len; i++) {
2685
+ const handler = handlers[i];
2686
+ handler.reject(error);
2687
+ }
2688
+ });
2689
+ // rely on sync behavior of Promise creation to create the list for handlers
2690
+ return new Promise((resolve, reject) => {
2691
+ inflightRequests[transactionKey] = [{ resolve, reject, resourceRequest }];
2692
+ });
2693
+ };
2694
+
2695
+ const RATE_LIMIT_CONFIG = {
2696
+ bucketCapacity: 100,
2697
+ fillsPerSecond: 100,
2698
+ };
2699
+ class TokenBucket {
2700
+ /**
2701
+ * Constructs an instance of Token Bucket for rate limiting
2702
+ *
2703
+ * @param bucket The token holding capacity of the bucket
2704
+ * @param refillTokensPerSecond The number of tokens replenished every second
2705
+ */
2706
+ constructor(config) {
2707
+ this.bucketCapacity = config.bucketCapacity;
2708
+ this.refillTokensPerMilliSecond = config.fillsPerSecond / 1000;
2709
+ this.tokens = config.bucketCapacity;
2710
+ this.lastRefillTime = Date.now();
2711
+ }
2712
+ /**
2713
+ * Refills the bucket and removes desired number of tokens
2714
+ *
2715
+ * @param removeTokens number of tokens to be removed from the bucket should be >= 0
2716
+ * @returns {boolean} true if removing token was succesful
2717
+ */
2718
+ take(removeTokens) {
2719
+ // refill tokens before removing
2720
+ this.refill();
2721
+ const { tokens } = this;
2722
+ const remainingTokens = tokens - removeTokens;
2723
+ if (remainingTokens >= 0) {
2724
+ this.tokens = remainingTokens;
2725
+ return true;
2726
+ }
2727
+ return false;
2728
+ }
2729
+ refill() {
2730
+ const { bucketCapacity, tokens, refillTokensPerMilliSecond, lastRefillTime } = this;
2731
+ const now = Date.now();
2732
+ const timePassed = now - lastRefillTime;
2733
+ // Number of tokens should be integer so something like Math.floor is desired
2734
+ // Using Bitwise NOT ~ twice will achieve the same result with performance benefits
2735
+ const calculatedTokens = tokens + ~~(timePassed * refillTokensPerMilliSecond);
2736
+ this.tokens = bucketCapacity < calculatedTokens ? bucketCapacity : calculatedTokens;
2737
+ this.lastRefillTime = now;
2738
+ }
2739
+ }
2740
+ var tokenBucket = new TokenBucket(RATE_LIMIT_CONFIG);
2741
+
2742
+ function platformNetworkAdapter(baseNetworkAdapter) {
2743
+ return (resourceRequest, resourceRequestContext) => {
2744
+ if (!tokenBucket.take(1)) {
2745
+ // We are hitting rate limiting, add some metrics
2746
+ instrumentation.networkRateLimitExceeded();
2747
+ }
2748
+ const salesforceRequest = {
2749
+ networkAdapter: baseNetworkAdapter,
2750
+ resourceRequest: resourceRequest,
2751
+ resourceRequestContext: resourceRequestContext,
2752
+ };
2753
+ // If GET, or overriden to be treated as a GET with resourceRequestContext.networkResourceOverride, then dedupe.
2754
+ if (isResourceRequestDedupable(salesforceRequest)) {
2755
+ return dedupeRequest(salesforceRequest);
2756
+ }
2757
+ else {
2758
+ const dispatch = getDispatcher(resourceRequest);
2759
+ return dispatch(salesforceRequest);
2760
+ }
2761
+ };
2762
+ }
2763
+
2764
+ const TRANSACTION_KEY_SEP = '::';
2765
+ const EMPTY_STRING = '';
2766
+ function getTransactionKey(resourceRequest) {
2767
+ const { baseUri, basePath, queryParams, headers } = resourceRequest;
2768
+ const path = `${baseUri}${basePath}`;
2769
+ const queryParamsString = queryParams ? stringify$1(queryParams) : EMPTY_STRING;
2770
+ const headersString = stringify$1(headers);
2771
+ return `${path}${TRANSACTION_KEY_SEP}${headersString}${TRANSACTION_KEY_SEP}${queryParamsString}`;
2772
+ }
2773
+ function controllerInvokerFactory(resourceRequest) {
2774
+ const { baseUri, basePath, method } = resourceRequest;
2775
+ const path = `${baseUri}${basePath}`;
2776
+ if (isFormData(resourceRequest.body)) {
2777
+ const errorMessage = 'Form data not supported in aura network transport';
2778
+ if (process.env.NODE_ENV !== 'production') {
2779
+ // in non-Prod we can throw an error that bubbles up fast
2780
+ throw new Error(errorMessage);
2781
+ }
2782
+ else {
2783
+ // Luvio network adapter interface specifies that if we can't reach server
2784
+ // we should return a rejected Promise with an Error
2785
+ return () => Promise.reject(new Error(errorMessage));
2786
+ }
2787
+ }
2788
+ const ret = router.lookup(resourceRequest);
2789
+ if (ret === null) {
2790
+ const errorMessage = `No invoker matching controller factory: ${path} ${method}.`;
2791
+ if (process.env.NODE_ENV !== 'production') {
2792
+ // in non-Prod we can throw an error that bubbles up fast
2793
+ throw new Error(errorMessage);
2794
+ }
2795
+ else {
2796
+ // Luvio network adapter interface specifies that if we can't reach server
2797
+ // we should return a rejected Promise with an Error
2798
+ return () => Promise.reject(new Error(errorMessage));
2799
+ }
2800
+ }
2801
+ return ret;
2802
+ }
2803
+ function auraNetworkAdapter(resourceRequest) {
2804
+ const transactionKey = getTransactionKey(resourceRequest);
2805
+ const controllerInvoker = controllerInvokerFactory(resourceRequest);
2806
+ return controllerInvoker(resourceRequest, transactionKey);
2807
+ }
2808
+ var main = platformNetworkAdapter(auraNetworkAdapter);
2809
+
2810
+ export { main as default, forceRecordTransactionsDisabled, instrument$1 as instrument, instrument as ldsNetworkAdapterInstrument };
2811
+ // version: 1.100.2-ca56bb821