@salesforce/lds-adapters-industries-actionplan 1.124.1 → 1.124.3

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.
Files changed (29) hide show
  1. package/dist/es/es2018/industries-actionplan.js +1154 -1154
  2. package/dist/{types → es/es2018/types}/src/generated/adapters/adapter-utils.d.ts +66 -66
  3. package/dist/{types → es/es2018/types}/src/generated/adapters/getActionPlanItems.d.ts +27 -27
  4. package/dist/{types → es/es2018/types}/src/generated/adapters/getActionPlanStatusInfo.d.ts +26 -26
  5. package/dist/{types → es/es2018/types}/src/generated/adapters/getActionPlans.d.ts +30 -30
  6. package/dist/{types → es/es2018/types}/src/generated/artifacts/main.d.ts +3 -3
  7. package/dist/{types → es/es2018/types}/src/generated/artifacts/sfdc.d.ts +7 -7
  8. package/dist/{types → es/es2018/types}/src/generated/resources/getConnectActionPlan.d.ts +19 -19
  9. package/dist/{types → es/es2018/types}/src/generated/resources/getConnectActionPlanActionPlanItemsByActionPlanId.d.ts +18 -18
  10. package/dist/{types → es/es2018/types}/src/generated/resources/getConnectActionPlanStatusInfoByActionPlanId.d.ts +15 -15
  11. package/dist/{types → es/es2018/types}/src/generated/types/ActionPlanItemCollectionRepresentation.d.ts +30 -30
  12. package/dist/{types → es/es2018/types}/src/generated/types/ActionPlanItemDetailedRepresentation.d.ts +35 -35
  13. package/dist/{types → es/es2018/types}/src/generated/types/ActionPlanItemListRepresentation.d.ts +30 -30
  14. package/dist/{types → es/es2018/types}/src/generated/types/ActionPlanItemRepresentation.d.ts +29 -29
  15. package/dist/{types → es/es2018/types}/src/generated/types/ActionPlanItemTaskRepresentation.d.ts +39 -39
  16. package/dist/{types → es/es2018/types}/src/generated/types/ActionPlanItemsWrapperRepresentation.d.ts +31 -31
  17. package/dist/{types → es/es2018/types}/src/generated/types/ActionPlanListRepresentation.d.ts +30 -30
  18. package/dist/{types → es/es2018/types}/src/generated/types/ActionPlanRepresentation.d.ts +38 -38
  19. package/dist/{types → es/es2018/types}/src/generated/types/ActionPlanStatusInfoOutputRepresentation.d.ts +40 -40
  20. package/dist/{types → es/es2018/types}/src/generated/types/ActionPlansWrapperOutputRepresentation.d.ts +31 -31
  21. package/dist/{types → es/es2018/types}/src/generated/types/ComputedFieldsWrapperRepresentation.d.ts +33 -33
  22. package/dist/{types → es/es2018/types}/src/generated/types/FieldRepresentation.d.ts +38 -38
  23. package/dist/{types → es/es2018/types}/src/generated/types/TaskProgressRepresentation.d.ts +35 -35
  24. package/dist/{types → es/es2018/types}/src/generated/types/type-utils.d.ts +39 -39
  25. package/package.json +5 -5
  26. package/sfdc/index.d.ts +1 -1
  27. package/sfdc/index.js +1190 -1190
  28. package/dist/umd/es2018/industries-actionplan.js +0 -1215
  29. package/dist/umd/es5/industries-actionplan.js +0 -1228
@@ -6,1200 +6,1200 @@
6
6
 
7
7
  import { serializeStructuredKey, StoreKeyMap } from '@luvio/engine';
8
8
 
