@salesforce/lds-adapters-sales-pathassistant 1.249.0 → 1.250.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@
4
4
  * For full license text, see the LICENSE.txt file
5
5
  */
6
6
 
7
- import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2, typeCheckConfig as typeCheckConfig$2, StoreKeyMap, createResourceParams as createResourceParams$2 } from '@luvio/engine';
7
+ import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$3, typeCheckConfig as typeCheckConfig$3, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2 } from '@luvio/engine';
8
8
 
9
9
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
10
  const { keys: ObjectKeys, create: ObjectCreate } = Object;
@@ -79,8 +79,183 @@ function createLink(ref) {
79
79
  };
80
80
  }
81
81
 
82
+ const TTL$2 = 30000;
83
+ const VERSION$2 = "a729b9451867a2ddc52e8106de4e17c5";
84
+ function validate$2(obj, path = 'CollapsibleDrawerUserPrefRepresentation') {
85
+ const v_error = (() => {
86
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
87
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
88
+ }
89
+ const obj_apiName = obj.apiName;
90
+ const path_apiName = path + '.apiName';
91
+ if (typeof obj_apiName !== 'string') {
92
+ return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
93
+ }
94
+ const obj_isSuccess = obj.isSuccess;
95
+ const path_isSuccess = path + '.isSuccess';
96
+ if (typeof obj_isSuccess !== 'boolean') {
97
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
98
+ }
99
+ })();
100
+ return v_error === undefined ? null : v_error;
101
+ }
102
+ const RepresentationType$2 = 'CollapsibleDrawerUserPrefRepresentation';
103
+ function keyBuilder$4(luvio, config) {
104
+ return keyPrefix + '::' + RepresentationType$2 + ':' + config.apiName;
105
+ }
106
+ function keyBuilderFromType(luvio, object) {
107
+ const keyParams = {
108
+ apiName: object.apiName
109
+ };
110
+ return keyBuilder$4(luvio, keyParams);
111
+ }
112
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
113
+ return input;
114
+ }
115
+ const select$5 = function CollapsibleDrawerUserPrefRepresentationSelect() {
116
+ return {
117
+ kind: 'Fragment',
118
+ version: VERSION$2,
119
+ private: [],
120
+ selections: [
121
+ {
122
+ name: 'apiName',
123
+ kind: 'Scalar'
124
+ },
125
+ {
126
+ name: 'isSuccess',
127
+ kind: 'Scalar'
128
+ }
129
+ ]
130
+ };
131
+ };
132
+ function equals$2(existing, incoming) {
133
+ const existing_isSuccess = existing.isSuccess;
134
+ const incoming_isSuccess = incoming.isSuccess;
135
+ if (!(existing_isSuccess === incoming_isSuccess)) {
136
+ return false;
137
+ }
138
+ const existing_apiName = existing.apiName;
139
+ const incoming_apiName = incoming.apiName;
140
+ if (!(existing_apiName === incoming_apiName)) {
141
+ return false;
142
+ }
143
+ return true;
144
+ }
145
+ const ingest$2 = function CollapsibleDrawerUserPrefRepresentationIngest(input, path, luvio, store, timestamp) {
146
+ if (process.env.NODE_ENV !== 'production') {
147
+ const validateError = validate$2(input);
148
+ if (validateError !== null) {
149
+ throw validateError;
150
+ }
151
+ }
152
+ const key = keyBuilderFromType(luvio, input);
153
+ const ttlToUse = TTL$2;
154
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "pathassistant", VERSION$2, RepresentationType$2, equals$2);
155
+ return createLink(key);
156
+ };
157
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
158
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
159
+ const rootKey = keyBuilderFromType(luvio, input);
160
+ rootKeySet.set(rootKey, {
161
+ namespace: keyPrefix,
162
+ representationName: RepresentationType$2,
163
+ mergeable: false
164
+ });
165
+ }
166
+
167
+ function select$4(luvio, params) {
168
+ return select$5();
169
+ }
170
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
171
+ getTypeCacheKeys$2(storeKeyMap, luvio, response);
172
+ }
173
+ function ingestSuccess$2(luvio, resourceParams, response) {
174
+ const { body } = response;
175
+ const key = keyBuilderFromType(luvio, body);
176
+ luvio.storeIngest(key, ingest$2, body);
177
+ const snapshot = luvio.storeLookup({
178
+ recordId: key,
179
+ node: select$4(),
180
+ variables: {},
181
+ });
182
+ if (process.env.NODE_ENV !== 'production') {
183
+ if (snapshot.state !== 'Fulfilled') {
184
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
185
+ }
186
+ }
187
+ deepFreeze(snapshot.data);
188
+ return snapshot;
189
+ }
190
+ function createResourceRequest$2(config) {
191
+ const headers = {};
192
+ return {
193
+ baseUri: '/services/data/v60.0',
194
+ basePath: '/connect/pathassistant/collapsibleDrawerUserPref',
195
+ method: 'patch',
196
+ body: null,
197
+ urlParams: {},
198
+ queryParams: config.queryParams,
199
+ headers,
200
+ priority: 'normal',
201
+ };
202
+ }
203
+
204
+ const adapterName$2 = 'updateCollapsibleDrawerUserPref';
205
+ const updateCollapsibleDrawerUserPref_ConfigPropertyMetadata = [
206
+ generateParamConfigMetadata('isCollapsed', false, 1 /* QueryParameter */, 1 /* Boolean */),
207
+ ];
208
+ const updateCollapsibleDrawerUserPref_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, updateCollapsibleDrawerUserPref_ConfigPropertyMetadata);
209
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(updateCollapsibleDrawerUserPref_ConfigPropertyMetadata);
210
+ function typeCheckConfig$2(untrustedConfig) {
211
+ const config = {};
212
+ typeCheckConfig$3(untrustedConfig, config, updateCollapsibleDrawerUserPref_ConfigPropertyMetadata);
213
+ return config;
214
+ }
215
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
216
+ if (!untrustedIsObject(untrustedConfig)) {
217
+ return null;
218
+ }
219
+ if (process.env.NODE_ENV !== 'production') {
220
+ validateConfig(untrustedConfig, configPropertyNames);
221
+ }
222
+ const config = typeCheckConfig$2(untrustedConfig);
223
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
224
+ return null;
225
+ }
226
+ return config;
227
+ }
228
+ function buildNetworkSnapshot$2(luvio, config, options) {
229
+ const resourceParams = createResourceParams$2(config);
230
+ const request = createResourceRequest$2(resourceParams);
231
+ return luvio.dispatchResourceRequest(request, options)
232
+ .then((response) => {
233
+ return luvio.handleSuccessResponse(() => {
234
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response);
235
+ return luvio.storeBroadcast().then(() => snapshot);
236
+ }, () => {
237
+ const cache = new StoreKeyMap();
238
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
239
+ return cache;
240
+ });
241
+ }, (response) => {
242
+ deepFreeze(response);
243
+ throw response;
244
+ });
245
+ }
246
+ const updateCollapsibleDrawerUserPrefAdapterFactory = (luvio) => {
247
+ return function updateCollapsibleDrawerUserPref(untrustedConfig) {
248
+ const config = validateAdapterConfig$2(untrustedConfig, updateCollapsibleDrawerUserPref_ConfigPropertyNames);
249
+ // Invalid or incomplete config
250
+ if (config === null) {
251
+ throw new Error('Invalid config for "updateCollapsibleDrawerUserPref"');
252
+ }
253
+ return buildNetworkSnapshot$2(luvio, config);
254
+ };
255
+ };
256
+
82
257
  const TTL$1 = 30000;
