@salesforce/lds-adapters-analytics-unifiedanalytics 1.298.0 → 1.299.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/dist/es/es2018/analytics-unifiedanalytics.js +1400 -670
- package/dist/es/es2018/types/src/generated/adapters/createDashboard.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/adapters/getFlowByName.d.ts +27 -0
- package/dist/es/es2018/types/src/generated/adapters/getFlows.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/adapters/queryAssets.d.ts +3 -1
- package/dist/es/es2018/types/src/generated/adapters/updateDashboard.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +5 -1
- package/dist/es/es2018/types/src/generated/resources/getUnifiedAnalyticsFlows.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/resources/getUnifiedAnalyticsFlowsByFlowApiName.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/resources/patchUnifiedAnalyticsDashboardsByDashboardIdOrApiName.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/resources/postUnifiedAnalyticsAssetsQuery.d.ts +3 -1
- package/dist/es/es2018/types/src/generated/resources/postUnifiedAnalyticsDashboards.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/types/AnalyticsAssetsQueryInputRepresentation.d.ts +7 -3
- package/dist/es/es2018/types/src/generated/types/AnalyticsAssetsQueryResultsItemRepresentation.d.ts +18 -15
- package/dist/es/es2018/types/src/generated/types/DashboardInputRepresentation.d.ts +4 -1
- package/dist/es/es2018/types/src/generated/types/DashboardRepresentation.d.ts +4 -1
- package/dist/es/es2018/types/src/generated/types/FlowCollectionRepresentation.d.ts +38 -0
- package/dist/es/es2018/types/src/generated/types/FlowMetadataRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/FlowRepresentation.d.ts +49 -0
- package/dist/es/es2018/types/src/generated/types/FlowVariableRepresentation.d.ts +53 -0
- package/package.json +3 -3
- package/sfdc/index.js +1201 -455
- package/src/raml/api.raml +150 -14
- package/src/raml/luvio.raml +13 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$l, typeCheckConfig as typeCheckConfig$l, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$9 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -93,7 +93,7 @@ function createLink(ref) {
|
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
function validate$
|
|
96
|
+
function validate$i(obj, path = 'BaseAnalyticsRepresentation') {
|
|
97
97
|
const v_error = (() => {
|
|
98
98
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
99
99
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -128,8 +128,8 @@ function validate$e(obj, path = 'BaseAnalyticsRepresentation') {
|
|
|
128
128
|
return v_error === undefined ? null : v_error;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
function validate$
|
|
132
|
-
const validateBaseAnalyticsRepresentation_validateError = validate$
|
|
131
|
+
function validate$h(obj, path = 'AnalyticsUserRepresentation') {
|
|
132
|
+
const validateBaseAnalyticsRepresentation_validateError = validate$i(obj, path);
|
|
133
133
|
if (validateBaseAnalyticsRepresentation_validateError !== null) {
|
|
134
134
|
return validateBaseAnalyticsRepresentation_validateError;
|
|
135
135
|
}
|
|
@@ -169,8 +169,8 @@ function validate$d(obj, path = 'AnalyticsUserRepresentation') {
|
|
|
169
169
|
return v_error === undefined ? null : v_error;
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
function validate$
|
|
173
|
-
const validateBaseAnalyticsRepresentation_validateError = validate$
|
|
172
|
+
function validate$g(obj, path = 'AnalyticsAssetsQueryResultsWorkspaceRepresentation') {
|
|
173
|
+
const validateBaseAnalyticsRepresentation_validateError = validate$i(obj, path);
|
|
174
174
|
if (validateBaseAnalyticsRepresentation_validateError !== null) {
|
|
175
175
|
return validateBaseAnalyticsRepresentation_validateError;
|
|
176
176
|
}
|
|
@@ -182,8 +182,8 @@ function validate$c(obj, path = 'AnalyticsAssetsQueryResultsWorkspaceRepresentat
|
|
|
182
182
|
return v_error === undefined ? null : v_error;
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
-
function validate$
|
|
186
|
-
const validateBaseAnalyticsRepresentation_validateError = validate$
|
|
185
|
+
function validate$f(obj, path = 'AnalyticsAssetsQueryResultsItemRepresentation') {
|
|
186
|
+
const validateBaseAnalyticsRepresentation_validateError = validate$i(obj, path);
|
|
187
187
|
if (validateBaseAnalyticsRepresentation_validateError !== null) {
|
|
188
188
|
return validateBaseAnalyticsRepresentation_validateError;
|
|
189
189
|
}
|
|
@@ -191,60 +191,221 @@ function validate$b(obj, path = 'AnalyticsAssetsQueryResultsItemRepresentation')
|
|
|
191
191
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
192
192
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
193
193
|
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
194
|
+
if (obj.assetType !== undefined) {
|
|
195
|
+
const obj_assetType = obj.assetType;
|
|
196
|
+
const path_assetType = path + '.assetType';
|
|
197
|
+
let obj_assetType_union0 = null;
|
|
198
|
+
const obj_assetType_union0_error = (() => {
|
|
199
|
+
if (typeof obj_assetType !== 'string') {
|
|
200
|
+
return new TypeError('Expected "string" but received "' + typeof obj_assetType + '" (at "' + path_assetType + '")');
|
|
201
|
+
}
|
|
202
|
+
})();
|
|
203
|
+
if (obj_assetType_union0_error != null) {
|
|
204
|
+
obj_assetType_union0 = obj_assetType_union0_error.message;
|
|
205
|
+
}
|
|
206
|
+
let obj_assetType_union1 = null;
|
|
207
|
+
const obj_assetType_union1_error = (() => {
|
|
208
|
+
if (obj_assetType !== null) {
|
|
209
|
+
return new TypeError('Expected "null" but received "' + typeof obj_assetType + '" (at "' + path_assetType + '")');
|
|
210
|
+
}
|
|
211
|
+
})();
|
|
212
|
+
if (obj_assetType_union1_error != null) {
|
|
213
|
+
obj_assetType_union1 = obj_assetType_union1_error.message;
|
|
214
|
+
}
|
|
215
|
+
if (obj_assetType_union0 && obj_assetType_union1) {
|
|
216
|
+
let message = 'Object doesn\'t match union (at "' + path_assetType + '")';
|
|
217
|
+
message += '\n' + obj_assetType_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
218
|
+
message += '\n' + obj_assetType_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
219
|
+
return new TypeError(message);
|
|
220
|
+
}
|
|
198
221
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
222
|
+
if (obj.createdBy !== undefined) {
|
|
223
|
+
const obj_createdBy = obj.createdBy;
|
|
224
|
+
const path_createdBy = path + '.createdBy';
|
|
225
|
+
let obj_createdBy_union0 = null;
|
|
226
|
+
const obj_createdBy_union0_error = (() => {
|
|
227
|
+
const referencepath_createdByValidationError = validate$h(obj_createdBy, path_createdBy);
|
|
228
|
+
if (referencepath_createdByValidationError !== null) {
|
|
229
|
+
let message = 'Object doesn\'t match AnalyticsUserRepresentation (at "' + path_createdBy + '")\n';
|
|
230
|
+
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
231
|
+
return new TypeError(message);
|
|
232
|
+
}
|
|
233
|
+
})();
|
|
234
|
+
if (obj_createdBy_union0_error != null) {
|
|
235
|
+
obj_createdBy_union0 = obj_createdBy_union0_error.message;
|
|
236
|
+
}
|
|
237
|
+
let obj_createdBy_union1 = null;
|
|
238
|
+
const obj_createdBy_union1_error = (() => {
|
|
239
|
+
if (obj_createdBy !== null) {
|
|
240
|
+
return new TypeError('Expected "null" but received "' + typeof obj_createdBy + '" (at "' + path_createdBy + '")');
|
|
241
|
+
}
|
|
242
|
+
})();
|
|
243
|
+
if (obj_createdBy_union1_error != null) {
|
|
244
|
+
obj_createdBy_union1 = obj_createdBy_union1_error.message;
|
|
245
|
+
}
|
|
246
|
+
if (obj_createdBy_union0 && obj_createdBy_union1) {
|
|
247
|
+
let message = 'Object doesn\'t match union (at "' + path_createdBy + '")';
|
|
248
|
+
message += '\n' + obj_createdBy_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
249
|
+
message += '\n' + obj_createdBy_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
250
|
+
return new TypeError(message);
|
|
251
|
+
}
|
|
206
252
|
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
253
|
+
if (obj.createdDate !== undefined) {
|
|
254
|
+
const obj_createdDate = obj.createdDate;
|
|
255
|
+
const path_createdDate = path + '.createdDate';
|
|
256
|
+
let obj_createdDate_union0 = null;
|
|
257
|
+
const obj_createdDate_union0_error = (() => {
|
|
258
|
+
if (typeof obj_createdDate !== 'string') {
|
|
259
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
260
|
+
}
|
|
261
|
+
})();
|
|
262
|
+
if (obj_createdDate_union0_error != null) {
|
|
263
|
+
obj_createdDate_union0 = obj_createdDate_union0_error.message;
|
|
264
|
+
}
|
|
265
|
+
let obj_createdDate_union1 = null;
|
|
266
|
+
const obj_createdDate_union1_error = (() => {
|
|
267
|
+
if (obj_createdDate !== null) {
|
|
268
|
+
return new TypeError('Expected "null" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
269
|
+
}
|
|
270
|
+
})();
|
|
271
|
+
if (obj_createdDate_union1_error != null) {
|
|
272
|
+
obj_createdDate_union1 = obj_createdDate_union1_error.message;
|
|
273
|
+
}
|
|
274
|
+
if (obj_createdDate_union0 && obj_createdDate_union1) {
|
|
275
|
+
let message = 'Object doesn\'t match union (at "' + path_createdDate + '")';
|
|
276
|
+
message += '\n' + obj_createdDate_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
277
|
+
message += '\n' + obj_createdDate_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
278
|
+
return new TypeError(message);
|
|
279
|
+
}
|
|
211
280
|
}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
281
|
+
if (obj.lastModifiedBy !== undefined) {
|
|
282
|
+
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
283
|
+
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
284
|
+
let obj_lastModifiedBy_union0 = null;
|
|
285
|
+
const obj_lastModifiedBy_union0_error = (() => {
|
|
286
|
+
const referencepath_lastModifiedByValidationError = validate$h(obj_lastModifiedBy, path_lastModifiedBy);
|
|
287
|
+
if (referencepath_lastModifiedByValidationError !== null) {
|
|
288
|
+
let message = 'Object doesn\'t match AnalyticsUserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
289
|
+
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
290
|
+
return new TypeError(message);
|
|
291
|
+
}
|
|
292
|
+
})();
|
|
293
|
+
if (obj_lastModifiedBy_union0_error != null) {
|
|
294
|
+
obj_lastModifiedBy_union0 = obj_lastModifiedBy_union0_error.message;
|
|
295
|
+
}
|
|
296
|
+
let obj_lastModifiedBy_union1 = null;
|
|
297
|
+
const obj_lastModifiedBy_union1_error = (() => {
|
|
298
|
+
if (obj_lastModifiedBy !== null) {
|
|
299
|
+
return new TypeError('Expected "null" but received "' + typeof obj_lastModifiedBy + '" (at "' + path_lastModifiedBy + '")');
|
|
300
|
+
}
|
|
301
|
+
})();
|
|
302
|
+
if (obj_lastModifiedBy_union1_error != null) {
|
|
303
|
+
obj_lastModifiedBy_union1 = obj_lastModifiedBy_union1_error.message;
|
|
304
|
+
}
|
|
305
|
+
if (obj_lastModifiedBy_union0 && obj_lastModifiedBy_union1) {
|
|
306
|
+
let message = 'Object doesn\'t match union (at "' + path_lastModifiedBy + '")';
|
|
307
|
+
message += '\n' + obj_lastModifiedBy_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
308
|
+
message += '\n' + obj_lastModifiedBy_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
309
|
+
return new TypeError(message);
|
|
310
|
+
}
|
|
219
311
|
}
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
312
|
+
if (obj.lastModifiedDate !== undefined) {
|
|
313
|
+
const obj_lastModifiedDate = obj.lastModifiedDate;
|
|
314
|
+
const path_lastModifiedDate = path + '.lastModifiedDate';
|
|
315
|
+
let obj_lastModifiedDate_union0 = null;
|
|
316
|
+
const obj_lastModifiedDate_union0_error = (() => {
|
|
317
|
+
if (typeof obj_lastModifiedDate !== 'string') {
|
|
318
|
+
return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
319
|
+
}
|
|
320
|
+
})();
|
|
321
|
+
if (obj_lastModifiedDate_union0_error != null) {
|
|
322
|
+
obj_lastModifiedDate_union0 = obj_lastModifiedDate_union0_error.message;
|
|
323
|
+
}
|
|
324
|
+
let obj_lastModifiedDate_union1 = null;
|
|
325
|
+
const obj_lastModifiedDate_union1_error = (() => {
|
|
326
|
+
if (obj_lastModifiedDate !== null) {
|
|
327
|
+
return new TypeError('Expected "null" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
|
|
328
|
+
}
|
|
329
|
+
})();
|
|
330
|
+
if (obj_lastModifiedDate_union1_error != null) {
|
|
331
|
+
obj_lastModifiedDate_union1 = obj_lastModifiedDate_union1_error.message;
|
|
332
|
+
}
|
|
333
|
+
if (obj_lastModifiedDate_union0 && obj_lastModifiedDate_union1) {
|
|
334
|
+
let message = 'Object doesn\'t match union (at "' + path_lastModifiedDate + '")';
|
|
335
|
+
message += '\n' + obj_lastModifiedDate_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
336
|
+
message += '\n' + obj_lastModifiedDate_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
337
|
+
return new TypeError(message);
|
|
338
|
+
}
|
|
232
339
|
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
340
|
+
if (obj.owner !== undefined) {
|
|
341
|
+
const obj_owner = obj.owner;
|
|
342
|
+
const path_owner = path + '.owner';
|
|
343
|
+
let obj_owner_union0 = null;
|
|
344
|
+
const obj_owner_union0_error = (() => {
|
|
345
|
+
const referencepath_ownerValidationError = validate$h(obj_owner, path_owner);
|
|
346
|
+
if (referencepath_ownerValidationError !== null) {
|
|
347
|
+
let message = 'Object doesn\'t match AnalyticsUserRepresentation (at "' + path_owner + '")\n';
|
|
348
|
+
message += referencepath_ownerValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
349
|
+
return new TypeError(message);
|
|
350
|
+
}
|
|
351
|
+
})();
|
|
352
|
+
if (obj_owner_union0_error != null) {
|
|
353
|
+
obj_owner_union0 = obj_owner_union0_error.message;
|
|
354
|
+
}
|
|
355
|
+
let obj_owner_union1 = null;
|
|
356
|
+
const obj_owner_union1_error = (() => {
|
|
357
|
+
if (obj_owner !== null) {
|
|
358
|
+
return new TypeError('Expected "null" but received "' + typeof obj_owner + '" (at "' + path_owner + '")');
|
|
359
|
+
}
|
|
360
|
+
})();
|
|
361
|
+
if (obj_owner_union1_error != null) {
|
|
362
|
+
obj_owner_union1 = obj_owner_union1_error.message;
|
|
363
|
+
}
|
|
364
|
+
if (obj_owner_union0 && obj_owner_union1) {
|
|
365
|
+
let message = 'Object doesn\'t match union (at "' + path_owner + '")';
|
|
366
|
+
message += '\n' + obj_owner_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
367
|
+
message += '\n' + obj_owner_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
368
|
+
return new TypeError(message);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
if (obj.workspace !== undefined) {
|
|
372
|
+
const obj_workspace = obj.workspace;
|
|
373
|
+
const path_workspace = path + '.workspace';
|
|
374
|
+
let obj_workspace_union0 = null;
|
|
375
|
+
const obj_workspace_union0_error = (() => {
|
|
376
|
+
const referencepath_workspaceValidationError = validate$g(obj_workspace, path_workspace);
|
|
377
|
+
if (referencepath_workspaceValidationError !== null) {
|
|
378
|
+
let message = 'Object doesn\'t match AnalyticsAssetsQueryResultsWorkspaceRepresentation (at "' + path_workspace + '")\n';
|
|
379
|
+
message += referencepath_workspaceValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
380
|
+
return new TypeError(message);
|
|
381
|
+
}
|
|
382
|
+
})();
|
|
383
|
+
if (obj_workspace_union0_error != null) {
|
|
384
|
+
obj_workspace_union0 = obj_workspace_union0_error.message;
|
|
385
|
+
}
|
|
386
|
+
let obj_workspace_union1 = null;
|
|
387
|
+
const obj_workspace_union1_error = (() => {
|
|
388
|
+
if (obj_workspace !== null) {
|
|
389
|
+
return new TypeError('Expected "null" but received "' + typeof obj_workspace + '" (at "' + path_workspace + '")');
|
|
390
|
+
}
|
|
391
|
+
})();
|
|
392
|
+
if (obj_workspace_union1_error != null) {
|
|
393
|
+
obj_workspace_union1 = obj_workspace_union1_error.message;
|
|
394
|
+
}
|
|
395
|
+
if (obj_workspace_union0 && obj_workspace_union1) {
|
|
396
|
+
let message = 'Object doesn\'t match union (at "' + path_workspace + '")';
|
|
397
|
+
message += '\n' + obj_workspace_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
398
|
+
message += '\n' + obj_workspace_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
399
|
+
return new TypeError(message);
|
|
400
|
+
}
|
|
240
401
|
}
|
|
241
402
|
})();
|
|
242
403
|
return v_error === undefined ? null : v_error;
|
|
243
404
|
}
|
|
244
405
|
|
|
245
406
|
const TTL$2 = 500;
|
|
246
|
-
const VERSION$
|
|
247
|
-
function validate$
|
|
407
|
+
const VERSION$b = "ed60d9cca169a3e5ed897c67d11a23db";
|
|
408
|
+
function validate$e(obj, path = 'AnalyticsAssetsQueryResultsRepresentation') {
|
|
248
409
|
const v_error = (() => {
|
|
249
410
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
250
411
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -257,7 +418,7 @@ function validate$a(obj, path = 'AnalyticsAssetsQueryResultsRepresentation') {
|
|
|
257
418
|
for (let i = 0; i < obj_items.length; i++) {
|
|
258
419
|
const obj_items_item = obj_items[i];
|
|
259
420
|
const path_items_item = path_items + '[' + i + ']';
|
|
260
|
-
const referencepath_items_itemValidationError = validate$
|
|
421
|
+
const referencepath_items_itemValidationError = validate$f(obj_items_item, path_items_item);
|
|
261
422
|
if (referencepath_items_itemValidationError !== null) {
|
|
262
423
|
let message = 'Object doesn\'t match AnalyticsAssetsQueryResultsItemRepresentation (at "' + path_items_item + '")\n';
|
|
263
424
|
message += referencepath_items_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -282,68 +443,68 @@ function validate$a(obj, path = 'AnalyticsAssetsQueryResultsRepresentation') {
|
|
|
282
443
|
})();
|
|
283
444
|
return v_error === undefined ? null : v_error;
|
|
284
445
|
}
|
|
285
|
-
const RepresentationType$
|
|
286
|
-
function keyBuilder$
|
|
287
|
-
return keyPrefix + '::' + RepresentationType$
|
|
446
|
+
const RepresentationType$b = 'AnalyticsAssetsQueryResultsRepresentation';
|
|
447
|
+
function keyBuilder$s(luvio, config) {
|
|
448
|
+
return keyPrefix + '::' + RepresentationType$b + ':' + config.searchId;
|
|
288
449
|
}
|
|
289
450
|
function keyBuilderFromType$6(luvio, object) {
|
|
290
451
|
const keyParams = {
|
|
291
452
|
searchId: object.queryKey
|
|
292
453
|
};
|
|
293
|
-
return keyBuilder$
|
|
454
|
+
return keyBuilder$s(luvio, keyParams);
|
|
294
455
|
}
|
|
295
|
-
function normalize$
|
|
456
|
+
function normalize$b(input, existing, path, luvio, store, timestamp) {
|
|
296
457
|
return input;
|
|
297
458
|
}
|
|
298
|
-
const select$
|
|
459
|
+
const select$s = function AnalyticsAssetsQueryResultsRepresentationSelect() {
|
|
299
460
|
return {
|
|
300
461
|
kind: 'Fragment',
|
|
301
|
-
version: VERSION$
|
|
462
|
+
version: VERSION$b,
|
|
302
463
|
private: [],
|
|
303
464
|
opaque: true
|
|
304
465
|
};
|
|
305
466
|
};
|
|
306
|
-
function equals$
|
|
467
|
+
function equals$b(existing, incoming) {
|
|
307
468
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
308
469
|
return false;
|
|
309
470
|
}
|
|
310
471
|
return true;
|
|
311
472
|
}
|
|
312
|
-
const ingest$
|
|
473
|
+
const ingest$b = function AnalyticsAssetsQueryResultsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
313
474
|
if (process.env.NODE_ENV !== 'production') {
|
|
314
|
-
const validateError = validate$
|
|
475
|
+
const validateError = validate$e(input);
|
|
315
476
|
if (validateError !== null) {
|
|
316
477
|
throw validateError;
|
|
317
478
|
}
|
|
318
479
|
}
|
|
319
480
|
const key = keyBuilderFromType$6(luvio, input);
|
|
320
481
|
const ttlToUse = TTL$2;
|
|
321
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
482
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$b, "UnifiedAnalytics", VERSION$b, RepresentationType$b, equals$b);
|
|
322
483
|
return createLink(key);
|
|
323
484
|
};
|
|
324
|
-
function getTypeCacheKeys$
|
|
485
|
+
function getTypeCacheKeys$b(rootKeySet, luvio, input, fullPathFactory) {
|
|
325
486
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
326
487
|
const rootKey = keyBuilderFromType$6(luvio, input);
|
|
327
488
|
rootKeySet.set(rootKey, {
|
|
328
489
|
namespace: keyPrefix,
|
|
329
|
-
representationName: RepresentationType$
|
|
490
|
+
representationName: RepresentationType$b,
|
|
330
491
|
mergeable: false
|
|
331
492
|
});
|
|
332
493
|
}
|
|
333
494
|
|
|
334
|
-
function select$
|
|
335
|
-
return select$
|
|
495
|
+
function select$r(luvio, params) {
|
|
496
|
+
return select$s();
|
|
336
497
|
}
|
|
337
|
-
function getResponseCacheKeys$
|
|
338
|
-
getTypeCacheKeys$
|
|
498
|
+
function getResponseCacheKeys$k(storeKeyMap, luvio, resourceParams, response) {
|
|
499
|
+
getTypeCacheKeys$b(storeKeyMap, luvio, response);
|
|
339
500
|
}
|
|
340
|
-
function ingestSuccess$
|
|
501
|
+
function ingestSuccess$g(luvio, resourceParams, response) {
|
|
341
502
|
const { body } = response;
|
|
342
503
|
const key = keyBuilderFromType$6(luvio, body);
|
|
343
|
-
luvio.storeIngest(key, ingest$
|
|
504
|
+
luvio.storeIngest(key, ingest$b, body);
|
|
344
505
|
const snapshot = luvio.storeLookup({
|
|
345
506
|
recordId: key,
|
|
346
|
-
node: select$
|
|
507
|
+
node: select$r(),
|
|
347
508
|
variables: {},
|
|
348
509
|
});
|
|
349
510
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -354,7 +515,7 @@ function ingestSuccess$e(luvio, resourceParams, response) {
|
|
|
354
515
|
deepFreeze(snapshot.data);
|
|
355
516
|
return snapshot;
|
|
356
517
|
}
|
|
357
|
-
function createResourceRequest$
|
|
518
|
+
function createResourceRequest$k(config) {
|
|
358
519
|
const headers = {};
|
|
359
520
|
return {
|
|
360
521
|
baseUri: '/services/data/v62.0',
|
|
@@ -368,7 +529,7 @@ function createResourceRequest$i(config) {
|
|
|
368
529
|
};
|
|
369
530
|
}
|
|
370
531
|
|
|
371
|
-
const adapterName$
|
|
532
|
+
const adapterName$k = 'queryAssets';
|
|
372
533
|
const queryAssets_ConfigPropertyMetadata = [
|
|
373
534
|
generateParamConfigMetadata('filters', true, 2 /* Body */, 4 /* Unsupported */),
|
|
374
535
|
generateParamConfigMetadata('limit', true, 2 /* Body */, 3 /* Integer */),
|
|
@@ -377,44 +538,52 @@ const queryAssets_ConfigPropertyMetadata = [
|
|
|
377
538
|
generateParamConfigMetadata('searchTerm', true, 2 /* Body */, 0 /* String */),
|
|
378
539
|
generateParamConfigMetadata('sortDirection', true, 2 /* Body */, 0 /* String */),
|
|
379
540
|
];
|
|
380
|
-
const queryAssets_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
381
|
-
const createResourceParams$
|
|
382
|
-
function typeCheckConfig$
|
|
541
|
+
const queryAssets_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$k, queryAssets_ConfigPropertyMetadata);
|
|
542
|
+
const createResourceParams$k = /*#__PURE__*/ createResourceParams$l(queryAssets_ConfigPropertyMetadata);
|
|
543
|
+
function typeCheckConfig$k(untrustedConfig) {
|
|
383
544
|
const config = {};
|
|
384
|
-
typeCheckConfig$
|
|
545
|
+
typeCheckConfig$l(untrustedConfig, config, queryAssets_ConfigPropertyMetadata);
|
|
385
546
|
const untrustedConfig_filters = untrustedConfig.filters;
|
|
386
547
|
if (untrustedIsObject(untrustedConfig_filters)) {
|
|
387
548
|
const untrustedConfig_filters_object = {};
|
|
549
|
+
const untrustedConfig_filters_keys = Object.keys(untrustedConfig_filters);
|
|
550
|
+
for (let i = 0, arrayLength = untrustedConfig_filters_keys.length; i < arrayLength; i++) {
|
|
551
|
+
const key = untrustedConfig_filters_keys[i];
|
|
552
|
+
const untrustedConfig_filters_prop = untrustedConfig_filters[key];
|
|
553
|
+
if (untrustedConfig_filters_object !== undefined) {
|
|
554
|
+
untrustedConfig_filters_object[key] = untrustedConfig_filters_prop;
|
|
555
|
+
}
|
|
556
|
+
}
|
|
388
557
|
if (untrustedConfig_filters_object !== undefined && Object.keys(untrustedConfig_filters_object).length >= 0) {
|
|
389
558
|
config.filters = untrustedConfig_filters_object;
|
|
390
559
|
}
|
|
391
560
|
}
|
|
392
561
|
return config;
|
|
393
562
|
}
|
|
394
|
-
function validateAdapterConfig$
|
|
563
|
+
function validateAdapterConfig$k(untrustedConfig, configPropertyNames) {
|
|
395
564
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
396
565
|
return null;
|
|
397
566
|
}
|
|
398
567
|
if (process.env.NODE_ENV !== 'production') {
|
|
399
568
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
400
569
|
}
|
|
401
|
-
const config = typeCheckConfig$
|
|
570
|
+
const config = typeCheckConfig$k(untrustedConfig);
|
|
402
571
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
403
572
|
return null;
|
|
404
573
|
}
|
|
405
574
|
return config;
|
|
406
575
|
}
|
|
407
|
-
function buildNetworkSnapshot$
|
|
408
|
-
const resourceParams = createResourceParams$
|
|
409
|
-
const request = createResourceRequest$
|
|
576
|
+
function buildNetworkSnapshot$k(luvio, config, options) {
|
|
577
|
+
const resourceParams = createResourceParams$k(config);
|
|
578
|
+
const request = createResourceRequest$k(resourceParams);
|
|
410
579
|
return luvio.dispatchResourceRequest(request, options)
|
|
411
580
|
.then((response) => {
|
|
412
581
|
return luvio.handleSuccessResponse(() => {
|
|
413
|
-
const snapshot = ingestSuccess$
|
|
582
|
+
const snapshot = ingestSuccess$g(luvio, resourceParams, response);
|
|
414
583
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
415
584
|
}, () => {
|
|
416
585
|
const cache = new StoreKeyMap();
|
|
417
|
-
getResponseCacheKeys$
|
|
586
|
+
getResponseCacheKeys$k(cache, luvio, resourceParams, response.body);
|
|
418
587
|
return cache;
|
|
419
588
|
});
|
|
420
589
|
}, (response) => {
|
|
@@ -424,17 +593,17 @@ function buildNetworkSnapshot$i(luvio, config, options) {
|
|
|
424
593
|
}
|
|
425
594
|
const queryAssetsAdapterFactory = (luvio) => {
|
|
426
595
|
return function queryAssets(untrustedConfig) {
|
|
427
|
-
const config = validateAdapterConfig$
|
|
596
|
+
const config = validateAdapterConfig$k(untrustedConfig, queryAssets_ConfigPropertyNames);
|
|
428
597
|
// Invalid or incomplete config
|
|
429
598
|
if (config === null) {
|
|
430
599
|
throw new Error('Invalid config for "queryAssets"');
|
|
431
600
|
}
|
|
432
|
-
return buildNetworkSnapshot$
|
|
601
|
+
return buildNetworkSnapshot$k(luvio, config);
|
|
433
602
|
};
|
|
434
603
|
};
|
|
435
604
|
|
|
436
|
-
const VERSION$
|
|
437
|
-
function validate$
|
|
605
|
+
const VERSION$a = "fc427672813f447899a44458da684291";
|
|
606
|
+
function validate$d(obj, path = 'DashboardRepresentation') {
|
|
438
607
|
const v_error = (() => {
|
|
439
608
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
440
609
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -521,60 +690,67 @@ function validate$9(obj, path = 'DashboardRepresentation') {
|
|
|
521
690
|
return new TypeError('Expected "defined" but received "' + typeof obj_widgets_prop + '" (at "' + path_widgets_prop + '")');
|
|
522
691
|
}
|
|
523
692
|
}
|
|
693
|
+
if (obj.workspaceIdOrApiName !== undefined) {
|
|
694
|
+
const obj_workspaceIdOrApiName = obj.workspaceIdOrApiName;
|
|
695
|
+
const path_workspaceIdOrApiName = path + '.workspaceIdOrApiName';
|
|
696
|
+
if (typeof obj_workspaceIdOrApiName !== 'string') {
|
|
697
|
+
return new TypeError('Expected "string" but received "' + typeof obj_workspaceIdOrApiName + '" (at "' + path_workspaceIdOrApiName + '")');
|
|
698
|
+
}
|
|
699
|
+
}
|
|
524
700
|
})();
|
|
525
701
|
return v_error === undefined ? null : v_error;
|
|
526
702
|
}
|
|
527
|
-
const RepresentationType$
|
|
528
|
-
function keyBuilder$
|
|
529
|
-
return keyPrefix + '::' + RepresentationType$
|
|
703
|
+
const RepresentationType$a = 'DashboardRepresentation';
|
|
704
|
+
function keyBuilder$r(luvio, config) {
|
|
705
|
+
return keyPrefix + '::' + RepresentationType$a + ':' + config.name;
|
|
530
706
|
}
|
|
531
707
|
function keyBuilderFromType$5(luvio, object) {
|
|
532
708
|
const keyParams = {
|
|
533
709
|
name: object.cacheableKey
|
|
534
710
|
};
|
|
535
|
-
return keyBuilder$
|
|
711
|
+
return keyBuilder$r(luvio, keyParams);
|
|
536
712
|
}
|
|
537
|
-
function normalize$
|
|
713
|
+
function normalize$a(input, existing, path, luvio, store, timestamp) {
|
|
538
714
|
return input;
|
|
539
715
|
}
|
|
540
|
-
const select$
|
|
716
|
+
const select$q = function DashboardRepresentationSelect() {
|
|
541
717
|
return {
|
|
542
718
|
kind: 'Fragment',
|
|
543
|
-
version: VERSION$
|
|
719
|
+
version: VERSION$a,
|
|
544
720
|
private: [],
|
|
545
721
|
opaque: true
|
|
546
722
|
};
|
|
547
723
|
};
|
|
548
|
-
function equals$
|
|
724
|
+
function equals$a(existing, incoming) {
|
|
549
725
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
550
726
|
return false;
|
|
551
727
|
}
|
|
552
728
|
return true;
|
|
553
729
|
}
|
|
554
|
-
const ingest$
|
|
730
|
+
const ingest$a = function DashboardRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
555
731
|
if (process.env.NODE_ENV !== 'production') {
|
|
556
|
-
const validateError = validate$
|
|
732
|
+
const validateError = validate$d(input);
|
|
557
733
|
if (validateError !== null) {
|
|
558
734
|
throw validateError;
|
|
559
735
|
}
|
|
560
736
|
}
|
|
561
737
|
const key = keyBuilderFromType$5(luvio, input);
|
|
562
738
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
563
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
739
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$a, "UnifiedAnalytics", VERSION$a, RepresentationType$a, equals$a);
|
|
564
740
|
return createLink(key);
|
|
565
741
|
};
|
|
566
|
-
function getTypeCacheKeys$
|
|
742
|
+
function getTypeCacheKeys$a(rootKeySet, luvio, input, fullPathFactory) {
|
|
567
743
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
568
744
|
const rootKey = keyBuilderFromType$5(luvio, input);
|
|
569
745
|
rootKeySet.set(rootKey, {
|
|
570
746
|
namespace: keyPrefix,
|
|
571
|
-
representationName: RepresentationType$
|
|
747
|
+
representationName: RepresentationType$a,
|
|
572
748
|
mergeable: false
|
|
573
749
|
});
|
|
574
750
|
}
|
|
575
751
|
|
|
576
|
-
const VERSION$
|
|
577
|
-
function validate$
|
|
752
|
+
const VERSION$9 = "962823130e6a9315240ef0e0f0c5f757";
|
|
753
|
+
function validate$c(obj, path = 'DashboardCollectionRepresentation') {
|
|
578
754
|
const v_error = (() => {
|
|
579
755
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
580
756
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -594,14 +770,14 @@ function validate$8(obj, path = 'DashboardCollectionRepresentation') {
|
|
|
594
770
|
})();
|
|
595
771
|
return v_error === undefined ? null : v_error;
|
|
596
772
|
}
|
|
597
|
-
const RepresentationType$
|
|
598
|
-
function normalize$
|
|
773
|
+
const RepresentationType$9 = 'DashboardCollectionRepresentation';
|
|
774
|
+
function normalize$9(input, existing, path, luvio, store, timestamp) {
|
|
599
775
|
const input_dashboards = input.dashboards;
|
|
600
776
|
const input_dashboards_id = path.fullPath + '__dashboards';
|
|
601
777
|
for (let i = 0; i < input_dashboards.length; i++) {
|
|
602
778
|
const input_dashboards_item = input_dashboards[i];
|
|
603
779
|
let input_dashboards_item_id = input_dashboards_id + '__' + i;
|
|
604
|
-
input_dashboards[i] = ingest$
|
|
780
|
+
input_dashboards[i] = ingest$a(input_dashboards_item, {
|
|
605
781
|
fullPath: input_dashboards_item_id,
|
|
606
782
|
propertyName: i,
|
|
607
783
|
parent: {
|
|
@@ -614,22 +790,22 @@ function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
|
614
790
|
}
|
|
615
791
|
return input;
|
|
616
792
|
}
|
|
617
|
-
const select$
|
|
793
|
+
const select$p = function DashboardCollectionRepresentationSelect() {
|
|
618
794
|
return {
|
|
619
795
|
kind: 'Fragment',
|
|
620
|
-
version: VERSION$
|
|
796
|
+
version: VERSION$9,
|
|
621
797
|
private: [],
|
|
622
798
|
selections: [
|
|
623
799
|
{
|
|
624
800
|
name: 'dashboards',
|
|
625
801
|
kind: 'Link',
|
|
626
802
|
plural: true,
|
|
627
|
-
fragment: select$
|
|
803
|
+
fragment: select$q()
|
|
628
804
|
}
|
|
629
805
|
]
|
|
630
806
|
};
|
|
631
807
|
};
|
|
632
|
-
function equals$
|
|
808
|
+
function equals$9(existing, incoming) {
|
|
633
809
|
const existing_dashboards = existing.dashboards;
|
|
634
810
|
const incoming_dashboards = incoming.dashboards;
|
|
635
811
|
const equals_dashboards_items = equalsArray(existing_dashboards, incoming_dashboards, (existing_dashboards_item, incoming_dashboards_item) => {
|
|
@@ -642,48 +818,48 @@ function equals$7(existing, incoming) {
|
|
|
642
818
|
}
|
|
643
819
|
return true;
|
|
644
820
|
}
|
|
645
|
-
const ingest$
|
|
821
|
+
const ingest$9 = function DashboardCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
646
822
|
if (process.env.NODE_ENV !== 'production') {
|
|
647
|
-
const validateError = validate$
|
|
823
|
+
const validateError = validate$c(input);
|
|
648
824
|
if (validateError !== null) {
|
|
649
825
|
throw validateError;
|
|
650
826
|
}
|
|
651
827
|
}
|
|
652
828
|
const key = path.fullPath;
|
|
653
829
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
654
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
830
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$9, "UnifiedAnalytics", VERSION$9, RepresentationType$9, equals$9);
|
|
655
831
|
return createLink(key);
|
|
656
832
|
};
|
|
657
|
-
function getTypeCacheKeys$
|
|
833
|
+
function getTypeCacheKeys$9(rootKeySet, luvio, input, fullPathFactory) {
|
|
658
834
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
659
835
|
const rootKey = fullPathFactory();
|
|
660
836
|
rootKeySet.set(rootKey, {
|
|
661
837
|
namespace: keyPrefix,
|
|
662
|
-
representationName: RepresentationType$
|
|
838
|
+
representationName: RepresentationType$9,
|
|
663
839
|
mergeable: false
|
|
664
840
|
});
|
|
665
841
|
const input_dashboards_length = input.dashboards.length;
|
|
666
842
|
for (let i = 0; i < input_dashboards_length; i++) {
|
|
667
|
-
getTypeCacheKeys$
|
|
843
|
+
getTypeCacheKeys$a(rootKeySet, luvio, input.dashboards[i]);
|
|
668
844
|
}
|
|
669
845
|
}
|
|
670
846
|
|
|
671
|
-
function select$
|
|
672
|
-
return select$
|
|
847
|
+
function select$o(luvio, params) {
|
|
848
|
+
return select$p();
|
|
673
849
|
}
|
|
674
|
-
function keyBuilder$
|
|
850
|
+
function keyBuilder$q(luvio, params) {
|
|
675
851
|
return keyPrefix + '::DashboardCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ')';
|
|
676
852
|
}
|
|
677
|
-
function getResponseCacheKeys$
|
|
678
|
-
getTypeCacheKeys$
|
|
853
|
+
function getResponseCacheKeys$j(storeKeyMap, luvio, resourceParams, response) {
|
|
854
|
+
getTypeCacheKeys$9(storeKeyMap, luvio, response, () => keyBuilder$q(luvio, resourceParams));
|
|
679
855
|
}
|
|
680
|
-
function ingestSuccess$
|
|
856
|
+
function ingestSuccess$f(luvio, resourceParams, response, snapshotRefresh) {
|
|
681
857
|
const { body } = response;
|
|
682
|
-
const key = keyBuilder$
|
|
683
|
-
luvio.storeIngest(key, ingest$
|
|
858
|
+
const key = keyBuilder$q(luvio, resourceParams);
|
|
859
|
+
luvio.storeIngest(key, ingest$9, body);
|
|
684
860
|
const snapshot = luvio.storeLookup({
|
|
685
861
|
recordId: key,
|
|
686
|
-
node: select$
|
|
862
|
+
node: select$o(),
|
|
687
863
|
variables: {},
|
|
688
864
|
}, snapshotRefresh);
|
|
689
865
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -694,13 +870,13 @@ function ingestSuccess$d(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
694
870
|
deepFreeze(snapshot.data);
|
|
695
871
|
return snapshot;
|
|
696
872
|
}
|
|
697
|
-
function ingestError$
|
|
698
|
-
const key = keyBuilder$
|
|
873
|
+
function ingestError$8(luvio, params, error, snapshotRefresh) {
|
|
874
|
+
const key = keyBuilder$q(luvio, params);
|
|
699
875
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
700
876
|
luvio.storeIngestError(key, errorSnapshot);
|
|
701
877
|
return errorSnapshot;
|
|
702
878
|
}
|
|
703
|
-
function createResourceRequest$
|
|
879
|
+
function createResourceRequest$j(config) {
|
|
704
880
|
const headers = {};
|
|
705
881
|
return {
|
|
706
882
|
baseUri: '/services/data/v62.0',
|
|
@@ -714,106 +890,106 @@ function createResourceRequest$h(config) {
|
|
|
714
890
|
};
|
|
715
891
|
}
|
|
716
892
|
|
|
717
|
-
const adapterName$
|
|
893
|
+
const adapterName$j = 'getDashboards';
|
|
718
894
|
const getDashboards_ConfigPropertyMetadata = [
|
|
719
895
|
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
720
896
|
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
721
897
|
];
|
|
722
|
-
const getDashboards_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
723
|
-
const createResourceParams$
|
|
724
|
-
function keyBuilder$
|
|
725
|
-
const resourceParams = createResourceParams$
|
|
726
|
-
return keyBuilder$
|
|
898
|
+
const getDashboards_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$j, getDashboards_ConfigPropertyMetadata);
|
|
899
|
+
const createResourceParams$j = /*#__PURE__*/ createResourceParams$l(getDashboards_ConfigPropertyMetadata);
|
|
900
|
+
function keyBuilder$p(luvio, config) {
|
|
901
|
+
const resourceParams = createResourceParams$j(config);
|
|
902
|
+
return keyBuilder$q(luvio, resourceParams);
|
|
727
903
|
}
|
|
728
|
-
function typeCheckConfig$
|
|
904
|
+
function typeCheckConfig$j(untrustedConfig) {
|
|
729
905
|
const config = {};
|
|
730
|
-
typeCheckConfig$
|
|
906
|
+
typeCheckConfig$l(untrustedConfig, config, getDashboards_ConfigPropertyMetadata);
|
|
731
907
|
return config;
|
|
732
908
|
}
|
|
733
|
-
function validateAdapterConfig$
|
|
909
|
+
function validateAdapterConfig$j(untrustedConfig, configPropertyNames) {
|
|
734
910
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
735
911
|
return null;
|
|
736
912
|
}
|
|
737
913
|
if (process.env.NODE_ENV !== 'production') {
|
|
738
914
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
739
915
|
}
|
|
740
|
-
const config = typeCheckConfig$
|
|
916
|
+
const config = typeCheckConfig$j(untrustedConfig);
|
|
741
917
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
742
918
|
return null;
|
|
743
919
|
}
|
|
744
920
|
return config;
|
|
745
921
|
}
|
|
746
|
-
function adapterFragment$
|
|
747
|
-
createResourceParams$
|
|
748
|
-
return select$
|
|
922
|
+
function adapterFragment$8(luvio, config) {
|
|
923
|
+
createResourceParams$j(config);
|
|
924
|
+
return select$o();
|
|
749
925
|
}
|
|
750
|
-
function onFetchResponseSuccess$
|
|
751
|
-
const snapshot = ingestSuccess$
|
|
926
|
+
function onFetchResponseSuccess$8(luvio, config, resourceParams, response) {
|
|
927
|
+
const snapshot = ingestSuccess$f(luvio, resourceParams, response, {
|
|
752
928
|
config,
|
|
753
|
-
resolve: () => buildNetworkSnapshot$
|
|
929
|
+
resolve: () => buildNetworkSnapshot$j(luvio, config, snapshotRefreshOptions)
|
|
754
930
|
});
|
|
755
931
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
756
932
|
}
|
|
757
|
-
function onFetchResponseError$
|
|
758
|
-
const snapshot = ingestError$
|
|
933
|
+
function onFetchResponseError$8(luvio, config, resourceParams, response) {
|
|
934
|
+
const snapshot = ingestError$8(luvio, resourceParams, response, {
|
|
759
935
|
config,
|
|
760
|
-
resolve: () => buildNetworkSnapshot$
|
|
936
|
+
resolve: () => buildNetworkSnapshot$j(luvio, config, snapshotRefreshOptions)
|
|
761
937
|
});
|
|
762
938
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
763
939
|
}
|
|
764
|
-
function buildNetworkSnapshot$
|
|
765
|
-
const resourceParams = createResourceParams$
|
|
766
|
-
const request = createResourceRequest$
|
|
940
|
+
function buildNetworkSnapshot$j(luvio, config, options) {
|
|
941
|
+
const resourceParams = createResourceParams$j(config);
|
|
942
|
+
const request = createResourceRequest$j(resourceParams);
|
|
767
943
|
return luvio.dispatchResourceRequest(request, options)
|
|
768
944
|
.then((response) => {
|
|
769
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
945
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$8(luvio, config, resourceParams, response), () => {
|
|
770
946
|
const cache = new StoreKeyMap();
|
|
771
|
-
getResponseCacheKeys$
|
|
947
|
+
getResponseCacheKeys$j(cache, luvio, resourceParams, response.body);
|
|
772
948
|
return cache;
|
|
773
949
|
});
|
|
774
950
|
}, (response) => {
|
|
775
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
951
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$8(luvio, config, resourceParams, response));
|
|
776
952
|
});
|
|
777
953
|
}
|
|
778
|
-
function buildNetworkSnapshotCachePolicy$
|
|
779
|
-
return buildNetworkSnapshotCachePolicy$
|
|
954
|
+
function buildNetworkSnapshotCachePolicy$8(context, coercedAdapterRequestContext) {
|
|
955
|
+
return buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext, buildNetworkSnapshot$j, undefined, false);
|
|
780
956
|
}
|
|
781
|
-
function buildCachedSnapshotCachePolicy$
|
|
957
|
+
function buildCachedSnapshotCachePolicy$8(context, storeLookup) {
|
|
782
958
|
const { luvio, config } = context;
|
|
783
959
|
const selector = {
|
|
784
|
-
recordId: keyBuilder$
|
|
785
|
-
node: adapterFragment$
|
|
960
|
+
recordId: keyBuilder$p(luvio, config),
|
|
961
|
+
node: adapterFragment$8(luvio, config),
|
|
786
962
|
variables: {},
|
|
787
963
|
};
|
|
788
964
|
const cacheSnapshot = storeLookup(selector, {
|
|
789
965
|
config,
|
|
790
|
-
resolve: () => buildNetworkSnapshot$
|
|
966
|
+
resolve: () => buildNetworkSnapshot$j(luvio, config, snapshotRefreshOptions)
|
|
791
967
|
});
|
|
792
968
|
return cacheSnapshot;
|
|
793
969
|
}
|
|
794
970
|
const getDashboardsAdapterFactory = (luvio) => function UnifiedAnalytics__getDashboards(untrustedConfig, requestContext) {
|
|
795
|
-
const config = validateAdapterConfig$
|
|
971
|
+
const config = validateAdapterConfig$j(untrustedConfig, getDashboards_ConfigPropertyNames);
|
|
796
972
|
// Invalid or incomplete config
|
|
797
973
|
if (config === null) {
|
|
798
974
|
return null;
|
|
799
975
|
}
|
|
800
976
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
801
|
-
buildCachedSnapshotCachePolicy$
|
|
977
|
+
buildCachedSnapshotCachePolicy$8, buildNetworkSnapshotCachePolicy$8);
|
|
802
978
|
};
|
|
803
979
|
|
|
804
|
-
function select$
|
|
805
|
-
return select$
|
|
980
|
+
function select$n(luvio, params) {
|
|
981
|
+
return select$q();
|
|
806
982
|
}
|
|
807
|
-
function getResponseCacheKeys$
|
|
808
|
-
getTypeCacheKeys$
|
|
983
|
+
function getResponseCacheKeys$i(storeKeyMap, luvio, resourceParams, response) {
|
|
984
|
+
getTypeCacheKeys$a(storeKeyMap, luvio, response);
|
|
809
985
|
}
|
|
810
|
-
function ingestSuccess$
|
|
986
|
+
function ingestSuccess$e(luvio, resourceParams, response) {
|
|
811
987
|
const { body } = response;
|
|
812
988
|
const key = keyBuilderFromType$5(luvio, body);
|
|
813
|
-
luvio.storeIngest(key, ingest$
|
|
989
|
+
luvio.storeIngest(key, ingest$a, body);
|
|
814
990
|
const snapshot = luvio.storeLookup({
|
|
815
991
|
recordId: key,
|
|
816
|
-
node: select$
|
|
992
|
+
node: select$n(),
|
|
817
993
|
variables: {},
|
|
818
994
|
});
|
|
819
995
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -824,7 +1000,7 @@ function ingestSuccess$c(luvio, resourceParams, response) {
|
|
|
824
1000
|
deepFreeze(snapshot.data);
|
|
825
1001
|
return snapshot;
|
|
826
1002
|
}
|
|
827
|
-
function createResourceRequest$
|
|
1003
|
+
function createResourceRequest$i(config) {
|
|
828
1004
|
const headers = {};
|
|
829
1005
|
return {
|
|
830
1006
|
baseUri: '/services/data/v62.0',
|
|
@@ -838,20 +1014,21 @@ function createResourceRequest$g(config) {
|
|
|
838
1014
|
};
|
|
839
1015
|
}
|
|
840
1016
|
|
|
841
|
-
const adapterName$
|
|
1017
|
+
const adapterName$i = 'createDashboard';
|
|
842
1018
|
const createDashboard_ConfigPropertyMetadata = [
|
|
843
1019
|
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
844
1020
|
generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
|
|
1021
|
+
generateParamConfigMetadata('workspaceIdOrApiName', false, 2 /* Body */, 0 /* String */),
|
|
845
1022
|
generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
|
|
846
1023
|
generateParamConfigMetadata('name', false, 2 /* Body */, 0 /* String */),
|
|
847
1024
|
generateParamConfigMetadata('layouts', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
848
1025
|
generateParamConfigMetadata('widgets', true, 2 /* Body */, 4 /* Unsupported */),
|
|
849
1026
|
];
|
|
850
|
-
const createDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
851
|
-
const createResourceParams$
|
|
852
|
-
function typeCheckConfig$
|
|
1027
|
+
const createDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$i, createDashboard_ConfigPropertyMetadata);
|
|
1028
|
+
const createResourceParams$i = /*#__PURE__*/ createResourceParams$l(createDashboard_ConfigPropertyMetadata);
|
|
1029
|
+
function typeCheckConfig$i(untrustedConfig) {
|
|
853
1030
|
const config = {};
|
|
854
|
-
typeCheckConfig$
|
|
1031
|
+
typeCheckConfig$l(untrustedConfig, config, createDashboard_ConfigPropertyMetadata);
|
|
855
1032
|
const untrustedConfig_layouts = untrustedConfig.layouts;
|
|
856
1033
|
if (ArrayIsArray$1(untrustedConfig_layouts)) {
|
|
857
1034
|
const untrustedConfig_layouts_array = [];
|
|
@@ -878,30 +1055,30 @@ function typeCheckConfig$g(untrustedConfig) {
|
|
|
878
1055
|
}
|
|
879
1056
|
return config;
|
|
880
1057
|
}
|
|
881
|
-
function validateAdapterConfig$
|
|
1058
|
+
function validateAdapterConfig$i(untrustedConfig, configPropertyNames) {
|
|
882
1059
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
883
1060
|
return null;
|
|
884
1061
|
}
|
|
885
1062
|
if (process.env.NODE_ENV !== 'production') {
|
|
886
1063
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
887
1064
|
}
|
|
888
|
-
const config = typeCheckConfig$
|
|
1065
|
+
const config = typeCheckConfig$i(untrustedConfig);
|
|
889
1066
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
890
1067
|
return null;
|
|
891
1068
|
}
|
|
892
1069
|
return config;
|
|
893
1070
|
}
|
|
894
|
-
function buildNetworkSnapshot$
|
|
895
|
-
const resourceParams = createResourceParams$
|
|
896
|
-
const request = createResourceRequest$
|
|
1071
|
+
function buildNetworkSnapshot$i(luvio, config, options) {
|
|
1072
|
+
const resourceParams = createResourceParams$i(config);
|
|
1073
|
+
const request = createResourceRequest$i(resourceParams);
|
|
897
1074
|
return luvio.dispatchResourceRequest(request, options)
|
|
898
1075
|
.then((response) => {
|
|
899
1076
|
return luvio.handleSuccessResponse(() => {
|
|
900
|
-
const snapshot = ingestSuccess$
|
|
1077
|
+
const snapshot = ingestSuccess$e(luvio, resourceParams, response);
|
|
901
1078
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
902
1079
|
}, () => {
|
|
903
1080
|
const cache = new StoreKeyMap();
|
|
904
|
-
getResponseCacheKeys$
|
|
1081
|
+
getResponseCacheKeys$i(cache, luvio, resourceParams, response.body);
|
|
905
1082
|
return cache;
|
|
906
1083
|
});
|
|
907
1084
|
}, (response) => {
|
|
@@ -911,33 +1088,33 @@ function buildNetworkSnapshot$g(luvio, config, options) {
|
|
|
911
1088
|
}
|
|
912
1089
|
const createDashboardAdapterFactory = (luvio) => {
|
|
913
1090
|
return function createDashboard(untrustedConfig) {
|
|
914
|
-
const config = validateAdapterConfig$
|
|
1091
|
+
const config = validateAdapterConfig$i(untrustedConfig, createDashboard_ConfigPropertyNames);
|
|
915
1092
|
// Invalid or incomplete config
|
|
916
1093
|
if (config === null) {
|
|
917
1094
|
throw new Error('Invalid config for "createDashboard"');
|
|
918
1095
|
}
|
|
919
|
-
return buildNetworkSnapshot$
|
|
1096
|
+
return buildNetworkSnapshot$i(luvio, config);
|
|
920
1097
|
};
|
|
921
1098
|
};
|
|
922
1099
|
|
|
923
|
-
function keyBuilder$
|
|
924
|
-
return keyBuilder$
|
|
1100
|
+
function keyBuilder$o(luvio, params) {
|
|
1101
|
+
return keyBuilder$r(luvio, {
|
|
925
1102
|
name: params.urlParams.dashboardIdOrApiName
|
|
926
1103
|
});
|
|
927
1104
|
}
|
|
928
|
-
function getResponseCacheKeys$
|
|
929
|
-
const key = keyBuilder$
|
|
1105
|
+
function getResponseCacheKeys$h(cacheKeyMap, luvio, resourceParams) {
|
|
1106
|
+
const key = keyBuilder$o(luvio, resourceParams);
|
|
930
1107
|
cacheKeyMap.set(key, {
|
|
931
1108
|
namespace: keyPrefix,
|
|
932
|
-
representationName: RepresentationType$
|
|
1109
|
+
representationName: RepresentationType$a,
|
|
933
1110
|
mergeable: false
|
|
934
1111
|
});
|
|
935
1112
|
}
|
|
936
1113
|
function evictSuccess$3(luvio, resourceParams) {
|
|
937
|
-
const key = keyBuilder$
|
|
1114
|
+
const key = keyBuilder$o(luvio, resourceParams);
|
|
938
1115
|
luvio.storeEvict(key);
|
|
939
1116
|
}
|
|
940
|
-
function createResourceRequest$
|
|
1117
|
+
function createResourceRequest$h(config) {
|
|
941
1118
|
const headers = {};
|
|
942
1119
|
return {
|
|
943
1120
|
baseUri: '/services/data/v62.0',
|
|
@@ -951,33 +1128,33 @@ function createResourceRequest$f(config) {
|
|
|
951
1128
|
};
|
|
952
1129
|
}
|
|
953
1130
|
|
|
954
|
-
const adapterName$
|
|
1131
|
+
const adapterName$h = 'deleteDashboard';
|
|
955
1132
|
const deleteDashboard_ConfigPropertyMetadata = [
|
|
956
1133
|
generateParamConfigMetadata('dashboardIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
957
1134
|
];
|
|
958
|
-
const deleteDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
959
|
-
const createResourceParams$
|
|
960
|
-
function typeCheckConfig$
|
|
1135
|
+
const deleteDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$h, deleteDashboard_ConfigPropertyMetadata);
|
|
1136
|
+
const createResourceParams$h = /*#__PURE__*/ createResourceParams$l(deleteDashboard_ConfigPropertyMetadata);
|
|
1137
|
+
function typeCheckConfig$h(untrustedConfig) {
|
|
961
1138
|
const config = {};
|
|
962
|
-
typeCheckConfig$
|
|
1139
|
+
typeCheckConfig$l(untrustedConfig, config, deleteDashboard_ConfigPropertyMetadata);
|
|
963
1140
|
return config;
|
|
964
1141
|
}
|
|
965
|
-
function validateAdapterConfig$
|
|
1142
|
+
function validateAdapterConfig$h(untrustedConfig, configPropertyNames) {
|
|
966
1143
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
967
1144
|
return null;
|
|
968
1145
|
}
|
|
969
1146
|
if (process.env.NODE_ENV !== 'production') {
|
|
970
1147
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
971
1148
|
}
|
|
972
|
-
const config = typeCheckConfig$
|
|
1149
|
+
const config = typeCheckConfig$h(untrustedConfig);
|
|
973
1150
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
974
1151
|
return null;
|
|
975
1152
|
}
|
|
976
1153
|
return config;
|
|
977
1154
|
}
|
|
978
|
-
function buildNetworkSnapshot$
|
|
979
|
-
const resourceParams = createResourceParams$
|
|
980
|
-
const request = createResourceRequest$
|
|
1155
|
+
function buildNetworkSnapshot$h(luvio, config, options) {
|
|
1156
|
+
const resourceParams = createResourceParams$h(config);
|
|
1157
|
+
const request = createResourceRequest$h(resourceParams);
|
|
981
1158
|
return luvio.dispatchResourceRequest(request, options)
|
|
982
1159
|
.then(() => {
|
|
983
1160
|
return luvio.handleSuccessResponse(() => {
|
|
@@ -985,7 +1162,7 @@ function buildNetworkSnapshot$f(luvio, config, options) {
|
|
|
985
1162
|
return luvio.storeBroadcast();
|
|
986
1163
|
}, () => {
|
|
987
1164
|
const cache = new StoreKeyMap();
|
|
988
|
-
getResponseCacheKeys$
|
|
1165
|
+
getResponseCacheKeys$h(cache, luvio, resourceParams);
|
|
989
1166
|
return cache;
|
|
990
1167
|
});
|
|
991
1168
|
}, (response) => {
|
|
@@ -995,33 +1172,33 @@ function buildNetworkSnapshot$f(luvio, config, options) {
|
|
|
995
1172
|
}
|
|
996
1173
|
const deleteDashboardAdapterFactory = (luvio) => {
|
|
997
1174
|
return function UnifiedAnalyticsdeleteDashboard(untrustedConfig) {
|
|
998
|
-
const config = validateAdapterConfig$
|
|
1175
|
+
const config = validateAdapterConfig$h(untrustedConfig, deleteDashboard_ConfigPropertyNames);
|
|
999
1176
|
// Invalid or incomplete config
|
|
1000
1177
|
if (config === null) {
|
|
1001
|
-
throw new Error(`Invalid config for "${adapterName$
|
|
1178
|
+
throw new Error(`Invalid config for "${adapterName$h}"`);
|
|
1002
1179
|
}
|
|
1003
|
-
return buildNetworkSnapshot$
|
|
1180
|
+
return buildNetworkSnapshot$h(luvio, config);
|
|
1004
1181
|
};
|
|
1005
1182
|
};
|
|
1006
1183
|
|
|
1007
|
-
function select$
|
|
1008
|
-
return select$
|
|
1184
|
+
function select$m(luvio, params) {
|
|
1185
|
+
return select$q();
|
|
1009
1186
|
}
|
|
1010
|
-
function keyBuilder$
|
|
1011
|
-
return keyBuilder$
|
|
1187
|
+
function keyBuilder$n(luvio, params) {
|
|
1188
|
+
return keyBuilder$r(luvio, {
|
|
1012
1189
|
name: params.urlParams.dashboardIdOrApiName
|
|
1013
1190
|
});
|
|
1014
1191
|
}
|
|
1015
|
-
function getResponseCacheKeys$
|
|
1016
|
-
getTypeCacheKeys$
|
|
1192
|
+
function getResponseCacheKeys$g(storeKeyMap, luvio, resourceParams, response) {
|
|
1193
|
+
getTypeCacheKeys$a(storeKeyMap, luvio, response);
|
|
1017
1194
|
}
|
|
1018
|
-
function ingestSuccess$
|
|
1195
|
+
function ingestSuccess$d(luvio, resourceParams, response, snapshotRefresh) {
|
|
1019
1196
|
const { body } = response;
|
|
1020
|
-
const key = keyBuilder$
|
|
1021
|
-
luvio.storeIngest(key, ingest$
|
|
1197
|
+
const key = keyBuilder$n(luvio, resourceParams);
|
|
1198
|
+
luvio.storeIngest(key, ingest$a, body);
|
|
1022
1199
|
const snapshot = luvio.storeLookup({
|
|
1023
1200
|
recordId: key,
|
|
1024
|
-
node: select$
|
|
1201
|
+
node: select$m(),
|
|
1025
1202
|
variables: {},
|
|
1026
1203
|
}, snapshotRefresh);
|
|
1027
1204
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1032,13 +1209,13 @@ function ingestSuccess$b(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1032
1209
|
deepFreeze(snapshot.data);
|
|
1033
1210
|
return snapshot;
|
|
1034
1211
|
}
|
|
1035
|
-
function ingestError$
|
|
1036
|
-
const key = keyBuilder$
|
|
1212
|
+
function ingestError$7(luvio, params, error, snapshotRefresh) {
|
|
1213
|
+
const key = keyBuilder$n(luvio, params);
|
|
1037
1214
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1038
1215
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1039
1216
|
return errorSnapshot;
|
|
1040
1217
|
}
|
|
1041
|
-
function createResourceRequest$
|
|
1218
|
+
function createResourceRequest$g(config) {
|
|
1042
1219
|
const headers = {};
|
|
1043
1220
|
return {
|
|
1044
1221
|
baseUri: '/services/data/v62.0',
|
|
@@ -1052,105 +1229,105 @@ function createResourceRequest$e(config) {
|
|
|
1052
1229
|
};
|
|
1053
1230
|
}
|
|
1054
1231
|
|
|
1055
|
-
const adapterName$
|
|
1232
|
+
const adapterName$g = 'getDashboardByName';
|
|
1056
1233
|
const getDashboardByName_ConfigPropertyMetadata = [
|
|
1057
1234
|
generateParamConfigMetadata('dashboardIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1058
1235
|
];
|
|
1059
|
-
const getDashboardByName_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1060
|
-
const createResourceParams$
|
|
1061
|
-
function keyBuilder$
|
|
1062
|
-
const resourceParams = createResourceParams$
|
|
1063
|
-
return keyBuilder$
|
|
1236
|
+
const getDashboardByName_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$g, getDashboardByName_ConfigPropertyMetadata);
|
|
1237
|
+
const createResourceParams$g = /*#__PURE__*/ createResourceParams$l(getDashboardByName_ConfigPropertyMetadata);
|
|
1238
|
+
function keyBuilder$m(luvio, config) {
|
|
1239
|
+
const resourceParams = createResourceParams$g(config);
|
|
1240
|
+
return keyBuilder$n(luvio, resourceParams);
|
|
1064
1241
|
}
|
|
1065
|
-
function typeCheckConfig$
|
|
1242
|
+
function typeCheckConfig$g(untrustedConfig) {
|
|
1066
1243
|
const config = {};
|
|
1067
|
-
typeCheckConfig$
|
|
1244
|
+
typeCheckConfig$l(untrustedConfig, config, getDashboardByName_ConfigPropertyMetadata);
|
|
1068
1245
|
return config;
|
|
1069
1246
|
}
|
|
1070
|
-
function validateAdapterConfig$
|
|
1247
|
+
function validateAdapterConfig$g(untrustedConfig, configPropertyNames) {
|
|
1071
1248
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1072
1249
|
return null;
|
|
1073
1250
|
}
|
|
1074
1251
|
if (process.env.NODE_ENV !== 'production') {
|
|
1075
1252
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1076
1253
|
}
|
|
1077
|
-
const config = typeCheckConfig$
|
|
1254
|
+
const config = typeCheckConfig$g(untrustedConfig);
|
|
1078
1255
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1079
1256
|
return null;
|
|
1080
1257
|
}
|
|
1081
1258
|
return config;
|
|
1082
1259
|
}
|
|
1083
|
-
function adapterFragment$
|
|
1084
|
-
createResourceParams$
|
|
1085
|
-
return select$
|
|
1260
|
+
function adapterFragment$7(luvio, config) {
|
|
1261
|
+
createResourceParams$g(config);
|
|
1262
|
+
return select$m();
|
|
1086
1263
|
}
|
|
1087
|
-
function onFetchResponseSuccess$
|
|
1088
|
-
const snapshot = ingestSuccess$
|
|
1264
|
+
function onFetchResponseSuccess$7(luvio, config, resourceParams, response) {
|
|
1265
|
+
const snapshot = ingestSuccess$d(luvio, resourceParams, response, {
|
|
1089
1266
|
config,
|
|
1090
|
-
resolve: () => buildNetworkSnapshot$
|
|
1267
|
+
resolve: () => buildNetworkSnapshot$g(luvio, config, snapshotRefreshOptions)
|
|
1091
1268
|
});
|
|
1092
1269
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1093
1270
|
}
|
|
1094
|
-
function onFetchResponseError$
|
|
1095
|
-
const snapshot = ingestError$
|
|
1271
|
+
function onFetchResponseError$7(luvio, config, resourceParams, response) {
|
|
1272
|
+
const snapshot = ingestError$7(luvio, resourceParams, response, {
|
|
1096
1273
|
config,
|
|
1097
|
-
resolve: () => buildNetworkSnapshot$
|
|
1274
|
+
resolve: () => buildNetworkSnapshot$g(luvio, config, snapshotRefreshOptions)
|
|
1098
1275
|
});
|
|
1099
1276
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1100
1277
|
}
|
|
1101
|
-
function buildNetworkSnapshot$
|
|
1102
|
-
const resourceParams = createResourceParams$
|
|
1103
|
-
const request = createResourceRequest$
|
|
1278
|
+
function buildNetworkSnapshot$g(luvio, config, options) {
|
|
1279
|
+
const resourceParams = createResourceParams$g(config);
|
|
1280
|
+
const request = createResourceRequest$g(resourceParams);
|
|
1104
1281
|
return luvio.dispatchResourceRequest(request, options)
|
|
1105
1282
|
.then((response) => {
|
|
1106
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
1283
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$7(luvio, config, resourceParams, response), () => {
|
|
1107
1284
|
const cache = new StoreKeyMap();
|
|
1108
|
-
getResponseCacheKeys$
|
|
1285
|
+
getResponseCacheKeys$g(cache, luvio, resourceParams, response.body);
|
|
1109
1286
|
return cache;
|
|
1110
1287
|
});
|
|
1111
1288
|
}, (response) => {
|
|
1112
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
1289
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$7(luvio, config, resourceParams, response));
|
|
1113
1290
|
});
|
|
1114
1291
|
}
|
|
1115
|
-
function buildNetworkSnapshotCachePolicy$
|
|
1116
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1292
|
+
function buildNetworkSnapshotCachePolicy$7(context, coercedAdapterRequestContext) {
|
|
1293
|
+
return buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext, buildNetworkSnapshot$g, undefined, false);
|
|
1117
1294
|
}
|
|
1118
|
-
function buildCachedSnapshotCachePolicy$
|
|
1295
|
+
function buildCachedSnapshotCachePolicy$7(context, storeLookup) {
|
|
1119
1296
|
const { luvio, config } = context;
|
|
1120
1297
|
const selector = {
|
|
1121
|
-
recordId: keyBuilder$
|
|
1122
|
-
node: adapterFragment$
|
|
1298
|
+
recordId: keyBuilder$m(luvio, config),
|
|
1299
|
+
node: adapterFragment$7(luvio, config),
|
|
1123
1300
|
variables: {},
|
|
1124
1301
|
};
|
|
1125
1302
|
const cacheSnapshot = storeLookup(selector, {
|
|
1126
1303
|
config,
|
|
1127
|
-
resolve: () => buildNetworkSnapshot$
|
|
1304
|
+
resolve: () => buildNetworkSnapshot$g(luvio, config, snapshotRefreshOptions)
|
|
1128
1305
|
});
|
|
1129
1306
|
return cacheSnapshot;
|
|
1130
1307
|
}
|
|
1131
1308
|
const getDashboardByNameAdapterFactory = (luvio) => function UnifiedAnalytics__getDashboardByName(untrustedConfig, requestContext) {
|
|
1132
|
-
const config = validateAdapterConfig$
|
|
1309
|
+
const config = validateAdapterConfig$g(untrustedConfig, getDashboardByName_ConfigPropertyNames);
|
|
1133
1310
|
// Invalid or incomplete config
|
|
1134
1311
|
if (config === null) {
|
|
1135
1312
|
return null;
|
|
1136
1313
|
}
|
|
1137
1314
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1138
|
-
buildCachedSnapshotCachePolicy$
|
|
1315
|
+
buildCachedSnapshotCachePolicy$7, buildNetworkSnapshotCachePolicy$7);
|
|
1139
1316
|
};
|
|
1140
1317
|
|
|
1141
|
-
function select$
|
|
1142
|
-
return select$
|
|
1318
|
+
function select$l(luvio, params) {
|
|
1319
|
+
return select$q();
|
|
1143
1320
|
}
|
|
1144
|
-
function getResponseCacheKeys$
|
|
1145
|
-
getTypeCacheKeys$
|
|
1321
|
+
function getResponseCacheKeys$f(storeKeyMap, luvio, resourceParams, response) {
|
|
1322
|
+
getTypeCacheKeys$a(storeKeyMap, luvio, response);
|
|
1146
1323
|
}
|
|
1147
|
-
function ingestSuccess$
|
|
1324
|
+
function ingestSuccess$c(luvio, resourceParams, response) {
|
|
1148
1325
|
const { body } = response;
|
|
1149
1326
|
const key = keyBuilderFromType$5(luvio, body);
|
|
1150
|
-
luvio.storeIngest(key, ingest$
|
|
1327
|
+
luvio.storeIngest(key, ingest$a, body);
|
|
1151
1328
|
const snapshot = luvio.storeLookup({
|
|
1152
1329
|
recordId: key,
|
|
1153
|
-
node: select$
|
|
1330
|
+
node: select$l(),
|
|
1154
1331
|
variables: {},
|
|
1155
1332
|
});
|
|
1156
1333
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1161,7 +1338,7 @@ function ingestSuccess$a(luvio, resourceParams, response) {
|
|
|
1161
1338
|
deepFreeze(snapshot.data);
|
|
1162
1339
|
return snapshot;
|
|
1163
1340
|
}
|
|
1164
|
-
function createResourceRequest$
|
|
1341
|
+
function createResourceRequest$f(config) {
|
|
1165
1342
|
const headers = {};
|
|
1166
1343
|
return {
|
|
1167
1344
|
baseUri: '/services/data/v62.0',
|
|
@@ -1175,21 +1352,22 @@ function createResourceRequest$d(config) {
|
|
|
1175
1352
|
};
|
|
1176
1353
|
}
|
|
1177
1354
|
|
|
1178
|
-
const adapterName$
|
|
1355
|
+
const adapterName$f = 'updateDashboard';
|
|
1179
1356
|
const updateDashboard_ConfigPropertyMetadata = [
|
|
1180
1357
|
generateParamConfigMetadata('dashboardIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1181
1358
|
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
1182
1359
|
generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
|
|
1360
|
+
generateParamConfigMetadata('workspaceIdOrApiName', false, 2 /* Body */, 0 /* String */),
|
|
1183
1361
|
generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
|
|
1184
1362
|
generateParamConfigMetadata('name', false, 2 /* Body */, 0 /* String */),
|
|
1185
1363
|
generateParamConfigMetadata('layouts', true, 2 /* Body */, 4 /* Unsupported */, true),
|
|
1186
1364
|
generateParamConfigMetadata('widgets', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1187
1365
|
];
|
|
1188
|
-
const updateDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1189
|
-
const createResourceParams$
|
|
1190
|
-
function typeCheckConfig$
|
|
1366
|
+
const updateDashboard_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$f, updateDashboard_ConfigPropertyMetadata);
|
|
1367
|
+
const createResourceParams$f = /*#__PURE__*/ createResourceParams$l(updateDashboard_ConfigPropertyMetadata);
|
|
1368
|
+
function typeCheckConfig$f(untrustedConfig) {
|
|
1191
1369
|
const config = {};
|
|
1192
|
-
typeCheckConfig$
|
|
1370
|
+
typeCheckConfig$l(untrustedConfig, config, updateDashboard_ConfigPropertyMetadata);
|
|
1193
1371
|
const untrustedConfig_layouts = untrustedConfig.layouts;
|
|
1194
1372
|
if (ArrayIsArray$1(untrustedConfig_layouts)) {
|
|
1195
1373
|
const untrustedConfig_layouts_array = [];
|
|
@@ -1216,30 +1394,30 @@ function typeCheckConfig$d(untrustedConfig) {
|
|
|
1216
1394
|
}
|
|
1217
1395
|
return config;
|
|
1218
1396
|
}
|
|
1219
|
-
function validateAdapterConfig$
|
|
1397
|
+
function validateAdapterConfig$f(untrustedConfig, configPropertyNames) {
|
|
1220
1398
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1221
1399
|
return null;
|
|
1222
1400
|
}
|
|
1223
1401
|
if (process.env.NODE_ENV !== 'production') {
|
|
1224
1402
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1225
1403
|
}
|
|
1226
|
-
const config = typeCheckConfig$
|
|
1404
|
+
const config = typeCheckConfig$f(untrustedConfig);
|
|
1227
1405
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1228
1406
|
return null;
|
|
1229
1407
|
}
|
|
1230
1408
|
return config;
|
|
1231
1409
|
}
|
|
1232
|
-
function buildNetworkSnapshot$
|
|
1233
|
-
const resourceParams = createResourceParams$
|
|
1234
|
-
const request = createResourceRequest$
|
|
1410
|
+
function buildNetworkSnapshot$f(luvio, config, options) {
|
|
1411
|
+
const resourceParams = createResourceParams$f(config);
|
|
1412
|
+
const request = createResourceRequest$f(resourceParams);
|
|
1235
1413
|
return luvio.dispatchResourceRequest(request, options)
|
|
1236
1414
|
.then((response) => {
|
|
1237
1415
|
return luvio.handleSuccessResponse(() => {
|
|
1238
|
-
const snapshot = ingestSuccess$
|
|
1416
|
+
const snapshot = ingestSuccess$c(luvio, resourceParams, response);
|
|
1239
1417
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1240
1418
|
}, () => {
|
|
1241
1419
|
const cache = new StoreKeyMap();
|
|
1242
|
-
getResponseCacheKeys$
|
|
1420
|
+
getResponseCacheKeys$f(cache, luvio, resourceParams, response.body);
|
|
1243
1421
|
return cache;
|
|
1244
1422
|
});
|
|
1245
1423
|
}, (response) => {
|
|
@@ -1249,24 +1427,24 @@ function buildNetworkSnapshot$d(luvio, config, options) {
|
|
|
1249
1427
|
}
|
|
1250
1428
|
const updateDashboardAdapterFactory = (luvio) => {
|
|
1251
1429
|
return function updateDashboard(untrustedConfig) {
|
|
1252
|
-
const config = validateAdapterConfig$
|
|
1430
|
+
const config = validateAdapterConfig$f(untrustedConfig, updateDashboard_ConfigPropertyNames);
|
|
1253
1431
|
// Invalid or incomplete config
|
|
1254
1432
|
if (config === null) {
|
|
1255
1433
|
throw new Error('Invalid config for "updateDashboard"');
|
|
1256
1434
|
}
|
|
1257
|
-
return buildNetworkSnapshot$
|
|
1435
|
+
return buildNetworkSnapshot$f(luvio, config);
|
|
1258
1436
|
};
|
|
1259
1437
|
};
|
|
1260
1438
|
|
|
1261
|
-
const VERSION$
|
|
1262
|
-
function validate$
|
|
1439
|
+
const VERSION$8 = "13e8e39beeffee6e3f13ac9a24b8e8be";
|
|
1440
|
+
function validate$b(obj, path = 'AnalyticsVisualizationRepresentation') {
|
|
1263
1441
|
const v_error = (() => {
|
|
1264
1442
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1265
1443
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1266
1444
|
}
|
|
1267
1445
|
const obj_createdBy = obj.createdBy;
|
|
1268
1446
|
const path_createdBy = path + '.createdBy';
|
|
1269
|
-
const referencepath_createdByValidationError = validate$
|
|
1447
|
+
const referencepath_createdByValidationError = validate$h(obj_createdBy, path_createdBy);
|
|
1270
1448
|
if (referencepath_createdByValidationError !== null) {
|
|
1271
1449
|
let message = 'Object doesn\'t match AnalyticsUserRepresentation (at "' + path_createdBy + '")\n';
|
|
1272
1450
|
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1302,7 +1480,7 @@ function validate$7(obj, path = 'AnalyticsVisualizationRepresentation') {
|
|
|
1302
1480
|
if (obj.lastModifiedBy !== undefined) {
|
|
1303
1481
|
const obj_lastModifiedBy = obj.lastModifiedBy;
|
|
1304
1482
|
const path_lastModifiedBy = path + '.lastModifiedBy';
|
|
1305
|
-
const referencepath_lastModifiedByValidationError = validate$
|
|
1483
|
+
const referencepath_lastModifiedByValidationError = validate$h(obj_lastModifiedBy, path_lastModifiedBy);
|
|
1306
1484
|
if (referencepath_lastModifiedByValidationError !== null) {
|
|
1307
1485
|
let message = 'Object doesn\'t match AnalyticsUserRepresentation (at "' + path_lastModifiedBy + '")\n';
|
|
1308
1486
|
message += referencepath_lastModifiedByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1324,57 +1502,57 @@ function validate$7(obj, path = 'AnalyticsVisualizationRepresentation') {
|
|
|
1324
1502
|
})();
|
|
1325
1503
|
return v_error === undefined ? null : v_error;
|
|
1326
1504
|
}
|
|
1327
|
-
const RepresentationType$
|
|
1328
|
-
function keyBuilder$
|
|
1329
|
-
return keyPrefix + '::' + RepresentationType$
|
|
1505
|
+
const RepresentationType$8 = 'AnalyticsVisualizationRepresentation';
|
|
1506
|
+
function keyBuilder$l(luvio, config) {
|
|
1507
|
+
return keyPrefix + '::' + RepresentationType$8 + ':' + config.name;
|
|
1330
1508
|
}
|
|
1331
1509
|
function keyBuilderFromType$4(luvio, object) {
|
|
1332
1510
|
const keyParams = {
|
|
1333
1511
|
name: object.name
|
|
1334
1512
|
};
|
|
1335
|
-
return keyBuilder$
|
|
1513
|
+
return keyBuilder$l(luvio, keyParams);
|
|
1336
1514
|
}
|
|
1337
|
-
function normalize$
|
|
1515
|
+
function normalize$8(input, existing, path, luvio, store, timestamp) {
|
|
1338
1516
|
return input;
|
|
1339
1517
|
}
|
|
1340
|
-
const select$
|
|
1518
|
+
const select$k = function AnalyticsVisualizationRepresentationSelect() {
|
|
1341
1519
|
return {
|
|
1342
1520
|
kind: 'Fragment',
|
|
1343
|
-
version: VERSION$
|
|
1521
|
+
version: VERSION$8,
|
|
1344
1522
|
private: [],
|
|
1345
1523
|
opaque: true
|
|
1346
1524
|
};
|
|
1347
1525
|
};
|
|
1348
|
-
function equals$
|
|
1526
|
+
function equals$8(existing, incoming) {
|
|
1349
1527
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1350
1528
|
return false;
|
|
1351
1529
|
}
|
|
1352
1530
|
return true;
|
|
1353
1531
|
}
|
|
1354
|
-
const ingest$
|
|
1532
|
+
const ingest$8 = function AnalyticsVisualizationRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1355
1533
|
if (process.env.NODE_ENV !== 'production') {
|
|
1356
|
-
const validateError = validate$
|
|
1534
|
+
const validateError = validate$b(input);
|
|
1357
1535
|
if (validateError !== null) {
|
|
1358
1536
|
throw validateError;
|
|
1359
1537
|
}
|
|
1360
1538
|
}
|
|
1361
1539
|
const key = keyBuilderFromType$4(luvio, input);
|
|
1362
1540
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1363
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1541
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$8, "UnifiedAnalytics", VERSION$8, RepresentationType$8, equals$8);
|
|
1364
1542
|
return createLink(key);
|
|
1365
1543
|
};
|
|
1366
|
-
function getTypeCacheKeys$
|
|
1544
|
+
function getTypeCacheKeys$8(rootKeySet, luvio, input, fullPathFactory) {
|
|
1367
1545
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1368
1546
|
const rootKey = keyBuilderFromType$4(luvio, input);
|
|
1369
1547
|
rootKeySet.set(rootKey, {
|
|
1370
1548
|
namespace: keyPrefix,
|
|
1371
|
-
representationName: RepresentationType$
|
|
1549
|
+
representationName: RepresentationType$8,
|
|
1372
1550
|
mergeable: false
|
|
1373
1551
|
});
|
|
1374
1552
|
}
|
|
1375
1553
|
|
|
1376
|
-
const VERSION$
|
|
1377
|
-
function validate$
|
|
1554
|
+
const VERSION$7 = "342da25bfe5e13c7f4ccbc8aa0980a4f";
|
|
1555
|
+
function validate$a(obj, path = 'AnalyticsVisualizationCollectionRepresentation') {
|
|
1378
1556
|
const v_error = (() => {
|
|
1379
1557
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1380
1558
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1394,14 +1572,14 @@ function validate$6(obj, path = 'AnalyticsVisualizationCollectionRepresentation'
|
|
|
1394
1572
|
})();
|
|
1395
1573
|
return v_error === undefined ? null : v_error;
|
|
1396
1574
|
}
|
|
1397
|
-
const RepresentationType$
|
|
1398
|
-
function normalize$
|
|
1575
|
+
const RepresentationType$7 = 'AnalyticsVisualizationCollectionRepresentation';
|
|
1576
|
+
function normalize$7(input, existing, path, luvio, store, timestamp) {
|
|
1399
1577
|
const input_visualizations = input.visualizations;
|
|
1400
1578
|
const input_visualizations_id = path.fullPath + '__visualizations';
|
|
1401
1579
|
for (let i = 0; i < input_visualizations.length; i++) {
|
|
1402
1580
|
const input_visualizations_item = input_visualizations[i];
|
|
1403
1581
|
let input_visualizations_item_id = input_visualizations_id + '__' + i;
|
|
1404
|
-
input_visualizations[i] = ingest$
|
|
1582
|
+
input_visualizations[i] = ingest$8(input_visualizations_item, {
|
|
1405
1583
|
fullPath: input_visualizations_item_id,
|
|
1406
1584
|
propertyName: i,
|
|
1407
1585
|
parent: {
|
|
@@ -1414,22 +1592,22 @@ function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
|
1414
1592
|
}
|
|
1415
1593
|
return input;
|
|
1416
1594
|
}
|
|
1417
|
-
const select$
|
|
1595
|
+
const select$j = function AnalyticsVisualizationCollectionRepresentationSelect() {
|
|
1418
1596
|
return {
|
|
1419
1597
|
kind: 'Fragment',
|
|
1420
|
-
version: VERSION$
|
|
1598
|
+
version: VERSION$7,
|
|
1421
1599
|
private: [],
|
|
1422
1600
|
selections: [
|
|
1423
1601
|
{
|
|
1424
1602
|
name: 'visualizations',
|
|
1425
1603
|
kind: 'Link',
|
|
1426
1604
|
plural: true,
|
|
1427
|
-
fragment: select$
|
|
1605
|
+
fragment: select$k()
|
|
1428
1606
|
}
|
|
1429
1607
|
]
|
|
1430
1608
|
};
|
|
1431
1609
|
};
|
|
1432
|
-
function equals$
|
|
1610
|
+
function equals$7(existing, incoming) {
|
|
1433
1611
|
const existing_visualizations = existing.visualizations;
|
|
1434
1612
|
const incoming_visualizations = incoming.visualizations;
|
|
1435
1613
|
const equals_visualizations_items = equalsArray(existing_visualizations, incoming_visualizations, (existing_visualizations_item, incoming_visualizations_item) => {
|
|
@@ -1442,48 +1620,48 @@ function equals$5(existing, incoming) {
|
|
|
1442
1620
|
}
|
|
1443
1621
|
return true;
|
|
1444
1622
|
}
|
|
1445
|
-
const ingest$
|
|
1623
|
+
const ingest$7 = function AnalyticsVisualizationCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1446
1624
|
if (process.env.NODE_ENV !== 'production') {
|
|
1447
|
-
const validateError = validate$
|
|
1625
|
+
const validateError = validate$a(input);
|
|
1448
1626
|
if (validateError !== null) {
|
|
1449
1627
|
throw validateError;
|
|
1450
1628
|
}
|
|
1451
1629
|
}
|
|
1452
1630
|
const key = path.fullPath;
|
|
1453
1631
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1454
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
1632
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$7, "UnifiedAnalytics", VERSION$7, RepresentationType$7, equals$7);
|
|
1455
1633
|
return createLink(key);
|
|
1456
1634
|
};
|
|
1457
|
-
function getTypeCacheKeys$
|
|
1635
|
+
function getTypeCacheKeys$7(rootKeySet, luvio, input, fullPathFactory) {
|
|
1458
1636
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1459
1637
|
const rootKey = fullPathFactory();
|
|
1460
1638
|
rootKeySet.set(rootKey, {
|
|
1461
1639
|
namespace: keyPrefix,
|
|
1462
|
-
representationName: RepresentationType$
|
|
1640
|
+
representationName: RepresentationType$7,
|
|
1463
1641
|
mergeable: false
|
|
1464
1642
|
});
|
|
1465
1643
|
const input_visualizations_length = input.visualizations.length;
|
|
1466
1644
|
for (let i = 0; i < input_visualizations_length; i++) {
|
|
1467
|
-
getTypeCacheKeys$
|
|
1645
|
+
getTypeCacheKeys$8(rootKeySet, luvio, input.visualizations[i]);
|
|
1468
1646
|
}
|
|
1469
1647
|
}
|
|
1470
1648
|
|
|
1471
|
-
function select$
|
|
1472
|
-
return select$
|
|
1649
|
+
function select$i(luvio, params) {
|
|
1650
|
+
return select$j();
|
|
1473
1651
|
}
|
|
1474
|
-
function keyBuilder$
|
|
1652
|
+
function keyBuilder$k(luvio, params) {
|
|
1475
1653
|
return keyPrefix + '::AnalyticsVisualizationCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ')';
|
|
1476
1654
|
}
|
|
1477
|
-
function getResponseCacheKeys$
|
|
1478
|
-
getTypeCacheKeys$
|
|
1655
|
+
function getResponseCacheKeys$e(storeKeyMap, luvio, resourceParams, response) {
|
|
1656
|
+
getTypeCacheKeys$7(storeKeyMap, luvio, response, () => keyBuilder$k(luvio, resourceParams));
|
|
1479
1657
|
}
|
|
1480
|
-
function ingestSuccess$
|
|
1658
|
+
function ingestSuccess$b(luvio, resourceParams, response, snapshotRefresh) {
|
|
1481
1659
|
const { body } = response;
|
|
1482
|
-
const key = keyBuilder$
|
|
1483
|
-
luvio.storeIngest(key, ingest$
|
|
1660
|
+
const key = keyBuilder$k(luvio, resourceParams);
|
|
1661
|
+
luvio.storeIngest(key, ingest$7, body);
|
|
1484
1662
|
const snapshot = luvio.storeLookup({
|
|
1485
1663
|
recordId: key,
|
|
1486
|
-
node: select$
|
|
1664
|
+
node: select$i(),
|
|
1487
1665
|
variables: {},
|
|
1488
1666
|
}, snapshotRefresh);
|
|
1489
1667
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1494,13 +1672,13 @@ function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1494
1672
|
deepFreeze(snapshot.data);
|
|
1495
1673
|
return snapshot;
|
|
1496
1674
|
}
|
|
1497
|
-
function ingestError$
|
|
1498
|
-
const key = keyBuilder$
|
|
1675
|
+
function ingestError$6(luvio, params, error, snapshotRefresh) {
|
|
1676
|
+
const key = keyBuilder$k(luvio, params);
|
|
1499
1677
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1500
1678
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1501
1679
|
return errorSnapshot;
|
|
1502
1680
|
}
|
|
1503
|
-
function createResourceRequest$
|
|
1681
|
+
function createResourceRequest$e(config) {
|
|
1504
1682
|
const headers = {};
|
|
1505
1683
|
return {
|
|
1506
1684
|
baseUri: '/services/data/v62.0',
|
|
@@ -1514,111 +1692,111 @@ function createResourceRequest$c(config) {
|
|
|
1514
1692
|
};
|
|
1515
1693
|
}
|
|
1516
1694
|
|
|
1517
|
-
const adapterName$
|
|
1695
|
+
const adapterName$e = 'getVisualizations';
|
|
1518
1696
|
const getVisualizations_ConfigPropertyMetadata = [
|
|
1519
1697
|
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1520
1698
|
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
1521
1699
|
];
|
|
1522
|
-
const getVisualizations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1523
|
-
const createResourceParams$
|
|
1524
|
-
function keyBuilder$
|
|
1525
|
-
const resourceParams = createResourceParams$
|
|
1526
|
-
return keyBuilder$
|
|
1700
|
+
const getVisualizations_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$e, getVisualizations_ConfigPropertyMetadata);
|
|
1701
|
+
const createResourceParams$e = /*#__PURE__*/ createResourceParams$l(getVisualizations_ConfigPropertyMetadata);
|
|
1702
|
+
function keyBuilder$j(luvio, config) {
|
|
1703
|
+
const resourceParams = createResourceParams$e(config);
|
|
1704
|
+
return keyBuilder$k(luvio, resourceParams);
|
|
1527
1705
|
}
|
|
1528
|
-
function typeCheckConfig$
|
|
1706
|
+
function typeCheckConfig$e(untrustedConfig) {
|
|
1529
1707
|
const config = {};
|
|
1530
|
-
typeCheckConfig$
|
|
1708
|
+
typeCheckConfig$l(untrustedConfig, config, getVisualizations_ConfigPropertyMetadata);
|
|
1531
1709
|
return config;
|
|
1532
1710
|
}
|
|
1533
|
-
function validateAdapterConfig$
|
|
1711
|
+
function validateAdapterConfig$e(untrustedConfig, configPropertyNames) {
|
|
1534
1712
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1535
1713
|
return null;
|
|
1536
1714
|
}
|
|
1537
1715
|
if (process.env.NODE_ENV !== 'production') {
|
|
1538
1716
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1539
1717
|
}
|
|
1540
|
-
const config = typeCheckConfig$
|
|
1718
|
+
const config = typeCheckConfig$e(untrustedConfig);
|
|
1541
1719
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1542
1720
|
return null;
|
|
1543
1721
|
}
|
|
1544
1722
|
return config;
|
|
1545
1723
|
}
|
|
1546
|
-
function adapterFragment$
|
|
1547
|
-
createResourceParams$
|
|
1548
|
-
return select$
|
|
1724
|
+
function adapterFragment$6(luvio, config) {
|
|
1725
|
+
createResourceParams$e(config);
|
|
1726
|
+
return select$i();
|
|
1549
1727
|
}
|
|
1550
|
-
function onFetchResponseSuccess$
|
|
1551
|
-
const snapshot = ingestSuccess$
|
|
1728
|
+
function onFetchResponseSuccess$6(luvio, config, resourceParams, response) {
|
|
1729
|
+
const snapshot = ingestSuccess$b(luvio, resourceParams, response, {
|
|
1552
1730
|
config,
|
|
1553
|
-
resolve: () => buildNetworkSnapshot$
|
|
1731
|
+
resolve: () => buildNetworkSnapshot$e(luvio, config, snapshotRefreshOptions)
|
|
1554
1732
|
});
|
|
1555
1733
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1556
1734
|
}
|
|
1557
|
-
function onFetchResponseError$
|
|
1558
|
-
const snapshot = ingestError$
|
|
1735
|
+
function onFetchResponseError$6(luvio, config, resourceParams, response) {
|
|
1736
|
+
const snapshot = ingestError$6(luvio, resourceParams, response, {
|
|
1559
1737
|
config,
|
|
1560
|
-
resolve: () => buildNetworkSnapshot$
|
|
1738
|
+
resolve: () => buildNetworkSnapshot$e(luvio, config, snapshotRefreshOptions)
|
|
1561
1739
|
});
|
|
1562
1740
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1563
1741
|
}
|
|
1564
|
-
function buildNetworkSnapshot$
|
|
1565
|
-
const resourceParams = createResourceParams$
|
|
1566
|
-
const request = createResourceRequest$
|
|
1742
|
+
function buildNetworkSnapshot$e(luvio, config, options) {
|
|
1743
|
+
const resourceParams = createResourceParams$e(config);
|
|
1744
|
+
const request = createResourceRequest$e(resourceParams);
|
|
1567
1745
|
return luvio.dispatchResourceRequest(request, options)
|
|
1568
1746
|
.then((response) => {
|
|
1569
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
1747
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$6(luvio, config, resourceParams, response), () => {
|
|
1570
1748
|
const cache = new StoreKeyMap();
|
|
1571
|
-
getResponseCacheKeys$
|
|
1749
|
+
getResponseCacheKeys$e(cache, luvio, resourceParams, response.body);
|
|
1572
1750
|
return cache;
|
|
1573
1751
|
});
|
|
1574
1752
|
}, (response) => {
|
|
1575
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
1753
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$6(luvio, config, resourceParams, response));
|
|
1576
1754
|
});
|
|
1577
1755
|
}
|
|
1578
|
-
function buildNetworkSnapshotCachePolicy$
|
|
1579
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1756
|
+
function buildNetworkSnapshotCachePolicy$6(context, coercedAdapterRequestContext) {
|
|
1757
|
+
return buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext, buildNetworkSnapshot$e, undefined, false);
|
|
1580
1758
|
}
|
|
1581
|
-
function buildCachedSnapshotCachePolicy$
|
|
1759
|
+
function buildCachedSnapshotCachePolicy$6(context, storeLookup) {
|
|
1582
1760
|
const { luvio, config } = context;
|
|
1583
1761
|
const selector = {
|
|
1584
|
-
recordId: keyBuilder$
|
|
1585
|
-
node: adapterFragment$
|
|
1762
|
+
recordId: keyBuilder$j(luvio, config),
|
|
1763
|
+
node: adapterFragment$6(luvio, config),
|
|
1586
1764
|
variables: {},
|
|
1587
1765
|
};
|
|
1588
1766
|
const cacheSnapshot = storeLookup(selector, {
|
|
1589
1767
|
config,
|
|
1590
|
-
resolve: () => buildNetworkSnapshot$
|
|
1768
|
+
resolve: () => buildNetworkSnapshot$e(luvio, config, snapshotRefreshOptions)
|
|
1591
1769
|
});
|
|
1592
1770
|
return cacheSnapshot;
|
|
1593
1771
|
}
|
|
1594
1772
|
const getVisualizationsAdapterFactory = (luvio) => function UnifiedAnalytics__getVisualizations(untrustedConfig, requestContext) {
|
|
1595
|
-
const config = validateAdapterConfig$
|
|
1773
|
+
const config = validateAdapterConfig$e(untrustedConfig, getVisualizations_ConfigPropertyNames);
|
|
1596
1774
|
// Invalid or incomplete config
|
|
1597
1775
|
if (config === null) {
|
|
1598
1776
|
return null;
|
|
1599
1777
|
}
|
|
1600
1778
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1601
|
-
buildCachedSnapshotCachePolicy$
|
|
1779
|
+
buildCachedSnapshotCachePolicy$6, buildNetworkSnapshotCachePolicy$6);
|
|
1602
1780
|
};
|
|
1603
1781
|
|
|
1604
|
-
function keyBuilder$
|
|
1605
|
-
return keyBuilder$
|
|
1782
|
+
function keyBuilder$i(luvio, params) {
|
|
1783
|
+
return keyBuilder$l(luvio, {
|
|
1606
1784
|
name: params.urlParams.visualizationIdOrApiName
|
|
1607
1785
|
});
|
|
1608
1786
|
}
|
|
1609
|
-
function getResponseCacheKeys$
|
|
1610
|
-
const key = keyBuilder$
|
|
1787
|
+
function getResponseCacheKeys$d(cacheKeyMap, luvio, resourceParams) {
|
|
1788
|
+
const key = keyBuilder$i(luvio, resourceParams);
|
|
1611
1789
|
cacheKeyMap.set(key, {
|
|
1612
1790
|
namespace: keyPrefix,
|
|
1613
|
-
representationName: RepresentationType$
|
|
1791
|
+
representationName: RepresentationType$8,
|
|
1614
1792
|
mergeable: false
|
|
1615
1793
|
});
|
|
1616
1794
|
}
|
|
1617
1795
|
function evictSuccess$2(luvio, resourceParams) {
|
|
1618
|
-
const key = keyBuilder$
|
|
1796
|
+
const key = keyBuilder$i(luvio, resourceParams);
|
|
1619
1797
|
luvio.storeEvict(key);
|
|
1620
1798
|
}
|
|
1621
|
-
function createResourceRequest$
|
|
1799
|
+
function createResourceRequest$d(config) {
|
|
1622
1800
|
const headers = {};
|
|
1623
1801
|
return {
|
|
1624
1802
|
baseUri: '/services/data/v62.0',
|
|
@@ -1632,33 +1810,33 @@ function createResourceRequest$b(config) {
|
|
|
1632
1810
|
};
|
|
1633
1811
|
}
|
|
1634
1812
|
|
|
1635
|
-
const adapterName$
|
|
1813
|
+
const adapterName$d = 'deleteVisualization';
|
|
1636
1814
|
const deleteVisualization_ConfigPropertyMetadata = [
|
|
1637
1815
|
generateParamConfigMetadata('visualizationIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1638
1816
|
];
|
|
1639
|
-
const deleteVisualization_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1640
|
-
const createResourceParams$
|
|
1641
|
-
function typeCheckConfig$
|
|
1817
|
+
const deleteVisualization_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$d, deleteVisualization_ConfigPropertyMetadata);
|
|
1818
|
+
const createResourceParams$d = /*#__PURE__*/ createResourceParams$l(deleteVisualization_ConfigPropertyMetadata);
|
|
1819
|
+
function typeCheckConfig$d(untrustedConfig) {
|
|
1642
1820
|
const config = {};
|
|
1643
|
-
typeCheckConfig$
|
|
1821
|
+
typeCheckConfig$l(untrustedConfig, config, deleteVisualization_ConfigPropertyMetadata);
|
|
1644
1822
|
return config;
|
|
1645
1823
|
}
|
|
1646
|
-
function validateAdapterConfig$
|
|
1824
|
+
function validateAdapterConfig$d(untrustedConfig, configPropertyNames) {
|
|
1647
1825
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1648
1826
|
return null;
|
|
1649
1827
|
}
|
|
1650
1828
|
if (process.env.NODE_ENV !== 'production') {
|
|
1651
1829
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1652
1830
|
}
|
|
1653
|
-
const config = typeCheckConfig$
|
|
1831
|
+
const config = typeCheckConfig$d(untrustedConfig);
|
|
1654
1832
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1655
1833
|
return null;
|
|
1656
1834
|
}
|
|
1657
1835
|
return config;
|
|
1658
1836
|
}
|
|
1659
|
-
function buildNetworkSnapshot$
|
|
1660
|
-
const resourceParams = createResourceParams$
|
|
1661
|
-
const request = createResourceRequest$
|
|
1837
|
+
function buildNetworkSnapshot$d(luvio, config, options) {
|
|
1838
|
+
const resourceParams = createResourceParams$d(config);
|
|
1839
|
+
const request = createResourceRequest$d(resourceParams);
|
|
1662
1840
|
return luvio.dispatchResourceRequest(request, options)
|
|
1663
1841
|
.then(() => {
|
|
1664
1842
|
return luvio.handleSuccessResponse(() => {
|
|
@@ -1666,7 +1844,7 @@ function buildNetworkSnapshot$b(luvio, config, options) {
|
|
|
1666
1844
|
return luvio.storeBroadcast();
|
|
1667
1845
|
}, () => {
|
|
1668
1846
|
const cache = new StoreKeyMap();
|
|
1669
|
-
getResponseCacheKeys$
|
|
1847
|
+
getResponseCacheKeys$d(cache, luvio, resourceParams);
|
|
1670
1848
|
return cache;
|
|
1671
1849
|
});
|
|
1672
1850
|
}, (response) => {
|
|
@@ -1676,33 +1854,33 @@ function buildNetworkSnapshot$b(luvio, config, options) {
|
|
|
1676
1854
|
}
|
|
1677
1855
|
const deleteVisualizationAdapterFactory = (luvio) => {
|
|
1678
1856
|
return function UnifiedAnalyticsdeleteVisualization(untrustedConfig) {
|
|
1679
|
-
const config = validateAdapterConfig$
|
|
1857
|
+
const config = validateAdapterConfig$d(untrustedConfig, deleteVisualization_ConfigPropertyNames);
|
|
1680
1858
|
// Invalid or incomplete config
|
|
1681
1859
|
if (config === null) {
|
|
1682
|
-
throw new Error(`Invalid config for "${adapterName$
|
|
1860
|
+
throw new Error(`Invalid config for "${adapterName$d}"`);
|
|
1683
1861
|
}
|
|
1684
|
-
return buildNetworkSnapshot$
|
|
1862
|
+
return buildNetworkSnapshot$d(luvio, config);
|
|
1685
1863
|
};
|
|
1686
1864
|
};
|
|
1687
1865
|
|
|
1688
|
-
function select$
|
|
1689
|
-
return select$
|
|
1866
|
+
function select$h(luvio, params) {
|
|
1867
|
+
return select$k();
|
|
1690
1868
|
}
|
|
1691
|
-
function keyBuilder$
|
|
1692
|
-
return keyBuilder$
|
|
1869
|
+
function keyBuilder$h(luvio, params) {
|
|
1870
|
+
return keyBuilder$l(luvio, {
|
|
1693
1871
|
name: params.urlParams.visualizationIdOrApiName
|
|
1694
1872
|
});
|
|
1695
1873
|
}
|
|
1696
|
-
function getResponseCacheKeys$
|
|
1697
|
-
getTypeCacheKeys$
|
|
1874
|
+
function getResponseCacheKeys$c(storeKeyMap, luvio, resourceParams, response) {
|
|
1875
|
+
getTypeCacheKeys$8(storeKeyMap, luvio, response);
|
|
1698
1876
|
}
|
|
1699
|
-
function ingestSuccess$
|
|
1877
|
+
function ingestSuccess$a(luvio, resourceParams, response, snapshotRefresh) {
|
|
1700
1878
|
const { body } = response;
|
|
1701
|
-
const key = keyBuilder$
|
|
1702
|
-
luvio.storeIngest(key, ingest$
|
|
1879
|
+
const key = keyBuilder$h(luvio, resourceParams);
|
|
1880
|
+
luvio.storeIngest(key, ingest$8, body);
|
|
1703
1881
|
const snapshot = luvio.storeLookup({
|
|
1704
1882
|
recordId: key,
|
|
1705
|
-
node: select$
|
|
1883
|
+
node: select$h(),
|
|
1706
1884
|
variables: {},
|
|
1707
1885
|
}, snapshotRefresh);
|
|
1708
1886
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1713,13 +1891,13 @@ function ingestSuccess$8(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
1713
1891
|
deepFreeze(snapshot.data);
|
|
1714
1892
|
return snapshot;
|
|
1715
1893
|
}
|
|
1716
|
-
function ingestError$
|
|
1717
|
-
const key = keyBuilder$
|
|
1894
|
+
function ingestError$5(luvio, params, error, snapshotRefresh) {
|
|
1895
|
+
const key = keyBuilder$h(luvio, params);
|
|
1718
1896
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1719
1897
|
luvio.storeIngestError(key, errorSnapshot);
|
|
1720
1898
|
return errorSnapshot;
|
|
1721
1899
|
}
|
|
1722
|
-
function createResourceRequest$
|
|
1900
|
+
function createResourceRequest$c(config) {
|
|
1723
1901
|
const headers = {};
|
|
1724
1902
|
return {
|
|
1725
1903
|
baseUri: '/services/data/v62.0',
|
|
@@ -1733,94 +1911,94 @@ function createResourceRequest$a(config) {
|
|
|
1733
1911
|
};
|
|
1734
1912
|
}
|
|
1735
1913
|
|
|
1736
|
-
const adapterName$
|
|
1914
|
+
const adapterName$c = 'getVisualization';
|
|
1737
1915
|
const getVisualization_ConfigPropertyMetadata = [
|
|
1738
1916
|
generateParamConfigMetadata('visualizationIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1739
1917
|
];
|
|
1740
|
-
const getVisualization_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
1741
|
-
const createResourceParams$
|
|
1742
|
-
function keyBuilder$
|
|
1743
|
-
const resourceParams = createResourceParams$
|
|
1744
|
-
return keyBuilder$
|
|
1918
|
+
const getVisualization_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$c, getVisualization_ConfigPropertyMetadata);
|
|
1919
|
+
const createResourceParams$c = /*#__PURE__*/ createResourceParams$l(getVisualization_ConfigPropertyMetadata);
|
|
1920
|
+
function keyBuilder$g(luvio, config) {
|
|
1921
|
+
const resourceParams = createResourceParams$c(config);
|
|
1922
|
+
return keyBuilder$h(luvio, resourceParams);
|
|
1745
1923
|
}
|
|
1746
|
-
function typeCheckConfig$
|
|
1924
|
+
function typeCheckConfig$c(untrustedConfig) {
|
|
1747
1925
|
const config = {};
|
|
1748
|
-
typeCheckConfig$
|
|
1926
|
+
typeCheckConfig$l(untrustedConfig, config, getVisualization_ConfigPropertyMetadata);
|
|
1749
1927
|
return config;
|
|
1750
1928
|
}
|
|
1751
|
-
function validateAdapterConfig$
|
|
1929
|
+
function validateAdapterConfig$c(untrustedConfig, configPropertyNames) {
|
|
1752
1930
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1753
1931
|
return null;
|
|
1754
1932
|
}
|
|
1755
1933
|
if (process.env.NODE_ENV !== 'production') {
|
|
1756
1934
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1757
1935
|
}
|
|
1758
|
-
const config = typeCheckConfig$
|
|
1936
|
+
const config = typeCheckConfig$c(untrustedConfig);
|
|
1759
1937
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1760
1938
|
return null;
|
|
1761
1939
|
}
|
|
1762
1940
|
return config;
|
|
1763
1941
|
}
|
|
1764
|
-
function adapterFragment$
|
|
1765
|
-
createResourceParams$
|
|
1766
|
-
return select$
|
|
1942
|
+
function adapterFragment$5(luvio, config) {
|
|
1943
|
+
createResourceParams$c(config);
|
|
1944
|
+
return select$h();
|
|
1767
1945
|
}
|
|
1768
|
-
function onFetchResponseSuccess$
|
|
1769
|
-
const snapshot = ingestSuccess$
|
|
1946
|
+
function onFetchResponseSuccess$5(luvio, config, resourceParams, response) {
|
|
1947
|
+
const snapshot = ingestSuccess$a(luvio, resourceParams, response, {
|
|
1770
1948
|
config,
|
|
1771
|
-
resolve: () => buildNetworkSnapshot$
|
|
1949
|
+
resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
|
|
1772
1950
|
});
|
|
1773
1951
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1774
1952
|
}
|
|
1775
|
-
function onFetchResponseError$
|
|
1776
|
-
const snapshot = ingestError$
|
|
1953
|
+
function onFetchResponseError$5(luvio, config, resourceParams, response) {
|
|
1954
|
+
const snapshot = ingestError$5(luvio, resourceParams, response, {
|
|
1777
1955
|
config,
|
|
1778
|
-
resolve: () => buildNetworkSnapshot$
|
|
1956
|
+
resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
|
|
1779
1957
|
});
|
|
1780
1958
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1781
1959
|
}
|
|
1782
|
-
function buildNetworkSnapshot$
|
|
1783
|
-
const resourceParams = createResourceParams$
|
|
1784
|
-
const request = createResourceRequest$
|
|
1960
|
+
function buildNetworkSnapshot$c(luvio, config, options) {
|
|
1961
|
+
const resourceParams = createResourceParams$c(config);
|
|
1962
|
+
const request = createResourceRequest$c(resourceParams);
|
|
1785
1963
|
return luvio.dispatchResourceRequest(request, options)
|
|
1786
1964
|
.then((response) => {
|
|
1787
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
1965
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$5(luvio, config, resourceParams, response), () => {
|
|
1788
1966
|
const cache = new StoreKeyMap();
|
|
1789
|
-
getResponseCacheKeys$
|
|
1967
|
+
getResponseCacheKeys$c(cache, luvio, resourceParams, response.body);
|
|
1790
1968
|
return cache;
|
|
1791
1969
|
});
|
|
1792
1970
|
}, (response) => {
|
|
1793
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
1971
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$5(luvio, config, resourceParams, response));
|
|
1794
1972
|
});
|
|
1795
1973
|
}
|
|
1796
|
-
function buildNetworkSnapshotCachePolicy$
|
|
1797
|
-
return buildNetworkSnapshotCachePolicy$
|
|
1974
|
+
function buildNetworkSnapshotCachePolicy$5(context, coercedAdapterRequestContext) {
|
|
1975
|
+
return buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext, buildNetworkSnapshot$c, undefined, false);
|
|
1798
1976
|
}
|
|
1799
|
-
function buildCachedSnapshotCachePolicy$
|
|
1977
|
+
function buildCachedSnapshotCachePolicy$5(context, storeLookup) {
|
|
1800
1978
|
const { luvio, config } = context;
|
|
1801
1979
|
const selector = {
|
|
1802
|
-
recordId: keyBuilder$
|
|
1803
|
-
node: adapterFragment$
|
|
1980
|
+
recordId: keyBuilder$g(luvio, config),
|
|
1981
|
+
node: adapterFragment$5(luvio, config),
|
|
1804
1982
|
variables: {},
|
|
1805
1983
|
};
|
|
1806
1984
|
const cacheSnapshot = storeLookup(selector, {
|
|
1807
1985
|
config,
|
|
1808
|
-
resolve: () => buildNetworkSnapshot$
|
|
1986
|
+
resolve: () => buildNetworkSnapshot$c(luvio, config, snapshotRefreshOptions)
|
|
1809
1987
|
});
|
|
1810
1988
|
return cacheSnapshot;
|
|
1811
1989
|
}
|
|
1812
1990
|
const getVisualizationAdapterFactory = (luvio) => function UnifiedAnalytics__getVisualization(untrustedConfig, requestContext) {
|
|
1813
|
-
const config = validateAdapterConfig$
|
|
1991
|
+
const config = validateAdapterConfig$c(untrustedConfig, getVisualization_ConfigPropertyNames);
|
|
1814
1992
|
// Invalid or incomplete config
|
|
1815
1993
|
if (config === null) {
|
|
1816
1994
|
return null;
|
|
1817
1995
|
}
|
|
1818
1996
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1819
|
-
buildCachedSnapshotCachePolicy$
|
|
1997
|
+
buildCachedSnapshotCachePolicy$5, buildNetworkSnapshotCachePolicy$5);
|
|
1820
1998
|
};
|
|
1821
1999
|
|
|
1822
|
-
const VERSION$
|
|
1823
|
-
function validate$
|
|
2000
|
+
const VERSION$6 = "cd4ffaf2332ab8ec006033f2e4339ad7";
|
|
2001
|
+
function validate$9(obj, path = 'WorkspaceRepresentation') {
|
|
1824
2002
|
const v_error = (() => {
|
|
1825
2003
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1826
2004
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1832,7 +2010,7 @@ function validate$5(obj, path = 'WorkspaceRepresentation') {
|
|
|
1832
2010
|
}
|
|
1833
2011
|
const obj_createdBy = obj.createdBy;
|
|
1834
2012
|
const path_createdBy = path + '.createdBy';
|
|
1835
|
-
const referencepath_createdByValidationError = validate$
|
|
2013
|
+
const referencepath_createdByValidationError = validate$h(obj_createdBy, path_createdBy);
|
|
1836
2014
|
if (referencepath_createdByValidationError !== null) {
|
|
1837
2015
|
let message = 'Object doesn\'t match AnalyticsUserRepresentation (at "' + path_createdBy + '")\n';
|
|
1838
2016
|
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -1885,57 +2063,57 @@ function validate$5(obj, path = 'WorkspaceRepresentation') {
|
|
|
1885
2063
|
})();
|
|
1886
2064
|
return v_error === undefined ? null : v_error;
|
|
1887
2065
|
}
|
|
1888
|
-
const RepresentationType$
|
|
1889
|
-
function keyBuilder$
|
|
1890
|
-
return keyPrefix + '::' + RepresentationType$
|
|
2066
|
+
const RepresentationType$6 = 'WorkspaceRepresentation';
|
|
2067
|
+
function keyBuilder$f(luvio, config) {
|
|
2068
|
+
return keyPrefix + '::' + RepresentationType$6 + ':' + config.name;
|
|
1891
2069
|
}
|
|
1892
2070
|
function keyBuilderFromType$3(luvio, object) {
|
|
1893
2071
|
const keyParams = {
|
|
1894
2072
|
name: object.cacheableKey
|
|
1895
2073
|
};
|
|
1896
|
-
return keyBuilder$
|
|
2074
|
+
return keyBuilder$f(luvio, keyParams);
|
|
1897
2075
|
}
|
|
1898
|
-
function normalize$
|
|
2076
|
+
function normalize$6(input, existing, path, luvio, store, timestamp) {
|
|
1899
2077
|
return input;
|
|
1900
2078
|
}
|
|
1901
|
-
const select$
|
|
2079
|
+
const select$g = function WorkspaceRepresentationSelect() {
|
|
1902
2080
|
return {
|
|
1903
2081
|
kind: 'Fragment',
|
|
1904
|
-
version: VERSION$
|
|
2082
|
+
version: VERSION$6,
|
|
1905
2083
|
private: [],
|
|
1906
2084
|
opaque: true
|
|
1907
2085
|
};
|
|
1908
2086
|
};
|
|
1909
|
-
function equals$
|
|
2087
|
+
function equals$6(existing, incoming) {
|
|
1910
2088
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1911
2089
|
return false;
|
|
1912
2090
|
}
|
|
1913
2091
|
return true;
|
|
1914
2092
|
}
|
|
1915
|
-
const ingest$
|
|
2093
|
+
const ingest$6 = function WorkspaceRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1916
2094
|
if (process.env.NODE_ENV !== 'production') {
|
|
1917
|
-
const validateError = validate$
|
|
2095
|
+
const validateError = validate$9(input);
|
|
1918
2096
|
if (validateError !== null) {
|
|
1919
2097
|
throw validateError;
|
|
1920
2098
|
}
|
|
1921
2099
|
}
|
|
1922
2100
|
const key = keyBuilderFromType$3(luvio, input);
|
|
1923
2101
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
1924
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
2102
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$6, "UnifiedAnalytics", VERSION$6, RepresentationType$6, equals$6);
|
|
1925
2103
|
return createLink(key);
|
|
1926
2104
|
};
|
|
1927
|
-
function getTypeCacheKeys$
|
|
2105
|
+
function getTypeCacheKeys$6(rootKeySet, luvio, input, fullPathFactory) {
|
|
1928
2106
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1929
2107
|
const rootKey = keyBuilderFromType$3(luvio, input);
|
|
1930
2108
|
rootKeySet.set(rootKey, {
|
|
1931
2109
|
namespace: keyPrefix,
|
|
1932
|
-
representationName: RepresentationType$
|
|
2110
|
+
representationName: RepresentationType$6,
|
|
1933
2111
|
mergeable: false
|
|
1934
2112
|
});
|
|
1935
2113
|
}
|
|
1936
2114
|
|
|
1937
|
-
const VERSION$
|
|
1938
|
-
function validate$
|
|
2115
|
+
const VERSION$5 = "25327d65bf7ad14ee671ec5a1642b193";
|
|
2116
|
+
function validate$8(obj, path = 'WorkspaceCollectionRepresentation') {
|
|
1939
2117
|
const v_error = (() => {
|
|
1940
2118
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1941
2119
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -1955,14 +2133,14 @@ function validate$4(obj, path = 'WorkspaceCollectionRepresentation') {
|
|
|
1955
2133
|
})();
|
|
1956
2134
|
return v_error === undefined ? null : v_error;
|
|
1957
2135
|
}
|
|
1958
|
-
const RepresentationType$
|
|
1959
|
-
function normalize$
|
|
2136
|
+
const RepresentationType$5 = 'WorkspaceCollectionRepresentation';
|
|
2137
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
1960
2138
|
const input_workspaces = input.workspaces;
|
|
1961
2139
|
const input_workspaces_id = path.fullPath + '__workspaces';
|
|
1962
2140
|
for (let i = 0; i < input_workspaces.length; i++) {
|
|
1963
2141
|
const input_workspaces_item = input_workspaces[i];
|
|
1964
2142
|
let input_workspaces_item_id = input_workspaces_id + '__' + i;
|
|
1965
|
-
input_workspaces[i] = ingest$
|
|
2143
|
+
input_workspaces[i] = ingest$6(input_workspaces_item, {
|
|
1966
2144
|
fullPath: input_workspaces_item_id,
|
|
1967
2145
|
propertyName: i,
|
|
1968
2146
|
parent: {
|
|
@@ -1975,22 +2153,22 @@ function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
|
1975
2153
|
}
|
|
1976
2154
|
return input;
|
|
1977
2155
|
}
|
|
1978
|
-
const select$
|
|
2156
|
+
const select$f = function WorkspaceCollectionRepresentationSelect() {
|
|
1979
2157
|
return {
|
|
1980
2158
|
kind: 'Fragment',
|
|
1981
|
-
version: VERSION$
|
|
2159
|
+
version: VERSION$5,
|
|
1982
2160
|
private: [],
|
|
1983
2161
|
selections: [
|
|
1984
2162
|
{
|
|
1985
2163
|
name: 'workspaces',
|
|
1986
2164
|
kind: 'Link',
|
|
1987
2165
|
plural: true,
|
|
1988
|
-
fragment: select$
|
|
2166
|
+
fragment: select$g()
|
|
1989
2167
|
}
|
|
1990
2168
|
]
|
|
1991
2169
|
};
|
|
1992
2170
|
};
|
|
1993
|
-
function equals$
|
|
2171
|
+
function equals$5(existing, incoming) {
|
|
1994
2172
|
const existing_workspaces = existing.workspaces;
|
|
1995
2173
|
const incoming_workspaces = incoming.workspaces;
|
|
1996
2174
|
const equals_workspaces_items = equalsArray(existing_workspaces, incoming_workspaces, (existing_workspaces_item, incoming_workspaces_item) => {
|
|
@@ -2003,48 +2181,48 @@ function equals$3(existing, incoming) {
|
|
|
2003
2181
|
}
|
|
2004
2182
|
return true;
|
|
2005
2183
|
}
|
|
2006
|
-
const ingest$
|
|
2184
|
+
const ingest$5 = function WorkspaceCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2007
2185
|
if (process.env.NODE_ENV !== 'production') {
|
|
2008
|
-
const validateError = validate$
|
|
2186
|
+
const validateError = validate$8(input);
|
|
2009
2187
|
if (validateError !== null) {
|
|
2010
2188
|
throw validateError;
|
|
2011
2189
|
}
|
|
2012
2190
|
}
|
|
2013
2191
|
const key = path.fullPath;
|
|
2014
2192
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
2015
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
2193
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "UnifiedAnalytics", VERSION$5, RepresentationType$5, equals$5);
|
|
2016
2194
|
return createLink(key);
|
|
2017
2195
|
};
|
|
2018
|
-
function getTypeCacheKeys$
|
|
2196
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
2019
2197
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2020
2198
|
const rootKey = fullPathFactory();
|
|
2021
2199
|
rootKeySet.set(rootKey, {
|
|
2022
2200
|
namespace: keyPrefix,
|
|
2023
|
-
representationName: RepresentationType$
|
|
2201
|
+
representationName: RepresentationType$5,
|
|
2024
2202
|
mergeable: false
|
|
2025
2203
|
});
|
|
2026
2204
|
const input_workspaces_length = input.workspaces.length;
|
|
2027
2205
|
for (let i = 0; i < input_workspaces_length; i++) {
|
|
2028
|
-
getTypeCacheKeys$
|
|
2206
|
+
getTypeCacheKeys$6(rootKeySet, luvio, input.workspaces[i]);
|
|
2029
2207
|
}
|
|
2030
2208
|
}
|
|
2031
2209
|
|
|
2032
|
-
function select$
|
|
2033
|
-
return select$
|
|
2210
|
+
function select$e(luvio, params) {
|
|
2211
|
+
return select$f();
|
|
2034
2212
|
}
|
|
2035
|
-
function keyBuilder$
|
|
2213
|
+
function keyBuilder$e(luvio, params) {
|
|
2036
2214
|
return keyPrefix + '::WorkspaceCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ')';
|
|
2037
2215
|
}
|
|
2038
|
-
function getResponseCacheKeys$
|
|
2039
|
-
getTypeCacheKeys$
|
|
2216
|
+
function getResponseCacheKeys$b(storeKeyMap, luvio, resourceParams, response) {
|
|
2217
|
+
getTypeCacheKeys$5(storeKeyMap, luvio, response, () => keyBuilder$e(luvio, resourceParams));
|
|
2040
2218
|
}
|
|
2041
|
-
function ingestSuccess$
|
|
2219
|
+
function ingestSuccess$9(luvio, resourceParams, response, snapshotRefresh) {
|
|
2042
2220
|
const { body } = response;
|
|
2043
|
-
const key = keyBuilder$
|
|
2044
|
-
luvio.storeIngest(key, ingest$
|
|
2221
|
+
const key = keyBuilder$e(luvio, resourceParams);
|
|
2222
|
+
luvio.storeIngest(key, ingest$5, body);
|
|
2045
2223
|
const snapshot = luvio.storeLookup({
|
|
2046
2224
|
recordId: key,
|
|
2047
|
-
node: select$
|
|
2225
|
+
node: select$e(),
|
|
2048
2226
|
variables: {},
|
|
2049
2227
|
}, snapshotRefresh);
|
|
2050
2228
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2055,13 +2233,13 @@ function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
2055
2233
|
deepFreeze(snapshot.data);
|
|
2056
2234
|
return snapshot;
|
|
2057
2235
|
}
|
|
2058
|
-
function ingestError$
|
|
2059
|
-
const key = keyBuilder$
|
|
2236
|
+
function ingestError$4(luvio, params, error, snapshotRefresh) {
|
|
2237
|
+
const key = keyBuilder$e(luvio, params);
|
|
2060
2238
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2061
2239
|
luvio.storeIngestError(key, errorSnapshot);
|
|
2062
2240
|
return errorSnapshot;
|
|
2063
2241
|
}
|
|
2064
|
-
function createResourceRequest$
|
|
2242
|
+
function createResourceRequest$b(config) {
|
|
2065
2243
|
const headers = {};
|
|
2066
2244
|
return {
|
|
2067
2245
|
baseUri: '/services/data/v62.0',
|
|
@@ -2075,106 +2253,106 @@ function createResourceRequest$9(config) {
|
|
|
2075
2253
|
};
|
|
2076
2254
|
}
|
|
2077
2255
|
|
|
2078
|
-
const adapterName$
|
|
2256
|
+
const adapterName$b = 'getWorkspaces';
|
|
2079
2257
|
const getWorkspaces_ConfigPropertyMetadata = [
|
|
2080
2258
|
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
2081
2259
|
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
2082
2260
|
];
|
|
2083
|
-
const getWorkspaces_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2084
|
-
const createResourceParams$
|
|
2085
|
-
function keyBuilder$
|
|
2086
|
-
const resourceParams = createResourceParams$
|
|
2087
|
-
return keyBuilder$
|
|
2261
|
+
const getWorkspaces_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$b, getWorkspaces_ConfigPropertyMetadata);
|
|
2262
|
+
const createResourceParams$b = /*#__PURE__*/ createResourceParams$l(getWorkspaces_ConfigPropertyMetadata);
|
|
2263
|
+
function keyBuilder$d(luvio, config) {
|
|
2264
|
+
const resourceParams = createResourceParams$b(config);
|
|
2265
|
+
return keyBuilder$e(luvio, resourceParams);
|
|
2088
2266
|
}
|
|
2089
|
-
function typeCheckConfig$
|
|
2267
|
+
function typeCheckConfig$b(untrustedConfig) {
|
|
2090
2268
|
const config = {};
|
|
2091
|
-
typeCheckConfig$
|
|
2269
|
+
typeCheckConfig$l(untrustedConfig, config, getWorkspaces_ConfigPropertyMetadata);
|
|
2092
2270
|
return config;
|
|
2093
2271
|
}
|
|
2094
|
-
function validateAdapterConfig$
|
|
2272
|
+
function validateAdapterConfig$b(untrustedConfig, configPropertyNames) {
|
|
2095
2273
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2096
2274
|
return null;
|
|
2097
2275
|
}
|
|
2098
2276
|
if (process.env.NODE_ENV !== 'production') {
|
|
2099
2277
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2100
2278
|
}
|
|
2101
|
-
const config = typeCheckConfig$
|
|
2279
|
+
const config = typeCheckConfig$b(untrustedConfig);
|
|
2102
2280
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2103
2281
|
return null;
|
|
2104
2282
|
}
|
|
2105
2283
|
return config;
|
|
2106
2284
|
}
|
|
2107
|
-
function adapterFragment$
|
|
2108
|
-
createResourceParams$
|
|
2109
|
-
return select$
|
|
2285
|
+
function adapterFragment$4(luvio, config) {
|
|
2286
|
+
createResourceParams$b(config);
|
|
2287
|
+
return select$e();
|
|
2110
2288
|
}
|
|
2111
|
-
function onFetchResponseSuccess$
|
|
2112
|
-
const snapshot = ingestSuccess$
|
|
2289
|
+
function onFetchResponseSuccess$4(luvio, config, resourceParams, response) {
|
|
2290
|
+
const snapshot = ingestSuccess$9(luvio, resourceParams, response, {
|
|
2113
2291
|
config,
|
|
2114
|
-
resolve: () => buildNetworkSnapshot$
|
|
2292
|
+
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
2115
2293
|
});
|
|
2116
2294
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2117
2295
|
}
|
|
2118
|
-
function onFetchResponseError$
|
|
2119
|
-
const snapshot = ingestError$
|
|
2296
|
+
function onFetchResponseError$4(luvio, config, resourceParams, response) {
|
|
2297
|
+
const snapshot = ingestError$4(luvio, resourceParams, response, {
|
|
2120
2298
|
config,
|
|
2121
|
-
resolve: () => buildNetworkSnapshot$
|
|
2299
|
+
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
2122
2300
|
});
|
|
2123
2301
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2124
2302
|
}
|
|
2125
|
-
function buildNetworkSnapshot$
|
|
2126
|
-
const resourceParams = createResourceParams$
|
|
2127
|
-
const request = createResourceRequest$
|
|
2303
|
+
function buildNetworkSnapshot$b(luvio, config, options) {
|
|
2304
|
+
const resourceParams = createResourceParams$b(config);
|
|
2305
|
+
const request = createResourceRequest$b(resourceParams);
|
|
2128
2306
|
return luvio.dispatchResourceRequest(request, options)
|
|
2129
2307
|
.then((response) => {
|
|
2130
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
2308
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$4(luvio, config, resourceParams, response), () => {
|
|
2131
2309
|
const cache = new StoreKeyMap();
|
|
2132
|
-
getResponseCacheKeys$
|
|
2310
|
+
getResponseCacheKeys$b(cache, luvio, resourceParams, response.body);
|
|
2133
2311
|
return cache;
|
|
2134
2312
|
});
|
|
2135
2313
|
}, (response) => {
|
|
2136
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
2314
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$4(luvio, config, resourceParams, response));
|
|
2137
2315
|
});
|
|
2138
2316
|
}
|
|
2139
|
-
function buildNetworkSnapshotCachePolicy$
|
|
2140
|
-
return buildNetworkSnapshotCachePolicy$
|
|
2317
|
+
function buildNetworkSnapshotCachePolicy$4(context, coercedAdapterRequestContext) {
|
|
2318
|
+
return buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext, buildNetworkSnapshot$b, undefined, false);
|
|
2141
2319
|
}
|
|
2142
|
-
function buildCachedSnapshotCachePolicy$
|
|
2320
|
+
function buildCachedSnapshotCachePolicy$4(context, storeLookup) {
|
|
2143
2321
|
const { luvio, config } = context;
|
|
2144
2322
|
const selector = {
|
|
2145
|
-
recordId: keyBuilder$
|
|
2146
|
-
node: adapterFragment$
|
|
2323
|
+
recordId: keyBuilder$d(luvio, config),
|
|
2324
|
+
node: adapterFragment$4(luvio, config),
|
|
2147
2325
|
variables: {},
|
|
2148
2326
|
};
|
|
2149
2327
|
const cacheSnapshot = storeLookup(selector, {
|
|
2150
2328
|
config,
|
|
2151
|
-
resolve: () => buildNetworkSnapshot$
|
|
2329
|
+
resolve: () => buildNetworkSnapshot$b(luvio, config, snapshotRefreshOptions)
|
|
2152
2330
|
});
|
|
2153
2331
|
return cacheSnapshot;
|
|
2154
2332
|
}
|
|
2155
2333
|
const getWorkspacesAdapterFactory = (luvio) => function UnifiedAnalytics__getWorkspaces(untrustedConfig, requestContext) {
|
|
2156
|
-
const config = validateAdapterConfig$
|
|
2334
|
+
const config = validateAdapterConfig$b(untrustedConfig, getWorkspaces_ConfigPropertyNames);
|
|
2157
2335
|
// Invalid or incomplete config
|
|
2158
2336
|
if (config === null) {
|
|
2159
2337
|
return null;
|
|
2160
2338
|
}
|
|
2161
2339
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2162
|
-
buildCachedSnapshotCachePolicy$
|
|
2340
|
+
buildCachedSnapshotCachePolicy$4, buildNetworkSnapshotCachePolicy$4);
|
|
2163
2341
|
};
|
|
2164
2342
|
|
|
2165
|
-
function select$
|
|
2166
|
-
return select$
|
|
2343
|
+
function select$d(luvio, params) {
|
|
2344
|
+
return select$g();
|
|
2167
2345
|
}
|
|
2168
|
-
function getResponseCacheKeys$
|
|
2169
|
-
getTypeCacheKeys$
|
|
2346
|
+
function getResponseCacheKeys$a(storeKeyMap, luvio, resourceParams, response) {
|
|
2347
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response);
|
|
2170
2348
|
}
|
|
2171
|
-
function ingestSuccess$
|
|
2349
|
+
function ingestSuccess$8(luvio, resourceParams, response) {
|
|
2172
2350
|
const { body } = response;
|
|
2173
2351
|
const key = keyBuilderFromType$3(luvio, body);
|
|
2174
|
-
luvio.storeIngest(key, ingest$
|
|
2352
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
2175
2353
|
const snapshot = luvio.storeLookup({
|
|
2176
2354
|
recordId: key,
|
|
2177
|
-
node: select$
|
|
2355
|
+
node: select$d(),
|
|
2178
2356
|
variables: {},
|
|
2179
2357
|
});
|
|
2180
2358
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2185,7 +2363,7 @@ function ingestSuccess$6(luvio, resourceParams, response) {
|
|
|
2185
2363
|
deepFreeze(snapshot.data);
|
|
2186
2364
|
return snapshot;
|
|
2187
2365
|
}
|
|
2188
|
-
function createResourceRequest$
|
|
2366
|
+
function createResourceRequest$a(config) {
|
|
2189
2367
|
const headers = {};
|
|
2190
2368
|
return {
|
|
2191
2369
|
baseUri: '/services/data/v62.0',
|
|
@@ -2199,44 +2377,44 @@ function createResourceRequest$8(config) {
|
|
|
2199
2377
|
};
|
|
2200
2378
|
}
|
|
2201
2379
|
|
|
2202
|
-
const adapterName$
|
|
2380
|
+
const adapterName$a = 'createWorkspace';
|
|
2203
2381
|
const createWorkspace_ConfigPropertyMetadata = [
|
|
2204
2382
|
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
2205
2383
|
generateParamConfigMetadata('id', false, 2 /* Body */, 0 /* String */),
|
|
2206
2384
|
generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
|
|
2207
2385
|
generateParamConfigMetadata('name', false, 2 /* Body */, 0 /* String */),
|
|
2208
2386
|
];
|
|
2209
|
-
const createWorkspace_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2210
|
-
const createResourceParams$
|
|
2211
|
-
function typeCheckConfig$
|
|
2387
|
+
const createWorkspace_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$a, createWorkspace_ConfigPropertyMetadata);
|
|
2388
|
+
const createResourceParams$a = /*#__PURE__*/ createResourceParams$l(createWorkspace_ConfigPropertyMetadata);
|
|
2389
|
+
function typeCheckConfig$a(untrustedConfig) {
|
|
2212
2390
|
const config = {};
|
|
2213
|
-
typeCheckConfig$
|
|
2391
|
+
typeCheckConfig$l(untrustedConfig, config, createWorkspace_ConfigPropertyMetadata);
|
|
2214
2392
|
return config;
|
|
2215
2393
|
}
|
|
2216
|
-
function validateAdapterConfig$
|
|
2394
|
+
function validateAdapterConfig$a(untrustedConfig, configPropertyNames) {
|
|
2217
2395
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2218
2396
|
return null;
|
|
2219
2397
|
}
|
|
2220
2398
|
if (process.env.NODE_ENV !== 'production') {
|
|
2221
2399
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2222
2400
|
}
|
|
2223
|
-
const config = typeCheckConfig$
|
|
2401
|
+
const config = typeCheckConfig$a(untrustedConfig);
|
|
2224
2402
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2225
2403
|
return null;
|
|
2226
2404
|
}
|
|
2227
2405
|
return config;
|
|
2228
2406
|
}
|
|
2229
|
-
function buildNetworkSnapshot$
|
|
2230
|
-
const resourceParams = createResourceParams$
|
|
2231
|
-
const request = createResourceRequest$
|
|
2407
|
+
function buildNetworkSnapshot$a(luvio, config, options) {
|
|
2408
|
+
const resourceParams = createResourceParams$a(config);
|
|
2409
|
+
const request = createResourceRequest$a(resourceParams);
|
|
2232
2410
|
return luvio.dispatchResourceRequest(request, options)
|
|
2233
2411
|
.then((response) => {
|
|
2234
2412
|
return luvio.handleSuccessResponse(() => {
|
|
2235
|
-
const snapshot = ingestSuccess$
|
|
2413
|
+
const snapshot = ingestSuccess$8(luvio, resourceParams, response);
|
|
2236
2414
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2237
2415
|
}, () => {
|
|
2238
2416
|
const cache = new StoreKeyMap();
|
|
2239
|
-
getResponseCacheKeys$
|
|
2417
|
+
getResponseCacheKeys$a(cache, luvio, resourceParams, response.body);
|
|
2240
2418
|
return cache;
|
|
2241
2419
|
});
|
|
2242
2420
|
}, (response) => {
|
|
@@ -2246,33 +2424,33 @@ function buildNetworkSnapshot$8(luvio, config, options) {
|
|
|
2246
2424
|
}
|
|
2247
2425
|
const createWorkspaceAdapterFactory = (luvio) => {
|
|
2248
2426
|
return function createWorkspace(untrustedConfig) {
|
|
2249
|
-
const config = validateAdapterConfig$
|
|
2427
|
+
const config = validateAdapterConfig$a(untrustedConfig, createWorkspace_ConfigPropertyNames);
|
|
2250
2428
|
// Invalid or incomplete config
|
|
2251
2429
|
if (config === null) {
|
|
2252
2430
|
throw new Error('Invalid config for "createWorkspace"');
|
|
2253
2431
|
}
|
|
2254
|
-
return buildNetworkSnapshot$
|
|
2432
|
+
return buildNetworkSnapshot$a(luvio, config);
|
|
2255
2433
|
};
|
|
2256
2434
|
};
|
|
2257
2435
|
|
|
2258
|
-
function keyBuilder$
|
|
2259
|
-
return keyBuilder$
|
|
2436
|
+
function keyBuilder$c(luvio, params) {
|
|
2437
|
+
return keyBuilder$f(luvio, {
|
|
2260
2438
|
name: params.urlParams.workspaceIdOrApiName
|
|
2261
2439
|
});
|
|
2262
2440
|
}
|
|
2263
|
-
function getResponseCacheKeys$
|
|
2264
|
-
const key = keyBuilder$
|
|
2441
|
+
function getResponseCacheKeys$9(cacheKeyMap, luvio, resourceParams) {
|
|
2442
|
+
const key = keyBuilder$c(luvio, resourceParams);
|
|
2265
2443
|
cacheKeyMap.set(key, {
|
|
2266
2444
|
namespace: keyPrefix,
|
|
2267
|
-
representationName: RepresentationType$
|
|
2445
|
+
representationName: RepresentationType$6,
|
|
2268
2446
|
mergeable: false
|
|
2269
2447
|
});
|
|
2270
2448
|
}
|
|
2271
2449
|
function evictSuccess$1(luvio, resourceParams) {
|
|
2272
|
-
const key = keyBuilder$
|
|
2450
|
+
const key = keyBuilder$c(luvio, resourceParams);
|
|
2273
2451
|
luvio.storeEvict(key);
|
|
2274
2452
|
}
|
|
2275
|
-
function createResourceRequest$
|
|
2453
|
+
function createResourceRequest$9(config) {
|
|
2276
2454
|
const headers = {};
|
|
2277
2455
|
return {
|
|
2278
2456
|
baseUri: '/services/data/v62.0',
|
|
@@ -2286,33 +2464,33 @@ function createResourceRequest$7(config) {
|
|
|
2286
2464
|
};
|
|
2287
2465
|
}
|
|
2288
2466
|
|
|
2289
|
-
const adapterName$
|
|
2467
|
+
const adapterName$9 = 'deleteWorkspace';
|
|
2290
2468
|
const deleteWorkspace_ConfigPropertyMetadata = [
|
|
2291
2469
|
generateParamConfigMetadata('workspaceIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2292
2470
|
];
|
|
2293
|
-
const deleteWorkspace_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2294
|
-
const createResourceParams$
|
|
2295
|
-
function typeCheckConfig$
|
|
2471
|
+
const deleteWorkspace_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$9, deleteWorkspace_ConfigPropertyMetadata);
|
|
2472
|
+
const createResourceParams$9 = /*#__PURE__*/ createResourceParams$l(deleteWorkspace_ConfigPropertyMetadata);
|
|
2473
|
+
function typeCheckConfig$9(untrustedConfig) {
|
|
2296
2474
|
const config = {};
|
|
2297
|
-
typeCheckConfig$
|
|
2475
|
+
typeCheckConfig$l(untrustedConfig, config, deleteWorkspace_ConfigPropertyMetadata);
|
|
2298
2476
|
return config;
|
|
2299
2477
|
}
|
|
2300
|
-
function validateAdapterConfig$
|
|
2478
|
+
function validateAdapterConfig$9(untrustedConfig, configPropertyNames) {
|
|
2301
2479
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2302
2480
|
return null;
|
|
2303
2481
|
}
|
|
2304
2482
|
if (process.env.NODE_ENV !== 'production') {
|
|
2305
2483
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2306
2484
|
}
|
|
2307
|
-
const config = typeCheckConfig$
|
|
2485
|
+
const config = typeCheckConfig$9(untrustedConfig);
|
|
2308
2486
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2309
2487
|
return null;
|
|
2310
2488
|
}
|
|
2311
2489
|
return config;
|
|
2312
2490
|
}
|
|
2313
|
-
function buildNetworkSnapshot$
|
|
2314
|
-
const resourceParams = createResourceParams$
|
|
2315
|
-
const request = createResourceRequest$
|
|
2491
|
+
function buildNetworkSnapshot$9(luvio, config, options) {
|
|
2492
|
+
const resourceParams = createResourceParams$9(config);
|
|
2493
|
+
const request = createResourceRequest$9(resourceParams);
|
|
2316
2494
|
return luvio.dispatchResourceRequest(request, options)
|
|
2317
2495
|
.then(() => {
|
|
2318
2496
|
return luvio.handleSuccessResponse(() => {
|
|
@@ -2320,7 +2498,7 @@ function buildNetworkSnapshot$7(luvio, config, options) {
|
|
|
2320
2498
|
return luvio.storeBroadcast();
|
|
2321
2499
|
}, () => {
|
|
2322
2500
|
const cache = new StoreKeyMap();
|
|
2323
|
-
getResponseCacheKeys$
|
|
2501
|
+
getResponseCacheKeys$9(cache, luvio, resourceParams);
|
|
2324
2502
|
return cache;
|
|
2325
2503
|
});
|
|
2326
2504
|
}, (response) => {
|
|
@@ -2330,33 +2508,33 @@ function buildNetworkSnapshot$7(luvio, config, options) {
|
|
|
2330
2508
|
}
|
|
2331
2509
|
const deleteWorkspaceAdapterFactory = (luvio) => {
|
|
2332
2510
|
return function UnifiedAnalyticsdeleteWorkspace(untrustedConfig) {
|
|
2333
|
-
const config = validateAdapterConfig$
|
|
2511
|
+
const config = validateAdapterConfig$9(untrustedConfig, deleteWorkspace_ConfigPropertyNames);
|
|
2334
2512
|
// Invalid or incomplete config
|
|
2335
2513
|
if (config === null) {
|
|
2336
|
-
throw new Error(`Invalid config for "${adapterName$
|
|
2514
|
+
throw new Error(`Invalid config for "${adapterName$9}"`);
|
|
2337
2515
|
}
|
|
2338
|
-
return buildNetworkSnapshot$
|
|
2516
|
+
return buildNetworkSnapshot$9(luvio, config);
|
|
2339
2517
|
};
|
|
2340
2518
|
};
|
|
2341
2519
|
|
|
2342
|
-
function select$
|
|
2343
|
-
return select$
|
|
2520
|
+
function select$c(luvio, params) {
|
|
2521
|
+
return select$g();
|
|
2344
2522
|
}
|
|
2345
|
-
function keyBuilder$
|
|
2346
|
-
return keyBuilder$
|
|
2523
|
+
function keyBuilder$b(luvio, params) {
|
|
2524
|
+
return keyBuilder$f(luvio, {
|
|
2347
2525
|
name: params.urlParams.workspaceIdOrApiName
|
|
2348
2526
|
});
|
|
2349
2527
|
}
|
|
2350
|
-
function getResponseCacheKeys$
|
|
2351
|
-
getTypeCacheKeys$
|
|
2528
|
+
function getResponseCacheKeys$8(storeKeyMap, luvio, resourceParams, response) {
|
|
2529
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response);
|
|
2352
2530
|
}
|
|
2353
|
-
function ingestSuccess$
|
|
2531
|
+
function ingestSuccess$7(luvio, resourceParams, response, snapshotRefresh) {
|
|
2354
2532
|
const { body } = response;
|
|
2355
|
-
const key = keyBuilder$
|
|
2356
|
-
luvio.storeIngest(key, ingest$
|
|
2533
|
+
const key = keyBuilder$b(luvio, resourceParams);
|
|
2534
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
2357
2535
|
const snapshot = luvio.storeLookup({
|
|
2358
2536
|
recordId: key,
|
|
2359
|
-
node: select$
|
|
2537
|
+
node: select$c(),
|
|
2360
2538
|
variables: {},
|
|
2361
2539
|
}, snapshotRefresh);
|
|
2362
2540
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2367,13 +2545,13 @@ function ingestSuccess$5(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
2367
2545
|
deepFreeze(snapshot.data);
|
|
2368
2546
|
return snapshot;
|
|
2369
2547
|
}
|
|
2370
|
-
function ingestError$
|
|
2371
|
-
const key = keyBuilder$
|
|
2548
|
+
function ingestError$3(luvio, params, error, snapshotRefresh) {
|
|
2549
|
+
const key = keyBuilder$b(luvio, params);
|
|
2372
2550
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
2373
2551
|
luvio.storeIngestError(key, errorSnapshot);
|
|
2374
2552
|
return errorSnapshot;
|
|
2375
2553
|
}
|
|
2376
|
-
function createResourceRequest$
|
|
2554
|
+
function createResourceRequest$8(config) {
|
|
2377
2555
|
const headers = {};
|
|
2378
2556
|
return {
|
|
2379
2557
|
baseUri: '/services/data/v62.0',
|
|
@@ -2387,105 +2565,105 @@ function createResourceRequest$6(config) {
|
|
|
2387
2565
|
};
|
|
2388
2566
|
}
|
|
2389
2567
|
|
|
2390
|
-
const adapterName$
|
|
2568
|
+
const adapterName$8 = 'getWorkspaceByIdOrName';
|
|
2391
2569
|
const getWorkspaceByIdOrName_ConfigPropertyMetadata = [
|
|
2392
2570
|
generateParamConfigMetadata('workspaceIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2393
2571
|
];
|
|
2394
|
-
const getWorkspaceByIdOrName_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2395
|
-
const createResourceParams$
|
|
2396
|
-
function keyBuilder$
|
|
2397
|
-
const resourceParams = createResourceParams$
|
|
2398
|
-
return keyBuilder$
|
|
2572
|
+
const getWorkspaceByIdOrName_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$8, getWorkspaceByIdOrName_ConfigPropertyMetadata);
|
|
2573
|
+
const createResourceParams$8 = /*#__PURE__*/ createResourceParams$l(getWorkspaceByIdOrName_ConfigPropertyMetadata);
|
|
2574
|
+
function keyBuilder$a(luvio, config) {
|
|
2575
|
+
const resourceParams = createResourceParams$8(config);
|
|
2576
|
+
return keyBuilder$b(luvio, resourceParams);
|
|
2399
2577
|
}
|
|
2400
|
-
function typeCheckConfig$
|
|
2578
|
+
function typeCheckConfig$8(untrustedConfig) {
|
|
2401
2579
|
const config = {};
|
|
2402
|
-
typeCheckConfig$
|
|
2580
|
+
typeCheckConfig$l(untrustedConfig, config, getWorkspaceByIdOrName_ConfigPropertyMetadata);
|
|
2403
2581
|
return config;
|
|
2404
2582
|
}
|
|
2405
|
-
function validateAdapterConfig$
|
|
2583
|
+
function validateAdapterConfig$8(untrustedConfig, configPropertyNames) {
|
|
2406
2584
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2407
2585
|
return null;
|
|
2408
2586
|
}
|
|
2409
2587
|
if (process.env.NODE_ENV !== 'production') {
|
|
2410
2588
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2411
2589
|
}
|
|
2412
|
-
const config = typeCheckConfig$
|
|
2590
|
+
const config = typeCheckConfig$8(untrustedConfig);
|
|
2413
2591
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2414
2592
|
return null;
|
|
2415
2593
|
}
|
|
2416
2594
|
return config;
|
|
2417
2595
|
}
|
|
2418
|
-
function adapterFragment$
|
|
2419
|
-
createResourceParams$
|
|
2420
|
-
return select$
|
|
2596
|
+
function adapterFragment$3(luvio, config) {
|
|
2597
|
+
createResourceParams$8(config);
|
|
2598
|
+
return select$c();
|
|
2421
2599
|
}
|
|
2422
|
-
function onFetchResponseSuccess$
|
|
2423
|
-
const snapshot = ingestSuccess$
|
|
2600
|
+
function onFetchResponseSuccess$3(luvio, config, resourceParams, response) {
|
|
2601
|
+
const snapshot = ingestSuccess$7(luvio, resourceParams, response, {
|
|
2424
2602
|
config,
|
|
2425
|
-
resolve: () => buildNetworkSnapshot$
|
|
2603
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
2426
2604
|
});
|
|
2427
2605
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2428
2606
|
}
|
|
2429
|
-
function onFetchResponseError$
|
|
2430
|
-
const snapshot = ingestError$
|
|
2607
|
+
function onFetchResponseError$3(luvio, config, resourceParams, response) {
|
|
2608
|
+
const snapshot = ingestError$3(luvio, resourceParams, response, {
|
|
2431
2609
|
config,
|
|
2432
|
-
resolve: () => buildNetworkSnapshot$
|
|
2610
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
2433
2611
|
});
|
|
2434
2612
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2435
2613
|
}
|
|
2436
|
-
function buildNetworkSnapshot$
|
|
2437
|
-
const resourceParams = createResourceParams$
|
|
2438
|
-
const request = createResourceRequest$
|
|
2614
|
+
function buildNetworkSnapshot$8(luvio, config, options) {
|
|
2615
|
+
const resourceParams = createResourceParams$8(config);
|
|
2616
|
+
const request = createResourceRequest$8(resourceParams);
|
|
2439
2617
|
return luvio.dispatchResourceRequest(request, options)
|
|
2440
2618
|
.then((response) => {
|
|
2441
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
2619
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$3(luvio, config, resourceParams, response), () => {
|
|
2442
2620
|
const cache = new StoreKeyMap();
|
|
2443
|
-
getResponseCacheKeys$
|
|
2621
|
+
getResponseCacheKeys$8(cache, luvio, resourceParams, response.body);
|
|
2444
2622
|
return cache;
|
|
2445
2623
|
});
|
|
2446
2624
|
}, (response) => {
|
|
2447
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
2625
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$3(luvio, config, resourceParams, response));
|
|
2448
2626
|
});
|
|
2449
2627
|
}
|
|
2450
|
-
function buildNetworkSnapshotCachePolicy$
|
|
2451
|
-
return buildNetworkSnapshotCachePolicy$
|
|
2628
|
+
function buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext) {
|
|
2629
|
+
return buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext, buildNetworkSnapshot$8, undefined, false);
|
|
2452
2630
|
}
|
|
2453
|
-
function buildCachedSnapshotCachePolicy$
|
|
2631
|
+
function buildCachedSnapshotCachePolicy$3(context, storeLookup) {
|
|
2454
2632
|
const { luvio, config } = context;
|
|
2455
2633
|
const selector = {
|
|
2456
|
-
recordId: keyBuilder$
|
|
2457
|
-
node: adapterFragment$
|
|
2634
|
+
recordId: keyBuilder$a(luvio, config),
|
|
2635
|
+
node: adapterFragment$3(luvio, config),
|
|
2458
2636
|
variables: {},
|
|
2459
2637
|
};
|
|
2460
2638
|
const cacheSnapshot = storeLookup(selector, {
|
|
2461
2639
|
config,
|
|
2462
|
-
resolve: () => buildNetworkSnapshot$
|
|
2640
|
+
resolve: () => buildNetworkSnapshot$8(luvio, config, snapshotRefreshOptions)
|
|
2463
2641
|
});
|
|
2464
2642
|
return cacheSnapshot;
|
|
2465
2643
|
}
|
|
2466
2644
|
const getWorkspaceByIdOrNameAdapterFactory = (luvio) => function UnifiedAnalytics__getWorkspaceByIdOrName(untrustedConfig, requestContext) {
|
|
2467
|
-
const config = validateAdapterConfig$
|
|
2645
|
+
const config = validateAdapterConfig$8(untrustedConfig, getWorkspaceByIdOrName_ConfigPropertyNames);
|
|
2468
2646
|
// Invalid or incomplete config
|
|
2469
2647
|
if (config === null) {
|
|
2470
2648
|
return null;
|
|
2471
2649
|
}
|
|
2472
2650
|
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2473
|
-
buildCachedSnapshotCachePolicy$
|
|
2651
|
+
buildCachedSnapshotCachePolicy$3, buildNetworkSnapshotCachePolicy$3);
|
|
2474
2652
|
};
|
|
2475
2653
|
|
|
2476
|
-
function select$
|
|
2477
|
-
return select$
|
|
2654
|
+
function select$b(luvio, params) {
|
|
2655
|
+
return select$g();
|
|
2478
2656
|
}
|
|
2479
|
-
function getResponseCacheKeys$
|
|
2480
|
-
getTypeCacheKeys$
|
|
2657
|
+
function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
|
|
2658
|
+
getTypeCacheKeys$6(storeKeyMap, luvio, response);
|
|
2481
2659
|
}
|
|
2482
|
-
function ingestSuccess$
|
|
2660
|
+
function ingestSuccess$6(luvio, resourceParams, response) {
|
|
2483
2661
|
const { body } = response;
|
|
2484
2662
|
const key = keyBuilderFromType$3(luvio, body);
|
|
2485
|
-
luvio.storeIngest(key, ingest$
|
|
2663
|
+
luvio.storeIngest(key, ingest$6, body);
|
|
2486
2664
|
const snapshot = luvio.storeLookup({
|
|
2487
2665
|
recordId: key,
|
|
2488
|
-
node: select$
|
|
2666
|
+
node: select$b(),
|
|
2489
2667
|
variables: {},
|
|
2490
2668
|
});
|
|
2491
2669
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2496,7 +2674,7 @@ function ingestSuccess$4(luvio, resourceParams, response) {
|
|
|
2496
2674
|
deepFreeze(snapshot.data);
|
|
2497
2675
|
return snapshot;
|
|
2498
2676
|
}
|
|
2499
|
-
function createResourceRequest$
|
|
2677
|
+
function createResourceRequest$7(config) {
|
|
2500
2678
|
const headers = {};
|
|
2501
2679
|
return {
|
|
2502
2680
|
baseUri: '/services/data/v62.0',
|
|
@@ -2510,7 +2688,7 @@ function createResourceRequest$5(config) {
|
|
|
2510
2688
|
};
|
|
2511
2689
|
}
|
|
2512
2690
|
|
|
2513
|
-
const adapterName$
|
|
2691
|
+
const adapterName$7 = 'updateWorkspace';
|
|
2514
2692
|
const updateWorkspace_ConfigPropertyMetadata = [
|
|
2515
2693
|
generateParamConfigMetadata('workspaceIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2516
2694
|
generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
|
|
@@ -2518,37 +2696,37 @@ const updateWorkspace_ConfigPropertyMetadata = [
|
|
|
2518
2696
|
generateParamConfigMetadata('label', true, 2 /* Body */, 0 /* String */),
|
|
2519
2697
|
generateParamConfigMetadata('name', false, 2 /* Body */, 0 /* String */),
|
|
2520
2698
|
];
|
|
2521
|
-
const updateWorkspace_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2522
|
-
const createResourceParams$
|
|
2523
|
-
function typeCheckConfig$
|
|
2699
|
+
const updateWorkspace_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$7, updateWorkspace_ConfigPropertyMetadata);
|
|
2700
|
+
const createResourceParams$7 = /*#__PURE__*/ createResourceParams$l(updateWorkspace_ConfigPropertyMetadata);
|
|
2701
|
+
function typeCheckConfig$7(untrustedConfig) {
|
|
2524
2702
|
const config = {};
|
|
2525
|
-
typeCheckConfig$
|
|
2703
|
+
typeCheckConfig$l(untrustedConfig, config, updateWorkspace_ConfigPropertyMetadata);
|
|
2526
2704
|
return config;
|
|
2527
2705
|
}
|
|
2528
|
-
function validateAdapterConfig$
|
|
2706
|
+
function validateAdapterConfig$7(untrustedConfig, configPropertyNames) {
|
|
2529
2707
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2530
2708
|
return null;
|
|
2531
2709
|
}
|
|
2532
2710
|
if (process.env.NODE_ENV !== 'production') {
|
|
2533
2711
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2534
2712
|
}
|
|
2535
|
-
const config = typeCheckConfig$
|
|
2713
|
+
const config = typeCheckConfig$7(untrustedConfig);
|
|
2536
2714
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2537
2715
|
return null;
|
|
2538
2716
|
}
|
|
2539
2717
|
return config;
|
|
2540
2718
|
}
|
|
2541
|
-
function buildNetworkSnapshot$
|
|
2542
|
-
const resourceParams = createResourceParams$
|
|
2543
|
-
const request = createResourceRequest$
|
|
2719
|
+
function buildNetworkSnapshot$7(luvio, config, options) {
|
|
2720
|
+
const resourceParams = createResourceParams$7(config);
|
|
2721
|
+
const request = createResourceRequest$7(resourceParams);
|
|
2544
2722
|
return luvio.dispatchResourceRequest(request, options)
|
|
2545
2723
|
.then((response) => {
|
|
2546
2724
|
return luvio.handleSuccessResponse(() => {
|
|
2547
|
-
const snapshot = ingestSuccess$
|
|
2725
|
+
const snapshot = ingestSuccess$6(luvio, resourceParams, response);
|
|
2548
2726
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2549
2727
|
}, () => {
|
|
2550
2728
|
const cache = new StoreKeyMap();
|
|
2551
|
-
getResponseCacheKeys$
|
|
2729
|
+
getResponseCacheKeys$7(cache, luvio, resourceParams, response.body);
|
|
2552
2730
|
return cache;
|
|
2553
2731
|
});
|
|
2554
2732
|
}, (response) => {
|
|
@@ -2558,17 +2736,17 @@ function buildNetworkSnapshot$5(luvio, config, options) {
|
|
|
2558
2736
|
}
|
|
2559
2737
|
const updateWorkspaceAdapterFactory = (luvio) => {
|
|
2560
2738
|
return function updateWorkspace(untrustedConfig) {
|
|
2561
|
-
const config = validateAdapterConfig$
|
|
2739
|
+
const config = validateAdapterConfig$7(untrustedConfig, updateWorkspace_ConfigPropertyNames);
|
|
2562
2740
|
// Invalid or incomplete config
|
|
2563
2741
|
if (config === null) {
|
|
2564
2742
|
throw new Error('Invalid config for "updateWorkspace"');
|
|
2565
2743
|
}
|
|
2566
|
-
return buildNetworkSnapshot$
|
|
2744
|
+
return buildNetworkSnapshot$7(luvio, config);
|
|
2567
2745
|
};
|
|
2568
2746
|
};
|
|
2569
2747
|
|
|
2570
|
-
const VERSION$
|
|
2571
|
-
function validate$
|
|
2748
|
+
const VERSION$4 = "4abc4f793ed7181313c3ae7365a6fb8b";
|
|
2749
|
+
function validate$7(obj, path = 'WorkspaceAssetRepresentation') {
|
|
2572
2750
|
const v_error = (() => {
|
|
2573
2751
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
2574
2752
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -2590,7 +2768,7 @@ function validate$3(obj, path = 'WorkspaceAssetRepresentation') {
|
|
|
2590
2768
|
}
|
|
2591
2769
|
const obj_createdBy = obj.createdBy;
|
|
2592
2770
|
const path_createdBy = path + '.createdBy';
|
|
2593
|
-
const referencepath_createdByValidationError = validate$
|
|
2771
|
+
const referencepath_createdByValidationError = validate$h(obj_createdBy, path_createdBy);
|
|
2594
2772
|
if (referencepath_createdByValidationError !== null) {
|
|
2595
2773
|
let message = 'Object doesn\'t match AnalyticsUserRepresentation (at "' + path_createdBy + '")\n';
|
|
2596
2774
|
message += referencepath_createdByValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -2609,68 +2787,68 @@ function validate$3(obj, path = 'WorkspaceAssetRepresentation') {
|
|
|
2609
2787
|
})();
|
|
2610
2788
|
return v_error === undefined ? null : v_error;
|
|
2611
2789
|
}
|
|
2612
|
-
const RepresentationType$
|
|
2613
|
-
function keyBuilder$
|
|
2614
|
-
return keyPrefix + '::' + RepresentationType$
|
|
2790
|
+
const RepresentationType$4 = 'WorkspaceAssetRepresentation';
|
|
2791
|
+
function keyBuilder$9(luvio, config) {
|
|
2792
|
+
return keyPrefix + '::' + RepresentationType$4 + ':' + config.assetId;
|
|
2615
2793
|
}
|
|
2616
2794
|
function keyBuilderFromType$2(luvio, object) {
|
|
2617
2795
|
const keyParams = {
|
|
2618
2796
|
assetId: object.assetId
|
|
2619
2797
|
};
|
|
2620
|
-
return keyBuilder$
|
|
2798
|
+
return keyBuilder$9(luvio, keyParams);
|
|
2621
2799
|
}
|
|
2622
|
-
function normalize$
|
|
2800
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
2623
2801
|
return input;
|
|
2624
2802
|
}
|
|
2625
|
-
const select$
|
|
2803
|
+
const select$a = function WorkspaceAssetRepresentationSelect() {
|
|
2626
2804
|
return {
|
|
2627
2805
|
kind: 'Fragment',
|
|
2628
|
-
version: VERSION$
|
|
2806
|
+
version: VERSION$4,
|
|
2629
2807
|
private: [],
|
|
2630
2808
|
opaque: true
|
|
2631
2809
|
};
|
|
2632
2810
|
};
|
|
2633
|
-
function equals$
|
|
2811
|
+
function equals$4(existing, incoming) {
|
|
2634
2812
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
2635
2813
|
return false;
|
|
2636
2814
|
}
|
|
2637
2815
|
return true;
|
|
2638
2816
|
}
|
|
2639
|
-
const ingest$
|
|
2817
|
+
const ingest$4 = function WorkspaceAssetRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
2640
2818
|
if (process.env.NODE_ENV !== 'production') {
|
|
2641
|
-
const validateError = validate$
|
|
2819
|
+
const validateError = validate$7(input);
|
|
2642
2820
|
if (validateError !== null) {
|
|
2643
2821
|
throw validateError;
|
|
2644
2822
|
}
|
|
2645
2823
|
}
|
|
2646
2824
|
const key = keyBuilderFromType$2(luvio, input);
|
|
2647
2825
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
2648
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
2826
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "UnifiedAnalytics", VERSION$4, RepresentationType$4, equals$4);
|
|
2649
2827
|
return createLink(key);
|
|
2650
2828
|
};
|
|
2651
|
-
function getTypeCacheKeys$
|
|
2829
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
2652
2830
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
2653
2831
|
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
2654
2832
|
rootKeySet.set(rootKey, {
|
|
2655
2833
|
namespace: keyPrefix,
|
|
2656
|
-
representationName: RepresentationType$
|
|
2834
|
+
representationName: RepresentationType$4,
|
|
2657
2835
|
mergeable: false
|
|
2658
2836
|
});
|
|
2659
2837
|
}
|
|
2660
2838
|
|
|
2661
|
-
function select$
|
|
2662
|
-
return select$
|
|
2839
|
+
function select$9(luvio, params) {
|
|
2840
|
+
return select$a();
|
|
2663
2841
|
}
|
|
2664
|
-
function getResponseCacheKeys$
|
|
2665
|
-
getTypeCacheKeys$
|
|
2842
|
+
function getResponseCacheKeys$6(storeKeyMap, luvio, resourceParams, response) {
|
|
2843
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response);
|
|
2666
2844
|
}
|
|
2667
|
-
function ingestSuccess$
|
|
2845
|
+
function ingestSuccess$5(luvio, resourceParams, response) {
|
|
2668
2846
|
const { body } = response;
|
|
2669
2847
|
const key = keyBuilderFromType$2(luvio, body);
|
|
2670
|
-
luvio.storeIngest(key, ingest$
|
|
2848
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
2671
2849
|
const snapshot = luvio.storeLookup({
|
|
2672
2850
|
recordId: key,
|
|
2673
|
-
node: select$
|
|
2851
|
+
node: select$9(),
|
|
2674
2852
|
variables: {},
|
|
2675
2853
|
});
|
|
2676
2854
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2681,7 +2859,7 @@ function ingestSuccess$3(luvio, resourceParams, response) {
|
|
|
2681
2859
|
deepFreeze(snapshot.data);
|
|
2682
2860
|
return snapshot;
|
|
2683
2861
|
}
|
|
2684
|
-
function createResourceRequest$
|
|
2862
|
+
function createResourceRequest$6(config) {
|
|
2685
2863
|
const headers = {};
|
|
2686
2864
|
return {
|
|
2687
2865
|
baseUri: '/services/data/v62.0',
|
|
@@ -2695,44 +2873,44 @@ function createResourceRequest$4(config) {
|
|
|
2695
2873
|
};
|
|
2696
2874
|
}
|
|
2697
2875
|
|
|
2698
|
-
const adapterName$
|
|
2876
|
+
const adapterName$6 = 'createWorkspaceAsset';
|
|
2699
2877
|
const createWorkspaceAsset_ConfigPropertyMetadata = [
|
|
2700
2878
|
generateParamConfigMetadata('workspaceIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2701
2879
|
generateParamConfigMetadata('assetId', true, 2 /* Body */, 0 /* String */),
|
|
2702
2880
|
generateParamConfigMetadata('assetType', true, 2 /* Body */, 0 /* String */),
|
|
2703
2881
|
generateParamConfigMetadata('assetUsageType', true, 2 /* Body */, 0 /* String */),
|
|
2704
2882
|
];
|
|
2705
|
-
const createWorkspaceAsset_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2706
|
-
const createResourceParams$
|
|
2707
|
-
function typeCheckConfig$
|
|
2883
|
+
const createWorkspaceAsset_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$6, createWorkspaceAsset_ConfigPropertyMetadata);
|
|
2884
|
+
const createResourceParams$6 = /*#__PURE__*/ createResourceParams$l(createWorkspaceAsset_ConfigPropertyMetadata);
|
|
2885
|
+
function typeCheckConfig$6(untrustedConfig) {
|
|
2708
2886
|
const config = {};
|
|
2709
|
-
typeCheckConfig$
|
|
2887
|
+
typeCheckConfig$l(untrustedConfig, config, createWorkspaceAsset_ConfigPropertyMetadata);
|
|
2710
2888
|
return config;
|
|
2711
2889
|
}
|
|
2712
|
-
function validateAdapterConfig$
|
|
2890
|
+
function validateAdapterConfig$6(untrustedConfig, configPropertyNames) {
|
|
2713
2891
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2714
2892
|
return null;
|
|
2715
2893
|
}
|
|
2716
2894
|
if (process.env.NODE_ENV !== 'production') {
|
|
2717
2895
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2718
2896
|
}
|
|
2719
|
-
const config = typeCheckConfig$
|
|
2897
|
+
const config = typeCheckConfig$6(untrustedConfig);
|
|
2720
2898
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2721
2899
|
return null;
|
|
2722
2900
|
}
|
|
2723
2901
|
return config;
|
|
2724
2902
|
}
|
|
2725
|
-
function buildNetworkSnapshot$
|
|
2726
|
-
const resourceParams = createResourceParams$
|
|
2727
|
-
const request = createResourceRequest$
|
|
2903
|
+
function buildNetworkSnapshot$6(luvio, config, options) {
|
|
2904
|
+
const resourceParams = createResourceParams$6(config);
|
|
2905
|
+
const request = createResourceRequest$6(resourceParams);
|
|
2728
2906
|
return luvio.dispatchResourceRequest(request, options)
|
|
2729
2907
|
.then((response) => {
|
|
2730
2908
|
return luvio.handleSuccessResponse(() => {
|
|
2731
|
-
const snapshot = ingestSuccess$
|
|
2909
|
+
const snapshot = ingestSuccess$5(luvio, resourceParams, response);
|
|
2732
2910
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
2733
2911
|
}, () => {
|
|
2734
2912
|
const cache = new StoreKeyMap();
|
|
2735
|
-
getResponseCacheKeys$
|
|
2913
|
+
getResponseCacheKeys$6(cache, luvio, resourceParams, response.body);
|
|
2736
2914
|
return cache;
|
|
2737
2915
|
});
|
|
2738
2916
|
}, (response) => {
|
|
@@ -2742,33 +2920,33 @@ function buildNetworkSnapshot$4(luvio, config, options) {
|
|
|
2742
2920
|
}
|
|
2743
2921
|
const createWorkspaceAssetAdapterFactory = (luvio) => {
|
|
2744
2922
|
return function createWorkspaceAsset(untrustedConfig) {
|
|
2745
|
-
const config = validateAdapterConfig$
|
|
2923
|
+
const config = validateAdapterConfig$6(untrustedConfig, createWorkspaceAsset_ConfigPropertyNames);
|
|
2746
2924
|
// Invalid or incomplete config
|
|
2747
2925
|
if (config === null) {
|
|
2748
2926
|
throw new Error('Invalid config for "createWorkspaceAsset"');
|
|
2749
2927
|
}
|
|
2750
|
-
return buildNetworkSnapshot$
|
|
2928
|
+
return buildNetworkSnapshot$6(luvio, config);
|
|
2751
2929
|
};
|
|
2752
2930
|
};
|
|
2753
2931
|
|
|
2754
|
-
function keyBuilder$
|
|
2755
|
-
return keyBuilder$
|
|
2932
|
+
function keyBuilder$8(luvio, params) {
|
|
2933
|
+
return keyBuilder$9(luvio, {
|
|
2756
2934
|
assetId: params.urlParams.assetId
|
|
2757
2935
|
});
|
|
2758
2936
|
}
|
|
2759
|
-
function getResponseCacheKeys$
|
|
2760
|
-
const key = keyBuilder$
|
|
2937
|
+
function getResponseCacheKeys$5(cacheKeyMap, luvio, resourceParams) {
|
|
2938
|
+
const key = keyBuilder$8(luvio, resourceParams);
|
|
2761
2939
|
cacheKeyMap.set(key, {
|
|
2762
2940
|
namespace: keyPrefix,
|
|
2763
|
-
representationName: RepresentationType$
|
|
2941
|
+
representationName: RepresentationType$4,
|
|
2764
2942
|
mergeable: false
|
|
2765
2943
|
});
|
|
2766
2944
|
}
|
|
2767
2945
|
function evictSuccess(luvio, resourceParams) {
|
|
2768
|
-
const key = keyBuilder$
|
|
2946
|
+
const key = keyBuilder$8(luvio, resourceParams);
|
|
2769
2947
|
luvio.storeEvict(key);
|
|
2770
2948
|
}
|
|
2771
|
-
function createResourceRequest$
|
|
2949
|
+
function createResourceRequest$5(config) {
|
|
2772
2950
|
const headers = {};
|
|
2773
2951
|
return {
|
|
2774
2952
|
baseUri: '/services/data/v62.0',
|
|
@@ -2782,34 +2960,34 @@ function createResourceRequest$3(config) {
|
|
|
2782
2960
|
};
|
|
2783
2961
|
}
|
|
2784
2962
|
|
|
2785
|
-
const adapterName$
|
|
2963
|
+
const adapterName$5 = 'deleteWorkspaceAsset';
|
|
2786
2964
|
const deleteWorkspaceAsset_ConfigPropertyMetadata = [
|
|
2787
2965
|
generateParamConfigMetadata('assetId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2788
2966
|
generateParamConfigMetadata('workspaceIdOrApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2789
2967
|
];
|
|
2790
|
-
const deleteWorkspaceAsset_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
2791
|
-
const createResourceParams$
|
|
2792
|
-
function typeCheckConfig$
|
|
2968
|
+
const deleteWorkspaceAsset_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$5, deleteWorkspaceAsset_ConfigPropertyMetadata);
|
|
2969
|
+
const createResourceParams$5 = /*#__PURE__*/ createResourceParams$l(deleteWorkspaceAsset_ConfigPropertyMetadata);
|
|
2970
|
+
function typeCheckConfig$5(untrustedConfig) {
|
|
2793
2971
|
const config = {};
|
|
2794
|
-
typeCheckConfig$
|
|
2972
|
+
typeCheckConfig$l(untrustedConfig, config, deleteWorkspaceAsset_ConfigPropertyMetadata);
|
|
2795
2973
|
return config;
|
|
2796
2974
|
}
|
|
2797
|
-
function validateAdapterConfig$
|
|
2975
|
+
function validateAdapterConfig$5(untrustedConfig, configPropertyNames) {
|
|
2798
2976
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
2799
2977
|
return null;
|
|
2800
2978
|
}
|
|
2801
2979
|
if (process.env.NODE_ENV !== 'production') {
|
|
2802
2980
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
2803
2981
|
}
|
|
2804
|
-
const config = typeCheckConfig$
|
|
2982
|
+
const config = typeCheckConfig$5(untrustedConfig);
|
|
2805
2983
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
2806
2984
|
return null;
|
|
2807
2985
|
}
|
|
2808
2986
|
return config;
|
|
2809
2987
|
}
|
|
2810
|
-
function buildNetworkSnapshot$
|
|
2811
|
-
const resourceParams = createResourceParams$
|
|
2812
|
-
const request = createResourceRequest$
|
|
2988
|
+
function buildNetworkSnapshot$5(luvio, config, options) {
|
|
2989
|
+
const resourceParams = createResourceParams$5(config);
|
|
2990
|
+
const request = createResourceRequest$5(resourceParams);
|
|
2813
2991
|
return luvio.dispatchResourceRequest(request, options)
|
|
2814
2992
|
.then(() => {
|
|
2815
2993
|
return luvio.handleSuccessResponse(() => {
|
|
@@ -2817,7 +2995,7 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
2817
2995
|
return luvio.storeBroadcast();
|
|
2818
2996
|
}, () => {
|
|
2819
2997
|
const cache = new StoreKeyMap();
|
|
2820
|
-
getResponseCacheKeys$
|
|
2998
|
+
getResponseCacheKeys$5(cache, luvio, resourceParams);
|
|
2821
2999
|
return cache;
|
|
2822
3000
|
});
|
|
2823
3001
|
}, (response) => {
|
|
@@ -2827,15 +3005,567 @@ function buildNetworkSnapshot$3(luvio, config, options) {
|
|
|
2827
3005
|
}
|
|
2828
3006
|
const deleteWorkspaceAssetAdapterFactory = (luvio) => {
|
|
2829
3007
|
return function UnifiedAnalyticsdeleteWorkspaceAsset(untrustedConfig) {
|
|
2830
|
-
const config = validateAdapterConfig$
|
|
3008
|
+
const config = validateAdapterConfig$5(untrustedConfig, deleteWorkspaceAsset_ConfigPropertyNames);
|
|
2831
3009
|
// Invalid or incomplete config
|
|
2832
3010
|
if (config === null) {
|
|
2833
|
-
throw new Error(`Invalid config for "${adapterName$
|
|
3011
|
+
throw new Error(`Invalid config for "${adapterName$5}"`);
|
|
2834
3012
|
}
|
|
2835
|
-
return buildNetworkSnapshot$
|
|
3013
|
+
return buildNetworkSnapshot$5(luvio, config);
|
|
2836
3014
|
};
|
|
2837
3015
|
};
|
|
2838
3016
|
|
|
3017
|
+
function validate$6(obj, path = 'FlowVariableRepresentation') {
|
|
3018
|
+
const v_error = (() => {
|
|
3019
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3020
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3021
|
+
}
|
|
3022
|
+
const obj_dataType = obj.dataType;
|
|
3023
|
+
const path_dataType = path + '.dataType';
|
|
3024
|
+
if (typeof obj_dataType !== 'string') {
|
|
3025
|
+
return new TypeError('Expected "string" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
|
|
3026
|
+
}
|
|
3027
|
+
if (obj.description !== undefined) {
|
|
3028
|
+
const obj_description = obj.description;
|
|
3029
|
+
const path_description = path + '.description';
|
|
3030
|
+
if (typeof obj_description !== 'string') {
|
|
3031
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
3032
|
+
}
|
|
3033
|
+
}
|
|
3034
|
+
const obj_isCollection = obj.isCollection;
|
|
3035
|
+
const path_isCollection = path + '.isCollection';
|
|
3036
|
+
if (typeof obj_isCollection !== 'boolean') {
|
|
3037
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isCollection + '" (at "' + path_isCollection + '")');
|
|
3038
|
+
}
|
|
3039
|
+
const obj_isInput = obj.isInput;
|
|
3040
|
+
const path_isInput = path + '.isInput';
|
|
3041
|
+
if (typeof obj_isInput !== 'boolean') {
|
|
3042
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isInput + '" (at "' + path_isInput + '")');
|
|
3043
|
+
}
|
|
3044
|
+
const obj_isOutput = obj.isOutput;
|
|
3045
|
+
const path_isOutput = path + '.isOutput';
|
|
3046
|
+
if (typeof obj_isOutput !== 'boolean') {
|
|
3047
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_isOutput + '" (at "' + path_isOutput + '")');
|
|
3048
|
+
}
|
|
3049
|
+
const obj_name = obj.name;
|
|
3050
|
+
const path_name = path + '.name';
|
|
3051
|
+
if (typeof obj_name !== 'string') {
|
|
3052
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
3053
|
+
}
|
|
3054
|
+
if (obj.objectType !== undefined) {
|
|
3055
|
+
const obj_objectType = obj.objectType;
|
|
3056
|
+
const path_objectType = path + '.objectType';
|
|
3057
|
+
if (typeof obj_objectType !== 'string') {
|
|
3058
|
+
return new TypeError('Expected "string" but received "' + typeof obj_objectType + '" (at "' + path_objectType + '")');
|
|
3059
|
+
}
|
|
3060
|
+
}
|
|
3061
|
+
if (obj.value !== undefined) {
|
|
3062
|
+
const obj_value = obj.value;
|
|
3063
|
+
const path_value = path + '.value';
|
|
3064
|
+
if (typeof obj_value !== 'object' || ArrayIsArray(obj_value) || obj_value === null) {
|
|
3065
|
+
return new TypeError('Expected "object" but received "' + typeof obj_value + '" (at "' + path_value + '")');
|
|
3066
|
+
}
|
|
3067
|
+
const obj_value_keys = ObjectKeys(obj_value);
|
|
3068
|
+
for (let i = 0; i < obj_value_keys.length; i++) {
|
|
3069
|
+
const key = obj_value_keys[i];
|
|
3070
|
+
const obj_value_prop = obj_value[key];
|
|
3071
|
+
const path_value_prop = path_value + '["' + key + '"]';
|
|
3072
|
+
if (obj_value_prop === undefined) {
|
|
3073
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_value_prop + '" (at "' + path_value_prop + '")');
|
|
3074
|
+
}
|
|
3075
|
+
}
|
|
3076
|
+
}
|
|
3077
|
+
})();
|
|
3078
|
+
return v_error === undefined ? null : v_error;
|
|
3079
|
+
}
|
|
3080
|
+
|
|
3081
|
+
function validate$5(obj, path = 'FlowMetadataRepresentation') {
|
|
3082
|
+
const v_error = (() => {
|
|
3083
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3084
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3085
|
+
}
|
|
3086
|
+
const obj_variables = obj.variables;
|
|
3087
|
+
const path_variables = path + '.variables';
|
|
3088
|
+
if (!ArrayIsArray(obj_variables)) {
|
|
3089
|
+
return new TypeError('Expected "array" but received "' + typeof obj_variables + '" (at "' + path_variables + '")');
|
|
3090
|
+
}
|
|
3091
|
+
for (let i = 0; i < obj_variables.length; i++) {
|
|
3092
|
+
const obj_variables_item = obj_variables[i];
|
|
3093
|
+
const path_variables_item = path_variables + '[' + i + ']';
|
|
3094
|
+
const referencepath_variables_itemValidationError = validate$6(obj_variables_item, path_variables_item);
|
|
3095
|
+
if (referencepath_variables_itemValidationError !== null) {
|
|
3096
|
+
let message = 'Object doesn\'t match FlowVariableRepresentation (at "' + path_variables_item + '")\n';
|
|
3097
|
+
message += referencepath_variables_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3098
|
+
return new TypeError(message);
|
|
3099
|
+
}
|
|
3100
|
+
}
|
|
3101
|
+
})();
|
|
3102
|
+
return v_error === undefined ? null : v_error;
|
|
3103
|
+
}
|
|
3104
|
+
|
|
3105
|
+
const VERSION$3 = "de196b48e17c8845d21d5ece89a091a2";
|
|
3106
|
+
function validate$4(obj, path = 'FlowRepresentation') {
|
|
3107
|
+
const v_error = (() => {
|
|
3108
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3109
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3110
|
+
}
|
|
3111
|
+
if (obj.activeVersionId !== undefined) {
|
|
3112
|
+
const obj_activeVersionId = obj.activeVersionId;
|
|
3113
|
+
const path_activeVersionId = path + '.activeVersionId';
|
|
3114
|
+
if (typeof obj_activeVersionId !== 'string') {
|
|
3115
|
+
return new TypeError('Expected "string" but received "' + typeof obj_activeVersionId + '" (at "' + path_activeVersionId + '")');
|
|
3116
|
+
}
|
|
3117
|
+
}
|
|
3118
|
+
const obj_apiName = obj.apiName;
|
|
3119
|
+
const path_apiName = path + '.apiName';
|
|
3120
|
+
if (typeof obj_apiName !== 'string') {
|
|
3121
|
+
return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
|
|
3122
|
+
}
|
|
3123
|
+
if (obj.description !== undefined) {
|
|
3124
|
+
const obj_description = obj.description;
|
|
3125
|
+
const path_description = path + '.description';
|
|
3126
|
+
if (typeof obj_description !== 'string') {
|
|
3127
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
3128
|
+
}
|
|
3129
|
+
}
|
|
3130
|
+
const obj_id = obj.id;
|
|
3131
|
+
const path_id = path + '.id';
|
|
3132
|
+
if (typeof obj_id !== 'string') {
|
|
3133
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
3134
|
+
}
|
|
3135
|
+
if (obj.label !== undefined) {
|
|
3136
|
+
const obj_label = obj.label;
|
|
3137
|
+
const path_label = path + '.label';
|
|
3138
|
+
if (typeof obj_label !== 'string') {
|
|
3139
|
+
return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
|
|
3140
|
+
}
|
|
3141
|
+
}
|
|
3142
|
+
if (obj.metadata !== undefined) {
|
|
3143
|
+
const obj_metadata = obj.metadata;
|
|
3144
|
+
const path_metadata = path + '.metadata';
|
|
3145
|
+
const referencepath_metadataValidationError = validate$5(obj_metadata, path_metadata);
|
|
3146
|
+
if (referencepath_metadataValidationError !== null) {
|
|
3147
|
+
let message = 'Object doesn\'t match FlowMetadataRepresentation (at "' + path_metadata + '")\n';
|
|
3148
|
+
message += referencepath_metadataValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
3149
|
+
return new TypeError(message);
|
|
3150
|
+
}
|
|
3151
|
+
}
|
|
3152
|
+
if (obj.namespacePrefix !== undefined) {
|
|
3153
|
+
const obj_namespacePrefix = obj.namespacePrefix;
|
|
3154
|
+
const path_namespacePrefix = path + '.namespacePrefix';
|
|
3155
|
+
if (typeof obj_namespacePrefix !== 'string') {
|
|
3156
|
+
return new TypeError('Expected "string" but received "' + typeof obj_namespacePrefix + '" (at "' + path_namespacePrefix + '")');
|
|
3157
|
+
}
|
|
3158
|
+
}
|
|
3159
|
+
if (obj.processType !== undefined) {
|
|
3160
|
+
const obj_processType = obj.processType;
|
|
3161
|
+
const path_processType = path + '.processType';
|
|
3162
|
+
if (typeof obj_processType !== 'string') {
|
|
3163
|
+
return new TypeError('Expected "string" but received "' + typeof obj_processType + '" (at "' + path_processType + '")');
|
|
3164
|
+
}
|
|
3165
|
+
}
|
|
3166
|
+
})();
|
|
3167
|
+
return v_error === undefined ? null : v_error;
|
|
3168
|
+
}
|
|
3169
|
+
const RepresentationType$3 = 'FlowRepresentation';
|
|
3170
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
3171
|
+
return input;
|
|
3172
|
+
}
|
|
3173
|
+
const select$8 = function FlowRepresentationSelect() {
|
|
3174
|
+
return {
|
|
3175
|
+
kind: 'Fragment',
|
|
3176
|
+
version: VERSION$3,
|
|
3177
|
+
private: [],
|
|
3178
|
+
opaque: true
|
|
3179
|
+
};
|
|
3180
|
+
};
|
|
3181
|
+
function equals$3(existing, incoming) {
|
|
3182
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
3183
|
+
return false;
|
|
3184
|
+
}
|
|
3185
|
+
return true;
|
|
3186
|
+
}
|
|
3187
|
+
const ingest$3 = function FlowRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3188
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3189
|
+
const validateError = validate$4(input);
|
|
3190
|
+
if (validateError !== null) {
|
|
3191
|
+
throw validateError;
|
|
3192
|
+
}
|
|
3193
|
+
}
|
|
3194
|
+
const key = path.fullPath;
|
|
3195
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
3196
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "UnifiedAnalytics", VERSION$3, RepresentationType$3, equals$3);
|
|
3197
|
+
return createLink(key);
|
|
3198
|
+
};
|
|
3199
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
3200
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3201
|
+
const rootKey = fullPathFactory();
|
|
3202
|
+
rootKeySet.set(rootKey, {
|
|
3203
|
+
namespace: keyPrefix,
|
|
3204
|
+
representationName: RepresentationType$3,
|
|
3205
|
+
mergeable: false
|
|
3206
|
+
});
|
|
3207
|
+
}
|
|
3208
|
+
|
|
3209
|
+
const VERSION$2 = "a924123b5af364dd48f5c1ae9c352ecd";
|
|
3210
|
+
function validate$3(obj, path = 'FlowCollectionRepresentation') {
|
|
3211
|
+
const v_error = (() => {
|
|
3212
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
3213
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
3214
|
+
}
|
|
3215
|
+
const obj_flows = obj.flows;
|
|
3216
|
+
const path_flows = path + '.flows';
|
|
3217
|
+
if (!ArrayIsArray(obj_flows)) {
|
|
3218
|
+
return new TypeError('Expected "array" but received "' + typeof obj_flows + '" (at "' + path_flows + '")');
|
|
3219
|
+
}
|
|
3220
|
+
for (let i = 0; i < obj_flows.length; i++) {
|
|
3221
|
+
const obj_flows_item = obj_flows[i];
|
|
3222
|
+
const path_flows_item = path_flows + '[' + i + ']';
|
|
3223
|
+
if (typeof obj_flows_item !== 'object') {
|
|
3224
|
+
return new TypeError('Expected "object" but received "' + typeof obj_flows_item + '" (at "' + path_flows_item + '")');
|
|
3225
|
+
}
|
|
3226
|
+
}
|
|
3227
|
+
})();
|
|
3228
|
+
return v_error === undefined ? null : v_error;
|
|
3229
|
+
}
|
|
3230
|
+
const RepresentationType$2 = 'FlowCollectionRepresentation';
|
|
3231
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
3232
|
+
const input_flows = input.flows;
|
|
3233
|
+
const input_flows_id = path.fullPath + '__flows';
|
|
3234
|
+
for (let i = 0; i < input_flows.length; i++) {
|
|
3235
|
+
const input_flows_item = input_flows[i];
|
|
3236
|
+
let input_flows_item_id = input_flows_id + '__' + i;
|
|
3237
|
+
input_flows[i] = ingest$3(input_flows_item, {
|
|
3238
|
+
fullPath: input_flows_item_id,
|
|
3239
|
+
propertyName: i,
|
|
3240
|
+
parent: {
|
|
3241
|
+
data: input,
|
|
3242
|
+
key: path.fullPath,
|
|
3243
|
+
existing: existing,
|
|
3244
|
+
},
|
|
3245
|
+
ttl: path.ttl
|
|
3246
|
+
}, luvio, store, timestamp);
|
|
3247
|
+
}
|
|
3248
|
+
return input;
|
|
3249
|
+
}
|
|
3250
|
+
const select$7 = function FlowCollectionRepresentationSelect() {
|
|
3251
|
+
return {
|
|
3252
|
+
kind: 'Fragment',
|
|
3253
|
+
version: VERSION$2,
|
|
3254
|
+
private: [],
|
|
3255
|
+
selections: [
|
|
3256
|
+
{
|
|
3257
|
+
name: 'flows',
|
|
3258
|
+
kind: 'Link',
|
|
3259
|
+
plural: true,
|
|
3260
|
+
fragment: select$8()
|
|
3261
|
+
}
|
|
3262
|
+
]
|
|
3263
|
+
};
|
|
3264
|
+
};
|
|
3265
|
+
function equals$2(existing, incoming) {
|
|
3266
|
+
const existing_flows = existing.flows;
|
|
3267
|
+
const incoming_flows = incoming.flows;
|
|
3268
|
+
const equals_flows_items = equalsArray(existing_flows, incoming_flows, (existing_flows_item, incoming_flows_item) => {
|
|
3269
|
+
if (!(existing_flows_item.__ref === incoming_flows_item.__ref)) {
|
|
3270
|
+
return false;
|
|
3271
|
+
}
|
|
3272
|
+
});
|
|
3273
|
+
if (equals_flows_items === false) {
|
|
3274
|
+
return false;
|
|
3275
|
+
}
|
|
3276
|
+
return true;
|
|
3277
|
+
}
|
|
3278
|
+
const ingest$2 = function FlowCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
3279
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3280
|
+
const validateError = validate$3(input);
|
|
3281
|
+
if (validateError !== null) {
|
|
3282
|
+
throw validateError;
|
|
3283
|
+
}
|
|
3284
|
+
}
|
|
3285
|
+
const key = path.fullPath;
|
|
3286
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 60000;
|
|
3287
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "UnifiedAnalytics", VERSION$2, RepresentationType$2, equals$2);
|
|
3288
|
+
return createLink(key);
|
|
3289
|
+
};
|
|
3290
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
3291
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
3292
|
+
const rootKey = fullPathFactory();
|
|
3293
|
+
rootKeySet.set(rootKey, {
|
|
3294
|
+
namespace: keyPrefix,
|
|
3295
|
+
representationName: RepresentationType$2,
|
|
3296
|
+
mergeable: false
|
|
3297
|
+
});
|
|
3298
|
+
const input_flows_length = input.flows.length;
|
|
3299
|
+
for (let i = 0; i < input_flows_length; i++) {
|
|
3300
|
+
getTypeCacheKeys$3(rootKeySet, luvio, input.flows[i], () => '');
|
|
3301
|
+
}
|
|
3302
|
+
}
|
|
3303
|
+
|
|
3304
|
+
function select$6(luvio, params) {
|
|
3305
|
+
return select$7();
|
|
3306
|
+
}
|
|
3307
|
+
function keyBuilder$7(luvio, params) {
|
|
3308
|
+
return keyPrefix + '::FlowCollectionRepresentation:(' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ')';
|
|
3309
|
+
}
|
|
3310
|
+
function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
|
|
3311
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$7(luvio, resourceParams));
|
|
3312
|
+
}
|
|
3313
|
+
function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
|
|
3314
|
+
const { body } = response;
|
|
3315
|
+
const key = keyBuilder$7(luvio, resourceParams);
|
|
3316
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
3317
|
+
const snapshot = luvio.storeLookup({
|
|
3318
|
+
recordId: key,
|
|
3319
|
+
node: select$6(),
|
|
3320
|
+
variables: {},
|
|
3321
|
+
}, snapshotRefresh);
|
|
3322
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3323
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
3324
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
3325
|
+
}
|
|
3326
|
+
}
|
|
3327
|
+
deepFreeze(snapshot.data);
|
|
3328
|
+
return snapshot;
|
|
3329
|
+
}
|
|
3330
|
+
function ingestError$2(luvio, params, error, snapshotRefresh) {
|
|
3331
|
+
const key = keyBuilder$7(luvio, params);
|
|
3332
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3333
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
3334
|
+
return errorSnapshot;
|
|
3335
|
+
}
|
|
3336
|
+
function createResourceRequest$4(config) {
|
|
3337
|
+
const headers = {};
|
|
3338
|
+
return {
|
|
3339
|
+
baseUri: '/services/data/v62.0',
|
|
3340
|
+
basePath: '/unified-analytics/flows',
|
|
3341
|
+
method: 'get',
|
|
3342
|
+
body: null,
|
|
3343
|
+
urlParams: {},
|
|
3344
|
+
queryParams: config.queryParams,
|
|
3345
|
+
headers,
|
|
3346
|
+
priority: 'normal',
|
|
3347
|
+
};
|
|
3348
|
+
}
|
|
3349
|
+
|
|
3350
|
+
const adapterName$4 = 'getFlows';
|
|
3351
|
+
const getFlows_ConfigPropertyMetadata = [
|
|
3352
|
+
generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
3353
|
+
generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
3354
|
+
];
|
|
3355
|
+
const getFlows_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getFlows_ConfigPropertyMetadata);
|
|
3356
|
+
const createResourceParams$4 = /*#__PURE__*/ createResourceParams$l(getFlows_ConfigPropertyMetadata);
|
|
3357
|
+
function keyBuilder$6(luvio, config) {
|
|
3358
|
+
const resourceParams = createResourceParams$4(config);
|
|
3359
|
+
return keyBuilder$7(luvio, resourceParams);
|
|
3360
|
+
}
|
|
3361
|
+
function typeCheckConfig$4(untrustedConfig) {
|
|
3362
|
+
const config = {};
|
|
3363
|
+
typeCheckConfig$l(untrustedConfig, config, getFlows_ConfigPropertyMetadata);
|
|
3364
|
+
return config;
|
|
3365
|
+
}
|
|
3366
|
+
function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
|
|
3367
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
3368
|
+
return null;
|
|
3369
|
+
}
|
|
3370
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3371
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
3372
|
+
}
|
|
3373
|
+
const config = typeCheckConfig$4(untrustedConfig);
|
|
3374
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3375
|
+
return null;
|
|
3376
|
+
}
|
|
3377
|
+
return config;
|
|
3378
|
+
}
|
|
3379
|
+
function adapterFragment$2(luvio, config) {
|
|
3380
|
+
createResourceParams$4(config);
|
|
3381
|
+
return select$6();
|
|
3382
|
+
}
|
|
3383
|
+
function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
|
|
3384
|
+
const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
|
|
3385
|
+
config,
|
|
3386
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
3387
|
+
});
|
|
3388
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3389
|
+
}
|
|
3390
|
+
function onFetchResponseError$2(luvio, config, resourceParams, response) {
|
|
3391
|
+
const snapshot = ingestError$2(luvio, resourceParams, response, {
|
|
3392
|
+
config,
|
|
3393
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
3394
|
+
});
|
|
3395
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3396
|
+
}
|
|
3397
|
+
function buildNetworkSnapshot$4(luvio, config, options) {
|
|
3398
|
+
const resourceParams = createResourceParams$4(config);
|
|
3399
|
+
const request = createResourceRequest$4(resourceParams);
|
|
3400
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
3401
|
+
.then((response) => {
|
|
3402
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
|
|
3403
|
+
const cache = new StoreKeyMap();
|
|
3404
|
+
getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
|
|
3405
|
+
return cache;
|
|
3406
|
+
});
|
|
3407
|
+
}, (response) => {
|
|
3408
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
|
|
3409
|
+
});
|
|
3410
|
+
}
|
|
3411
|
+
function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
|
|
3412
|
+
return buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
|
|
3413
|
+
}
|
|
3414
|
+
function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
|
|
3415
|
+
const { luvio, config } = context;
|
|
3416
|
+
const selector = {
|
|
3417
|
+
recordId: keyBuilder$6(luvio, config),
|
|
3418
|
+
node: adapterFragment$2(luvio, config),
|
|
3419
|
+
variables: {},
|
|
3420
|
+
};
|
|
3421
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
3422
|
+
config,
|
|
3423
|
+
resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
|
|
3424
|
+
});
|
|
3425
|
+
return cacheSnapshot;
|
|
3426
|
+
}
|
|
3427
|
+
const getFlowsAdapterFactory = (luvio) => function UnifiedAnalytics__getFlows(untrustedConfig, requestContext) {
|
|
3428
|
+
const config = validateAdapterConfig$4(untrustedConfig, getFlows_ConfigPropertyNames);
|
|
3429
|
+
// Invalid or incomplete config
|
|
3430
|
+
if (config === null) {
|
|
3431
|
+
return null;
|
|
3432
|
+
}
|
|
3433
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3434
|
+
buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
|
|
3435
|
+
};
|
|
3436
|
+
|
|
3437
|
+
function select$5(luvio, params) {
|
|
3438
|
+
return select$8();
|
|
3439
|
+
}
|
|
3440
|
+
function keyBuilder$5(luvio, params) {
|
|
3441
|
+
return keyPrefix + '::FlowRepresentation:(' + 'flowApiName:' + params.urlParams.flowApiName + ')';
|
|
3442
|
+
}
|
|
3443
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
3444
|
+
getTypeCacheKeys$3(storeKeyMap, luvio, response, () => keyBuilder$5(luvio, resourceParams));
|
|
3445
|
+
}
|
|
3446
|
+
function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
|
|
3447
|
+
const { body } = response;
|
|
3448
|
+
const key = keyBuilder$5(luvio, resourceParams);
|
|
3449
|
+
luvio.storeIngest(key, ingest$3, body);
|
|
3450
|
+
const snapshot = luvio.storeLookup({
|
|
3451
|
+
recordId: key,
|
|
3452
|
+
node: select$5(),
|
|
3453
|
+
variables: {},
|
|
3454
|
+
}, snapshotRefresh);
|
|
3455
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3456
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
3457
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
3458
|
+
}
|
|
3459
|
+
}
|
|
3460
|
+
deepFreeze(snapshot.data);
|
|
3461
|
+
return snapshot;
|
|
3462
|
+
}
|
|
3463
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
3464
|
+
const key = keyBuilder$5(luvio, params);
|
|
3465
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
3466
|
+
luvio.storeIngestError(key, errorSnapshot);
|
|
3467
|
+
return errorSnapshot;
|
|
3468
|
+
}
|
|
3469
|
+
function createResourceRequest$3(config) {
|
|
3470
|
+
const headers = {};
|
|
3471
|
+
return {
|
|
3472
|
+
baseUri: '/services/data/v62.0',
|
|
3473
|
+
basePath: '/unified-analytics/flows/' + config.urlParams.flowApiName + '',
|
|
3474
|
+
method: 'get',
|
|
3475
|
+
body: null,
|
|
3476
|
+
urlParams: config.urlParams,
|
|
3477
|
+
queryParams: {},
|
|
3478
|
+
headers,
|
|
3479
|
+
priority: 'normal',
|
|
3480
|
+
};
|
|
3481
|
+
}
|
|
3482
|
+
|
|
3483
|
+
const adapterName$3 = 'getFlowByName';
|
|
3484
|
+
const getFlowByName_ConfigPropertyMetadata = [
|
|
3485
|
+
generateParamConfigMetadata('flowApiName', true, 0 /* UrlParameter */, 0 /* String */),
|
|
3486
|
+
];
|
|
3487
|
+
const getFlowByName_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getFlowByName_ConfigPropertyMetadata);
|
|
3488
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$l(getFlowByName_ConfigPropertyMetadata);
|
|
3489
|
+
function keyBuilder$4(luvio, config) {
|
|
3490
|
+
const resourceParams = createResourceParams$3(config);
|
|
3491
|
+
return keyBuilder$5(luvio, resourceParams);
|
|
3492
|
+
}
|
|
3493
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
3494
|
+
const config = {};
|
|
3495
|
+
typeCheckConfig$l(untrustedConfig, config, getFlowByName_ConfigPropertyMetadata);
|
|
3496
|
+
return config;
|
|
3497
|
+
}
|
|
3498
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
3499
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
3500
|
+
return null;
|
|
3501
|
+
}
|
|
3502
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3503
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
3504
|
+
}
|
|
3505
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
3506
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
3507
|
+
return null;
|
|
3508
|
+
}
|
|
3509
|
+
return config;
|
|
3510
|
+
}
|
|
3511
|
+
function adapterFragment$1(luvio, config) {
|
|
3512
|
+
createResourceParams$3(config);
|
|
3513
|
+
return select$5();
|
|
3514
|
+
}
|
|
3515
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
3516
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
|
|
3517
|
+
config,
|
|
3518
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
3519
|
+
});
|
|
3520
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3521
|
+
}
|
|
3522
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
3523
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
3524
|
+
config,
|
|
3525
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
3526
|
+
});
|
|
3527
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
3528
|
+
}
|
|
3529
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
3530
|
+
const resourceParams = createResourceParams$3(config);
|
|
3531
|
+
const request = createResourceRequest$3(resourceParams);
|
|
3532
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
3533
|
+
.then((response) => {
|
|
3534
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
3535
|
+
const cache = new StoreKeyMap();
|
|
3536
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
3537
|
+
return cache;
|
|
3538
|
+
});
|
|
3539
|
+
}, (response) => {
|
|
3540
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
3541
|
+
});
|
|
3542
|
+
}
|
|
3543
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
3544
|
+
return buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
|
|
3545
|
+
}
|
|
3546
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
3547
|
+
const { luvio, config } = context;
|
|
3548
|
+
const selector = {
|
|
3549
|
+
recordId: keyBuilder$4(luvio, config),
|
|
3550
|
+
node: adapterFragment$1(luvio, config),
|
|
3551
|
+
variables: {},
|
|
3552
|
+
};
|
|
3553
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
3554
|
+
config,
|
|
3555
|
+
resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
|
|
3556
|
+
});
|
|
3557
|
+
return cacheSnapshot;
|
|
3558
|
+
}
|
|
3559
|
+
const getFlowByNameAdapterFactory = (luvio) => function UnifiedAnalytics__getFlowByName(untrustedConfig, requestContext) {
|
|
3560
|
+
const config = validateAdapterConfig$3(untrustedConfig, getFlowByName_ConfigPropertyNames);
|
|
3561
|
+
// Invalid or incomplete config
|
|
3562
|
+
if (config === null) {
|
|
3563
|
+
return null;
|
|
3564
|
+
}
|
|
3565
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
3566
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
3567
|
+
};
|
|
3568
|
+
|
|
2839
3569
|
const TTL$1 = 500;
|
|
2840
3570
|
const VERSION$1 = "9cc9d397fbf7728f812bb0c66c128f4b";
|
|
2841
3571
|
function validate$2(obj, path = 'SubscriptionDigestConfigOutputRepresentation') {
|
|
@@ -2969,14 +3699,14 @@ const getSubscriptionDigestConfig_ConfigPropertyMetadata = [
|
|
|
2969
3699
|
generateParamConfigMetadata('digestConfigOwner', true, 0 /* UrlParameter */, 0 /* String */),
|
|
2970
3700
|
];
|
|
2971
3701
|
const getSubscriptionDigestConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getSubscriptionDigestConfig_ConfigPropertyMetadata);
|
|
2972
|
-
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$
|
|
3702
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$l(getSubscriptionDigestConfig_ConfigPropertyMetadata);
|
|
2973
3703
|
function keyBuilder$1(luvio, config) {
|
|
2974
3704
|
const resourceParams = createResourceParams$2(config);
|
|
2975
3705
|
return keyBuilder$2(luvio, resourceParams);
|
|
2976
3706
|
}
|
|
2977
3707
|
function typeCheckConfig$2(untrustedConfig) {
|
|
2978
3708
|
const config = {};
|
|
2979
|
-
typeCheckConfig$
|
|
3709
|
+
typeCheckConfig$l(untrustedConfig, config, getSubscriptionDigestConfig_ConfigPropertyMetadata);
|
|
2980
3710
|
return config;
|
|
2981
3711
|
}
|
|
2982
3712
|
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
@@ -3025,7 +3755,7 @@ function buildNetworkSnapshot$2(luvio, config, options) {
|
|
|
3025
3755
|
});
|
|
3026
3756
|
}
|
|
3027
3757
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
3028
|
-
return buildNetworkSnapshotCachePolicy$
|
|
3758
|
+
return buildNetworkSnapshotCachePolicy$9(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
3029
3759
|
}
|
|
3030
3760
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
3031
3761
|
const { luvio, config } = context;
|
|
@@ -3094,10 +3824,10 @@ const updateSubscriptionDigestConfig_ConfigPropertyMetadata = [
|
|
|
3094
3824
|
generateParamConfigMetadata('scheduleType', true, 2 /* Body */, 0 /* String */),
|
|
3095
3825
|
];
|
|
3096
3826
|
const updateSubscriptionDigestConfig_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, updateSubscriptionDigestConfig_ConfigPropertyMetadata);
|
|
3097
|
-
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$
|
|
3827
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$l(updateSubscriptionDigestConfig_ConfigPropertyMetadata);
|
|
3098
3828
|
function typeCheckConfig$1(untrustedConfig) {
|
|
3099
3829
|
const config = {};
|
|
3100
|
-
typeCheckConfig$
|
|
3830
|
+
typeCheckConfig$l(untrustedConfig, config, updateSubscriptionDigestConfig_ConfigPropertyMetadata);
|
|
3101
3831
|
return config;
|
|
3102
3832
|
}
|
|
3103
3833
|
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
@@ -3327,7 +4057,7 @@ const getUnifiedAnalyticsLibraryAssets_ConfigPropertyMetadata = [
|
|
|
3327
4057
|
generateParamConfigMetadata('searchToken', false, 2 /* Body */, 4 /* Unsupported */),
|
|
3328
4058
|
];
|
|
3329
4059
|
const getUnifiedAnalyticsLibraryAssets_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getUnifiedAnalyticsLibraryAssets_ConfigPropertyMetadata);
|
|
3330
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
4060
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$l(getUnifiedAnalyticsLibraryAssets_ConfigPropertyMetadata);
|
|
3331
4061
|
function typeCheckConfig(untrustedConfig) {
|
|
3332
4062
|
const config = {};
|
|
3333
4063
|
const untrustedConfig_assetTypes = untrustedConfig.assetTypes;
|
|
@@ -3436,4 +4166,4 @@ const getUnifiedAnalyticsLibraryAssetsAdapterFactory = (luvio) => {
|
|
|
3436
4166
|
};
|
|
3437
4167
|
};
|
|
3438
4168
|
|
|
3439
|
-
export { createDashboardAdapterFactory, createWorkspaceAdapterFactory, createWorkspaceAssetAdapterFactory, deleteDashboardAdapterFactory, deleteVisualizationAdapterFactory, deleteWorkspaceAdapterFactory, deleteWorkspaceAssetAdapterFactory, getDashboardByNameAdapterFactory, getDashboardsAdapterFactory, getSubscriptionDigestConfigAdapterFactory, getUnifiedAnalyticsLibraryAssetsAdapterFactory, getVisualizationAdapterFactory, getVisualizationsAdapterFactory, getWorkspaceByIdOrNameAdapterFactory, getWorkspacesAdapterFactory, queryAssetsAdapterFactory, updateDashboardAdapterFactory, updateSubscriptionDigestConfigAdapterFactory, updateWorkspaceAdapterFactory };
|
|
4169
|
+
export { createDashboardAdapterFactory, createWorkspaceAdapterFactory, createWorkspaceAssetAdapterFactory, deleteDashboardAdapterFactory, deleteVisualizationAdapterFactory, deleteWorkspaceAdapterFactory, deleteWorkspaceAssetAdapterFactory, getDashboardByNameAdapterFactory, getDashboardsAdapterFactory, getFlowByNameAdapterFactory, getFlowsAdapterFactory, getSubscriptionDigestConfigAdapterFactory, getUnifiedAnalyticsLibraryAssetsAdapterFactory, getVisualizationAdapterFactory, getVisualizationsAdapterFactory, getWorkspaceByIdOrNameAdapterFactory, getWorkspacesAdapterFactory, queryAssetsAdapterFactory, updateDashboardAdapterFactory, updateSubscriptionDigestConfigAdapterFactory, updateWorkspaceAdapterFactory };
|