9
- const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
- const { keys: ObjectKeys$1, freeze: ObjectFreeze$1, create: ObjectCreate$1 } = Object;
11
- const { isArray: ArrayIsArray$1 } = Array;
12
- /**
13
- * Validates an adapter config is well-formed.
14
- * @param config The config to validate.
15
- * @param adapter The adapter validation configuration.
16
- * @param oneOf The keys the config must contain at least one of.
17
- * @throws A TypeError if config doesn't satisfy the adapter's config validation.
18
- */
19
- function validateConfig(config, adapter, oneOf) {
20
- const { displayName } = adapter;
21
- const { required, optional, unsupported } = adapter.parameters;
22
- if (config === undefined ||
23
- required.every(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
24
- throw new TypeError(`adapter ${displayName} configuration must specify ${required.sort().join(', ')}`);
25
- }
26
- if (oneOf && oneOf.some(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
27
- throw new TypeError(`adapter ${displayName} configuration must specify one of ${oneOf.sort().join(', ')}`);
28
- }
29
- if (unsupported !== undefined &&
30
- unsupported.some(req => ObjectPrototypeHasOwnProperty.call(config, req))) {
31
- throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
32
- }
33
- const supported = required.concat(optional);
34
- if (ObjectKeys$1(config).some(key => !supported.includes(key))) {
35
- throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
36
- }
37
- }
38
- function untrustedIsObject(untrusted) {
39
- return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
40
- }
41
- function areRequiredParametersPresent(config, configPropertyNames) {
42
- return configPropertyNames.parameters.required.every(req => req in config);
43
- }
44
- const snapshotRefreshOptions = {
45
- overrides: {
46
- headers: {
47
- 'Cache-Control': 'no-cache',
48
- },
49
- }
50
- };
9
+ const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
+ const { keys: ObjectKeys$1, freeze: ObjectFreeze$1, create: ObjectCreate$1 } = Object;
11
+ const { isArray: ArrayIsArray$1 } = Array;
12
+ /**
13
+ * Validates an adapter config is well-formed.
14
+ * @param config The config to validate.
15
+ * @param adapter The adapter validation configuration.
16
+ * @param oneOf The keys the config must contain at least one of.
17
+ * @throws A TypeError if config doesn't satisfy the adapter's config validation.
18
+ */
19
+ function validateConfig(config, adapter, oneOf) {
20
+ const { displayName } = adapter;
21
+ const { required, optional, unsupported } = adapter.parameters;
22
+ if (config === undefined ||
23
+ required.every(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
24
+ throw new TypeError(`adapter ${displayName} configuration must specify ${required.sort().join(', ')}`);
25
+ }
26
+ if (oneOf && oneOf.some(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
27
+ throw new TypeError(`adapter ${displayName} configuration must specify one of ${oneOf.sort().join(', ')}`);
28
+ }
29
+ if (unsupported !== undefined &&
30
+ unsupported.some(req => ObjectPrototypeHasOwnProperty.call(config, req))) {
31
+ throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
32
+ }
33
+ const supported = required.concat(optional);
34
+ if (ObjectKeys$1(config).some(key => !supported.includes(key))) {
35
+ throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
36
+ }
37
+ }
38
+ function untrustedIsObject(untrusted) {
39
+ return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
40
+ }
41
+ function areRequiredParametersPresent(config, configPropertyNames) {
42
+ return configPropertyNames.parameters.required.every(req => req in config);
43
+ }
44
+ const snapshotRefreshOptions = {
45
+ overrides: {
46
+ headers: {
47
+ 'Cache-Control': 'no-cache',
48
+ },
49
+ }
50
+ };
51
51
  const keyPrefix = 'ActionPlan';
52
52
 
53
- const { freeze: ObjectFreeze, keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
54
- const { isArray: ArrayIsArray } = Array;
55
- const { stringify: JSONStringify } = JSON;
56
- function deepFreeze$d(value) {
57
- // No need to freeze primitives
58
- if (typeof value !== 'object' || value === null) {
59
- return;
60
- }
61
- if (ArrayIsArray(value)) {
62
- for (let i = 0, len = value.length; i < len; i += 1) {
63
- deepFreeze$d(value[i]);
64
- }
65
- }
66
- else {
67
- const keys = ObjectKeys(value);
68
- for (let i = 0, len = keys.length; i < len; i += 1) {
69
- deepFreeze$d(value[keys[i]]);
70
- }
71
- }
72
- ObjectFreeze(value);
73
- }
74
- function createLink(ref) {
75
- return {
76
- __ref: serializeStructuredKey(ref),
77
- };
53
+ const { freeze: ObjectFreeze, keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
54
+ const { isArray: ArrayIsArray } = Array;
55
+ const { stringify: JSONStringify } = JSON;
56
+ function deepFreeze$d(value) {
57
+ // No need to freeze primitives
58
+ if (typeof value !== 'object' || value === null) {
59
+ return;
60
+ }
61
+ if (ArrayIsArray(value)) {
62
+ for (let i = 0, len = value.length; i < len; i += 1) {
63
+ deepFreeze$d(value[i]);
64
+ }
65
+ }
66
+ else {
67
+ const keys = ObjectKeys(value);
68
+ for (let i = 0, len = keys.length; i < len; i += 1) {
69
+ deepFreeze$d(value[keys[i]]);
70
+ }
71
+ }
72
+ ObjectFreeze(value);
73
+ }
74
+ function createLink(ref) {
75
+ return {
76
+ __ref: serializeStructuredKey(ref),
77
+ };
78
78
  }
79
79
 
80
- function validate$c(obj, path = 'ActionPlanRepresentation') {
81
- const v_error = (() => {
82
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
83
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
84
- }
85
- const obj_id = obj.id;
86
- const path_id = path + '.id';
87
- if (typeof obj_id !== 'string') {
88
- return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
89
- }
90
- if (obj.itemCount !== undefined) {
91
- const obj_itemCount = obj.itemCount;
92
- const path_itemCount = path + '.itemCount';
93
- if (typeof obj_itemCount !== 'number' || (typeof obj_itemCount === 'number' && Math.floor(obj_itemCount) !== obj_itemCount)) {
94
- return new TypeError('Expected "integer" but received "' + typeof obj_itemCount + '" (at "' + path_itemCount + '")');
95
- }
96
- }
97
- const obj_name = obj.name;
98
- const path_name = path + '.name';
99
- if (typeof obj_name !== 'string') {
100
- return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
101
- }
102
- if (obj.statusCode !== undefined) {
103
- const obj_statusCode = obj.statusCode;
104
- const path_statusCode = path + '.statusCode';
105
- if (typeof obj_statusCode !== 'string') {
106
- return new TypeError('Expected "string" but received "' + typeof obj_statusCode + '" (at "' + path_statusCode + '")');
107
- }
108
- }
109
- })();
110
- return v_error === undefined ? null : v_error;
111
- }
112
- function deepFreeze$c(input) {
113
- ObjectFreeze(input);
80
+ function validate$c(obj, path = 'ActionPlanRepresentation') {
81
+ const v_error = (() => {
82
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
83
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
84
+ }
85
+ const obj_id = obj.id;
86
+ const path_id = path + '.id';
87
+ if (typeof obj_id !== 'string') {
88
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
89
+ }
90
+ if (obj.itemCount !== undefined) {
91
+ const obj_itemCount = obj.itemCount;
92
+ const path_itemCount = path + '.itemCount';
93
+ if (typeof obj_itemCount !== 'number' || (typeof obj_itemCount === 'number' && Math.floor(obj_itemCount) !== obj_itemCount)) {
94
+ return new TypeError('Expected "integer" but received "' + typeof obj_itemCount + '" (at "' + path_itemCount + '")');
95
+ }
96
+ }
97
+ const obj_name = obj.name;
98
+ const path_name = path + '.name';
99
+ if (typeof obj_name !== 'string') {
100
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
101
+ }
102
+ if (obj.statusCode !== undefined) {
103
+ const obj_statusCode = obj.statusCode;
104
+ const path_statusCode = path + '.statusCode';
105
+ if (typeof obj_statusCode !== 'string') {
106
+ return new TypeError('Expected "string" but received "' + typeof obj_statusCode + '" (at "' + path_statusCode + '")');
107
+ }
108
+ }
109
+ })();
110
+ return v_error === undefined ? null : v_error;
111
+ }
112
+ function deepFreeze$c(input) {
113
+ ObjectFreeze(input);
114
114
  }
115
115
 
116
- function validate$b(obj, path = 'ActionPlanListRepresentation') {
117
- const v_error = (() => {
118
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
119
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
120
- }
121
- const obj_records = obj.records;
122
- const path_records = path + '.records';
123
- if (!ArrayIsArray(obj_records)) {
124
- return new TypeError('Expected "array" but received "' + typeof obj_records + '" (at "' + path_records + '")');
125
- }
126
- for (let i = 0; i < obj_records.length; i++) {
127
- const obj_records_item = obj_records[i];
128
- const path_records_item = path_records + '[' + i + ']';
129
- const referencepath_records_itemValidationError = validate$c(obj_records_item, path_records_item);
130
- if (referencepath_records_itemValidationError !== null) {
131
- let message = 'Object doesn\'t match ActionPlanRepresentation (at "' + path_records_item + '")\n';
132
- message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
133
- return new TypeError(message);
134
- }
135
- }
136
- })();
137
- return v_error === undefined ? null : v_error;
138
- }
139
- function deepFreeze$b(input) {
140
- const input_records = input.records;
141
- for (let i = 0; i < input_records.length; i++) {
142
- const input_records_item = input_records[i];
143
- deepFreeze$c(input_records_item);
144
- }
145
- ObjectFreeze(input_records);
146
- ObjectFreeze(input);
116
+ function validate$b(obj, path = 'ActionPlanListRepresentation') {
117
+ const v_error = (() => {
118
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
119
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
120
+ }
121
+ const obj_records = obj.records;
122
+ const path_records = path + '.records';
123
+ if (!ArrayIsArray(obj_records)) {
124
+ return new TypeError('Expected "array" but received "' + typeof obj_records + '" (at "' + path_records + '")');
125
+ }
126
+ for (let i = 0; i < obj_records.length; i++) {
127
+ const obj_records_item = obj_records[i];
128
+ const path_records_item = path_records + '[' + i + ']';
129
+ const referencepath_records_itemValidationError = validate$c(obj_records_item, path_records_item);
130
+ if (referencepath_records_itemValidationError !== null) {
131
+ let message = 'Object doesn\'t match ActionPlanRepresentation (at "' + path_records_item + '")\n';
132
+ message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
133
+ return new TypeError(message);
134
+ }
135
+ }
136
+ })();
137
+ return v_error === undefined ? null : v_error;
138
+ }
139
+ function deepFreeze$b(input) {
140
+ const input_records = input.records;
141
+ for (let i = 0; i < input_records.length; i++) {
142
+ const input_records_item = input_records[i];
143
+ deepFreeze$c(input_records_item);
144
+ }
145
+ ObjectFreeze(input_records);
146
+ ObjectFreeze(input);
147
147
  }
148
148
 
149
- const TTL$2 = 1000;
150
- const VERSION$2 = "0ec040ec594b42ffdf6182e2b338e7ff";
151
- function validate$a(obj, path = 'ActionPlansWrapperOutputRepresentation') {
152
- const v_error = (() => {
153
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
154
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
155
- }
156
- const obj_actionPlan = obj.actionPlan;
157
- const path_actionPlan = path + '.actionPlan';
158
- const referencepath_actionPlanValidationError = validate$b(obj_actionPlan, path_actionPlan);
159
- if (referencepath_actionPlanValidationError !== null) {
160
- let message = 'Object doesn\'t match ActionPlanListRepresentation (at "' + path_actionPlan + '")\n';
161
- message += referencepath_actionPlanValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
162
- return new TypeError(message);
163
- }
164
- })();
165
- return v_error === undefined ? null : v_error;
166
- }
167
- const RepresentationType$2 = 'ActionPlansWrapperOutputRepresentation';
168
- function normalize$2(input, existing, path, luvio, store, timestamp) {
169
- return input;
170
- }
171
- const select$5 = function ActionPlansWrapperOutputRepresentationSelect() {
172
- return {
173
- kind: 'Fragment',
174
- version: VERSION$2,
175
- private: [],
176
- opaque: true
177
- };
178
- };
179
- function equals$2(existing, incoming) {
180
- if (JSONStringify(incoming) !== JSONStringify(existing)) {
181
- return false;
182
- }
183
- return true;
184
- }
185
- function deepFreeze$a(input) {
186
- const input_actionPlan = input.actionPlan;
187
- deepFreeze$b(input_actionPlan);
188
- ObjectFreeze(input);
189
- }
190
- const ingest$2 = function ActionPlansWrapperOutputRepresentationIngest(input, path, luvio, store, timestamp) {
191
- if (process.env.NODE_ENV !== 'production') {
192
- const validateError = validate$a(input);
193
- if (validateError !== null) {
194
- throw validateError;
195
- }
196
- }
197
- const key = path.fullPath;
198
- const existingRecord = store.readEntry(key);
199
- const ttlToUse = TTL$2;
200
- let incomingRecord = normalize$2(input, store.readEntry(key), {
201
- fullPath: key,
202
- parent: path.parent,
203
- propertyName: path.propertyName,
204
- ttl: ttlToUse
205
- });
206
- deepFreeze$a(input);
207
- if (existingRecord === undefined || equals$2(existingRecord, incomingRecord) === false) {
208
- luvio.storePublish(key, incomingRecord);
209
- }
210
- {
211
- const storeMetadataParams = {
212
- ttl: ttlToUse,
213
- namespace: "ActionPlan",
214
- version: VERSION$2,
215
- representationName: RepresentationType$2,
216
- };
217
- luvio.publishStoreMetadata(key, storeMetadataParams);
218
- }
219
- return createLink(key);
220
- };
221
- function getTypeCacheKeys$2(luvio, input, fullPathFactory) {
222
- const rootKeySet = new StoreKeyMap();
223
- // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
224
- const rootKey = fullPathFactory();
225
- rootKeySet.set(rootKey, {
226
- namespace: keyPrefix,
227
- representationName: RepresentationType$2,
228
- mergeable: false
229
- });
230
- return rootKeySet;
149
+ const TTL$2 = 1000;
150
+ const VERSION$2 = "0ec040ec594b42ffdf6182e2b338e7ff";
151
+ function validate$a(obj, path = 'ActionPlansWrapperOutputRepresentation') {
152
+ const v_error = (() => {
153
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
154
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
155
+ }
156
+ const obj_actionPlan = obj.actionPlan;
157
+ const path_actionPlan = path + '.actionPlan';
158
+ const referencepath_actionPlanValidationError = validate$b(obj_actionPlan, path_actionPlan);
159
+ if (referencepath_actionPlanValidationError !== null) {
160
+ let message = 'Object doesn\'t match ActionPlanListRepresentation (at "' + path_actionPlan + '")\n';
161
+ message += referencepath_actionPlanValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
162
+ return new TypeError(message);
163
+ }
164
+ })();
165
+ return v_error === undefined ? null : v_error;
166
+ }
167
+ const RepresentationType$2 = 'ActionPlansWrapperOutputRepresentation';
168
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
169
+ return input;
170
+ }
171
+ const select$5 = function ActionPlansWrapperOutputRepresentationSelect() {
172
+ return {
173
+ kind: 'Fragment',
174
+ version: VERSION$2,
175
+ private: [],
176
+ opaque: true
177
+ };
178
+ };
179
+ function equals$2(existing, incoming) {
180
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
181
+ return false;
182
+ }
183
+ return true;
184
+ }
185
+ function deepFreeze$a(input) {
186
+ const input_actionPlan = input.actionPlan;
187
+ deepFreeze$b(input_actionPlan);
188
+ ObjectFreeze(input);
189
+ }
190
+ const ingest$2 = function ActionPlansWrapperOutputRepresentationIngest(input, path, luvio, store, timestamp) {
191
+ if (process.env.NODE_ENV !== 'production') {
192
+ const validateError = validate$a(input);
193
+ if (validateError !== null) {
194
+ throw validateError;
195
+ }
196
+ }
197
+ const key = path.fullPath;
198
+ const existingRecord = store.readEntry(key);
199
+ const ttlToUse = TTL$2;
200
+ let incomingRecord = normalize$2(input, store.readEntry(key), {
201
+ fullPath: key,
202
+ parent: path.parent,
203
+ propertyName: path.propertyName,
204
+ ttl: ttlToUse
205
+ });
206
+ deepFreeze$a(input);
207
+ if (existingRecord === undefined || equals$2(existingRecord, incomingRecord) === false) {
208
+ luvio.storePublish(key, incomingRecord);
209
+ }
210
+ {
211
+ const storeMetadataParams = {
212
+ ttl: ttlToUse,
213
+ namespace: "ActionPlan",
214
+ version: VERSION$2,
215
+ representationName: RepresentationType$2,
216
+ };
217
+ luvio.publishStoreMetadata(key, storeMetadataParams);
218
+ }
219
+ return createLink(key);
220
+ };
221
+ function getTypeCacheKeys$2(luvio, input, fullPathFactory) {
222
+ const rootKeySet = new StoreKeyMap();
223
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
224
+ const rootKey = fullPathFactory();
225
+ rootKeySet.set(rootKey, {
226
+ namespace: keyPrefix,
227
+ representationName: RepresentationType$2,
228
+ mergeable: false
229
+ });
230
+ return rootKeySet;
231
231
  }
232
232
 
233
- function select$4(luvio, params) {
234
- return select$5();
235
- }
236
- function keyBuilder$5(luvio, params) {
237
- return keyPrefix + '::ActionPlansWrapperOutputRepresentation:(' + 'actionPlanType:' + params.queryParams.actionPlanType + ',' + 'limit:' + params.queryParams.limit + ',' + 'order:' + params.queryParams.order + ',' + 'orderingParam:' + params.queryParams.orderingParam + ',' + 'targetId:' + params.queryParams.targetId + ')';
238
- }
239
- function getResponseCacheKeys$2(luvio, resourceParams, response) {
240
- return getTypeCacheKeys$2(luvio, response, () => keyBuilder$5(luvio, resourceParams));
241
- }
242
- function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
243
- const { body } = response;
244
- const key = keyBuilder$5(luvio, resourceParams);
245
- luvio.storeIngest(key, ingest$2, body);
246
- const snapshot = luvio.storeLookup({
247
- recordId: key,
248
- node: select$4(),
249
- variables: {},
250
- }, snapshotRefresh);
251
- if (process.env.NODE_ENV !== 'production') {
252
- if (snapshot.state !== 'Fulfilled') {
253
- throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
254
- }
255
- }
256
- return snapshot;
257
- }
258
- function ingestError$2(luvio, params, error, snapshotRefresh) {
259
- const key = keyBuilder$5(luvio, params);
260
- const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
261
- const storeMetadataParams = {
262
- ttl: TTL$2,
263
- namespace: keyPrefix,
264
- version: VERSION$2,
265
- representationName: RepresentationType$2
266
- };
267
- luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
268
- return errorSnapshot;
269
- }
270
- function createResourceRequest$2(config) {
271
- const headers = {};
272
- return {
273
- baseUri: '/services/data/v58.0',
274
- basePath: '/connect/action-plan',
275
- method: 'get',
276
- body: null,
277
- urlParams: {},
278
- queryParams: config.queryParams,
279
- headers,
280
- priority: 'normal',
281
- };
233
+ function select$4(luvio, params) {
234
+ return select$5();
235
+ }
236
+ function keyBuilder$5(luvio, params) {
237
+ return keyPrefix + '::ActionPlansWrapperOutputRepresentation:(' + 'actionPlanType:' + params.queryParams.actionPlanType + ',' + 'limit:' + params.queryParams.limit + ',' + 'order:' + params.queryParams.order + ',' + 'orderingParam:' + params.queryParams.orderingParam + ',' + 'targetId:' + params.queryParams.targetId + ')';
238
+ }
239
+ function getResponseCacheKeys$2(luvio, resourceParams, response) {
240
+ return getTypeCacheKeys$2(luvio, response, () => keyBuilder$5(luvio, resourceParams));
241
+ }
242
+ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
243
+ const { body } = response;
244
+ const key = keyBuilder$5(luvio, resourceParams);
245
+ luvio.storeIngest(key, ingest$2, body);
246
+ const snapshot = luvio.storeLookup({
247
+ recordId: key,
248
+ node: select$4(),
249
+ variables: {},
250
+ }, snapshotRefresh);
251
+ if (process.env.NODE_ENV !== 'production') {
252
+ if (snapshot.state !== 'Fulfilled') {
253
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
254
+ }
255
+ }
256
+ return snapshot;
257
+ }
258
+ function ingestError$2(luvio, params, error, snapshotRefresh) {
259
+ const key = keyBuilder$5(luvio, params);
260
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
261
+ const storeMetadataParams = {
262
+ ttl: TTL$2,
263
+ namespace: keyPrefix,
264
+ version: VERSION$2,
265
+ representationName: RepresentationType$2
266
+ };
267
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
268
+ return errorSnapshot;
269
+ }
270
+ function createResourceRequest$2(config) {
271
+ const headers = {};
272
+ return {
273
+ baseUri: '/services/data/v58.0',
274
+ basePath: '/connect/action-plan',
275
+ method: 'get',
276
+ body: null,
277
+ urlParams: {},
278
+ queryParams: config.queryParams,
279
+ headers,
280
+ priority: 'normal',
281
+ };
282
282
  }
283
283
 
284
- const getActionPlans_ConfigPropertyNames = {
285
- displayName: 'getActionPlans',
286
- parameters: {
287
- required: [],
288
- optional: ['actionPlanType', 'limit', 'order', 'orderingParam', 'targetId']
289
- }
290
- };
291
- function createResourceParams$2(config) {
292
- const resourceParams = {
293
- queryParams: {
294
- actionPlanType: config.actionPlanType, limit: config.limit, order: config.order, orderingParam: config.orderingParam, targetId: config.targetId
295
- }
296
- };
297
- return resourceParams;
298
- }
299
- function keyBuilder$4(luvio, config) {
300
- const resourceParams = createResourceParams$2(config);
301
- return keyBuilder$5(luvio, resourceParams);
302
- }
303
- function typeCheckConfig$2(untrustedConfig) {
304
- const config = {};
305
- const untrustedConfig_actionPlanType = untrustedConfig.actionPlanType;
306
- if (typeof untrustedConfig_actionPlanType === 'string') {
307
- config.actionPlanType = untrustedConfig_actionPlanType;
308
- }
309
- const untrustedConfig_limit = untrustedConfig.limit;
310
- if (typeof untrustedConfig_limit === 'number' && Math.floor(untrustedConfig_limit) === untrustedConfig_limit) {
311
- config.limit = untrustedConfig_limit;
312
- }
313
- const untrustedConfig_order = untrustedConfig.order;
314
- if (typeof untrustedConfig_order === 'string') {
315
- config.order = untrustedConfig_order;
316
- }
317
- const untrustedConfig_orderingParam = untrustedConfig.orderingParam;
318
- if (typeof untrustedConfig_orderingParam === 'string') {
319
- config.orderingParam = untrustedConfig_orderingParam;
320
- }
321
- const untrustedConfig_targetId = untrustedConfig.targetId;
322
- if (typeof untrustedConfig_targetId === 'string') {
323
- config.targetId = untrustedConfig_targetId;
324
- }
325
- return config;
326
- }
327
- function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
328
- if (!untrustedIsObject(untrustedConfig)) {
329
- return null;
330
- }
331
- if (process.env.NODE_ENV !== 'production') {
332
- validateConfig(untrustedConfig, configPropertyNames);
333
- }
334
- const config = typeCheckConfig$2(untrustedConfig);
335
- if (!areRequiredParametersPresent(config, configPropertyNames)) {
336
- return null;
337
- }
338
- return config;
339
- }
340
- function adapterFragment$2(luvio, config) {
341
- createResourceParams$2(config);
342
- return select$4();
343
- }
344
- function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
345
- const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
346
- config,
347
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
348
- });
349
- return luvio.storeBroadcast().then(() => snapshot);
350
- }
351
- function onFetchResponseError$2(luvio, config, resourceParams, response) {
352
- const snapshot = ingestError$2(luvio, resourceParams, response, {
353
- config,
354
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
355
- });
356
- return luvio.storeBroadcast().then(() => snapshot);
357
- }
358
- function buildNetworkSnapshot$2(luvio, config, options) {
359
- const resourceParams = createResourceParams$2(config);
360
- const request = createResourceRequest$2(resourceParams);
361
- return luvio.dispatchResourceRequest(request, options)
362
- .then((response) => {
363
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => getResponseCacheKeys$2(luvio, resourceParams, response.body));
364
- }, (response) => {
365
- return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
366
- });
367
- }
368
- function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
369
- const { luvio, config } = context;
370
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
371
- const dispatchOptions = {
372
- resourceRequestContext: {
373
- requestCorrelator,
374
- luvioRequestMethod: undefined,
375
- },
376
- eventObservers
377
- };
378
- if (networkPriority !== 'normal') {
379
- dispatchOptions.overrides = {
380
- priority: networkPriority
381
- };
382
- }
383
- return buildNetworkSnapshot$2(luvio, config, dispatchOptions);
384
- }
385
- function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
386
- const { luvio, config } = context;
387
- const selector = {
388
- recordId: keyBuilder$4(luvio, config),
389
- node: adapterFragment$2(luvio, config),
390
- variables: {},
391
- };
392
- const cacheSnapshot = storeLookup(selector, {
393
- config,
394
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
395
- });
396
- return cacheSnapshot;
397
- }
398
- const getActionPlansAdapterFactory = (luvio) => function ActionPlan__getActionPlans(untrustedConfig, requestContext) {
399
- const config = validateAdapterConfig$2(untrustedConfig, getActionPlans_ConfigPropertyNames);
400
- // Invalid or incomplete config
401
- if (config === null) {
402
- return null;
403
- }
404
- return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
405
- buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
284
+ const getActionPlans_ConfigPropertyNames = {
285
+ displayName: 'getActionPlans',
286
+ parameters: {
287
+ required: [],
288
+ optional: ['actionPlanType', 'limit', 'order', 'orderingParam', 'targetId']
289
+ }
290
+ };
291
+ function createResourceParams$2(config) {
292
+ const resourceParams = {
293
+ queryParams: {
294
+ actionPlanType: config.actionPlanType, limit: config.limit, order: config.order, orderingParam: config.orderingParam, targetId: config.targetId
295
+ }
296
+ };
297
+ return resourceParams;
298
+ }
299
+ function keyBuilder$4(luvio, config) {
300
+ const resourceParams = createResourceParams$2(config);
301
+ return keyBuilder$5(luvio, resourceParams);
302
+ }
303
+ function typeCheckConfig$2(untrustedConfig) {
304
+ const config = {};
305
+ const untrustedConfig_actionPlanType = untrustedConfig.actionPlanType;
306
+ if (typeof untrustedConfig_actionPlanType === 'string') {
307
+ config.actionPlanType = untrustedConfig_actionPlanType;
308
+ }
309
+ const untrustedConfig_limit = untrustedConfig.limit;
310
+ if (typeof untrustedConfig_limit === 'number' && Math.floor(untrustedConfig_limit) === untrustedConfig_limit) {
311
+ config.limit = untrustedConfig_limit;
312
+ }
313
+ const untrustedConfig_order = untrustedConfig.order;
314
+ if (typeof untrustedConfig_order === 'string') {
315
+ config.order = untrustedConfig_order;
316
+ }
317
+ const untrustedConfig_orderingParam = untrustedConfig.orderingParam;
318
+ if (typeof untrustedConfig_orderingParam === 'string') {
319
+ config.orderingParam = untrustedConfig_orderingParam;
320
+ }
321
+ const untrustedConfig_targetId = untrustedConfig.targetId;
322
+ if (typeof untrustedConfig_targetId === 'string') {
323
+ config.targetId = untrustedConfig_targetId;
324
+ }
325
+ return config;
326
+ }
327
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
328
+ if (!untrustedIsObject(untrustedConfig)) {
329
+ return null;
330
+ }
331
+ if (process.env.NODE_ENV !== 'production') {
332
+ validateConfig(untrustedConfig, configPropertyNames);
333
+ }
334
+ const config = typeCheckConfig$2(untrustedConfig);
335
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
336
+ return null;
337
+ }
338
+ return config;
339
+ }
340
+ function adapterFragment$2(luvio, config) {
341
+ createResourceParams$2(config);
342
+ return select$4();
343
+ }
344
+ function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
345
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
346
+ config,
347
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
348
+ });
349
+ return luvio.storeBroadcast().then(() => snapshot);
350
+ }
351
+ function onFetchResponseError$2(luvio, config, resourceParams, response) {
352
+ const snapshot = ingestError$2(luvio, resourceParams, response, {
353
+ config,
354
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
355
+ });
356
+ return luvio.storeBroadcast().then(() => snapshot);
357
+ }
358
+ function buildNetworkSnapshot$2(luvio, config, options) {
359
+ const resourceParams = createResourceParams$2(config);
360
+ const request = createResourceRequest$2(resourceParams);
361
+ return luvio.dispatchResourceRequest(request, options)
362
+ .then((response) => {
363
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => getResponseCacheKeys$2(luvio, resourceParams, response.body));
364
+ }, (response) => {
365
+ return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
366
+ });
367
+ }
368
+ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
369
+ const { luvio, config } = context;
370
+ const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
371
+ const dispatchOptions = {
372
+ resourceRequestContext: {
373
+ requestCorrelator,
374
+ luvioRequestMethod: undefined,
375
+ },
376
+ eventObservers
377
+ };
378
+ if (networkPriority !== 'normal') {
379
+ dispatchOptions.overrides = {
380
+ priority: networkPriority
381
+ };
382
+ }
383
+ return buildNetworkSnapshot$2(luvio, config, dispatchOptions);
384
+ }
385
+ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
386
+ const { luvio, config } = context;
387
+ const selector = {
388
+ recordId: keyBuilder$4(luvio, config),
389
+ node: adapterFragment$2(luvio, config),
390
+ variables: {},
391
+ };
392
+ const cacheSnapshot = storeLookup(selector, {
393
+ config,
394
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
395
+ });
396
+ return cacheSnapshot;
397
+ }
398
+ const getActionPlansAdapterFactory = (luvio) => function ActionPlan__getActionPlans(untrustedConfig, requestContext) {
399
+ const config = validateAdapterConfig$2(untrustedConfig, getActionPlans_ConfigPropertyNames);
400
+ // Invalid or incomplete config
401
+ if (config === null) {
402
+ return null;
403
+ }
404
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
405
+ buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
406
406
  };
