@salesforce/lds-adapters-industries-audit-trail-export 1.114.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +82 -0
- package/dist/es/es2018/industries-audit-trail-export.js +980 -0
- package/dist/types/src/generated/adapters/adapter-utils.d.ts +66 -0
- package/dist/types/src/generated/adapters/createAuditTrailFileExport.d.ts +15 -0
- package/dist/types/src/generated/adapters/deleteAuditTrailFileExport.d.ts +13 -0
- package/dist/types/src/generated/adapters/getAuditTrailFileExport.d.ts +26 -0
- package/dist/types/src/generated/adapters/getAuditTrailFileExports.d.ts +25 -0
- package/dist/types/src/generated/artifacts/main.d.ts +4 -0
- package/dist/types/src/generated/artifacts/sfdc.d.ts +7 -0
- package/dist/types/src/generated/resources/deleteConnectServiceExcellenceAuditTrailExportsByRequestIdentifier.d.ts +12 -0
- package/dist/types/src/generated/resources/deleteConnectServiceExcellenceEngagementInteractions.d.ts +8 -0
- package/dist/types/src/generated/resources/deleteConnectServiceExcellenceEngagementInteractionsByEngagementInteractionId.d.ts +11 -0
- package/dist/types/src/generated/resources/getConnectServiceExcellenceAuditTrailExports.d.ts +12 -0
- package/dist/types/src/generated/resources/getConnectServiceExcellenceAuditTrailExportsByRequestIdentifier.d.ts +15 -0
- package/dist/types/src/generated/resources/getConnectServiceExcellenceAuditTrailExportsDownloadByRequestIdentifier.d.ts +15 -0
- package/dist/types/src/generated/resources/getConnectServiceExcellenceEngagementInteractions.d.ts +12 -0
- package/dist/types/src/generated/resources/getConnectServiceExcellenceEngagementInteractionsByEngagementInteractionId.d.ts +15 -0
- package/dist/types/src/generated/resources/getConnectServiceExcellenceServiceCatalogItemsByRecordId.d.ts +18 -0
- package/dist/types/src/generated/resources/getConnectServiceExcellenceServiceCatalogItemsRecentActions.d.ts +16 -0
- package/dist/types/src/generated/resources/postConnectServiceExcellenceAuditTrailExports.d.ts +13 -0
- package/dist/types/src/generated/resources/postConnectServiceExcellenceEngagementInteractions.d.ts +12 -0
- package/dist/types/src/generated/resources/postConnectServiceExcellenceEngagementInteractionsByEngagementInteractionId.d.ts +15 -0
- package/dist/types/src/generated/resources/postConnectServiceExcellenceServiceCatalogItemsActionLaunch.d.ts +15 -0
- package/dist/types/src/generated/types/ActionLaunchInputRepresentation.d.ts +38 -0
- package/dist/types/src/generated/types/ActionLaunchStatusRepresentation.d.ts +32 -0
- package/dist/types/src/generated/types/AuditTrailExportInputRepresentation.d.ts +44 -0
- package/dist/types/src/generated/types/AuditTrailExportListOutputRepresentation.d.ts +31 -0
- package/dist/types/src/generated/types/AuditTrailExportOutputRepresentation.d.ts +57 -0
- package/dist/types/src/generated/types/AuditTrailFileDownloadOutputRepresentation.d.ts +31 -0
- package/dist/types/src/generated/types/AuditTrailFileExportInputRepresentation.d.ts +30 -0
- package/dist/types/src/generated/types/AuditTrailLogOutputRepresentation.d.ts +50 -0
- package/dist/types/src/generated/types/CustomFieldOutputRepresentation.d.ts +32 -0
- package/dist/types/src/generated/types/CustomFieldsInputRepresentation.d.ts +32 -0
- package/dist/types/src/generated/types/CustomFieldsListInputRepresentation.d.ts +29 -0
- package/dist/types/src/generated/types/EngagementAttendeeCreateInputRepresentation.d.ts +62 -0
- package/dist/types/src/generated/types/EngagementAttendeeCreateOutputRepresentation.d.ts +32 -0
- package/dist/types/src/generated/types/EngagementAttendeeFetchOutputRepresentation.d.ts +32 -0
- package/dist/types/src/generated/types/EngagementAttendeeListInputRepresentation.d.ts +29 -0
- package/dist/types/src/generated/types/EngagementAttendeeOutputRepresentation.d.ts +63 -0
- package/dist/types/src/generated/types/EngagementInteractionCreateInputRepresentation.d.ts +83 -0
- package/dist/types/src/generated/types/EngagementInteractionCreateOutputRepresentation.d.ts +32 -0
- package/dist/types/src/generated/types/EngagementInteractionFetchOutputRepresentation.d.ts +32 -0
- package/dist/types/src/generated/types/EngagementInteractionIdsCreateOutputRepresentation.d.ts +36 -0
- package/dist/types/src/generated/types/EngagementInteractionOutputRepresentation.d.ts +92 -0
- package/dist/types/src/generated/types/EngagementInteractionUpdateInputRepresentation.d.ts +77 -0
- package/dist/types/src/generated/types/EngagementInteractionUpdateOutputRepresentation.d.ts +38 -0
- package/dist/types/src/generated/types/EngagementTopicCreateInputRepresentation.d.ts +65 -0
- package/dist/types/src/generated/types/EngagementTopicCreateOutputRepresentation.d.ts +32 -0
- package/dist/types/src/generated/types/EngagementTopicDetailsOutputRepresentation.d.ts +59 -0
- package/dist/types/src/generated/types/EngagementTopicFetchOutputRepresentation.d.ts +32 -0
- package/dist/types/src/generated/types/EngagementTopicListInputRepresentation.d.ts +29 -0
- package/dist/types/src/generated/types/EngagementTopicOutputRepresentation.d.ts +66 -0
- package/dist/types/src/generated/types/EngagementsCreateInputRepresentation.d.ts +29 -0
- package/dist/types/src/generated/types/EngagementsFetchOutputRepresentation.d.ts +33 -0
- package/dist/types/src/generated/types/EngagementsUpdateInputRepresentation.d.ts +35 -0
- package/dist/types/src/generated/types/RecentlyUsedActionsRepresentation.d.ts +33 -0
- package/dist/types/src/generated/types/ServiceCatalogActionsCategoryOutputRepresentation.d.ts +35 -0
- package/dist/types/src/generated/types/ServiceCatalogFrequentActionsOutputRepresentation.d.ts +33 -0
- package/dist/types/src/generated/types/ServiceCatalogItemsFetchOutputRepresentation.d.ts +37 -0
- package/dist/types/src/generated/types/ServiceCatalogItemsOutputRepresentation.d.ts +41 -0
- package/dist/types/src/generated/types/ServiceExcellenceIdOutputRepresentation.d.ts +29 -0
- package/dist/types/src/generated/types/ServiceExcellenceStatusOutputRepresentation.d.ts +32 -0
- package/dist/types/src/generated/types/type-utils.d.ts +39 -0
- package/dist/umd/es2018/industries-audit-trail-export.js +991 -0
- package/dist/umd/es5/industries-audit-trail-export.js +996 -0
- package/package.json +70 -0
- package/sfdc/index.d.ts +1 -0
- package/sfdc/index.js +1029 -0
- package/src/raml/api.raml +1081 -0
- package/src/raml/luvio.raml +42 -0
|
@@ -0,0 +1,996 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
(function (global, factory) {
|
|
8
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@luvio/engine')) :
|
|
9
|
+
typeof define === 'function' && define.amd ? define(['exports', '@luvio/engine'], factory) :
|
|
10
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.industriesAuditTrailExport = {}, global.engine));
|
|
11
|
+
})(this, (function (exports, engine) { 'use strict';
|
|
12
|
+
|
|
13
|
+
var ObjectPrototypeHasOwnProperty = Object.prototype.hasOwnProperty;
|
|
14
|
+
var ObjectKeys$1 = Object.keys;
|
|
15
|
+
var ArrayIsArray$1 = Array.isArray;
|
|
16
|
+
/**
|
|
17
|
+
* Validates an adapter config is well-formed.
|
|
18
|
+
* @param config The config to validate.
|
|
19
|
+
* @param adapter The adapter validation configuration.
|
|
20
|
+
* @param oneOf The keys the config must contain at least one of.
|
|
21
|
+
* @throws A TypeError if config doesn't satisfy the adapter's config validation.
|
|
22
|
+
*/
|
|
23
|
+
function validateConfig(config, adapter, oneOf) {
|
|
24
|
+
var displayName = adapter.displayName;
|
|
25
|
+
var _a = adapter.parameters, required = _a.required, optional = _a.optional, unsupported = _a.unsupported;
|
|
26
|
+
if (config === undefined ||
|
|
27
|
+
required.every(function (req) { return ObjectPrototypeHasOwnProperty.call(config, req); }) === false) {
|
|
28
|
+
throw new TypeError("adapter ".concat(displayName, " configuration must specify ").concat(required.sort().join(', ')));
|
|
29
|
+
}
|
|
30
|
+
if (oneOf && oneOf.some(function (req) { return ObjectPrototypeHasOwnProperty.call(config, req); }) === false) {
|
|
31
|
+
throw new TypeError("adapter ".concat(displayName, " configuration must specify one of ").concat(oneOf.sort().join(', ')));
|
|
32
|
+
}
|
|
33
|
+
if (unsupported !== undefined &&
|
|
34
|
+
unsupported.some(function (req) { return ObjectPrototypeHasOwnProperty.call(config, req); })) {
|
|
35
|
+
throw new TypeError("adapter ".concat(displayName, " does not yet support ").concat(unsupported.sort().join(', ')));
|
|
36
|
+
}
|
|
37
|
+
var supported = required.concat(optional);
|
|
38
|
+
if (ObjectKeys$1(config).some(function (key) { return !supported.includes(key); })) {
|
|
39
|
+
throw new TypeError("adapter ".concat(displayName, " configuration supports only ").concat(supported.sort().join(', ')));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function untrustedIsObject(untrusted) {
|
|
43
|
+
return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
|
|
44
|
+
}
|
|
45
|
+
function areRequiredParametersPresent(config, configPropertyNames) {
|
|
46
|
+
return configPropertyNames.parameters.required.every(function (req) { return req in config; });
|
|
47
|
+
}
|
|
48
|
+
var snapshotRefreshOptions = {
|
|
49
|
+
overrides: {
|
|
50
|
+
headers: {
|
|
51
|
+
'Cache-Control': 'no-cache',
|
|
52
|
+
},
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
var keyPrefix = 'audit-trail-export';
|
|
56
|
+
|
|
57
|
+
var ObjectFreeze = Object.freeze, ObjectKeys = Object.keys;
|
|
58
|
+
var ArrayIsArray = Array.isArray;
|
|
59
|
+
var JSONStringify = JSON.stringify;
|
|
60
|
+
function deepFreeze$4(value) {
|
|
61
|
+
// No need to freeze primitives
|
|
62
|
+
if (typeof value !== 'object' || value === null) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
if (ArrayIsArray(value)) {
|
|
66
|
+
for (var i = 0, len = value.length; i < len; i += 1) {
|
|
67
|
+
deepFreeze$4(value[i]);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
var keys = ObjectKeys(value);
|
|
72
|
+
for (var i = 0, len = keys.length; i < len; i += 1) {
|
|
73
|
+
deepFreeze$4(value[keys[i]]);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
ObjectFreeze(value);
|
|
77
|
+
}
|
|
78
|
+
function createLink(ref) {
|
|
79
|
+
return {
|
|
80
|
+
__ref: engine.serializeStructuredKey(ref),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
var TTL$2 = 60000;
|
|
85
|
+
var VERSION$2 = "07151ae56c2d1593d238dce78889bae0";
|
|
86
|
+
function validate$4(obj, path) {
|
|
87
|
+
if (path === void 0) { path = 'AuditTrailExportOutputRepresentation'; }
|
|
88
|
+
var v_error = (function () {
|
|
89
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
90
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
91
|
+
}
|
|
92
|
+
var obj_completedAt = obj.completedAt;
|
|
93
|
+
var path_completedAt = path + '.completedAt';
|
|
94
|
+
if (typeof obj_completedAt !== 'string') {
|
|
95
|
+
return new TypeError('Expected "string" but received "' + typeof obj_completedAt + '" (at "' + path_completedAt + '")');
|
|
96
|
+
}
|
|
97
|
+
var obj_requestIdentifier = obj.requestIdentifier;
|
|
98
|
+
var path_requestIdentifier = path + '.requestIdentifier';
|
|
99
|
+
if (typeof obj_requestIdentifier !== 'string') {
|
|
100
|
+
return new TypeError('Expected "string" but received "' + typeof obj_requestIdentifier + '" (at "' + path_requestIdentifier + '")');
|
|
101
|
+
}
|
|
102
|
+
var obj_requestedAt = obj.requestedAt;
|
|
103
|
+
var path_requestedAt = path + '.requestedAt';
|
|
104
|
+
if (typeof obj_requestedAt !== 'string') {
|
|
105
|
+
return new TypeError('Expected "string" but received "' + typeof obj_requestedAt + '" (at "' + path_requestedAt + '")');
|
|
106
|
+
}
|
|
107
|
+
var obj_requestedByUserId = obj.requestedByUserId;
|
|
108
|
+
var path_requestedByUserId = path + '.requestedByUserId';
|
|
109
|
+
if (typeof obj_requestedByUserId !== 'string') {
|
|
110
|
+
return new TypeError('Expected "string" but received "' + typeof obj_requestedByUserId + '" (at "' + path_requestedByUserId + '")');
|
|
111
|
+
}
|
|
112
|
+
var obj_requestedByUserName = obj.requestedByUserName;
|
|
113
|
+
var path_requestedByUserName = path + '.requestedByUserName';
|
|
114
|
+
if (typeof obj_requestedByUserName !== 'string') {
|
|
115
|
+
return new TypeError('Expected "string" but received "' + typeof obj_requestedByUserName + '" (at "' + path_requestedByUserName + '")');
|
|
116
|
+
}
|
|
117
|
+
var obj_status = obj.status;
|
|
118
|
+
var path_status = path + '.status';
|
|
119
|
+
if (typeof obj_status !== 'string') {
|
|
120
|
+
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
121
|
+
}
|
|
122
|
+
var obj_title = obj.title;
|
|
123
|
+
var path_title = path + '.title';
|
|
124
|
+
if (typeof obj_title !== 'string') {
|
|
125
|
+
return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
|
|
126
|
+
}
|
|
127
|
+
})();
|
|
128
|
+
return v_error === undefined ? null : v_error;
|
|
129
|
+
}
|
|
130
|
+
var RepresentationType$2 = 'AuditTrailExportOutputRepresentation';
|
|
131
|
+
function keyBuilder$5(luvio, config) {
|
|
132
|
+
return keyPrefix + '::' + RepresentationType$2 + ':' + config.requestIdentifier;
|
|
133
|
+
}
|
|
134
|
+
function keyBuilderFromType(luvio, object) {
|
|
135
|
+
var keyParams = {
|
|
136
|
+
requestIdentifier: object.requestIdentifier
|
|
137
|
+
};
|
|
138
|
+
return keyBuilder$5(luvio, keyParams);
|
|
139
|
+
}
|
|
140
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
141
|
+
return input;
|
|
142
|
+
}
|
|
143
|
+
var select$5 = function AuditTrailExportOutputRepresentationSelect() {
|
|
144
|
+
return {
|
|
145
|
+
kind: 'Fragment',
|
|
146
|
+
version: VERSION$2,
|
|
147
|
+
private: [],
|
|
148
|
+
opaque: true
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
function equals$2(existing, incoming) {
|
|
152
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
return true;
|
|
156
|
+
}
|
|
157
|
+
function deepFreeze$3(input) {
|
|
158
|
+
ObjectFreeze(input);
|
|
159
|
+
}
|
|
160
|
+
var ingest$2 = function AuditTrailExportOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
161
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
162
|
+
var validateError = validate$4(input);
|
|
163
|
+
if (validateError !== null) {
|
|
164
|
+
throw validateError;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
var key = keyBuilderFromType(luvio, input);
|
|
168
|
+
var existingRecord = store.readEntry(key);
|
|
169
|
+
var ttlToUse = TTL$2;
|
|
170
|
+
var incomingRecord = normalize$2(input, store.readEntry(key), {
|
|
171
|
+
fullPath: key,
|
|
172
|
+
parent: path.parent,
|
|
173
|
+
propertyName: path.propertyName,
|
|
174
|
+
ttl: ttlToUse
|
|
175
|
+
});
|
|
176
|
+
deepFreeze$3(input);
|
|
177
|
+
if (existingRecord === undefined || equals$2(existingRecord, incomingRecord) === false) {
|
|
178
|
+
luvio.storePublish(key, incomingRecord);
|
|
179
|
+
}
|
|
180
|
+
{
|
|
181
|
+
var storeMetadataParams = {
|
|
182
|
+
ttl: ttlToUse,
|
|
183
|
+
namespace: "audit-trail-export",
|
|
184
|
+
version: VERSION$2,
|
|
185
|
+
representationName: RepresentationType$2,
|
|
186
|
+
};
|
|
187
|
+
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
188
|
+
}
|
|
189
|
+
return createLink(key);
|
|
190
|
+
};
|
|
191
|
+
function getTypeCacheKeys$2(luvio, input, fullPathFactory) {
|
|
192
|
+
var rootKeySet = new engine.StoreKeyMap();
|
|
193
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
194
|
+
var rootKey = keyBuilderFromType(luvio, input);
|
|
195
|
+
rootKeySet.set(rootKey, {
|
|
196
|
+
namespace: keyPrefix,
|
|
197
|
+
representationName: RepresentationType$2,
|
|
198
|
+
mergeable: false
|
|
199
|
+
});
|
|
200
|
+
return rootKeySet;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
var TTL$1 = 60000;
|
|
204
|
+
var VERSION$1 = "c5f1cd9d15d6671b01fc93db7067ae4a";
|
|
205
|
+
function validate$3(obj, path) {
|
|
206
|
+
if (path === void 0) { path = 'AuditTrailExportListOutputRepresentation'; }
|
|
207
|
+
var v_error = (function () {
|
|
208
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
209
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
210
|
+
}
|
|
211
|
+
var obj_auditTrailExports = obj.auditTrailExports;
|
|
212
|
+
var path_auditTrailExports = path + '.auditTrailExports';
|
|
213
|
+
if (!ArrayIsArray(obj_auditTrailExports)) {
|
|
214
|
+
return new TypeError('Expected "array" but received "' + typeof obj_auditTrailExports + '" (at "' + path_auditTrailExports + '")');
|
|
215
|
+
}
|
|
216
|
+
for (var i = 0; i < obj_auditTrailExports.length; i++) {
|
|
217
|
+
var obj_auditTrailExports_item = obj_auditTrailExports[i];
|
|
218
|
+
var path_auditTrailExports_item = path_auditTrailExports + '[' + i + ']';
|
|
219
|
+
var referencepath_auditTrailExports_itemValidationError = validate$4(obj_auditTrailExports_item, path_auditTrailExports_item);
|
|
220
|
+
if (referencepath_auditTrailExports_itemValidationError !== null) {
|
|
221
|
+
var message = 'Object doesn\'t match AuditTrailExportOutputRepresentation (at "' + path_auditTrailExports_item + '")\n';
|
|
222
|
+
message += referencepath_auditTrailExports_itemValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
223
|
+
return new TypeError(message);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
})();
|
|
227
|
+
return v_error === undefined ? null : v_error;
|
|
228
|
+
}
|
|
229
|
+
var RepresentationType$1 = 'AuditTrailExportListOutputRepresentation';
|
|
230
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
231
|
+
return input;
|
|
232
|
+
}
|
|
233
|
+
var select$4 = function AuditTrailExportListOutputRepresentationSelect() {
|
|
234
|
+
return {
|
|
235
|
+
kind: 'Fragment',
|
|
236
|
+
version: VERSION$1,
|
|
237
|
+
private: [],
|
|
238
|
+
opaque: true
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
function equals$1(existing, incoming) {
|
|
242
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
243
|
+
return false;
|
|
244
|
+
}
|
|
245
|
+
return true;
|
|
246
|
+
}
|
|
247
|
+
function deepFreeze$2(input) {
|
|
248
|
+
var input_auditTrailExports = input.auditTrailExports;
|
|
249
|
+
for (var i = 0; i < input_auditTrailExports.length; i++) {
|
|
250
|
+
var input_auditTrailExports_item = input_auditTrailExports[i];
|
|
251
|
+
deepFreeze$3(input_auditTrailExports_item);
|
|
252
|
+
}
|
|
253
|
+
ObjectFreeze(input_auditTrailExports);
|
|
254
|
+
ObjectFreeze(input);
|
|
255
|
+
}
|
|
256
|
+
var ingest$1 = function AuditTrailExportListOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
257
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
258
|
+
var validateError = validate$3(input);
|
|
259
|
+
if (validateError !== null) {
|
|
260
|
+
throw validateError;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
var key = path.fullPath;
|
|
264
|
+
var existingRecord = store.readEntry(key);
|
|
265
|
+
var ttlToUse = TTL$1;
|
|
266
|
+
var incomingRecord = normalize$1(input, store.readEntry(key), {
|
|
267
|
+
fullPath: key,
|
|
268
|
+
parent: path.parent,
|
|
269
|
+
propertyName: path.propertyName,
|
|
270
|
+
ttl: ttlToUse
|
|
271
|
+
});
|
|
272
|
+
deepFreeze$2(input);
|
|
273
|
+
if (existingRecord === undefined || equals$1(existingRecord, incomingRecord) === false) {
|
|
274
|
+
luvio.storePublish(key, incomingRecord);
|
|
275
|
+
}
|
|
276
|
+
{
|
|
277
|
+
var storeMetadataParams = {
|
|
278
|
+
ttl: ttlToUse,
|
|
279
|
+
namespace: "audit-trail-export",
|
|
280
|
+
version: VERSION$1,
|
|
281
|
+
representationName: RepresentationType$1,
|
|
282
|
+
};
|
|
283
|
+
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
284
|
+
}
|
|
285
|
+
return createLink(key);
|
|
286
|
+
};
|
|
287
|
+
function getTypeCacheKeys$1(luvio, input, fullPathFactory) {
|
|
288
|
+
var rootKeySet = new engine.StoreKeyMap();
|
|
289
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
290
|
+
var rootKey = fullPathFactory();
|
|
291
|
+
rootKeySet.set(rootKey, {
|
|
292
|
+
namespace: keyPrefix,
|
|
293
|
+
representationName: RepresentationType$1,
|
|
294
|
+
mergeable: false
|
|
295
|
+
});
|
|
296
|
+
return rootKeySet;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
function select$3(luvio, params) {
|
|
300
|
+
return select$4();
|
|
301
|
+
}
|
|
302
|
+
function keyBuilder$4(luvio, params) {
|
|
303
|
+
return keyPrefix + '::AuditTrailExportListOutputRepresentation:(' + ')';
|
|
304
|
+
}
|
|
305
|
+
function getResponseCacheKeys$3(luvio, resourceParams, response) {
|
|
306
|
+
return getTypeCacheKeys$1(luvio, response, function () { return keyBuilder$4(); });
|
|
307
|
+
}
|
|
308
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
309
|
+
var body = response.body;
|
|
310
|
+
var key = keyBuilder$4();
|
|
311
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
312
|
+
var snapshot = luvio.storeLookup({
|
|
313
|
+
recordId: key,
|
|
314
|
+
node: select$3(),
|
|
315
|
+
variables: {},
|
|
316
|
+
}, snapshotRefresh);
|
|
317
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
318
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
319
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
return snapshot;
|
|
323
|
+
}
|
|
324
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
325
|
+
var key = keyBuilder$4();
|
|
326
|
+
var errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
327
|
+
var storeMetadataParams = {
|
|
328
|
+
ttl: TTL$1,
|
|
329
|
+
namespace: keyPrefix,
|
|
330
|
+
version: VERSION$1,
|
|
331
|
+
representationName: RepresentationType$1
|
|
332
|
+
};
|
|
333
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
334
|
+
return errorSnapshot;
|
|
335
|
+
}
|
|
336
|
+
function createResourceRequest$3(config) {
|
|
337
|
+
var headers = {};
|
|
338
|
+
return {
|
|
339
|
+
baseUri: '/services/data/v58.0',
|
|
340
|
+
basePath: '/connect/service-excellence/audit-trail-exports',
|
|
341
|
+
method: 'get',
|
|
342
|
+
body: null,
|
|
343
|
+
urlParams: {},
|
|
344
|
+
queryParams: {},
|
|
345
|
+
headers: headers,
|
|
346
|
+
priority: 'normal',
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
var getAuditTrailFileExports_ConfigPropertyNames = {
|
|
351
|
+
displayName: 'getAuditTrailFileExports',
|
|
352
|
+
parameters: {
|
|
353
|
+
required: [],
|
|
354
|
+
optional: []
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
function createResourceParams$3(config) {
|
|
358
|
+
var resourceParams = {};
|
|
359
|
+
return resourceParams;
|
|
360
|
+
}
|
|
361
|
+
function keyBuilder$3(luvio, config) {
|
|
362
|
+
return keyBuilder$4();
|
|
363
|
+
}
|
|
364
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
365
|
+
var config = {};
|
|
366
|
+
return config;
|
|
367
|
+
}
|
|
368
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
369
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
370
|
+
return null;
|
|
371
|
+
}
|
|
372
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
373
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
374
|
+
}
|
|
375
|
+
var config = typeCheckConfig$3();
|
|
376
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
377
|
+
return null;
|
|
378
|
+
}
|
|
379
|
+
return config;
|
|
380
|
+
}
|
|
381
|
+
function adapterFragment$1(luvio, config) {
|
|
382
|
+
return select$3();
|
|
383
|
+
}
|
|
384
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
385
|
+
var snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
386
|
+
config: config,
|
|
387
|
+
resolve: function () { return buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions); }
|
|
388
|
+
});
|
|
389
|
+
return luvio.storeBroadcast().then(function () { return snapshot; });
|
|
390
|
+
}
|
|
391
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
392
|
+
var snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
393
|
+
config: config,
|
|
394
|
+
resolve: function () { return buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions); }
|
|
395
|
+
});
|
|
396
|
+
return luvio.storeBroadcast().then(function () { return snapshot; });
|
|
397
|
+
}
|
|
398
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
399
|
+
var resourceParams = createResourceParams$3();
|
|
400
|
+
var request = createResourceRequest$3();
|
|
401
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
402
|
+
.then(function (response) {
|
|
403
|
+
return luvio.handleSuccessResponse(function () { return onFetchResponseSuccess$1(luvio, config, resourceParams, response); }, function () { return getResponseCacheKeys$3(luvio, resourceParams, response.body); });
|
|
404
|
+
}, function (response) {
|
|
405
|
+
return luvio.handleErrorResponse(function () { return onFetchResponseError$1(luvio, config, resourceParams, response); });
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
409
|
+
var luvio = context.luvio, config = context.config;
|
|
410
|
+
var networkPriority = coercedAdapterRequestContext.networkPriority, requestCorrelator = coercedAdapterRequestContext.requestCorrelator, eventObservers = coercedAdapterRequestContext.eventObservers;
|
|
411
|
+
var dispatchOptions = {
|
|
412
|
+
resourceRequestContext: {
|
|
413
|
+
requestCorrelator: requestCorrelator,
|
|
414
|
+
luvioRequestMethod: undefined,
|
|
415
|
+
},
|
|
416
|
+
eventObservers: eventObservers
|
|
417
|
+
};
|
|
418
|
+
if (networkPriority !== 'normal') {
|
|
419
|
+
dispatchOptions.overrides = {
|
|
420
|
+
priority: networkPriority
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
return buildNetworkSnapshot$3(luvio, config, dispatchOptions);
|
|
424
|
+
}
|
|
425
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
426
|
+
var luvio = context.luvio, config = context.config;
|
|
427
|
+
var selector = {
|
|
428
|
+
recordId: keyBuilder$3(),
|
|
429
|
+
node: adapterFragment$1(),
|
|
430
|
+
variables: {},
|
|
431
|
+
};
|
|
432
|
+
var cacheSnapshot = storeLookup(selector, {
|
|
433
|
+
config: config,
|
|
434
|
+
resolve: function () { return buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions); }
|
|
435
|
+
});
|
|
436
|
+
return cacheSnapshot;
|
|
437
|
+
}
|
|
438
|
+
var getAuditTrailFileExportsAdapterFactory = function (luvio) { return function auditTrailExport__getAuditTrailFileExports(untrustedConfig, requestContext) {
|
|
439
|
+
var config = validateAdapterConfig$3(untrustedConfig, getAuditTrailFileExports_ConfigPropertyNames);
|
|
440
|
+
// Invalid or incomplete config
|
|
441
|
+
if (config === null) {
|
|
442
|
+
return null;
|
|
443
|
+
}
|
|
444
|
+
return luvio.applyCachePolicy((requestContext || {}), { config: config, luvio: luvio }, // BuildSnapshotContext
|
|
445
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
446
|
+
}; };
|
|
447
|
+
|
|
448
|
+
function validate$2(obj, path) {
|
|
449
|
+
if (path === void 0) { path = 'AuditTrailExportInputRepresentation'; }
|
|
450
|
+
var v_error = (function () {
|
|
451
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
452
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
453
|
+
}
|
|
454
|
+
var obj_endDate = obj.endDate;
|
|
455
|
+
var path_endDate = path + '.endDate';
|
|
456
|
+
if (typeof obj_endDate !== 'string') {
|
|
457
|
+
return new TypeError('Expected "string" but received "' + typeof obj_endDate + '" (at "' + path_endDate + '")');
|
|
458
|
+
}
|
|
459
|
+
var obj_endTime = obj.endTime;
|
|
460
|
+
var path_endTime = path + '.endTime';
|
|
461
|
+
if (typeof obj_endTime !== 'string') {
|
|
462
|
+
return new TypeError('Expected "string" but received "' + typeof obj_endTime + '" (at "' + path_endTime + '")');
|
|
463
|
+
}
|
|
464
|
+
var obj_initiatingAttendeeId = obj.initiatingAttendeeId;
|
|
465
|
+
var path_initiatingAttendeeId = path + '.initiatingAttendeeId';
|
|
466
|
+
if (typeof obj_initiatingAttendeeId !== 'string') {
|
|
467
|
+
return new TypeError('Expected "string" but received "' + typeof obj_initiatingAttendeeId + '" (at "' + path_initiatingAttendeeId + '")');
|
|
468
|
+
}
|
|
469
|
+
var obj_startDate = obj.startDate;
|
|
470
|
+
var path_startDate = path + '.startDate';
|
|
471
|
+
if (typeof obj_startDate !== 'string') {
|
|
472
|
+
return new TypeError('Expected "string" but received "' + typeof obj_startDate + '" (at "' + path_startDate + '")');
|
|
473
|
+
}
|
|
474
|
+
var obj_startTime = obj.startTime;
|
|
475
|
+
var path_startTime = path + '.startTime';
|
|
476
|
+
if (typeof obj_startTime !== 'string') {
|
|
477
|
+
return new TypeError('Expected "string" but received "' + typeof obj_startTime + '" (at "' + path_startTime + '")');
|
|
478
|
+
}
|
|
479
|
+
var obj_verificationStatus = obj.verificationStatus;
|
|
480
|
+
var path_verificationStatus = path + '.verificationStatus';
|
|
481
|
+
if (typeof obj_verificationStatus !== 'string') {
|
|
482
|
+
return new TypeError('Expected "string" but received "' + typeof obj_verificationStatus + '" (at "' + path_verificationStatus + '")');
|
|
483
|
+
}
|
|
484
|
+
})();
|
|
485
|
+
return v_error === undefined ? null : v_error;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
function select$2(luvio, params) {
|
|
489
|
+
return select$5();
|
|
490
|
+
}
|
|
491
|
+
function getResponseCacheKeys$2(luvio, resourceParams, response) {
|
|
492
|
+
return getTypeCacheKeys$2(luvio, response);
|
|
493
|
+
}
|
|
494
|
+
function ingestSuccess$1(luvio, resourceParams, response) {
|
|
495
|
+
var body = response.body;
|
|
496
|
+
var key = keyBuilderFromType(luvio, body);
|
|
497
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
498
|
+
var snapshot = luvio.storeLookup({
|
|
499
|
+
recordId: key,
|
|
500
|
+
node: select$2(),
|
|
501
|
+
variables: {},
|
|
502
|
+
});
|
|
503
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
504
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
505
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
return snapshot;
|
|
509
|
+
}
|
|
510
|
+
function createResourceRequest$2(config) {
|
|
511
|
+
var headers = {};
|
|
512
|
+
return {
|
|
513
|
+
baseUri: '/services/data/v58.0',
|
|
514
|
+
basePath: '/connect/service-excellence/audit-trail-exports',
|
|
515
|
+
method: 'post',
|
|
516
|
+
body: config.body,
|
|
517
|
+
urlParams: {},
|
|
518
|
+
queryParams: {},
|
|
519
|
+
headers: headers,
|
|
520
|
+
priority: 'normal',
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
var createAuditTrailFileExport_ConfigPropertyNames = {
|
|
525
|
+
displayName: 'createAuditTrailFileExport',
|
|
526
|
+
parameters: {
|
|
527
|
+
required: ['auditTrailExportInput'],
|
|
528
|
+
optional: []
|
|
529
|
+
}
|
|
530
|
+
};
|
|
531
|
+
function createResourceParams$2(config) {
|
|
532
|
+
var resourceParams = {
|
|
533
|
+
body: {
|
|
534
|
+
auditTrailExportInput: config.auditTrailExportInput
|
|
535
|
+
}
|
|
536
|
+
};
|
|
537
|
+
return resourceParams;
|
|
538
|
+
}
|
|
539
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
540
|
+
var config = {};
|
|
541
|
+
var untrustedConfig_auditTrailExportInput = untrustedConfig.auditTrailExportInput;
|
|
542
|
+
var referenceAuditTrailExportInputRepresentationValidationError = validate$2(untrustedConfig_auditTrailExportInput);
|
|
543
|
+
if (referenceAuditTrailExportInputRepresentationValidationError === null) {
|
|
544
|
+
config.auditTrailExportInput = untrustedConfig_auditTrailExportInput;
|
|
545
|
+
}
|
|
546
|
+
return config;
|
|
547
|
+
}
|
|
548
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
549
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
550
|
+
return null;
|
|
551
|
+
}
|
|
552
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
553
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
554
|
+
}
|
|
555
|
+
var config = typeCheckConfig$2(untrustedConfig);
|
|
556
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
557
|
+
return null;
|
|
558
|
+
}
|
|
559
|
+
return config;
|
|
560
|
+
}
|
|
561
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
562
|
+
var resourceParams = createResourceParams$2(config);
|
|
563
|
+
var request = createResourceRequest$2(resourceParams);
|
|
564
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
565
|
+
.then(function (response) {
|
|
566
|
+
return luvio.handleSuccessResponse(function () {
|
|
567
|
+
var snapshot = ingestSuccess$1(luvio, resourceParams, response);
|
|
568
|
+
return luvio.storeBroadcast().then(function () { return snapshot; });
|
|
569
|
+
}, function () { return getResponseCacheKeys$2(luvio, resourceParams, response.body); });
|
|
570
|
+
}, function (response) {
|
|
571
|
+
deepFreeze$4(response);
|
|
572
|
+
throw response;
|
|
573
|
+
});
|
|
574
|
+
}
|
|
575
|
+
var createAuditTrailFileExportAdapterFactory = function (luvio) {
|
|
576
|
+
return function createAuditTrailFileExport(untrustedConfig) {
|
|
577
|
+
var config = validateAdapterConfig$2(untrustedConfig, createAuditTrailFileExport_ConfigPropertyNames);
|
|
578
|
+
// Invalid or incomplete config
|
|
579
|
+
if (config === null) {
|
|
580
|
+
throw new Error('Invalid config for "createAuditTrailFileExport"');
|
|
581
|
+
}
|
|
582
|
+
return buildNetworkSnapshot$2(luvio, config);
|
|
583
|
+
};
|
|
584
|
+
};
|
|
585
|
+
|
|
586
|
+
function keyBuilder$2(luvio, params) {
|
|
587
|
+
return keyBuilder$5(luvio, {
|
|
588
|
+
requestIdentifier: params.urlParams.requestIdentifier
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
function getResponseCacheKeys$1(luvio, resourceParams) {
|
|
592
|
+
var key = keyBuilder$2(luvio, resourceParams);
|
|
593
|
+
var cacheKeyMap = new engine.StoreKeyMap();
|
|
594
|
+
cacheKeyMap.set(key, {
|
|
595
|
+
namespace: keyPrefix,
|
|
596
|
+
representationName: RepresentationType$2,
|
|
597
|
+
mergeable: false
|
|
598
|
+
});
|
|
599
|
+
return cacheKeyMap;
|
|
600
|
+
}
|
|
601
|
+
function evictSuccess(luvio, resourceParams) {
|
|
602
|
+
var key = keyBuilder$2(luvio, resourceParams);
|
|
603
|
+
luvio.storeEvict(key);
|
|
604
|
+
}
|
|
605
|
+
function createResourceRequest$1(config) {
|
|
606
|
+
var headers = {};
|
|
607
|
+
return {
|
|
608
|
+
baseUri: '/services/data/v58.0',
|
|
609
|
+
basePath: '/connect/service-excellence/audit-trail-exports/' + config.urlParams.requestIdentifier + '',
|
|
610
|
+
method: 'delete',
|
|
611
|
+
body: null,
|
|
612
|
+
urlParams: config.urlParams,
|
|
613
|
+
queryParams: {},
|
|
614
|
+
headers: headers,
|
|
615
|
+
priority: 'normal',
|
|
616
|
+
};
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
var adapterName = 'deleteAuditTrailFileExport';
|
|
620
|
+
var deleteAuditTrailFileExport_ConfigPropertyNames = {
|
|
621
|
+
displayName: 'deleteAuditTrailFileExport',
|
|
622
|
+
parameters: {
|
|
623
|
+
required: ['requestIdentifier'],
|
|
624
|
+
optional: []
|
|
625
|
+
}
|
|
626
|
+
};
|
|
627
|
+
function createResourceParams$1(config) {
|
|
628
|
+
var resourceParams = {
|
|
629
|
+
urlParams: {
|
|
630
|
+
requestIdentifier: config.requestIdentifier
|
|
631
|
+
}
|
|
632
|
+
};
|
|
633
|
+
return resourceParams;
|
|
634
|
+
}
|
|
635
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
636
|
+
var config = {};
|
|
637
|
+
var untrustedConfig_requestIdentifier = untrustedConfig.requestIdentifier;
|
|
638
|
+
if (typeof untrustedConfig_requestIdentifier === 'string') {
|
|
639
|
+
config.requestIdentifier = untrustedConfig_requestIdentifier;
|
|
640
|
+
}
|
|
641
|
+
return config;
|
|
642
|
+
}
|
|
643
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
644
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
645
|
+
return null;
|
|
646
|
+
}
|
|
647
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
648
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
649
|
+
}
|
|
650
|
+
var config = typeCheckConfig$1(untrustedConfig);
|
|
651
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
652
|
+
return null;
|
|
653
|
+
}
|
|
654
|
+
return config;
|
|
655
|
+
}
|
|
656
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
657
|
+
var resourceParams = createResourceParams$1(config);
|
|
658
|
+
var request = createResourceRequest$1(resourceParams);
|
|
659
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
660
|
+
.then(function () {
|
|
661
|
+
return luvio.handleSuccessResponse(function () {
|
|
662
|
+
evictSuccess(luvio, resourceParams);
|
|
663
|
+
return luvio.storeBroadcast();
|
|
664
|
+
}, function () { return getResponseCacheKeys$1(luvio, resourceParams); });
|
|
665
|
+
}, function (response) {
|
|
666
|
+
deepFreeze$4(response);
|
|
667
|
+
throw response;
|
|
668
|
+
});
|
|
669
|
+
}
|
|
670
|
+
var deleteAuditTrailFileExportAdapterFactory = function (luvio) {
|
|
671
|
+
return function auditTrailExportdeleteAuditTrailFileExport(untrustedConfig) {
|
|
672
|
+
var config = validateAdapterConfig$1(untrustedConfig, deleteAuditTrailFileExport_ConfigPropertyNames);
|
|
673
|
+
// Invalid or incomplete config
|
|
674
|
+
if (config === null) {
|
|
675
|
+
throw new Error("Invalid config for \"".concat(adapterName, "\""));
|
|
676
|
+
}
|
|
677
|
+
return buildNetworkSnapshot$1(luvio, config);
|
|
678
|
+
};
|
|
679
|
+
};
|
|
680
|
+
|
|
681
|
+
function validate$1(obj, path) {
|
|
682
|
+
if (path === void 0) { path = 'AuditTrailLogOutputRepresentation'; }
|
|
683
|
+
var v_error = (function () {
|
|
684
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
685
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
686
|
+
}
|
|
687
|
+
var obj_communicationChannel = obj.communicationChannel;
|
|
688
|
+
var path_communicationChannel = path + '.communicationChannel';
|
|
689
|
+
if (typeof obj_communicationChannel !== 'string') {
|
|
690
|
+
return new TypeError('Expected "string" but received "' + typeof obj_communicationChannel + '" (at "' + path_communicationChannel + '")');
|
|
691
|
+
}
|
|
692
|
+
var obj_engagementTopic = obj.engagementTopic;
|
|
693
|
+
var path_engagementTopic = path + '.engagementTopic';
|
|
694
|
+
if (typeof obj_engagementTopic !== 'string') {
|
|
695
|
+
return new TypeError('Expected "string" but received "' + typeof obj_engagementTopic + '" (at "' + path_engagementTopic + '")');
|
|
696
|
+
}
|
|
697
|
+
var obj_initiatingAttendee = obj.initiatingAttendee;
|
|
698
|
+
var path_initiatingAttendee = path + '.initiatingAttendee';
|
|
699
|
+
if (typeof obj_initiatingAttendee !== 'string') {
|
|
700
|
+
return new TypeError('Expected "string" but received "' + typeof obj_initiatingAttendee + '" (at "' + path_initiatingAttendee + '")');
|
|
701
|
+
}
|
|
702
|
+
var obj_initiatingAttendeeType = obj.initiatingAttendeeType;
|
|
703
|
+
var path_initiatingAttendeeType = path + '.initiatingAttendeeType';
|
|
704
|
+
if (typeof obj_initiatingAttendeeType !== 'string') {
|
|
705
|
+
return new TypeError('Expected "string" but received "' + typeof obj_initiatingAttendeeType + '" (at "' + path_initiatingAttendeeType + '")');
|
|
706
|
+
}
|
|
707
|
+
var obj_recordName = obj.recordName;
|
|
708
|
+
var path_recordName = path + '.recordName';
|
|
709
|
+
if (typeof obj_recordName !== 'string') {
|
|
710
|
+
return new TypeError('Expected "string" but received "' + typeof obj_recordName + '" (at "' + path_recordName + '")');
|
|
711
|
+
}
|
|
712
|
+
var obj_verificationStatus = obj.verificationStatus;
|
|
713
|
+
var path_verificationStatus = path + '.verificationStatus';
|
|
714
|
+
if (typeof obj_verificationStatus !== 'string') {
|
|
715
|
+
return new TypeError('Expected "string" but received "' + typeof obj_verificationStatus + '" (at "' + path_verificationStatus + '")');
|
|
716
|
+
}
|
|
717
|
+
var obj_verificationTimestamp = obj.verificationTimestamp;
|
|
718
|
+
var path_verificationTimestamp = path + '.verificationTimestamp';
|
|
719
|
+
if (typeof obj_verificationTimestamp !== 'string') {
|
|
720
|
+
return new TypeError('Expected "string" but received "' + typeof obj_verificationTimestamp + '" (at "' + path_verificationTimestamp + '")');
|
|
721
|
+
}
|
|
722
|
+
var obj_verificationType = obj.verificationType;
|
|
723
|
+
var path_verificationType = path + '.verificationType';
|
|
724
|
+
if (typeof obj_verificationType !== 'string') {
|
|
725
|
+
return new TypeError('Expected "string" but received "' + typeof obj_verificationType + '" (at "' + path_verificationType + '")');
|
|
726
|
+
}
|
|
727
|
+
})();
|
|
728
|
+
return v_error === undefined ? null : v_error;
|
|
729
|
+
}
|
|
730
|
+
function deepFreeze$1(input) {
|
|
731
|
+
ObjectFreeze(input);
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
var TTL = 60000;
|
|
735
|
+
var VERSION = "19c94077a33b93089fd947bbe72c860c";
|
|
736
|
+
function validate(obj, path) {
|
|
737
|
+
if (path === void 0) { path = 'AuditTrailFileDownloadOutputRepresentation'; }
|
|
738
|
+
var v_error = (function () {
|
|
739
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
740
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
741
|
+
}
|
|
742
|
+
var obj_auditTrailLogs = obj.auditTrailLogs;
|
|
743
|
+
var path_auditTrailLogs = path + '.auditTrailLogs';
|
|
744
|
+
if (!ArrayIsArray(obj_auditTrailLogs)) {
|
|
745
|
+
return new TypeError('Expected "array" but received "' + typeof obj_auditTrailLogs + '" (at "' + path_auditTrailLogs + '")');
|
|
746
|
+
}
|
|
747
|
+
for (var i = 0; i < obj_auditTrailLogs.length; i++) {
|
|
748
|
+
var obj_auditTrailLogs_item = obj_auditTrailLogs[i];
|
|
749
|
+
var path_auditTrailLogs_item = path_auditTrailLogs + '[' + i + ']';
|
|
750
|
+
var referencepath_auditTrailLogs_itemValidationError = validate$1(obj_auditTrailLogs_item, path_auditTrailLogs_item);
|
|
751
|
+
if (referencepath_auditTrailLogs_itemValidationError !== null) {
|
|
752
|
+
var message = 'Object doesn\'t match AuditTrailLogOutputRepresentation (at "' + path_auditTrailLogs_item + '")\n';
|
|
753
|
+
message += referencepath_auditTrailLogs_itemValidationError.message.split('\n').map(function (line) { return '\t' + line; }).join('\n');
|
|
754
|
+
return new TypeError(message);
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
})();
|
|
758
|
+
return v_error === undefined ? null : v_error;
|
|
759
|
+
}
|
|
760
|
+
var RepresentationType = 'AuditTrailFileDownloadOutputRepresentation';
|
|
761
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
762
|
+
return input;
|
|
763
|
+
}
|
|
764
|
+
var select$1 = function AuditTrailFileDownloadOutputRepresentationSelect() {
|
|
765
|
+
return {
|
|
766
|
+
kind: 'Fragment',
|
|
767
|
+
version: VERSION,
|
|
768
|
+
private: [],
|
|
769
|
+
opaque: true
|
|
770
|
+
};
|
|
771
|
+
};
|
|
772
|
+
function equals(existing, incoming) {
|
|
773
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
774
|
+
return false;
|
|
775
|
+
}
|
|
776
|
+
return true;
|
|
777
|
+
}
|
|
778
|
+
function deepFreeze(input) {
|
|
779
|
+
var input_auditTrailLogs = input.auditTrailLogs;
|
|
780
|
+
for (var i = 0; i < input_auditTrailLogs.length; i++) {
|
|
781
|
+
var input_auditTrailLogs_item = input_auditTrailLogs[i];
|
|
782
|
+
deepFreeze$1(input_auditTrailLogs_item);
|
|
783
|
+
}
|
|
784
|
+
ObjectFreeze(input_auditTrailLogs);
|
|
785
|
+
ObjectFreeze(input);
|
|
786
|
+
}
|
|
787
|
+
var ingest = function AuditTrailFileDownloadOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
788
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
789
|
+
var validateError = validate(input);
|
|
790
|
+
if (validateError !== null) {
|
|
791
|
+
throw validateError;
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
var key = path.fullPath;
|
|
795
|
+
var existingRecord = store.readEntry(key);
|
|
796
|
+
var ttlToUse = TTL;
|
|
797
|
+
var incomingRecord = normalize(input, store.readEntry(key), {
|
|
798
|
+
fullPath: key,
|
|
799
|
+
parent: path.parent,
|
|
800
|
+
propertyName: path.propertyName,
|
|
801
|
+
ttl: ttlToUse
|
|
802
|
+
});
|
|
803
|
+
deepFreeze(input);
|
|
804
|
+
if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
|
|
805
|
+
luvio.storePublish(key, incomingRecord);
|
|
806
|
+
}
|
|
807
|
+
{
|
|
808
|
+
var storeMetadataParams = {
|
|
809
|
+
ttl: ttlToUse,
|
|
810
|
+
namespace: "audit-trail-export",
|
|
811
|
+
version: VERSION,
|
|
812
|
+
representationName: RepresentationType,
|
|
813
|
+
};
|
|
814
|
+
luvio.publishStoreMetadata(key, storeMetadataParams);
|
|
815
|
+
}
|
|
816
|
+
return createLink(key);
|
|
817
|
+
};
|
|
818
|
+
function getTypeCacheKeys(luvio, input, fullPathFactory) {
|
|
819
|
+
var rootKeySet = new engine.StoreKeyMap();
|
|
820
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
821
|
+
var rootKey = fullPathFactory();
|
|
822
|
+
rootKeySet.set(rootKey, {
|
|
823
|
+
namespace: keyPrefix,
|
|
824
|
+
representationName: RepresentationType,
|
|
825
|
+
mergeable: false
|
|
826
|
+
});
|
|
827
|
+
return rootKeySet;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
function select(luvio, params) {
|
|
831
|
+
return select$1();
|
|
832
|
+
}
|
|
833
|
+
function keyBuilder$1(luvio, params) {
|
|
834
|
+
return keyPrefix + '::AuditTrailFileDownloadOutputRepresentation:(' + 'requestIdentifier:' + params.urlParams.requestIdentifier + ')';
|
|
835
|
+
}
|
|
836
|
+
function getResponseCacheKeys(luvio, resourceParams, response) {
|
|
837
|
+
return getTypeCacheKeys(luvio, response, function () { return keyBuilder$1(luvio, resourceParams); });
|
|
838
|
+
}
|
|
839
|
+
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
840
|
+
var body = response.body;
|
|
841
|
+
var key = keyBuilder$1(luvio, resourceParams);
|
|
842
|
+
luvio.storeIngest(key, ingest, body);
|
|
843
|
+
var snapshot = luvio.storeLookup({
|
|
844
|
+
recordId: key,
|
|
845
|
+
node: select(),
|
|
846
|
+
variables: {},
|
|
847
|
+
}, snapshotRefresh);
|
|
848
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
849
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
850
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
return snapshot;
|
|
854
|
+
}
|
|
855
|
+
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
856
|
+
var key = keyBuilder$1(luvio, params);
|
|
857
|
+
var errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
858
|
+
var storeMetadataParams = {
|
|
859
|
+
ttl: TTL,
|
|
860
|
+
namespace: keyPrefix,
|
|
861
|
+
version: VERSION,
|
|
862
|
+
representationName: RepresentationType
|
|
863
|
+
};
|
|
864
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
865
|
+
return errorSnapshot;
|
|
866
|
+
}
|
|
867
|
+
function createResourceRequest(config) {
|
|
868
|
+
var headers = {};
|
|
869
|
+
return {
|
|
870
|
+
baseUri: '/services/data/v58.0',
|
|
871
|
+
basePath: '/connect/service-excellence/audit-trail-exports/' + config.urlParams.requestIdentifier + '/download',
|
|
872
|
+
method: 'get',
|
|
873
|
+
body: null,
|
|
874
|
+
urlParams: config.urlParams,
|
|
875
|
+
queryParams: {},
|
|
876
|
+
headers: headers,
|
|
877
|
+
priority: 'normal',
|
|
878
|
+
};
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
var getAuditTrailFileExport_ConfigPropertyNames = {
|
|
882
|
+
displayName: 'getAuditTrailFileExport',
|
|
883
|
+
parameters: {
|
|
884
|
+
required: ['requestIdentifier'],
|
|
885
|
+
optional: []
|
|
886
|
+
}
|
|
887
|
+
};
|
|
888
|
+
function createResourceParams(config) {
|
|
889
|
+
var resourceParams = {
|
|
890
|
+
urlParams: {
|
|
891
|
+
requestIdentifier: config.requestIdentifier
|
|
892
|
+
}
|
|
893
|
+
};
|
|
894
|
+
return resourceParams;
|
|
895
|
+
}
|
|
896
|
+
function keyBuilder(luvio, config) {
|
|
897
|
+
var resourceParams = createResourceParams(config);
|
|
898
|
+
return keyBuilder$1(luvio, resourceParams);
|
|
899
|
+
}
|
|
900
|
+
function typeCheckConfig(untrustedConfig) {
|
|
901
|
+
var config = {};
|
|
902
|
+
var untrustedConfig_requestIdentifier = untrustedConfig.requestIdentifier;
|
|
903
|
+
if (typeof untrustedConfig_requestIdentifier === 'string') {
|
|
904
|
+
config.requestIdentifier = untrustedConfig_requestIdentifier;
|
|
905
|
+
}
|
|
906
|
+
return config;
|
|
907
|
+
}
|
|
908
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
909
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
910
|
+
return null;
|
|
911
|
+
}
|
|
912
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
913
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
914
|
+
}
|
|
915
|
+
var config = typeCheckConfig(untrustedConfig);
|
|
916
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
917
|
+
return null;
|
|
918
|
+
}
|
|
919
|
+
return config;
|
|
920
|
+
}
|
|
921
|
+
function adapterFragment(luvio, config) {
|
|
922
|
+
createResourceParams(config);
|
|
923
|
+
return select();
|
|
924
|
+
}
|
|
925
|
+
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
926
|
+
var snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
927
|
+
config: config,
|
|
928
|
+
resolve: function () { return buildNetworkSnapshot(luvio, config, snapshotRefreshOptions); }
|
|
929
|
+
});
|
|
930
|
+
return luvio.storeBroadcast().then(function () { return snapshot; });
|
|
931
|
+
}
|
|
932
|
+
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
933
|
+
var snapshot = ingestError(luvio, resourceParams, response, {
|
|
934
|
+
config: config,
|
|
935
|
+
resolve: function () { return buildNetworkSnapshot(luvio, config, snapshotRefreshOptions); }
|
|
936
|
+
});
|
|
937
|
+
return luvio.storeBroadcast().then(function () { return snapshot; });
|
|
938
|
+
}
|
|
939
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
940
|
+
var resourceParams = createResourceParams(config);
|
|
941
|
+
var request = createResourceRequest(resourceParams);
|
|
942
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
943
|
+
.then(function (response) {
|
|
944
|
+
return luvio.handleSuccessResponse(function () { return onFetchResponseSuccess(luvio, config, resourceParams, response); }, function () { return getResponseCacheKeys(luvio, resourceParams, response.body); });
|
|
945
|
+
}, function (response) {
|
|
946
|
+
return luvio.handleErrorResponse(function () { return onFetchResponseError(luvio, config, resourceParams, response); });
|
|
947
|
+
});
|
|
948
|
+
}
|
|
949
|
+
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
950
|
+
var luvio = context.luvio, config = context.config;
|
|
951
|
+
var networkPriority = coercedAdapterRequestContext.networkPriority, requestCorrelator = coercedAdapterRequestContext.requestCorrelator, eventObservers = coercedAdapterRequestContext.eventObservers;
|
|
952
|
+
var dispatchOptions = {
|
|
953
|
+
resourceRequestContext: {
|
|
954
|
+
requestCorrelator: requestCorrelator,
|
|
955
|
+
luvioRequestMethod: undefined,
|
|
956
|
+
},
|
|
957
|
+
eventObservers: eventObservers
|
|
958
|
+
};
|
|
959
|
+
if (networkPriority !== 'normal') {
|
|
960
|
+
dispatchOptions.overrides = {
|
|
961
|
+
priority: networkPriority
|
|
962
|
+
};
|
|
963
|
+
}
|
|
964
|
+
return buildNetworkSnapshot(luvio, config, dispatchOptions);
|
|
965
|
+
}
|
|
966
|
+
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
967
|
+
var luvio = context.luvio, config = context.config;
|
|
968
|
+
var selector = {
|
|
969
|
+
recordId: keyBuilder(luvio, config),
|
|
970
|
+
node: adapterFragment(luvio, config),
|
|
971
|
+
variables: {},
|
|
972
|
+
};
|
|
973
|
+
var cacheSnapshot = storeLookup(selector, {
|
|
974
|
+
config: config,
|
|
975
|
+
resolve: function () { return buildNetworkSnapshot(luvio, config, snapshotRefreshOptions); }
|
|
976
|
+
});
|
|
977
|
+
return cacheSnapshot;
|
|
978
|
+
}
|
|
979
|
+
var getAuditTrailFileExportAdapterFactory = function (luvio) { return function auditTrailExport__getAuditTrailFileExport(untrustedConfig, requestContext) {
|
|
980
|
+
var config = validateAdapterConfig(untrustedConfig, getAuditTrailFileExport_ConfigPropertyNames);
|
|
981
|
+
// Invalid or incomplete config
|
|
982
|
+
if (config === null) {
|
|
983
|
+
return null;
|
|
984
|
+
}
|
|
985
|
+
return luvio.applyCachePolicy((requestContext || {}), { config: config, luvio: luvio }, // BuildSnapshotContext
|
|
986
|
+
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
987
|
+
}; };
|
|
988
|
+
|
|
989
|
+
exports.createAuditTrailFileExportAdapterFactory = createAuditTrailFileExportAdapterFactory;
|
|
990
|
+
exports.deleteAuditTrailFileExportAdapterFactory = deleteAuditTrailFileExportAdapterFactory;
|
|
991
|
+
exports.getAuditTrailFileExportAdapterFactory = getAuditTrailFileExportAdapterFactory;
|
|
992
|
+
exports.getAuditTrailFileExportsAdapterFactory = getAuditTrailFileExportsAdapterFactory;
|
|
993
|
+
|
|
994
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
995
|
+
|
|
996
|
+
}));
|