83
- const VERSION$1 = "1f57b4fe53f48c0f19bd1bb4016dcfd9";
258
+ const VERSION$1 = "4fa0084a0c26cd9bb89e092a910800f1";
84
259
  function validate$1(obj, path = 'PathAssistantMetadataRepresentation') {
85
260
  const v_error = (() => {
86
261
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -230,14 +405,14 @@ const getPathAssistant_ConfigPropertyMetadata = [
230
405
  generateParamConfigMetadata('picklistFieldApiName', false, 1 /* QueryParameter */, 0 /* String */),
231
406
  ];
232
407
  const getPathAssistant_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getPathAssistant_ConfigPropertyMetadata);
233
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$2(getPathAssistant_ConfigPropertyMetadata);
408
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(getPathAssistant_ConfigPropertyMetadata);
234
409
  function keyBuilder$2(luvio, config) {
235
410
  const resourceParams = createResourceParams$1(config);
236
411
  return keyBuilder$3(luvio, resourceParams);
237
412
  }
238
413
  function typeCheckConfig$1(untrustedConfig) {
239
414
  const config = {};
240
- typeCheckConfig$2(untrustedConfig, config, getPathAssistant_ConfigPropertyMetadata);
415
+ typeCheckConfig$3(untrustedConfig, config, getPathAssistant_ConfigPropertyMetadata);
241
416
  return config;
242
417
  }
243
418
  function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
@@ -312,7 +487,7 @@ const getPathAssistantAdapterFactory = (luvio) => function pathassistant__getPat
312
487
  };
313
488
 
314
489
  const TTL = 30000;
315
- const VERSION = "79dac224a576b8fc190868d354ad0184";
490
+ const VERSION = "ba6bce075182b2ef08471882a25ab029";
316
491
  function validate(obj, path = 'PathAssistantDaysInStageRepresentation') {
317
492
  const v_error = (() => {
318
493
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -431,14 +606,14 @@ const getPathAssistantDaysInStage_ConfigPropertyMetadata = [
431
606
  generateParamConfigMetadata('recordId', true, 0 /* UrlParameter */, 0 /* String */),
432
607
  ];
433
608
  const getPathAssistantDaysInStage_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getPathAssistantDaysInStage_ConfigPropertyMetadata);
434
- const createResourceParams = /*#__PURE__*/ createResourceParams$2(getPathAssistantDaysInStage_ConfigPropertyMetadata);
609
+ const createResourceParams = /*#__PURE__*/ createResourceParams$3(getPathAssistantDaysInStage_ConfigPropertyMetadata);
435
610
  function keyBuilder(luvio, config) {
436
611
  const resourceParams = createResourceParams(config);
437
612
  return keyBuilder$1(luvio, resourceParams);
438
613
  }
439
614
  function typeCheckConfig(untrustedConfig) {
440
615
  const config = {};
441
- typeCheckConfig$2(untrustedConfig, config, getPathAssistantDaysInStage_ConfigPropertyMetadata);
616
+ typeCheckConfig$3(untrustedConfig, config, getPathAssistantDaysInStage_ConfigPropertyMetadata);
442
617
  return config;
443
618
  }
444
619
  function validateAdapterConfig(untrustedConfig, configPropertyNames) {
@@ -512,4 +687,4 @@ const getPathAssistantDaysInStageAdapterFactory = (luvio) => function pathassist
512
687
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
513
688
  };
514
689
 
515
- export { getPathAssistantAdapterFactory, getPathAssistantDaysInStageAdapterFactory };
690
+ export { getPathAssistantAdapterFactory, getPathAssistantDaysInStageAdapterFactory, updateCollapsibleDrawerUserPrefAdapterFactory };
@@ -0,0 +1,15 @@
1
+ import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
2
+ import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
3
+ import { ResourceRequestConfig as resources_patchConnectPathassistantCollapsibleDrawerUserPref_ResourceRequestConfig } from '../resources/patchConnectPathassistantCollapsibleDrawerUserPref';
4
+ import { CollapsibleDrawerUserPrefRepresentation as types_CollapsibleDrawerUserPrefRepresentation_CollapsibleDrawerUserPrefRepresentation } from '../types/CollapsibleDrawerUserPrefRepresentation';
5
+ export declare const adapterName = "updateCollapsibleDrawerUserPref";
6
+ export declare const updateCollapsibleDrawerUserPref_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
7
+ export declare const updateCollapsibleDrawerUserPref_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
8
+ export interface UpdateCollapsibleDrawerUserPrefConfig {
9
+ isCollapsed?: boolean;
10
+ }
11
+ export declare const createResourceParams: (config: UpdateCollapsibleDrawerUserPrefConfig) => resources_patchConnectPathassistantCollapsibleDrawerUserPref_ResourceRequestConfig;
12
+ export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<UpdateCollapsibleDrawerUserPrefConfig>): adapter$45$utils_Untrusted<UpdateCollapsibleDrawerUserPrefConfig>;
13
+ export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): UpdateCollapsibleDrawerUserPrefConfig | null;
14
+ export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: UpdateCollapsibleDrawerUserPrefConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<import("@luvio/engine").FulfilledSnapshot<types_CollapsibleDrawerUserPrefRepresentation_CollapsibleDrawerUserPrefRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_CollapsibleDrawerUserPrefRepresentation_CollapsibleDrawerUserPrefRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_CollapsibleDrawerUserPrefRepresentation_CollapsibleDrawerUserPrefRepresentation, any>>;
15
+ export declare const updateCollapsibleDrawerUserPrefAdapterFactory: $64$luvio_engine_AdapterFactory<UpdateCollapsibleDrawerUserPrefConfig, types_CollapsibleDrawerUserPrefRepresentation_CollapsibleDrawerUserPrefRepresentation>;
@@ -1,2 +1,3 @@
1
+ export { updateCollapsibleDrawerUserPrefAdapterFactory } from '../adapters/updateCollapsibleDrawerUserPref';
1
2
  export { getPathAssistantAdapterFactory } from '../adapters/getPathAssistant';
2
3
  export { getPathAssistantDaysInStageAdapterFactory } from '../adapters/getPathAssistantDaysInStage';
@@ -1,5 +1,6 @@
1
1
  declare let getPathAssistant: any;
2
2
  declare let getPathAssistantDaysInStage: any;
3
+ declare let updateCollapsibleDrawerUserPref: any;
3
4
  declare let getPathAssistant_imperative: any;
4
5
  declare let getPathAssistantDaysInStage_imperative: any;
5
- export { getPathAssistant, getPathAssistantDaysInStage, getPathAssistant_imperative, getPathAssistantDaysInStage_imperative };
6
+ export { getPathAssistant, getPathAssistantDaysInStage, updateCollapsibleDrawerUserPref, getPathAssistant_imperative, getPathAssistantDaysInStage_imperative };
@@ -0,0 +1,12 @@
1
+ import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment, FetchResponse as $64$luvio_engine_FetchResponse, FulfilledSnapshot as $64$luvio_engine_FulfilledSnapshot, StaleSnapshot as $64$luvio_engine_StaleSnapshot, PendingSnapshot as $64$luvio_engine_PendingSnapshot, ResourceRequest as $64$luvio_engine_ResourceRequest } from '@luvio/engine';
2
+ import { CollapsibleDrawerUserPrefRepresentation as types_CollapsibleDrawerUserPrefRepresentation_CollapsibleDrawerUserPrefRepresentation } from '../types/CollapsibleDrawerUserPrefRepresentation';
3
+ export interface ResourceRequestConfig {
4
+ queryParams: {
5
+ isCollapsed?: boolean;
6
+ };
7
+ }
8
+ export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
9
+ export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_CollapsibleDrawerUserPrefRepresentation_CollapsibleDrawerUserPrefRepresentation): void;
10
+ export declare function ingestSuccess(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_CollapsibleDrawerUserPrefRepresentation_CollapsibleDrawerUserPrefRepresentation>): $64$luvio_engine_FulfilledSnapshot<types_CollapsibleDrawerUserPrefRepresentation_CollapsibleDrawerUserPrefRepresentation, {}> | $64$luvio_engine_StaleSnapshot<types_CollapsibleDrawerUserPrefRepresentation_CollapsibleDrawerUserPrefRepresentation, {}> | $64$luvio_engine_PendingSnapshot<types_CollapsibleDrawerUserPrefRepresentation_CollapsibleDrawerUserPrefRepresentation, any>;
11
+ export declare function createResourceRequest(config: ResourceRequestConfig): $64$luvio_engine_ResourceRequest;
12
+ export default createResourceRequest;
@@ -0,0 +1,41 @@
1
+ import { KeyMetadata as $64$luvio_engine_KeyMetadata, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Luvio as $64$luvio_engine_Luvio, IngestPath as $64$luvio_engine_IngestPath, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap } from '@luvio/engine';
2
+ export declare const TTL = 30000;
3
+ export declare const VERSION = "a729b9451867a2ddc52e8106de4e17c5";
4
+ export declare function validate(obj: any, path?: string): TypeError | null;
5
+ export declare const RepresentationType: string;
6
+ export interface KeyParams extends $64$luvio_engine_KeyMetadata {
7
+ apiName: string;
8
+ }
9
+ export type CollapsibleDrawerUserPrefRepresentationNormalizedKeyMetadata = KeyParams & $64$luvio_engine_NormalizedKeyMetadata;
10
+ export type PartialCollapsibleDrawerUserPrefRepresentationNormalizedKeyMetadata = Partial<KeyParams> & $64$luvio_engine_NormalizedKeyMetadata;
11
+ export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: KeyParams): string;
12
+ export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, config: KeyParams): CollapsibleDrawerUserPrefRepresentationNormalizedKeyMetadata;
13
+ export declare function keyBuilderFromType(luvio: $64$luvio_engine_Luvio, object: CollapsibleDrawerUserPrefRepresentation): string;
14
+ export declare function keyBuilderFromType_StructuredKey(luvio: $64$luvio_engine_Luvio, object: CollapsibleDrawerUserPrefRepresentation): $64$luvio_engine_NormalizedKeyMetadata;
15
+ export declare function normalize(input: CollapsibleDrawerUserPrefRepresentation, existing: CollapsibleDrawerUserPrefRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): CollapsibleDrawerUserPrefRepresentationNormalized;
16
+ export declare const select: () => $64$luvio_engine_FragmentSelection;
17
+ export declare function equals(existing: CollapsibleDrawerUserPrefRepresentationNormalized, incoming: CollapsibleDrawerUserPrefRepresentationNormalized): boolean;
18
+ export declare const ingest: $64$luvio_engine_ResourceIngest;
19
+ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: CollapsibleDrawerUserPrefRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
20
+ /**
21
+ * Represents the Collapsible Drawer User Pref result
22
+ *
23
+ * Keys:
24
+ * apiName (string): apiName
25
+ */
26
+ export interface CollapsibleDrawerUserPrefRepresentationNormalized {
27
+ /** Value representing the apiName field */
28
+ apiName: string;
29
+ /** Value representing the isSuccess field */
30
+ isSuccess: boolean;
31
+ }
32
+ /**
33
+ * Represents the Collapsible Drawer User Pref result
34
+ *
35
+ * Keys:
36
+ * apiName (string): apiName
37
+ */
38
+ export interface CollapsibleDrawerUserPrefRepresentation {
39
+ apiName: string;
40
+ isSuccess: boolean;
41
+ }
@@ -1,6 +1,6 @@
1
1
  import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