407
407
 
408
- function validate$9(obj, path = 'ComputedFieldsWrapperRepresentation') {
409
- const v_error = (() => {
410
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
411
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
412
- }
413
- const obj_fields = obj.fields;
414
- const path_fields = path + '.fields';
415
- if (typeof obj_fields !== 'object' || ArrayIsArray(obj_fields) || obj_fields === null) {
416
- return new TypeError('Expected "object" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
417
- }
418
- const obj_fields_keys = ObjectKeys(obj_fields);
419
- for (let i = 0; i < obj_fields_keys.length; i++) {
420
- const key = obj_fields_keys[i];
421
- const obj_fields_prop = obj_fields[key];
422
- const path_fields_prop = path_fields + '["' + key + '"]';
423
- if (obj_fields_prop === undefined) {
424
- return new TypeError('Expected "defined" but received "' + typeof obj_fields_prop + '" (at "' + path_fields_prop + '")');
425
- }
426
- }
427
- })();
428
- return v_error === undefined ? null : v_error;
429
- }
430
- function deepFreeze$9(input) {
431
- const input_fields = input.fields;
432
- const input_fields_keys = Object.keys(input_fields);
433
- const input_fields_length = input_fields_keys.length;
434
- for (let i = 0; i < input_fields_length; i++) {
435
- const key = input_fields_keys[i];
436
- const input_fields_prop = input_fields[key];
437
- deepFreeze$d(input_fields_prop);
438
- }
439
- ObjectFreeze(input_fields);
440
- ObjectFreeze(input);
408
+ function validate$9(obj, path = 'ComputedFieldsWrapperRepresentation') {
409
+ const v_error = (() => {
410
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
411
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
412
+ }
413
+ const obj_fields = obj.fields;
414
+ const path_fields = path + '.fields';
415
+ if (typeof obj_fields !== 'object' || ArrayIsArray(obj_fields) || obj_fields === null) {
416
+ return new TypeError('Expected "object" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
417
+ }
418
+ const obj_fields_keys = ObjectKeys(obj_fields);
419
+ for (let i = 0; i < obj_fields_keys.length; i++) {
420
+ const key = obj_fields_keys[i];
421
+ const obj_fields_prop = obj_fields[key];
422
+ const path_fields_prop = path_fields + '["' + key + '"]';
423
+ if (obj_fields_prop === undefined) {
424
+ return new TypeError('Expected "defined" but received "' + typeof obj_fields_prop + '" (at "' + path_fields_prop + '")');
425
+ }
426
+ }
427
+ })();
428
+ return v_error === undefined ? null : v_error;
429
+ }
430
+ function deepFreeze$9(input) {
431
+ const input_fields = input.fields;
432
+ const input_fields_keys = Object.keys(input_fields);
433
+ const input_fields_length = input_fields_keys.length;
434
+ for (let i = 0; i < input_fields_length; i++) {
435
+ const key = input_fields_keys[i];
436
+ const input_fields_prop = input_fields[key];
437
+ deepFreeze$d(input_fields_prop);
438
+ }
439
+ ObjectFreeze(input_fields);
440
+ ObjectFreeze(input);
441
441
  }
442
442
 
443
- function validate$8(obj, path = 'FieldRepresentation') {
444
- const v_error = (() => {
445
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
446
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
447
- }
448
- const obj_colType = obj.colType;
449
- const path_colType = path + '.colType';
450
- if (typeof obj_colType !== 'string') {
451
- return new TypeError('Expected "string" but received "' + typeof obj_colType + '" (at "' + path_colType + '")');
452
- }
453
- const obj_fieldName = obj.fieldName;
454
- const path_fieldName = path + '.fieldName';
455
- if (typeof obj_fieldName !== 'string') {
456
- return new TypeError('Expected "string" but received "' + typeof obj_fieldName + '" (at "' + path_fieldName + '")');
457
- }
458
- const obj_label = obj.label;
459
- const path_label = path + '.label';
460
- if (typeof obj_label !== 'string') {
461
- return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
462
- }
463
- const obj_value = obj.value;
464
- const path_value = path + '.value';
465
- if (typeof obj_value !== 'string') {
466
- return new TypeError('Expected "string" but received "' + typeof obj_value + '" (at "' + path_value + '")');
467
- }
468
- })();
469
- return v_error === undefined ? null : v_error;
470
- }
471
- function deepFreeze$8(input) {
472
- ObjectFreeze(input);
443
+ function validate$8(obj, path = 'FieldRepresentation') {
444
+ const v_error = (() => {
445
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
446
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
447
+ }
448
+ const obj_colType = obj.colType;
449
+ const path_colType = path + '.colType';
450
+ if (typeof obj_colType !== 'string') {
451
+ return new TypeError('Expected "string" but received "' + typeof obj_colType + '" (at "' + path_colType + '")');
452
+ }
453
+ const obj_fieldName = obj.fieldName;
454
+ const path_fieldName = path + '.fieldName';
455
+ if (typeof obj_fieldName !== 'string') {
456
+ return new TypeError('Expected "string" but received "' + typeof obj_fieldName + '" (at "' + path_fieldName + '")');
457
+ }
458
+ const obj_label = obj.label;
459
+ const path_label = path + '.label';
460
+ if (typeof obj_label !== 'string') {
461
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
462
+ }
463
+ const obj_value = obj.value;
464
+ const path_value = path + '.value';
465
+ if (typeof obj_value !== 'string') {
466
+ return new TypeError('Expected "string" but received "' + typeof obj_value + '" (at "' + path_value + '")');
467
+ }
468
+ })();
469
+ return v_error === undefined ? null : v_error;
470
+ }
471
+ function deepFreeze$8(input) {
472
+ ObjectFreeze(input);
473
473
  }
