@salesforce/lds-adapters-industries-actionablelist 0.131.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +82 -0
- package/dist/es/es2018/industries-actionablelist.js +2988 -0
- package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +66 -0
- package/dist/es/es2018/types/src/generated/adapters/createActionableListDefinition.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/adapters/getActionableListDatasetInfo.d.ts +27 -0
- package/dist/es/es2018/types/src/generated/adapters/getActionableListDefinitions.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/adapters/getActionableListMembers.d.ts +26 -0
- package/dist/es/es2018/types/src/generated/adapters/upsertActionableList.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +5 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +9 -0
- package/dist/es/es2018/types/src/generated/resources/getConnectActionableListDefinition.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/resources/getConnectActionableListMembersById.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/resources/postConnectActionableList.d.ts +13 -0
- package/dist/es/es2018/types/src/generated/resources/postConnectActionableListDefinition.d.ts +13 -0
- package/dist/es/es2018/types/src/generated/resources/postConnectActionableListDefinitionRows.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/types/ALDDatasetColumnOutputRepresentation.d.ts +51 -0
- package/dist/es/es2018/types/src/generated/types/ALDMemberStatusOutputRepresentation.d.ts +36 -0
- package/dist/es/es2018/types/src/generated/types/ActionableListDatasetByDefinitionRepresentation.d.ts +48 -0
- package/dist/es/es2018/types/src/generated/types/ActionableListDatasetColumnRepresentation.d.ts +44 -0
- package/dist/es/es2018/types/src/generated/types/ActionableListDatasetInputRepresentation.d.ts +53 -0
- package/dist/es/es2018/types/src/generated/types/ActionableListDatasetRowRepresentation.d.ts +33 -0
- package/dist/es/es2018/types/src/generated/types/ActionableListDatasetWrapperInputRepresentation.d.ts +30 -0
- package/dist/es/es2018/types/src/generated/types/ActionableListDefinitionCreateInputRepresentation.d.ts +35 -0
- package/dist/es/es2018/types/src/generated/types/ActionableListDefinitionCreateOutputRepresentation.d.ts +42 -0
- package/dist/es/es2018/types/src/generated/types/ActionableListDefinitionGetAllOutputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/ActionableListDefinitionOutputRepresentation.d.ts +59 -0
- package/dist/es/es2018/types/src/generated/types/ActionableListDefinitionStatusOutputRepresentation.d.ts +33 -0
- package/dist/es/es2018/types/src/generated/types/ActionableListDefinitionWrapperInputRepresentation.d.ts +30 -0
- package/dist/es/es2018/types/src/generated/types/ActionableListFilterInputRepresentation.d.ts +38 -0
- package/dist/es/es2018/types/src/generated/types/ActionableListFilterInputRepresentationList.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/ActionableListMemberStatusRepresentation.d.ts +35 -0
- package/dist/es/es2018/types/src/generated/types/ActionableListMembersOutputRepresentation.d.ts +30 -0
- package/dist/es/es2018/types/src/generated/types/ActionableListUpsertInputRepresentation.d.ts +59 -0
- package/dist/es/es2018/types/src/generated/types/ActionableListUpsertOutputRepresentation.d.ts +45 -0
- package/dist/es/es2018/types/src/generated/types/ActionableListWrapperInputRepresentation.d.ts +30 -0
- package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +39 -0
- package/package.json +67 -0
- package/sfdc/index.d.ts +1 -0
- package/sfdc/index.js +3045 -0
- package/src/raml/api.raml +481 -0
- package/src/raml/luvio.raml +54 -0
|
@@ -0,0 +1,2988 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { serializeStructuredKey, StoreKeyMap } from '@luvio/engine';
|
|
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
|
+
};
|
|
51
|
+
const keyPrefix = 'actionablelist';
|
|
52
|
+
|
|
53
|
+
const { freeze: ObjectFreeze, keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
|
|
54
|
+
const { isArray: ArrayIsArray } = Array;
|
|
55
|
+
function equalsArray(a, b, equalsItem) {
|
|
56
|
+
const aLength = a.length;
|
|
57
|
+
const bLength = b.length;
|
|
58
|
+
if (aLength !== bLength) {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
for (let i = 0; i < aLength; i++) {
|
|
62
|
+
if (equalsItem(a[i], b[i]) === false) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
function equalsObject(a, b, equalsProp) {
|
|
69
|
+
const aKeys = ObjectKeys(a).sort();
|
|
70
|
+
const bKeys = ObjectKeys(b).sort();
|
|
71
|
+
const aKeysLength = aKeys.length;
|
|
72
|
+
const bKeysLength = bKeys.length;
|
|
73
|
+
if (aKeysLength !== bKeysLength) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
for (let i = 0; i < aKeys.length; i++) {
|
|
77
|
+
const key = aKeys[i];
|
|
78
|
+
if (key !== bKeys[i]) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
if (equalsProp(a[key], b[key]) === false) {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
function deepFreeze(value) {
|
|
88
|
+
// No need to freeze primitives
|
|
89
|
+
if (typeof value !== 'object' || value === null) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
if (ArrayIsArray(value)) {
|
|
93
|
+
for (let i = 0, len = value.length; i < len; i += 1) {
|
|
94
|
+
deepFreeze(value[i]);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
const keys = ObjectKeys(value);
|
|
99
|
+
for (let i = 0, len = keys.length; i < len; i += 1) {
|
|
100
|
+
deepFreeze(value[keys[i]]);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
ObjectFreeze(value);
|
|
104
|
+
}
|
|
105
|
+
function createLink(ref) {
|
|
106
|
+
return {
|
|
107
|
+
__ref: serializeStructuredKey(ref),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const VERSION$b = "8d304f086ca6d70241ff9dc64e1c4652";
|
|
112
|
+
function validate$e(obj, path = 'ALDDatasetColumnOutputRepresentation') {
|
|
113
|
+
const v_error = (() => {
|
|
114
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
115
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
116
|
+
}
|
|
117
|
+
const obj_actionableListDefinitionId = obj.actionableListDefinitionId;
|
|
118
|
+
const path_actionableListDefinitionId = path + '.actionableListDefinitionId';
|
|
119
|
+
if (typeof obj_actionableListDefinitionId !== 'string') {
|
|
120
|
+
return new TypeError('Expected "string" but received "' + typeof obj_actionableListDefinitionId + '" (at "' + path_actionableListDefinitionId + '")');
|
|
121
|
+
}
|
|
122
|
+
const obj_dataDomain = obj.dataDomain;
|
|
123
|
+
const path_dataDomain = path + '.dataDomain';
|
|
124
|
+
let obj_dataDomain_union0 = null;
|
|
125
|
+
const obj_dataDomain_union0_error = (() => {
|
|
126
|
+
if (typeof obj_dataDomain !== 'string') {
|
|
127
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dataDomain + '" (at "' + path_dataDomain + '")');
|
|
128
|
+
}
|
|
129
|
+
})();
|
|
130
|
+
if (obj_dataDomain_union0_error != null) {
|
|
131
|
+
obj_dataDomain_union0 = obj_dataDomain_union0_error.message;
|
|
132
|
+
}
|
|
133
|
+
let obj_dataDomain_union1 = null;
|
|
134
|
+
const obj_dataDomain_union1_error = (() => {
|
|
135
|
+
if (obj_dataDomain !== null) {
|
|
136
|
+
return new TypeError('Expected "null" but received "' + typeof obj_dataDomain + '" (at "' + path_dataDomain + '")');
|
|
137
|
+
}
|
|
138
|
+
})();
|
|
139
|
+
if (obj_dataDomain_union1_error != null) {
|
|
140
|
+
obj_dataDomain_union1 = obj_dataDomain_union1_error.message;
|
|
141
|
+
}
|
|
142
|
+
if (obj_dataDomain_union0 && obj_dataDomain_union1) {
|
|
143
|
+
let message = 'Object doesn\'t match union (at "' + path_dataDomain + '")';
|
|
144
|
+
message += '\n' + obj_dataDomain_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
145
|
+
message += '\n' + obj_dataDomain_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
146
|
+
return new TypeError(message);
|
|
147
|
+
}
|
|
148
|
+
const obj_dataType = obj.dataType;
|
|
149
|
+
const path_dataType = path + '.dataType';
|
|
150
|
+
let obj_dataType_union0 = null;
|
|
151
|
+
const obj_dataType_union0_error = (() => {
|
|
152
|
+
if (typeof obj_dataType !== 'string') {
|
|
153
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
|
|
154
|
+
}
|
|
155
|
+
})();
|
|
156
|
+
if (obj_dataType_union0_error != null) {
|
|
157
|
+
obj_dataType_union0 = obj_dataType_union0_error.message;
|
|
158
|
+
}
|
|
159
|
+
let obj_dataType_union1 = null;
|
|
160
|
+
const obj_dataType_union1_error = (() => {
|
|
161
|
+
if (obj_dataType !== null) {
|
|
162
|
+
return new TypeError('Expected "null" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
|
|
163
|
+
}
|
|
164
|
+
})();
|
|
165
|
+
if (obj_dataType_union1_error != null) {
|
|
166
|
+
obj_dataType_union1 = obj_dataType_union1_error.message;
|
|
167
|
+
}
|
|
168
|
+
if (obj_dataType_union0 && obj_dataType_union1) {
|
|
169
|
+
let message = 'Object doesn\'t match union (at "' + path_dataType + '")';
|
|
170
|
+
message += '\n' + obj_dataType_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
171
|
+
message += '\n' + obj_dataType_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
172
|
+
return new TypeError(message);
|
|
173
|
+
}
|
|
174
|
+
const obj_id = obj.id;
|
|
175
|
+
const path_id = path + '.id';
|
|
176
|
+
if (typeof obj_id !== 'string') {
|
|
177
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
178
|
+
}
|
|
179
|
+
const obj_isDefault = obj.isDefault;
|
|
180
|
+
const path_isDefault = path + '.isDefault';
|
|
181
|
+
if (typeof obj_isDefault !== 'boolean') {
|
|
182
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isDefault + '" (at "' + path_isDefault + '")');
|
|
183
|
+
}
|
|
184
|
+
const obj_objectName = obj.objectName;
|
|
185
|
+
const path_objectName = path + '.objectName';
|
|
186
|
+
let obj_objectName_union0 = null;
|
|
187
|
+
const obj_objectName_union0_error = (() => {
|
|
188
|
+
if (typeof obj_objectName !== 'string') {
|
|
189
|
+
return new TypeError('Expected "string" but received "' + typeof obj_objectName + '" (at "' + path_objectName + '")');
|
|
190
|
+
}
|
|
191
|
+
})();
|
|
192
|
+
if (obj_objectName_union0_error != null) {
|
|
193
|
+
obj_objectName_union0 = obj_objectName_union0_error.message;
|
|
194
|
+
}
|
|
195
|
+
let obj_objectName_union1 = null;
|
|
196
|
+
const obj_objectName_union1_error = (() => {
|
|
197
|
+
if (obj_objectName !== null) {
|
|
198
|
+
return new TypeError('Expected "null" but received "' + typeof obj_objectName + '" (at "' + path_objectName + '")');
|
|
199
|
+
}
|
|
200
|
+
})();
|
|
201
|
+
if (obj_objectName_union1_error != null) {
|
|
202
|
+
obj_objectName_union1 = obj_objectName_union1_error.message;
|
|
203
|
+
}
|
|
204
|
+
if (obj_objectName_union0 && obj_objectName_union1) {
|
|
205
|
+
let message = 'Object doesn\'t match union (at "' + path_objectName + '")';
|
|
206
|
+
message += '\n' + obj_objectName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
207
|
+
message += '\n' + obj_objectName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
208
|
+
return new TypeError(message);
|
|
209
|
+
}
|
|
210
|
+
const obj_sourceColumnApiName = obj.sourceColumnApiName;
|
|
211
|
+
const path_sourceColumnApiName = path + '.sourceColumnApiName';
|
|
212
|
+
let obj_sourceColumnApiName_union0 = null;
|
|
213
|
+
const obj_sourceColumnApiName_union0_error = (() => {
|
|
214
|
+
if (typeof obj_sourceColumnApiName !== 'string') {
|
|
215
|
+
return new TypeError('Expected "string" but received "' + typeof obj_sourceColumnApiName + '" (at "' + path_sourceColumnApiName + '")');
|
|
216
|
+
}
|
|
217
|
+
})();
|
|
218
|
+
if (obj_sourceColumnApiName_union0_error != null) {
|
|
219
|
+
obj_sourceColumnApiName_union0 = obj_sourceColumnApiName_union0_error.message;
|
|
220
|
+
}
|
|
221
|
+
let obj_sourceColumnApiName_union1 = null;
|
|
222
|
+
const obj_sourceColumnApiName_union1_error = (() => {
|
|
223
|
+
if (obj_sourceColumnApiName !== null) {
|
|
224
|
+
return new TypeError('Expected "null" but received "' + typeof obj_sourceColumnApiName + '" (at "' + path_sourceColumnApiName + '")');
|
|
225
|
+
}
|
|
226
|
+
})();
|
|
227
|
+
if (obj_sourceColumnApiName_union1_error != null) {
|
|
228
|
+
obj_sourceColumnApiName_union1 = obj_sourceColumnApiName_union1_error.message;
|
|
229
|
+
}
|
|
230
|
+
if (obj_sourceColumnApiName_union0 && obj_sourceColumnApiName_union1) {
|
|
231
|
+
let message = 'Object doesn\'t match union (at "' + path_sourceColumnApiName + '")';
|
|
232
|
+
message += '\n' + obj_sourceColumnApiName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
233
|
+
message += '\n' + obj_sourceColumnApiName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
234
|
+
return new TypeError(message);
|
|
235
|
+
}
|
|
236
|
+
const obj_sourceFieldName = obj.sourceFieldName;
|
|
237
|
+
const path_sourceFieldName = path + '.sourceFieldName';
|
|
238
|
+
let obj_sourceFieldName_union0 = null;
|
|
239
|
+
const obj_sourceFieldName_union0_error = (() => {
|
|
240
|
+
if (typeof obj_sourceFieldName !== 'string') {
|
|
241
|
+
return new TypeError('Expected "string" but received "' + typeof obj_sourceFieldName + '" (at "' + path_sourceFieldName + '")');
|
|
242
|
+
}
|
|
243
|
+
})();
|
|
244
|
+
if (obj_sourceFieldName_union0_error != null) {
|
|
245
|
+
obj_sourceFieldName_union0 = obj_sourceFieldName_union0_error.message;
|
|
246
|
+
}
|
|
247
|
+
let obj_sourceFieldName_union1 = null;
|
|
248
|
+
const obj_sourceFieldName_union1_error = (() => {
|
|
249
|
+
if (obj_sourceFieldName !== null) {
|
|
250
|
+
return new TypeError('Expected "null" but received "' + typeof obj_sourceFieldName + '" (at "' + path_sourceFieldName + '")');
|
|
251
|
+
}
|
|
252
|
+
})();
|
|
253
|
+
if (obj_sourceFieldName_union1_error != null) {
|
|
254
|
+
obj_sourceFieldName_union1 = obj_sourceFieldName_union1_error.message;
|
|
255
|
+
}
|
|
256
|
+
if (obj_sourceFieldName_union0 && obj_sourceFieldName_union1) {
|
|
257
|
+
let message = 'Object doesn\'t match union (at "' + path_sourceFieldName + '")';
|
|
258
|
+
message += '\n' + obj_sourceFieldName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
259
|
+
message += '\n' + obj_sourceFieldName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
260
|
+
return new TypeError(message);
|
|
261
|
+
}
|
|
262
|
+
})();
|
|
263
|
+
return v_error === undefined ? null : v_error;
|
|
264
|
+
}
|
|
265
|
+
const select$g = function ALDDatasetColumnOutputRepresentationSelect() {
|
|
266
|
+
return {
|
|
267
|
+
kind: 'Fragment',
|
|
268
|
+
version: VERSION$b,
|
|
269
|
+
private: [],
|
|
270
|
+
selections: [
|
|
271
|
+
{
|
|
272
|
+
name: 'actionableListDefinitionId',
|
|
273
|
+
kind: 'Scalar'
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
name: 'dataDomain',
|
|
277
|
+
kind: 'Scalar'
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
name: 'dataType',
|
|
281
|
+
kind: 'Scalar'
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
name: 'id',
|
|
285
|
+
kind: 'Scalar'
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
name: 'isDefault',
|
|
289
|
+
kind: 'Scalar'
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
name: 'objectName',
|
|
293
|
+
kind: 'Scalar'
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
name: 'sourceColumnApiName',
|
|
297
|
+
kind: 'Scalar'
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
name: 'sourceFieldName',
|
|
301
|
+
kind: 'Scalar'
|
|
302
|
+
}
|
|
303
|
+
]
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
function equals$b(existing, incoming) {
|
|
307
|
+
const existing_isDefault = existing.isDefault;
|
|
308
|
+
const incoming_isDefault = incoming.isDefault;
|
|
309
|
+
if (!(existing_isDefault === incoming_isDefault)) {
|
|
310
|
+
return false;
|
|
311
|
+
}
|
|
312
|
+
const existing_actionableListDefinitionId = existing.actionableListDefinitionId;
|
|
313
|
+
const incoming_actionableListDefinitionId = incoming.actionableListDefinitionId;
|
|
314
|
+
if (!(existing_actionableListDefinitionId === incoming_actionableListDefinitionId)) {
|
|
315
|
+
return false;
|
|
316
|
+
}
|
|
317
|
+
const existing_id = existing.id;
|
|
318
|
+
const incoming_id = incoming.id;
|
|
319
|
+
if (!(existing_id === incoming_id)) {
|
|
320
|
+
return false;
|
|
321
|
+
}
|
|
322
|
+
const existing_dataDomain = existing.dataDomain;
|
|
323
|
+
const incoming_dataDomain = incoming.dataDomain;
|
|
324
|
+
if (!(existing_dataDomain === incoming_dataDomain)) {
|
|
325
|
+
return false;
|
|
326
|
+
}
|
|
327
|
+
const existing_dataType = existing.dataType;
|
|
328
|
+
const incoming_dataType = incoming.dataType;
|
|
329
|
+
if (!(existing_dataType === incoming_dataType)) {
|
|
330
|
+
return false;
|
|
331
|
+
}
|
|
332
|
+
const existing_objectName = existing.objectName;
|
|
333
|
+
const incoming_objectName = incoming.objectName;
|
|
334
|
+
if (!(existing_objectName === incoming_objectName)) {
|
|
335
|
+
return false;
|
|
336
|
+
}
|
|
337
|
+
const existing_sourceColumnApiName = existing.sourceColumnApiName;
|
|
338
|
+
const incoming_sourceColumnApiName = incoming.sourceColumnApiName;
|
|
339
|
+
if (!(existing_sourceColumnApiName === incoming_sourceColumnApiName)) {
|
|
340
|
+
return false;
|
|
341
|
+
}
|
|
342
|
+
const existing_sourceFieldName = existing.sourceFieldName;
|
|
343
|
+
const incoming_sourceFieldName = incoming.sourceFieldName;
|
|
344
|
+
if (!(existing_sourceFieldName === incoming_sourceFieldName)) {
|
|
345
|
+
return false;
|
|
346
|
+
}
|
|
347
|
+
return true;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
const VERSION$a = "9d133a939d3bf9e4f6209870e525ff9f";
|
|
351
|
+
function validate$d(obj, path = 'ALDMemberStatusOutputRepresentation') {
|
|
352
|
+
const v_error = (() => {
|
|
353
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
354
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
355
|
+
}
|
|
356
|
+
const obj_iconName = obj.iconName;
|
|
357
|
+
const path_iconName = path + '.iconName';
|
|
358
|
+
if (typeof obj_iconName !== 'string') {
|
|
359
|
+
return new TypeError('Expected "string" but received "' + typeof obj_iconName + '" (at "' + path_iconName + '")');
|
|
360
|
+
}
|
|
361
|
+
const obj_id = obj.id;
|
|
362
|
+
const path_id = path + '.id';
|
|
363
|
+
if (typeof obj_id !== 'string') {
|
|
364
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
365
|
+
}
|
|
366
|
+
const obj_status = obj.status;
|
|
367
|
+
const path_status = path + '.status';
|
|
368
|
+
if (typeof obj_status !== 'string') {
|
|
369
|
+
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
370
|
+
}
|
|
371
|
+
})();
|
|
372
|
+
return v_error === undefined ? null : v_error;
|
|
373
|
+
}
|
|
374
|
+
const select$f = function ALDMemberStatusOutputRepresentationSelect() {
|
|
375
|
+
return {
|
|
376
|
+
kind: 'Fragment',
|
|
377
|
+
version: VERSION$a,
|
|
378
|
+
private: [],
|
|
379
|
+
selections: [
|
|
380
|
+
{
|
|
381
|
+
name: 'iconName',
|
|
382
|
+
kind: 'Scalar'
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
name: 'id',
|
|
386
|
+
kind: 'Scalar'
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
name: 'status',
|
|
390
|
+
kind: 'Scalar'
|
|
391
|
+
}
|
|
392
|
+
]
|
|
393
|
+
};
|
|
394
|
+
};
|
|
395
|
+
function equals$a(existing, incoming) {
|
|
396
|
+
const existing_iconName = existing.iconName;
|
|
397
|
+
const incoming_iconName = incoming.iconName;
|
|
398
|
+
if (!(existing_iconName === incoming_iconName)) {
|
|
399
|
+
return false;
|
|
400
|
+
}
|
|
401
|
+
const existing_id = existing.id;
|
|
402
|
+
const incoming_id = incoming.id;
|
|
403
|
+
if (!(existing_id === incoming_id)) {
|
|
404
|
+
return false;
|
|
405
|
+
}
|
|
406
|
+
const existing_status = existing.status;
|
|
407
|
+
const incoming_status = incoming.status;
|
|
408
|
+
if (!(existing_status === incoming_status)) {
|
|
409
|
+
return false;
|
|
410
|
+
}
|
|
411
|
+
return true;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
const VERSION$9 = "63348e0d2a5e8d3cf7f7ddc110bf6cf4";
|
|
415
|
+
function validate$c(obj, path = 'ActionableListDefinitionOutputRepresentation') {
|
|
416
|
+
const v_error = (() => {
|
|
417
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
418
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
419
|
+
}
|
|
420
|
+
const obj_aldDatasetColumnOutputRepresentation = obj.aldDatasetColumnOutputRepresentation;
|
|
421
|
+
const path_aldDatasetColumnOutputRepresentation = path + '.aldDatasetColumnOutputRepresentation';
|
|
422
|
+
if (!ArrayIsArray(obj_aldDatasetColumnOutputRepresentation)) {
|
|
423
|
+
return new TypeError('Expected "array" but received "' + typeof obj_aldDatasetColumnOutputRepresentation + '" (at "' + path_aldDatasetColumnOutputRepresentation + '")');
|
|
424
|
+
}
|
|
425
|
+
for (let i = 0; i < obj_aldDatasetColumnOutputRepresentation.length; i++) {
|
|
426
|
+
const obj_aldDatasetColumnOutputRepresentation_item = obj_aldDatasetColumnOutputRepresentation[i];
|
|
427
|
+
const path_aldDatasetColumnOutputRepresentation_item = path_aldDatasetColumnOutputRepresentation + '[' + i + ']';
|
|
428
|
+
const referencepath_aldDatasetColumnOutputRepresentation_itemValidationError = validate$e(obj_aldDatasetColumnOutputRepresentation_item, path_aldDatasetColumnOutputRepresentation_item);
|
|
429
|
+
if (referencepath_aldDatasetColumnOutputRepresentation_itemValidationError !== null) {
|
|
430
|
+
let message = 'Object doesn\'t match ALDDatasetColumnOutputRepresentation (at "' + path_aldDatasetColumnOutputRepresentation_item + '")\n';
|
|
431
|
+
message += referencepath_aldDatasetColumnOutputRepresentation_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
432
|
+
return new TypeError(message);
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
const obj_aldMemberStatusOutputRepresentation = obj.aldMemberStatusOutputRepresentation;
|
|
436
|
+
const path_aldMemberStatusOutputRepresentation = path + '.aldMemberStatusOutputRepresentation';
|
|
437
|
+
if (!ArrayIsArray(obj_aldMemberStatusOutputRepresentation)) {
|
|
438
|
+
return new TypeError('Expected "array" but received "' + typeof obj_aldMemberStatusOutputRepresentation + '" (at "' + path_aldMemberStatusOutputRepresentation + '")');
|
|
439
|
+
}
|
|
440
|
+
for (let i = 0; i < obj_aldMemberStatusOutputRepresentation.length; i++) {
|
|
441
|
+
const obj_aldMemberStatusOutputRepresentation_item = obj_aldMemberStatusOutputRepresentation[i];
|
|
442
|
+
const path_aldMemberStatusOutputRepresentation_item = path_aldMemberStatusOutputRepresentation + '[' + i + ']';
|
|
443
|
+
const referencepath_aldMemberStatusOutputRepresentation_itemValidationError = validate$d(obj_aldMemberStatusOutputRepresentation_item, path_aldMemberStatusOutputRepresentation_item);
|
|
444
|
+
if (referencepath_aldMemberStatusOutputRepresentation_itemValidationError !== null) {
|
|
445
|
+
let message = 'Object doesn\'t match ALDMemberStatusOutputRepresentation (at "' + path_aldMemberStatusOutputRepresentation_item + '")\n';
|
|
446
|
+
message += referencepath_aldMemberStatusOutputRepresentation_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
447
|
+
return new TypeError(message);
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
const obj_batchCalcJobDefinitionId = obj.batchCalcJobDefinitionId;
|
|
451
|
+
const path_batchCalcJobDefinitionId = path + '.batchCalcJobDefinitionId';
|
|
452
|
+
let obj_batchCalcJobDefinitionId_union0 = null;
|
|
453
|
+
const obj_batchCalcJobDefinitionId_union0_error = (() => {
|
|
454
|
+
if (typeof obj_batchCalcJobDefinitionId !== 'string') {
|
|
455
|
+
return new TypeError('Expected "string" but received "' + typeof obj_batchCalcJobDefinitionId + '" (at "' + path_batchCalcJobDefinitionId + '")');
|
|
456
|
+
}
|
|
457
|
+
})();
|
|
458
|
+
if (obj_batchCalcJobDefinitionId_union0_error != null) {
|
|
459
|
+
obj_batchCalcJobDefinitionId_union0 = obj_batchCalcJobDefinitionId_union0_error.message;
|
|
460
|
+
}
|
|
461
|
+
let obj_batchCalcJobDefinitionId_union1 = null;
|
|
462
|
+
const obj_batchCalcJobDefinitionId_union1_error = (() => {
|
|
463
|
+
if (obj_batchCalcJobDefinitionId !== null) {
|
|
464
|
+
return new TypeError('Expected "null" but received "' + typeof obj_batchCalcJobDefinitionId + '" (at "' + path_batchCalcJobDefinitionId + '")');
|
|
465
|
+
}
|
|
466
|
+
})();
|
|
467
|
+
if (obj_batchCalcJobDefinitionId_union1_error != null) {
|
|
468
|
+
obj_batchCalcJobDefinitionId_union1 = obj_batchCalcJobDefinitionId_union1_error.message;
|
|
469
|
+
}
|
|
470
|
+
if (obj_batchCalcJobDefinitionId_union0 && obj_batchCalcJobDefinitionId_union1) {
|
|
471
|
+
let message = 'Object doesn\'t match union (at "' + path_batchCalcJobDefinitionId + '")';
|
|
472
|
+
message += '\n' + obj_batchCalcJobDefinitionId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
473
|
+
message += '\n' + obj_batchCalcJobDefinitionId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
474
|
+
return new TypeError(message);
|
|
475
|
+
}
|
|
476
|
+
const obj_fullName = obj.fullName;
|
|
477
|
+
const path_fullName = path + '.fullName';
|
|
478
|
+
if (typeof obj_fullName !== 'string') {
|
|
479
|
+
return new TypeError('Expected "string" but received "' + typeof obj_fullName + '" (at "' + path_fullName + '")');
|
|
480
|
+
}
|
|
481
|
+
const obj_id = obj.id;
|
|
482
|
+
const path_id = path + '.id';
|
|
483
|
+
if (typeof obj_id !== 'string') {
|
|
484
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
485
|
+
}
|
|
486
|
+
const obj_isActive = obj.isActive;
|
|
487
|
+
const path_isActive = path + '.isActive';
|
|
488
|
+
if (typeof obj_isActive !== 'boolean') {
|
|
489
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isActive + '" (at "' + path_isActive + '")');
|
|
490
|
+
}
|
|
491
|
+
const obj_objectName = obj.objectName;
|
|
492
|
+
const path_objectName = path + '.objectName';
|
|
493
|
+
if (typeof obj_objectName !== 'string') {
|
|
494
|
+
return new TypeError('Expected "string" but received "' + typeof obj_objectName + '" (at "' + path_objectName + '")');
|
|
495
|
+
}
|
|
496
|
+
const obj_status = obj.status;
|
|
497
|
+
const path_status = path + '.status';
|
|
498
|
+
if (typeof obj_status !== 'string') {
|
|
499
|
+
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
500
|
+
}
|
|
501
|
+
const obj_tcrmDatasetId = obj.tcrmDatasetId;
|
|
502
|
+
const path_tcrmDatasetId = path + '.tcrmDatasetId';
|
|
503
|
+
let obj_tcrmDatasetId_union0 = null;
|
|
504
|
+
const obj_tcrmDatasetId_union0_error = (() => {
|
|
505
|
+
if (typeof obj_tcrmDatasetId !== 'string') {
|
|
506
|
+
return new TypeError('Expected "string" but received "' + typeof obj_tcrmDatasetId + '" (at "' + path_tcrmDatasetId + '")');
|
|
507
|
+
}
|
|
508
|
+
})();
|
|
509
|
+
if (obj_tcrmDatasetId_union0_error != null) {
|
|
510
|
+
obj_tcrmDatasetId_union0 = obj_tcrmDatasetId_union0_error.message;
|
|
511
|
+
}
|
|
512
|
+
let obj_tcrmDatasetId_union1 = null;
|
|
513
|
+
const obj_tcrmDatasetId_union1_error = (() => {
|
|
514
|
+
if (obj_tcrmDatasetId !== null) {
|
|
515
|
+
return new TypeError('Expected "null" but received "' + typeof obj_tcrmDatasetId + '" (at "' + path_tcrmDatasetId + '")');
|
|
516
|
+
}
|
|
517
|
+
})();
|
|
518
|
+
if (obj_tcrmDatasetId_union1_error != null) {
|
|
519
|
+
obj_tcrmDatasetId_union1 = obj_tcrmDatasetId_union1_error.message;
|
|
520
|
+
}
|
|
521
|
+
if (obj_tcrmDatasetId_union0 && obj_tcrmDatasetId_union1) {
|
|
522
|
+
let message = 'Object doesn\'t match union (at "' + path_tcrmDatasetId + '")';
|
|
523
|
+
message += '\n' + obj_tcrmDatasetId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
524
|
+
message += '\n' + obj_tcrmDatasetId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
525
|
+
return new TypeError(message);
|
|
526
|
+
}
|
|
527
|
+
const obj_tcrmDatasetName = obj.tcrmDatasetName;
|
|
528
|
+
const path_tcrmDatasetName = path + '.tcrmDatasetName';
|
|
529
|
+
if (typeof obj_tcrmDatasetName !== 'string') {
|
|
530
|
+
return new TypeError('Expected "string" but received "' + typeof obj_tcrmDatasetName + '" (at "' + path_tcrmDatasetName + '")');
|
|
531
|
+
}
|
|
532
|
+
})();
|
|
533
|
+
return v_error === undefined ? null : v_error;
|
|
534
|
+
}
|
|
535
|
+
const select$e = function ActionableListDefinitionOutputRepresentationSelect() {
|
|
536
|
+
const { selections: ALDDatasetColumnOutputRepresentation__selections, opaque: ALDDatasetColumnOutputRepresentation__opaque, } = select$g();
|
|
537
|
+
const { selections: ALDMemberStatusOutputRepresentation__selections, opaque: ALDMemberStatusOutputRepresentation__opaque, } = select$f();
|
|
538
|
+
return {
|
|
539
|
+
kind: 'Fragment',
|
|
540
|
+
version: VERSION$9,
|
|
541
|
+
private: [],
|
|
542
|
+
selections: [
|
|
543
|
+
{
|
|
544
|
+
name: 'aldDatasetColumnOutputRepresentation',
|
|
545
|
+
kind: 'Object',
|
|
546
|
+
plural: true,
|
|
547
|
+
selections: ALDDatasetColumnOutputRepresentation__selections
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
name: 'aldMemberStatusOutputRepresentation',
|
|
551
|
+
kind: 'Object',
|
|
552
|
+
plural: true,
|
|
553
|
+
selections: ALDMemberStatusOutputRepresentation__selections
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
name: 'batchCalcJobDefinitionId',
|
|
557
|
+
kind: 'Scalar'
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
name: 'fullName',
|
|
561
|
+
kind: 'Scalar'
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
name: 'id',
|
|
565
|
+
kind: 'Scalar'
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
name: 'isActive',
|
|
569
|
+
kind: 'Scalar'
|
|
570
|
+
},
|
|
571
|
+
{
|
|
572
|
+
name: 'objectName',
|
|
573
|
+
kind: 'Scalar'
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
name: 'status',
|
|
577
|
+
kind: 'Scalar'
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
name: 'tcrmDatasetId',
|
|
581
|
+
kind: 'Scalar'
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
name: 'tcrmDatasetName',
|
|
585
|
+
kind: 'Scalar'
|
|
586
|
+
}
|
|
587
|
+
]
|
|
588
|
+
};
|
|
589
|
+
};
|
|
590
|
+
function equals$9(existing, incoming) {
|
|
591
|
+
const existing_isActive = existing.isActive;
|
|
592
|
+
const incoming_isActive = incoming.isActive;
|
|
593
|
+
if (!(existing_isActive === incoming_isActive)) {
|
|
594
|
+
return false;
|
|
595
|
+
}
|
|
596
|
+
const existing_fullName = existing.fullName;
|
|
597
|
+
const incoming_fullName = incoming.fullName;
|
|
598
|
+
if (!(existing_fullName === incoming_fullName)) {
|
|
599
|
+
return false;
|
|
600
|
+
}
|
|
601
|
+
const existing_id = existing.id;
|
|
602
|
+
const incoming_id = incoming.id;
|
|
603
|
+
if (!(existing_id === incoming_id)) {
|
|
604
|
+
return false;
|
|
605
|
+
}
|
|
606
|
+
const existing_objectName = existing.objectName;
|
|
607
|
+
const incoming_objectName = incoming.objectName;
|
|
608
|
+
if (!(existing_objectName === incoming_objectName)) {
|
|
609
|
+
return false;
|
|
610
|
+
}
|
|
611
|
+
const existing_status = existing.status;
|
|
612
|
+
const incoming_status = incoming.status;
|
|
613
|
+
if (!(existing_status === incoming_status)) {
|
|
614
|
+
return false;
|
|
615
|
+
}
|
|
616
|
+
const existing_tcrmDatasetName = existing.tcrmDatasetName;
|
|
617
|
+
const incoming_tcrmDatasetName = incoming.tcrmDatasetName;
|
|
618
|
+
if (!(existing_tcrmDatasetName === incoming_tcrmDatasetName)) {
|
|
619
|
+
return false;
|
|
620
|
+
}
|
|
621
|
+
const existing_aldDatasetColumnOutputRepresentation = existing.aldDatasetColumnOutputRepresentation;
|
|
622
|
+
const incoming_aldDatasetColumnOutputRepresentation = incoming.aldDatasetColumnOutputRepresentation;
|
|
623
|
+
const equals_aldDatasetColumnOutputRepresentation_items = equalsArray(existing_aldDatasetColumnOutputRepresentation, incoming_aldDatasetColumnOutputRepresentation, (existing_aldDatasetColumnOutputRepresentation_item, incoming_aldDatasetColumnOutputRepresentation_item) => {
|
|
624
|
+
if (!(equals$b(existing_aldDatasetColumnOutputRepresentation_item, incoming_aldDatasetColumnOutputRepresentation_item))) {
|
|
625
|
+
return false;
|
|
626
|
+
}
|
|
627
|
+
});
|
|
628
|
+
if (equals_aldDatasetColumnOutputRepresentation_items === false) {
|
|
629
|
+
return false;
|
|
630
|
+
}
|
|
631
|
+
const existing_aldMemberStatusOutputRepresentation = existing.aldMemberStatusOutputRepresentation;
|
|
632
|
+
const incoming_aldMemberStatusOutputRepresentation = incoming.aldMemberStatusOutputRepresentation;
|
|
633
|
+
const equals_aldMemberStatusOutputRepresentation_items = equalsArray(existing_aldMemberStatusOutputRepresentation, incoming_aldMemberStatusOutputRepresentation, (existing_aldMemberStatusOutputRepresentation_item, incoming_aldMemberStatusOutputRepresentation_item) => {
|
|
634
|
+
if (!(equals$a(existing_aldMemberStatusOutputRepresentation_item, incoming_aldMemberStatusOutputRepresentation_item))) {
|
|
635
|
+
return false;
|
|
636
|
+
}
|
|
637
|
+
});
|
|
638
|
+
if (equals_aldMemberStatusOutputRepresentation_items === false) {
|
|
639
|
+
return false;
|
|
640
|
+
}
|
|
641
|
+
const existing_batchCalcJobDefinitionId = existing.batchCalcJobDefinitionId;
|
|
642
|
+
const incoming_batchCalcJobDefinitionId = incoming.batchCalcJobDefinitionId;
|
|
643
|
+
if (!(existing_batchCalcJobDefinitionId === incoming_batchCalcJobDefinitionId)) {
|
|
644
|
+
return false;
|
|
645
|
+
}
|
|
646
|
+
const existing_tcrmDatasetId = existing.tcrmDatasetId;
|
|
647
|
+
const incoming_tcrmDatasetId = incoming.tcrmDatasetId;
|
|
648
|
+
if (!(existing_tcrmDatasetId === incoming_tcrmDatasetId)) {
|
|
649
|
+
return false;
|
|
650
|
+
}
|
|
651
|
+
return true;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
const TTL$4 = 100;
|
|
655
|
+
const VERSION$8 = "4c1ba3bd226b3670b78af4e7ea159854";
|
|
656
|
+
function validate$b(obj, path = 'ActionableListDefinitionGetAllOutputRepresentation') {
|
|
657
|
+
const v_error = (() => {
|
|
658
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
659
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
660
|
+
}
|
|
661
|
+
const obj_aldList = obj.aldList;
|
|
662
|
+
const path_aldList = path + '.aldList';
|
|
663
|
+
if (!ArrayIsArray(obj_aldList)) {
|
|
664
|
+
return new TypeError('Expected "array" but received "' + typeof obj_aldList + '" (at "' + path_aldList + '")');
|
|
665
|
+
}
|
|
666
|
+
for (let i = 0; i < obj_aldList.length; i++) {
|
|
667
|
+
const obj_aldList_item = obj_aldList[i];
|
|
668
|
+
const path_aldList_item = path_aldList + '[' + i + ']';
|
|
669
|
+
const referencepath_aldList_itemValidationError = validate$c(obj_aldList_item, path_aldList_item);
|
|
670
|
+
if (referencepath_aldList_itemValidationError !== null) {
|
|
671
|
+
let message = 'Object doesn\'t match ActionableListDefinitionOutputRepresentation (at "' + path_aldList_item + '")\n';
|
|
672
|
+
message += referencepath_aldList_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
673
|
+
return new TypeError(message);
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
})();
|
|
677
|
+
return v_error === undefined ? null : v_error;
|
|
678
|
+
}
|
|
679
|
+
const RepresentationType$4 = 'ActionableListDefinitionGetAllOutputRepresentation';
|
|
680
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
681
|
+
return input;
|
|
682
|
+
}
|
|
683
|
+
const select$d = function ActionableListDefinitionGetAllOutputRepresentationSelect() {
|
|
684
|
+
const { selections: ActionableListDefinitionOutputRepresentation__selections, opaque: ActionableListDefinitionOutputRepresentation__opaque, } = select$e();
|
|
685
|
+
return {
|
|
686
|
+
kind: 'Fragment',
|
|
687
|
+
version: VERSION$8,
|
|
688
|
+
private: [],
|
|
689
|
+
selections: [
|
|
690
|
+
{
|
|
691
|
+
name: 'aldList',
|
|
692
|
+
kind: 'Object',
|
|
693
|
+
plural: true,
|
|
694
|
+
selections: ActionableListDefinitionOutputRepresentation__selections
|
|
695
|
+
}
|
|
696
|
+
]
|
|
697
|
+
};
|
|
698
|
+
};
|
|
699
|
+
function equals$8(existing, incoming) {
|
|
700
|
+
const existing_aldList = existing.aldList;
|
|
701
|
+
const incoming_aldList = incoming.aldList;
|
|
702
|
+
const equals_aldList_items = equalsArray(existing_aldList, incoming_aldList, (existing_aldList_item, incoming_aldList_item) => {
|
|
703
|
+
if (!(equals$9(existing_aldList_item, incoming_aldList_item))) {
|
|
704
|
+
return false;
|
|
705
|
+
}
|
|
706
|
+
});
|
|
707
|
+
if (equals_aldList_items === false) {
|
|
708
|
+
return false;
|
|
709
|
+
}
|
|
710
|
+
return true;
|
|
711
|
+
}
|
|
712
|
+
const ingest$4 = function ActionableListDefinitionGetAllOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
713
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
714
|
+
const validateError = validate$b(input);
|
|
715
|
+
if (validateError !== null) {
|
|
716
|
+
throw validateError;
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
const key = path.fullPath;
|
|
720
|
+
const existingRecord = store.readEntry(key);
|
|
721
|
+
const ttlToUse = TTL$4;
|
|
722
|
+
let incomingRecord = normalize$4(input, store.readEntry(key), {
|
|
723
|
+
fullPath: key,
|
|
724
|
+
parent: path.parent,
|
|
725
|
+
propertyName: path.propertyName,
|
|
726
|
+
ttl: ttlToUse
|
|
727
|
+
});
|
|
728
|
+
if (existingRecord === undefined || equals$8(existingRecord, incomingRecord) === false) {
|
|
729
|
+
luvio.storePublish(key, incomingRecord);
|
|
730
|
+
}
|
|
731
|
+
{
|
|
732
|
+
const storeMetadataParams = {
|
|
733
|
+
ttl: ttlToUse,
|
|
734
|
+
namespace: "actionablelist",
|
|
735
|
+
version: VERSION$8,
|
|
736
|
+
representationName: RepresentationType$4,
|
|
737
|
+
};
|
|
738
|
+
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
739
|
+
}
|
|
740
|
+
return createLink(key);
|
|
741
|
+
};
|
|
742
|
+
function getTypeCacheKeys$4(luvio, input, fullPathFactory) {
|
|
743
|
+
const rootKeySet = new StoreKeyMap();
|
|
744
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
745
|
+
const rootKey = fullPathFactory();
|
|
746
|
+
rootKeySet.set(rootKey, {
|
|
747
|
+
namespace: keyPrefix,
|
|
748
|
+
representationName: RepresentationType$4,
|
|
749
|
+
mergeable: false
|
|
750
|
+
});
|
|
751
|
+
return rootKeySet;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
function select$c(luvio, params) {
|
|
755
|
+
return select$d();
|
|
756
|
+
}
|
|
757
|
+
function keyBuilder$7(luvio, params) {
|
|
758
|
+
return keyPrefix + '::ActionableListDefinitionGetAllOutputRepresentation:(' + 'id:' + params.queryParams.id + ',' + 'isActive:' + params.queryParams.isActive + ',' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ')';
|
|
759
|
+
}
|
|
760
|
+
function getResponseCacheKeys$4(luvio, resourceParams, response) {
|
|
761
|
+
return getTypeCacheKeys$4(luvio, response, () => keyBuilder$7(luvio, resourceParams));
|
|
762
|
+
}
|
|
763
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
764
|
+
const { body } = response;
|
|
765
|
+
const key = keyBuilder$7(luvio, resourceParams);
|
|
766
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
767
|
+
const snapshot = luvio.storeLookup({
|
|
768
|
+
recordId: key,
|
|
769
|
+
node: select$c(),
|
|
770
|
+
variables: {},
|
|
771
|
+
}, snapshotRefresh);
|
|
772
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
773
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
774
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
return snapshot;
|
|
778
|
+
}
|
|
779
|
+
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
780
|
+
const key = keyBuilder$7(luvio, params);
|
|
781
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
782
|
+
const storeMetadataParams = {
|
|
783
|
+
ttl: TTL$4,
|
|
784
|
+
namespace: keyPrefix,
|
|
785
|
+
version: VERSION$8,
|
|
786
|
+
representationName: RepresentationType$4
|
|
787
|
+
};
|
|
788
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
789
|
+
return errorSnapshot;
|
|
790
|
+
}
|
|
791
|
+
function createResourceRequest$4(config) {
|
|
792
|
+
const headers = {};
|
|
793
|
+
return {
|
|
794
|
+
baseUri: '/services/data/v58.0',
|
|
795
|
+
basePath: '/connect/actionable-list-definition',
|
|
796
|
+
method: 'get',
|
|
797
|
+
body: null,
|
|
798
|
+
urlParams: {},
|
|
799
|
+
queryParams: config.queryParams,
|
|
800
|
+
headers,
|
|
801
|
+
priority: 'normal',
|
|
802
|
+
};
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
const getActionableListDefinitions_ConfigPropertyNames = {
|
|
806
|
+
displayName: 'getActionableListDefinitions',
|
|
807
|
+
parameters: {
|
|
808
|
+
required: [],
|
|
809
|
+
optional: ['id', 'isActive', 'limit', 'offset']
|
|
810
|
+
}
|
|
811
|
+
};
|
|
812
|
+
function createResourceParams$4(config) {
|
|
813
|
+
const resourceParams = {
|
|
814
|
+
queryParams: {
|
|
815
|
+
id: config.id, isActive: config.isActive, limit: config.limit, offset: config.offset
|
|
816
|
+
}
|
|
817
|
+
};
|
|
818
|
+
return resourceParams;
|
|
819
|
+
}
|
|
820
|
+
function keyBuilder$6(luvio, config) {
|
|
821
|
+
const resourceParams = createResourceParams$4(config);
|
|
822
|
+
return keyBuilder$7(luvio, resourceParams);
|
|
823
|
+
}
|
|
824
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
825
|
+
const config = {};
|
|
826
|
+
const untrustedConfig_id = untrustedConfig.id;
|
|
827
|
+
if (typeof untrustedConfig_id === 'string') {
|
|
828
|
+
config.id = untrustedConfig_id;
|
|
829
|
+
}
|
|
830
|
+
const untrustedConfig_isActive = untrustedConfig.isActive;
|
|
831
|
+
if (typeof untrustedConfig_isActive === 'boolean') {
|
|
832
|
+
config.isActive = untrustedConfig_isActive;
|
|
833
|
+
}
|
|
834
|
+
const untrustedConfig_limit = untrustedConfig.limit;
|
|
835
|
+
if (typeof untrustedConfig_limit === 'number' && Math.floor(untrustedConfig_limit) === untrustedConfig_limit) {
|
|
836
|
+
config.limit = untrustedConfig_limit;
|
|
837
|
+
}
|
|
838
|
+
const untrustedConfig_offset = untrustedConfig.offset;
|
|
839
|
+
if (typeof untrustedConfig_offset === 'number' && Math.floor(untrustedConfig_offset) === untrustedConfig_offset) {
|
|
840
|
+
config.offset = untrustedConfig_offset;
|
|
841
|
+
}
|
|
842
|
+
return config;
|
|
843
|
+
}
|
|
844
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
845
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
846
|
+
return null;
|
|
847
|
+
}
|
|
848
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
849
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
850
|
+
}
|
|
851
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
852
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
853
|
+
return null;
|
|
854
|
+
}
|
|
855
|
+
return config;
|
|
856
|
+
}
|
|
857
|
+
function adapterFragment$2(luvio, config) {
|
|
858
|
+
createResourceParams$4(config);
|
|
859
|
+
return select$c();
|
|
860
|
+
}
|
|
861
|
+
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
862
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
863
|
+
config,
|
|
864
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
865
|
+
});
|
|
866
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
867
|
+
}
|
|
868
|
+
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
869
|
+
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
870
|
+
config,
|
|
871
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
872
|
+
});
|
|
873
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
874
|
+
}
|
|
875
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
876
|
+
const resourceParams = createResourceParams$4(config);
|
|
877
|
+
const request = createResourceRequest$4(resourceParams);
|
|
878
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
879
|
+
.then((response) => {
|
|
880
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => getResponseCacheKeys$4(luvio, resourceParams, response.body));
|
|
881
|
+
}, (response) => {
|
|
882
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
883
|
+
});
|
|
884
|
+
}
|
|
885
|
+
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
886
|
+
const { luvio, config } = context;
|
|
887
|
+
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
888
|
+
const dispatchOptions = {
|
|
889
|
+
resourceRequestContext: {
|
|
890
|
+
requestCorrelator,
|
|
891
|
+
luvioRequestMethod: undefined,
|
|
892
|
+
},
|
|
893
|
+
eventObservers
|
|
894
|
+
};
|
|
895
|
+
if (networkPriority !== 'normal') {
|
|
896
|
+
dispatchOptions.overrides = {
|
|
897
|
+
priority: networkPriority
|
|
898
|
+
};
|
|
899
|
+
}
|
|
900
|
+
return buildNetworkSnapshot$4(luvio, config, dispatchOptions);
|
|
901
|
+
}
|
|
902
|
+
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
903
|
+
const { luvio, config } = context;
|
|
904
|
+
const selector = {
|
|
905
|
+
recordId: keyBuilder$6(luvio, config),
|
|
906
|
+
node: adapterFragment$2(luvio, config),
|
|
907
|
+
variables: {},
|
|
908
|
+
};
|
|
909
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
910
|
+
config,
|
|
911
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
912
|
+
});
|
|
913
|
+
return cacheSnapshot;
|
|
914
|
+
}
|
|
915
|
+
const getActionableListDefinitionsAdapterFactory = (luvio) => function actionablelist__getActionableListDefinitions(untrustedConfig, requestContext) {
|
|
916
|
+
const config = validateAdapterConfig$4(untrustedConfig, getActionableListDefinitions_ConfigPropertyNames);
|
|
917
|
+
// Invalid or incomplete config
|
|
918
|
+
if (config === null) {
|
|
919
|
+
return null;
|
|
920
|
+
}
|
|
921
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
922
|
+
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
923
|
+
};
|
|
924
|
+
|
|
925
|
+
function validate$a(obj, path = 'ActionableListDefinitionCreateInputRepresentation') {
|
|
926
|
+
const v_error = (() => {
|
|
927
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
928
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
929
|
+
}
|
|
930
|
+
const obj_developerName = obj.developerName;
|
|
931
|
+
const path_developerName = path + '.developerName';
|
|
932
|
+
if (typeof obj_developerName !== 'string') {
|
|
933
|
+
return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
|
|
934
|
+
}
|
|
935
|
+
const obj_label = obj.label;
|
|
936
|
+
const path_label = path + '.label';
|
|
937
|
+
if (typeof obj_label !== 'string') {
|
|
938
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
939
|
+
}
|
|
940
|
+
const obj_objectName = obj.objectName;
|
|
941
|
+
const path_objectName = path + '.objectName';
|
|
942
|
+
if (typeof obj_objectName !== 'string') {
|
|
943
|
+
return new TypeError('Expected "string" but received "' + typeof obj_objectName + '" (at "' + path_objectName + '")');
|
|
944
|
+
}
|
|
945
|
+
})();
|
|
946
|
+
return v_error === undefined ? null : v_error;
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
const VERSION$7 = "c011e92d9100cd54f4f75b6951999c39";
|
|
950
|
+
function validate$9(obj, path = 'ActionableListDefinitionStatusOutputRepresentation') {
|
|
951
|
+
const v_error = (() => {
|
|
952
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
953
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
954
|
+
}
|
|
955
|
+
const obj_code = obj.code;
|
|
956
|
+
const path_code = path + '.code';
|
|
957
|
+
if (typeof obj_code !== 'number' || (typeof obj_code === 'number' && Math.floor(obj_code) !== obj_code)) {
|
|
958
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_code + '" (at "' + path_code + '")');
|
|
959
|
+
}
|
|
960
|
+
const obj_message = obj.message;
|
|
961
|
+
const path_message = path + '.message';
|
|
962
|
+
if (typeof obj_message !== 'string') {
|
|
963
|
+
return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
|
|
964
|
+
}
|
|
965
|
+
})();
|
|
966
|
+
return v_error === undefined ? null : v_error;
|
|
967
|
+
}
|
|
968
|
+
const select$b = function ActionableListDefinitionStatusOutputRepresentationSelect() {
|
|
969
|
+
return {
|
|
970
|
+
kind: 'Fragment',
|
|
971
|
+
version: VERSION$7,
|
|
972
|
+
private: [],
|
|
973
|
+
selections: [
|
|
974
|
+
{
|
|
975
|
+
name: 'code',
|
|
976
|
+
kind: 'Scalar'
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
name: 'message',
|
|
980
|
+
kind: 'Scalar'
|
|
981
|
+
}
|
|
982
|
+
]
|
|
983
|
+
};
|
|
984
|
+
};
|
|
985
|
+
function equals$7(existing, incoming) {
|
|
986
|
+
const existing_code = existing.code;
|
|
987
|
+
const incoming_code = incoming.code;
|
|
988
|
+
if (!(existing_code === incoming_code)) {
|
|
989
|
+
return false;
|
|
990
|
+
}
|
|
991
|
+
const existing_message = existing.message;
|
|
992
|
+
const incoming_message = incoming.message;
|
|
993
|
+
if (!(existing_message === incoming_message)) {
|
|
994
|
+
return false;
|
|
995
|
+
}
|
|
996
|
+
return true;
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
const TTL$3 = 100;
|
|
1000
|
+
const VERSION$6 = "7f7f8555df2466c8cbc7878266c1decd";
|
|
1001
|
+
function validate$8(obj, path = 'ActionableListDefinitionCreateOutputRepresentation') {
|
|
1002
|
+
const v_error = (() => {
|
|
1003
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1004
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1005
|
+
}
|
|
1006
|
+
const obj_actionableListDefinition = obj.actionableListDefinition;
|
|
1007
|
+
const path_actionableListDefinition = path + '.actionableListDefinition';
|
|
1008
|
+
const referencepath_actionableListDefinitionValidationError = validate$c(obj_actionableListDefinition, path_actionableListDefinition);
|
|
1009
|
+
if (referencepath_actionableListDefinitionValidationError !== null) {
|
|
1010
|
+
let message = 'Object doesn\'t match ActionableListDefinitionOutputRepresentation (at "' + path_actionableListDefinition + '")\n';
|
|
1011
|
+
message += referencepath_actionableListDefinitionValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1012
|
+
return new TypeError(message);
|
|
1013
|
+
}
|
|
1014
|
+
const obj_status = obj.status;
|
|
1015
|
+
const path_status = path + '.status';
|
|
1016
|
+
const referencepath_statusValidationError = validate$9(obj_status, path_status);
|
|
1017
|
+
if (referencepath_statusValidationError !== null) {
|
|
1018
|
+
let message = 'Object doesn\'t match ActionableListDefinitionStatusOutputRepresentation (at "' + path_status + '")\n';
|
|
1019
|
+
message += referencepath_statusValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1020
|
+
return new TypeError(message);
|
|
1021
|
+
}
|
|
1022
|
+
})();
|
|
1023
|
+
return v_error === undefined ? null : v_error;
|
|
1024
|
+
}
|
|
1025
|
+
const RepresentationType$3 = 'ActionableListDefinitionCreateOutputRepresentation';
|
|
1026
|
+
function keyBuilder$5(luvio, config) {
|
|
1027
|
+
return keyPrefix + '::' + RepresentationType$3 + ':' + config.id;
|
|
1028
|
+
}
|
|
1029
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
1030
|
+
const keyParams = {
|
|
1031
|
+
id: object.actionableListDefinition.id
|
|
1032
|
+
};
|
|
1033
|
+
return keyBuilder$5(luvio, keyParams);
|
|
1034
|
+
}
|
|
1035
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
1036
|
+
return input;
|
|
1037
|
+
}
|
|
1038
|
+
const select$a = function ActionableListDefinitionCreateOutputRepresentationSelect() {
|
|
1039
|
+
const { selections: ActionableListDefinitionOutputRepresentation__selections, opaque: ActionableListDefinitionOutputRepresentation__opaque, } = select$e();
|
|
1040
|
+
const { selections: ActionableListDefinitionStatusOutputRepresentation__selections, opaque: ActionableListDefinitionStatusOutputRepresentation__opaque, } = select$b();
|
|
1041
|
+
return {
|
|
1042
|
+
kind: 'Fragment',
|
|
1043
|
+
version: VERSION$6,
|
|
1044
|
+
private: [],
|
|
1045
|
+
selections: [
|
|
1046
|
+
{
|
|
1047
|
+
name: 'actionableListDefinition',
|
|
1048
|
+
kind: 'Object',
|
|
1049
|
+
selections: ActionableListDefinitionOutputRepresentation__selections
|
|
1050
|
+
},
|
|
1051
|
+
{
|
|
1052
|
+
name: 'status',
|
|
1053
|
+
kind: 'Object',
|
|
1054
|
+
selections: ActionableListDefinitionStatusOutputRepresentation__selections
|
|
1055
|
+
}
|
|
1056
|
+
]
|
|
1057
|
+
};
|
|
1058
|
+
};
|
|
1059
|
+
function equals$6(existing, incoming) {
|
|
1060
|
+
const existing_actionableListDefinition = existing.actionableListDefinition;
|
|
1061
|
+
const incoming_actionableListDefinition = incoming.actionableListDefinition;
|
|
1062
|
+
if (!(equals$9(existing_actionableListDefinition, incoming_actionableListDefinition))) {
|
|
1063
|
+
return false;
|
|
1064
|
+
}
|
|
1065
|
+
const existing_status = existing.status;
|
|
1066
|
+
const incoming_status = incoming.status;
|
|
1067
|
+
if (!(equals$7(existing_status, incoming_status))) {
|
|
1068
|
+
return false;
|
|
1069
|
+
}
|
|
1070
|
+
return true;
|
|
1071
|
+
}
|
|
1072
|
+
const ingest$3 = function ActionableListDefinitionCreateOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1073
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1074
|
+
const validateError = validate$8(input);
|
|
1075
|
+
if (validateError !== null) {
|
|
1076
|
+
throw validateError;
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
1080
|
+
const existingRecord = store.readEntry(key);
|
|
1081
|
+
const ttlToUse = TTL$3;
|
|
1082
|
+
let incomingRecord = normalize$3(input, store.readEntry(key), {
|
|
1083
|
+
fullPath: key,
|
|
1084
|
+
parent: path.parent,
|
|
1085
|
+
propertyName: path.propertyName,
|
|
1086
|
+
ttl: ttlToUse
|
|
1087
|
+
});
|
|
1088
|
+
if (existingRecord === undefined || equals$6(existingRecord, incomingRecord) === false) {
|
|
1089
|
+
luvio.storePublish(key, incomingRecord);
|
|
1090
|
+
}
|
|
1091
|
+
{
|
|
1092
|
+
const storeMetadataParams = {
|
|
1093
|
+
ttl: ttlToUse,
|
|
1094
|
+
namespace: "actionablelist",
|
|
1095
|
+
version: VERSION$6,
|
|
1096
|
+
representationName: RepresentationType$3,
|
|
1097
|
+
};
|
|
1098
|
+
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
1099
|
+
}
|
|
1100
|
+
return createLink(key);
|
|
1101
|
+
};
|
|
1102
|
+
function getTypeCacheKeys$3(luvio, input, fullPathFactory) {
|
|
1103
|
+
const rootKeySet = new StoreKeyMap();
|
|
1104
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1105
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
1106
|
+
rootKeySet.set(rootKey, {
|
|
1107
|
+
namespace: keyPrefix,
|
|
1108
|
+
representationName: RepresentationType$3,
|
|
1109
|
+
mergeable: false
|
|
1110
|
+
});
|
|
1111
|
+
return rootKeySet;
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
function select$9(luvio, params) {
|
|
1115
|
+
return select$a();
|
|
1116
|
+
}
|
|
1117
|
+
function getResponseCacheKeys$3(luvio, resourceParams, response) {
|
|
1118
|
+
return getTypeCacheKeys$3(luvio, response);
|
|
1119
|
+
}
|
|
1120
|
+
function ingestSuccess$3(luvio, resourceParams, response) {
|
|
1121
|
+
const { body } = response;
|
|
1122
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
1123
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
1124
|
+
const snapshot = luvio.storeLookup({
|
|
1125
|
+
recordId: key,
|
|
1126
|
+
node: select$9(),
|
|
1127
|
+
variables: {},
|
|
1128
|
+
});
|
|
1129
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1130
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1131
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
return snapshot;
|
|
1135
|
+
}
|
|
1136
|
+
function createResourceRequest$3(config) {
|
|
1137
|
+
const headers = {};
|
|
1138
|
+
return {
|
|
1139
|
+
baseUri: '/services/data/v58.0',
|
|
1140
|
+
basePath: '/connect/actionable-list-definition',
|
|
1141
|
+
method: 'post',
|
|
1142
|
+
body: config.body,
|
|
1143
|
+
urlParams: {},
|
|
1144
|
+
queryParams: {},
|
|
1145
|
+
headers,
|
|
1146
|
+
priority: 'normal',
|
|
1147
|
+
};
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
const createActionableListDefinition_ConfigPropertyNames = {
|
|
1151
|
+
displayName: 'createActionableListDefinition',
|
|
1152
|
+
parameters: {
|
|
1153
|
+
required: ['actionableListDefinitionCreateInput'],
|
|
1154
|
+
optional: []
|
|
1155
|
+
}
|
|
1156
|
+
};
|
|
1157
|
+
function createResourceParams$3(config) {
|
|
1158
|
+
const resourceParams = {
|
|
1159
|
+
body: {
|
|
1160
|
+
actionableListDefinitionCreateInput: config.actionableListDefinitionCreateInput
|
|
1161
|
+
}
|
|
1162
|
+
};
|
|
1163
|
+
return resourceParams;
|
|
1164
|
+
}
|
|
1165
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
1166
|
+
const config = {};
|
|
1167
|
+
const untrustedConfig_actionableListDefinitionCreateInput = untrustedConfig.actionableListDefinitionCreateInput;
|
|
1168
|
+
const referenceActionableListDefinitionCreateInputRepresentationValidationError = validate$a(untrustedConfig_actionableListDefinitionCreateInput);
|
|
1169
|
+
if (referenceActionableListDefinitionCreateInputRepresentationValidationError === null) {
|
|
1170
|
+
config.actionableListDefinitionCreateInput = untrustedConfig_actionableListDefinitionCreateInput;
|
|
1171
|
+
}
|
|
1172
|
+
return config;
|
|
1173
|
+
}
|
|
1174
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
1175
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1176
|
+
return null;
|
|
1177
|
+
}
|
|
1178
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1179
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1180
|
+
}
|
|
1181
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
1182
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1183
|
+
return null;
|
|
1184
|
+
}
|
|
1185
|
+
return config;
|
|
1186
|
+
}
|
|
1187
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
1188
|
+
const resourceParams = createResourceParams$3(config);
|
|
1189
|
+
const request = createResourceRequest$3(resourceParams);
|
|
1190
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1191
|
+
.then((response) => {
|
|
1192
|
+
return luvio.handleSuccessResponse(() => {
|
|
1193
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response);
|
|
1194
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1195
|
+
}, () => getResponseCacheKeys$3(luvio, resourceParams, response.body));
|
|
1196
|
+
}, (response) => {
|
|
1197
|
+
deepFreeze(response);
|
|
1198
|
+
throw response;
|
|
1199
|
+
});
|
|
1200
|
+
}
|
|
1201
|
+
const createActionableListDefinitionAdapterFactory = (luvio) => {
|
|
1202
|
+
return function createActionableListDefinition(untrustedConfig) {
|
|
1203
|
+
const config = validateAdapterConfig$3(untrustedConfig, createActionableListDefinition_ConfigPropertyNames);
|
|
1204
|
+
// Invalid or incomplete config
|
|
1205
|
+
if (config === null) {
|
|
1206
|
+
throw new Error('Invalid config for "createActionableListDefinition"');
|
|
1207
|
+
}
|
|
1208
|
+
return buildNetworkSnapshot$3(luvio, config);
|
|
1209
|
+
};
|
|
1210
|
+
};
|
|
1211
|
+
|
|
1212
|
+
const TTL$2 = 100;
|
|
1213
|
+
const VERSION$5 = "6ddedf71126866b776255aa167159b36";
|
|
1214
|
+
function validate$7(obj, path = 'ActionableListMembersOutputRepresentation') {
|
|
1215
|
+
const v_error = (() => {
|
|
1216
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1217
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1218
|
+
}
|
|
1219
|
+
const obj_memberIds = obj.memberIds;
|
|
1220
|
+
const path_memberIds = path + '.memberIds';
|
|
1221
|
+
if (!ArrayIsArray(obj_memberIds)) {
|
|
1222
|
+
return new TypeError('Expected "array" but received "' + typeof obj_memberIds + '" (at "' + path_memberIds + '")');
|
|
1223
|
+
}
|
|
1224
|
+
for (let i = 0; i < obj_memberIds.length; i++) {
|
|
1225
|
+
const obj_memberIds_item = obj_memberIds[i];
|
|
1226
|
+
const path_memberIds_item = path_memberIds + '[' + i + ']';
|
|
1227
|
+
if (typeof obj_memberIds_item !== 'string') {
|
|
1228
|
+
return new TypeError('Expected "string" but received "' + typeof obj_memberIds_item + '" (at "' + path_memberIds_item + '")');
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
})();
|
|
1232
|
+
return v_error === undefined ? null : v_error;
|
|
1233
|
+
}
|
|
1234
|
+
const RepresentationType$2 = 'ActionableListMembersOutputRepresentation';
|
|
1235
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
1236
|
+
return input;
|
|
1237
|
+
}
|
|
1238
|
+
const select$8 = function ActionableListMembersOutputRepresentationSelect() {
|
|
1239
|
+
return {
|
|
1240
|
+
kind: 'Fragment',
|
|
1241
|
+
version: VERSION$5,
|
|
1242
|
+
private: [],
|
|
1243
|
+
selections: [
|
|
1244
|
+
{
|
|
1245
|
+
name: 'memberIds',
|
|
1246
|
+
kind: 'Scalar',
|
|
1247
|
+
plural: true
|
|
1248
|
+
}
|
|
1249
|
+
]
|
|
1250
|
+
};
|
|
1251
|
+
};
|
|
1252
|
+
function equals$5(existing, incoming) {
|
|
1253
|
+
const existing_memberIds = existing.memberIds;
|
|
1254
|
+
const incoming_memberIds = incoming.memberIds;
|
|
1255
|
+
const equals_memberIds_items = equalsArray(existing_memberIds, incoming_memberIds, (existing_memberIds_item, incoming_memberIds_item) => {
|
|
1256
|
+
if (!(existing_memberIds_item === incoming_memberIds_item)) {
|
|
1257
|
+
return false;
|
|
1258
|
+
}
|
|
1259
|
+
});
|
|
1260
|
+
if (equals_memberIds_items === false) {
|
|
1261
|
+
return false;
|
|
1262
|
+
}
|
|
1263
|
+
return true;
|
|
1264
|
+
}
|
|
1265
|
+
const ingest$2 = function ActionableListMembersOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1266
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1267
|
+
const validateError = validate$7(input);
|
|
1268
|
+
if (validateError !== null) {
|
|
1269
|
+
throw validateError;
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
const key = path.fullPath;
|
|
1273
|
+
const existingRecord = store.readEntry(key);
|
|
1274
|
+
const ttlToUse = TTL$2;
|
|
1275
|
+
let incomingRecord = normalize$2(input, store.readEntry(key), {
|
|
1276
|
+
fullPath: key,
|
|
1277
|
+
parent: path.parent,
|
|
1278
|
+
propertyName: path.propertyName,
|
|
1279
|
+
ttl: ttlToUse
|
|
1280
|
+
});
|
|
1281
|
+
if (existingRecord === undefined || equals$5(existingRecord, incomingRecord) === false) {
|
|
1282
|
+
luvio.storePublish(key, incomingRecord);
|
|
1283
|
+
}
|
|
1284
|
+
{
|
|
1285
|
+
const storeMetadataParams = {
|
|
1286
|
+
ttl: ttlToUse,
|
|
1287
|
+
namespace: "actionablelist",
|
|
1288
|
+
version: VERSION$5,
|
|
1289
|
+
representationName: RepresentationType$2,
|
|
1290
|
+
};
|
|
1291
|
+
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
1292
|
+
}
|
|
1293
|
+
return createLink(key);
|
|
1294
|
+
};
|
|
1295
|
+
function getTypeCacheKeys$2(luvio, input, fullPathFactory) {
|
|
1296
|
+
const rootKeySet = new StoreKeyMap();
|
|
1297
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1298
|
+
const rootKey = fullPathFactory();
|
|
1299
|
+
rootKeySet.set(rootKey, {
|
|
1300
|
+
namespace: keyPrefix,
|
|
1301
|
+
representationName: RepresentationType$2,
|
|
1302
|
+
mergeable: false
|
|
1303
|
+
});
|
|
1304
|
+
return rootKeySet;
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
function select$7(luvio, params) {
|
|
1308
|
+
return select$8();
|
|
1309
|
+
}
|
|
1310
|
+
function keyBuilder$4(luvio, params) {
|
|
1311
|
+
return keyPrefix + '::ActionableListMembersOutputRepresentation:(' + 'id:' + params.urlParams.id + ')';
|
|
1312
|
+
}
|
|
1313
|
+
function getResponseCacheKeys$2(luvio, resourceParams, response) {
|
|
1314
|
+
return getTypeCacheKeys$2(luvio, response, () => keyBuilder$4(luvio, resourceParams));
|
|
1315
|
+
}
|
|
1316
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
1317
|
+
const { body } = response;
|
|
1318
|
+
const key = keyBuilder$4(luvio, resourceParams);
|
|
1319
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
1320
|
+
const snapshot = luvio.storeLookup({
|
|
1321
|
+
recordId: key,
|
|
1322
|
+
node: select$7(),
|
|
1323
|
+
variables: {},
|
|
1324
|
+
}, snapshotRefresh);
|
|
1325
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1326
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1327
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
return snapshot;
|
|
1331
|
+
}
|
|
1332
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
1333
|
+
const key = keyBuilder$4(luvio, params);
|
|
1334
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1335
|
+
const storeMetadataParams = {
|
|
1336
|
+
ttl: TTL$2,
|
|
1337
|
+
namespace: keyPrefix,
|
|
1338
|
+
version: VERSION$5,
|
|
1339
|
+
representationName: RepresentationType$2
|
|
1340
|
+
};
|
|
1341
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1342
|
+
return errorSnapshot;
|
|
1343
|
+
}
|
|
1344
|
+
function createResourceRequest$2(config) {
|
|
1345
|
+
const headers = {};
|
|
1346
|
+
return {
|
|
1347
|
+
baseUri: '/services/data/v58.0',
|
|
1348
|
+
basePath: '/connect/actionable-list/' + config.urlParams.id + '/members',
|
|
1349
|
+
method: 'get',
|
|
1350
|
+
body: null,
|
|
1351
|
+
urlParams: config.urlParams,
|
|
1352
|
+
queryParams: {},
|
|
1353
|
+
headers,
|
|
1354
|
+
priority: 'normal',
|
|
1355
|
+
};
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
const getActionableListMembers_ConfigPropertyNames = {
|
|
1359
|
+
displayName: 'getActionableListMembers',
|
|
1360
|
+
parameters: {
|
|
1361
|
+
required: ['id'],
|
|
1362
|
+
optional: []
|
|
1363
|
+
}
|
|
1364
|
+
};
|
|
1365
|
+
function createResourceParams$2(config) {
|
|
1366
|
+
const resourceParams = {
|
|
1367
|
+
urlParams: {
|
|
1368
|
+
id: config.id
|
|
1369
|
+
}
|
|
1370
|
+
};
|
|
1371
|
+
return resourceParams;
|
|
1372
|
+
}
|
|
1373
|
+
function keyBuilder$3(luvio, config) {
|
|
1374
|
+
const resourceParams = createResourceParams$2(config);
|
|
1375
|
+
return keyBuilder$4(luvio, resourceParams);
|
|
1376
|
+
}
|
|
1377
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
1378
|
+
const config = {};
|
|
1379
|
+
const untrustedConfig_id = untrustedConfig.id;
|
|
1380
|
+
if (typeof untrustedConfig_id === 'string') {
|
|
1381
|
+
config.id = untrustedConfig_id;
|
|
1382
|
+
}
|
|
1383
|
+
return config;
|
|
1384
|
+
}
|
|
1385
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
1386
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1387
|
+
return null;
|
|
1388
|
+
}
|
|
1389
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1390
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1391
|
+
}
|
|
1392
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
1393
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1394
|
+
return null;
|
|
1395
|
+
}
|
|
1396
|
+
return config;
|
|
1397
|
+
}
|
|
1398
|
+
function adapterFragment$1(luvio, config) {
|
|
1399
|
+
createResourceParams$2(config);
|
|
1400
|
+
return select$7();
|
|
1401
|
+
}
|
|
1402
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
1403
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
1404
|
+
config,
|
|
1405
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1406
|
+
});
|
|
1407
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1408
|
+
}
|
|
1409
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
1410
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
1411
|
+
config,
|
|
1412
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1413
|
+
});
|
|
1414
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1415
|
+
}
|
|
1416
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
1417
|
+
const resourceParams = createResourceParams$2(config);
|
|
1418
|
+
const request = createResourceRequest$2(resourceParams);
|
|
1419
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1420
|
+
.then((response) => {
|
|
1421
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => getResponseCacheKeys$2(luvio, resourceParams, response.body));
|
|
1422
|
+
}, (response) => {
|
|
1423
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
1424
|
+
});
|
|
1425
|
+
}
|
|
1426
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
1427
|
+
const { luvio, config } = context;
|
|
1428
|
+
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
1429
|
+
const dispatchOptions = {
|
|
1430
|
+
resourceRequestContext: {
|
|
1431
|
+
requestCorrelator,
|
|
1432
|
+
luvioRequestMethod: undefined,
|
|
1433
|
+
},
|
|
1434
|
+
eventObservers
|
|
1435
|
+
};
|
|
1436
|
+
if (networkPriority !== 'normal') {
|
|
1437
|
+
dispatchOptions.overrides = {
|
|
1438
|
+
priority: networkPriority
|
|
1439
|
+
};
|
|
1440
|
+
}
|
|
1441
|
+
return buildNetworkSnapshot$2(luvio, config, dispatchOptions);
|
|
1442
|
+
}
|
|
1443
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
1444
|
+
const { luvio, config } = context;
|
|
1445
|
+
const selector = {
|
|
1446
|
+
recordId: keyBuilder$3(luvio, config),
|
|
1447
|
+
node: adapterFragment$1(luvio, config),
|
|
1448
|
+
variables: {},
|
|
1449
|
+
};
|
|
1450
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1451
|
+
config,
|
|
1452
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
1453
|
+
});
|
|
1454
|
+
return cacheSnapshot;
|
|
1455
|
+
}
|
|
1456
|
+
const getActionableListMembersAdapterFactory = (luvio) => function actionablelist__getActionableListMembers(untrustedConfig, requestContext) {
|
|
1457
|
+
const config = validateAdapterConfig$2(untrustedConfig, getActionableListMembers_ConfigPropertyNames);
|
|
1458
|
+
// Invalid or incomplete config
|
|
1459
|
+
if (config === null) {
|
|
1460
|
+
return null;
|
|
1461
|
+
}
|
|
1462
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1463
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
1464
|
+
};
|
|
1465
|
+
|
|
1466
|
+
function validate$6(obj, path = 'ActionableListUpsertInputRepresentation') {
|
|
1467
|
+
const v_error = (() => {
|
|
1468
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1469
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1470
|
+
}
|
|
1471
|
+
if (obj.actionableListColumns !== undefined) {
|
|
1472
|
+
const obj_actionableListColumns = obj.actionableListColumns;
|
|
1473
|
+
const path_actionableListColumns = path + '.actionableListColumns';
|
|
1474
|
+
if (!ArrayIsArray(obj_actionableListColumns)) {
|
|
1475
|
+
return new TypeError('Expected "array" but received "' + typeof obj_actionableListColumns + '" (at "' + path_actionableListColumns + '")');
|
|
1476
|
+
}
|
|
1477
|
+
for (let i = 0; i < obj_actionableListColumns.length; i++) {
|
|
1478
|
+
const obj_actionableListColumns_item = obj_actionableListColumns[i];
|
|
1479
|
+
const path_actionableListColumns_item = path_actionableListColumns + '[' + i + ']';
|
|
1480
|
+
if (typeof obj_actionableListColumns_item !== 'string') {
|
|
1481
|
+
return new TypeError('Expected "string" but received "' + typeof obj_actionableListColumns_item + '" (at "' + path_actionableListColumns_item + '")');
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
if (obj.actionableListDefinitionId !== undefined) {
|
|
1486
|
+
const obj_actionableListDefinitionId = obj.actionableListDefinitionId;
|
|
1487
|
+
const path_actionableListDefinitionId = path + '.actionableListDefinitionId';
|
|
1488
|
+
let obj_actionableListDefinitionId_union0 = null;
|
|
1489
|
+
const obj_actionableListDefinitionId_union0_error = (() => {
|
|
1490
|
+
if (typeof obj_actionableListDefinitionId !== 'string') {
|
|
1491
|
+
return new TypeError('Expected "string" but received "' + typeof obj_actionableListDefinitionId + '" (at "' + path_actionableListDefinitionId + '")');
|
|
1492
|
+
}
|
|
1493
|
+
})();
|
|
1494
|
+
if (obj_actionableListDefinitionId_union0_error != null) {
|
|
1495
|
+
obj_actionableListDefinitionId_union0 = obj_actionableListDefinitionId_union0_error.message;
|
|
1496
|
+
}
|
|
1497
|
+
let obj_actionableListDefinitionId_union1 = null;
|
|
1498
|
+
const obj_actionableListDefinitionId_union1_error = (() => {
|
|
1499
|
+
if (obj_actionableListDefinitionId !== null) {
|
|
1500
|
+
return new TypeError('Expected "null" but received "' + typeof obj_actionableListDefinitionId + '" (at "' + path_actionableListDefinitionId + '")');
|
|
1501
|
+
}
|
|
1502
|
+
})();
|
|
1503
|
+
if (obj_actionableListDefinitionId_union1_error != null) {
|
|
1504
|
+
obj_actionableListDefinitionId_union1 = obj_actionableListDefinitionId_union1_error.message;
|
|
1505
|
+
}
|
|
1506
|
+
if (obj_actionableListDefinitionId_union0 && obj_actionableListDefinitionId_union1) {
|
|
1507
|
+
let message = 'Object doesn\'t match union (at "' + path_actionableListDefinitionId + '")';
|
|
1508
|
+
message += '\n' + obj_actionableListDefinitionId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1509
|
+
message += '\n' + obj_actionableListDefinitionId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1510
|
+
return new TypeError(message);
|
|
1511
|
+
}
|
|
1512
|
+
}
|
|
1513
|
+
if (obj.actionableListMemberIds !== undefined) {
|
|
1514
|
+
const obj_actionableListMemberIds = obj.actionableListMemberIds;
|
|
1515
|
+
const path_actionableListMemberIds = path + '.actionableListMemberIds';
|
|
1516
|
+
if (!ArrayIsArray(obj_actionableListMemberIds)) {
|
|
1517
|
+
return new TypeError('Expected "array" but received "' + typeof obj_actionableListMemberIds + '" (at "' + path_actionableListMemberIds + '")');
|
|
1518
|
+
}
|
|
1519
|
+
for (let i = 0; i < obj_actionableListMemberIds.length; i++) {
|
|
1520
|
+
const obj_actionableListMemberIds_item = obj_actionableListMemberIds[i];
|
|
1521
|
+
const path_actionableListMemberIds_item = path_actionableListMemberIds + '[' + i + ']';
|
|
1522
|
+
if (typeof obj_actionableListMemberIds_item !== 'string') {
|
|
1523
|
+
return new TypeError('Expected "string" but received "' + typeof obj_actionableListMemberIds_item + '" (at "' + path_actionableListMemberIds_item + '")');
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
if (obj.defaultMemberStatusId !== undefined) {
|
|
1528
|
+
const obj_defaultMemberStatusId = obj.defaultMemberStatusId;
|
|
1529
|
+
const path_defaultMemberStatusId = path + '.defaultMemberStatusId';
|
|
1530
|
+
let obj_defaultMemberStatusId_union0 = null;
|
|
1531
|
+
const obj_defaultMemberStatusId_union0_error = (() => {
|
|
1532
|
+
if (typeof obj_defaultMemberStatusId !== 'string') {
|
|
1533
|
+
return new TypeError('Expected "string" but received "' + typeof obj_defaultMemberStatusId + '" (at "' + path_defaultMemberStatusId + '")');
|
|
1534
|
+
}
|
|
1535
|
+
})();
|
|
1536
|
+
if (obj_defaultMemberStatusId_union0_error != null) {
|
|
1537
|
+
obj_defaultMemberStatusId_union0 = obj_defaultMemberStatusId_union0_error.message;
|
|
1538
|
+
}
|
|
1539
|
+
let obj_defaultMemberStatusId_union1 = null;
|
|
1540
|
+
const obj_defaultMemberStatusId_union1_error = (() => {
|
|
1541
|
+
if (obj_defaultMemberStatusId !== null) {
|
|
1542
|
+
return new TypeError('Expected "null" but received "' + typeof obj_defaultMemberStatusId + '" (at "' + path_defaultMemberStatusId + '")');
|
|
1543
|
+
}
|
|
1544
|
+
})();
|
|
1545
|
+
if (obj_defaultMemberStatusId_union1_error != null) {
|
|
1546
|
+
obj_defaultMemberStatusId_union1 = obj_defaultMemberStatusId_union1_error.message;
|
|
1547
|
+
}
|
|
1548
|
+
if (obj_defaultMemberStatusId_union0 && obj_defaultMemberStatusId_union1) {
|
|
1549
|
+
let message = 'Object doesn\'t match union (at "' + path_defaultMemberStatusId + '")';
|
|
1550
|
+
message += '\n' + obj_defaultMemberStatusId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1551
|
+
message += '\n' + obj_defaultMemberStatusId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1552
|
+
return new TypeError(message);
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
if (obj.description !== undefined) {
|
|
1556
|
+
const obj_description = obj.description;
|
|
1557
|
+
const path_description = path + '.description';
|
|
1558
|
+
let obj_description_union0 = null;
|
|
1559
|
+
const obj_description_union0_error = (() => {
|
|
1560
|
+
if (typeof obj_description !== 'string') {
|
|
1561
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1562
|
+
}
|
|
1563
|
+
})();
|
|
1564
|
+
if (obj_description_union0_error != null) {
|
|
1565
|
+
obj_description_union0 = obj_description_union0_error.message;
|
|
1566
|
+
}
|
|
1567
|
+
let obj_description_union1 = null;
|
|
1568
|
+
const obj_description_union1_error = (() => {
|
|
1569
|
+
if (obj_description !== null) {
|
|
1570
|
+
return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
1571
|
+
}
|
|
1572
|
+
})();
|
|
1573
|
+
if (obj_description_union1_error != null) {
|
|
1574
|
+
obj_description_union1 = obj_description_union1_error.message;
|
|
1575
|
+
}
|
|
1576
|
+
if (obj_description_union0 && obj_description_union1) {
|
|
1577
|
+
let message = 'Object doesn\'t match union (at "' + path_description + '")';
|
|
1578
|
+
message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1579
|
+
message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1580
|
+
return new TypeError(message);
|
|
1581
|
+
}
|
|
1582
|
+
}
|
|
1583
|
+
if (obj.filterLogic !== undefined) {
|
|
1584
|
+
const obj_filterLogic = obj.filterLogic;
|
|
1585
|
+
const path_filterLogic = path + '.filterLogic';
|
|
1586
|
+
if (typeof obj_filterLogic !== 'string') {
|
|
1587
|
+
return new TypeError('Expected "string" but received "' + typeof obj_filterLogic + '" (at "' + path_filterLogic + '")');
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
if (obj.filters !== undefined) {
|
|
1591
|
+
const obj_filters = obj.filters;
|
|
1592
|
+
const path_filters = path + '.filters';
|
|
1593
|
+
if (typeof obj_filters !== 'object' || ArrayIsArray(obj_filters) || obj_filters === null) {
|
|
1594
|
+
return new TypeError('Expected "object" but received "' + typeof obj_filters + '" (at "' + path_filters + '")');
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
if (obj.id !== undefined) {
|
|
1598
|
+
const obj_id = obj.id;
|
|
1599
|
+
const path_id = path + '.id';
|
|
1600
|
+
let obj_id_union0 = null;
|
|
1601
|
+
const obj_id_union0_error = (() => {
|
|
1602
|
+
if (typeof obj_id !== 'string') {
|
|
1603
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1604
|
+
}
|
|
1605
|
+
})();
|
|
1606
|
+
if (obj_id_union0_error != null) {
|
|
1607
|
+
obj_id_union0 = obj_id_union0_error.message;
|
|
1608
|
+
}
|
|
1609
|
+
let obj_id_union1 = null;
|
|
1610
|
+
const obj_id_union1_error = (() => {
|
|
1611
|
+
if (obj_id !== null) {
|
|
1612
|
+
return new TypeError('Expected "null" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1613
|
+
}
|
|
1614
|
+
})();
|
|
1615
|
+
if (obj_id_union1_error != null) {
|
|
1616
|
+
obj_id_union1 = obj_id_union1_error.message;
|
|
1617
|
+
}
|
|
1618
|
+
if (obj_id_union0 && obj_id_union1) {
|
|
1619
|
+
let message = 'Object doesn\'t match union (at "' + path_id + '")';
|
|
1620
|
+
message += '\n' + obj_id_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1621
|
+
message += '\n' + obj_id_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1622
|
+
return new TypeError(message);
|
|
1623
|
+
}
|
|
1624
|
+
}
|
|
1625
|
+
if (obj.isAsync !== undefined) {
|
|
1626
|
+
const obj_isAsync = obj.isAsync;
|
|
1627
|
+
const path_isAsync = path + '.isAsync';
|
|
1628
|
+
if (typeof obj_isAsync !== 'boolean') {
|
|
1629
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isAsync + '" (at "' + path_isAsync + '")');
|
|
1630
|
+
}
|
|
1631
|
+
}
|
|
1632
|
+
if (obj.name !== undefined) {
|
|
1633
|
+
const obj_name = obj.name;
|
|
1634
|
+
const path_name = path + '.name';
|
|
1635
|
+
let obj_name_union0 = null;
|
|
1636
|
+
const obj_name_union0_error = (() => {
|
|
1637
|
+
if (typeof obj_name !== 'string') {
|
|
1638
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1639
|
+
}
|
|
1640
|
+
})();
|
|
1641
|
+
if (obj_name_union0_error != null) {
|
|
1642
|
+
obj_name_union0 = obj_name_union0_error.message;
|
|
1643
|
+
}
|
|
1644
|
+
let obj_name_union1 = null;
|
|
1645
|
+
const obj_name_union1_error = (() => {
|
|
1646
|
+
if (obj_name !== null) {
|
|
1647
|
+
return new TypeError('Expected "null" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
1648
|
+
}
|
|
1649
|
+
})();
|
|
1650
|
+
if (obj_name_union1_error != null) {
|
|
1651
|
+
obj_name_union1 = obj_name_union1_error.message;
|
|
1652
|
+
}
|
|
1653
|
+
if (obj_name_union0 && obj_name_union1) {
|
|
1654
|
+
let message = 'Object doesn\'t match union (at "' + path_name + '")';
|
|
1655
|
+
message += '\n' + obj_name_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1656
|
+
message += '\n' + obj_name_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1657
|
+
return new TypeError(message);
|
|
1658
|
+
}
|
|
1659
|
+
}
|
|
1660
|
+
if (obj.objectName !== undefined) {
|
|
1661
|
+
const obj_objectName = obj.objectName;
|
|
1662
|
+
const path_objectName = path + '.objectName';
|
|
1663
|
+
let obj_objectName_union0 = null;
|
|
1664
|
+
const obj_objectName_union0_error = (() => {
|
|
1665
|
+
if (typeof obj_objectName !== 'string') {
|
|
1666
|
+
return new TypeError('Expected "string" but received "' + typeof obj_objectName + '" (at "' + path_objectName + '")');
|
|
1667
|
+
}
|
|
1668
|
+
})();
|
|
1669
|
+
if (obj_objectName_union0_error != null) {
|
|
1670
|
+
obj_objectName_union0 = obj_objectName_union0_error.message;
|
|
1671
|
+
}
|
|
1672
|
+
let obj_objectName_union1 = null;
|
|
1673
|
+
const obj_objectName_union1_error = (() => {
|
|
1674
|
+
if (obj_objectName !== null) {
|
|
1675
|
+
return new TypeError('Expected "null" but received "' + typeof obj_objectName + '" (at "' + path_objectName + '")');
|
|
1676
|
+
}
|
|
1677
|
+
})();
|
|
1678
|
+
if (obj_objectName_union1_error != null) {
|
|
1679
|
+
obj_objectName_union1 = obj_objectName_union1_error.message;
|
|
1680
|
+
}
|
|
1681
|
+
if (obj_objectName_union0 && obj_objectName_union1) {
|
|
1682
|
+
let message = 'Object doesn\'t match union (at "' + path_objectName + '")';
|
|
1683
|
+
message += '\n' + obj_objectName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1684
|
+
message += '\n' + obj_objectName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1685
|
+
return new TypeError(message);
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
})();
|
|
1689
|
+
return v_error === undefined ? null : v_error;
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
const TTL$1 = 100;
|
|
1693
|
+
const VERSION$4 = "e644bfad74e67f4d67a107b89ef51c01";
|
|
1694
|
+
function validate$5(obj, path = 'ActionableListUpsertOutputRepresentation') {
|
|
1695
|
+
const v_error = (() => {
|
|
1696
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1697
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1698
|
+
}
|
|
1699
|
+
const obj_errorMessage = obj.errorMessage;
|
|
1700
|
+
const path_errorMessage = path + '.errorMessage';
|
|
1701
|
+
let obj_errorMessage_union0 = null;
|
|
1702
|
+
const obj_errorMessage_union0_error = (() => {
|
|
1703
|
+
if (typeof obj_errorMessage !== 'string') {
|
|
1704
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
|
|
1705
|
+
}
|
|
1706
|
+
})();
|
|
1707
|
+
if (obj_errorMessage_union0_error != null) {
|
|
1708
|
+
obj_errorMessage_union0 = obj_errorMessage_union0_error.message;
|
|
1709
|
+
}
|
|
1710
|
+
let obj_errorMessage_union1 = null;
|
|
1711
|
+
const obj_errorMessage_union1_error = (() => {
|
|
1712
|
+
if (obj_errorMessage !== null) {
|
|
1713
|
+
return new TypeError('Expected "null" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
|
|
1714
|
+
}
|
|
1715
|
+
})();
|
|
1716
|
+
if (obj_errorMessage_union1_error != null) {
|
|
1717
|
+
obj_errorMessage_union1 = obj_errorMessage_union1_error.message;
|
|
1718
|
+
}
|
|
1719
|
+
if (obj_errorMessage_union0 && obj_errorMessage_union1) {
|
|
1720
|
+
let message = 'Object doesn\'t match union (at "' + path_errorMessage + '")';
|
|
1721
|
+
message += '\n' + obj_errorMessage_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1722
|
+
message += '\n' + obj_errorMessage_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1723
|
+
return new TypeError(message);
|
|
1724
|
+
}
|
|
1725
|
+
const obj_id = obj.id;
|
|
1726
|
+
const path_id = path + '.id';
|
|
1727
|
+
let obj_id_union0 = null;
|
|
1728
|
+
const obj_id_union0_error = (() => {
|
|
1729
|
+
if (typeof obj_id !== 'string') {
|
|
1730
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1731
|
+
}
|
|
1732
|
+
})();
|
|
1733
|
+
if (obj_id_union0_error != null) {
|
|
1734
|
+
obj_id_union0 = obj_id_union0_error.message;
|
|
1735
|
+
}
|
|
1736
|
+
let obj_id_union1 = null;
|
|
1737
|
+
const obj_id_union1_error = (() => {
|
|
1738
|
+
if (obj_id !== null) {
|
|
1739
|
+
return new TypeError('Expected "null" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
1740
|
+
}
|
|
1741
|
+
})();
|
|
1742
|
+
if (obj_id_union1_error != null) {
|
|
1743
|
+
obj_id_union1 = obj_id_union1_error.message;
|
|
1744
|
+
}
|
|
1745
|
+
if (obj_id_union0 && obj_id_union1) {
|
|
1746
|
+
let message = 'Object doesn\'t match union (at "' + path_id + '")';
|
|
1747
|
+
message += '\n' + obj_id_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1748
|
+
message += '\n' + obj_id_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1749
|
+
return new TypeError(message);
|
|
1750
|
+
}
|
|
1751
|
+
const obj_isSuccess = obj.isSuccess;
|
|
1752
|
+
const path_isSuccess = path + '.isSuccess';
|
|
1753
|
+
let obj_isSuccess_union0 = null;
|
|
1754
|
+
const obj_isSuccess_union0_error = (() => {
|
|
1755
|
+
if (typeof obj_isSuccess !== 'string') {
|
|
1756
|
+
return new TypeError('Expected "string" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
|
|
1757
|
+
}
|
|
1758
|
+
})();
|
|
1759
|
+
if (obj_isSuccess_union0_error != null) {
|
|
1760
|
+
obj_isSuccess_union0 = obj_isSuccess_union0_error.message;
|
|
1761
|
+
}
|
|
1762
|
+
let obj_isSuccess_union1 = null;
|
|
1763
|
+
const obj_isSuccess_union1_error = (() => {
|
|
1764
|
+
if (obj_isSuccess !== null) {
|
|
1765
|
+
return new TypeError('Expected "null" but received "' + typeof obj_isSuccess + '" (at "' + path_isSuccess + '")');
|
|
1766
|
+
}
|
|
1767
|
+
})();
|
|
1768
|
+
if (obj_isSuccess_union1_error != null) {
|
|
1769
|
+
obj_isSuccess_union1 = obj_isSuccess_union1_error.message;
|
|
1770
|
+
}
|
|
1771
|
+
if (obj_isSuccess_union0 && obj_isSuccess_union1) {
|
|
1772
|
+
let message = 'Object doesn\'t match union (at "' + path_isSuccess + '")';
|
|
1773
|
+
message += '\n' + obj_isSuccess_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1774
|
+
message += '\n' + obj_isSuccess_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1775
|
+
return new TypeError(message);
|
|
1776
|
+
}
|
|
1777
|
+
})();
|
|
1778
|
+
return v_error === undefined ? null : v_error;
|
|
1779
|
+
}
|
|
1780
|
+
const RepresentationType$1 = 'ActionableListUpsertOutputRepresentation';
|
|
1781
|
+
function keyBuilder$2(luvio, config) {
|
|
1782
|
+
return keyPrefix + '::' + RepresentationType$1 + ':' + (config.id === null ? '' : config.id);
|
|
1783
|
+
}
|
|
1784
|
+
function keyBuilderFromType(luvio, object) {
|
|
1785
|
+
const keyParams = {
|
|
1786
|
+
id: object.id
|
|
1787
|
+
};
|
|
1788
|
+
return keyBuilder$2(luvio, keyParams);
|
|
1789
|
+
}
|
|
1790
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
1791
|
+
return input;
|
|
1792
|
+
}
|
|
1793
|
+
const select$6 = function ActionableListUpsertOutputRepresentationSelect() {
|
|
1794
|
+
return {
|
|
1795
|
+
kind: 'Fragment',
|
|
1796
|
+
version: VERSION$4,
|
|
1797
|
+
private: [],
|
|
1798
|
+
selections: [
|
|
1799
|
+
{
|
|
1800
|
+
name: 'errorMessage',
|
|
1801
|
+
kind: 'Scalar'
|
|
1802
|
+
},
|
|
1803
|
+
{
|
|
1804
|
+
name: 'id',
|
|
1805
|
+
kind: 'Scalar'
|
|
1806
|
+
},
|
|
1807
|
+
{
|
|
1808
|
+
name: 'isSuccess',
|
|
1809
|
+
kind: 'Scalar'
|
|
1810
|
+
}
|
|
1811
|
+
]
|
|
1812
|
+
};
|
|
1813
|
+
};
|
|
1814
|
+
function equals$4(existing, incoming) {
|
|
1815
|
+
const existing_errorMessage = existing.errorMessage;
|
|
1816
|
+
const incoming_errorMessage = incoming.errorMessage;
|
|
1817
|
+
if (!(existing_errorMessage === incoming_errorMessage)) {
|
|
1818
|
+
return false;
|
|
1819
|
+
}
|
|
1820
|
+
const existing_id = existing.id;
|
|
1821
|
+
const incoming_id = incoming.id;
|
|
1822
|
+
if (!(existing_id === incoming_id)) {
|
|
1823
|
+
return false;
|
|
1824
|
+
}
|
|
1825
|
+
const existing_isSuccess = existing.isSuccess;
|
|
1826
|
+
const incoming_isSuccess = incoming.isSuccess;
|
|
1827
|
+
if (!(existing_isSuccess === incoming_isSuccess)) {
|
|
1828
|
+
return false;
|
|
1829
|
+
}
|
|
1830
|
+
return true;
|
|
1831
|
+
}
|
|
1832
|
+
const ingest$1 = function ActionableListUpsertOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1833
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1834
|
+
const validateError = validate$5(input);
|
|
1835
|
+
if (validateError !== null) {
|
|
1836
|
+
throw validateError;
|
|
1837
|
+
}
|
|
1838
|
+
}
|
|
1839
|
+
const key = keyBuilderFromType(luvio, input);
|
|
1840
|
+
const existingRecord = store.readEntry(key);
|
|
1841
|
+
const ttlToUse = TTL$1;
|
|
1842
|
+
let incomingRecord = normalize$1(input, store.readEntry(key), {
|
|
1843
|
+
fullPath: key,
|
|
1844
|
+
parent: path.parent,
|
|
1845
|
+
propertyName: path.propertyName,
|
|
1846
|
+
ttl: ttlToUse
|
|
1847
|
+
});
|
|
1848
|
+
if (existingRecord === undefined || equals$4(existingRecord, incomingRecord) === false) {
|
|
1849
|
+
luvio.storePublish(key, incomingRecord);
|
|
1850
|
+
}
|
|
1851
|
+
{
|
|
1852
|
+
const storeMetadataParams = {
|
|
1853
|
+
ttl: ttlToUse,
|
|
1854
|
+
namespace: "actionablelist",
|
|
1855
|
+
version: VERSION$4,
|
|
1856
|
+
representationName: RepresentationType$1,
|
|
1857
|
+
};
|
|
1858
|
+
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
1859
|
+
}
|
|
1860
|
+
return createLink(key);
|
|
1861
|
+
};
|
|
1862
|
+
function getTypeCacheKeys$1(luvio, input, fullPathFactory) {
|
|
1863
|
+
const rootKeySet = new StoreKeyMap();
|
|
1864
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1865
|
+
const rootKey = keyBuilderFromType(luvio, input);
|
|
1866
|
+
rootKeySet.set(rootKey, {
|
|
1867
|
+
namespace: keyPrefix,
|
|
1868
|
+
representationName: RepresentationType$1,
|
|
1869
|
+
mergeable: false
|
|
1870
|
+
});
|
|
1871
|
+
return rootKeySet;
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1874
|
+
function select$5(luvio, params) {
|
|
1875
|
+
return select$6();
|
|
1876
|
+
}
|
|
1877
|
+
function getResponseCacheKeys$1(luvio, resourceParams, response) {
|
|
1878
|
+
return getTypeCacheKeys$1(luvio, response);
|
|
1879
|
+
}
|
|
1880
|
+
function ingestSuccess$1(luvio, resourceParams, response) {
|
|
1881
|
+
const { body } = response;
|
|
1882
|
+
const key = keyBuilderFromType(luvio, body);
|
|
1883
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
1884
|
+
const snapshot = luvio.storeLookup({
|
|
1885
|
+
recordId: key,
|
|
1886
|
+
node: select$5(),
|
|
1887
|
+
variables: {},
|
|
1888
|
+
});
|
|
1889
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1890
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1891
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1894
|
+
return snapshot;
|
|
1895
|
+
}
|
|
1896
|
+
function createResourceRequest$1(config) {
|
|
1897
|
+
const headers = {};
|
|
1898
|
+
return {
|
|
1899
|
+
baseUri: '/services/data/v58.0',
|
|
1900
|
+
basePath: '/connect/actionable-list',
|
|
1901
|
+
method: 'post',
|
|
1902
|
+
body: config.body,
|
|
1903
|
+
urlParams: {},
|
|
1904
|
+
queryParams: {},
|
|
1905
|
+
headers,
|
|
1906
|
+
priority: 'normal',
|
|
1907
|
+
};
|
|
1908
|
+
}
|
|
1909
|
+
|
|
1910
|
+
const upsertActionableList_ConfigPropertyNames = {
|
|
1911
|
+
displayName: 'upsertActionableList',
|
|
1912
|
+
parameters: {
|
|
1913
|
+
required: ['actionableListUpsertInput'],
|
|
1914
|
+
optional: []
|
|
1915
|
+
}
|
|
1916
|
+
};
|
|
1917
|
+
function createResourceParams$1(config) {
|
|
1918
|
+
const resourceParams = {
|
|
1919
|
+
body: {
|
|
1920
|
+
actionableListUpsertInput: config.actionableListUpsertInput
|
|
1921
|
+
}
|
|
1922
|
+
};
|
|
1923
|
+
return resourceParams;
|
|
1924
|
+
}
|
|
1925
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
1926
|
+
const config = {};
|
|
1927
|
+
const untrustedConfig_actionableListUpsertInput = untrustedConfig.actionableListUpsertInput;
|
|
1928
|
+
const referenceActionableListUpsertInputRepresentationValidationError = validate$6(untrustedConfig_actionableListUpsertInput);
|
|
1929
|
+
if (referenceActionableListUpsertInputRepresentationValidationError === null) {
|
|
1930
|
+
config.actionableListUpsertInput = untrustedConfig_actionableListUpsertInput;
|
|
1931
|
+
}
|
|
1932
|
+
return config;
|
|
1933
|
+
}
|
|
1934
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
1935
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1936
|
+
return null;
|
|
1937
|
+
}
|
|
1938
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1939
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1940
|
+
}
|
|
1941
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
1942
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1943
|
+
return null;
|
|
1944
|
+
}
|
|
1945
|
+
return config;
|
|
1946
|
+
}
|
|
1947
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
1948
|
+
const resourceParams = createResourceParams$1(config);
|
|
1949
|
+
const request = createResourceRequest$1(resourceParams);
|
|
1950
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1951
|
+
.then((response) => {
|
|
1952
|
+
return luvio.handleSuccessResponse(() => {
|
|
1953
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response);
|
|
1954
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1955
|
+
}, () => getResponseCacheKeys$1(luvio, resourceParams, response.body));
|
|
1956
|
+
}, (response) => {
|
|
1957
|
+
deepFreeze(response);
|
|
1958
|
+
throw response;
|
|
1959
|
+
});
|
|
1960
|
+
}
|
|
1961
|
+
const upsertActionableListAdapterFactory = (luvio) => {
|
|
1962
|
+
return function upsertActionableList(untrustedConfig) {
|
|
1963
|
+
const config = validateAdapterConfig$1(untrustedConfig, upsertActionableList_ConfigPropertyNames);
|
|
1964
|
+
// Invalid or incomplete config
|
|
1965
|
+
if (config === null) {
|
|
1966
|
+
throw new Error('Invalid config for "upsertActionableList"');
|
|
1967
|
+
}
|
|
1968
|
+
return buildNetworkSnapshot$1(luvio, config);
|
|
1969
|
+
};
|
|
1970
|
+
};
|
|
1971
|
+
|
|
1972
|
+
function validate$4(obj, path = 'ActionableListDatasetInputRepresentation') {
|
|
1973
|
+
const v_error = (() => {
|
|
1974
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1975
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1976
|
+
}
|
|
1977
|
+
if (obj.actionableListDefinitionId !== undefined) {
|
|
1978
|
+
const obj_actionableListDefinitionId = obj.actionableListDefinitionId;
|
|
1979
|
+
const path_actionableListDefinitionId = path + '.actionableListDefinitionId';
|
|
1980
|
+
let obj_actionableListDefinitionId_union0 = null;
|
|
1981
|
+
const obj_actionableListDefinitionId_union0_error = (() => {
|
|
1982
|
+
if (typeof obj_actionableListDefinitionId !== 'string') {
|
|
1983
|
+
return new TypeError('Expected "string" but received "' + typeof obj_actionableListDefinitionId + '" (at "' + path_actionableListDefinitionId + '")');
|
|
1984
|
+
}
|
|
1985
|
+
})();
|
|
1986
|
+
if (obj_actionableListDefinitionId_union0_error != null) {
|
|
1987
|
+
obj_actionableListDefinitionId_union0 = obj_actionableListDefinitionId_union0_error.message;
|
|
1988
|
+
}
|
|
1989
|
+
let obj_actionableListDefinitionId_union1 = null;
|
|
1990
|
+
const obj_actionableListDefinitionId_union1_error = (() => {
|
|
1991
|
+
if (obj_actionableListDefinitionId !== null) {
|
|
1992
|
+
return new TypeError('Expected "null" but received "' + typeof obj_actionableListDefinitionId + '" (at "' + path_actionableListDefinitionId + '")');
|
|
1993
|
+
}
|
|
1994
|
+
})();
|
|
1995
|
+
if (obj_actionableListDefinitionId_union1_error != null) {
|
|
1996
|
+
obj_actionableListDefinitionId_union1 = obj_actionableListDefinitionId_union1_error.message;
|
|
1997
|
+
}
|
|
1998
|
+
if (obj_actionableListDefinitionId_union0 && obj_actionableListDefinitionId_union1) {
|
|
1999
|
+
let message = 'Object doesn\'t match union (at "' + path_actionableListDefinitionId + '")';
|
|
2000
|
+
message += '\n' + obj_actionableListDefinitionId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2001
|
+
message += '\n' + obj_actionableListDefinitionId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2002
|
+
return new TypeError(message);
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
if (obj.filterLogic !== undefined) {
|
|
2006
|
+
const obj_filterLogic = obj.filterLogic;
|
|
2007
|
+
const path_filterLogic = path + '.filterLogic';
|
|
2008
|
+
if (typeof obj_filterLogic !== 'string') {
|
|
2009
|
+
return new TypeError('Expected "string" but received "' + typeof obj_filterLogic + '" (at "' + path_filterLogic + '")');
|
|
2010
|
+
}
|
|
2011
|
+
}
|
|
2012
|
+
if (obj.filters !== undefined) {
|
|
2013
|
+
const obj_filters = obj.filters;
|
|
2014
|
+
const path_filters = path + '.filters';
|
|
2015
|
+
if (typeof obj_filters !== 'object' || ArrayIsArray(obj_filters) || obj_filters === null) {
|
|
2016
|
+
return new TypeError('Expected "object" but received "' + typeof obj_filters + '" (at "' + path_filters + '")');
|
|
2017
|
+
}
|
|
2018
|
+
}
|
|
2019
|
+
if (obj.offset !== undefined) {
|
|
2020
|
+
const obj_offset = obj.offset;
|
|
2021
|
+
const path_offset = path + '.offset';
|
|
2022
|
+
let obj_offset_union0 = null;
|
|
2023
|
+
const obj_offset_union0_error = (() => {
|
|
2024
|
+
if (typeof obj_offset !== 'number' || (typeof obj_offset === 'number' && Math.floor(obj_offset) !== obj_offset)) {
|
|
2025
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_offset + '" (at "' + path_offset + '")');
|
|
2026
|
+
}
|
|
2027
|
+
})();
|
|
2028
|
+
if (obj_offset_union0_error != null) {
|
|
2029
|
+
obj_offset_union0 = obj_offset_union0_error.message;
|
|
2030
|
+
}
|
|
2031
|
+
let obj_offset_union1 = null;
|
|
2032
|
+
const obj_offset_union1_error = (() => {
|
|
2033
|
+
if (obj_offset !== null) {
|
|
2034
|
+
return new TypeError('Expected "null" but received "' + typeof obj_offset + '" (at "' + path_offset + '")');
|
|
2035
|
+
}
|
|
2036
|
+
})();
|
|
2037
|
+
if (obj_offset_union1_error != null) {
|
|
2038
|
+
obj_offset_union1 = obj_offset_union1_error.message;
|
|
2039
|
+
}
|
|
2040
|
+
if (obj_offset_union0 && obj_offset_union1) {
|
|
2041
|
+
let message = 'Object doesn\'t match union (at "' + path_offset + '")';
|
|
2042
|
+
message += '\n' + obj_offset_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2043
|
+
message += '\n' + obj_offset_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2044
|
+
return new TypeError(message);
|
|
2045
|
+
}
|
|
2046
|
+
}
|
|
2047
|
+
if (obj.orderBy !== undefined) {
|
|
2048
|
+
const obj_orderBy = obj.orderBy;
|
|
2049
|
+
const path_orderBy = path + '.orderBy';
|
|
2050
|
+
let obj_orderBy_union0 = null;
|
|
2051
|
+
const obj_orderBy_union0_error = (() => {
|
|
2052
|
+
if (typeof obj_orderBy !== 'string') {
|
|
2053
|
+
return new TypeError('Expected "string" but received "' + typeof obj_orderBy + '" (at "' + path_orderBy + '")');
|
|
2054
|
+
}
|
|
2055
|
+
})();
|
|
2056
|
+
if (obj_orderBy_union0_error != null) {
|
|
2057
|
+
obj_orderBy_union0 = obj_orderBy_union0_error.message;
|
|
2058
|
+
}
|
|
2059
|
+
let obj_orderBy_union1 = null;
|
|
2060
|
+
const obj_orderBy_union1_error = (() => {
|
|
2061
|
+
if (obj_orderBy !== null) {
|
|
2062
|
+
return new TypeError('Expected "null" but received "' + typeof obj_orderBy + '" (at "' + path_orderBy + '")');
|
|
2063
|
+
}
|
|
2064
|
+
})();
|
|
2065
|
+
if (obj_orderBy_union1_error != null) {
|
|
2066
|
+
obj_orderBy_union1 = obj_orderBy_union1_error.message;
|
|
2067
|
+
}
|
|
2068
|
+
if (obj_orderBy_union0 && obj_orderBy_union1) {
|
|
2069
|
+
let message = 'Object doesn\'t match union (at "' + path_orderBy + '")';
|
|
2070
|
+
message += '\n' + obj_orderBy_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2071
|
+
message += '\n' + obj_orderBy_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2072
|
+
return new TypeError(message);
|
|
2073
|
+
}
|
|
2074
|
+
}
|
|
2075
|
+
if (obj.queryType !== undefined) {
|
|
2076
|
+
const obj_queryType = obj.queryType;
|
|
2077
|
+
const path_queryType = path + '.queryType';
|
|
2078
|
+
let obj_queryType_union0 = null;
|
|
2079
|
+
const obj_queryType_union0_error = (() => {
|
|
2080
|
+
if (typeof obj_queryType !== 'string') {
|
|
2081
|
+
return new TypeError('Expected "string" but received "' + typeof obj_queryType + '" (at "' + path_queryType + '")');
|
|
2082
|
+
}
|
|
2083
|
+
})();
|
|
2084
|
+
if (obj_queryType_union0_error != null) {
|
|
2085
|
+
obj_queryType_union0 = obj_queryType_union0_error.message;
|
|
2086
|
+
}
|
|
2087
|
+
let obj_queryType_union1 = null;
|
|
2088
|
+
const obj_queryType_union1_error = (() => {
|
|
2089
|
+
if (obj_queryType !== null) {
|
|
2090
|
+
return new TypeError('Expected "null" but received "' + typeof obj_queryType + '" (at "' + path_queryType + '")');
|
|
2091
|
+
}
|
|
2092
|
+
})();
|
|
2093
|
+
if (obj_queryType_union1_error != null) {
|
|
2094
|
+
obj_queryType_union1 = obj_queryType_union1_error.message;
|
|
2095
|
+
}
|
|
2096
|
+
if (obj_queryType_union0 && obj_queryType_union1) {
|
|
2097
|
+
let message = 'Object doesn\'t match union (at "' + path_queryType + '")';
|
|
2098
|
+
message += '\n' + obj_queryType_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2099
|
+
message += '\n' + obj_queryType_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2100
|
+
return new TypeError(message);
|
|
2101
|
+
}
|
|
2102
|
+
}
|
|
2103
|
+
if (obj.rowLimit !== undefined) {
|
|
2104
|
+
const obj_rowLimit = obj.rowLimit;
|
|
2105
|
+
const path_rowLimit = path + '.rowLimit';
|
|
2106
|
+
let obj_rowLimit_union0 = null;
|
|
2107
|
+
const obj_rowLimit_union0_error = (() => {
|
|
2108
|
+
if (typeof obj_rowLimit !== 'number' || (typeof obj_rowLimit === 'number' && Math.floor(obj_rowLimit) !== obj_rowLimit)) {
|
|
2109
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_rowLimit + '" (at "' + path_rowLimit + '")');
|
|
2110
|
+
}
|
|
2111
|
+
})();
|
|
2112
|
+
if (obj_rowLimit_union0_error != null) {
|
|
2113
|
+
obj_rowLimit_union0 = obj_rowLimit_union0_error.message;
|
|
2114
|
+
}
|
|
2115
|
+
let obj_rowLimit_union1 = null;
|
|
2116
|
+
const obj_rowLimit_union1_error = (() => {
|
|
2117
|
+
if (obj_rowLimit !== null) {
|
|
2118
|
+
return new TypeError('Expected "null" but received "' + typeof obj_rowLimit + '" (at "' + path_rowLimit + '")');
|
|
2119
|
+
}
|
|
2120
|
+
})();
|
|
2121
|
+
if (obj_rowLimit_union1_error != null) {
|
|
2122
|
+
obj_rowLimit_union1 = obj_rowLimit_union1_error.message;
|
|
2123
|
+
}
|
|
2124
|
+
if (obj_rowLimit_union0 && obj_rowLimit_union1) {
|
|
2125
|
+
let message = 'Object doesn\'t match union (at "' + path_rowLimit + '")';
|
|
2126
|
+
message += '\n' + obj_rowLimit_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2127
|
+
message += '\n' + obj_rowLimit_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2128
|
+
return new TypeError(message);
|
|
2129
|
+
}
|
|
2130
|
+
}
|
|
2131
|
+
if (obj.shouldReturnCurrencyCode !== undefined) {
|
|
2132
|
+
const obj_shouldReturnCurrencyCode = obj.shouldReturnCurrencyCode;
|
|
2133
|
+
const path_shouldReturnCurrencyCode = path + '.shouldReturnCurrencyCode';
|
|
2134
|
+
if (typeof obj_shouldReturnCurrencyCode !== 'boolean') {
|
|
2135
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_shouldReturnCurrencyCode + '" (at "' + path_shouldReturnCurrencyCode + '")');
|
|
2136
|
+
}
|
|
2137
|
+
}
|
|
2138
|
+
if (obj.sortOrder !== undefined) {
|
|
2139
|
+
const obj_sortOrder = obj.sortOrder;
|
|
2140
|
+
const path_sortOrder = path + '.sortOrder';
|
|
2141
|
+
let obj_sortOrder_union0 = null;
|
|
2142
|
+
const obj_sortOrder_union0_error = (() => {
|
|
2143
|
+
if (typeof obj_sortOrder !== 'string') {
|
|
2144
|
+
return new TypeError('Expected "string" but received "' + typeof obj_sortOrder + '" (at "' + path_sortOrder + '")');
|
|
2145
|
+
}
|
|
2146
|
+
})();
|
|
2147
|
+
if (obj_sortOrder_union0_error != null) {
|
|
2148
|
+
obj_sortOrder_union0 = obj_sortOrder_union0_error.message;
|
|
2149
|
+
}
|
|
2150
|
+
let obj_sortOrder_union1 = null;
|
|
2151
|
+
const obj_sortOrder_union1_error = (() => {
|
|
2152
|
+
if (obj_sortOrder !== null) {
|
|
2153
|
+
return new TypeError('Expected "null" but received "' + typeof obj_sortOrder + '" (at "' + path_sortOrder + '")');
|
|
2154
|
+
}
|
|
2155
|
+
})();
|
|
2156
|
+
if (obj_sortOrder_union1_error != null) {
|
|
2157
|
+
obj_sortOrder_union1 = obj_sortOrder_union1_error.message;
|
|
2158
|
+
}
|
|
2159
|
+
if (obj_sortOrder_union0 && obj_sortOrder_union1) {
|
|
2160
|
+
let message = 'Object doesn\'t match union (at "' + path_sortOrder + '")';
|
|
2161
|
+
message += '\n' + obj_sortOrder_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2162
|
+
message += '\n' + obj_sortOrder_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2163
|
+
return new TypeError(message);
|
|
2164
|
+
}
|
|
2165
|
+
}
|
|
2166
|
+
})();
|
|
2167
|
+
return v_error === undefined ? null : v_error;
|
|
2168
|
+
}
|
|
2169
|
+
|
|
2170
|
+
const VERSION$3 = "0d035b8885aca0b70b9d3d7cec487492";
|
|
2171
|
+
function validate$3(obj, path = 'ActionableListDatasetColumnRepresentation') {
|
|
2172
|
+
const v_error = (() => {
|
|
2173
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2174
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2175
|
+
}
|
|
2176
|
+
const obj_dataDomain = obj.dataDomain;
|
|
2177
|
+
const path_dataDomain = path + '.dataDomain';
|
|
2178
|
+
let obj_dataDomain_union0 = null;
|
|
2179
|
+
const obj_dataDomain_union0_error = (() => {
|
|
2180
|
+
if (typeof obj_dataDomain !== 'string') {
|
|
2181
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dataDomain + '" (at "' + path_dataDomain + '")');
|
|
2182
|
+
}
|
|
2183
|
+
})();
|
|
2184
|
+
if (obj_dataDomain_union0_error != null) {
|
|
2185
|
+
obj_dataDomain_union0 = obj_dataDomain_union0_error.message;
|
|
2186
|
+
}
|
|
2187
|
+
let obj_dataDomain_union1 = null;
|
|
2188
|
+
const obj_dataDomain_union1_error = (() => {
|
|
2189
|
+
if (obj_dataDomain !== null) {
|
|
2190
|
+
return new TypeError('Expected "null" but received "' + typeof obj_dataDomain + '" (at "' + path_dataDomain + '")');
|
|
2191
|
+
}
|
|
2192
|
+
})();
|
|
2193
|
+
if (obj_dataDomain_union1_error != null) {
|
|
2194
|
+
obj_dataDomain_union1 = obj_dataDomain_union1_error.message;
|
|
2195
|
+
}
|
|
2196
|
+
if (obj_dataDomain_union0 && obj_dataDomain_union1) {
|
|
2197
|
+
let message = 'Object doesn\'t match union (at "' + path_dataDomain + '")';
|
|
2198
|
+
message += '\n' + obj_dataDomain_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2199
|
+
message += '\n' + obj_dataDomain_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2200
|
+
return new TypeError(message);
|
|
2201
|
+
}
|
|
2202
|
+
const obj_dataType = obj.dataType;
|
|
2203
|
+
const path_dataType = path + '.dataType';
|
|
2204
|
+
let obj_dataType_union0 = null;
|
|
2205
|
+
const obj_dataType_union0_error = (() => {
|
|
2206
|
+
if (typeof obj_dataType !== 'string') {
|
|
2207
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
|
|
2208
|
+
}
|
|
2209
|
+
})();
|
|
2210
|
+
if (obj_dataType_union0_error != null) {
|
|
2211
|
+
obj_dataType_union0 = obj_dataType_union0_error.message;
|
|
2212
|
+
}
|
|
2213
|
+
let obj_dataType_union1 = null;
|
|
2214
|
+
const obj_dataType_union1_error = (() => {
|
|
2215
|
+
if (obj_dataType !== null) {
|
|
2216
|
+
return new TypeError('Expected "null" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
|
|
2217
|
+
}
|
|
2218
|
+
})();
|
|
2219
|
+
if (obj_dataType_union1_error != null) {
|
|
2220
|
+
obj_dataType_union1 = obj_dataType_union1_error.message;
|
|
2221
|
+
}
|
|
2222
|
+
if (obj_dataType_union0 && obj_dataType_union1) {
|
|
2223
|
+
let message = 'Object doesn\'t match union (at "' + path_dataType + '")';
|
|
2224
|
+
message += '\n' + obj_dataType_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2225
|
+
message += '\n' + obj_dataType_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2226
|
+
return new TypeError(message);
|
|
2227
|
+
}
|
|
2228
|
+
const obj_isDefault = obj.isDefault;
|
|
2229
|
+
const path_isDefault = path + '.isDefault';
|
|
2230
|
+
let obj_isDefault_union0 = null;
|
|
2231
|
+
const obj_isDefault_union0_error = (() => {
|
|
2232
|
+
if (typeof obj_isDefault !== 'boolean') {
|
|
2233
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isDefault + '" (at "' + path_isDefault + '")');
|
|
2234
|
+
}
|
|
2235
|
+
})();
|
|
2236
|
+
if (obj_isDefault_union0_error != null) {
|
|
2237
|
+
obj_isDefault_union0 = obj_isDefault_union0_error.message;
|
|
2238
|
+
}
|
|
2239
|
+
let obj_isDefault_union1 = null;
|
|
2240
|
+
const obj_isDefault_union1_error = (() => {
|
|
2241
|
+
if (obj_isDefault !== null) {
|
|
2242
|
+
return new TypeError('Expected "null" but received "' + typeof obj_isDefault + '" (at "' + path_isDefault + '")');
|
|
2243
|
+
}
|
|
2244
|
+
})();
|
|
2245
|
+
if (obj_isDefault_union1_error != null) {
|
|
2246
|
+
obj_isDefault_union1 = obj_isDefault_union1_error.message;
|
|
2247
|
+
}
|
|
2248
|
+
if (obj_isDefault_union0 && obj_isDefault_union1) {
|
|
2249
|
+
let message = 'Object doesn\'t match union (at "' + path_isDefault + '")';
|
|
2250
|
+
message += '\n' + obj_isDefault_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2251
|
+
message += '\n' + obj_isDefault_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2252
|
+
return new TypeError(message);
|
|
2253
|
+
}
|
|
2254
|
+
const obj_objectName = obj.objectName;
|
|
2255
|
+
const path_objectName = path + '.objectName';
|
|
2256
|
+
let obj_objectName_union0 = null;
|
|
2257
|
+
const obj_objectName_union0_error = (() => {
|
|
2258
|
+
if (typeof obj_objectName !== 'string') {
|
|
2259
|
+
return new TypeError('Expected "string" but received "' + typeof obj_objectName + '" (at "' + path_objectName + '")');
|
|
2260
|
+
}
|
|
2261
|
+
})();
|
|
2262
|
+
if (obj_objectName_union0_error != null) {
|
|
2263
|
+
obj_objectName_union0 = obj_objectName_union0_error.message;
|
|
2264
|
+
}
|
|
2265
|
+
let obj_objectName_union1 = null;
|
|
2266
|
+
const obj_objectName_union1_error = (() => {
|
|
2267
|
+
if (obj_objectName !== null) {
|
|
2268
|
+
return new TypeError('Expected "null" but received "' + typeof obj_objectName + '" (at "' + path_objectName + '")');
|
|
2269
|
+
}
|
|
2270
|
+
})();
|
|
2271
|
+
if (obj_objectName_union1_error != null) {
|
|
2272
|
+
obj_objectName_union1 = obj_objectName_union1_error.message;
|
|
2273
|
+
}
|
|
2274
|
+
if (obj_objectName_union0 && obj_objectName_union1) {
|
|
2275
|
+
let message = 'Object doesn\'t match union (at "' + path_objectName + '")';
|
|
2276
|
+
message += '\n' + obj_objectName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2277
|
+
message += '\n' + obj_objectName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2278
|
+
return new TypeError(message);
|
|
2279
|
+
}
|
|
2280
|
+
const obj_sourceColumnApiName = obj.sourceColumnApiName;
|
|
2281
|
+
const path_sourceColumnApiName = path + '.sourceColumnApiName';
|
|
2282
|
+
let obj_sourceColumnApiName_union0 = null;
|
|
2283
|
+
const obj_sourceColumnApiName_union0_error = (() => {
|
|
2284
|
+
if (typeof obj_sourceColumnApiName !== 'string') {
|
|
2285
|
+
return new TypeError('Expected "string" but received "' + typeof obj_sourceColumnApiName + '" (at "' + path_sourceColumnApiName + '")');
|
|
2286
|
+
}
|
|
2287
|
+
})();
|
|
2288
|
+
if (obj_sourceColumnApiName_union0_error != null) {
|
|
2289
|
+
obj_sourceColumnApiName_union0 = obj_sourceColumnApiName_union0_error.message;
|
|
2290
|
+
}
|
|
2291
|
+
let obj_sourceColumnApiName_union1 = null;
|
|
2292
|
+
const obj_sourceColumnApiName_union1_error = (() => {
|
|
2293
|
+
if (obj_sourceColumnApiName !== null) {
|
|
2294
|
+
return new TypeError('Expected "null" but received "' + typeof obj_sourceColumnApiName + '" (at "' + path_sourceColumnApiName + '")');
|
|
2295
|
+
}
|
|
2296
|
+
})();
|
|
2297
|
+
if (obj_sourceColumnApiName_union1_error != null) {
|
|
2298
|
+
obj_sourceColumnApiName_union1 = obj_sourceColumnApiName_union1_error.message;
|
|
2299
|
+
}
|
|
2300
|
+
if (obj_sourceColumnApiName_union0 && obj_sourceColumnApiName_union1) {
|
|
2301
|
+
let message = 'Object doesn\'t match union (at "' + path_sourceColumnApiName + '")';
|
|
2302
|
+
message += '\n' + obj_sourceColumnApiName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2303
|
+
message += '\n' + obj_sourceColumnApiName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2304
|
+
return new TypeError(message);
|
|
2305
|
+
}
|
|
2306
|
+
const obj_sourceFieldName = obj.sourceFieldName;
|
|
2307
|
+
const path_sourceFieldName = path + '.sourceFieldName';
|
|
2308
|
+
let obj_sourceFieldName_union0 = null;
|
|
2309
|
+
const obj_sourceFieldName_union0_error = (() => {
|
|
2310
|
+
if (typeof obj_sourceFieldName !== 'string') {
|
|
2311
|
+
return new TypeError('Expected "string" but received "' + typeof obj_sourceFieldName + '" (at "' + path_sourceFieldName + '")');
|
|
2312
|
+
}
|
|
2313
|
+
})();
|
|
2314
|
+
if (obj_sourceFieldName_union0_error != null) {
|
|
2315
|
+
obj_sourceFieldName_union0 = obj_sourceFieldName_union0_error.message;
|
|
2316
|
+
}
|
|
2317
|
+
let obj_sourceFieldName_union1 = null;
|
|
2318
|
+
const obj_sourceFieldName_union1_error = (() => {
|
|
2319
|
+
if (obj_sourceFieldName !== null) {
|
|
2320
|
+
return new TypeError('Expected "null" but received "' + typeof obj_sourceFieldName + '" (at "' + path_sourceFieldName + '")');
|
|
2321
|
+
}
|
|
2322
|
+
})();
|
|
2323
|
+
if (obj_sourceFieldName_union1_error != null) {
|
|
2324
|
+
obj_sourceFieldName_union1 = obj_sourceFieldName_union1_error.message;
|
|
2325
|
+
}
|
|
2326
|
+
if (obj_sourceFieldName_union0 && obj_sourceFieldName_union1) {
|
|
2327
|
+
let message = 'Object doesn\'t match union (at "' + path_sourceFieldName + '")';
|
|
2328
|
+
message += '\n' + obj_sourceFieldName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2329
|
+
message += '\n' + obj_sourceFieldName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2330
|
+
return new TypeError(message);
|
|
2331
|
+
}
|
|
2332
|
+
})();
|
|
2333
|
+
return v_error === undefined ? null : v_error;
|
|
2334
|
+
}
|
|
2335
|
+
const select$4 = function ActionableListDatasetColumnRepresentationSelect() {
|
|
2336
|
+
return {
|
|
2337
|
+
kind: 'Fragment',
|
|
2338
|
+
version: VERSION$3,
|
|
2339
|
+
private: [],
|
|
2340
|
+
selections: [
|
|
2341
|
+
{
|
|
2342
|
+
name: 'dataDomain',
|
|
2343
|
+
kind: 'Scalar'
|
|
2344
|
+
},
|
|
2345
|
+
{
|
|
2346
|
+
name: 'dataType',
|
|
2347
|
+
kind: 'Scalar'
|
|
2348
|
+
},
|
|
2349
|
+
{
|
|
2350
|
+
name: 'isDefault',
|
|
2351
|
+
kind: 'Scalar'
|
|
2352
|
+
},
|
|
2353
|
+
{
|
|
2354
|
+
name: 'objectName',
|
|
2355
|
+
kind: 'Scalar'
|
|
2356
|
+
},
|
|
2357
|
+
{
|
|
2358
|
+
name: 'sourceColumnApiName',
|
|
2359
|
+
kind: 'Scalar'
|
|
2360
|
+
},
|
|
2361
|
+
{
|
|
2362
|
+
name: 'sourceFieldName',
|
|
2363
|
+
kind: 'Scalar'
|
|
2364
|
+
}
|
|
2365
|
+
]
|
|
2366
|
+
};
|
|
2367
|
+
};
|
|
2368
|
+
function equals$3(existing, incoming) {
|
|
2369
|
+
const existing_dataDomain = existing.dataDomain;
|
|
2370
|
+
const incoming_dataDomain = incoming.dataDomain;
|
|
2371
|
+
if (!(existing_dataDomain === incoming_dataDomain)) {
|
|
2372
|
+
return false;
|
|
2373
|
+
}
|
|
2374
|
+
const existing_dataType = existing.dataType;
|
|
2375
|
+
const incoming_dataType = incoming.dataType;
|
|
2376
|
+
if (!(existing_dataType === incoming_dataType)) {
|
|
2377
|
+
return false;
|
|
2378
|
+
}
|
|
2379
|
+
const existing_isDefault = existing.isDefault;
|
|
2380
|
+
const incoming_isDefault = incoming.isDefault;
|
|
2381
|
+
if (!(existing_isDefault === incoming_isDefault)) {
|
|
2382
|
+
return false;
|
|
2383
|
+
}
|
|
2384
|
+
const existing_objectName = existing.objectName;
|
|
2385
|
+
const incoming_objectName = incoming.objectName;
|
|
2386
|
+
if (!(existing_objectName === incoming_objectName)) {
|
|
2387
|
+
return false;
|
|
2388
|
+
}
|
|
2389
|
+
const existing_sourceColumnApiName = existing.sourceColumnApiName;
|
|
2390
|
+
const incoming_sourceColumnApiName = incoming.sourceColumnApiName;
|
|
2391
|
+
if (!(existing_sourceColumnApiName === incoming_sourceColumnApiName)) {
|
|
2392
|
+
return false;
|
|
2393
|
+
}
|
|
2394
|
+
const existing_sourceFieldName = existing.sourceFieldName;
|
|
2395
|
+
const incoming_sourceFieldName = incoming.sourceFieldName;
|
|
2396
|
+
if (!(existing_sourceFieldName === incoming_sourceFieldName)) {
|
|
2397
|
+
return false;
|
|
2398
|
+
}
|
|
2399
|
+
return true;
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2402
|
+
const VERSION$2 = "ad799b06e079ea81d47ce361336c5282";
|
|
2403
|
+
function validate$2(obj, path = 'ActionableListDatasetRowRepresentation') {
|
|
2404
|
+
const v_error = (() => {
|
|
2405
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2406
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2407
|
+
}
|
|
2408
|
+
const obj_rowMap = obj.rowMap;
|
|
2409
|
+
const path_rowMap = path + '.rowMap';
|
|
2410
|
+
if (typeof obj_rowMap !== 'object' || ArrayIsArray(obj_rowMap) || obj_rowMap === null) {
|
|
2411
|
+
return new TypeError('Expected "object" but received "' + typeof obj_rowMap + '" (at "' + path_rowMap + '")');
|
|
2412
|
+
}
|
|
2413
|
+
const obj_rowMap_keys = ObjectKeys(obj_rowMap);
|
|
2414
|
+
for (let i = 0; i < obj_rowMap_keys.length; i++) {
|
|
2415
|
+
const key = obj_rowMap_keys[i];
|
|
2416
|
+
const obj_rowMap_prop = obj_rowMap[key];
|
|
2417
|
+
const path_rowMap_prop = path_rowMap + '["' + key + '"]';
|
|
2418
|
+
if (typeof obj_rowMap_prop !== 'string') {
|
|
2419
|
+
return new TypeError('Expected "string" but received "' + typeof obj_rowMap_prop + '" (at "' + path_rowMap_prop + '")');
|
|
2420
|
+
}
|
|
2421
|
+
}
|
|
2422
|
+
})();
|
|
2423
|
+
return v_error === undefined ? null : v_error;
|
|
2424
|
+
}
|
|
2425
|
+
const select$3 = function ActionableListDatasetRowRepresentationSelect() {
|
|
2426
|
+
return {
|
|
2427
|
+
kind: 'Fragment',
|
|
2428
|
+
version: VERSION$2,
|
|
2429
|
+
private: [],
|
|
2430
|
+
selections: [
|
|
2431
|
+
{
|
|
2432
|
+
name: 'rowMap',
|
|
2433
|
+
kind: 'Scalar',
|
|
2434
|
+
map: true
|
|
2435
|
+
}
|
|
2436
|
+
]
|
|
2437
|
+
};
|
|
2438
|
+
};
|
|
2439
|
+
function equals$2(existing, incoming) {
|
|
2440
|
+
const existing_rowMap = existing.rowMap;
|
|
2441
|
+
const incoming_rowMap = incoming.rowMap;
|
|
2442
|
+
const equals_rowMap_props = equalsObject(existing_rowMap, incoming_rowMap, (existing_rowMap_prop, incoming_rowMap_prop) => {
|
|
2443
|
+
if (!(existing_rowMap_prop === incoming_rowMap_prop)) {
|
|
2444
|
+
return false;
|
|
2445
|
+
}
|
|
2446
|
+
});
|
|
2447
|
+
if (equals_rowMap_props === false) {
|
|
2448
|
+
return false;
|
|
2449
|
+
}
|
|
2450
|
+
return true;
|
|
2451
|
+
}
|
|
2452
|
+
|
|
2453
|
+
const VERSION$1 = "4ddcc2754150af16fd09c10d9fdabfbc";
|
|
2454
|
+
function validate$1(obj, path = 'ActionableListMemberStatusRepresentation') {
|
|
2455
|
+
const v_error = (() => {
|
|
2456
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2457
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2458
|
+
}
|
|
2459
|
+
const obj_iconName = obj.iconName;
|
|
2460
|
+
const path_iconName = path + '.iconName';
|
|
2461
|
+
let obj_iconName_union0 = null;
|
|
2462
|
+
const obj_iconName_union0_error = (() => {
|
|
2463
|
+
if (typeof obj_iconName !== 'string') {
|
|
2464
|
+
return new TypeError('Expected "string" but received "' + typeof obj_iconName + '" (at "' + path_iconName + '")');
|
|
2465
|
+
}
|
|
2466
|
+
})();
|
|
2467
|
+
if (obj_iconName_union0_error != null) {
|
|
2468
|
+
obj_iconName_union0 = obj_iconName_union0_error.message;
|
|
2469
|
+
}
|
|
2470
|
+
let obj_iconName_union1 = null;
|
|
2471
|
+
const obj_iconName_union1_error = (() => {
|
|
2472
|
+
if (obj_iconName !== null) {
|
|
2473
|
+
return new TypeError('Expected "null" but received "' + typeof obj_iconName + '" (at "' + path_iconName + '")');
|
|
2474
|
+
}
|
|
2475
|
+
})();
|
|
2476
|
+
if (obj_iconName_union1_error != null) {
|
|
2477
|
+
obj_iconName_union1 = obj_iconName_union1_error.message;
|
|
2478
|
+
}
|
|
2479
|
+
if (obj_iconName_union0 && obj_iconName_union1) {
|
|
2480
|
+
let message = 'Object doesn\'t match union (at "' + path_iconName + '")';
|
|
2481
|
+
message += '\n' + obj_iconName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2482
|
+
message += '\n' + obj_iconName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2483
|
+
return new TypeError(message);
|
|
2484
|
+
}
|
|
2485
|
+
const obj_id = obj.id;
|
|
2486
|
+
const path_id = path + '.id';
|
|
2487
|
+
let obj_id_union0 = null;
|
|
2488
|
+
const obj_id_union0_error = (() => {
|
|
2489
|
+
if (typeof obj_id !== 'string') {
|
|
2490
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
2491
|
+
}
|
|
2492
|
+
})();
|
|
2493
|
+
if (obj_id_union0_error != null) {
|
|
2494
|
+
obj_id_union0 = obj_id_union0_error.message;
|
|
2495
|
+
}
|
|
2496
|
+
let obj_id_union1 = null;
|
|
2497
|
+
const obj_id_union1_error = (() => {
|
|
2498
|
+
if (obj_id !== null) {
|
|
2499
|
+
return new TypeError('Expected "null" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
2500
|
+
}
|
|
2501
|
+
})();
|
|
2502
|
+
if (obj_id_union1_error != null) {
|
|
2503
|
+
obj_id_union1 = obj_id_union1_error.message;
|
|
2504
|
+
}
|
|
2505
|
+
if (obj_id_union0 && obj_id_union1) {
|
|
2506
|
+
let message = 'Object doesn\'t match union (at "' + path_id + '")';
|
|
2507
|
+
message += '\n' + obj_id_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2508
|
+
message += '\n' + obj_id_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2509
|
+
return new TypeError(message);
|
|
2510
|
+
}
|
|
2511
|
+
const obj_status = obj.status;
|
|
2512
|
+
const path_status = path + '.status';
|
|
2513
|
+
let obj_status_union0 = null;
|
|
2514
|
+
const obj_status_union0_error = (() => {
|
|
2515
|
+
if (typeof obj_status !== 'string') {
|
|
2516
|
+
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
2517
|
+
}
|
|
2518
|
+
})();
|
|
2519
|
+
if (obj_status_union0_error != null) {
|
|
2520
|
+
obj_status_union0 = obj_status_union0_error.message;
|
|
2521
|
+
}
|
|
2522
|
+
let obj_status_union1 = null;
|
|
2523
|
+
const obj_status_union1_error = (() => {
|
|
2524
|
+
if (obj_status !== null) {
|
|
2525
|
+
return new TypeError('Expected "null" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
2526
|
+
}
|
|
2527
|
+
})();
|
|
2528
|
+
if (obj_status_union1_error != null) {
|
|
2529
|
+
obj_status_union1 = obj_status_union1_error.message;
|
|
2530
|
+
}
|
|
2531
|
+
if (obj_status_union0 && obj_status_union1) {
|
|
2532
|
+
let message = 'Object doesn\'t match union (at "' + path_status + '")';
|
|
2533
|
+
message += '\n' + obj_status_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2534
|
+
message += '\n' + obj_status_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2535
|
+
return new TypeError(message);
|
|
2536
|
+
}
|
|
2537
|
+
})();
|
|
2538
|
+
return v_error === undefined ? null : v_error;
|
|
2539
|
+
}
|
|
2540
|
+
const select$2 = function ActionableListMemberStatusRepresentationSelect() {
|
|
2541
|
+
return {
|
|
2542
|
+
kind: 'Fragment',
|
|
2543
|
+
version: VERSION$1,
|
|
2544
|
+
private: [],
|
|
2545
|
+
selections: [
|
|
2546
|
+
{
|
|
2547
|
+
name: 'iconName',
|
|
2548
|
+
kind: 'Scalar'
|
|
2549
|
+
},
|
|
2550
|
+
{
|
|
2551
|
+
name: 'id',
|
|
2552
|
+
kind: 'Scalar'
|
|
2553
|
+
},
|
|
2554
|
+
{
|
|
2555
|
+
name: 'status',
|
|
2556
|
+
kind: 'Scalar'
|
|
2557
|
+
}
|
|
2558
|
+
]
|
|
2559
|
+
};
|
|
2560
|
+
};
|
|
2561
|
+
function equals$1(existing, incoming) {
|
|
2562
|
+
const existing_iconName = existing.iconName;
|
|
2563
|
+
const incoming_iconName = incoming.iconName;
|
|
2564
|
+
if (!(existing_iconName === incoming_iconName)) {
|
|
2565
|
+
return false;
|
|
2566
|
+
}
|
|
2567
|
+
const existing_id = existing.id;
|
|
2568
|
+
const incoming_id = incoming.id;
|
|
2569
|
+
if (!(existing_id === incoming_id)) {
|
|
2570
|
+
return false;
|
|
2571
|
+
}
|
|
2572
|
+
const existing_status = existing.status;
|
|
2573
|
+
const incoming_status = incoming.status;
|
|
2574
|
+
if (!(existing_status === incoming_status)) {
|
|
2575
|
+
return false;
|
|
2576
|
+
}
|
|
2577
|
+
return true;
|
|
2578
|
+
}
|
|
2579
|
+
|
|
2580
|
+
const TTL = 100;
|
|
2581
|
+
const VERSION = "dc69507b2503baa62caf5e85fd7545b8";
|
|
2582
|
+
function validate(obj, path = 'ActionableListDatasetByDefinitionRepresentation') {
|
|
2583
|
+
const v_error = (() => {
|
|
2584
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2585
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
2586
|
+
}
|
|
2587
|
+
const obj_count = obj.count;
|
|
2588
|
+
const path_count = path + '.count';
|
|
2589
|
+
let obj_count_union0 = null;
|
|
2590
|
+
const obj_count_union0_error = (() => {
|
|
2591
|
+
if (typeof obj_count !== 'number' || (typeof obj_count === 'number' && Math.floor(obj_count) !== obj_count)) {
|
|
2592
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_count + '" (at "' + path_count + '")');
|
|
2593
|
+
}
|
|
2594
|
+
})();
|
|
2595
|
+
if (obj_count_union0_error != null) {
|
|
2596
|
+
obj_count_union0 = obj_count_union0_error.message;
|
|
2597
|
+
}
|
|
2598
|
+
let obj_count_union1 = null;
|
|
2599
|
+
const obj_count_union1_error = (() => {
|
|
2600
|
+
if (obj_count !== null) {
|
|
2601
|
+
return new TypeError('Expected "null" but received "' + typeof obj_count + '" (at "' + path_count + '")');
|
|
2602
|
+
}
|
|
2603
|
+
})();
|
|
2604
|
+
if (obj_count_union1_error != null) {
|
|
2605
|
+
obj_count_union1 = obj_count_union1_error.message;
|
|
2606
|
+
}
|
|
2607
|
+
if (obj_count_union0 && obj_count_union1) {
|
|
2608
|
+
let message = 'Object doesn\'t match union (at "' + path_count + '")';
|
|
2609
|
+
message += '\n' + obj_count_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2610
|
+
message += '\n' + obj_count_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2611
|
+
return new TypeError(message);
|
|
2612
|
+
}
|
|
2613
|
+
const obj_currencyCode = obj.currencyCode;
|
|
2614
|
+
const path_currencyCode = path + '.currencyCode';
|
|
2615
|
+
let obj_currencyCode_union0 = null;
|
|
2616
|
+
const obj_currencyCode_union0_error = (() => {
|
|
2617
|
+
if (typeof obj_currencyCode !== 'string') {
|
|
2618
|
+
return new TypeError('Expected "string" but received "' + typeof obj_currencyCode + '" (at "' + path_currencyCode + '")');
|
|
2619
|
+
}
|
|
2620
|
+
})();
|
|
2621
|
+
if (obj_currencyCode_union0_error != null) {
|
|
2622
|
+
obj_currencyCode_union0 = obj_currencyCode_union0_error.message;
|
|
2623
|
+
}
|
|
2624
|
+
let obj_currencyCode_union1 = null;
|
|
2625
|
+
const obj_currencyCode_union1_error = (() => {
|
|
2626
|
+
if (obj_currencyCode !== null) {
|
|
2627
|
+
return new TypeError('Expected "null" but received "' + typeof obj_currencyCode + '" (at "' + path_currencyCode + '")');
|
|
2628
|
+
}
|
|
2629
|
+
})();
|
|
2630
|
+
if (obj_currencyCode_union1_error != null) {
|
|
2631
|
+
obj_currencyCode_union1 = obj_currencyCode_union1_error.message;
|
|
2632
|
+
}
|
|
2633
|
+
if (obj_currencyCode_union0 && obj_currencyCode_union1) {
|
|
2634
|
+
let message = 'Object doesn\'t match union (at "' + path_currencyCode + '")';
|
|
2635
|
+
message += '\n' + obj_currencyCode_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
2636
|
+
message += '\n' + obj_currencyCode_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
2637
|
+
return new TypeError(message);
|
|
2638
|
+
}
|
|
2639
|
+
const obj_datasetColumns = obj.datasetColumns;
|
|
2640
|
+
const path_datasetColumns = path + '.datasetColumns';
|
|
2641
|
+
if (!ArrayIsArray(obj_datasetColumns)) {
|
|
2642
|
+
return new TypeError('Expected "array" but received "' + typeof obj_datasetColumns + '" (at "' + path_datasetColumns + '")');
|
|
2643
|
+
}
|
|
2644
|
+
for (let i = 0; i < obj_datasetColumns.length; i++) {
|
|
2645
|
+
const obj_datasetColumns_item = obj_datasetColumns[i];
|
|
2646
|
+
const path_datasetColumns_item = path_datasetColumns + '[' + i + ']';
|
|
2647
|
+
const referencepath_datasetColumns_itemValidationError = validate$3(obj_datasetColumns_item, path_datasetColumns_item);
|
|
2648
|
+
if (referencepath_datasetColumns_itemValidationError !== null) {
|
|
2649
|
+
let message = 'Object doesn\'t match ActionableListDatasetColumnRepresentation (at "' + path_datasetColumns_item + '")\n';
|
|
2650
|
+
message += referencepath_datasetColumns_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2651
|
+
return new TypeError(message);
|
|
2652
|
+
}
|
|
2653
|
+
}
|
|
2654
|
+
const obj_datasetRows = obj.datasetRows;
|
|
2655
|
+
const path_datasetRows = path + '.datasetRows';
|
|
2656
|
+
if (!ArrayIsArray(obj_datasetRows)) {
|
|
2657
|
+
return new TypeError('Expected "array" but received "' + typeof obj_datasetRows + '" (at "' + path_datasetRows + '")');
|
|
2658
|
+
}
|
|
2659
|
+
for (let i = 0; i < obj_datasetRows.length; i++) {
|
|
2660
|
+
const obj_datasetRows_item = obj_datasetRows[i];
|
|
2661
|
+
const path_datasetRows_item = path_datasetRows + '[' + i + ']';
|
|
2662
|
+
const referencepath_datasetRows_itemValidationError = validate$2(obj_datasetRows_item, path_datasetRows_item);
|
|
2663
|
+
if (referencepath_datasetRows_itemValidationError !== null) {
|
|
2664
|
+
let message = 'Object doesn\'t match ActionableListDatasetRowRepresentation (at "' + path_datasetRows_item + '")\n';
|
|
2665
|
+
message += referencepath_datasetRows_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2666
|
+
return new TypeError(message);
|
|
2667
|
+
}
|
|
2668
|
+
}
|
|
2669
|
+
const obj_memberStatuses = obj.memberStatuses;
|
|
2670
|
+
const path_memberStatuses = path + '.memberStatuses';
|
|
2671
|
+
if (!ArrayIsArray(obj_memberStatuses)) {
|
|
2672
|
+
return new TypeError('Expected "array" but received "' + typeof obj_memberStatuses + '" (at "' + path_memberStatuses + '")');
|
|
2673
|
+
}
|
|
2674
|
+
for (let i = 0; i < obj_memberStatuses.length; i++) {
|
|
2675
|
+
const obj_memberStatuses_item = obj_memberStatuses[i];
|
|
2676
|
+
const path_memberStatuses_item = path_memberStatuses + '[' + i + ']';
|
|
2677
|
+
const referencepath_memberStatuses_itemValidationError = validate$1(obj_memberStatuses_item, path_memberStatuses_item);
|
|
2678
|
+
if (referencepath_memberStatuses_itemValidationError !== null) {
|
|
2679
|
+
let message = 'Object doesn\'t match ActionableListMemberStatusRepresentation (at "' + path_memberStatuses_item + '")\n';
|
|
2680
|
+
message += referencepath_memberStatuses_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
2681
|
+
return new TypeError(message);
|
|
2682
|
+
}
|
|
2683
|
+
}
|
|
2684
|
+
const obj_responseId = obj.responseId;
|
|
2685
|
+
const path_responseId = path + '.responseId';
|
|
2686
|
+
if (typeof obj_responseId !== 'string') {
|
|
2687
|
+
return new TypeError('Expected "string" but received "' + typeof obj_responseId + '" (at "' + path_responseId + '")');
|
|
2688
|
+
}
|
|
2689
|
+
})();
|
|
2690
|
+
return v_error === undefined ? null : v_error;
|
|
2691
|
+
}
|
|
2692
|
+
const RepresentationType = 'ActionableListDatasetByDefinitionRepresentation';
|
|
2693
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
2694
|
+
return input;
|
|
2695
|
+
}
|
|
2696
|
+
const select$1 = function ActionableListDatasetByDefinitionRepresentationSelect() {
|
|
2697
|
+
const { selections: ActionableListDatasetColumnRepresentation__selections, opaque: ActionableListDatasetColumnRepresentation__opaque, } = select$4();
|
|
2698
|
+
const { selections: ActionableListDatasetRowRepresentation__selections, opaque: ActionableListDatasetRowRepresentation__opaque, } = select$3();
|
|
2699
|
+
const { selections: ActionableListMemberStatusRepresentation__selections, opaque: ActionableListMemberStatusRepresentation__opaque, } = select$2();
|
|
2700
|
+
return {
|
|
2701
|
+
kind: 'Fragment',
|
|
2702
|
+
version: VERSION,
|
|
2703
|
+
private: [],
|
|
2704
|
+
selections: [
|
|
2705
|
+
{
|
|
2706
|
+
name: 'count',
|
|
2707
|
+
kind: 'Scalar'
|
|
2708
|
+
},
|
|
2709
|
+
{
|
|
2710
|
+
name: 'currencyCode',
|
|
2711
|
+
kind: 'Scalar'
|
|
2712
|
+
},
|
|
2713
|
+
{
|
|
2714
|
+
name: 'datasetColumns',
|
|
2715
|
+
kind: 'Object',
|
|
2716
|
+
plural: true,
|
|
2717
|
+
selections: ActionableListDatasetColumnRepresentation__selections
|
|
2718
|
+
},
|
|
2719
|
+
{
|
|
2720
|
+
name: 'datasetRows',
|
|
2721
|
+
kind: 'Object',
|
|
2722
|
+
plural: true,
|
|
2723
|
+
selections: ActionableListDatasetRowRepresentation__selections
|
|
2724
|
+
},
|
|
2725
|
+
{
|
|
2726
|
+
name: 'memberStatuses',
|
|
2727
|
+
kind: 'Object',
|
|
2728
|
+
plural: true,
|
|
2729
|
+
selections: ActionableListMemberStatusRepresentation__selections
|
|
2730
|
+
},
|
|
2731
|
+
{
|
|
2732
|
+
name: 'responseId',
|
|
2733
|
+
kind: 'Scalar'
|
|
2734
|
+
}
|
|
2735
|
+
]
|
|
2736
|
+
};
|
|
2737
|
+
};
|
|
2738
|
+
function equals(existing, incoming) {
|
|
2739
|
+
const existing_responseId = existing.responseId;
|
|
2740
|
+
const incoming_responseId = incoming.responseId;
|
|
2741
|
+
if (!(existing_responseId === incoming_responseId)) {
|
|
2742
|
+
return false;
|
|
2743
|
+
}
|
|
2744
|
+
const existing_count = existing.count;
|
|
2745
|
+
const incoming_count = incoming.count;
|
|
2746
|
+
if (!(existing_count === incoming_count)) {
|
|
2747
|
+
return false;
|
|
2748
|
+
}
|
|
2749
|
+
const existing_currencyCode = existing.currencyCode;
|
|
2750
|
+
const incoming_currencyCode = incoming.currencyCode;
|
|
2751
|
+
if (!(existing_currencyCode === incoming_currencyCode)) {
|
|
2752
|
+
return false;
|
|
2753
|
+
}
|
|
2754
|
+
const existing_datasetColumns = existing.datasetColumns;
|
|
2755
|
+
const incoming_datasetColumns = incoming.datasetColumns;
|
|
2756
|
+
const equals_datasetColumns_items = equalsArray(existing_datasetColumns, incoming_datasetColumns, (existing_datasetColumns_item, incoming_datasetColumns_item) => {
|
|
2757
|
+
if (!(equals$3(existing_datasetColumns_item, incoming_datasetColumns_item))) {
|
|
2758
|
+
return false;
|
|
2759
|
+
}
|
|
2760
|
+
});
|
|
2761
|
+
if (equals_datasetColumns_items === false) {
|
|
2762
|
+
return false;
|
|
2763
|
+
}
|
|
2764
|
+
const existing_datasetRows = existing.datasetRows;
|
|
2765
|
+
const incoming_datasetRows = incoming.datasetRows;
|
|
2766
|
+
const equals_datasetRows_items = equalsArray(existing_datasetRows, incoming_datasetRows, (existing_datasetRows_item, incoming_datasetRows_item) => {
|
|
2767
|
+
if (!(equals$2(existing_datasetRows_item, incoming_datasetRows_item))) {
|
|
2768
|
+
return false;
|
|
2769
|
+
}
|
|
2770
|
+
});
|
|
2771
|
+
if (equals_datasetRows_items === false) {
|
|
2772
|
+
return false;
|
|
2773
|
+
}
|
|
2774
|
+
const existing_memberStatuses = existing.memberStatuses;
|
|
2775
|
+
const incoming_memberStatuses = incoming.memberStatuses;
|
|
2776
|
+
const equals_memberStatuses_items = equalsArray(existing_memberStatuses, incoming_memberStatuses, (existing_memberStatuses_item, incoming_memberStatuses_item) => {
|
|
2777
|
+
if (!(equals$1(existing_memberStatuses_item, incoming_memberStatuses_item))) {
|
|
2778
|
+
return false;
|
|
2779
|
+
}
|
|
2780
|
+
});
|
|
2781
|
+
if (equals_memberStatuses_items === false) {
|
|
2782
|
+
return false;
|
|
2783
|
+
}
|
|
2784
|
+
return true;
|
|
2785
|
+
}
|
|
2786
|
+
const ingest = function ActionableListDatasetByDefinitionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2787
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2788
|
+
const validateError = validate(input);
|
|
2789
|
+
if (validateError !== null) {
|
|
2790
|
+
throw validateError;
|
|
2791
|
+
}
|
|
2792
|
+
}
|
|
2793
|
+
const key = path.fullPath;
|
|
2794
|
+
const existingRecord = store.readEntry(key);
|
|
2795
|
+
const ttlToUse = TTL;
|
|
2796
|
+
let incomingRecord = normalize(input, store.readEntry(key), {
|
|
2797
|
+
fullPath: key,
|
|
2798
|
+
parent: path.parent,
|
|
2799
|
+
propertyName: path.propertyName,
|
|
2800
|
+
ttl: ttlToUse
|
|
2801
|
+
});
|
|
2802
|
+
if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
|
|
2803
|
+
luvio.storePublish(key, incomingRecord);
|
|
2804
|
+
}
|
|
2805
|
+
{
|
|
2806
|
+
const storeMetadataParams = {
|
|
2807
|
+
ttl: ttlToUse,
|
|
2808
|
+
namespace: "actionablelist",
|
|
2809
|
+
version: VERSION,
|
|
2810
|
+
representationName: RepresentationType,
|
|
2811
|
+
};
|
|
2812
|
+
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
2813
|
+
}
|
|
2814
|
+
return createLink(key);
|
|
2815
|
+
};
|
|
2816
|
+
function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
2817
|
+
const rootKeySet = new StoreKeyMap();
|
|
2818
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2819
|
+
const rootKey = fullPathFactory();
|
|
2820
|
+
rootKeySet.set(rootKey, {
|
|
2821
|
+
namespace: keyPrefix,
|
|
2822
|
+
representationName: RepresentationType,
|
|
2823
|
+
mergeable: false
|
|
2824
|
+
});
|
|
2825
|
+
return rootKeySet;
|
|
2826
|
+
}
|
|
2827
|
+
|
|
2828
|
+
function select(luvio, params) {
|
|
2829
|
+
return select$1();
|
|
2830
|
+
}
|
|
2831
|
+
function keyBuilder$1(luvio, params) {
|
|
2832
|
+
return keyPrefix + '::ActionableListDatasetByDefinitionRepresentation:(' + (params.body.actionableListDataset.actionableListDefinitionId === undefined ? 'actionableListDataset.actionableListDefinitionId' : 'actionableListDataset.actionableListDefinitionId:' + params.body.actionableListDataset.actionableListDefinitionId) + '::' + (params.body.actionableListDataset.filterLogic === undefined ? 'actionableListDataset.filterLogic' : 'actionableListDataset.filterLogic:' + params.body.actionableListDataset.filterLogic) + '::' + +'::' + (params.body.actionableListDataset.offset === undefined ? 'actionableListDataset.offset' : 'actionableListDataset.offset:' + params.body.actionableListDataset.offset) + '::' + (params.body.actionableListDataset.orderBy === undefined ? 'actionableListDataset.orderBy' : 'actionableListDataset.orderBy:' + params.body.actionableListDataset.orderBy) + '::' + (params.body.actionableListDataset.queryType === undefined ? 'actionableListDataset.queryType' : 'actionableListDataset.queryType:' + params.body.actionableListDataset.queryType) + '::' + (params.body.actionableListDataset.rowLimit === undefined ? 'actionableListDataset.rowLimit' : 'actionableListDataset.rowLimit:' + params.body.actionableListDataset.rowLimit) + '::' + (params.body.actionableListDataset.shouldReturnCurrencyCode === undefined ? 'actionableListDataset.shouldReturnCurrencyCode' : 'actionableListDataset.shouldReturnCurrencyCode:' + params.body.actionableListDataset.shouldReturnCurrencyCode) + '::' + (params.body.actionableListDataset.sortOrder === undefined ? 'actionableListDataset.sortOrder' : 'actionableListDataset.sortOrder:' + params.body.actionableListDataset.sortOrder) + ')';
|
|
2833
|
+
}
|
|
2834
|
+
function getResponseCacheKeys(luvio, resourceParams, response) {
|
|
2835
|
+
return getTypeCacheKeys(luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
2836
|
+
}
|
|
2837
|
+
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
2838
|
+
const { body } = response;
|
|
2839
|
+
const key = keyBuilder$1(luvio, resourceParams);
|
|
2840
|
+
luvio.storeIngest(key, ingest, body);
|
|
2841
|
+
const snapshot = luvio.storeLookup({
|
|
2842
|
+
recordId: key,
|
|
2843
|
+
node: select(),
|
|
2844
|
+
variables: {},
|
|
2845
|
+
}, snapshotRefresh);
|
|
2846
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2847
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
2848
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
2849
|
+
}
|
|
2850
|
+
}
|
|
2851
|
+
return snapshot;
|
|
2852
|
+
}
|
|
2853
|
+
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
2854
|
+
const key = keyBuilder$1(luvio, params);
|
|
2855
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2856
|
+
const storeMetadataParams = {
|
|
2857
|
+
ttl: TTL,
|
|
2858
|
+
namespace: keyPrefix,
|
|
2859
|
+
version: VERSION,
|
|
2860
|
+
representationName: RepresentationType
|
|
2861
|
+
};
|
|
2862
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
2863
|
+
return errorSnapshot;
|
|
2864
|
+
}
|
|
2865
|
+
function createResourceRequest(config) {
|
|
2866
|
+
const headers = {};
|
|
2867
|
+
return {
|
|
2868
|
+
baseUri: '/services/data/v58.0',
|
|
2869
|
+
basePath: '/connect/actionable-list-definition/rows',
|
|
2870
|
+
method: 'post',
|
|
2871
|
+
body: config.body,
|
|
2872
|
+
urlParams: {},
|
|
2873
|
+
queryParams: {},
|
|
2874
|
+
headers,
|
|
2875
|
+
priority: 'normal',
|
|
2876
|
+
};
|
|
2877
|
+
}
|
|
2878
|
+
|
|
2879
|
+
const getActionableListDatasetInfo_ConfigPropertyNames = {
|
|
2880
|
+
displayName: 'getActionableListDatasetInfo',
|
|
2881
|
+
parameters: {
|
|
2882
|
+
required: ['actionableListDataset'],
|
|
2883
|
+
optional: []
|
|
2884
|
+
}
|
|
2885
|
+
};
|
|
2886
|
+
function createResourceParams(config) {
|
|
2887
|
+
const resourceParams = {
|
|
2888
|
+
body: {
|
|
2889
|
+
actionableListDataset: config.actionableListDataset
|
|
2890
|
+
}
|
|
2891
|
+
};
|
|
2892
|
+
return resourceParams;
|
|
2893
|
+
}
|
|
2894
|
+
function keyBuilder(luvio, config) {
|
|
2895
|
+
const resourceParams = createResourceParams(config);
|
|
2896
|
+
return keyBuilder$1(luvio, resourceParams);
|
|
2897
|
+
}
|
|
2898
|
+
function typeCheckConfig(untrustedConfig) {
|
|
2899
|
+
const config = {};
|
|
2900
|
+
const untrustedConfig_actionableListDataset = untrustedConfig.actionableListDataset;
|
|
2901
|
+
const referenceActionableListDatasetInputRepresentationValidationError = validate$4(untrustedConfig_actionableListDataset);
|
|
2902
|
+
if (referenceActionableListDatasetInputRepresentationValidationError === null) {
|
|
2903
|
+
config.actionableListDataset = untrustedConfig_actionableListDataset;
|
|
2904
|
+
}
|
|
2905
|
+
return config;
|
|
2906
|
+
}
|
|
2907
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
2908
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
2909
|
+
return null;
|
|
2910
|
+
}
|
|
2911
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2912
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
2913
|
+
}
|
|
2914
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
2915
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2916
|
+
return null;
|
|
2917
|
+
}
|
|
2918
|
+
return config;
|
|
2919
|
+
}
|
|
2920
|
+
function adapterFragment(luvio, config) {
|
|
2921
|
+
createResourceParams(config);
|
|
2922
|
+
return select();
|
|
2923
|
+
}
|
|
2924
|
+
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
2925
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
2926
|
+
config,
|
|
2927
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
2928
|
+
});
|
|
2929
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2930
|
+
}
|
|
2931
|
+
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
2932
|
+
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
2933
|
+
config,
|
|
2934
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
2935
|
+
});
|
|
2936
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2937
|
+
}
|
|
2938
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
2939
|
+
const resourceParams = createResourceParams(config);
|
|
2940
|
+
const request = createResourceRequest(resourceParams);
|
|
2941
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
2942
|
+
.then((response) => {
|
|
2943
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => getResponseCacheKeys(luvio, resourceParams, response.body));
|
|
2944
|
+
}, (response) => {
|
|
2945
|
+
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
2946
|
+
});
|
|
2947
|
+
}
|
|
2948
|
+
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
2949
|
+
const { luvio, config } = context;
|
|
2950
|
+
const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
|
|
2951
|
+
const dispatchOptions = {
|
|
2952
|
+
resourceRequestContext: {
|
|
2953
|
+
requestCorrelator,
|
|
2954
|
+
luvioRequestMethod: 'get',
|
|
2955
|
+
},
|
|
2956
|
+
eventObservers
|
|
2957
|
+
};
|
|
2958
|
+
if (networkPriority !== 'normal') {
|
|
2959
|
+
dispatchOptions.overrides = {
|
|
2960
|
+
priority: networkPriority
|
|
2961
|
+
};
|
|
2962
|
+
}
|
|
2963
|
+
return buildNetworkSnapshot(luvio, config, dispatchOptions);
|
|
2964
|
+
}
|
|
2965
|
+
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
2966
|
+
const { luvio, config } = context;
|
|
2967
|
+
const selector = {
|
|
2968
|
+
recordId: keyBuilder(luvio, config),
|
|
2969
|
+
node: adapterFragment(luvio, config),
|
|
2970
|
+
variables: {},
|
|
2971
|
+
};
|
|
2972
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
2973
|
+
config,
|
|
2974
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
2975
|
+
});
|
|
2976
|
+
return cacheSnapshot;
|
|
2977
|
+
}
|
|
2978
|
+
const getActionableListDatasetInfoAdapterFactory = (luvio) => function actionablelist__getActionableListDatasetInfo(untrustedConfig, requestContext) {
|
|
2979
|
+
const config = validateAdapterConfig(untrustedConfig, getActionableListDatasetInfo_ConfigPropertyNames);
|
|
2980
|
+
// Invalid or incomplete config
|
|
2981
|
+
if (config === null) {
|
|
2982
|
+
return null;
|
|
2983
|
+
}
|
|
2984
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2985
|
+
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
2986
|
+
};
|
|
2987
|
+
|
|
2988
|
+
export { createActionableListDefinitionAdapterFactory, getActionableListDatasetInfoAdapterFactory, getActionableListDefinitionsAdapterFactory, getActionableListMembersAdapterFactory, upsertActionableListAdapterFactory };
|