@salesforce/lds-adapters-industries-audit-trail-export 1.124.2 → 1.124.3

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