474
474
 
475
- function validate$7(obj, path = 'TaskProgressRepresentation') {
476
- const v_error = (() => {
477
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
478
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
479
- }
480
- const obj_currentValue = obj.currentValue;
481
- const path_currentValue = path + '.currentValue';
482
- if (typeof obj_currentValue !== 'number' || (typeof obj_currentValue === 'number' && Math.floor(obj_currentValue) !== obj_currentValue)) {
483
- return new TypeError('Expected "integer" but received "' + typeof obj_currentValue + '" (at "' + path_currentValue + '")');
484
- }
485
- const obj_maxValue = obj.maxValue;
486
- const path_maxValue = path + '.maxValue';
487
- if (typeof obj_maxValue !== 'number' || (typeof obj_maxValue === 'number' && Math.floor(obj_maxValue) !== obj_maxValue)) {
488
- return new TypeError('Expected "integer" but received "' + typeof obj_maxValue + '" (at "' + path_maxValue + '")');
489
- }
490
- const obj_minValue = obj.minValue;
491
- const path_minValue = path + '.minValue';
492
- if (typeof obj_minValue !== 'number' || (typeof obj_minValue === 'number' && Math.floor(obj_minValue) !== obj_minValue)) {
493
- return new TypeError('Expected "integer" but received "' + typeof obj_minValue + '" (at "' + path_minValue + '")');
494
- }
495
- })();
496
- return v_error === undefined ? null : v_error;
497
- }
498
- function deepFreeze$7(input) {
499
- ObjectFreeze(input);
475
+ function validate$7(obj, path = 'TaskProgressRepresentation') {
476
+ const v_error = (() => {
477
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
478
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
479
+ }
480
+ const obj_currentValue = obj.currentValue;
481
+ const path_currentValue = path + '.currentValue';
482
+ if (typeof obj_currentValue !== 'number' || (typeof obj_currentValue === 'number' && Math.floor(obj_currentValue) !== obj_currentValue)) {
483
+ return new TypeError('Expected "integer" but received "' + typeof obj_currentValue + '" (at "' + path_currentValue + '")');
484
+ }
485
+ const obj_maxValue = obj.maxValue;
486
+ const path_maxValue = path + '.maxValue';
487
+ if (typeof obj_maxValue !== 'number' || (typeof obj_maxValue === 'number' && Math.floor(obj_maxValue) !== obj_maxValue)) {
488
+ return new TypeError('Expected "integer" but received "' + typeof obj_maxValue + '" (at "' + path_maxValue + '")');
489
+ }
490
+ const obj_minValue = obj.minValue;
491
+ const path_minValue = path + '.minValue';
492
+ if (typeof obj_minValue !== 'number' || (typeof obj_minValue === 'number' && Math.floor(obj_minValue) !== obj_minValue)) {
493
+ return new TypeError('Expected "integer" but received "' + typeof obj_minValue + '" (at "' + path_minValue + '")');
494
+ }
495
+ })();
496
+ return v_error === undefined ? null : v_error;
497
+ }
498
+ function deepFreeze$7(input) {
499
+ ObjectFreeze(input);
500
500
  }
501
501
 
502
- function validate$6(obj, path = 'ActionPlanItemTaskRepresentation') {
503
- const v_error = (() => {
504
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
505
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
506
- }
507
- if (obj.computedFields !== undefined) {
508
- const obj_computedFields = obj.computedFields;
509
- const path_computedFields = path + '.computedFields';
510
- const referencepath_computedFieldsValidationError = validate$9(obj_computedFields, path_computedFields);
511
- if (referencepath_computedFieldsValidationError !== null) {
512
- let message = 'Object doesn\'t match ComputedFieldsWrapperRepresentation (at "' + path_computedFields + '")\n';
513
- message += referencepath_computedFieldsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
514
- return new TypeError(message);
515
- }
516
- }
517
- if (obj.fields !== undefined) {
518
- const obj_fields = obj.fields;
519
- const path_fields = path + '.fields';
520
- if (!ArrayIsArray(obj_fields)) {
521
- return new TypeError('Expected "array" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
522
- }
523
- for (let i = 0; i < obj_fields.length; i++) {
524
- const obj_fields_item = obj_fields[i];
525
- const path_fields_item = path_fields + '[' + i + ']';
526
- const referencepath_fields_itemValidationError = validate$8(obj_fields_item, path_fields_item);
527
- if (referencepath_fields_itemValidationError !== null) {
528
- let message = 'Object doesn\'t match FieldRepresentation (at "' + path_fields_item + '")\n';
529
- message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
530
- return new TypeError(message);
531
- }
532
- }
533
- }
534
- const obj_id = obj.id;
535
- const path_id = path + '.id';
536
- if (typeof obj_id !== 'string') {
537
- return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
538
- }
539
- if (obj.progress !== undefined) {
540
- const obj_progress = obj.progress;
541
- const path_progress = path + '.progress';
542
- const referencepath_progressValidationError = validate$7(obj_progress, path_progress);
543
- if (referencepath_progressValidationError !== null) {
544
- let message = 'Object doesn\'t match TaskProgressRepresentation (at "' + path_progress + '")\n';
545
- message += referencepath_progressValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
546
- return new TypeError(message);
547
- }
548
- }
549
- })();
550
- return v_error === undefined ? null : v_error;
551
- }
552
- function deepFreeze$6(input) {
553
- const input_computedFields = input.computedFields;
554
- if (input_computedFields !== undefined) {
555
- deepFreeze$9(input_computedFields);
556
- }
557
- const input_fields = input.fields;
558
- if (input_fields !== undefined) {
559
- for (let i = 0; i < input_fields.length; i++) {
560
- const input_fields_item = input_fields[i];
561
- deepFreeze$8(input_fields_item);
562
- }
563
- ObjectFreeze(input_fields);
564
- }
565
- const input_progress = input.progress;
566
- if (input_progress !== undefined) {
567
- deepFreeze$7(input_progress);
568
- }
569
- ObjectFreeze(input);
502
+ function validate$6(obj, path = 'ActionPlanItemTaskRepresentation') {
503
+ const v_error = (() => {
504
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
505
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
506
+ }
507
+ if (obj.computedFields !== undefined) {
508
+ const obj_computedFields = obj.computedFields;
509
+ const path_computedFields = path + '.computedFields';
510
+ const referencepath_computedFieldsValidationError = validate$9(obj_computedFields, path_computedFields);
511
+ if (referencepath_computedFieldsValidationError !== null) {
512
+ let message = 'Object doesn\'t match ComputedFieldsWrapperRepresentation (at "' + path_computedFields + '")\n';
513
+ message += referencepath_computedFieldsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
514
+ return new TypeError(message);
515
+ }
516
+ }
517
+ if (obj.fields !== undefined) {
518
+ const obj_fields = obj.fields;
519
+ const path_fields = path + '.fields';
520
+ if (!ArrayIsArray(obj_fields)) {
521
+ return new TypeError('Expected "array" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
522
+ }
523
+ for (let i = 0; i < obj_fields.length; i++) {
524
+ const obj_fields_item = obj_fields[i];
525
+ const path_fields_item = path_fields + '[' + i + ']';
526
+ const referencepath_fields_itemValidationError = validate$8(obj_fields_item, path_fields_item);
527
+ if (referencepath_fields_itemValidationError !== null) {
528
+ let message = 'Object doesn\'t match FieldRepresentation (at "' + path_fields_item + '")\n';
529
+ message += referencepath_fields_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
530
+ return new TypeError(message);
531
+ }
532
+ }
533
+ }
534
+ const obj_id = obj.id;
535
+ const path_id = path + '.id';
536
+ if (typeof obj_id !== 'string') {
537
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
538
+ }
539
+ if (obj.progress !== undefined) {
540
+ const obj_progress = obj.progress;
541
+ const path_progress = path + '.progress';
542
+ const referencepath_progressValidationError = validate$7(obj_progress, path_progress);
543
+ if (referencepath_progressValidationError !== null) {
544
+ let message = 'Object doesn\'t match TaskProgressRepresentation (at "' + path_progress + '")\n';
545
+ message += referencepath_progressValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
546
+ return new TypeError(message);
547
+ }
548
+ }
549
+ })();
550
+ return v_error === undefined ? null : v_error;
551
+ }
552
+ function deepFreeze$6(input) {
553
+ const input_computedFields = input.computedFields;
554
+ if (input_computedFields !== undefined) {
555
+ deepFreeze$9(input_computedFields);
556
+ }
557
+ const input_fields = input.fields;
558
+ if (input_fields !== undefined) {
559
+ for (let i = 0; i < input_fields.length; i++) {
560
+ const input_fields_item = input_fields[i];
561
+ deepFreeze$8(input_fields_item);
562
+ }
563
+ ObjectFreeze(input_fields);
564
+ }
565
+ const input_progress = input.progress;
566
+ if (input_progress !== undefined) {
567
+ deepFreeze$7(input_progress);
568
+ }
569
+ ObjectFreeze(input);
570
570
  }
571
571
 
572
- function validate$5(obj, path = 'ActionPlanItemDetailedRepresentation') {
573
- const v_error = (() => {
574
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
575
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
576
- }
577
- if (obj.actionPlanItemTask !== undefined) {
578
- const obj_actionPlanItemTask = obj.actionPlanItemTask;
579
- const path_actionPlanItemTask = path + '.actionPlanItemTask';
580
- const referencepath_actionPlanItemTaskValidationError = validate$6(obj_actionPlanItemTask, path_actionPlanItemTask);
581
- if (referencepath_actionPlanItemTaskValidationError !== null) {
582
- let message = 'Object doesn\'t match ActionPlanItemTaskRepresentation (at "' + path_actionPlanItemTask + '")\n';
583
- message += referencepath_actionPlanItemTaskValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
584
- return new TypeError(message);
585
- }
586
- }
587
- const obj_id = obj.id;
588
- const path_id = path + '.id';
589
- if (typeof obj_id !== 'string') {
590
- return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
591
- }
592
- const obj_isRequired = obj.isRequired;
593
- const path_isRequired = path + '.isRequired';
594
- if (typeof obj_isRequired !== 'boolean') {
595
- return new TypeError('Expected "boolean" but received "' + typeof obj_isRequired + '" (at "' + path_isRequired + '")');
596
- }
597
- })();
598
- return v_error === undefined ? null : v_error;
599
- }
600
- function deepFreeze$5(input) {
601
- const input_actionPlanItemTask = input.actionPlanItemTask;
602
- if (input_actionPlanItemTask !== undefined) {
603
- deepFreeze$6(input_actionPlanItemTask);
604
- }
605
- ObjectFreeze(input);
572
+ function validate$5(obj, path = 'ActionPlanItemDetailedRepresentation') {
573
+ const v_error = (() => {
574
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
575
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
576
+ }
577
+ if (obj.actionPlanItemTask !== undefined) {
578
+ const obj_actionPlanItemTask = obj.actionPlanItemTask;
579
+ const path_actionPlanItemTask = path + '.actionPlanItemTask';
580
+ const referencepath_actionPlanItemTaskValidationError = validate$6(obj_actionPlanItemTask, path_actionPlanItemTask);
581
+ if (referencepath_actionPlanItemTaskValidationError !== null) {
582
+ let message = 'Object doesn\'t match ActionPlanItemTaskRepresentation (at "' + path_actionPlanItemTask + '")\n';
583
+ message += referencepath_actionPlanItemTaskValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
584
+ return new TypeError(message);
585
+ }
586
+ }
587
+ const obj_id = obj.id;
588
+ const path_id = path + '.id';
589
+ if (typeof obj_id !== 'string') {
590
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
591
+ }
592
+ const obj_isRequired = obj.isRequired;
593
+ const path_isRequired = path + '.isRequired';
594
+ if (typeof obj_isRequired !== 'boolean') {
595
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isRequired + '" (at "' + path_isRequired + '")');
596
+ }
597
+ })();
598
+ return v_error === undefined ? null : v_error;
599
+ }
600
+ function deepFreeze$5(input) {
601
+ const input_actionPlanItemTask = input.actionPlanItemTask;
602
+ if (input_actionPlanItemTask !== undefined) {
603
+ deepFreeze$6(input_actionPlanItemTask);
604
+ }
605
+ ObjectFreeze(input);
606
606
  }