2
2
  export declare const TTL = 30000;
3
- export declare const VERSION = "79dac224a576b8fc190868d354ad0184";
3
+ export declare const VERSION = "ba6bce075182b2ef08471882a25ab029";
4
4
  export declare function validate(obj: any, path?: string): TypeError | null;
5
5
  export declare const RepresentationType: string;
6
6
  export declare function normalize(input: PathAssistantDaysInStageRepresentation, existing: PathAssistantDaysInStageRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): PathAssistantDaysInStageRepresentationNormalized;
@@ -9,7 +9,7 @@ export declare function equals(existing: PathAssistantDaysInStageRepresentationN
9
9
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
10
  export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: PathAssistantDaysInStageRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
11
11
  /**
12
- * Path Assistant days-in-stage data returned by Connect API
12
+ * Represents the Path Assistant days-in-stage data
13
13
  *
14
14
  * Keys:
15
15
  * (none)
@@ -19,7 +19,7 @@ export interface PathAssistantDaysInStageRepresentationNormalized {
19
19
  picklistValuesToDays: unknown;
20
20
  }
21
21
  /**
22
- * Path Assistant days-in-stage data returned by Connect API
22
+ * Represents the Path Assistant days-in-stage data
23
23
  *
24
24
  * Keys:
25
25
  * (none)
@@ -1,6 +1,6 @@
1
1
  import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
2
2
  export declare const TTL = 30000;
3
- export declare const VERSION = "1f57b4fe53f48c0f19bd1bb4016dcfd9";
3
+ export declare const VERSION = "4fa0084a0c26cd9bb89e092a910800f1";
4
4
  export declare function validate(obj: any, path?: string): TypeError | null;
5
5
  export declare const RepresentationType: string;
6
6
  export declare function normalize(input: PathAssistantMetadataRepresentation, existing: PathAssistantMetadataRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): PathAssistantMetadataRepresentationNormalized;
@@ -9,7 +9,7 @@ export declare function equals(existing: PathAssistantMetadataRepresentationNorm
9
9
  export declare const ingest: $64$luvio_engine_ResourceIngest;
10
10
  export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: PathAssistantMetadataRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
11
11
  /**
12
- * Path Assistant metadata returned by Connect API
12
+ * Represents all Path Assistant related metadata
13
13
  *
14
14
  * Keys:
15
15
  * (none)
@@ -19,11 +19,11 @@ export interface PathAssistantMetadataRepresentationNormalized {
19
19
  extraData: unknown;
20
20
  /** Value representing the Path Assistant */
21
21
  pathAssistant: unknown;
22
- /** Value representing the parent record data */
22
+ /** Value representing the parent record */
23
23
  recordData: unknown;
24
24
  }