607
607
 
608
- function validate$4(obj, path = 'ActionPlanItemCollectionRepresentation') {
609
- const v_error = (() => {
610
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
611
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
612
- }
613
- const obj_records = obj.records;
614
- const path_records = path + '.records';
615
- if (!ArrayIsArray(obj_records)) {
616
- return new TypeError('Expected "array" but received "' + typeof obj_records + '" (at "' + path_records + '")');
617
- }
618
- for (let i = 0; i < obj_records.length; i++) {
619
- const obj_records_item = obj_records[i];
620
- const path_records_item = path_records + '[' + i + ']';
621
- const referencepath_records_itemValidationError = validate$5(obj_records_item, path_records_item);
622
- if (referencepath_records_itemValidationError !== null) {
623
- let message = 'Object doesn\'t match ActionPlanItemDetailedRepresentation (at "' + path_records_item + '")\n';
624
- message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
625
- return new TypeError(message);
626
- }
627
- }
628
- })();
629
- return v_error === undefined ? null : v_error;
630
- }
631
- function deepFreeze$4(input) {
632
- const input_records = input.records;
633
- for (let i = 0; i < input_records.length; i++) {
634
- const input_records_item = input_records[i];
635
- deepFreeze$5(input_records_item);
636
- }
637
- ObjectFreeze(input_records);
638
- ObjectFreeze(input);
608
+ function validate$4(obj, path = 'ActionPlanItemCollectionRepresentation') {
609
+ const v_error = (() => {
610
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
611
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
612
+ }
613
+ const obj_records = obj.records;
614
+ const path_records = path + '.records';
615
+ if (!ArrayIsArray(obj_records)) {
616
+ return new TypeError('Expected "array" but received "' + typeof obj_records + '" (at "' + path_records + '")');
617
+ }
618
+ for (let i = 0; i < obj_records.length; i++) {
619
+ const obj_records_item = obj_records[i];
620
+ const path_records_item = path_records + '[' + i + ']';
621
+ const referencepath_records_itemValidationError = validate$5(obj_records_item, path_records_item);
622
+ if (referencepath_records_itemValidationError !== null) {
623
+ let message = 'Object doesn\'t match ActionPlanItemDetailedRepresentation (at "' + path_records_item + '")\n';
624
+ message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
625
+ return new TypeError(message);
626
+ }
627
+ }
628
+ })();
629
+ return v_error === undefined ? null : v_error;
630
+ }
631
+ function deepFreeze$4(input) {
632
+ const input_records = input.records;
633
+ for (let i = 0; i < input_records.length; i++) {
634
+ const input_records_item = input_records[i];
635
+ deepFreeze$5(input_records_item);
636
+ }
637
+ ObjectFreeze(input_records);
638
+ ObjectFreeze(input);
639
639
  }
640
640
 
641
- const TTL$1 = 1000;
642
- const VERSION$1 = "01f1998519e78c50e1b67804b6fcb652";
643
- function validate$3(obj, path = 'ActionPlanItemsWrapperRepresentation') {
644
- const v_error = (() => {
645
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
646
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
647
- }
648
- const obj_actionPlanItems = obj.actionPlanItems;
649
- const path_actionPlanItems = path + '.actionPlanItems';
650
- const referencepath_actionPlanItemsValidationError = validate$4(obj_actionPlanItems, path_actionPlanItems);
651
- if (referencepath_actionPlanItemsValidationError !== null) {
652
- let message = 'Object doesn\'t match ActionPlanItemCollectionRepresentation (at "' + path_actionPlanItems + '")\n';
653
- message += referencepath_actionPlanItemsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
654
- return new TypeError(message);
655
- }
656
- })();
657
- return v_error === undefined ? null : v_error;
658
- }
659
- const RepresentationType$1 = 'ActionPlanItemsWrapperRepresentation';
660
- function normalize$1(input, existing, path, luvio, store, timestamp) {
661
- return input;
662
- }
663
- const select$3 = function ActionPlanItemsWrapperRepresentationSelect() {
664
- return {
665
- kind: 'Fragment',
666
- version: VERSION$1,
667
- private: [],
668
- opaque: true
669
- };
670
- };
671
- function equals$1(existing, incoming) {
672
- if (JSONStringify(incoming) !== JSONStringify(existing)) {
673
- return false;
674
- }
675
- return true;
676
- }
677
- function deepFreeze$3(input) {
678
- const input_actionPlanItems = input.actionPlanItems;
679
- deepFreeze$4(input_actionPlanItems);
680
- ObjectFreeze(input);
681
- }
682
- const ingest$1 = function ActionPlanItemsWrapperRepresentationIngest(input, path, luvio, store, timestamp) {
683
- if (process.env.NODE_ENV !== 'production') {
684
- const validateError = validate$3(input);
685
- if (validateError !== null) {
686
- throw validateError;
687
- }
688
- }
689
- const key = path.fullPath;
690
- const existingRecord = store.readEntry(key);
691
- const ttlToUse = TTL$1;
692
- let incomingRecord = normalize$1(input, store.readEntry(key), {
693
- fullPath: key,
694
- parent: path.parent,
695
- propertyName: path.propertyName,
696
- ttl: ttlToUse
697
- });
698
- deepFreeze$3(input);
699
- if (existingRecord === undefined || equals$1(existingRecord, incomingRecord) === false) {
700
- luvio.storePublish(key, incomingRecord);
701
- }
702
- {
703
- const storeMetadataParams = {
704
- ttl: ttlToUse,
705
- namespace: "ActionPlan",
706
- version: VERSION$1,
707
- representationName: RepresentationType$1,
708
- };
709
- luvio.publishStoreMetadata(key, storeMetadataParams);
710
- }
711
- return createLink(key);
712
- };
713
- function getTypeCacheKeys$1(luvio, input, fullPathFactory) {
714
- const rootKeySet = new StoreKeyMap();
715
- // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
716
- const rootKey = fullPathFactory();
717
- rootKeySet.set(rootKey, {
718
- namespace: keyPrefix,
719
- representationName: RepresentationType$1,
720
- mergeable: false
721
- });
722
- return rootKeySet;
641
+ const TTL$1 = 1000;
642
+ const VERSION$1 = "01f1998519e78c50e1b67804b6fcb652";
643
+ function validate$3(obj, path = 'ActionPlanItemsWrapperRepresentation') {
644
+ const v_error = (() => {
645
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
646
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
647
+ }
648
+ const obj_actionPlanItems = obj.actionPlanItems;
649
+ const path_actionPlanItems = path + '.actionPlanItems';
650
+ const referencepath_actionPlanItemsValidationError = validate$4(obj_actionPlanItems, path_actionPlanItems);
651
+ if (referencepath_actionPlanItemsValidationError !== null) {
652
+ let message = 'Object doesn\'t match ActionPlanItemCollectionRepresentation (at "' + path_actionPlanItems + '")\n';
653
+ message += referencepath_actionPlanItemsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
654
+ return new TypeError(message);
655
+ }
656
+ })();
657
+ return v_error === undefined ? null : v_error;
658
+ }
659
+ const RepresentationType$1 = 'ActionPlanItemsWrapperRepresentation';
660
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
661
+ return input;
662
+ }
663
+ const select$3 = function ActionPlanItemsWrapperRepresentationSelect() {
664
+ return {
665
+ kind: 'Fragment',
666
+ version: VERSION$1,
667
+ private: [],
668
+ opaque: true
669
+ };
670
+ };
671
+ function equals$1(existing, incoming) {
672
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
673
+ return false;
674
+ }
675
+ return true;
676
+ }
677
+ function deepFreeze$3(input) {
678
+ const input_actionPlanItems = input.actionPlanItems;
679
+ deepFreeze$4(input_actionPlanItems);
680
+ ObjectFreeze(input);
681
+ }
682
+ const ingest$1 = function ActionPlanItemsWrapperRepresentationIngest(input, path, luvio, store, timestamp) {
683
+ if (process.env.NODE_ENV !== 'production') {
684
+ const validateError = validate$3(input);
685
+ if (validateError !== null) {
686
+ throw validateError;
687
+ }
688
+ }
689
+ const key = path.fullPath;
690
+ const existingRecord = store.readEntry(key);
691
+ const ttlToUse = TTL$1;
692
+ let incomingRecord = normalize$1(input, store.readEntry(key), {
693
+ fullPath: key,
694
+ parent: path.parent,
695
+ propertyName: path.propertyName,
696
+ ttl: ttlToUse
697
+ });
698
+ deepFreeze$3(input);
699
+ if (existingRecord === undefined || equals$1(existingRecord, incomingRecord) === false) {
700
+ luvio.storePublish(key, incomingRecord);
701
+ }
702
+ {
703
+ const storeMetadataParams = {
704
+ ttl: ttlToUse,
705
+ namespace: "ActionPlan",
706
+ version: VERSION$1,
707
+ representationName: RepresentationType$1,
708
+ };
709
+ luvio.publishStoreMetadata(key, storeMetadataParams);
710
+ }
711
+ return createLink(key);
712
+ };
713
+ function getTypeCacheKeys$1(luvio, input, fullPathFactory) {
714
+ const rootKeySet = new StoreKeyMap();
715
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
716
+ const rootKey = fullPathFactory();
717
+ rootKeySet.set(rootKey, {
718
+ namespace: keyPrefix,
719
+ representationName: RepresentationType$1,
720
+ mergeable: false
721
+ });
722
+ return rootKeySet;
723
723
  }
724
724
 
725
- function select$2(luvio, params) {
726
- return select$3();
727
- }
728
- function keyBuilder$3(luvio, params) {
729
- return keyPrefix + '::ActionPlanItemsWrapperRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'actionPlanId:' + params.urlParams.actionPlanId + ')';
730
- }
731
- function getResponseCacheKeys$1(luvio, resourceParams, response) {
732
- return getTypeCacheKeys$1(luvio, response, () => keyBuilder$3(luvio, resourceParams));
733
- }
734
- function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
735
- const { body } = response;
736
- const key = keyBuilder$3(luvio, resourceParams);
737
- luvio.storeIngest(key, ingest$1, body);
738
- const snapshot = luvio.storeLookup({
739
- recordId: key,
740
- node: select$2(),
741
- variables: {},
742
- }, snapshotRefresh);
743
- if (process.env.NODE_ENV !== 'production') {
744
- if (snapshot.state !== 'Fulfilled') {
745
- throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
746
- }
747
- }
748
- return snapshot;
749
- }
750
- function ingestError$1(luvio, params, error, snapshotRefresh) {
751
- const key = keyBuilder$3(luvio, params);
752
- const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
753
- const storeMetadataParams = {
754
- ttl: TTL$1,
755
- namespace: keyPrefix,
756
- version: VERSION$1,
757
- representationName: RepresentationType$1
758
- };
759
- luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
760
- return errorSnapshot;
761
- }
762
- function createResourceRequest$1(config) {
763
- const headers = {};
764
- return {
765
- baseUri: '/services/data/v58.0',
766
- basePath: '/connect/action-plan/' + config.urlParams.actionPlanId + '/action-plan-items',
767
- method: 'get',
768
- body: null,
769
- urlParams: config.urlParams,
770
- queryParams: config.queryParams,
771
- headers,
772
- priority: 'normal',
773
- };
725
+ function select$2(luvio, params) {
726
+ return select$3();
727
+ }
728
+ function keyBuilder$3(luvio, params) {
729
+ return keyPrefix + '::ActionPlanItemsWrapperRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'actionPlanId:' + params.urlParams.actionPlanId + ')';
730
+ }
731
+ function getResponseCacheKeys$1(luvio, resourceParams, response) {
732
+ return getTypeCacheKeys$1(luvio, response, () => keyBuilder$3(luvio, resourceParams));
733
+ }
734
+ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
735
+ const { body } = response;
736
+ const key = keyBuilder$3(luvio, resourceParams);
737
+ luvio.storeIngest(key, ingest$1, body);
738
+ const snapshot = luvio.storeLookup({
739
+ recordId: key,
740
+ node: select$2(),
741
+ variables: {},
742
+ }, snapshotRefresh);
743
+ if (process.env.NODE_ENV !== 'production') {
744
+ if (snapshot.state !== 'Fulfilled') {
745
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
746
+ }
747
+ }
748
+ return snapshot;
749
+ }
750
+ function ingestError$1(luvio, params, error, snapshotRefresh) {
751
+ const key = keyBuilder$3(luvio, params);
752
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
753
+ const storeMetadataParams = {
754
+ ttl: TTL$1,
755
+ namespace: keyPrefix,
756
+ version: VERSION$1,
757
+ representationName: RepresentationType$1
758
+ };
759
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
760
+ return errorSnapshot;
761
+ }
762
+ function createResourceRequest$1(config) {
763
+ const headers = {};
764
+ return {
765
+ baseUri: '/services/data/v58.0',
766
+ basePath: '/connect/action-plan/' + config.urlParams.actionPlanId + '/action-plan-items',
767
+ method: 'get',
768
+ body: null,
769
+ urlParams: config.urlParams,
770
+ queryParams: config.queryParams,
771
+ headers,
772
+ priority: 'normal',
773
+ };
774
774
  }
775
775
 
776
- const getActionPlanItems_ConfigPropertyNames = {
777
- displayName: 'getActionPlanItems',
778
- parameters: {
779
- required: ['actionPlanId'],
780
- optional: ['limit']
781
- }
782
- };
783
- function createResourceParams$1(config) {
784
- const resourceParams = {
785
- urlParams: {
786
- actionPlanId: config.actionPlanId
787
- },
788
- queryParams: {
789
- limit: config.limit
790
- }
791
- };
792
- return resourceParams;
793
- }
794
- function keyBuilder$2(luvio, config) {
795
- const resourceParams = createResourceParams$1(config);
796
- return keyBuilder$3(luvio, resourceParams);
797
- }
798
- function typeCheckConfig$1(untrustedConfig) {
799
- const config = {};
800
- const untrustedConfig_actionPlanId = untrustedConfig.actionPlanId;
801
- if (typeof untrustedConfig_actionPlanId === 'string') {
802
- config.actionPlanId = untrustedConfig_actionPlanId;
803
- }
804
- const untrustedConfig_limit = untrustedConfig.limit;
805
- if (typeof untrustedConfig_limit === 'number' && Math.floor(untrustedConfig_limit) === untrustedConfig_limit) {
806
- config.limit = untrustedConfig_limit;
807
- }
808
- return config;
809
- }
810
- function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
811
- if (!untrustedIsObject(untrustedConfig)) {
812
- return null;
813
- }
814
- if (process.env.NODE_ENV !== 'production') {
815
- validateConfig(untrustedConfig, configPropertyNames);
816
- }
817
- const config = typeCheckConfig$1(untrustedConfig);
818
- if (!areRequiredParametersPresent(config, configPropertyNames)) {
819
- return null;
820
- }
821
- return config;
822
- }
823
- function adapterFragment$1(luvio, config) {
824
- createResourceParams$1(config);
825
- return select$2();
826
- }
827
- function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
828
- const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
829
- config,
830
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
831
- });
832
- return luvio.storeBroadcast().then(() => snapshot);
833
- }
834
- function onFetchResponseError$1(luvio, config, resourceParams, response) {
835
- const snapshot = ingestError$1(luvio, resourceParams, response, {
836
- config,
837
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
838
- });
839
- return luvio.storeBroadcast().then(() => snapshot);
840
- }
841
- function buildNetworkSnapshot$1(luvio, config, options) {
842
- const resourceParams = createResourceParams$1(config);
843
- const request = createResourceRequest$1(resourceParams);
844
- return luvio.dispatchResourceRequest(request, options)
845
- .then((response) => {
846
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => getResponseCacheKeys$1(luvio, resourceParams, response.body));
847
- }, (response) => {
848
- return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
849
- });
850
- }
851
- function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
852
- const { luvio, config } = context;
853
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
854
- const dispatchOptions = {
855
- resourceRequestContext: {
856
- requestCorrelator,
857
- luvioRequestMethod: undefined,
858
- },
859
- eventObservers
860
- };
861
- if (networkPriority !== 'normal') {
862
- dispatchOptions.overrides = {
863
- priority: networkPriority
864
- };
865
- }
866
- return buildNetworkSnapshot$1(luvio, config, dispatchOptions);
867
- }
868
- function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
869
- const { luvio, config } = context;
870
- const selector = {
871
- recordId: keyBuilder$2(luvio, config),
872
- node: adapterFragment$1(luvio, config),
873
- variables: {},
874
- };
875
- const cacheSnapshot = storeLookup(selector, {
876
- config,
877
- resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
878
- });
879
- return cacheSnapshot;
880
- }
881
- const getActionPlanItemsAdapterFactory = (luvio) => function ActionPlan__getActionPlanItems(untrustedConfig, requestContext) {
882
- const config = validateAdapterConfig$1(untrustedConfig, getActionPlanItems_ConfigPropertyNames);
883
- // Invalid or incomplete config
884
- if (config === null) {
885
- return null;
886
- }
887
- return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
888
- buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
776
+ const getActionPlanItems_ConfigPropertyNames = {
777
+ displayName: 'getActionPlanItems',
778
+ parameters: {
779
+ required: ['actionPlanId'],
780
+ optional: ['limit']
781
+ }
782
+ };
783
+ function createResourceParams$1(config) {
784
+ const resourceParams = {
785
+ urlParams: {
786
+ actionPlanId: config.actionPlanId
787
+ },
788
+ queryParams: {
789
+ limit: config.limit
790
+ }
791
+ };
792
+ return resourceParams;
793
+ }
794
+ function keyBuilder$2(luvio, config) {
795
+ const resourceParams = createResourceParams$1(config);
796
+ return keyBuilder$3(luvio, resourceParams);
797
+ }
798
+ function typeCheckConfig$1(untrustedConfig) {
799
+ const config = {};
800
+ const untrustedConfig_actionPlanId = untrustedConfig.actionPlanId;
801
+ if (typeof untrustedConfig_actionPlanId === 'string') {
802
+ config.actionPlanId = untrustedConfig_actionPlanId;
803
+ }
804
+ const untrustedConfig_limit = untrustedConfig.limit;
805
+ if (typeof untrustedConfig_limit === 'number' && Math.floor(untrustedConfig_limit) === untrustedConfig_limit) {
806
+ config.limit = untrustedConfig_limit;
807
+ }
808
+ return config;
809
+ }
810
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
811
+ if (!untrustedIsObject(untrustedConfig)) {
812
+ return null;
813
+ }
814
+ if (process.env.NODE_ENV !== 'production') {
815
+ validateConfig(untrustedConfig, configPropertyNames);
816
+ }
817
+ const config = typeCheckConfig$1(untrustedConfig);
818
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
819
+ return null;
820
+ }
821
+ return config;
822
+ }
823
+ function adapterFragment$1(luvio, config) {
824
+ createResourceParams$1(config);
825
+ return select$2();
826
+ }
827
+ function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
828
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
829
+ config,
830
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
831
+ });
832
+ return luvio.storeBroadcast().then(() => snapshot);
833
+ }
834
+ function onFetchResponseError$1(luvio, config, resourceParams, response) {
835
+ const snapshot = ingestError$1(luvio, resourceParams, response, {
836
+ config,
837
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
838
+ });
839
+ return luvio.storeBroadcast().then(() => snapshot);
840
+ }
841
+ function buildNetworkSnapshot$1(luvio, config, options) {
842
+ const resourceParams = createResourceParams$1(config);
843
+ const request = createResourceRequest$1(resourceParams);
844
+ return luvio.dispatchResourceRequest(request, options)
845
+ .then((response) => {
846
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => getResponseCacheKeys$1(luvio, resourceParams, response.body));
847
+ }, (response) => {
848
+ return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
849
+ });
850
+ }
851
+ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
852
+ const { luvio, config } = context;
853
+ const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
854
+ const dispatchOptions = {
855
+ resourceRequestContext: {
856
+ requestCorrelator,
857
+ luvioRequestMethod: undefined,
858
+ },
859
+ eventObservers
860
+ };
861
+ if (networkPriority !== 'normal') {
862
+ dispatchOptions.overrides = {
863
+ priority: networkPriority
864
+ };
865
+ }
866
+ return buildNetworkSnapshot$1(luvio, config, dispatchOptions);
867
+ }
868
+ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
869
+ const { luvio, config } = context;
870
+ const selector = {
871
+ recordId: keyBuilder$2(luvio, config),
872
+ node: adapterFragment$1(luvio, config),
873
+ variables: {},
874
+ };
875
+ const cacheSnapshot = storeLookup(selector, {
876
+ config,
877
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
878
+ });
879
+ return cacheSnapshot;
880
+ }
881
+ const getActionPlanItemsAdapterFactory = (luvio) => function ActionPlan__getActionPlanItems(untrustedConfig, requestContext) {
882
+ const config = validateAdapterConfig$1(untrustedConfig, getActionPlanItems_ConfigPropertyNames);
883
+ // Invalid or incomplete config
884
+ if (config === null) {
885
+ return null;
886
+ }
887
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
888
+ buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
889
889
  };
890
890
 
891
- function validate$2(obj, path = 'ActionPlanItemRepresentation') {
892
- const v_error = (() => {
893
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
894
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
895
- }
896
- const obj_id = obj.id;
897
- const path_id = path + '.id';
898
- if (typeof obj_id !== 'string') {
899
- return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
900
- }
901
- })();
902
- return v_error === undefined ? null : v_error;
903
- }
904
- function deepFreeze$2(input) {
905
- ObjectFreeze(input);
891
+ function validate$2(obj, path = 'ActionPlanItemRepresentation') {
892
+ const v_error = (() => {
893
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
894
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
895
+ }
896
+ const obj_id = obj.id;
897
+ const path_id = path + '.id';
898
+ if (typeof obj_id !== 'string') {
899
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
900
+ }
901
+ })();
902
+ return v_error === undefined ? null : v_error;
903
+ }
904
+ function deepFreeze$2(input) {
905
+ ObjectFreeze(input);
906
906
  }