25
25
  /**
26
- * Path Assistant metadata returned by Connect API
26
+ * Represents all Path Assistant related metadata
27
27
  *
28
28
  * Keys:
29
29
  * (none)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-sales-pathassistant",
3
- "version": "1.249.0",
3
+ "version": "1.250.1",
4
4
  "description": "Connect APIs for Path Assistant",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "dist/es/es2018/sales-pathassistant.js",
package/sfdc/index.js CHANGED
@@ -14,7 +14,7 @@
14
14
  /* proxy-compat-disable */
15
15
  import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
16
16
  import { withDefaultLuvio } from 'force/ldsEngine';
17
- import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2, typeCheckConfig as typeCheckConfig$2, StoreKeyMap, createResourceParams as createResourceParams$2 } from 'force/luvioEngine';
17
+ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2, typeCheckConfig as typeCheckConfig$3, StoreKeyMap, createResourceParams as createResourceParams$3 } from 'force/luvioEngine';
18
18
 
19
19
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
20
20
  const { keys: ObjectKeys, create: ObjectCreate } = Object;
@@ -89,9 +89,9 @@ function createLink(ref) {
89
89
  };
90
90
  }
91
91
 
92
- const TTL$1 = 30000;
93
- const VERSION$1 = "1f57b4fe53f48c0f19bd1bb4016dcfd9";
94
- function validate$1(obj, path = 'PathAssistantMetadataRepresentation') {
92
+ const TTL$2 = 30000;
93
+ const VERSION$2 = "4fa0084a0c26cd9bb89e092a910800f1";
94
+ function validate$2(obj, path = 'PathAssistantMetadataRepresentation') {
95
95
  const v_error = (() => {
96
96
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
97
97
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -114,14 +114,14 @@ function validate$1(obj, path = 'PathAssistantMetadataRepresentation') {
114
114
  })();
115
115
  return v_error === undefined ? null : v_error;
116
116
  }
117
- const RepresentationType$1 = 'PathAssistantMetadataRepresentation';
118
- function normalize$1(input, existing, path, luvio, store, timestamp) {
117
+ const RepresentationType$2 = 'PathAssistantMetadataRepresentation';
118
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
119
119
  return input;
120
120
  }
121
- const select$3 = function PathAssistantMetadataRepresentationSelect() {
121
+ const select$5 = function PathAssistantMetadataRepresentationSelect() {
122
122
  return {
123
123
  kind: 'Fragment',
124
- version: VERSION$1,
124
+ version: VERSION$2,
125
125
  private: [],
126
126
  selections: [
127
127
  {
@@ -142,7 +142,7 @@ const select$3 = function PathAssistantMetadataRepresentationSelect() {
142
142
  ]
143
143
  };
144
144
  };
145
- function equals$1(existing, incoming) {
145
+ function equals$2(existing, incoming) {
146
146
  const existing_extraData = existing.extraData;
147
147
  const incoming_extraData = incoming.extraData;
148
148
  if (JSONStringify(incoming_extraData) !== JSONStringify(existing_extraData)) {
@@ -160,44 +160,44 @@ function equals$1(existing, incoming) {
160
160
  }
161
161
  return true;
162
162
  }
163
- const ingest$1 = function PathAssistantMetadataRepresentationIngest(input, path, luvio, store, timestamp) {
163
+ const ingest$2 = function PathAssistantMetadataRepresentationIngest(input, path, luvio, store, timestamp) {
164
164
  if (process.env.NODE_ENV !== 'production') {
165
- const validateError = validate$1(input);
165
+ const validateError = validate$2(input);
166
166
  if (validateError !== null) {
167
167
  throw validateError;
168
168
  }
169
169
  }
170
170
  const key = path.fullPath;
171
- const ttlToUse = TTL$1;
172
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "pathassistant", VERSION$1, RepresentationType$1, equals$1);
171
+ const ttlToUse = TTL$2;
172
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "pathassistant", VERSION$2, RepresentationType$2, equals$2);
173
173
  return createLink(key);
174
174
  };
175
- function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
175
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
176
176
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
177
177
  const rootKey = fullPathFactory();
178
178
  rootKeySet.set(rootKey, {
179
179
  namespace: keyPrefix,
180
- representationName: RepresentationType$1,
180
+ representationName: RepresentationType$2,
181
181
  mergeable: false
182
182
  });
183
183
  }
184
184
 
185
- function select$2(luvio, params) {
186
- return select$3();
185
+ function select$4(luvio, params) {
186
+ return select$5();
187
187
  }
188
- function keyBuilder$3(luvio, params) {
188
+ function keyBuilder$4(luvio, params) {
189
189
  return keyPrefix + '::PathAssistantMetadataRepresentation:(' + 'picklistFieldApiName:' + params.queryParams.picklistFieldApiName + ',' + 'recordId:' + params.urlParams.recordId + ')';
190
190
  }
191
- function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
192
- getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$3(luvio, resourceParams));
191
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
192
+ getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$4(luvio, resourceParams));
193
193
  }
194
- function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
194
+ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
195
195
  const { body } = response;
196
- const key = keyBuilder$3(luvio, resourceParams);
197
- luvio.storeIngest(key, ingest$1, body);
196
+ const key = keyBuilder$4(luvio, resourceParams);
197
+ luvio.storeIngest(key, ingest$2, body);
198
198
  const snapshot = luvio.storeLookup({
199
199
  recordId: key,
200
- node: select$2(),
200
+ node: select$4(),
201
201
  variables: {},
202
202
  }, snapshotRefresh);
203
203
  if (process.env.NODE_ENV !== 'production') {
@@ -209,18 +209,18 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
209
209
  return snapshot;
210
210
  }
211
211
  function ingestError$1(luvio, params, error, snapshotRefresh) {
212
- const key = keyBuilder$3(luvio, params);
212
+ const key = keyBuilder$4(luvio, params);
213
213
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
214
214
  const storeMetadataParams = {
215
- ttl: TTL$1,
215
+ ttl: TTL$2,
216
216
  namespace: keyPrefix,
217
- version: VERSION$1,
218
- representationName: RepresentationType$1
217
+ version: VERSION$2,
218
+ representationName: RepresentationType$2
219
219
  };
220
220
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
221
221
  return errorSnapshot;
222
222
  }
223
- function createResourceRequest$1(config) {
223
+ function createResourceRequest$2(config) {
224
224
  const headers = {};
225
225
  return {
226
226
  baseUri: '/services/data/v60.0',
@@ -234,61 +234,61 @@ function createResourceRequest$1(config) {
234
234
  };
235
235
  }
236
236
 
237
- const adapterName$1 = 'getPathAssistant';
237
+ const adapterName$2 = 'getPathAssistant';
238
238
  const getPathAssistant_ConfigPropertyMetadata = [
239
239
  generateParamConfigMetadata('recordId', true, 0 /* UrlParameter */, 0 /* String */),
240
240
  generateParamConfigMetadata('picklistFieldApiName', false, 1 /* QueryParameter */, 0 /* String */),
241
241
  ];
242
- const getPathAssistant_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getPathAssistant_ConfigPropertyMetadata);
243
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$2(getPathAssistant_ConfigPropertyMetadata);
244
- function keyBuilder$2(luvio, config) {
245
- const resourceParams = createResourceParams$1(config);
246
- return keyBuilder$3(luvio, resourceParams);
242
+ const getPathAssistant_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getPathAssistant_ConfigPropertyMetadata);
243
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(getPathAssistant_ConfigPropertyMetadata);
244
+ function keyBuilder$3(luvio, config) {
245
+ const resourceParams = createResourceParams$2(config);
246
+ return keyBuilder$4(luvio, resourceParams);
247
247
  }
248
- function typeCheckConfig$1(untrustedConfig) {
248
+ function typeCheckConfig$2(untrustedConfig) {
249
249
  const config = {};
250
- typeCheckConfig$2(untrustedConfig, config, getPathAssistant_ConfigPropertyMetadata);
250
+ typeCheckConfig$3(untrustedConfig, config, getPathAssistant_ConfigPropertyMetadata);
251
251
  return config;
252
252
  }
253
- function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
253
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
254
254
  if (!untrustedIsObject(untrustedConfig)) {
255
255
  return null;
256
256
  }
257
257
  if (process.env.NODE_ENV !== 'production') {
258
258
  validateConfig(untrustedConfig, configPropertyNames);
259
259
  }
260
- const config = typeCheckConfig$1(untrustedConfig);
260
+ const config = typeCheckConfig$2(untrustedConfig);
261
261
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
262
262
  return null;
263
263
  }
264
264
  return config;
265
265
  }
266
266
  function adapterFragment$1(luvio, config) {
267
- createResourceParams$1(config);
268
- return select$2();
267
+ createResourceParams$2(config);
268
+ return select$4();
269
269
  }
270
270
  function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
271
- const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
271
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
272
272
  config,
273
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
273
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
274
274
  });
275
275
  return luvio.storeBroadcast().then(() => snapshot);
276
276
  }
277
277
  function onFetchResponseError$1(luvio, config, resourceParams, response) {
278
278
  const snapshot = ingestError$1(luvio, resourceParams, response, {
279
279
  config,
280
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
280
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
281
281
  });
282
282
  return luvio.storeBroadcast().then(() => snapshot);
283
283
  }
284
- function buildNetworkSnapshot$1(luvio, config, options) {
285
- const resourceParams = createResourceParams$1(config);
286
- const request = createResourceRequest$1(resourceParams);
284
+ function buildNetworkSnapshot$2(luvio, config, options) {
285
+ const resourceParams = createResourceParams$2(config);
286
+ const request = createResourceRequest$2(resourceParams);
287
287
  return luvio.dispatchResourceRequest(request, options)
288
288
  .then((response) => {
289
289
  return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
290
290
  const cache = new StoreKeyMap();
291
- getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
291
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
292
292
  return cache;
293
293
  });
294
294
  }, (response) => {
@@ -296,23 +296,23 @@ function buildNetworkSnapshot$1(luvio, config, options) {
296
296
  });
297
297
  }
298
298
  function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
299
- return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
299
+ return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
300
300
  }