907
907
 
908
- function validate$1(obj, path = 'ActionPlanItemListRepresentation') {
909
- const v_error = (() => {
910
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
911
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
912
- }
913
- const obj_records = obj.records;
914
- const path_records = path + '.records';
915
- if (!ArrayIsArray(obj_records)) {
916
- return new TypeError('Expected "array" but received "' + typeof obj_records + '" (at "' + path_records + '")');
917
- }
918
- for (let i = 0; i < obj_records.length; i++) {
919
- const obj_records_item = obj_records[i];
920
- const path_records_item = path_records + '[' + i + ']';
921
- const referencepath_records_itemValidationError = validate$2(obj_records_item, path_records_item);
922
- if (referencepath_records_itemValidationError !== null) {
923
- let message = 'Object doesn\'t match ActionPlanItemRepresentation (at "' + path_records_item + '")\n';
924
- message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
925
- return new TypeError(message);
926
- }
927
- }
928
- })();
929
- return v_error === undefined ? null : v_error;
930
- }
931
- function deepFreeze$1(input) {
932
- const input_records = input.records;
933
- for (let i = 0; i < input_records.length; i++) {
934
- const input_records_item = input_records[i];
935
- deepFreeze$2(input_records_item);
936
- }
937
- ObjectFreeze(input_records);
938
- ObjectFreeze(input);
908
+ function validate$1(obj, path = 'ActionPlanItemListRepresentation') {
909
+ const v_error = (() => {
910
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
911
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
912
+ }
913
+ const obj_records = obj.records;
914
+ const path_records = path + '.records';
915
+ if (!ArrayIsArray(obj_records)) {
916
+ return new TypeError('Expected "array" but received "' + typeof obj_records + '" (at "' + path_records + '")');
917
+ }
918
+ for (let i = 0; i < obj_records.length; i++) {
919
+ const obj_records_item = obj_records[i];
920
+ const path_records_item = path_records + '[' + i + ']';
921
+ const referencepath_records_itemValidationError = validate$2(obj_records_item, path_records_item);
922
+ if (referencepath_records_itemValidationError !== null) {
923
+ let message = 'Object doesn\'t match ActionPlanItemRepresentation (at "' + path_records_item + '")\n';
924
+ message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
925
+ return new TypeError(message);
926
+ }
927
+ }
928
+ })();
929
+ return v_error === undefined ? null : v_error;
930
+ }
931
+ function deepFreeze$1(input) {
932
+ const input_records = input.records;
933
+ for (let i = 0; i < input_records.length; i++) {
934
+ const input_records_item = input_records[i];
935
+ deepFreeze$2(input_records_item);
936
+ }
937
+ ObjectFreeze(input_records);
938
+ ObjectFreeze(input);
939
939
  }
940
940
 
941
- const TTL = 1000;
942
- const VERSION = "8d866f38a882381bbdafb2496aa6f6b8";
943
- function validate(obj, path = 'ActionPlanStatusInfoOutputRepresentation') {
944
- const v_error = (() => {
945
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
946
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
947
- }
948
- const obj_mandatoryItemsCompleted = obj.mandatoryItemsCompleted;
949
- const path_mandatoryItemsCompleted = path + '.mandatoryItemsCompleted';
950
- if (typeof obj_mandatoryItemsCompleted !== 'boolean') {
951
- return new TypeError('Expected "boolean" but received "' + typeof obj_mandatoryItemsCompleted + '" (at "' + path_mandatoryItemsCompleted + '")');
952
- }
953
- if (obj.mandatoryItemsPending !== undefined) {
954
- const obj_mandatoryItemsPending = obj.mandatoryItemsPending;
955
- const path_mandatoryItemsPending = path + '.mandatoryItemsPending';
956
- const referencepath_mandatoryItemsPendingValidationError = validate$1(obj_mandatoryItemsPending, path_mandatoryItemsPending);
957
- if (referencepath_mandatoryItemsPendingValidationError !== null) {
958
- let message = 'Object doesn\'t match ActionPlanItemListRepresentation (at "' + path_mandatoryItemsPending + '")\n';
959
- message += referencepath_mandatoryItemsPendingValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
960
- return new TypeError(message);
961
- }
962
- }
963
- const obj_optionalItemsCompleted = obj.optionalItemsCompleted;
964
- const path_optionalItemsCompleted = path + '.optionalItemsCompleted';
965
- if (typeof obj_optionalItemsCompleted !== 'boolean') {
966
- return new TypeError('Expected "boolean" but received "' + typeof obj_optionalItemsCompleted + '" (at "' + path_optionalItemsCompleted + '")');
967
- }
968
- if (obj.statusCode !== undefined) {
969
- const obj_statusCode = obj.statusCode;
970
- const path_statusCode = path + '.statusCode';
971
- if (typeof obj_statusCode !== 'string') {
972
- return new TypeError('Expected "string" but received "' + typeof obj_statusCode + '" (at "' + path_statusCode + '")');
973
- }
974
- }
975
- })();
976
- return v_error === undefined ? null : v_error;
977
- }
978
- const RepresentationType = 'ActionPlanStatusInfoOutputRepresentation';
979
- function normalize(input, existing, path, luvio, store, timestamp) {
980
- return input;
981
- }
982
- const select$1 = function ActionPlanStatusInfoOutputRepresentationSelect() {
983
- return {
984
- kind: 'Fragment',
985
- version: VERSION,
986
- private: [],
987
- opaque: true
988
- };
989
- };
990
- function equals(existing, incoming) {
991
- if (JSONStringify(incoming) !== JSONStringify(existing)) {
992
- return false;
993
- }
994
- return true;
995
- }
996
- function deepFreeze(input) {
997
- const input_mandatoryItemsPending = input.mandatoryItemsPending;
998
- if (input_mandatoryItemsPending !== undefined) {
999
- deepFreeze$1(input_mandatoryItemsPending);
1000
- }
1001
- ObjectFreeze(input);
1002
- }
1003
- const ingest = function ActionPlanStatusInfoOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1004
- if (process.env.NODE_ENV !== 'production') {
1005
- const validateError = validate(input);
1006
- if (validateError !== null) {
1007
- throw validateError;
1008
- }
1009
- }
1010
- const key = path.fullPath;
1011
- const existingRecord = store.readEntry(key);
1012
- const ttlToUse = TTL;
1013
- let incomingRecord = normalize(input, store.readEntry(key), {
1014
- fullPath: key,
1015
- parent: path.parent,
1016
- propertyName: path.propertyName,
1017
- ttl: ttlToUse
1018
- });
1019
- deepFreeze(input);
1020
- if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
1021
- luvio.storePublish(key, incomingRecord);
1022
- }
1023
- {
1024
- const storeMetadataParams = {
1025
- ttl: ttlToUse,
1026
- namespace: "ActionPlan",
1027
- version: VERSION,
1028
- representationName: RepresentationType,
1029
- };
1030
- luvio.publishStoreMetadata(key, storeMetadataParams);
1031
- }
1032
- return createLink(key);
1033
- };
1034
- function getTypeCacheKeys(luvio, input, fullPathFactory) {
1035
- const rootKeySet = new StoreKeyMap();
1036
- // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1037
- const rootKey = fullPathFactory();
1038
- rootKeySet.set(rootKey, {
1039
- namespace: keyPrefix,
1040
- representationName: RepresentationType,
1041
- mergeable: false
1042
- });
1043
- return rootKeySet;
941
+ const TTL = 1000;
942
+ const VERSION = "8d866f38a882381bbdafb2496aa6f6b8";
943
+ function validate(obj, path = 'ActionPlanStatusInfoOutputRepresentation') {
944
+ const v_error = (() => {
945
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
946
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
947
+ }
948
+ const obj_mandatoryItemsCompleted = obj.mandatoryItemsCompleted;
949
+ const path_mandatoryItemsCompleted = path + '.mandatoryItemsCompleted';
950
+ if (typeof obj_mandatoryItemsCompleted !== 'boolean') {
951
+ return new TypeError('Expected "boolean" but received "' + typeof obj_mandatoryItemsCompleted + '" (at "' + path_mandatoryItemsCompleted + '")');
952
+ }
953
+ if (obj.mandatoryItemsPending !== undefined) {
954
+ const obj_mandatoryItemsPending = obj.mandatoryItemsPending;
955
+ const path_mandatoryItemsPending = path + '.mandatoryItemsPending';
956
+ const referencepath_mandatoryItemsPendingValidationError = validate$1(obj_mandatoryItemsPending, path_mandatoryItemsPending);
957
+ if (referencepath_mandatoryItemsPendingValidationError !== null) {
958
+ let message = 'Object doesn\'t match ActionPlanItemListRepresentation (at "' + path_mandatoryItemsPending + '")\n';
959
+ message += referencepath_mandatoryItemsPendingValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
960
+ return new TypeError(message);
961
+ }
962
+ }
963
+ const obj_optionalItemsCompleted = obj.optionalItemsCompleted;
964
+ const path_optionalItemsCompleted = path + '.optionalItemsCompleted';
965
+ if (typeof obj_optionalItemsCompleted !== 'boolean') {
966
+ return new TypeError('Expected "boolean" but received "' + typeof obj_optionalItemsCompleted + '" (at "' + path_optionalItemsCompleted + '")');
967
+ }
968
+ if (obj.statusCode !== undefined) {
969
+ const obj_statusCode = obj.statusCode;
970
+ const path_statusCode = path + '.statusCode';
971
+ if (typeof obj_statusCode !== 'string') {
972
+ return new TypeError('Expected "string" but received "' + typeof obj_statusCode + '" (at "' + path_statusCode + '")');
973
+ }
974
+ }
975
+ })();
976
+ return v_error === undefined ? null : v_error;
977
+ }
978
+ const RepresentationType = 'ActionPlanStatusInfoOutputRepresentation';
979
+ function normalize(input, existing, path, luvio, store, timestamp) {
980
+ return input;
981
+ }
982
+ const select$1 = function ActionPlanStatusInfoOutputRepresentationSelect() {
983
+ return {
984
+ kind: 'Fragment',
985
+ version: VERSION,
986
+ private: [],
987
+ opaque: true
988
+ };
989
+ };
990
+ function equals(existing, incoming) {
991
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
992
+ return false;
993
+ }
994
+ return true;
995
+ }
996
+ function deepFreeze(input) {
997
+ const input_mandatoryItemsPending = input.mandatoryItemsPending;
998
+ if (input_mandatoryItemsPending !== undefined) {
999
+ deepFreeze$1(input_mandatoryItemsPending);
1000
+ }
1001
+ ObjectFreeze(input);
1002
+ }
1003
+ const ingest = function ActionPlanStatusInfoOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1004
+ if (process.env.NODE_ENV !== 'production') {
1005
+ const validateError = validate(input);
1006
+ if (validateError !== null) {
1007
+ throw validateError;
1008
+ }
1009
+ }
1010
+ const key = path.fullPath;
1011
+ const existingRecord = store.readEntry(key);
1012
+ const ttlToUse = TTL;
1013
+ let incomingRecord = normalize(input, store.readEntry(key), {
1014
+ fullPath: key,
1015
+ parent: path.parent,
1016
+ propertyName: path.propertyName,
1017
+ ttl: ttlToUse
1018
+ });
1019
+ deepFreeze(input);
1020
+ if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
1021
+ luvio.storePublish(key, incomingRecord);
1022
+ }
1023
+ {
1024
+ const storeMetadataParams = {
1025
+ ttl: ttlToUse,
1026
+ namespace: "ActionPlan",
1027
+ version: VERSION,
1028
+ representationName: RepresentationType,
1029
+ };
1030
+ luvio.publishStoreMetadata(key, storeMetadataParams);
1031
+ }
1032
+ return createLink(key);
1033
+ };
1034
+ function getTypeCacheKeys(luvio, input, fullPathFactory) {
1035
+ const rootKeySet = new StoreKeyMap();
1036
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1037
+ const rootKey = fullPathFactory();
1038
+ rootKeySet.set(rootKey, {
1039
+ namespace: keyPrefix,
1040
+ representationName: RepresentationType,
1041
+ mergeable: false
1042
+ });
1043
+ return rootKeySet;
1044
1044
  }
1045
1045
 
1046
- function select(luvio, params) {
1047
- return select$1();
1048
- }
1049
- function keyBuilder$1(luvio, params) {
1050
- return keyPrefix + '::ActionPlanStatusInfoOutputRepresentation:(' + 'actionPlanId:' + params.urlParams.actionPlanId + ')';
1051
- }
1052
- function getResponseCacheKeys(luvio, resourceParams, response) {
1053
- return getTypeCacheKeys(luvio, response, () => keyBuilder$1(luvio, resourceParams));
1054
- }
1055
- function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
1056
- const { body } = response;
1057
- const key = keyBuilder$1(luvio, resourceParams);
1058
- luvio.storeIngest(key, ingest, body);
1059
- const snapshot = luvio.storeLookup({
1060
- recordId: key,
1061
- node: select(),
1062
- variables: {},
1063
- }, snapshotRefresh);
1064
- if (process.env.NODE_ENV !== 'production') {
1065
- if (snapshot.state !== 'Fulfilled') {
1066
- throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1067
- }
1068
- }
1069
- return snapshot;
1070
- }
1071
- function ingestError(luvio, params, error, snapshotRefresh) {
1072
- const key = keyBuilder$1(luvio, params);
1073
- const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1074
- const storeMetadataParams = {
1075
- ttl: TTL,
1076
- namespace: keyPrefix,
1077
- version: VERSION,
1078
- representationName: RepresentationType
1079
- };
1080
- luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1081
- return errorSnapshot;
1082
- }
1083
- function createResourceRequest(config) {
1084
- const headers = {};
1085
- return {
1086
- baseUri: '/services/data/v58.0',
1087
- basePath: '/connect/action-plan/' + config.urlParams.actionPlanId + '/status-info',
1088
- method: 'get',
1089
- body: null,
1090
- urlParams: config.urlParams,
1091
- queryParams: {},
1092
- headers,
1093
- priority: 'normal',
1094
- };
1046
+ function select(luvio, params) {
1047
+ return select$1();
1048
+ }
1049
+ function keyBuilder$1(luvio, params) {
1050
+ return keyPrefix + '::ActionPlanStatusInfoOutputRepresentation:(' + 'actionPlanId:' + params.urlParams.actionPlanId + ')';
1051
+ }
1052
+ function getResponseCacheKeys(luvio, resourceParams, response) {
1053
+ return getTypeCacheKeys(luvio, response, () => keyBuilder$1(luvio, resourceParams));
1054
+ }
1055
+ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
1056
+ const { body } = response;
1057
+ const key = keyBuilder$1(luvio, resourceParams);
1058
+ luvio.storeIngest(key, ingest, body);
1059
+ const snapshot = luvio.storeLookup({
1060
+ recordId: key,
1061
+ node: select(),
1062
+ variables: {},
1063
+ }, snapshotRefresh);
1064
+ if (process.env.NODE_ENV !== 'production') {
1065
+ if (snapshot.state !== 'Fulfilled') {
1066
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1067
+ }
1068
+ }
1069
+ return snapshot;
1070
+ }
1071
+ function ingestError(luvio, params, error, snapshotRefresh) {
1072
+ const key = keyBuilder$1(luvio, params);
1073
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1074
+ const storeMetadataParams = {
1075
+ ttl: TTL,
1076
+ namespace: keyPrefix,
1077
+ version: VERSION,
1078
+ representationName: RepresentationType
1079
+ };
1080
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1081
+ return errorSnapshot;
1082
+ }
1083
+ function createResourceRequest(config) {
1084
+ const headers = {};
1085
+ return {
1086
+ baseUri: '/services/data/v58.0',
1087
+ basePath: '/connect/action-plan/' + config.urlParams.actionPlanId + '/status-info',
1088
+ method: 'get',
1089
+ body: null,
1090
+ urlParams: config.urlParams,
1091
+ queryParams: {},
1092
+ headers,
1093
+ priority: 'normal',
1094
+ };
1095
1095
  }
1096
1096
 
1097
- const getActionPlanStatusInfo_ConfigPropertyNames = {
1098
- displayName: 'getActionPlanStatusInfo',
1099
- parameters: {
1100
- required: ['actionPlanId'],
1101
- optional: []
1102
- }
1103
- };
1104
- function createResourceParams(config) {
1105
- const resourceParams = {
1106
- urlParams: {
1107
- actionPlanId: config.actionPlanId
1108
- }
1109
- };
1110
- return resourceParams;
1111
- }
1112
- function keyBuilder(luvio, config) {
1113
- const resourceParams = createResourceParams(config);
1114
- return keyBuilder$1(luvio, resourceParams);
1115
- }
1116
- function typeCheckConfig(untrustedConfig) {
1117
- const config = {};
1118
- const untrustedConfig_actionPlanId = untrustedConfig.actionPlanId;
1119
- if (typeof untrustedConfig_actionPlanId === 'string') {
1120
- config.actionPlanId = untrustedConfig_actionPlanId;
1121
- }
1122
- return config;
1123
- }
1124
- function validateAdapterConfig(untrustedConfig, configPropertyNames) {
1125
- if (!untrustedIsObject(untrustedConfig)) {
1126
- return null;
1127
- }
1128
- if (process.env.NODE_ENV !== 'production') {
1129
- validateConfig(untrustedConfig, configPropertyNames);
1130
- }
1131
- const config = typeCheckConfig(untrustedConfig);
1132
- if (!areRequiredParametersPresent(config, configPropertyNames)) {
1133
- return null;
1134
- }
1135
- return config;
1136
- }
1137
- function adapterFragment(luvio, config) {
1138
- createResourceParams(config);
1139
- return select();
1140
- }
1141
- function onFetchResponseSuccess(luvio, config, resourceParams, response) {
1142
- const snapshot = ingestSuccess(luvio, resourceParams, response, {
1143
- config,
1144
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1145
- });
1146
- return luvio.storeBroadcast().then(() => snapshot);
1147
- }
1148
- function onFetchResponseError(luvio, config, resourceParams, response) {
1149
- const snapshot = ingestError(luvio, resourceParams, response, {
1150
- config,
1151
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1152
- });
1153
- return luvio.storeBroadcast().then(() => snapshot);
1154
- }
1155
- function buildNetworkSnapshot(luvio, config, options) {
1156
- const resourceParams = createResourceParams(config);
1157
- const request = createResourceRequest(resourceParams);
1158
- return luvio.dispatchResourceRequest(request, options)
1159
- .then((response) => {
1160
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => getResponseCacheKeys(luvio, resourceParams, response.body));
1161
- }, (response) => {
1162
- return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
1163
- });
1164
- }
1165
- function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
1166
- const { luvio, config } = context;
1167
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
1168
- const dispatchOptions = {
1169
- resourceRequestContext: {
1170
- requestCorrelator,
1171
- luvioRequestMethod: undefined,
1172
- },
1173
- eventObservers
1174
- };
1175
- if (networkPriority !== 'normal') {
1176
- dispatchOptions.overrides = {
1177
- priority: networkPriority
1178
- };
1179
- }
1180
- return buildNetworkSnapshot(luvio, config, dispatchOptions);
1181
- }
1182
- function buildCachedSnapshotCachePolicy(context, storeLookup) {
1183
- const { luvio, config } = context;
1184
- const selector = {
1185
- recordId: keyBuilder(luvio, config),
1186
- node: adapterFragment(luvio, config),
1187
- variables: {},
1188
- };
1189
- const cacheSnapshot = storeLookup(selector, {
1190
- config,
1191
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1192
- });
1193
- return cacheSnapshot;
1194
- }
1195
- const getActionPlanStatusInfoAdapterFactory = (luvio) => function ActionPlan__getActionPlanStatusInfo(untrustedConfig, requestContext) {
1196
- const config = validateAdapterConfig(untrustedConfig, getActionPlanStatusInfo_ConfigPropertyNames);
1197
- // Invalid or incomplete config
1198
- if (config === null) {
1199
- return null;
1200
- }
1201
- return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1202
- buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
1097
+ const getActionPlanStatusInfo_ConfigPropertyNames = {
1098
+ displayName: 'getActionPlanStatusInfo',
1099
+ parameters: {
1100
+ required: ['actionPlanId'],
1101
+ optional: []
1102
+ }
1103
+ };
1104
+ function createResourceParams(config) {
1105
+ const resourceParams = {
1106
+ urlParams: {
1107
+ actionPlanId: config.actionPlanId
1108
+ }
1109
+ };
1110
+ return resourceParams;
1111
+ }
1112
+ function keyBuilder(luvio, config) {
1113
+ const resourceParams = createResourceParams(config);
1114
+ return keyBuilder$1(luvio, resourceParams);
1115
+ }
1116
+ function typeCheckConfig(untrustedConfig) {
1117
+ const config = {};
1118
+ const untrustedConfig_actionPlanId = untrustedConfig.actionPlanId;
1119
+ if (typeof untrustedConfig_actionPlanId === 'string') {
1120
+ config.actionPlanId = untrustedConfig_actionPlanId;
1121
+ }
1122
+ return config;
1123
+ }
1124
+ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
1125
+ if (!untrustedIsObject(untrustedConfig)) {
1126
+ return null;
1127
+ }
1128
+ if (process.env.NODE_ENV !== 'production') {
1129
+ validateConfig(untrustedConfig, configPropertyNames);
1130
+ }
1131
+ const config = typeCheckConfig(untrustedConfig);
1132
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1133
+ return null;
1134
+ }
1135
+ return config;
1136
+ }
1137
+ function adapterFragment(luvio, config) {
1138
+ createResourceParams(config);
1139
+ return select();
1140
+ }
1141
+ function onFetchResponseSuccess(luvio, config, resourceParams, response) {
1142
+ const snapshot = ingestSuccess(luvio, resourceParams, response, {
1143
+ config,
1144
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1145
+ });
1146
+ return luvio.storeBroadcast().then(() => snapshot);
1147
+ }
1148
+ function onFetchResponseError(luvio, config, resourceParams, response) {
1149
+ const snapshot = ingestError(luvio, resourceParams, response, {
1150
+ config,
1151
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1152
+ });
1153
+ return luvio.storeBroadcast().then(() => snapshot);
1154
+ }
1155
+ function buildNetworkSnapshot(luvio, config, options) {
1156
+ const resourceParams = createResourceParams(config);
1157
+ const request = createResourceRequest(resourceParams);
1158
+ return luvio.dispatchResourceRequest(request, options)
1159
+ .then((response) => {
1160
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => getResponseCacheKeys(luvio, resourceParams, response.body));
1161
+ }, (response) => {
1162
+ return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
1163
+ });
1164
+ }
1165
+ function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
1166
+ const { luvio, config } = context;
1167
+ const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
1168
+ const dispatchOptions = {
1169
+ resourceRequestContext: {
1170
+ requestCorrelator,
1171
+ luvioRequestMethod: undefined,
1172
+ },
1173
+ eventObservers
1174
+ };
1175
+ if (networkPriority !== 'normal') {
1176
+ dispatchOptions.overrides = {
1177
+ priority: networkPriority
1178
+ };
1179
+ }
1180
+ return buildNetworkSnapshot(luvio, config, dispatchOptions);
1181
+ }
1182
+ function buildCachedSnapshotCachePolicy(context, storeLookup) {
1183
+ const { luvio, config } = context;
1184
+ const selector = {
1185
+ recordId: keyBuilder(luvio, config),
1186
+ node: adapterFragment(luvio, config),
1187
+ variables: {},
1188
+ };
1189
+ const cacheSnapshot = storeLookup(selector, {
1190
+ config,
1191
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1192
+ });
1193
+ return cacheSnapshot;
1194
+ }
1195
+ const getActionPlanStatusInfoAdapterFactory = (luvio) => function ActionPlan__getActionPlanStatusInfo(untrustedConfig, requestContext) {
1196
+ const config = validateAdapterConfig(untrustedConfig, getActionPlanStatusInfo_ConfigPropertyNames);
1197
+ // Invalid or incomplete config
1198
+ if (config === null) {
1199
+ return null;
1200
+ }
1201
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1202
+ buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
1203
1203
  };
1204
1204
 
1205
1205
  export { getActionPlanItemsAdapterFactory, getActionPlanStatusInfoAdapterFactory, getActionPlansAdapterFactory };