301
301
  function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
302
302
  const { luvio, config } = context;
303
303
  const selector = {
304
- recordId: keyBuilder$2(luvio, config),
304
+ recordId: keyBuilder$3(luvio, config),
305
305
  node: adapterFragment$1(luvio, config),
306
306
  variables: {},
307
307
  };
308
308
  const cacheSnapshot = storeLookup(selector, {
309
309
  config,
310
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
310
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
311
311
  });
312
312
  return cacheSnapshot;
313
313
  }
314
314
  const getPathAssistantAdapterFactory = (luvio) => function pathassistant__getPathAssistant(untrustedConfig, requestContext) {
315
- const config = validateAdapterConfig$1(untrustedConfig, getPathAssistant_ConfigPropertyNames);
315
+ const config = validateAdapterConfig$2(untrustedConfig, getPathAssistant_ConfigPropertyNames);
316
316
  // Invalid or incomplete config
317
317
  if (config === null) {
318
318
  return null;
@@ -321,9 +321,9 @@ const getPathAssistantAdapterFactory = (luvio) => function pathassistant__getPat
321
321
  buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
322
322
  };
323
323
 
324
- const TTL = 30000;
325
- const VERSION = "79dac224a576b8fc190868d354ad0184";
326
- function validate(obj, path = 'PathAssistantDaysInStageRepresentation') {
324
+ const TTL$1 = 30000;
325
+ const VERSION$1 = "ba6bce075182b2ef08471882a25ab029";
326
+ function validate$1(obj, path = 'PathAssistantDaysInStageRepresentation') {
327
327
  const v_error = (() => {
328
328
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
329
329
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -336,14 +336,14 @@ function validate(obj, path = 'PathAssistantDaysInStageRepresentation') {
336
336
  })();
337
337
  return v_error === undefined ? null : v_error;
338
338
  }
339
- const RepresentationType = 'PathAssistantDaysInStageRepresentation';
340
- function normalize(input, existing, path, luvio, store, timestamp) {
339
+ const RepresentationType$1 = 'PathAssistantDaysInStageRepresentation';
340
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
341
341
  return input;
342
342
  }
343
- const select$1 = function PathAssistantDaysInStageRepresentationSelect() {
343
+ const select$3 = function PathAssistantDaysInStageRepresentationSelect() {
344
344
  return {
345
345
  kind: 'Fragment',
346
- version: VERSION,
346
+ version: VERSION$1,
347
347
  private: [],
348
348
  selections: [
349
349
  {
@@ -354,7 +354,7 @@ const select$1 = function PathAssistantDaysInStageRepresentationSelect() {
354
354
  ]
355
355
  };
356
356
  };
357
- function equals(existing, incoming) {
357
+ function equals$1(existing, incoming) {
358
358
  const existing_picklistValuesToDays = existing.picklistValuesToDays;
359
359
  const incoming_picklistValuesToDays = incoming.picklistValuesToDays;
360
360
  if (JSONStringify(incoming_picklistValuesToDays) !== JSONStringify(existing_picklistValuesToDays)) {
@@ -362,44 +362,44 @@ function equals(existing, incoming) {
362
362
  }
363
363
  return true;
364
364
  }
365
- const ingest = function PathAssistantDaysInStageRepresentationIngest(input, path, luvio, store, timestamp) {
365
+ const ingest$1 = function PathAssistantDaysInStageRepresentationIngest(input, path, luvio, store, timestamp) {
366
366
  if (process.env.NODE_ENV !== 'production') {
367
- const validateError = validate(input);
367
+ const validateError = validate$1(input);
368
368
  if (validateError !== null) {
369
369
  throw validateError;
370
370
  }
371
371
  }
372
372
  const key = path.fullPath;
373
- const ttlToUse = TTL;
374
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "pathassistant", VERSION, RepresentationType, equals);
373
+ const ttlToUse = TTL$1;
374
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "pathassistant", VERSION$1, RepresentationType$1, equals$1);
375
375
  return createLink(key);
376
376
  };
377
- function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
377
+ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
378
378
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
379
379
  const rootKey = fullPathFactory();
380
380
  rootKeySet.set(rootKey, {
381
381
  namespace: keyPrefix,
382
- representationName: RepresentationType,
382
+ representationName: RepresentationType$1,
383
383
  mergeable: false
384
384
  });
385
385
  }
386
386
 
387
- function select(luvio, params) {
388
- return select$1();
387
+ function select$2(luvio, params) {
388
+ return select$3();
389
389
  }
390
- function keyBuilder$1(luvio, params) {
390
+ function keyBuilder$2(luvio, params) {
391
391
  return keyPrefix + '::PathAssistantDaysInStageRepresentation:(' + 'recordId:' + params.urlParams.recordId + ')';
392
392
  }
393
- function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
394
- getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
393
+ function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
394
+ getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$2(luvio, resourceParams));
395
395
  }
396
- function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
396
+ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
397
397
  const { body } = response;
398
- const key = keyBuilder$1(luvio, resourceParams);
399
- luvio.storeIngest(key, ingest, body);
398
+ const key = keyBuilder$2(luvio, resourceParams);
399
+ luvio.storeIngest(key, ingest$1, body);
400
400
  const snapshot = luvio.storeLookup({
401
401
  recordId: key,
402
- node: select(),
402
+ node: select$2(),
403
403
  variables: {},
404
404
  }, snapshotRefresh);
405
405
  if (process.env.NODE_ENV !== 'production') {
@@ -411,18 +411,18 @@ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
411
411
  return snapshot;
412
412
  }
413
413
  function ingestError(luvio, params, error, snapshotRefresh) {
414
- const key = keyBuilder$1(luvio, params);
414
+ const key = keyBuilder$2(luvio, params);
415
415
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
416
416
  const storeMetadataParams = {
417
- ttl: TTL,
417
+ ttl: TTL$1,
418
418
  namespace: keyPrefix,
419
- version: VERSION,
420
- representationName: RepresentationType
419
+ version: VERSION$1,
420
+ representationName: RepresentationType$1
421
421
  };
422
422
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
423
423
  return errorSnapshot;
424
424
  }
425
- function createResourceRequest(config) {
425
+ function createResourceRequest$1(config) {
426
426
  const headers = {};
427
427
  return {
428
428
  baseUri: '/services/data/v60.0',
@@ -436,60 +436,60 @@ function createResourceRequest(config) {
436
436
  };
437
437
  }
438
438
 
439
- const adapterName = 'getPathAssistantDaysInStage';
439
+ const adapterName$1 = 'getPathAssistantDaysInStage';
440
440
  const getPathAssistantDaysInStage_ConfigPropertyMetadata = [
441
441
  generateParamConfigMetadata('recordId', true, 0 /* UrlParameter */, 0 /* String */),
442
442
  ];
443
- const getPathAssistantDaysInStage_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getPathAssistantDaysInStage_ConfigPropertyMetadata);
444
- const createResourceParams = /*#__PURE__*/ createResourceParams$2(getPathAssistantDaysInStage_ConfigPropertyMetadata);
445
- function keyBuilder(luvio, config) {
446
- const resourceParams = createResourceParams(config);
447
- return keyBuilder$1(luvio, resourceParams);
443
+ const getPathAssistantDaysInStage_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getPathAssistantDaysInStage_ConfigPropertyMetadata);
444
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(getPathAssistantDaysInStage_ConfigPropertyMetadata);
445
+ function keyBuilder$1(luvio, config) {
446
+ const resourceParams = createResourceParams$1(config);
447
+ return keyBuilder$2(luvio, resourceParams);
448
448
  }
449
- function typeCheckConfig(untrustedConfig) {
449
+ function typeCheckConfig$1(untrustedConfig) {
450
450
  const config = {};
451
- typeCheckConfig$2(untrustedConfig, config, getPathAssistantDaysInStage_ConfigPropertyMetadata);
451
+ typeCheckConfig$3(untrustedConfig, config, getPathAssistantDaysInStage_ConfigPropertyMetadata);
452
452
  return config;
453
453
  }
454
- function validateAdapterConfig(untrustedConfig, configPropertyNames) {
454
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
455
455
  if (!untrustedIsObject(untrustedConfig)) {
456
456
  return null;
457
457
  }
458
458
  if (process.env.NODE_ENV !== 'production') {
459
459
  validateConfig(untrustedConfig, configPropertyNames);
460
460
  }
461
- const config = typeCheckConfig(untrustedConfig);
461
+ const config = typeCheckConfig$1(untrustedConfig);
462
462
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
463
463
  return null;
464
464
  }
465
465
  return config;
466
466
  }
467
467
  function adapterFragment(luvio, config) {
468
- createResourceParams(config);
469
- return select();
468
+ createResourceParams$1(config);
469
+ return select$2();
470
470
  }
471
471
  function onFetchResponseSuccess(luvio, config, resourceParams, response) {
472
- const snapshot = ingestSuccess(luvio, resourceParams, response, {
472
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
473
473
  config,
474
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
474
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
475
475
  });
476
476
  return luvio.storeBroadcast().then(() => snapshot);
477
477
  }
478
478
  function onFetchResponseError(luvio, config, resourceParams, response) {
479
479
  const snapshot = ingestError(luvio, resourceParams, response, {
480
480
  config,
481
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
481
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
482
482
  });
483
483
  return luvio.storeBroadcast().then(() => snapshot);
484
484
  }
485
- function buildNetworkSnapshot(luvio, config, options) {
486
- const resourceParams = createResourceParams(config);
487
- const request = createResourceRequest(resourceParams);
485
+ function buildNetworkSnapshot$1(luvio, config, options) {
486
+ const resourceParams = createResourceParams$1(config);
487
+ const request = createResourceRequest$1(resourceParams);
488
488
  return luvio.dispatchResourceRequest(request, options)
489
489
  .then((response) => {
490
490
  return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
491
491
  const cache = new StoreKeyMap();
492
- getResponseCacheKeys(cache, luvio, resourceParams, response.body);
492
+ getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
493
493
  return cache;
494
494
  });
495
495
  }, (response) => {
@@ -497,23 +497,23 @@ function buildNetworkSnapshot(luvio, config, options) {
497
497
  });
498
498
  }
499
499
  function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
500
- return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
500
+ return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
501
501
  }
502
502
  function buildCachedSnapshotCachePolicy(context, storeLookup) {
503
503
  const { luvio, config } = context;
504
504
  const selector = {
505
- recordId: keyBuilder(luvio, config),
505
+ recordId: keyBuilder$1(luvio, config),
506
506
  node: adapterFragment(luvio, config),
507
507
  variables: {},
508
508
  };
509
509
  const cacheSnapshot = storeLookup(selector, {
510
510
  config,
511
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
511
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
512
512
  });
513
513
  return cacheSnapshot;
514
514
  }
515
515
  const getPathAssistantDaysInStageAdapterFactory = (luvio) => function pathassistant__getPathAssistantDaysInStage(untrustedConfig, requestContext) {
516
- const config = validateAdapterConfig(untrustedConfig, getPathAssistantDaysInStage_ConfigPropertyNames);
516
+ const config = validateAdapterConfig$1(untrustedConfig, getPathAssistantDaysInStage_ConfigPropertyNames);
517
517
  // Invalid or incomplete config
518
518
  if (config === null) {
519
519
  return null;
@@ -522,8 +522,184 @@ const getPathAssistantDaysInStageAdapterFactory = (luvio) => function pathassist
522
522
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
523
523
  };
524
524
 
525
+ const TTL = 30000;
526
+ const VERSION = "a729b9451867a2ddc52e8106de4e17c5";
527
+ function validate(obj, path = 'CollapsibleDrawerUserPrefRepresentation') {
528
+ const v_error = (() => {
529
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
530
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
531
+ }
532
+ const obj_apiName = obj.apiName;
533
+ const path_apiName = path + '.apiName';
534
+ if (typeof obj_apiName !== 'string') {
535
+ return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
536
+ }
537
+ const obj_isSuccess = obj.isSuccess;
538
+ const path_isSuccess = path + '.isSuccess';
539
+ if (typeof obj_isSuccess !== 'boolean') {
540
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
541
+ }
542
+ })();
543
+ return v_error === undefined ? null : v_error;
544
+ }
545
+ const RepresentationType = 'CollapsibleDrawerUserPrefRepresentation';
546
+ function keyBuilder(luvio, config) {
547
+ return keyPrefix + '::' + RepresentationType + ':' + config.apiName;
548
+ }
549
+ function keyBuilderFromType(luvio, object) {
550
+ const keyParams = {
551
+ apiName: object.apiName
552
+ };
553
+ return keyBuilder(luvio, keyParams);
554
+ }
555
+ function normalize(input, existing, path, luvio, store, timestamp) {
556
+ return input;
557
+ }
558
+ const select$1 = function CollapsibleDrawerUserPrefRepresentationSelect() {
559
+ return {
560
+ kind: 'Fragment',
561
+ version: VERSION,
562
+ private: [],
563
+ selections: [
564
+ {
565
+ name: 'apiName',
566
+ kind: 'Scalar'
567
+ },
568
+ {
569
+ name: 'isSuccess',
570
+ kind: 'Scalar'
571
+ }
572
+ ]
573
+ };
574
+ };
575
+ function equals(existing, incoming) {
576
+ const existing_isSuccess = existing.isSuccess;
577
+ const incoming_isSuccess = incoming.isSuccess;
578
+ if (!(existing_isSuccess === incoming_isSuccess)) {
579
+ return false;
580
+ }
581
+ const existing_apiName = existing.apiName;
582
+ const incoming_apiName = incoming.apiName;
583
+ if (!(existing_apiName === incoming_apiName)) {
584
+ return false;
585
+ }
586
+ return true;
587
+ }
588
+ const ingest = function CollapsibleDrawerUserPrefRepresentationIngest(input, path, luvio, store, timestamp) {
589
+ if (process.env.NODE_ENV !== 'production') {
590
+ const validateError = validate(input);
591
+ if (validateError !== null) {
592
+ throw validateError;
593
+ }
594
+ }
595
+ const key = keyBuilderFromType(luvio, input);
596
+ const ttlToUse = TTL;
597
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "pathassistant", VERSION, RepresentationType, equals);
598
+ return createLink(key);
599
+ };
600
+ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
601
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
602
+ const rootKey = keyBuilderFromType(luvio, input);
603
+ rootKeySet.set(rootKey, {
604
+ namespace: keyPrefix,
605
+ representationName: RepresentationType,
606
+ mergeable: false
607
+ });
608
+ }
609
+
610
+ function select(luvio, params) {
611
+ return select$1();
612
+ }
613
+ function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
614
+ getTypeCacheKeys(storeKeyMap, luvio, response);
615
+ }
616
+ function ingestSuccess(luvio, resourceParams, response) {
617
+ const { body } = response;
618
+ const key = keyBuilderFromType(luvio, body);
619
+ luvio.storeIngest(key, ingest, body);
620
+ const snapshot = luvio.storeLookup({
621
+ recordId: key,
622
+ node: select(),
623
+ variables: {},
624
+ });
625
+ if (process.env.NODE_ENV !== 'production') {
626
+ if (snapshot.state !== 'Fulfilled') {
627
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
628
+ }
629
+ }
630
+ deepFreeze(snapshot.data);
631
+ return snapshot;
632
+ }
633
+ function createResourceRequest(config) {
634
+ const headers = {};
635
+ return {
636
+ baseUri: '/services/data/v60.0',
637
+ basePath: '/connect/pathassistant/collapsibleDrawerUserPref',
638
+ method: 'patch',
639
+ body: null,
640
+ urlParams: {},
641
+ queryParams: config.queryParams,
642
+ headers,
643
+ priority: 'normal',
644
+ };
645
+ }
646
+
647
+ const adapterName = 'updateCollapsibleDrawerUserPref';
648
+ const updateCollapsibleDrawerUserPref_ConfigPropertyMetadata = [
649
+ generateParamConfigMetadata('isCollapsed', false, 1 /* QueryParameter */, 1 /* Boolean */),
650
+ ];
651
+ const updateCollapsibleDrawerUserPref_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, updateCollapsibleDrawerUserPref_ConfigPropertyMetadata);
652
+ const createResourceParams = /*#__PURE__*/ createResourceParams$3(updateCollapsibleDrawerUserPref_ConfigPropertyMetadata);
653
+ function typeCheckConfig(untrustedConfig) {
654
+ const config = {};
655
+ typeCheckConfig$3(untrustedConfig, config, updateCollapsibleDrawerUserPref_ConfigPropertyMetadata);
656
+ return config;
657
+ }
658
+ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
659
+ if (!untrustedIsObject(untrustedConfig)) {
660
+ return null;
661
+ }
662
+ if (process.env.NODE_ENV !== 'production') {
663
+ validateConfig(untrustedConfig, configPropertyNames);
664
+ }
665
+ const config = typeCheckConfig(untrustedConfig);
666
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
667
+ return null;
668
+ }
669
+ return config;
670
+ }
671
+ function buildNetworkSnapshot(luvio, config, options) {
672
+ const resourceParams = createResourceParams(config);
673
+ const request = createResourceRequest(resourceParams);
674
+ return luvio.dispatchResourceRequest(request, options)
675
+ .then((response) => {
676
+ return luvio.handleSuccessResponse(() => {
677
+ const snapshot = ingestSuccess(luvio, resourceParams, response);
678
+ return luvio.storeBroadcast().then(() => snapshot);
679
+ }, () => {
680
+ const cache = new StoreKeyMap();
681
+ getResponseCacheKeys(cache, luvio, resourceParams, response.body);
682
+ return cache;
683
+ });
684
+ }, (response) => {
685
+ deepFreeze(response);
686
+ throw response;
687
+ });
688
+ }
689
+ const updateCollapsibleDrawerUserPrefAdapterFactory = (luvio) => {
690
+ return function updateCollapsibleDrawerUserPref(untrustedConfig) {
691
+ const config = validateAdapterConfig(untrustedConfig, updateCollapsibleDrawerUserPref_ConfigPropertyNames);
692
+ // Invalid or incomplete config
693
+ if (config === null) {
694
+ throw new Error('Invalid config for "updateCollapsibleDrawerUserPref"');
695
+ }
696
+ return buildNetworkSnapshot(luvio, config);
697
+ };
698
+ };
699
+
525
700
  let getPathAssistant;
526
701
  let getPathAssistantDaysInStage;
702
+ let updateCollapsibleDrawerUserPref;
527
703
  // Imperative GET Adapters
528
704
  let getPathAssistant_imperative;
529
705
  let getPathAssistantDaysInStage_imperative;
@@ -534,9 +710,14 @@ function bindExportsTo(luvio) {
534
710
  // LDS Adapters
535
711
  const getPathAssistant_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getPathAssistant', getPathAssistantAdapterFactory), getPathAssistantMetadata);
536
712
  const getPathAssistantDaysInStage_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getPathAssistantDaysInStage', getPathAssistantDaysInStageAdapterFactory), getPathAssistantDaysInStageMetadata);
713
+ function unwrapSnapshotData(factory) {
714
+ const adapter = factory(luvio);
715
+ return (config) => adapter(config).then(snapshot => snapshot.data);
716
+ }
537
717
  return {
538
718
  getPathAssistant: createWireAdapterConstructor(luvio, getPathAssistant_ldsAdapter, getPathAssistantMetadata),
539
719
  getPathAssistantDaysInStage: createWireAdapterConstructor(luvio, getPathAssistantDaysInStage_ldsAdapter, getPathAssistantDaysInStageMetadata),
720
+ updateCollapsibleDrawerUserPref: unwrapSnapshotData(updateCollapsibleDrawerUserPrefAdapterFactory),
540
721
  // Imperative GET Adapters
541
722
  getPathAssistant_imperative: createImperativeAdapter(luvio, getPathAssistant_ldsAdapter, getPathAssistantMetadata),
542
723
  getPathAssistantDaysInStage_imperative: createImperativeAdapter(luvio, getPathAssistantDaysInStage_ldsAdapter, getPathAssistantDaysInStageMetadata)
@@ -546,10 +727,11 @@ withDefaultLuvio((luvio) => {
546
727
  ({
547
728
  getPathAssistant,
548
729
  getPathAssistantDaysInStage,
730
+ updateCollapsibleDrawerUserPref,
549
731
  getPathAssistant_imperative,
550
732
  getPathAssistantDaysInStage_imperative
551
733
  } = bindExportsTo(luvio));
552
734
  });
553
735
 
554
- export { getPathAssistant, getPathAssistantDaysInStage, getPathAssistantDaysInStage_imperative, getPathAssistant_imperative };
555
- // version: 1.249.0-15efc7f9b
736
+ export { getPathAssistant, getPathAssistantDaysInStage, getPathAssistantDaysInStage_imperative, getPathAssistant_imperative, updateCollapsibleDrawerUserPref };
737
+ // version: 1.250.1-26c7958c1
package/src/raml/api.raml CHANGED
@@ -7,7 +7,6 @@ mediaType: application/json
7
7
  protocols:
8
8
  - https
9
9
  baseUri: /services/data/v60.0
10
-
11
10
  securitySchemes:
12
11
  OAuth2:
13
12
  type: OAuth 2.0
@@ -25,44 +24,66 @@ annotationTypes:
25
24
  oas-body-name:
26
25
  type: string
27
26
  allowedTargets: TypeDeclaration
28
-
29
27
  types:
30
- PathAssistantMetadataRepresentation:
31
- description: Path Assistant metadata returned by Connect API
28
+ CollapsibleDrawerUserPrefRepresentation:
29
+ description: Represents the Collapsible Drawer User Pref result
32
30
  type: object
33
31
  properties:
34
- pathAssistant:
35
- description: Value representing the Path Assistant
36
- type: any
37
- recordData:
38
- description: Value representing the parent record data
39
- type: any
40
- extraData:
41
- description: Value representing extra data related to Path Assistant
42
- type: any
32
+ apiName:
33
+ description: Value representing the apiName field
34
+ type: string
35
+ isSuccess:
36
+ description: Value representing the isSuccess field
37
+ type: boolean
43
38
  PathAssistantDaysInStageRepresentation:
44
- description: Path Assistant days-in-stage data returned by Connect API
39
+ description: Represents the Path Assistant days-in-stage data
45
40
  type: object
46
41
  properties:
47
42
  picklistValuesToDays:
48
43
  description: Value representing Path Assistant days-in-stage data
49
44
  type: any
50
-
45
+ PathAssistantMetadataRepresentation:
46
+ description: Represents all Path Assistant related metadata
47
+ type: object
48
+ properties:
49
+ extraData:
50
+ description: Value representing extra data related to Path Assistant
51
+ type: any
52
+ pathAssistant:
53
+ description: Value representing the Path Assistant
54
+ type: any
55
+ recordData:
56
+ description: Value representing the parent record
57
+ type: any
51
58
  /connect/pathassistant:
59
+ /collapsibleDrawerUserPref:
60
+ patch:
61
+ displayName: patchCollapsibleDrawerUserPref
62
+ description: Update Path Assistant Collapsible Drawer User Pref
63
+ responses:
64
+ '200':
65
+ description: Success
66
+ body:
67
+ application/json:
68
+ type: CollapsibleDrawerUserPrefRepresentation
69
+ queryParameters:
70
+ isCollapsed:
71
+ type: boolean
72
+ required: false
52
73
  /{recordId}:
53
74
  get:
54
75
  displayName: getPathAssistant
55
76
  description: Query Path Assistant metadata
56
- queryParameters:
57
- picklistFieldApiName:
58
- type: string
59
- required: false
60
77
  responses:
61
78
  '200':
62
79
  description: Success
63
80
  body:
64
81
  application/json:
65
82
  type: PathAssistantMetadataRepresentation
83
+ queryParameters:
84
+ picklistFieldApiName:
85
+ type: string
86
+ required: false
66
87
  uriParameters:
67
88
  recordId:
68
89
  type: string
@@ -11,6 +11,10 @@ types:
11
11
  (luvio.ttl): 30000
12
12
  PathAssistantMetadataRepresentation:
13
13
  (luvio.ttl): 30000
14
+ CollapsibleDrawerUserPrefRepresentation:
15
+ (luvio.ttl): 30000
16
+ (luvio.key):
17
+ apiName: apiName
14
18
 
15
19
  /connect/pathassistant:
16
20
  /{recordId}:
@@ -21,3 +25,7 @@ types:
21
25
  get:
22
26
  (luvio.adapter):
23
27
  name: getPathAssistantDaysInStage
28
+ /collapsibleDrawerUserPref:
29
+ patch:
30
+ (luvio.adapter):
31
+ name: updateCollapsibleDrawerUserPref