@salesforce/lds-adapters-cms-orchestrator 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 (26) hide show
  1. package/dist/es/es2018/cms-orchestrator.js +1762 -1762
  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/createManagedContentOrchestrationInstance.d.ts +15 -15
  4. package/dist/{types → es/es2018/types}/src/generated/adapters/getManagedContentOrchestrationDefinitions.d.ts +28 -28
  5. package/dist/{types → es/es2018/types}/src/generated/adapters/getManagedContentOrchestrationInstances.d.ts +26 -26
  6. package/dist/{types → es/es2018/types}/src/generated/adapters/getManagedContentRunningOrchestrationHistoryEvents.d.ts +26 -26
  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 +8 -8
  9. package/dist/{types → es/es2018/types}/src/generated/resources/getConnectCmsContentsOrchestrationDefinitions.d.ts +17 -17
  10. package/dist/{types → es/es2018/types}/src/generated/resources/getConnectCmsContentsOrchestrationHistoryEvents.d.ts +15 -15
  11. package/dist/{types → es/es2018/types}/src/generated/resources/getConnectCmsContentsOrchestrationInstances.d.ts +15 -15
  12. package/dist/{types → es/es2018/types}/src/generated/resources/postConnectCmsContentsOrchestrationInstances.d.ts +13 -13
  13. package/dist/{types → es/es2018/types}/src/generated/types/ManagedContentOrchestrationDefinitionCollectionRepresentation.d.ts +52 -52
  14. package/dist/{types → es/es2018/types}/src/generated/types/ManagedContentOrchestrationDefinitionRepresentation.d.ts +51 -51
  15. package/dist/{types → es/es2018/types}/src/generated/types/ManagedContentOrchestrationInstanceCollectionRepresentation.d.ts +40 -40
  16. package/dist/{types → es/es2018/types}/src/generated/types/ManagedContentOrchestrationInstanceInputRepresentation.d.ts +32 -32
  17. package/dist/{types → es/es2018/types}/src/generated/types/ManagedContentOrchestrationInstanceInputWrapperRepresentation.d.ts +29 -29
  18. package/dist/{types → es/es2018/types}/src/generated/types/ManagedContentOrchestrationInstanceRepresentation.d.ts +55 -55
  19. package/dist/{types → es/es2018/types}/src/generated/types/ManagedContentRunningOrchestrationHistoryEventCollectionRepresentation.d.ts +31 -31
  20. package/dist/{types → es/es2018/types}/src/generated/types/ManagedContentRunningOrchestrationHistoryEventRepresentation.d.ts +72 -72
  21. package/dist/{types → es/es2018/types}/src/generated/types/type-utils.d.ts +39 -39
  22. package/package.json +5 -5
  23. package/sfdc/index.d.ts +1 -1
  24. package/sfdc/index.js +1804 -1804
  25. package/dist/umd/es2018/cms-orchestrator.js +0 -1816
  26. package/dist/umd/es5/cms-orchestrator.js +0 -1823
@@ -6,1800 +6,1800 @@
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 = 'CMSOrchestrator';
52
52
 
53
- const { freeze: ObjectFreeze, keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
54
- const { isArray: ArrayIsArray } = Array;
55
- function equalsArray(a, b, equalsItem) {
56
- const aLength = a.length;
57
- const bLength = b.length;
58
- if (aLength !== bLength) {
59
- return false;
60
- }
61
- for (let i = 0; i < aLength; i++) {
62
- if (equalsItem(a[i], b[i]) === false) {
63
- return false;
64
- }
65
- }
66
- return true;
67
- }
68
- function deepFreeze(value) {
69
- // No need to freeze primitives
70
- if (typeof value !== 'object' || value === null) {
71
- return;
72
- }
73
- if (ArrayIsArray(value)) {
74
- for (let i = 0, len = value.length; i < len; i += 1) {
75
- deepFreeze(value[i]);
76
- }
77
- }
78
- else {
79
- const keys = ObjectKeys(value);
80
- for (let i = 0, len = keys.length; i < len; i += 1) {
81
- deepFreeze(value[keys[i]]);
82
- }
83
- }
84
- ObjectFreeze(value);
85
- }
86
- function createLink(ref) {
87
- return {
88
- __ref: serializeStructuredKey(ref),
89
- };
53
+ const { freeze: ObjectFreeze, keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
54
+ const { isArray: ArrayIsArray } = Array;
55
+ function equalsArray(a, b, equalsItem) {
56
+ const aLength = a.length;
57
+ const bLength = b.length;
58
+ if (aLength !== bLength) {
59
+ return false;
60
+ }
61
+ for (let i = 0; i < aLength; i++) {
62
+ if (equalsItem(a[i], b[i]) === false) {
63
+ return false;
64
+ }
65
+ }
66
+ return true;
67
+ }
68
+ function deepFreeze(value) {
69
+ // No need to freeze primitives
70
+ if (typeof value !== 'object' || value === null) {
71
+ return;
72
+ }
73
+ if (ArrayIsArray(value)) {
74
+ for (let i = 0, len = value.length; i < len; i += 1) {
75
+ deepFreeze(value[i]);
76
+ }
77
+ }
78
+ else {
79
+ const keys = ObjectKeys(value);
80
+ for (let i = 0, len = keys.length; i < len; i += 1) {
81
+ deepFreeze(value[keys[i]]);
82
+ }
83
+ }
84
+ ObjectFreeze(value);
85
+ }
86
+ function createLink(ref) {
87
+ return {
88
+ __ref: serializeStructuredKey(ref),
89
+ };
90
90
  }
91
91
 
92
- const TTL$4 = 3600000;
93
- const VERSION$5 = "4972d9e3ead7c764617c098f7cdf912c";
94
- function validate$6(obj, path = 'ManagedContentOrchestrationDefinitionRepresentation') {
95
- const v_error = (() => {
96
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
97
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
98
- }
99
- const obj_definitionId = obj.definitionId;
100
- const path_definitionId = path + '.definitionId';
101
- if (typeof obj_definitionId !== 'string') {
102
- return new TypeError('Expected "string" but received "' + typeof obj_definitionId + '" (at "' + path_definitionId + '")');
103
- }
104
- const obj_description = obj.description;
105
- const path_description = path + '.description';
106
- let obj_description_union0 = null;
107
- const obj_description_union0_error = (() => {
108
- if (typeof obj_description !== 'string') {
109
- return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
110
- }
111
- })();
112
- if (obj_description_union0_error != null) {
113
- obj_description_union0 = obj_description_union0_error.message;
114
- }
115
- let obj_description_union1 = null;
116
- const obj_description_union1_error = (() => {
117
- if (obj_description !== null) {
118
- return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
119
- }
120
- })();
121
- if (obj_description_union1_error != null) {
122
- obj_description_union1 = obj_description_union1_error.message;
123
- }
124
- if (obj_description_union0 && obj_description_union1) {
125
- let message = 'Object doesn\'t match union (at "' + path_description + '")';
126
- message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
127
- message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
128
- return new TypeError(message);
129
- }
130
- const obj_developerName = obj.developerName;
131
- const path_developerName = path + '.developerName';
132
- if (typeof obj_developerName !== 'string') {
133
- return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
134
- }
135
- const obj_label = obj.label;
136
- const path_label = path + '.label';
137
- if (typeof obj_label !== 'string') {
138
- return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
139
- }
140
- const obj_versionId = obj.versionId;
141
- const path_versionId = path + '.versionId';
142
- if (typeof obj_versionId !== 'string') {
143
- return new TypeError('Expected "string" but received "' + typeof obj_versionId + '" (at "' + path_versionId + '")');
144
- }
145
- })();
146
- return v_error === undefined ? null : v_error;
147
- }
148
- const RepresentationType$4 = 'ManagedContentOrchestrationDefinitionRepresentation';
149
- function keyBuilder$7(luvio, config) {
150
- return keyPrefix + '::' + RepresentationType$4 + ':' + config.id;
151
- }
152
- function keyBuilderFromType$1(luvio, object) {
153
- const keyParams = {
154
- id: object.developerName
155
- };
156
- return keyBuilder$7(luvio, keyParams);
157
- }
158
- function normalize$4(input, existing, path, luvio, store, timestamp) {
159
- return input;
160
- }
161
- const select$9 = function ManagedContentOrchestrationDefinitionRepresentationSelect() {
162
- return {
163
- kind: 'Fragment',
164
- version: VERSION$5,
165
- private: [],
166
- selections: [
167
- {
168
- name: 'definitionId',
169
- kind: 'Scalar'
170
- },
171
- {
172
- name: 'description',
173
- kind: 'Scalar'
174
- },
175
- {
176
- name: 'developerName',
177
- kind: 'Scalar'
178
- },
179
- {
180
- name: 'label',
181
- kind: 'Scalar'
182
- },
183
- {
184
- name: 'versionId',
185
- kind: 'Scalar'
186
- }
187
- ]
188
- };
189
- };
190
- function equals$5(existing, incoming) {
191
- const existing_definitionId = existing.definitionId;
192
- const incoming_definitionId = incoming.definitionId;
193
- if (!(existing_definitionId === incoming_definitionId)) {
194
- return false;
195
- }
196
- const existing_developerName = existing.developerName;
197
- const incoming_developerName = incoming.developerName;
198
- if (!(existing_developerName === incoming_developerName)) {
199
- return false;
200
- }
201
- const existing_label = existing.label;
202
- const incoming_label = incoming.label;
203
- if (!(existing_label === incoming_label)) {
204
- return false;
205
- }
206
- const existing_versionId = existing.versionId;
207
- const incoming_versionId = incoming.versionId;
208
- if (!(existing_versionId === incoming_versionId)) {
209
- return false;
210
- }
211
- const existing_description = existing.description;
212
- const incoming_description = incoming.description;
213
- if (!(existing_description === incoming_description)) {
214
- return false;
215
- }
216
- return true;
217
- }
218
- const ingest$4 = function ManagedContentOrchestrationDefinitionRepresentationIngest(input, path, luvio, store, timestamp) {
219
- if (process.env.NODE_ENV !== 'production') {
220
- const validateError = validate$6(input);
221
- if (validateError !== null) {
222
- throw validateError;
223
- }
224
- }
225
- const key = keyBuilderFromType$1(luvio, input);
226
- const existingRecord = store.readEntry(key);
227
- const ttlToUse = TTL$4;
228
- let incomingRecord = normalize$4(input, store.readEntry(key), {
229
- fullPath: key,
230
- parent: path.parent,
231
- propertyName: path.propertyName,
232
- ttl: ttlToUse
233
- });
234
- if (existingRecord === undefined || equals$5(existingRecord, incomingRecord) === false) {
235
- luvio.storePublish(key, incomingRecord);
236
- }
237
- {
238
- const storeMetadataParams = {
239
- ttl: ttlToUse,
240
- namespace: "CMSOrchestrator",
241
- version: VERSION$5,
242
- representationName: RepresentationType$4,
243
- };
244
- luvio.publishStoreMetadata(key, storeMetadataParams);
245
- }
246
- return createLink(key);
247
- };
248
- function getTypeCacheKeys$4(luvio, input, fullPathFactory) {
249
- const rootKeySet = new StoreKeyMap();
250
- // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
251
- const rootKey = keyBuilderFromType$1(luvio, input);
252
- rootKeySet.set(rootKey, {
253
- namespace: keyPrefix,
254
- representationName: RepresentationType$4,
255
- mergeable: false
256
- });
257
- return rootKeySet;
92
+ const TTL$4 = 3600000;
93
+ const VERSION$5 = "4972d9e3ead7c764617c098f7cdf912c";
94
+ function validate$6(obj, path = 'ManagedContentOrchestrationDefinitionRepresentation') {
95
+ const v_error = (() => {
96
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
97
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
98
+ }
99
+ const obj_definitionId = obj.definitionId;
100
+ const path_definitionId = path + '.definitionId';
101
+ if (typeof obj_definitionId !== 'string') {
102
+ return new TypeError('Expected "string" but received "' + typeof obj_definitionId + '" (at "' + path_definitionId + '")');
103
+ }
104
+ const obj_description = obj.description;
105
+ const path_description = path + '.description';
106
+ let obj_description_union0 = null;
107
+ const obj_description_union0_error = (() => {
108
+ if (typeof obj_description !== 'string') {
109
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
110
+ }
111
+ })();
112
+ if (obj_description_union0_error != null) {
113
+ obj_description_union0 = obj_description_union0_error.message;
114
+ }
115
+ let obj_description_union1 = null;
116
+ const obj_description_union1_error = (() => {
117
+ if (obj_description !== null) {
118
+ return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
119
+ }
120
+ })();
121
+ if (obj_description_union1_error != null) {
122
+ obj_description_union1 = obj_description_union1_error.message;
123
+ }
124
+ if (obj_description_union0 && obj_description_union1) {
125
+ let message = 'Object doesn\'t match union (at "' + path_description + '")';
126
+ message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
127
+ message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
128
+ return new TypeError(message);
129
+ }
130
+ const obj_developerName = obj.developerName;
131
+ const path_developerName = path + '.developerName';
132
+ if (typeof obj_developerName !== 'string') {
133
+ return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
134
+ }
135
+ const obj_label = obj.label;
136
+ const path_label = path + '.label';
137
+ if (typeof obj_label !== 'string') {
138
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
139
+ }
140
+ const obj_versionId = obj.versionId;
141
+ const path_versionId = path + '.versionId';
142
+ if (typeof obj_versionId !== 'string') {
143
+ return new TypeError('Expected "string" but received "' + typeof obj_versionId + '" (at "' + path_versionId + '")');
144
+ }
145
+ })();
146
+ return v_error === undefined ? null : v_error;
147
+ }
148
+ const RepresentationType$4 = 'ManagedContentOrchestrationDefinitionRepresentation';
149
+ function keyBuilder$7(luvio, config) {
150
+ return keyPrefix + '::' + RepresentationType$4 + ':' + config.id;
151
+ }
152
+ function keyBuilderFromType$1(luvio, object) {
153
+ const keyParams = {
154
+ id: object.developerName
155
+ };
156
+ return keyBuilder$7(luvio, keyParams);
157
+ }
158
+ function normalize$4(input, existing, path, luvio, store, timestamp) {
159
+ return input;
160
+ }
161
+ const select$9 = function ManagedContentOrchestrationDefinitionRepresentationSelect() {
162
+ return {
163
+ kind: 'Fragment',
164
+ version: VERSION$5,
165
+ private: [],
166
+ selections: [
167
+ {
168
+ name: 'definitionId',
169
+ kind: 'Scalar'
170
+ },
171
+ {
172
+ name: 'description',
173
+ kind: 'Scalar'
174
+ },
175
+ {
176
+ name: 'developerName',
177
+ kind: 'Scalar'
178
+ },
179
+ {
180
+ name: 'label',
181
+ kind: 'Scalar'
182
+ },
183
+ {
184
+ name: 'versionId',
185
+ kind: 'Scalar'
186
+ }
187
+ ]
188
+ };
189
+ };
190
+ function equals$5(existing, incoming) {
191
+ const existing_definitionId = existing.definitionId;
192
+ const incoming_definitionId = incoming.definitionId;
193
+ if (!(existing_definitionId === incoming_definitionId)) {
194
+ return false;
195
+ }
196
+ const existing_developerName = existing.developerName;
197
+ const incoming_developerName = incoming.developerName;
198
+ if (!(existing_developerName === incoming_developerName)) {
199
+ return false;
200
+ }
201
+ const existing_label = existing.label;
202
+ const incoming_label = incoming.label;
203
+ if (!(existing_label === incoming_label)) {
204
+ return false;
205
+ }
206
+ const existing_versionId = existing.versionId;
207
+ const incoming_versionId = incoming.versionId;
208
+ if (!(existing_versionId === incoming_versionId)) {
209
+ return false;
210
+ }
211
+ const existing_description = existing.description;
212
+ const incoming_description = incoming.description;
213
+ if (!(existing_description === incoming_description)) {
214
+ return false;
215
+ }
216
+ return true;
217
+ }
218
+ const ingest$4 = function ManagedContentOrchestrationDefinitionRepresentationIngest(input, path, luvio, store, timestamp) {
219
+ if (process.env.NODE_ENV !== 'production') {
220
+ const validateError = validate$6(input);
221
+ if (validateError !== null) {
222
+ throw validateError;
223
+ }
224
+ }
225
+ const key = keyBuilderFromType$1(luvio, input);
226
+ const existingRecord = store.readEntry(key);
227
+ const ttlToUse = TTL$4;
228
+ let incomingRecord = normalize$4(input, store.readEntry(key), {
229
+ fullPath: key,
230
+ parent: path.parent,
231
+ propertyName: path.propertyName,
232
+ ttl: ttlToUse
233
+ });
234
+ if (existingRecord === undefined || equals$5(existingRecord, incomingRecord) === false) {
235
+ luvio.storePublish(key, incomingRecord);
236
+ }
237
+ {
238
+ const storeMetadataParams = {
239
+ ttl: ttlToUse,
240
+ namespace: "CMSOrchestrator",
241
+ version: VERSION$5,
242
+ representationName: RepresentationType$4,
243
+ };
244
+ luvio.publishStoreMetadata(key, storeMetadataParams);
245
+ }
246
+ return createLink(key);
247
+ };
248
+ function getTypeCacheKeys$4(luvio, input, fullPathFactory) {
249
+ const rootKeySet = new StoreKeyMap();
250
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
251
+ const rootKey = keyBuilderFromType$1(luvio, input);
252
+ rootKeySet.set(rootKey, {
253
+ namespace: keyPrefix,
254
+ representationName: RepresentationType$4,
255
+ mergeable: false
256
+ });
257
+ return rootKeySet;
258
258
  }
259
259
 
260
- const TTL$3 = 3600000;
261
- const VERSION$4 = "d2a7fad15081fd4cd737c942d3e7e5a7";
262
- function validate$5(obj, path = 'ManagedContentOrchestrationDefinitionCollectionRepresentation') {
263
- const v_error = (() => {
264
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
265
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
266
- }
267
- const obj_currentPageUri = obj.currentPageUri;
268
- const path_currentPageUri = path + '.currentPageUri';
269
- if (typeof obj_currentPageUri !== 'string') {
270
- return new TypeError('Expected "string" but received "' + typeof obj_currentPageUri + '" (at "' + path_currentPageUri + '")');
271
- }
272
- const obj_nextPageUri = obj.nextPageUri;
273
- const path_nextPageUri = path + '.nextPageUri';
274
- let obj_nextPageUri_union0 = null;
275
- const obj_nextPageUri_union0_error = (() => {
276
- if (typeof obj_nextPageUri !== 'string') {
277
- return new TypeError('Expected "string" but received "' + typeof obj_nextPageUri + '" (at "' + path_nextPageUri + '")');
278
- }
279
- })();
280
- if (obj_nextPageUri_union0_error != null) {
281
- obj_nextPageUri_union0 = obj_nextPageUri_union0_error.message;
282
- }
283
- let obj_nextPageUri_union1 = null;
284
- const obj_nextPageUri_union1_error = (() => {
285
- if (obj_nextPageUri !== null) {
286
- return new TypeError('Expected "null" but received "' + typeof obj_nextPageUri + '" (at "' + path_nextPageUri + '")');
287
- }
288
- })();
289
- if (obj_nextPageUri_union1_error != null) {
290
- obj_nextPageUri_union1 = obj_nextPageUri_union1_error.message;
291
- }
292
- if (obj_nextPageUri_union0 && obj_nextPageUri_union1) {
293
- let message = 'Object doesn\'t match union (at "' + path_nextPageUri + '")';
294
- message += '\n' + obj_nextPageUri_union0.split('\n').map((line) => '\t' + line).join('\n');
295
- message += '\n' + obj_nextPageUri_union1.split('\n').map((line) => '\t' + line).join('\n');
296
- return new TypeError(message);
297
- }
298
- const obj_orchestrationDefinitions = obj.orchestrationDefinitions;
299
- const path_orchestrationDefinitions = path + '.orchestrationDefinitions';
300
- if (!ArrayIsArray(obj_orchestrationDefinitions)) {
301
- return new TypeError('Expected "array" but received "' + typeof obj_orchestrationDefinitions + '" (at "' + path_orchestrationDefinitions + '")');
302
- }
303
- for (let i = 0; i < obj_orchestrationDefinitions.length; i++) {
304
- const obj_orchestrationDefinitions_item = obj_orchestrationDefinitions[i];
305
- const path_orchestrationDefinitions_item = path_orchestrationDefinitions + '[' + i + ']';
306
- if (typeof obj_orchestrationDefinitions_item !== 'object') {
307
- return new TypeError('Expected "object" but received "' + typeof obj_orchestrationDefinitions_item + '" (at "' + path_orchestrationDefinitions_item + '")');
308
- }
309
- }
310
- const obj_previousPageUri = obj.previousPageUri;
311
- const path_previousPageUri = path + '.previousPageUri';
312
- let obj_previousPageUri_union0 = null;
313
- const obj_previousPageUri_union0_error = (() => {
314
- if (typeof obj_previousPageUri !== 'string') {
315
- return new TypeError('Expected "string" but received "' + typeof obj_previousPageUri + '" (at "' + path_previousPageUri + '")');
316
- }
317
- })();
318
- if (obj_previousPageUri_union0_error != null) {
319
- obj_previousPageUri_union0 = obj_previousPageUri_union0_error.message;
320
- }
321
- let obj_previousPageUri_union1 = null;
322
- const obj_previousPageUri_union1_error = (() => {
323
- if (obj_previousPageUri !== null) {
324
- return new TypeError('Expected "null" but received "' + typeof obj_previousPageUri + '" (at "' + path_previousPageUri + '")');
325
- }
326
- })();
327
- if (obj_previousPageUri_union1_error != null) {
328
- obj_previousPageUri_union1 = obj_previousPageUri_union1_error.message;
329
- }
330
- if (obj_previousPageUri_union0 && obj_previousPageUri_union1) {
331
- let message = 'Object doesn\'t match union (at "' + path_previousPageUri + '")';
332
- message += '\n' + obj_previousPageUri_union0.split('\n').map((line) => '\t' + line).join('\n');
333
- message += '\n' + obj_previousPageUri_union1.split('\n').map((line) => '\t' + line).join('\n');
334
- return new TypeError(message);
335
- }
336
- const obj_totalDefinitions = obj.totalDefinitions;
337
- const path_totalDefinitions = path + '.totalDefinitions';
338
- if (typeof obj_totalDefinitions !== 'number' || (typeof obj_totalDefinitions === 'number' && Math.floor(obj_totalDefinitions) !== obj_totalDefinitions)) {
339
- return new TypeError('Expected "integer" but received "' + typeof obj_totalDefinitions + '" (at "' + path_totalDefinitions + '")');
340
- }
341
- })();
342
- return v_error === undefined ? null : v_error;
343
- }
344
- const RepresentationType$3 = 'ManagedContentOrchestrationDefinitionCollectionRepresentation';
345
- function normalize$3(input, existing, path, luvio, store, timestamp) {
346
- const input_orchestrationDefinitions = input.orchestrationDefinitions;
347
- const input_orchestrationDefinitions_id = path.fullPath + '__orchestrationDefinitions';
348
- for (let i = 0; i < input_orchestrationDefinitions.length; i++) {
349
- const input_orchestrationDefinitions_item = input_orchestrationDefinitions[i];
350
- let input_orchestrationDefinitions_item_id = input_orchestrationDefinitions_id + '__' + i;
351
- input_orchestrationDefinitions[i] = ingest$4(input_orchestrationDefinitions_item, {
352
- fullPath: input_orchestrationDefinitions_item_id,
353
- propertyName: i,
354
- parent: {
355
- data: input,
356
- key: path.fullPath,
357
- existing: existing,
358
- },
359
- ttl: path.ttl
360
- }, luvio, store);
361
- }
362
- return input;
363
- }
364
- const select$8 = function ManagedContentOrchestrationDefinitionCollectionRepresentationSelect() {
365
- return {
366
- kind: 'Fragment',
367
- version: VERSION$4,
368
- private: [],
369
- selections: [
370
- {
371
- name: 'currentPageUri',
372
- kind: 'Scalar'
373
- },
374
- {
375
- name: 'nextPageUri',
376
- kind: 'Scalar'
377
- },
378
- {
379
- name: 'orchestrationDefinitions',
380
- kind: 'Link',
381
- plural: true,
382
- fragment: select$9()
383
- },
384
- {
385
- name: 'previousPageUri',
386
- kind: 'Scalar'
387
- },
388
- {
389
- name: 'totalDefinitions',
390
- kind: 'Scalar'
391
- }
392
- ]
393
- };
394
- };
395
- function equals$4(existing, incoming) {
396
- const existing_totalDefinitions = existing.totalDefinitions;
397
- const incoming_totalDefinitions = incoming.totalDefinitions;
398
- if (!(existing_totalDefinitions === incoming_totalDefinitions)) {
399
- return false;
400
- }
401
- const existing_currentPageUri = existing.currentPageUri;
402
- const incoming_currentPageUri = incoming.currentPageUri;
403
- if (!(existing_currentPageUri === incoming_currentPageUri)) {
404
- return false;
405
- }
406
- const existing_nextPageUri = existing.nextPageUri;
407
- const incoming_nextPageUri = incoming.nextPageUri;
408
- if (!(existing_nextPageUri === incoming_nextPageUri)) {
409
- return false;
410
- }
411
- const existing_orchestrationDefinitions = existing.orchestrationDefinitions;
412
- const incoming_orchestrationDefinitions = incoming.orchestrationDefinitions;
413
- const equals_orchestrationDefinitions_items = equalsArray(existing_orchestrationDefinitions, incoming_orchestrationDefinitions, (existing_orchestrationDefinitions_item, incoming_orchestrationDefinitions_item) => {
414
- if (!(existing_orchestrationDefinitions_item.__ref === incoming_orchestrationDefinitions_item.__ref)) {
415
- return false;
416
- }
417
- });
418
- if (equals_orchestrationDefinitions_items === false) {
419
- return false;
420
- }
421
- const existing_previousPageUri = existing.previousPageUri;
422
- const incoming_previousPageUri = incoming.previousPageUri;
423
- if (!(existing_previousPageUri === incoming_previousPageUri)) {
424
- return false;
425
- }
426
- return true;
427
- }
428
- const ingest$3 = function ManagedContentOrchestrationDefinitionCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
429
- if (process.env.NODE_ENV !== 'production') {
430
- const validateError = validate$5(input);
431
- if (validateError !== null) {
432
- throw validateError;
433
- }
434
- }
435
- const key = path.fullPath;
436
- const existingRecord = store.readEntry(key);
437
- const ttlToUse = TTL$3;
438
- let incomingRecord = normalize$3(input, store.readEntry(key), {
439
- fullPath: key,
440
- parent: path.parent,
441
- propertyName: path.propertyName,
442
- ttl: ttlToUse
443
- }, luvio, store);
444
- if (existingRecord === undefined || equals$4(existingRecord, incomingRecord) === false) {
445
- luvio.storePublish(key, incomingRecord);
446
- }
447
- {
448
- const storeMetadataParams = {
449
- ttl: ttlToUse,
450
- namespace: "CMSOrchestrator",
451
- version: VERSION$4,
452
- representationName: RepresentationType$3,
453
- };
454
- luvio.publishStoreMetadata(key, storeMetadataParams);
455
- }
456
- return createLink(key);
457
- };
458
- function getTypeCacheKeys$3(luvio, input, fullPathFactory) {
459
- const rootKeySet = new StoreKeyMap();
460
- // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
461
- const rootKey = fullPathFactory();
462
- rootKeySet.set(rootKey, {
463
- namespace: keyPrefix,
464
- representationName: RepresentationType$3,
465
- mergeable: false
466
- });
467
- const input_orchestrationDefinitions_length = input.orchestrationDefinitions.length;
468
- for (let i = 0; i < input_orchestrationDefinitions_length; i++) {
469
- rootKeySet.merge(getTypeCacheKeys$4(luvio, input.orchestrationDefinitions[i]));
470
- }
471
- return rootKeySet;
260
+ const TTL$3 = 3600000;
261
+ const VERSION$4 = "d2a7fad15081fd4cd737c942d3e7e5a7";
262
+ function validate$5(obj, path = 'ManagedContentOrchestrationDefinitionCollectionRepresentation') {
263
+ const v_error = (() => {
264
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
265
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
266
+ }
267
+ const obj_currentPageUri = obj.currentPageUri;
268
+ const path_currentPageUri = path + '.currentPageUri';
269
+ if (typeof obj_currentPageUri !== 'string') {
270
+ return new TypeError('Expected "string" but received "' + typeof obj_currentPageUri + '" (at "' + path_currentPageUri + '")');
271
+ }
272
+ const obj_nextPageUri = obj.nextPageUri;
273
+ const path_nextPageUri = path + '.nextPageUri';
274
+ let obj_nextPageUri_union0 = null;
275
+ const obj_nextPageUri_union0_error = (() => {
276
+ if (typeof obj_nextPageUri !== 'string') {
277
+ return new TypeError('Expected "string" but received "' + typeof obj_nextPageUri + '" (at "' + path_nextPageUri + '")');
278
+ }
279
+ })();
280
+ if (obj_nextPageUri_union0_error != null) {
281
+ obj_nextPageUri_union0 = obj_nextPageUri_union0_error.message;
282
+ }
283
+ let obj_nextPageUri_union1 = null;
284
+ const obj_nextPageUri_union1_error = (() => {
285
+ if (obj_nextPageUri !== null) {
286
+ return new TypeError('Expected "null" but received "' + typeof obj_nextPageUri + '" (at "' + path_nextPageUri + '")');
287
+ }
288
+ })();
289
+ if (obj_nextPageUri_union1_error != null) {
290
+ obj_nextPageUri_union1 = obj_nextPageUri_union1_error.message;
291
+ }
292
+ if (obj_nextPageUri_union0 && obj_nextPageUri_union1) {
293
+ let message = 'Object doesn\'t match union (at "' + path_nextPageUri + '")';
294
+ message += '\n' + obj_nextPageUri_union0.split('\n').map((line) => '\t' + line).join('\n');
295
+ message += '\n' + obj_nextPageUri_union1.split('\n').map((line) => '\t' + line).join('\n');
296
+ return new TypeError(message);
297
+ }
298
+ const obj_orchestrationDefinitions = obj.orchestrationDefinitions;
299
+ const path_orchestrationDefinitions = path + '.orchestrationDefinitions';
300
+ if (!ArrayIsArray(obj_orchestrationDefinitions)) {
301
+ return new TypeError('Expected "array" but received "' + typeof obj_orchestrationDefinitions + '" (at "' + path_orchestrationDefinitions + '")');
302
+ }
303
+ for (let i = 0; i < obj_orchestrationDefinitions.length; i++) {
304
+ const obj_orchestrationDefinitions_item = obj_orchestrationDefinitions[i];
305
+ const path_orchestrationDefinitions_item = path_orchestrationDefinitions + '[' + i + ']';
306
+ if (typeof obj_orchestrationDefinitions_item !== 'object') {
307
+ return new TypeError('Expected "object" but received "' + typeof obj_orchestrationDefinitions_item + '" (at "' + path_orchestrationDefinitions_item + '")');
308
+ }
309
+ }
310
+ const obj_previousPageUri = obj.previousPageUri;
311
+ const path_previousPageUri = path + '.previousPageUri';
312
+ let obj_previousPageUri_union0 = null;
313
+ const obj_previousPageUri_union0_error = (() => {
314
+ if (typeof obj_previousPageUri !== 'string') {
315
+ return new TypeError('Expected "string" but received "' + typeof obj_previousPageUri + '" (at "' + path_previousPageUri + '")');
316
+ }
317
+ })();
318
+ if (obj_previousPageUri_union0_error != null) {
319
+ obj_previousPageUri_union0 = obj_previousPageUri_union0_error.message;
320
+ }
321
+ let obj_previousPageUri_union1 = null;
322
+ const obj_previousPageUri_union1_error = (() => {
323
+ if (obj_previousPageUri !== null) {
324
+ return new TypeError('Expected "null" but received "' + typeof obj_previousPageUri + '" (at "' + path_previousPageUri + '")');
325
+ }
326
+ })();
327
+ if (obj_previousPageUri_union1_error != null) {
328
+ obj_previousPageUri_union1 = obj_previousPageUri_union1_error.message;
329
+ }
330
+ if (obj_previousPageUri_union0 && obj_previousPageUri_union1) {
331
+ let message = 'Object doesn\'t match union (at "' + path_previousPageUri + '")';
332
+ message += '\n' + obj_previousPageUri_union0.split('\n').map((line) => '\t' + line).join('\n');
333
+ message += '\n' + obj_previousPageUri_union1.split('\n').map((line) => '\t' + line).join('\n');
334
+ return new TypeError(message);
335
+ }
336
+ const obj_totalDefinitions = obj.totalDefinitions;
337
+ const path_totalDefinitions = path + '.totalDefinitions';
338
+ if (typeof obj_totalDefinitions !== 'number' || (typeof obj_totalDefinitions === 'number' && Math.floor(obj_totalDefinitions) !== obj_totalDefinitions)) {
339
+ return new TypeError('Expected "integer" but received "' + typeof obj_totalDefinitions + '" (at "' + path_totalDefinitions + '")');
340
+ }
341
+ })();
342
+ return v_error === undefined ? null : v_error;
343
+ }
344
+ const RepresentationType$3 = 'ManagedContentOrchestrationDefinitionCollectionRepresentation';
345
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
346
+ const input_orchestrationDefinitions = input.orchestrationDefinitions;
347
+ const input_orchestrationDefinitions_id = path.fullPath + '__orchestrationDefinitions';
348
+ for (let i = 0; i < input_orchestrationDefinitions.length; i++) {
349
+ const input_orchestrationDefinitions_item = input_orchestrationDefinitions[i];
350
+ let input_orchestrationDefinitions_item_id = input_orchestrationDefinitions_id + '__' + i;
351
+ input_orchestrationDefinitions[i] = ingest$4(input_orchestrationDefinitions_item, {
352
+ fullPath: input_orchestrationDefinitions_item_id,
353
+ propertyName: i,
354
+ parent: {
355
+ data: input,
356
+ key: path.fullPath,
357
+ existing: existing,
358
+ },
359
+ ttl: path.ttl
360
+ }, luvio, store);
361
+ }
362
+ return input;
363
+ }
364
+ const select$8 = function ManagedContentOrchestrationDefinitionCollectionRepresentationSelect() {
365
+ return {
366
+ kind: 'Fragment',
367
+ version: VERSION$4,
368
+ private: [],
369
+ selections: [
370
+ {
371
+ name: 'currentPageUri',
372
+ kind: 'Scalar'
373
+ },
374
+ {
375
+ name: 'nextPageUri',
376
+ kind: 'Scalar'
377
+ },
378
+ {
379
+ name: 'orchestrationDefinitions',
380
+ kind: 'Link',
381
+ plural: true,
382
+ fragment: select$9()
383
+ },
384
+ {
385
+ name: 'previousPageUri',
386
+ kind: 'Scalar'
387
+ },
388
+ {
389
+ name: 'totalDefinitions',
390
+ kind: 'Scalar'
391
+ }
392
+ ]
393
+ };
394
+ };
395
+ function equals$4(existing, incoming) {
396
+ const existing_totalDefinitions = existing.totalDefinitions;
397
+ const incoming_totalDefinitions = incoming.totalDefinitions;
398
+ if (!(existing_totalDefinitions === incoming_totalDefinitions)) {
399
+ return false;
400
+ }
401
+ const existing_currentPageUri = existing.currentPageUri;
402
+ const incoming_currentPageUri = incoming.currentPageUri;
403
+ if (!(existing_currentPageUri === incoming_currentPageUri)) {
404
+ return false;
405
+ }
406
+ const existing_nextPageUri = existing.nextPageUri;
407
+ const incoming_nextPageUri = incoming.nextPageUri;
408
+ if (!(existing_nextPageUri === incoming_nextPageUri)) {
409
+ return false;
410
+ }
411
+ const existing_orchestrationDefinitions = existing.orchestrationDefinitions;
412
+ const incoming_orchestrationDefinitions = incoming.orchestrationDefinitions;
413
+ const equals_orchestrationDefinitions_items = equalsArray(existing_orchestrationDefinitions, incoming_orchestrationDefinitions, (existing_orchestrationDefinitions_item, incoming_orchestrationDefinitions_item) => {
414
+ if (!(existing_orchestrationDefinitions_item.__ref === incoming_orchestrationDefinitions_item.__ref)) {
415
+ return false;
416
+ }
417
+ });
418
+ if (equals_orchestrationDefinitions_items === false) {
419
+ return false;
420
+ }
421
+ const existing_previousPageUri = existing.previousPageUri;
422
+ const incoming_previousPageUri = incoming.previousPageUri;
423
+ if (!(existing_previousPageUri === incoming_previousPageUri)) {
424
+ return false;
425
+ }
426
+ return true;
427
+ }
428
+ const ingest$3 = function ManagedContentOrchestrationDefinitionCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
429
+ if (process.env.NODE_ENV !== 'production') {
430
+ const validateError = validate$5(input);
431
+ if (validateError !== null) {
432
+ throw validateError;
433
+ }
434
+ }
435
+ const key = path.fullPath;
436
+ const existingRecord = store.readEntry(key);
437
+ const ttlToUse = TTL$3;
438
+ let incomingRecord = normalize$3(input, store.readEntry(key), {
439
+ fullPath: key,
440
+ parent: path.parent,
441
+ propertyName: path.propertyName,
442
+ ttl: ttlToUse
443
+ }, luvio, store);
444
+ if (existingRecord === undefined || equals$4(existingRecord, incomingRecord) === false) {
445
+ luvio.storePublish(key, incomingRecord);
446
+ }
447
+ {
448
+ const storeMetadataParams = {
449
+ ttl: ttlToUse,
450
+ namespace: "CMSOrchestrator",
451
+ version: VERSION$4,
452
+ representationName: RepresentationType$3,
453
+ };
454
+ luvio.publishStoreMetadata(key, storeMetadataParams);
455
+ }
456
+ return createLink(key);
457
+ };
458
+ function getTypeCacheKeys$3(luvio, input, fullPathFactory) {
459
+ const rootKeySet = new StoreKeyMap();
460
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
461
+ const rootKey = fullPathFactory();
462
+ rootKeySet.set(rootKey, {
463
+ namespace: keyPrefix,
464
+ representationName: RepresentationType$3,
465
+ mergeable: false
466
+ });
467
+ const input_orchestrationDefinitions_length = input.orchestrationDefinitions.length;
468
+ for (let i = 0; i < input_orchestrationDefinitions_length; i++) {
469
+ rootKeySet.merge(getTypeCacheKeys$4(luvio, input.orchestrationDefinitions[i]));
470
+ }
471
+ return rootKeySet;
472
472
  }
473
473
 
474
- function select$7(luvio, params) {
475
- return select$8();
476
- }
477
- function keyBuilder$6(luvio, params) {
478
- return keyPrefix + '::ManagedContentOrchestrationDefinitionCollectionRepresentation:(' + 'managedContentVariantId:' + params.queryParams.managedContentVariantId + ',' + 'page:' + params.queryParams.page + ',' + 'pageSize:' + params.queryParams.pageSize + ')';
479
- }
480
- function getResponseCacheKeys$3(luvio, resourceParams, response) {
481
- return getTypeCacheKeys$3(luvio, response, () => keyBuilder$6(luvio, resourceParams));
482
- }
483
- function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
484
- const { body } = response;
485
- const key = keyBuilder$6(luvio, resourceParams);
486
- luvio.storeIngest(key, ingest$3, body);
487
- const snapshot = luvio.storeLookup({
488
- recordId: key,
489
- node: select$7(),
490
- variables: {},
491
- }, snapshotRefresh);
492
- if (process.env.NODE_ENV !== 'production') {
493
- if (snapshot.state !== 'Fulfilled') {
494
- throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
495
- }
496
- }
497
- return snapshot;
498
- }
499
- function ingestError$2(luvio, params, error, snapshotRefresh) {
500
- const key = keyBuilder$6(luvio, params);
501
- const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
502
- const storeMetadataParams = {
503
- ttl: TTL$3,
504
- namespace: keyPrefix,
505
- version: VERSION$4,
506
- representationName: RepresentationType$3
507
- };
508
- luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
509
- return errorSnapshot;
510
- }
511
- function createResourceRequest$3(config) {
512
- const headers = {};
513
- return {
514
- baseUri: '/services/data/v58.0',
515
- basePath: '/connect/cms/contents/orchestration-definitions',
516
- method: 'get',
517
- body: null,
518
- urlParams: {},
519
- queryParams: config.queryParams,
520
- headers,
521
- priority: 'normal',
522
- };
474
+ function select$7(luvio, params) {
475
+ return select$8();
476
+ }
477
+ function keyBuilder$6(luvio, params) {
478
+ return keyPrefix + '::ManagedContentOrchestrationDefinitionCollectionRepresentation:(' + 'managedContentVariantId:' + params.queryParams.managedContentVariantId + ',' + 'page:' + params.queryParams.page + ',' + 'pageSize:' + params.queryParams.pageSize + ')';
479
+ }
480
+ function getResponseCacheKeys$3(luvio, resourceParams, response) {
481
+ return getTypeCacheKeys$3(luvio, response, () => keyBuilder$6(luvio, resourceParams));
482
+ }
483
+ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
484
+ const { body } = response;
485
+ const key = keyBuilder$6(luvio, resourceParams);
486
+ luvio.storeIngest(key, ingest$3, body);
487
+ const snapshot = luvio.storeLookup({
488
+ recordId: key,
489
+ node: select$7(),
490
+ variables: {},
491
+ }, snapshotRefresh);
492
+ if (process.env.NODE_ENV !== 'production') {
493
+ if (snapshot.state !== 'Fulfilled') {
494
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
495
+ }
496
+ }
497
+ return snapshot;
498
+ }
499
+ function ingestError$2(luvio, params, error, snapshotRefresh) {
500
+ const key = keyBuilder$6(luvio, params);
501
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
502
+ const storeMetadataParams = {
503
+ ttl: TTL$3,
504
+ namespace: keyPrefix,
505
+ version: VERSION$4,
506
+ representationName: RepresentationType$3
507
+ };
508
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
509
+ return errorSnapshot;
510
+ }
511
+ function createResourceRequest$3(config) {
512
+ const headers = {};
513
+ return {
514
+ baseUri: '/services/data/v58.0',
515
+ basePath: '/connect/cms/contents/orchestration-definitions',
516
+ method: 'get',
517
+ body: null,
518
+ urlParams: {},
519
+ queryParams: config.queryParams,
520
+ headers,
521
+ priority: 'normal',
522
+ };
523
523
  }
524
524
 
525
- const getManagedContentOrchestrationDefinitions_ConfigPropertyNames = {
526
- displayName: 'getManagedContentOrchestrationDefinitions',
527
- parameters: {
528
- required: [],
529
- optional: ['managedContentVariantId', 'page', 'pageSize']
530
- }
531
- };
532
- function createResourceParams$3(config) {
533
- const resourceParams = {
534
- queryParams: {
535
- managedContentVariantId: config.managedContentVariantId, page: config.page, pageSize: config.pageSize
536
- }
537
- };
538
- return resourceParams;
539
- }
540
- function keyBuilder$5(luvio, config) {
541
- const resourceParams = createResourceParams$3(config);
542
- return keyBuilder$6(luvio, resourceParams);
543
- }
544
- function typeCheckConfig$3(untrustedConfig) {
545
- const config = {};
546
- const untrustedConfig_managedContentVariantId = untrustedConfig.managedContentVariantId;
547
- if (typeof untrustedConfig_managedContentVariantId === 'string') {
548
- config.managedContentVariantId = untrustedConfig_managedContentVariantId;
549
- }
550
- const untrustedConfig_page = untrustedConfig.page;
551
- if (typeof untrustedConfig_page === 'number' && Math.floor(untrustedConfig_page) === untrustedConfig_page) {
552
- config.page = untrustedConfig_page;
553
- }
554
- const untrustedConfig_pageSize = untrustedConfig.pageSize;
555
- if (typeof untrustedConfig_pageSize === 'number' && Math.floor(untrustedConfig_pageSize) === untrustedConfig_pageSize) {
556
- config.pageSize = untrustedConfig_pageSize;
557
- }
558
- return config;
559
- }
560
- function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
561
- if (!untrustedIsObject(untrustedConfig)) {
562
- return null;
563
- }
564
- if (process.env.NODE_ENV !== 'production') {
565
- validateConfig(untrustedConfig, configPropertyNames);
566
- }
567
- const config = typeCheckConfig$3(untrustedConfig);
568
- if (!areRequiredParametersPresent(config, configPropertyNames)) {
569
- return null;
570
- }
571
- return config;
572
- }
573
- function adapterFragment$2(luvio, config) {
574
- createResourceParams$3(config);
575
- return select$7();
576
- }
577
- function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
578
- const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
579
- config,
580
- resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
581
- });
582
- return luvio.storeBroadcast().then(() => snapshot);
583
- }
584
- function onFetchResponseError$2(luvio, config, resourceParams, response) {
585
- const snapshot = ingestError$2(luvio, resourceParams, response, {
586
- config,
587
- resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
588
- });
589
- return luvio.storeBroadcast().then(() => snapshot);
590
- }
591
- function buildNetworkSnapshot$3(luvio, config, options) {
592
- const resourceParams = createResourceParams$3(config);
593
- const request = createResourceRequest$3(resourceParams);
594
- return luvio.dispatchResourceRequest(request, options)
595
- .then((response) => {
596
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => getResponseCacheKeys$3(luvio, resourceParams, response.body));
597
- }, (response) => {
598
- return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
599
- });
600
- }
601
- function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
602
- const { luvio, config } = context;
603
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
604
- const dispatchOptions = {
605
- resourceRequestContext: {
606
- requestCorrelator,
607
- luvioRequestMethod: undefined,
608
- },
609
- eventObservers
610
- };
611
- if (networkPriority !== 'normal') {
612
- dispatchOptions.overrides = {
613
- priority: networkPriority
614
- };
615
- }
616
- return buildNetworkSnapshot$3(luvio, config, dispatchOptions);
617
- }
618
- function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
619
- const { luvio, config } = context;
620
- const selector = {
621
- recordId: keyBuilder$5(luvio, config),
622
- node: adapterFragment$2(luvio, config),
623
- variables: {},
624
- };
625
- const cacheSnapshot = storeLookup(selector, {
626
- config,
627
- resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
628
- });
629
- return cacheSnapshot;
630
- }
631
- const getManagedContentOrchestrationDefinitionsAdapterFactory = (luvio) => function CMSOrchestrator__getManagedContentOrchestrationDefinitions(untrustedConfig, requestContext) {
632
- const config = validateAdapterConfig$3(untrustedConfig, getManagedContentOrchestrationDefinitions_ConfigPropertyNames);
633
- // Invalid or incomplete config
634
- if (config === null) {
635
- return null;
636
- }
637
- return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
638
- buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
525
+ const getManagedContentOrchestrationDefinitions_ConfigPropertyNames = {
526
+ displayName: 'getManagedContentOrchestrationDefinitions',
527
+ parameters: {
528
+ required: [],
529
+ optional: ['managedContentVariantId', 'page', 'pageSize']
530
+ }
531
+ };
532
+ function createResourceParams$3(config) {
533
+ const resourceParams = {
534
+ queryParams: {
535
+ managedContentVariantId: config.managedContentVariantId, page: config.page, pageSize: config.pageSize
536
+ }
537
+ };
538
+ return resourceParams;
539
+ }
540
+ function keyBuilder$5(luvio, config) {
541
+ const resourceParams = createResourceParams$3(config);
542
+ return keyBuilder$6(luvio, resourceParams);
543
+ }
544
+ function typeCheckConfig$3(untrustedConfig) {
545
+ const config = {};
546
+ const untrustedConfig_managedContentVariantId = untrustedConfig.managedContentVariantId;
547
+ if (typeof untrustedConfig_managedContentVariantId === 'string') {
548
+ config.managedContentVariantId = untrustedConfig_managedContentVariantId;
549
+ }
550
+ const untrustedConfig_page = untrustedConfig.page;
551
+ if (typeof untrustedConfig_page === 'number' && Math.floor(untrustedConfig_page) === untrustedConfig_page) {
552
+ config.page = untrustedConfig_page;
553
+ }
554
+ const untrustedConfig_pageSize = untrustedConfig.pageSize;
555
+ if (typeof untrustedConfig_pageSize === 'number' && Math.floor(untrustedConfig_pageSize) === untrustedConfig_pageSize) {
556
+ config.pageSize = untrustedConfig_pageSize;
557
+ }
558
+ return config;
559
+ }
560
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
561
+ if (!untrustedIsObject(untrustedConfig)) {
562
+ return null;
563
+ }
564
+ if (process.env.NODE_ENV !== 'production') {
565
+ validateConfig(untrustedConfig, configPropertyNames);
566
+ }
567
+ const config = typeCheckConfig$3(untrustedConfig);
568
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
569
+ return null;
570
+ }
571
+ return config;
572
+ }
573
+ function adapterFragment$2(luvio, config) {
574
+ createResourceParams$3(config);
575
+ return select$7();
576
+ }
577
+ function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
578
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
579
+ config,
580
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
581
+ });
582
+ return luvio.storeBroadcast().then(() => snapshot);
583
+ }
584
+ function onFetchResponseError$2(luvio, config, resourceParams, response) {
585
+ const snapshot = ingestError$2(luvio, resourceParams, response, {
586
+ config,
587
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
588
+ });
589
+ return luvio.storeBroadcast().then(() => snapshot);
590
+ }
591
+ function buildNetworkSnapshot$3(luvio, config, options) {
592
+ const resourceParams = createResourceParams$3(config);
593
+ const request = createResourceRequest$3(resourceParams);
594
+ return luvio.dispatchResourceRequest(request, options)
595
+ .then((response) => {
596
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => getResponseCacheKeys$3(luvio, resourceParams, response.body));
597
+ }, (response) => {
598
+ return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
599
+ });
600
+ }
601
+ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
602
+ const { luvio, config } = context;
603
+ const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
604
+ const dispatchOptions = {
605
+ resourceRequestContext: {
606
+ requestCorrelator,
607
+ luvioRequestMethod: undefined,
608
+ },
609
+ eventObservers
610
+ };
611
+ if (networkPriority !== 'normal') {
612
+ dispatchOptions.overrides = {
613
+ priority: networkPriority
614
+ };
615
+ }
616
+ return buildNetworkSnapshot$3(luvio, config, dispatchOptions);
617
+ }
618
+ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
619
+ const { luvio, config } = context;
620
+ const selector = {
621
+ recordId: keyBuilder$5(luvio, config),
622
+ node: adapterFragment$2(luvio, config),
623
+ variables: {},
624
+ };
625
+ const cacheSnapshot = storeLookup(selector, {
626
+ config,
627
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
628
+ });
629
+ return cacheSnapshot;
630
+ }
631
+ const getManagedContentOrchestrationDefinitionsAdapterFactory = (luvio) => function CMSOrchestrator__getManagedContentOrchestrationDefinitions(untrustedConfig, requestContext) {
632
+ const config = validateAdapterConfig$3(untrustedConfig, getManagedContentOrchestrationDefinitions_ConfigPropertyNames);
633
+ // Invalid or incomplete config
634
+ if (config === null) {
635
+ return null;
636
+ }
637
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
638
+ buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
639
639
  };
640
640
 
641
- const TTL$2 = 100;
642
- const VERSION$3 = "fd41d1688072d0b3d7e856f50ad268a8";
643
- function validate$4(obj, path = 'ManagedContentOrchestrationInstanceRepresentation') {
644
- const v_error = (() => {
645
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
646
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
647
- }
648
- const obj_managedContentOrchestrationInstanceId = obj.managedContentOrchestrationInstanceId;
649
- const path_managedContentOrchestrationInstanceId = path + '.managedContentOrchestrationInstanceId';
650
- if (typeof obj_managedContentOrchestrationInstanceId !== 'string') {
651
- return new TypeError('Expected "string" but received "' + typeof obj_managedContentOrchestrationInstanceId + '" (at "' + path_managedContentOrchestrationInstanceId + '")');
652
- }
653
- const obj_managedContentVariantId = obj.managedContentVariantId;
654
- const path_managedContentVariantId = path + '.managedContentVariantId';
655
- if (typeof obj_managedContentVariantId !== 'string') {
656
- return new TypeError('Expected "string" but received "' + typeof obj_managedContentVariantId + '" (at "' + path_managedContentVariantId + '")');
657
- }
658
- const obj_orchestrationDefinition = obj.orchestrationDefinition;
659
- const path_orchestrationDefinition = path + '.orchestrationDefinition';
660
- if (typeof obj_orchestrationDefinition !== 'object') {
661
- return new TypeError('Expected "object" but received "' + typeof obj_orchestrationDefinition + '" (at "' + path_orchestrationDefinition + '")');
662
- }
663
- })();
664
- return v_error === undefined ? null : v_error;
665
- }
666
- const RepresentationType$2 = 'ManagedContentOrchestrationInstanceRepresentation';
667
- function keyBuilder$4(luvio, config) {
668
- return keyPrefix + '::' + RepresentationType$2 + ':' + config.id;
669
- }
670
- function keyBuilderFromType(luvio, object) {
671
- const keyParams = {
672
- id: object.managedContentVariantId
673
- };
674
- return keyBuilder$4(luvio, keyParams);
675
- }
676
- function normalize$2(input, existing, path, luvio, store, timestamp) {
677
- const input_orchestrationDefinition = input.orchestrationDefinition;
678
- const input_orchestrationDefinition_id = path.fullPath + '__orchestrationDefinition';
679
- input.orchestrationDefinition = ingest$4(input_orchestrationDefinition, {
680
- fullPath: input_orchestrationDefinition_id,
681
- propertyName: 'orchestrationDefinition',
682
- parent: {
683
- data: input,
684
- key: path.fullPath,
685
- existing: existing,
686
- },
687
- ttl: path.ttl
688
- }, luvio, store);
689
- return input;
690
- }
691
- const select$6 = function ManagedContentOrchestrationInstanceRepresentationSelect() {
692
- return {
693
- kind: 'Fragment',
694
- version: VERSION$3,
695
- private: [],
696
- selections: [
697
- {
698
- name: 'managedContentOrchestrationInstanceId',
699
- kind: 'Scalar'
700
- },
701
- {
702
- name: 'managedContentVariantId',
703
- kind: 'Scalar'
704
- },
705
- {
706
- name: 'orchestrationDefinition',
707
- kind: 'Link',
708
- fragment: select$9()
709
- }
710
- ]
711
- };
712
- };
713
- function equals$3(existing, incoming) {
714
- const existing_managedContentOrchestrationInstanceId = existing.managedContentOrchestrationInstanceId;
715
- const incoming_managedContentOrchestrationInstanceId = incoming.managedContentOrchestrationInstanceId;
716
- if (!(existing_managedContentOrchestrationInstanceId === incoming_managedContentOrchestrationInstanceId)) {
717
- return false;
718
- }
719
- const existing_managedContentVariantId = existing.managedContentVariantId;
720
- const incoming_managedContentVariantId = incoming.managedContentVariantId;
721
- if (!(existing_managedContentVariantId === incoming_managedContentVariantId)) {
722
- return false;
723
- }
724
- const existing_orchestrationDefinition = existing.orchestrationDefinition;
725
- const incoming_orchestrationDefinition = incoming.orchestrationDefinition;
726
- if (!(existing_orchestrationDefinition.__ref === incoming_orchestrationDefinition.__ref)) {
727
- return false;
728
- }
729
- return true;
730
- }
731
- const ingest$2 = function ManagedContentOrchestrationInstanceRepresentationIngest(input, path, luvio, store, timestamp) {
732
- if (process.env.NODE_ENV !== 'production') {
733
- const validateError = validate$4(input);
734
- if (validateError !== null) {
735
- throw validateError;
736
- }
737
- }
738
- const key = keyBuilderFromType(luvio, input);
739
- const existingRecord = store.readEntry(key);
740
- const ttlToUse = TTL$2;
741
- let incomingRecord = normalize$2(input, store.readEntry(key), {
742
- fullPath: key,
743
- parent: path.parent,
744
- propertyName: path.propertyName,
745
- ttl: ttlToUse
746
- }, luvio, store);
747
- if (existingRecord === undefined || equals$3(existingRecord, incomingRecord) === false) {
748
- luvio.storePublish(key, incomingRecord);
749
- }
750
- {
751
- const storeMetadataParams = {
752
- ttl: ttlToUse,
753
- namespace: "CMSOrchestrator",
754
- version: VERSION$3,
755
- representationName: RepresentationType$2,
756
- };
757
- luvio.publishStoreMetadata(key, storeMetadataParams);
758
- }
759
- return createLink(key);
760
- };
761
- function getTypeCacheKeys$2(luvio, input, fullPathFactory) {
762
- const rootKeySet = new StoreKeyMap();
763
- // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
764
- const rootKey = keyBuilderFromType(luvio, input);
765
- rootKeySet.set(rootKey, {
766
- namespace: keyPrefix,
767
- representationName: RepresentationType$2,
768
- mergeable: false
769
- });
770
- const input_orchestrationDefinition = getTypeCacheKeys$4(luvio, input.orchestrationDefinition);
771
- rootKeySet.merge(input_orchestrationDefinition);
772
- return rootKeySet;
641
+ const TTL$2 = 100;
642
+ const VERSION$3 = "fd41d1688072d0b3d7e856f50ad268a8";
643
+ function validate$4(obj, path = 'ManagedContentOrchestrationInstanceRepresentation') {
644
+ const v_error = (() => {
645
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
646
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
647
+ }
648
+ const obj_managedContentOrchestrationInstanceId = obj.managedContentOrchestrationInstanceId;
649
+ const path_managedContentOrchestrationInstanceId = path + '.managedContentOrchestrationInstanceId';
650
+ if (typeof obj_managedContentOrchestrationInstanceId !== 'string') {
651
+ return new TypeError('Expected "string" but received "' + typeof obj_managedContentOrchestrationInstanceId + '" (at "' + path_managedContentOrchestrationInstanceId + '")');
652
+ }
653
+ const obj_managedContentVariantId = obj.managedContentVariantId;
654
+ const path_managedContentVariantId = path + '.managedContentVariantId';
655
+ if (typeof obj_managedContentVariantId !== 'string') {
656
+ return new TypeError('Expected "string" but received "' + typeof obj_managedContentVariantId + '" (at "' + path_managedContentVariantId + '")');
657
+ }
658
+ const obj_orchestrationDefinition = obj.orchestrationDefinition;
659
+ const path_orchestrationDefinition = path + '.orchestrationDefinition';
660
+ if (typeof obj_orchestrationDefinition !== 'object') {
661
+ return new TypeError('Expected "object" but received "' + typeof obj_orchestrationDefinition + '" (at "' + path_orchestrationDefinition + '")');
662
+ }
663
+ })();
664
+ return v_error === undefined ? null : v_error;
665
+ }
666
+ const RepresentationType$2 = 'ManagedContentOrchestrationInstanceRepresentation';
667
+ function keyBuilder$4(luvio, config) {
668
+ return keyPrefix + '::' + RepresentationType$2 + ':' + config.id;
669
+ }
670
+ function keyBuilderFromType(luvio, object) {
671
+ const keyParams = {
672
+ id: object.managedContentVariantId
673
+ };
674
+ return keyBuilder$4(luvio, keyParams);
675
+ }
676
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
677
+ const input_orchestrationDefinition = input.orchestrationDefinition;
678
+ const input_orchestrationDefinition_id = path.fullPath + '__orchestrationDefinition';
679
+ input.orchestrationDefinition = ingest$4(input_orchestrationDefinition, {
680
+ fullPath: input_orchestrationDefinition_id,
681
+ propertyName: 'orchestrationDefinition',
682
+ parent: {
683
+ data: input,
684
+ key: path.fullPath,
685
+ existing: existing,
686
+ },
687
+ ttl: path.ttl
688
+ }, luvio, store);
689
+ return input;
690
+ }
691
+ const select$6 = function ManagedContentOrchestrationInstanceRepresentationSelect() {
692
+ return {
693
+ kind: 'Fragment',
694
+ version: VERSION$3,
695
+ private: [],
696
+ selections: [
697
+ {
698
+ name: 'managedContentOrchestrationInstanceId',
699
+ kind: 'Scalar'
700
+ },
701
+ {
702
+ name: 'managedContentVariantId',
703
+ kind: 'Scalar'
704
+ },
705
+ {
706
+ name: 'orchestrationDefinition',
707
+ kind: 'Link',
708
+ fragment: select$9()
709
+ }
710
+ ]
711
+ };
712
+ };
713
+ function equals$3(existing, incoming) {
714
+ const existing_managedContentOrchestrationInstanceId = existing.managedContentOrchestrationInstanceId;
715
+ const incoming_managedContentOrchestrationInstanceId = incoming.managedContentOrchestrationInstanceId;
716
+ if (!(existing_managedContentOrchestrationInstanceId === incoming_managedContentOrchestrationInstanceId)) {
717
+ return false;
718
+ }
719
+ const existing_managedContentVariantId = existing.managedContentVariantId;
720
+ const incoming_managedContentVariantId = incoming.managedContentVariantId;
721
+ if (!(existing_managedContentVariantId === incoming_managedContentVariantId)) {
722
+ return false;
723
+ }
724
+ const existing_orchestrationDefinition = existing.orchestrationDefinition;
725
+ const incoming_orchestrationDefinition = incoming.orchestrationDefinition;
726
+ if (!(existing_orchestrationDefinition.__ref === incoming_orchestrationDefinition.__ref)) {
727
+ return false;
728
+ }
729
+ return true;
730
+ }
731
+ const ingest$2 = function ManagedContentOrchestrationInstanceRepresentationIngest(input, path, luvio, store, timestamp) {
732
+ if (process.env.NODE_ENV !== 'production') {
733
+ const validateError = validate$4(input);
734
+ if (validateError !== null) {
735
+ throw validateError;
736
+ }
737
+ }
738
+ const key = keyBuilderFromType(luvio, input);
739
+ const existingRecord = store.readEntry(key);
740
+ const ttlToUse = TTL$2;
741
+ let incomingRecord = normalize$2(input, store.readEntry(key), {
742
+ fullPath: key,
743
+ parent: path.parent,
744
+ propertyName: path.propertyName,
745
+ ttl: ttlToUse
746
+ }, luvio, store);
747
+ if (existingRecord === undefined || equals$3(existingRecord, incomingRecord) === false) {
748
+ luvio.storePublish(key, incomingRecord);
749
+ }
750
+ {
751
+ const storeMetadataParams = {
752
+ ttl: ttlToUse,
753
+ namespace: "CMSOrchestrator",
754
+ version: VERSION$3,
755
+ representationName: RepresentationType$2,
756
+ };
757
+ luvio.publishStoreMetadata(key, storeMetadataParams);
758
+ }
759
+ return createLink(key);
760
+ };
761
+ function getTypeCacheKeys$2(luvio, input, fullPathFactory) {
762
+ const rootKeySet = new StoreKeyMap();
763
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
764
+ const rootKey = keyBuilderFromType(luvio, input);
765
+ rootKeySet.set(rootKey, {
766
+ namespace: keyPrefix,
767
+ representationName: RepresentationType$2,
768
+ mergeable: false
769
+ });
770
+ const input_orchestrationDefinition = getTypeCacheKeys$4(luvio, input.orchestrationDefinition);
771
+ rootKeySet.merge(input_orchestrationDefinition);
772
+ return rootKeySet;
773
773
  }
774
774
 
775
- const TTL$1 = 100;
776
- const VERSION$2 = "f9f67586e8cd826574cc122b14ced0e8";
777
- function validate$3(obj, path = 'ManagedContentOrchestrationInstanceCollectionRepresentation') {
778
- const v_error = (() => {
779
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
780
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
781
- }
782
- const obj_orchestrationInstances = obj.orchestrationInstances;
783
- const path_orchestrationInstances = path + '.orchestrationInstances';
784
- if (!ArrayIsArray(obj_orchestrationInstances)) {
785
- return new TypeError('Expected "array" but received "' + typeof obj_orchestrationInstances + '" (at "' + path_orchestrationInstances + '")');
786
- }
787
- for (let i = 0; i < obj_orchestrationInstances.length; i++) {
788
- const obj_orchestrationInstances_item = obj_orchestrationInstances[i];
789
- const path_orchestrationInstances_item = path_orchestrationInstances + '[' + i + ']';
790
- if (typeof obj_orchestrationInstances_item !== 'object') {
791
- return new TypeError('Expected "object" but received "' + typeof obj_orchestrationInstances_item + '" (at "' + path_orchestrationInstances_item + '")');
792
- }
793
- }
794
- })();
795
- return v_error === undefined ? null : v_error;
796
- }
797
- const RepresentationType$1 = 'ManagedContentOrchestrationInstanceCollectionRepresentation';
798
- function normalize$1(input, existing, path, luvio, store, timestamp) {
799
- const input_orchestrationInstances = input.orchestrationInstances;
800
- const input_orchestrationInstances_id = path.fullPath + '__orchestrationInstances';
801
- for (let i = 0; i < input_orchestrationInstances.length; i++) {
802
- const input_orchestrationInstances_item = input_orchestrationInstances[i];
803
- let input_orchestrationInstances_item_id = input_orchestrationInstances_id + '__' + i;
804
- input_orchestrationInstances[i] = ingest$2(input_orchestrationInstances_item, {
805
- fullPath: input_orchestrationInstances_item_id,
806
- propertyName: i,
807
- parent: {
808
- data: input,
809
- key: path.fullPath,
810
- existing: existing,
811
- },
812
- ttl: path.ttl
813
- }, luvio, store);
814
- }
815
- return input;
816
- }
817
- const select$5 = function ManagedContentOrchestrationInstanceCollectionRepresentationSelect() {
818
- return {
819
- kind: 'Fragment',
820
- version: VERSION$2,
821
- private: [],
822
- selections: [
823
- {
824
- name: 'orchestrationInstances',
825
- kind: 'Link',
826
- plural: true,
827
- fragment: select$6()
828
- }
829
- ]
830
- };
831
- };
832
- function equals$2(existing, incoming) {
833
- const existing_orchestrationInstances = existing.orchestrationInstances;
834
- const incoming_orchestrationInstances = incoming.orchestrationInstances;
835
- const equals_orchestrationInstances_items = equalsArray(existing_orchestrationInstances, incoming_orchestrationInstances, (existing_orchestrationInstances_item, incoming_orchestrationInstances_item) => {
836
- if (!(existing_orchestrationInstances_item.__ref === incoming_orchestrationInstances_item.__ref)) {
837
- return false;
838
- }
839
- });
840
- if (equals_orchestrationInstances_items === false) {
841
- return false;
842
- }
843
- return true;
844
- }
845
- const ingest$1 = function ManagedContentOrchestrationInstanceCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
846
- if (process.env.NODE_ENV !== 'production') {
847
- const validateError = validate$3(input);
848
- if (validateError !== null) {
849
- throw validateError;
850
- }
851
- }
852
- const key = path.fullPath;
853
- const existingRecord = store.readEntry(key);
854
- const ttlToUse = TTL$1;
855
- let incomingRecord = normalize$1(input, store.readEntry(key), {
856
- fullPath: key,
857
- parent: path.parent,
858
- propertyName: path.propertyName,
859
- ttl: ttlToUse
860
- }, luvio, store);
861
- if (existingRecord === undefined || equals$2(existingRecord, incomingRecord) === false) {
862
- luvio.storePublish(key, incomingRecord);
863
- }
864
- {
865
- const storeMetadataParams = {
866
- ttl: ttlToUse,
867
- namespace: "CMSOrchestrator",
868
- version: VERSION$2,
869
- representationName: RepresentationType$1,
870
- };
871
- luvio.publishStoreMetadata(key, storeMetadataParams);
872
- }
873
- return createLink(key);
874
- };
875
- function getTypeCacheKeys$1(luvio, input, fullPathFactory) {
876
- const rootKeySet = new StoreKeyMap();
877
- // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
878
- const rootKey = fullPathFactory();
879
- rootKeySet.set(rootKey, {
880
- namespace: keyPrefix,
881
- representationName: RepresentationType$1,
882
- mergeable: false
883
- });
884
- const input_orchestrationInstances_length = input.orchestrationInstances.length;
885
- for (let i = 0; i < input_orchestrationInstances_length; i++) {
886
- rootKeySet.merge(getTypeCacheKeys$2(luvio, input.orchestrationInstances[i]));
887
- }
888
- return rootKeySet;
775
+ const TTL$1 = 100;
776
+ const VERSION$2 = "f9f67586e8cd826574cc122b14ced0e8";
777
+ function validate$3(obj, path = 'ManagedContentOrchestrationInstanceCollectionRepresentation') {
778
+ const v_error = (() => {
779
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
780
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
781
+ }
782
+ const obj_orchestrationInstances = obj.orchestrationInstances;
783
+ const path_orchestrationInstances = path + '.orchestrationInstances';
784
+ if (!ArrayIsArray(obj_orchestrationInstances)) {
785
+ return new TypeError('Expected "array" but received "' + typeof obj_orchestrationInstances + '" (at "' + path_orchestrationInstances + '")');
786
+ }
787
+ for (let i = 0; i < obj_orchestrationInstances.length; i++) {
788
+ const obj_orchestrationInstances_item = obj_orchestrationInstances[i];
789
+ const path_orchestrationInstances_item = path_orchestrationInstances + '[' + i + ']';
790
+ if (typeof obj_orchestrationInstances_item !== 'object') {
791
+ return new TypeError('Expected "object" but received "' + typeof obj_orchestrationInstances_item + '" (at "' + path_orchestrationInstances_item + '")');
792
+ }
793
+ }
794
+ })();
795
+ return v_error === undefined ? null : v_error;
796
+ }
797
+ const RepresentationType$1 = 'ManagedContentOrchestrationInstanceCollectionRepresentation';
798
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
799
+ const input_orchestrationInstances = input.orchestrationInstances;
800
+ const input_orchestrationInstances_id = path.fullPath + '__orchestrationInstances';
801
+ for (let i = 0; i < input_orchestrationInstances.length; i++) {
802
+ const input_orchestrationInstances_item = input_orchestrationInstances[i];
803
+ let input_orchestrationInstances_item_id = input_orchestrationInstances_id + '__' + i;
804
+ input_orchestrationInstances[i] = ingest$2(input_orchestrationInstances_item, {
805
+ fullPath: input_orchestrationInstances_item_id,
806
+ propertyName: i,
807
+ parent: {
808
+ data: input,
809
+ key: path.fullPath,
810
+ existing: existing,
811
+ },
812
+ ttl: path.ttl
813
+ }, luvio, store);
814
+ }
815
+ return input;
816
+ }
817
+ const select$5 = function ManagedContentOrchestrationInstanceCollectionRepresentationSelect() {
818
+ return {
819
+ kind: 'Fragment',
820
+ version: VERSION$2,
821
+ private: [],
822
+ selections: [
823
+ {
824
+ name: 'orchestrationInstances',
825
+ kind: 'Link',
826
+ plural: true,
827
+ fragment: select$6()
828
+ }
829
+ ]
830
+ };
831
+ };
832
+ function equals$2(existing, incoming) {
833
+ const existing_orchestrationInstances = existing.orchestrationInstances;
834
+ const incoming_orchestrationInstances = incoming.orchestrationInstances;
835
+ const equals_orchestrationInstances_items = equalsArray(existing_orchestrationInstances, incoming_orchestrationInstances, (existing_orchestrationInstances_item, incoming_orchestrationInstances_item) => {
836
+ if (!(existing_orchestrationInstances_item.__ref === incoming_orchestrationInstances_item.__ref)) {
837
+ return false;
838
+ }
839
+ });
840
+ if (equals_orchestrationInstances_items === false) {
841
+ return false;
842
+ }
843
+ return true;
844
+ }
845
+ const ingest$1 = function ManagedContentOrchestrationInstanceCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
846
+ if (process.env.NODE_ENV !== 'production') {
847
+ const validateError = validate$3(input);
848
+ if (validateError !== null) {
849
+ throw validateError;
850
+ }
851
+ }
852
+ const key = path.fullPath;
853
+ const existingRecord = store.readEntry(key);
854
+ const ttlToUse = TTL$1;
855
+ let incomingRecord = normalize$1(input, store.readEntry(key), {
856
+ fullPath: key,
857
+ parent: path.parent,
858
+ propertyName: path.propertyName,
859
+ ttl: ttlToUse
860
+ }, luvio, store);
861
+ if (existingRecord === undefined || equals$2(existingRecord, incomingRecord) === false) {
862
+ luvio.storePublish(key, incomingRecord);
863
+ }
864
+ {
865
+ const storeMetadataParams = {
866
+ ttl: ttlToUse,
867
+ namespace: "CMSOrchestrator",
868
+ version: VERSION$2,
869
+ representationName: RepresentationType$1,
870
+ };
871
+ luvio.publishStoreMetadata(key, storeMetadataParams);
872
+ }
873
+ return createLink(key);
874
+ };
875
+ function getTypeCacheKeys$1(luvio, input, fullPathFactory) {
876
+ const rootKeySet = new StoreKeyMap();
877
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
878
+ const rootKey = fullPathFactory();
879
+ rootKeySet.set(rootKey, {
880
+ namespace: keyPrefix,
881
+ representationName: RepresentationType$1,
882
+ mergeable: false
883
+ });
884
+ const input_orchestrationInstances_length = input.orchestrationInstances.length;
885
+ for (let i = 0; i < input_orchestrationInstances_length; i++) {
886
+ rootKeySet.merge(getTypeCacheKeys$2(luvio, input.orchestrationInstances[i]));
887
+ }
888
+ return rootKeySet;
889
889
  }
890
890
 
891
- function select$4(luvio, params) {
892
- return select$5();
893
- }
894
- function keyBuilder$3(luvio, params) {
895
- return keyPrefix + '::ManagedContentOrchestrationInstanceCollectionRepresentation:(' + 'managedContentVariantId:' + params.queryParams.managedContentVariantId + ')';
896
- }
897
- function getResponseCacheKeys$2(luvio, resourceParams, response) {
898
- return getTypeCacheKeys$1(luvio, response, () => keyBuilder$3(luvio, resourceParams));
899
- }
900
- function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
901
- const { body } = response;
902
- const key = keyBuilder$3(luvio, resourceParams);
903
- luvio.storeIngest(key, ingest$1, body);
904
- const snapshot = luvio.storeLookup({
905
- recordId: key,
906
- node: select$4(),
907
- variables: {},
908
- }, snapshotRefresh);
909
- if (process.env.NODE_ENV !== 'production') {
910
- if (snapshot.state !== 'Fulfilled') {
911
- throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
912
- }
913
- }
914
- return snapshot;
915
- }
916
- function ingestError$1(luvio, params, error, snapshotRefresh) {
917
- const key = keyBuilder$3(luvio, params);
918
- const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
919
- const storeMetadataParams = {
920
- ttl: TTL$1,
921
- namespace: keyPrefix,
922
- version: VERSION$2,
923
- representationName: RepresentationType$1
924
- };
925
- luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
926
- return errorSnapshot;
927
- }
928
- function createResourceRequest$2(config) {
929
- const headers = {};
930
- return {
931
- baseUri: '/services/data/v58.0',
932
- basePath: '/connect/cms/contents/orchestration-instances',
933
- method: 'get',
934
- body: null,
935
- urlParams: {},
936
- queryParams: config.queryParams,
937
- headers,
938
- priority: 'normal',
939
- };
891
+ function select$4(luvio, params) {
892
+ return select$5();
893
+ }
894
+ function keyBuilder$3(luvio, params) {
895
+ return keyPrefix + '::ManagedContentOrchestrationInstanceCollectionRepresentation:(' + 'managedContentVariantId:' + params.queryParams.managedContentVariantId + ')';
896
+ }
897
+ function getResponseCacheKeys$2(luvio, resourceParams, response) {
898
+ return getTypeCacheKeys$1(luvio, response, () => keyBuilder$3(luvio, resourceParams));
899
+ }
900
+ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
901
+ const { body } = response;
902
+ const key = keyBuilder$3(luvio, resourceParams);
903
+ luvio.storeIngest(key, ingest$1, body);
904
+ const snapshot = luvio.storeLookup({
905
+ recordId: key,
906
+ node: select$4(),
907
+ variables: {},
908
+ }, snapshotRefresh);
909
+ if (process.env.NODE_ENV !== 'production') {
910
+ if (snapshot.state !== 'Fulfilled') {
911
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
912
+ }
913
+ }
914
+ return snapshot;
915
+ }
916
+ function ingestError$1(luvio, params, error, snapshotRefresh) {
917
+ const key = keyBuilder$3(luvio, params);
918
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
919
+ const storeMetadataParams = {
920
+ ttl: TTL$1,
921
+ namespace: keyPrefix,
922
+ version: VERSION$2,
923
+ representationName: RepresentationType$1
924
+ };
925
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
926
+ return errorSnapshot;
927
+ }
928
+ function createResourceRequest$2(config) {
929
+ const headers = {};
930
+ return {
931
+ baseUri: '/services/data/v58.0',
932
+ basePath: '/connect/cms/contents/orchestration-instances',
933
+ method: 'get',
934
+ body: null,
935
+ urlParams: {},
936
+ queryParams: config.queryParams,
937
+ headers,
938
+ priority: 'normal',
939
+ };
940
940
  }
941
941
 
942
- const getManagedContentOrchestrationInstances_ConfigPropertyNames = {
943
- displayName: 'getManagedContentOrchestrationInstances',
944
- parameters: {
945
- required: [],
946
- optional: ['managedContentVariantId']
947
- }
948
- };
949
- function createResourceParams$2(config) {
950
- const resourceParams = {
951
- queryParams: {
952
- managedContentVariantId: config.managedContentVariantId
953
- }
954
- };
955
- return resourceParams;
956
- }
957
- function keyBuilder$2(luvio, config) {
958
- const resourceParams = createResourceParams$2(config);
959
- return keyBuilder$3(luvio, resourceParams);
960
- }
961
- function typeCheckConfig$2(untrustedConfig) {
962
- const config = {};
963
- const untrustedConfig_managedContentVariantId = untrustedConfig.managedContentVariantId;
964
- if (typeof untrustedConfig_managedContentVariantId === 'string') {
965
- config.managedContentVariantId = untrustedConfig_managedContentVariantId;
966
- }
967
- return config;
968
- }
969
- function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
970
- if (!untrustedIsObject(untrustedConfig)) {
971
- return null;
972
- }
973
- if (process.env.NODE_ENV !== 'production') {
974
- validateConfig(untrustedConfig, configPropertyNames);
975
- }
976
- const config = typeCheckConfig$2(untrustedConfig);
977
- if (!areRequiredParametersPresent(config, configPropertyNames)) {
978
- return null;
979
- }
980
- return config;
981
- }
982
- function adapterFragment$1(luvio, config) {
983
- createResourceParams$2(config);
984
- return select$4();
985
- }
986
- function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
987
- const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
988
- config,
989
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
990
- });
991
- return luvio.storeBroadcast().then(() => snapshot);
992
- }
993
- function onFetchResponseError$1(luvio, config, resourceParams, response) {
994
- const snapshot = ingestError$1(luvio, resourceParams, response, {
995
- config,
996
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
997
- });
998
- return luvio.storeBroadcast().then(() => snapshot);
999
- }
1000
- function buildNetworkSnapshot$2(luvio, config, options) {
1001
- const resourceParams = createResourceParams$2(config);
1002
- const request = createResourceRequest$2(resourceParams);
1003
- return luvio.dispatchResourceRequest(request, options)
1004
- .then((response) => {
1005
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => getResponseCacheKeys$2(luvio, resourceParams, response.body));
1006
- }, (response) => {
1007
- return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
1008
- });
1009
- }
1010
- function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
1011
- const { luvio, config } = context;
1012
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
1013
- const dispatchOptions = {
1014
- resourceRequestContext: {
1015
- requestCorrelator,
1016
- luvioRequestMethod: undefined,
1017
- },
1018
- eventObservers
1019
- };
1020
- if (networkPriority !== 'normal') {
1021
- dispatchOptions.overrides = {
1022
- priority: networkPriority
1023
- };
1024
- }
1025
- return buildNetworkSnapshot$2(luvio, config, dispatchOptions);
1026
- }
1027
- function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
1028
- const { luvio, config } = context;
1029
- const selector = {
1030
- recordId: keyBuilder$2(luvio, config),
1031
- node: adapterFragment$1(luvio, config),
1032
- variables: {},
1033
- };
1034
- const cacheSnapshot = storeLookup(selector, {
1035
- config,
1036
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1037
- });
1038
- return cacheSnapshot;
1039
- }
1040
- const getManagedContentOrchestrationInstancesAdapterFactory = (luvio) => function CMSOrchestrator__getManagedContentOrchestrationInstances(untrustedConfig, requestContext) {
1041
- const config = validateAdapterConfig$2(untrustedConfig, getManagedContentOrchestrationInstances_ConfigPropertyNames);
1042
- // Invalid or incomplete config
1043
- if (config === null) {
1044
- return null;
1045
- }
1046
- return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1047
- buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
942
+ const getManagedContentOrchestrationInstances_ConfigPropertyNames = {
943
+ displayName: 'getManagedContentOrchestrationInstances',
944
+ parameters: {
945
+ required: [],
946
+ optional: ['managedContentVariantId']
947
+ }
948
+ };
949
+ function createResourceParams$2(config) {
950
+ const resourceParams = {
951
+ queryParams: {
952
+ managedContentVariantId: config.managedContentVariantId
953
+ }
954
+ };
955
+ return resourceParams;
956
+ }
957
+ function keyBuilder$2(luvio, config) {
958
+ const resourceParams = createResourceParams$2(config);
959
+ return keyBuilder$3(luvio, resourceParams);
960
+ }
961
+ function typeCheckConfig$2(untrustedConfig) {
962
+ const config = {};
963
+ const untrustedConfig_managedContentVariantId = untrustedConfig.managedContentVariantId;
964
+ if (typeof untrustedConfig_managedContentVariantId === 'string') {
965
+ config.managedContentVariantId = untrustedConfig_managedContentVariantId;
966
+ }
967
+ return config;
968
+ }
969
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
970
+ if (!untrustedIsObject(untrustedConfig)) {
971
+ return null;
972
+ }
973
+ if (process.env.NODE_ENV !== 'production') {
974
+ validateConfig(untrustedConfig, configPropertyNames);
975
+ }
976
+ const config = typeCheckConfig$2(untrustedConfig);
977
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
978
+ return null;
979
+ }
980
+ return config;
981
+ }
982
+ function adapterFragment$1(luvio, config) {
983
+ createResourceParams$2(config);
984
+ return select$4();
985
+ }
986
+ function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
987
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
988
+ config,
989
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
990
+ });
991
+ return luvio.storeBroadcast().then(() => snapshot);
992
+ }
993
+ function onFetchResponseError$1(luvio, config, resourceParams, response) {
994
+ const snapshot = ingestError$1(luvio, resourceParams, response, {
995
+ config,
996
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
997
+ });
998
+ return luvio.storeBroadcast().then(() => snapshot);
999
+ }
1000
+ function buildNetworkSnapshot$2(luvio, config, options) {
1001
+ const resourceParams = createResourceParams$2(config);
1002
+ const request = createResourceRequest$2(resourceParams);
1003
+ return luvio.dispatchResourceRequest(request, options)
1004
+ .then((response) => {
1005
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => getResponseCacheKeys$2(luvio, resourceParams, response.body));
1006
+ }, (response) => {
1007
+ return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
1008
+ });
1009
+ }
1010
+ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
1011
+ const { luvio, config } = context;
1012
+ const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
1013
+ const dispatchOptions = {
1014
+ resourceRequestContext: {
1015
+ requestCorrelator,
1016
+ luvioRequestMethod: undefined,
1017
+ },
1018
+ eventObservers
1019
+ };
1020
+ if (networkPriority !== 'normal') {
1021
+ dispatchOptions.overrides = {
1022
+ priority: networkPriority
1023
+ };
1024
+ }
1025
+ return buildNetworkSnapshot$2(luvio, config, dispatchOptions);
1026
+ }
1027
+ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
1028
+ const { luvio, config } = context;
1029
+ const selector = {
1030
+ recordId: keyBuilder$2(luvio, config),
1031
+ node: adapterFragment$1(luvio, config),
1032
+ variables: {},
1033
+ };
1034
+ const cacheSnapshot = storeLookup(selector, {
1035
+ config,
1036
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1037
+ });
1038
+ return cacheSnapshot;
1039
+ }
1040
+ const getManagedContentOrchestrationInstancesAdapterFactory = (luvio) => function CMSOrchestrator__getManagedContentOrchestrationInstances(untrustedConfig, requestContext) {
1041
+ const config = validateAdapterConfig$2(untrustedConfig, getManagedContentOrchestrationInstances_ConfigPropertyNames);
1042
+ // Invalid or incomplete config
1043
+ if (config === null) {
1044
+ return null;
1045
+ }
1046
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1047
+ buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
1048
1048
  };
1049
1049
 
1050
- function validate$2(obj, path = 'ManagedContentOrchestrationInstanceInputRepresentation') {
1051
- const v_error = (() => {
1052
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1053
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1054
- }
1055
- const obj_managedContentVariantId = obj.managedContentVariantId;
1056
- const path_managedContentVariantId = path + '.managedContentVariantId';
1057
- if (typeof obj_managedContentVariantId !== 'string') {
1058
- return new TypeError('Expected "string" but received "' + typeof obj_managedContentVariantId + '" (at "' + path_managedContentVariantId + '")');
1059
- }
1060
- const obj_orchestrationDefinitionDeveloperName = obj.orchestrationDefinitionDeveloperName;
1061
- const path_orchestrationDefinitionDeveloperName = path + '.orchestrationDefinitionDeveloperName';
1062
- if (typeof obj_orchestrationDefinitionDeveloperName !== 'string') {
1063
- return new TypeError('Expected "string" but received "' + typeof obj_orchestrationDefinitionDeveloperName + '" (at "' + path_orchestrationDefinitionDeveloperName + '")');
1064
- }
1065
- })();
1066
- return v_error === undefined ? null : v_error;
1050
+ function validate$2(obj, path = 'ManagedContentOrchestrationInstanceInputRepresentation') {
1051
+ const v_error = (() => {
1052
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1053
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1054
+ }
1055
+ const obj_managedContentVariantId = obj.managedContentVariantId;
1056
+ const path_managedContentVariantId = path + '.managedContentVariantId';
1057
+ if (typeof obj_managedContentVariantId !== 'string') {
1058
+ return new TypeError('Expected "string" but received "' + typeof obj_managedContentVariantId + '" (at "' + path_managedContentVariantId + '")');
1059
+ }
1060
+ const obj_orchestrationDefinitionDeveloperName = obj.orchestrationDefinitionDeveloperName;
1061
+ const path_orchestrationDefinitionDeveloperName = path + '.orchestrationDefinitionDeveloperName';
1062
+ if (typeof obj_orchestrationDefinitionDeveloperName !== 'string') {
1063
+ return new TypeError('Expected "string" but received "' + typeof obj_orchestrationDefinitionDeveloperName + '" (at "' + path_orchestrationDefinitionDeveloperName + '")');
1064
+ }
1065
+ })();
1066
+ return v_error === undefined ? null : v_error;
1067
1067
  }
1068
1068
 
1069
- function select$3(luvio, params) {
1070
- return select$6();
1071
- }
1072
- function getResponseCacheKeys$1(luvio, resourceParams, response) {
1073
- return getTypeCacheKeys$2(luvio, response);
1074
- }
1075
- function ingestSuccess$1(luvio, resourceParams, response) {
1076
- const { body } = response;
1077
- const key = keyBuilderFromType(luvio, body);
1078
- luvio.storeIngest(key, ingest$2, body);
1079
- const snapshot = luvio.storeLookup({
1080
- recordId: key,
1081
- node: select$3(),
1082
- variables: {},
1083
- });
1084
- if (process.env.NODE_ENV !== 'production') {
1085
- if (snapshot.state !== 'Fulfilled') {
1086
- throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1087
- }
1088
- }
1089
- return snapshot;
1090
- }
1091
- function createResourceRequest$1(config) {
1092
- const headers = {};
1093
- return {
1094
- baseUri: '/services/data/v58.0',
1095
- basePath: '/connect/cms/contents/orchestration-instances',
1096
- method: 'post',
1097
- body: config.body,
1098
- urlParams: {},
1099
- queryParams: {},
1100
- headers,
1101
- priority: 'normal',
1102
- };
1069
+ function select$3(luvio, params) {
1070
+ return select$6();
1071
+ }
1072
+ function getResponseCacheKeys$1(luvio, resourceParams, response) {
1073
+ return getTypeCacheKeys$2(luvio, response);
1074
+ }
1075
+ function ingestSuccess$1(luvio, resourceParams, response) {
1076
+ const { body } = response;
1077
+ const key = keyBuilderFromType(luvio, body);
1078
+ luvio.storeIngest(key, ingest$2, body);
1079
+ const snapshot = luvio.storeLookup({
1080
+ recordId: key,
1081
+ node: select$3(),
1082
+ variables: {},
1083
+ });
1084
+ if (process.env.NODE_ENV !== 'production') {
1085
+ if (snapshot.state !== 'Fulfilled') {
1086
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1087
+ }
1088
+ }
1089
+ return snapshot;
1090
+ }
1091
+ function createResourceRequest$1(config) {
1092
+ const headers = {};
1093
+ return {
1094
+ baseUri: '/services/data/v58.0',
1095
+ basePath: '/connect/cms/contents/orchestration-instances',
1096
+ method: 'post',
1097
+ body: config.body,
1098
+ urlParams: {},
1099
+ queryParams: {},
1100
+ headers,
1101
+ priority: 'normal',
1102
+ };
1103
1103
  }
1104
1104
 
1105
- const createManagedContentOrchestrationInstance_ConfigPropertyNames = {
1106
- displayName: 'createManagedContentOrchestrationInstance',
1107
- parameters: {
1108
- required: ['mContentOrchInstanceInput'],
1109
- optional: []
1110
- }
1111
- };
1112
- function createResourceParams$1(config) {
1113
- const resourceParams = {
1114
- body: {
1115
- mContentOrchInstanceInput: config.mContentOrchInstanceInput
1116
- }
1117
- };
1118
- return resourceParams;
1119
- }
1120
- function typeCheckConfig$1(untrustedConfig) {
1121
- const config = {};
1122
- const untrustedConfig_mContentOrchInstanceInput = untrustedConfig.mContentOrchInstanceInput;
1123
- const referenceManagedContentOrchestrationInstanceInputRepresentationValidationError = validate$2(untrustedConfig_mContentOrchInstanceInput);
1124
- if (referenceManagedContentOrchestrationInstanceInputRepresentationValidationError === null) {
1125
- config.mContentOrchInstanceInput = untrustedConfig_mContentOrchInstanceInput;
1126
- }
1127
- return config;
1128
- }
1129
- function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1130
- if (!untrustedIsObject(untrustedConfig)) {
1131
- return null;
1132
- }
1133
- if (process.env.NODE_ENV !== 'production') {
1134
- validateConfig(untrustedConfig, configPropertyNames);
1135
- }
1136
- const config = typeCheckConfig$1(untrustedConfig);
1137
- if (!areRequiredParametersPresent(config, configPropertyNames)) {
1138
- return null;
1139
- }
1140
- return config;
1141
- }
1142
- function buildNetworkSnapshot$1(luvio, config, options) {
1143
- const resourceParams = createResourceParams$1(config);
1144
- const request = createResourceRequest$1(resourceParams);
1145
- return luvio.dispatchResourceRequest(request, options)
1146
- .then((response) => {
1147
- return luvio.handleSuccessResponse(() => {
1148
- const snapshot = ingestSuccess$1(luvio, resourceParams, response);
1149
- return luvio.storeBroadcast().then(() => snapshot);
1150
- }, () => getResponseCacheKeys$1(luvio, resourceParams, response.body));
1151
- }, (response) => {
1152
- deepFreeze(response);
1153
- throw response;
1154
- });
1155
- }
1156
- const createManagedContentOrchestrationInstanceAdapterFactory = (luvio) => {
1157
- return function createManagedContentOrchestrationInstance(untrustedConfig) {
1158
- const config = validateAdapterConfig$1(untrustedConfig, createManagedContentOrchestrationInstance_ConfigPropertyNames);
1159
- // Invalid or incomplete config
1160
- if (config === null) {
1161
- throw new Error('Invalid config for "createManagedContentOrchestrationInstance"');
1162
- }
1163
- return buildNetworkSnapshot$1(luvio, config);
1164
- };
1105
+ const createManagedContentOrchestrationInstance_ConfigPropertyNames = {
1106
+ displayName: 'createManagedContentOrchestrationInstance',
1107
+ parameters: {
1108
+ required: ['mContentOrchInstanceInput'],
1109
+ optional: []
1110
+ }
1111
+ };
1112
+ function createResourceParams$1(config) {
1113
+ const resourceParams = {
1114
+ body: {
1115
+ mContentOrchInstanceInput: config.mContentOrchInstanceInput
1116
+ }
1117
+ };
1118
+ return resourceParams;
1119
+ }
1120
+ function typeCheckConfig$1(untrustedConfig) {
1121
+ const config = {};
1122
+ const untrustedConfig_mContentOrchInstanceInput = untrustedConfig.mContentOrchInstanceInput;
1123
+ const referenceManagedContentOrchestrationInstanceInputRepresentationValidationError = validate$2(untrustedConfig_mContentOrchInstanceInput);
1124
+ if (referenceManagedContentOrchestrationInstanceInputRepresentationValidationError === null) {
1125
+ config.mContentOrchInstanceInput = untrustedConfig_mContentOrchInstanceInput;
1126
+ }
1127
+ return config;
1128
+ }
1129
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1130
+ if (!untrustedIsObject(untrustedConfig)) {
1131
+ return null;
1132
+ }
1133
+ if (process.env.NODE_ENV !== 'production') {
1134
+ validateConfig(untrustedConfig, configPropertyNames);
1135
+ }
1136
+ const config = typeCheckConfig$1(untrustedConfig);
1137
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1138
+ return null;
1139
+ }
1140
+ return config;
1141
+ }
1142
+ function buildNetworkSnapshot$1(luvio, config, options) {
1143
+ const resourceParams = createResourceParams$1(config);
1144
+ const request = createResourceRequest$1(resourceParams);
1145
+ return luvio.dispatchResourceRequest(request, options)
1146
+ .then((response) => {
1147
+ return luvio.handleSuccessResponse(() => {
1148
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response);
1149
+ return luvio.storeBroadcast().then(() => snapshot);
1150
+ }, () => getResponseCacheKeys$1(luvio, resourceParams, response.body));
1151
+ }, (response) => {
1152
+ deepFreeze(response);
1153
+ throw response;
1154
+ });
1155
+ }
1156
+ const createManagedContentOrchestrationInstanceAdapterFactory = (luvio) => {
1157
+ return function createManagedContentOrchestrationInstance(untrustedConfig) {
1158
+ const config = validateAdapterConfig$1(untrustedConfig, createManagedContentOrchestrationInstance_ConfigPropertyNames);
1159
+ // Invalid or incomplete config
1160
+ if (config === null) {
1161
+ throw new Error('Invalid config for "createManagedContentOrchestrationInstance"');
1162
+ }
1163
+ return buildNetworkSnapshot$1(luvio, config);
1164
+ };
1165
1165
  };
1166
1166
 
1167
- const VERSION$1 = "5044bf9d6a7c23eadc7dcfa5d49edeca";
1168
- function validate$1(obj, path = 'ManagedContentRunningOrchestrationHistoryEventRepresentation') {
1169
- const v_error = (() => {
1170
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1171
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1172
- }
1173
- const obj_actorEmail = obj.actorEmail;
1174
- const path_actorEmail = path + '.actorEmail';
1175
- let obj_actorEmail_union0 = null;
1176
- const obj_actorEmail_union0_error = (() => {
1177
- if (typeof obj_actorEmail !== 'string') {
1178
- return new TypeError('Expected "string" but received "' + typeof obj_actorEmail + '" (at "' + path_actorEmail + '")');
1179
- }
1180
- })();
1181
- if (obj_actorEmail_union0_error != null) {
1182
- obj_actorEmail_union0 = obj_actorEmail_union0_error.message;
1183
- }
1184
- let obj_actorEmail_union1 = null;
1185
- const obj_actorEmail_union1_error = (() => {
1186
- if (obj_actorEmail !== null) {
1187
- return new TypeError('Expected "null" but received "' + typeof obj_actorEmail + '" (at "' + path_actorEmail + '")');
1188
- }
1189
- })();
1190
- if (obj_actorEmail_union1_error != null) {
1191
- obj_actorEmail_union1 = obj_actorEmail_union1_error.message;
1192
- }
1193
- if (obj_actorEmail_union0 && obj_actorEmail_union1) {
1194
- let message = 'Object doesn\'t match union (at "' + path_actorEmail + '")';
1195
- message += '\n' + obj_actorEmail_union0.split('\n').map((line) => '\t' + line).join('\n');
1196
- message += '\n' + obj_actorEmail_union1.split('\n').map((line) => '\t' + line).join('\n');
1197
- return new TypeError(message);
1198
- }
1199
- const obj_actorName = obj.actorName;
1200
- const path_actorName = path + '.actorName';
1201
- let obj_actorName_union0 = null;
1202
- const obj_actorName_union0_error = (() => {
1203
- if (typeof obj_actorName !== 'string') {
1204
- return new TypeError('Expected "string" but received "' + typeof obj_actorName + '" (at "' + path_actorName + '")');
1205
- }
1206
- })();
1207
- if (obj_actorName_union0_error != null) {
1208
- obj_actorName_union0 = obj_actorName_union0_error.message;
1209
- }
1210
- let obj_actorName_union1 = null;
1211
- const obj_actorName_union1_error = (() => {
1212
- if (obj_actorName !== null) {
1213
- return new TypeError('Expected "null" but received "' + typeof obj_actorName + '" (at "' + path_actorName + '")');
1214
- }
1215
- })();
1216
- if (obj_actorName_union1_error != null) {
1217
- obj_actorName_union1 = obj_actorName_union1_error.message;
1218
- }
1219
- if (obj_actorName_union0 && obj_actorName_union1) {
1220
- let message = 'Object doesn\'t match union (at "' + path_actorName + '")';
1221
- message += '\n' + obj_actorName_union0.split('\n').map((line) => '\t' + line).join('\n');
1222
- message += '\n' + obj_actorName_union1.split('\n').map((line) => '\t' + line).join('\n');
1223
- return new TypeError(message);
1224
- }
1225
- const obj_assigneeDevNameOrEmail = obj.assigneeDevNameOrEmail;
1226
- const path_assigneeDevNameOrEmail = path + '.assigneeDevNameOrEmail';
1227
- let obj_assigneeDevNameOrEmail_union0 = null;
1228
- const obj_assigneeDevNameOrEmail_union0_error = (() => {
1229
- if (typeof obj_assigneeDevNameOrEmail !== 'string') {
1230
- return new TypeError('Expected "string" but received "' + typeof obj_assigneeDevNameOrEmail + '" (at "' + path_assigneeDevNameOrEmail + '")');
1231
- }
1232
- })();
1233
- if (obj_assigneeDevNameOrEmail_union0_error != null) {
1234
- obj_assigneeDevNameOrEmail_union0 = obj_assigneeDevNameOrEmail_union0_error.message;
1235
- }
1236
- let obj_assigneeDevNameOrEmail_union1 = null;
1237
- const obj_assigneeDevNameOrEmail_union1_error = (() => {
1238
- if (obj_assigneeDevNameOrEmail !== null) {
1239
- return new TypeError('Expected "null" but received "' + typeof obj_assigneeDevNameOrEmail + '" (at "' + path_assigneeDevNameOrEmail + '")');
1240
- }
1241
- })();
1242
- if (obj_assigneeDevNameOrEmail_union1_error != null) {
1243
- obj_assigneeDevNameOrEmail_union1 = obj_assigneeDevNameOrEmail_union1_error.message;
1244
- }
1245
- if (obj_assigneeDevNameOrEmail_union0 && obj_assigneeDevNameOrEmail_union1) {
1246
- let message = 'Object doesn\'t match union (at "' + path_assigneeDevNameOrEmail + '")';
1247
- message += '\n' + obj_assigneeDevNameOrEmail_union0.split('\n').map((line) => '\t' + line).join('\n');
1248
- message += '\n' + obj_assigneeDevNameOrEmail_union1.split('\n').map((line) => '\t' + line).join('\n');
1249
- return new TypeError(message);
1250
- }
1251
- const obj_assigneeName = obj.assigneeName;
1252
- const path_assigneeName = path + '.assigneeName';
1253
- let obj_assigneeName_union0 = null;
1254
- const obj_assigneeName_union0_error = (() => {
1255
- if (typeof obj_assigneeName !== 'string') {
1256
- return new TypeError('Expected "string" but received "' + typeof obj_assigneeName + '" (at "' + path_assigneeName + '")');
1257
- }
1258
- })();
1259
- if (obj_assigneeName_union0_error != null) {
1260
- obj_assigneeName_union0 = obj_assigneeName_union0_error.message;
1261
- }
1262
- let obj_assigneeName_union1 = null;
1263
- const obj_assigneeName_union1_error = (() => {
1264
- if (obj_assigneeName !== null) {
1265
- return new TypeError('Expected "null" but received "' + typeof obj_assigneeName + '" (at "' + path_assigneeName + '")');
1266
- }
1267
- })();
1268
- if (obj_assigneeName_union1_error != null) {
1269
- obj_assigneeName_union1 = obj_assigneeName_union1_error.message;
1270
- }
1271
- if (obj_assigneeName_union0 && obj_assigneeName_union1) {
1272
- let message = 'Object doesn\'t match union (at "' + path_assigneeName + '")';
1273
- message += '\n' + obj_assigneeName_union0.split('\n').map((line) => '\t' + line).join('\n');
1274
- message += '\n' + obj_assigneeName_union1.split('\n').map((line) => '\t' + line).join('\n');
1275
- return new TypeError(message);
1276
- }
1277
- const obj_assigneeType = obj.assigneeType;
1278
- const path_assigneeType = path + '.assigneeType';
1279
- let obj_assigneeType_union0 = null;
1280
- const obj_assigneeType_union0_error = (() => {
1281
- if (typeof obj_assigneeType !== 'string') {
1282
- return new TypeError('Expected "string" but received "' + typeof obj_assigneeType + '" (at "' + path_assigneeType + '")');
1283
- }
1284
- })();
1285
- if (obj_assigneeType_union0_error != null) {
1286
- obj_assigneeType_union0 = obj_assigneeType_union0_error.message;
1287
- }
1288
- let obj_assigneeType_union1 = null;
1289
- const obj_assigneeType_union1_error = (() => {
1290
- if (obj_assigneeType !== null) {
1291
- return new TypeError('Expected "null" but received "' + typeof obj_assigneeType + '" (at "' + path_assigneeType + '")');
1292
- }
1293
- })();
1294
- if (obj_assigneeType_union1_error != null) {
1295
- obj_assigneeType_union1 = obj_assigneeType_union1_error.message;
1296
- }
1297
- if (obj_assigneeType_union0 && obj_assigneeType_union1) {
1298
- let message = 'Object doesn\'t match union (at "' + path_assigneeType + '")';
1299
- message += '\n' + obj_assigneeType_union0.split('\n').map((line) => '\t' + line).join('\n');
1300
- message += '\n' + obj_assigneeType_union1.split('\n').map((line) => '\t' + line).join('\n');
1301
- return new TypeError(message);
1302
- }
1303
- const obj_comments = obj.comments;
1304
- const path_comments = path + '.comments';
1305
- let obj_comments_union0 = null;
1306
- const obj_comments_union0_error = (() => {
1307
- if (typeof obj_comments !== 'string') {
1308
- return new TypeError('Expected "string" but received "' + typeof obj_comments + '" (at "' + path_comments + '")');
1309
- }
1310
- })();
1311
- if (obj_comments_union0_error != null) {
1312
- obj_comments_union0 = obj_comments_union0_error.message;
1313
- }
1314
- let obj_comments_union1 = null;
1315
- const obj_comments_union1_error = (() => {
1316
- if (obj_comments !== null) {
1317
- return new TypeError('Expected "null" but received "' + typeof obj_comments + '" (at "' + path_comments + '")');
1318
- }
1319
- })();
1320
- if (obj_comments_union1_error != null) {
1321
- obj_comments_union1 = obj_comments_union1_error.message;
1322
- }
1323
- if (obj_comments_union0 && obj_comments_union1) {
1324
- let message = 'Object doesn\'t match union (at "' + path_comments + '")';
1325
- message += '\n' + obj_comments_union0.split('\n').map((line) => '\t' + line).join('\n');
1326
- message += '\n' + obj_comments_union1.split('\n').map((line) => '\t' + line).join('\n');
1327
- return new TypeError(message);
1328
- }
1329
- const obj_endTimestamp = obj.endTimestamp;
1330
- const path_endTimestamp = path + '.endTimestamp';
1331
- let obj_endTimestamp_union0 = null;
1332
- const obj_endTimestamp_union0_error = (() => {
1333
- if (typeof obj_endTimestamp !== 'string') {
1334
- return new TypeError('Expected "string" but received "' + typeof obj_endTimestamp + '" (at "' + path_endTimestamp + '")');
1335
- }
1336
- })();
1337
- if (obj_endTimestamp_union0_error != null) {
1338
- obj_endTimestamp_union0 = obj_endTimestamp_union0_error.message;
1339
- }
1340
- let obj_endTimestamp_union1 = null;
1341
- const obj_endTimestamp_union1_error = (() => {
1342
- if (obj_endTimestamp !== null) {
1343
- return new TypeError('Expected "null" but received "' + typeof obj_endTimestamp + '" (at "' + path_endTimestamp + '")');
1344
- }
1345
- })();
1346
- if (obj_endTimestamp_union1_error != null) {
1347
- obj_endTimestamp_union1 = obj_endTimestamp_union1_error.message;
1348
- }
1349
- if (obj_endTimestamp_union0 && obj_endTimestamp_union1) {
1350
- let message = 'Object doesn\'t match union (at "' + path_endTimestamp + '")';
1351
- message += '\n' + obj_endTimestamp_union0.split('\n').map((line) => '\t' + line).join('\n');
1352
- message += '\n' + obj_endTimestamp_union1.split('\n').map((line) => '\t' + line).join('\n');
1353
- return new TypeError(message);
1354
- }
1355
- const obj_orchestrationName = obj.orchestrationName;
1356
- const path_orchestrationName = path + '.orchestrationName';
1357
- if (typeof obj_orchestrationName !== 'string') {
1358
- return new TypeError('Expected "string" but received "' + typeof obj_orchestrationName + '" (at "' + path_orchestrationName + '")');
1359
- }
1360
- const obj_orchestrationVersion = obj.orchestrationVersion;
1361
- const path_orchestrationVersion = path + '.orchestrationVersion';
1362
- if (typeof obj_orchestrationVersion !== 'number' || (typeof obj_orchestrationVersion === 'number' && Math.floor(obj_orchestrationVersion) !== obj_orchestrationVersion)) {
1363
- return new TypeError('Expected "integer" but received "' + typeof obj_orchestrationVersion + '" (at "' + path_orchestrationVersion + '")');
1364
- }
1365
- const obj_stageDevName = obj.stageDevName;
1366
- const path_stageDevName = path + '.stageDevName';
1367
- if (typeof obj_stageDevName !== 'string') {
1368
- return new TypeError('Expected "string" but received "' + typeof obj_stageDevName + '" (at "' + path_stageDevName + '")');
1369
- }
1370
- const obj_stageLabel = obj.stageLabel;
1371
- const path_stageLabel = path + '.stageLabel';
1372
- if (typeof obj_stageLabel !== 'string') {
1373
- return new TypeError('Expected "string" but received "' + typeof obj_stageLabel + '" (at "' + path_stageLabel + '")');
1374
- }
1375
- const obj_startTimestamp = obj.startTimestamp;
1376
- const path_startTimestamp = path + '.startTimestamp';
1377
- if (typeof obj_startTimestamp !== 'string') {
1378
- return new TypeError('Expected "string" but received "' + typeof obj_startTimestamp + '" (at "' + path_startTimestamp + '")');
1379
- }
1380
- const obj_status = obj.status;
1381
- const path_status = path + '.status';
1382
- if (typeof obj_status !== 'string') {
1383
- return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
1384
- }
1385
- const obj_stepDevName = obj.stepDevName;
1386
- const path_stepDevName = path + '.stepDevName';
1387
- if (typeof obj_stepDevName !== 'string') {
1388
- return new TypeError('Expected "string" but received "' + typeof obj_stepDevName + '" (at "' + path_stepDevName + '")');
1389
- }
1390
- const obj_stepLabel = obj.stepLabel;
1391
- const path_stepLabel = path + '.stepLabel';
1392
- if (typeof obj_stepLabel !== 'string') {
1393
- return new TypeError('Expected "string" but received "' + typeof obj_stepLabel + '" (at "' + path_stepLabel + '")');
1394
- }
1395
- })();
1396
- return v_error === undefined ? null : v_error;
1397
- }
1398
- const select$2 = function ManagedContentRunningOrchestrationHistoryEventRepresentationSelect() {
1399
- return {
1400
- kind: 'Fragment',
1401
- version: VERSION$1,
1402
- private: [],
1403
- selections: [
1404
- {
1405
- name: 'actorEmail',
1406
- kind: 'Scalar'
1407
- },
1408
- {
1409
- name: 'actorName',
1410
- kind: 'Scalar'
1411
- },
1412
- {
1413
- name: 'assigneeDevNameOrEmail',
1414
- kind: 'Scalar'
1415
- },
1416
- {
1417
- name: 'assigneeName',
1418
- kind: 'Scalar'
1419
- },
1420
- {
1421
- name: 'assigneeType',
1422
- kind: 'Scalar'
1423
- },
1424
- {
1425
- name: 'comments',
1426
- kind: 'Scalar'
1427
- },
1428
- {
1429
- name: 'endTimestamp',
1430
- kind: 'Scalar'
1431
- },
1432
- {
1433
- name: 'orchestrationName',
1434
- kind: 'Scalar'
1435
- },
1436
- {
1437
- name: 'orchestrationVersion',
1438
- kind: 'Scalar'
1439
- },
1440
- {
1441
- name: 'stageDevName',
1442
- kind: 'Scalar'
1443
- },
1444
- {
1445
- name: 'stageLabel',
1446
- kind: 'Scalar'
1447
- },
1448
- {
1449
- name: 'startTimestamp',
1450
- kind: 'Scalar'
1451
- },
1452
- {
1453
- name: 'status',
1454
- kind: 'Scalar'
1455
- },
1456
- {
1457
- name: 'stepDevName',
1458
- kind: 'Scalar'
1459
- },
1460
- {
1461
- name: 'stepLabel',
1462
- kind: 'Scalar'
1463
- }
1464
- ]
1465
- };
1466
- };
1467
- function equals$1(existing, incoming) {
1468
- const existing_orchestrationVersion = existing.orchestrationVersion;
1469
- const incoming_orchestrationVersion = incoming.orchestrationVersion;
1470
- if (!(existing_orchestrationVersion === incoming_orchestrationVersion)) {
1471
- return false;
1472
- }
1473
- const existing_orchestrationName = existing.orchestrationName;
1474
- const incoming_orchestrationName = incoming.orchestrationName;
1475
- if (!(existing_orchestrationName === incoming_orchestrationName)) {
1476
- return false;
1477
- }
1478
- const existing_stageDevName = existing.stageDevName;
1479
- const incoming_stageDevName = incoming.stageDevName;
1480
- if (!(existing_stageDevName === incoming_stageDevName)) {
1481
- return false;
1482
- }
1483
- const existing_stageLabel = existing.stageLabel;
1484
- const incoming_stageLabel = incoming.stageLabel;
1485
- if (!(existing_stageLabel === incoming_stageLabel)) {
1486
- return false;
1487
- }
1488
- const existing_startTimestamp = existing.startTimestamp;
1489
- const incoming_startTimestamp = incoming.startTimestamp;
1490
- if (!(existing_startTimestamp === incoming_startTimestamp)) {
1491
- return false;
1492
- }
1493
- const existing_status = existing.status;
1494
- const incoming_status = incoming.status;
1495
- if (!(existing_status === incoming_status)) {
1496
- return false;
1497
- }
1498
- const existing_stepDevName = existing.stepDevName;
1499
- const incoming_stepDevName = incoming.stepDevName;
1500
- if (!(existing_stepDevName === incoming_stepDevName)) {
1501
- return false;
1502
- }
1503
- const existing_stepLabel = existing.stepLabel;
1504
- const incoming_stepLabel = incoming.stepLabel;
1505
- if (!(existing_stepLabel === incoming_stepLabel)) {
1506
- return false;
1507
- }
1508
- const existing_actorEmail = existing.actorEmail;
1509
- const incoming_actorEmail = incoming.actorEmail;
1510
- if (!(existing_actorEmail === incoming_actorEmail)) {
1511
- return false;
1512
- }
1513
- const existing_actorName = existing.actorName;
1514
- const incoming_actorName = incoming.actorName;
1515
- if (!(existing_actorName === incoming_actorName)) {
1516
- return false;
1517
- }
1518
- const existing_assigneeDevNameOrEmail = existing.assigneeDevNameOrEmail;
1519
- const incoming_assigneeDevNameOrEmail = incoming.assigneeDevNameOrEmail;
1520
- if (!(existing_assigneeDevNameOrEmail === incoming_assigneeDevNameOrEmail)) {
1521
- return false;
1522
- }
1523
- const existing_assigneeName = existing.assigneeName;
1524
- const incoming_assigneeName = incoming.assigneeName;
1525
- if (!(existing_assigneeName === incoming_assigneeName)) {
1526
- return false;
1527
- }
1528
- const existing_assigneeType = existing.assigneeType;
1529
- const incoming_assigneeType = incoming.assigneeType;
1530
- if (!(existing_assigneeType === incoming_assigneeType)) {
1531
- return false;
1532
- }
1533
- const existing_comments = existing.comments;
1534
- const incoming_comments = incoming.comments;
1535
- if (!(existing_comments === incoming_comments)) {
1536
- return false;
1537
- }
1538
- const existing_endTimestamp = existing.endTimestamp;
1539
- const incoming_endTimestamp = incoming.endTimestamp;
1540
- if (!(existing_endTimestamp === incoming_endTimestamp)) {
1541
- return false;
1542
- }
1543
- return true;
1167
+ const VERSION$1 = "5044bf9d6a7c23eadc7dcfa5d49edeca";
1168
+ function validate$1(obj, path = 'ManagedContentRunningOrchestrationHistoryEventRepresentation') {
1169
+ const v_error = (() => {
1170
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1171
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1172
+ }
1173
+ const obj_actorEmail = obj.actorEmail;
1174
+ const path_actorEmail = path + '.actorEmail';
1175
+ let obj_actorEmail_union0 = null;
1176
+ const obj_actorEmail_union0_error = (() => {
1177
+ if (typeof obj_actorEmail !== 'string') {
1178
+ return new TypeError('Expected "string" but received "' + typeof obj_actorEmail + '" (at "' + path_actorEmail + '")');
1179
+ }
1180
+ })();
1181
+ if (obj_actorEmail_union0_error != null) {
1182
+ obj_actorEmail_union0 = obj_actorEmail_union0_error.message;
1183
+ }
1184
+ let obj_actorEmail_union1 = null;
1185
+ const obj_actorEmail_union1_error = (() => {
1186
+ if (obj_actorEmail !== null) {
1187
+ return new TypeError('Expected "null" but received "' + typeof obj_actorEmail + '" (at "' + path_actorEmail + '")');
1188
+ }
1189
+ })();
1190
+ if (obj_actorEmail_union1_error != null) {
1191
+ obj_actorEmail_union1 = obj_actorEmail_union1_error.message;
1192
+ }
1193
+ if (obj_actorEmail_union0 && obj_actorEmail_union1) {
1194
+ let message = 'Object doesn\'t match union (at "' + path_actorEmail + '")';
1195
+ message += '\n' + obj_actorEmail_union0.split('\n').map((line) => '\t' + line).join('\n');
1196
+ message += '\n' + obj_actorEmail_union1.split('\n').map((line) => '\t' + line).join('\n');
1197
+ return new TypeError(message);
1198
+ }
1199
+ const obj_actorName = obj.actorName;
1200
+ const path_actorName = path + '.actorName';
1201
+ let obj_actorName_union0 = null;
1202
+ const obj_actorName_union0_error = (() => {
1203
+ if (typeof obj_actorName !== 'string') {
1204
+ return new TypeError('Expected "string" but received "' + typeof obj_actorName + '" (at "' + path_actorName + '")');
1205
+ }
1206
+ })();
1207
+ if (obj_actorName_union0_error != null) {
1208
+ obj_actorName_union0 = obj_actorName_union0_error.message;
1209
+ }
1210
+ let obj_actorName_union1 = null;
1211
+ const obj_actorName_union1_error = (() => {
1212
+ if (obj_actorName !== null) {
1213
+ return new TypeError('Expected "null" but received "' + typeof obj_actorName + '" (at "' + path_actorName + '")');
1214
+ }
1215
+ })();
1216
+ if (obj_actorName_union1_error != null) {
1217
+ obj_actorName_union1 = obj_actorName_union1_error.message;
1218
+ }
1219
+ if (obj_actorName_union0 && obj_actorName_union1) {
1220
+ let message = 'Object doesn\'t match union (at "' + path_actorName + '")';
1221
+ message += '\n' + obj_actorName_union0.split('\n').map((line) => '\t' + line).join('\n');
1222
+ message += '\n' + obj_actorName_union1.split('\n').map((line) => '\t' + line).join('\n');
1223
+ return new TypeError(message);
1224
+ }
1225
+ const obj_assigneeDevNameOrEmail = obj.assigneeDevNameOrEmail;
1226
+ const path_assigneeDevNameOrEmail = path + '.assigneeDevNameOrEmail';
1227
+ let obj_assigneeDevNameOrEmail_union0 = null;
1228
+ const obj_assigneeDevNameOrEmail_union0_error = (() => {
1229
+ if (typeof obj_assigneeDevNameOrEmail !== 'string') {
1230
+ return new TypeError('Expected "string" but received "' + typeof obj_assigneeDevNameOrEmail + '" (at "' + path_assigneeDevNameOrEmail + '")');
1231
+ }
1232
+ })();
1233
+ if (obj_assigneeDevNameOrEmail_union0_error != null) {
1234
+ obj_assigneeDevNameOrEmail_union0 = obj_assigneeDevNameOrEmail_union0_error.message;
1235
+ }
1236
+ let obj_assigneeDevNameOrEmail_union1 = null;
1237
+ const obj_assigneeDevNameOrEmail_union1_error = (() => {
1238
+ if (obj_assigneeDevNameOrEmail !== null) {
1239
+ return new TypeError('Expected "null" but received "' + typeof obj_assigneeDevNameOrEmail + '" (at "' + path_assigneeDevNameOrEmail + '")');
1240
+ }
1241
+ })();
1242
+ if (obj_assigneeDevNameOrEmail_union1_error != null) {
1243
+ obj_assigneeDevNameOrEmail_union1 = obj_assigneeDevNameOrEmail_union1_error.message;
1244
+ }
1245
+ if (obj_assigneeDevNameOrEmail_union0 && obj_assigneeDevNameOrEmail_union1) {
1246
+ let message = 'Object doesn\'t match union (at "' + path_assigneeDevNameOrEmail + '")';
1247
+ message += '\n' + obj_assigneeDevNameOrEmail_union0.split('\n').map((line) => '\t' + line).join('\n');
1248
+ message += '\n' + obj_assigneeDevNameOrEmail_union1.split('\n').map((line) => '\t' + line).join('\n');
1249
+ return new TypeError(message);
1250
+ }
1251
+ const obj_assigneeName = obj.assigneeName;
1252
+ const path_assigneeName = path + '.assigneeName';
1253
+ let obj_assigneeName_union0 = null;
1254
+ const obj_assigneeName_union0_error = (() => {
1255
+ if (typeof obj_assigneeName !== 'string') {
1256
+ return new TypeError('Expected "string" but received "' + typeof obj_assigneeName + '" (at "' + path_assigneeName + '")');
1257
+ }
1258
+ })();
1259
+ if (obj_assigneeName_union0_error != null) {
1260
+ obj_assigneeName_union0 = obj_assigneeName_union0_error.message;
1261
+ }
1262
+ let obj_assigneeName_union1 = null;
1263
+ const obj_assigneeName_union1_error = (() => {
1264
+ if (obj_assigneeName !== null) {
1265
+ return new TypeError('Expected "null" but received "' + typeof obj_assigneeName + '" (at "' + path_assigneeName + '")');
1266
+ }
1267
+ })();
1268
+ if (obj_assigneeName_union1_error != null) {
1269
+ obj_assigneeName_union1 = obj_assigneeName_union1_error.message;
1270
+ }
1271
+ if (obj_assigneeName_union0 && obj_assigneeName_union1) {
1272
+ let message = 'Object doesn\'t match union (at "' + path_assigneeName + '")';
1273
+ message += '\n' + obj_assigneeName_union0.split('\n').map((line) => '\t' + line).join('\n');
1274
+ message += '\n' + obj_assigneeName_union1.split('\n').map((line) => '\t' + line).join('\n');
1275
+ return new TypeError(message);
1276
+ }
1277
+ const obj_assigneeType = obj.assigneeType;
1278
+ const path_assigneeType = path + '.assigneeType';
1279
+ let obj_assigneeType_union0 = null;
1280
+ const obj_assigneeType_union0_error = (() => {
1281
+ if (typeof obj_assigneeType !== 'string') {
1282
+ return new TypeError('Expected "string" but received "' + typeof obj_assigneeType + '" (at "' + path_assigneeType + '")');
1283
+ }
1284
+ })();
1285
+ if (obj_assigneeType_union0_error != null) {
1286
+ obj_assigneeType_union0 = obj_assigneeType_union0_error.message;
1287
+ }
1288
+ let obj_assigneeType_union1 = null;
1289
+ const obj_assigneeType_union1_error = (() => {
1290
+ if (obj_assigneeType !== null) {
1291
+ return new TypeError('Expected "null" but received "' + typeof obj_assigneeType + '" (at "' + path_assigneeType + '")');
1292
+ }
1293
+ })();
1294
+ if (obj_assigneeType_union1_error != null) {
1295
+ obj_assigneeType_union1 = obj_assigneeType_union1_error.message;
1296
+ }
1297
+ if (obj_assigneeType_union0 && obj_assigneeType_union1) {
1298
+ let message = 'Object doesn\'t match union (at "' + path_assigneeType + '")';
1299
+ message += '\n' + obj_assigneeType_union0.split('\n').map((line) => '\t' + line).join('\n');
1300
+ message += '\n' + obj_assigneeType_union1.split('\n').map((line) => '\t' + line).join('\n');
1301
+ return new TypeError(message);
1302
+ }
1303
+ const obj_comments = obj.comments;
1304
+ const path_comments = path + '.comments';
1305
+ let obj_comments_union0 = null;
1306
+ const obj_comments_union0_error = (() => {
1307
+ if (typeof obj_comments !== 'string') {
1308
+ return new TypeError('Expected "string" but received "' + typeof obj_comments + '" (at "' + path_comments + '")');
1309
+ }
1310
+ })();
1311
+ if (obj_comments_union0_error != null) {
1312
+ obj_comments_union0 = obj_comments_union0_error.message;
1313
+ }
1314
+ let obj_comments_union1 = null;
1315
+ const obj_comments_union1_error = (() => {
1316
+ if (obj_comments !== null) {
1317
+ return new TypeError('Expected "null" but received "' + typeof obj_comments + '" (at "' + path_comments + '")');
1318
+ }
1319
+ })();
1320
+ if (obj_comments_union1_error != null) {
1321
+ obj_comments_union1 = obj_comments_union1_error.message;
1322
+ }
1323
+ if (obj_comments_union0 && obj_comments_union1) {
1324
+ let message = 'Object doesn\'t match union (at "' + path_comments + '")';
1325
+ message += '\n' + obj_comments_union0.split('\n').map((line) => '\t' + line).join('\n');
1326
+ message += '\n' + obj_comments_union1.split('\n').map((line) => '\t' + line).join('\n');
1327
+ return new TypeError(message);
1328
+ }
1329
+ const obj_endTimestamp = obj.endTimestamp;
1330
+ const path_endTimestamp = path + '.endTimestamp';
1331
+ let obj_endTimestamp_union0 = null;
1332
+ const obj_endTimestamp_union0_error = (() => {
1333
+ if (typeof obj_endTimestamp !== 'string') {
1334
+ return new TypeError('Expected "string" but received "' + typeof obj_endTimestamp + '" (at "' + path_endTimestamp + '")');
1335
+ }
1336
+ })();
1337
+ if (obj_endTimestamp_union0_error != null) {
1338
+ obj_endTimestamp_union0 = obj_endTimestamp_union0_error.message;
1339
+ }
1340
+ let obj_endTimestamp_union1 = null;
1341
+ const obj_endTimestamp_union1_error = (() => {
1342
+ if (obj_endTimestamp !== null) {
1343
+ return new TypeError('Expected "null" but received "' + typeof obj_endTimestamp + '" (at "' + path_endTimestamp + '")');
1344
+ }
1345
+ })();
1346
+ if (obj_endTimestamp_union1_error != null) {
1347
+ obj_endTimestamp_union1 = obj_endTimestamp_union1_error.message;
1348
+ }
1349
+ if (obj_endTimestamp_union0 && obj_endTimestamp_union1) {
1350
+ let message = 'Object doesn\'t match union (at "' + path_endTimestamp + '")';
1351
+ message += '\n' + obj_endTimestamp_union0.split('\n').map((line) => '\t' + line).join('\n');
1352
+ message += '\n' + obj_endTimestamp_union1.split('\n').map((line) => '\t' + line).join('\n');
1353
+ return new TypeError(message);
1354
+ }
1355
+ const obj_orchestrationName = obj.orchestrationName;
1356
+ const path_orchestrationName = path + '.orchestrationName';
1357
+ if (typeof obj_orchestrationName !== 'string') {
1358
+ return new TypeError('Expected "string" but received "' + typeof obj_orchestrationName + '" (at "' + path_orchestrationName + '")');
1359
+ }
1360
+ const obj_orchestrationVersion = obj.orchestrationVersion;
1361
+ const path_orchestrationVersion = path + '.orchestrationVersion';
1362
+ if (typeof obj_orchestrationVersion !== 'number' || (typeof obj_orchestrationVersion === 'number' && Math.floor(obj_orchestrationVersion) !== obj_orchestrationVersion)) {
1363
+ return new TypeError('Expected "integer" but received "' + typeof obj_orchestrationVersion + '" (at "' + path_orchestrationVersion + '")');
1364
+ }
1365
+ const obj_stageDevName = obj.stageDevName;
1366
+ const path_stageDevName = path + '.stageDevName';
1367
+ if (typeof obj_stageDevName !== 'string') {
1368
+ return new TypeError('Expected "string" but received "' + typeof obj_stageDevName + '" (at "' + path_stageDevName + '")');
1369
+ }
1370
+ const obj_stageLabel = obj.stageLabel;
1371
+ const path_stageLabel = path + '.stageLabel';
1372
+ if (typeof obj_stageLabel !== 'string') {
1373
+ return new TypeError('Expected "string" but received "' + typeof obj_stageLabel + '" (at "' + path_stageLabel + '")');
1374
+ }
1375
+ const obj_startTimestamp = obj.startTimestamp;
1376
+ const path_startTimestamp = path + '.startTimestamp';
1377
+ if (typeof obj_startTimestamp !== 'string') {
1378
+ return new TypeError('Expected "string" but received "' + typeof obj_startTimestamp + '" (at "' + path_startTimestamp + '")');
1379
+ }
1380
+ const obj_status = obj.status;
1381
+ const path_status = path + '.status';
1382
+ if (typeof obj_status !== 'string') {
1383
+ return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
1384
+ }
1385
+ const obj_stepDevName = obj.stepDevName;
1386
+ const path_stepDevName = path + '.stepDevName';
1387
+ if (typeof obj_stepDevName !== 'string') {
1388
+ return new TypeError('Expected "string" but received "' + typeof obj_stepDevName + '" (at "' + path_stepDevName + '")');
1389
+ }
1390
+ const obj_stepLabel = obj.stepLabel;
1391
+ const path_stepLabel = path + '.stepLabel';
1392
+ if (typeof obj_stepLabel !== 'string') {
1393
+ return new TypeError('Expected "string" but received "' + typeof obj_stepLabel + '" (at "' + path_stepLabel + '")');
1394
+ }
1395
+ })();
1396
+ return v_error === undefined ? null : v_error;
1397
+ }
1398
+ const select$2 = function ManagedContentRunningOrchestrationHistoryEventRepresentationSelect() {
1399
+ return {
1400
+ kind: 'Fragment',
1401
+ version: VERSION$1,
1402
+ private: [],
1403
+ selections: [
1404
+ {
1405
+ name: 'actorEmail',
1406
+ kind: 'Scalar'
1407
+ },
1408
+ {
1409
+ name: 'actorName',
1410
+ kind: 'Scalar'
1411
+ },
1412
+ {
1413
+ name: 'assigneeDevNameOrEmail',
1414
+ kind: 'Scalar'
1415
+ },
1416
+ {
1417
+ name: 'assigneeName',
1418
+ kind: 'Scalar'
1419
+ },
1420
+ {
1421
+ name: 'assigneeType',
1422
+ kind: 'Scalar'
1423
+ },
1424
+ {
1425
+ name: 'comments',
1426
+ kind: 'Scalar'
1427
+ },
1428
+ {
1429
+ name: 'endTimestamp',
1430
+ kind: 'Scalar'
1431
+ },
1432
+ {
1433
+ name: 'orchestrationName',
1434
+ kind: 'Scalar'
1435
+ },
1436
+ {
1437
+ name: 'orchestrationVersion',
1438
+ kind: 'Scalar'
1439
+ },
1440
+ {
1441
+ name: 'stageDevName',
1442
+ kind: 'Scalar'
1443
+ },
1444
+ {
1445
+ name: 'stageLabel',
1446
+ kind: 'Scalar'
1447
+ },
1448
+ {
1449
+ name: 'startTimestamp',
1450
+ kind: 'Scalar'
1451
+ },
1452
+ {
1453
+ name: 'status',
1454
+ kind: 'Scalar'
1455
+ },
1456
+ {
1457
+ name: 'stepDevName',
1458
+ kind: 'Scalar'
1459
+ },
1460
+ {
1461
+ name: 'stepLabel',
1462
+ kind: 'Scalar'
1463
+ }
1464
+ ]
1465
+ };
1466
+ };
1467
+ function equals$1(existing, incoming) {
1468
+ const existing_orchestrationVersion = existing.orchestrationVersion;
1469
+ const incoming_orchestrationVersion = incoming.orchestrationVersion;
1470
+ if (!(existing_orchestrationVersion === incoming_orchestrationVersion)) {
1471
+ return false;
1472
+ }
1473
+ const existing_orchestrationName = existing.orchestrationName;
1474
+ const incoming_orchestrationName = incoming.orchestrationName;
1475
+ if (!(existing_orchestrationName === incoming_orchestrationName)) {
1476
+ return false;
1477
+ }
1478
+ const existing_stageDevName = existing.stageDevName;
1479
+ const incoming_stageDevName = incoming.stageDevName;
1480
+ if (!(existing_stageDevName === incoming_stageDevName)) {
1481
+ return false;
1482
+ }
1483
+ const existing_stageLabel = existing.stageLabel;
1484
+ const incoming_stageLabel = incoming.stageLabel;
1485
+ if (!(existing_stageLabel === incoming_stageLabel)) {
1486
+ return false;
1487
+ }
1488
+ const existing_startTimestamp = existing.startTimestamp;
1489
+ const incoming_startTimestamp = incoming.startTimestamp;
1490
+ if (!(existing_startTimestamp === incoming_startTimestamp)) {
1491
+ return false;
1492
+ }
1493
+ const existing_status = existing.status;
1494
+ const incoming_status = incoming.status;
1495
+ if (!(existing_status === incoming_status)) {
1496
+ return false;
1497
+ }
1498
+ const existing_stepDevName = existing.stepDevName;
1499
+ const incoming_stepDevName = incoming.stepDevName;
1500
+ if (!(existing_stepDevName === incoming_stepDevName)) {
1501
+ return false;
1502
+ }
1503
+ const existing_stepLabel = existing.stepLabel;
1504
+ const incoming_stepLabel = incoming.stepLabel;
1505
+ if (!(existing_stepLabel === incoming_stepLabel)) {
1506
+ return false;
1507
+ }
1508
+ const existing_actorEmail = existing.actorEmail;
1509
+ const incoming_actorEmail = incoming.actorEmail;
1510
+ if (!(existing_actorEmail === incoming_actorEmail)) {
1511
+ return false;
1512
+ }
1513
+ const existing_actorName = existing.actorName;
1514
+ const incoming_actorName = incoming.actorName;
1515
+ if (!(existing_actorName === incoming_actorName)) {
1516
+ return false;
1517
+ }
1518
+ const existing_assigneeDevNameOrEmail = existing.assigneeDevNameOrEmail;
1519
+ const incoming_assigneeDevNameOrEmail = incoming.assigneeDevNameOrEmail;
1520
+ if (!(existing_assigneeDevNameOrEmail === incoming_assigneeDevNameOrEmail)) {
1521
+ return false;
1522
+ }
1523
+ const existing_assigneeName = existing.assigneeName;
1524
+ const incoming_assigneeName = incoming.assigneeName;
1525
+ if (!(existing_assigneeName === incoming_assigneeName)) {
1526
+ return false;
1527
+ }
1528
+ const existing_assigneeType = existing.assigneeType;
1529
+ const incoming_assigneeType = incoming.assigneeType;
1530
+ if (!(existing_assigneeType === incoming_assigneeType)) {
1531
+ return false;
1532
+ }
1533
+ const existing_comments = existing.comments;
1534
+ const incoming_comments = incoming.comments;
1535
+ if (!(existing_comments === incoming_comments)) {
1536
+ return false;
1537
+ }
1538
+ const existing_endTimestamp = existing.endTimestamp;
1539
+ const incoming_endTimestamp = incoming.endTimestamp;
1540
+ if (!(existing_endTimestamp === incoming_endTimestamp)) {
1541
+ return false;
1542
+ }
1543
+ return true;
1544
1544
  }
1545
1545
 
1546
- const TTL = 100;
1547
- const VERSION = "8d2b53591bb32ebdac40a28e64c15c48";
1548
- function validate(obj, path = 'ManagedContentRunningOrchestrationHistoryEventCollectionRepresentation') {
1549
- const v_error = (() => {
1550
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1551
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1552
- }
1553
- const obj_historyEvents = obj.historyEvents;
1554
- const path_historyEvents = path + '.historyEvents';
1555
- if (!ArrayIsArray(obj_historyEvents)) {
1556
- return new TypeError('Expected "array" but received "' + typeof obj_historyEvents + '" (at "' + path_historyEvents + '")');
1557
- }
1558
- for (let i = 0; i < obj_historyEvents.length; i++) {
1559
- const obj_historyEvents_item = obj_historyEvents[i];
1560
- const path_historyEvents_item = path_historyEvents + '[' + i + ']';
1561
- const referencepath_historyEvents_itemValidationError = validate$1(obj_historyEvents_item, path_historyEvents_item);
1562
- if (referencepath_historyEvents_itemValidationError !== null) {
1563
- let message = 'Object doesn\'t match ManagedContentRunningOrchestrationHistoryEventRepresentation (at "' + path_historyEvents_item + '")\n';
1564
- message += referencepath_historyEvents_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1565
- return new TypeError(message);
1566
- }
1567
- }
1568
- })();
1569
- return v_error === undefined ? null : v_error;
1570
- }
1571
- const RepresentationType = 'ManagedContentRunningOrchestrationHistoryEventCollectionRepresentation';
1572
- function normalize(input, existing, path, luvio, store, timestamp) {
1573
- return input;
1574
- }
1575
- const select$1 = function ManagedContentRunningOrchestrationHistoryEventCollectionRepresentationSelect() {
1576
- const { selections: ManagedContentRunningOrchestrationHistoryEventRepresentation__selections, opaque: ManagedContentRunningOrchestrationHistoryEventRepresentation__opaque, } = select$2();
1577
- return {
1578
- kind: 'Fragment',
1579
- version: VERSION,
1580
- private: [],
1581
- selections: [
1582
- {
1583
- name: 'historyEvents',
1584
- kind: 'Object',
1585
- plural: true,
1586
- selections: ManagedContentRunningOrchestrationHistoryEventRepresentation__selections
1587
- }
1588
- ]
1589
- };
1590
- };
1591
- function equals(existing, incoming) {
1592
- const existing_historyEvents = existing.historyEvents;
1593
- const incoming_historyEvents = incoming.historyEvents;
1594
- const equals_historyEvents_items = equalsArray(existing_historyEvents, incoming_historyEvents, (existing_historyEvents_item, incoming_historyEvents_item) => {
1595
- if (!(equals$1(existing_historyEvents_item, incoming_historyEvents_item))) {
1596
- return false;
1597
- }
1598
- });
1599
- if (equals_historyEvents_items === false) {
1600
- return false;
1601
- }
1602
- return true;
1603
- }
1604
- const ingest = function ManagedContentRunningOrchestrationHistoryEventCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
1605
- if (process.env.NODE_ENV !== 'production') {
1606
- const validateError = validate(input);
1607
- if (validateError !== null) {
1608
- throw validateError;
1609
- }
1610
- }
1611
- const key = path.fullPath;
1612
- const existingRecord = store.readEntry(key);
1613
- const ttlToUse = TTL;
1614
- let incomingRecord = normalize(input, store.readEntry(key), {
1615
- fullPath: key,
1616
- parent: path.parent,
1617
- propertyName: path.propertyName,
1618
- ttl: ttlToUse
1619
- });
1620
- if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
1621
- luvio.storePublish(key, incomingRecord);
1622
- }
1623
- {
1624
- const storeMetadataParams = {
1625
- ttl: ttlToUse,
1626
- namespace: "CMSOrchestrator",
1627
- version: VERSION,
1628
- representationName: RepresentationType,
1629
- };
1630
- luvio.publishStoreMetadata(key, storeMetadataParams);
1631
- }
1632
- return createLink(key);
1633
- };
1634
- function getTypeCacheKeys(luvio, input, fullPathFactory) {
1635
- const rootKeySet = new StoreKeyMap();
1636
- // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1637
- const rootKey = fullPathFactory();
1638
- rootKeySet.set(rootKey, {
1639
- namespace: keyPrefix,
1640
- representationName: RepresentationType,
1641
- mergeable: false
1642
- });
1643
- return rootKeySet;
1546
+ const TTL = 100;
1547
+ const VERSION = "8d2b53591bb32ebdac40a28e64c15c48";
1548
+ function validate(obj, path = 'ManagedContentRunningOrchestrationHistoryEventCollectionRepresentation') {
1549
+ const v_error = (() => {
1550
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1551
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1552
+ }
1553
+ const obj_historyEvents = obj.historyEvents;
1554
+ const path_historyEvents = path + '.historyEvents';
1555
+ if (!ArrayIsArray(obj_historyEvents)) {
1556
+ return new TypeError('Expected "array" but received "' + typeof obj_historyEvents + '" (at "' + path_historyEvents + '")');
1557
+ }
1558
+ for (let i = 0; i < obj_historyEvents.length; i++) {
1559
+ const obj_historyEvents_item = obj_historyEvents[i];
1560
+ const path_historyEvents_item = path_historyEvents + '[' + i + ']';
1561
+ const referencepath_historyEvents_itemValidationError = validate$1(obj_historyEvents_item, path_historyEvents_item);
1562
+ if (referencepath_historyEvents_itemValidationError !== null) {
1563
+ let message = 'Object doesn\'t match ManagedContentRunningOrchestrationHistoryEventRepresentation (at "' + path_historyEvents_item + '")\n';
1564
+ message += referencepath_historyEvents_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1565
+ return new TypeError(message);
1566
+ }
1567
+ }
1568
+ })();
1569
+ return v_error === undefined ? null : v_error;
1570
+ }
1571
+ const RepresentationType = 'ManagedContentRunningOrchestrationHistoryEventCollectionRepresentation';
1572
+ function normalize(input, existing, path, luvio, store, timestamp) {
1573
+ return input;
1574
+ }
1575
+ const select$1 = function ManagedContentRunningOrchestrationHistoryEventCollectionRepresentationSelect() {
1576
+ const { selections: ManagedContentRunningOrchestrationHistoryEventRepresentation__selections, opaque: ManagedContentRunningOrchestrationHistoryEventRepresentation__opaque, } = select$2();
1577
+ return {
1578
+ kind: 'Fragment',
1579
+ version: VERSION,
1580
+ private: [],
1581
+ selections: [
1582
+ {
1583
+ name: 'historyEvents',
1584
+ kind: 'Object',
1585
+ plural: true,
1586
+ selections: ManagedContentRunningOrchestrationHistoryEventRepresentation__selections
1587
+ }
1588
+ ]
1589
+ };
1590
+ };
1591
+ function equals(existing, incoming) {
1592
+ const existing_historyEvents = existing.historyEvents;
1593
+ const incoming_historyEvents = incoming.historyEvents;
1594
+ const equals_historyEvents_items = equalsArray(existing_historyEvents, incoming_historyEvents, (existing_historyEvents_item, incoming_historyEvents_item) => {
1595
+ if (!(equals$1(existing_historyEvents_item, incoming_historyEvents_item))) {
1596
+ return false;
1597
+ }
1598
+ });
1599
+ if (equals_historyEvents_items === false) {
1600
+ return false;
1601
+ }
1602
+ return true;
1603
+ }
1604
+ const ingest = function ManagedContentRunningOrchestrationHistoryEventCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
1605
+ if (process.env.NODE_ENV !== 'production') {
1606
+ const validateError = validate(input);
1607
+ if (validateError !== null) {
1608
+ throw validateError;
1609
+ }
1610
+ }
1611
+ const key = path.fullPath;
1612
+ const existingRecord = store.readEntry(key);
1613
+ const ttlToUse = TTL;
1614
+ let incomingRecord = normalize(input, store.readEntry(key), {
1615
+ fullPath: key,
1616
+ parent: path.parent,
1617
+ propertyName: path.propertyName,
1618
+ ttl: ttlToUse
1619
+ });
1620
+ if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
1621
+ luvio.storePublish(key, incomingRecord);
1622
+ }
1623
+ {
1624
+ const storeMetadataParams = {
1625
+ ttl: ttlToUse,
1626
+ namespace: "CMSOrchestrator",
1627
+ version: VERSION,
1628
+ representationName: RepresentationType,
1629
+ };
1630
+ luvio.publishStoreMetadata(key, storeMetadataParams);
1631
+ }
1632
+ return createLink(key);
1633
+ };
1634
+ function getTypeCacheKeys(luvio, input, fullPathFactory) {
1635
+ const rootKeySet = new StoreKeyMap();
1636
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1637
+ const rootKey = fullPathFactory();
1638
+ rootKeySet.set(rootKey, {
1639
+ namespace: keyPrefix,
1640
+ representationName: RepresentationType,
1641
+ mergeable: false
1642
+ });
1643
+ return rootKeySet;
1644
1644
  }
1645
1645
 
1646
- function select(luvio, params) {
1647
- return select$1();
1648
- }
1649
- function keyBuilder$1(luvio, params) {
1650
- return keyPrefix + '::ManagedContentRunningOrchestrationHistoryEventCollectionRepresentation:(' + 'managedContentVariantId:' + params.queryParams.managedContentVariantId + ')';
1651
- }
1652
- function getResponseCacheKeys(luvio, resourceParams, response) {
1653
- return getTypeCacheKeys(luvio, response, () => keyBuilder$1(luvio, resourceParams));
1654
- }
1655
- function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
1656
- const { body } = response;
1657
- const key = keyBuilder$1(luvio, resourceParams);
1658
- luvio.storeIngest(key, ingest, body);
1659
- const snapshot = luvio.storeLookup({
1660
- recordId: key,
1661
- node: select(),
1662
- variables: {},
1663
- }, snapshotRefresh);
1664
- if (process.env.NODE_ENV !== 'production') {
1665
- if (snapshot.state !== 'Fulfilled') {
1666
- throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1667
- }
1668
- }
1669
- return snapshot;
1670
- }
1671
- function ingestError(luvio, params, error, snapshotRefresh) {
1672
- const key = keyBuilder$1(luvio, params);
1673
- const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1674
- const storeMetadataParams = {
1675
- ttl: TTL,
1676
- namespace: keyPrefix,
1677
- version: VERSION,
1678
- representationName: RepresentationType
1679
- };
1680
- luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1681
- return errorSnapshot;
1682
- }
1683
- function createResourceRequest(config) {
1684
- const headers = {};
1685
- return {
1686
- baseUri: '/services/data/v58.0',
1687
- basePath: '/connect/cms/contents/orchestration-history-events',
1688
- method: 'get',
1689
- body: null,
1690
- urlParams: {},
1691
- queryParams: config.queryParams,
1692
- headers,
1693
- priority: 'normal',
1694
- };
1646
+ function select(luvio, params) {
1647
+ return select$1();
1648
+ }
1649
+ function keyBuilder$1(luvio, params) {
1650
+ return keyPrefix + '::ManagedContentRunningOrchestrationHistoryEventCollectionRepresentation:(' + 'managedContentVariantId:' + params.queryParams.managedContentVariantId + ')';
1651
+ }
1652
+ function getResponseCacheKeys(luvio, resourceParams, response) {
1653
+ return getTypeCacheKeys(luvio, response, () => keyBuilder$1(luvio, resourceParams));
1654
+ }
1655
+ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
1656
+ const { body } = response;
1657
+ const key = keyBuilder$1(luvio, resourceParams);
1658
+ luvio.storeIngest(key, ingest, body);
1659
+ const snapshot = luvio.storeLookup({
1660
+ recordId: key,
1661
+ node: select(),
1662
+ variables: {},
1663
+ }, snapshotRefresh);
1664
+ if (process.env.NODE_ENV !== 'production') {
1665
+ if (snapshot.state !== 'Fulfilled') {
1666
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1667
+ }
1668
+ }
1669
+ return snapshot;
1670
+ }
1671
+ function ingestError(luvio, params, error, snapshotRefresh) {
1672
+ const key = keyBuilder$1(luvio, params);
1673
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1674
+ const storeMetadataParams = {
1675
+ ttl: TTL,
1676
+ namespace: keyPrefix,
1677
+ version: VERSION,
1678
+ representationName: RepresentationType
1679
+ };
1680
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1681
+ return errorSnapshot;
1682
+ }
1683
+ function createResourceRequest(config) {
1684
+ const headers = {};
1685
+ return {
1686
+ baseUri: '/services/data/v58.0',
1687
+ basePath: '/connect/cms/contents/orchestration-history-events',
1688
+ method: 'get',
1689
+ body: null,
1690
+ urlParams: {},
1691
+ queryParams: config.queryParams,
1692
+ headers,
1693
+ priority: 'normal',
1694
+ };
1695
1695
  }
1696
1696
 
1697
- const getManagedContentRunningOrchestrationHistoryEvents_ConfigPropertyNames = {
1698
- displayName: 'getManagedContentRunningOrchestrationHistoryEvents',
1699
- parameters: {
1700
- required: [],
1701
- optional: ['managedContentVariantId']
1702
- }
1703
- };
1704
- function createResourceParams(config) {
1705
- const resourceParams = {
1706
- queryParams: {
1707
- managedContentVariantId: config.managedContentVariantId
1708
- }
1709
- };
1710
- return resourceParams;
1711
- }
1712
- function keyBuilder(luvio, config) {
1713
- const resourceParams = createResourceParams(config);
1714
- return keyBuilder$1(luvio, resourceParams);
1715
- }
1716
- function typeCheckConfig(untrustedConfig) {
1717
- const config = {};
1718
- const untrustedConfig_managedContentVariantId = untrustedConfig.managedContentVariantId;
1719
- if (typeof untrustedConfig_managedContentVariantId === 'string') {
1720
- config.managedContentVariantId = untrustedConfig_managedContentVariantId;
1721
- }
1722
- return config;
1723
- }
1724
- function validateAdapterConfig(untrustedConfig, configPropertyNames) {
1725
- if (!untrustedIsObject(untrustedConfig)) {
1726
- return null;
1727
- }
1728
- if (process.env.NODE_ENV !== 'production') {
1729
- validateConfig(untrustedConfig, configPropertyNames);
1730
- }
1731
- const config = typeCheckConfig(untrustedConfig);
1732
- if (!areRequiredParametersPresent(config, configPropertyNames)) {
1733
- return null;
1734
- }
1735
- return config;
1736
- }
1737
- function adapterFragment(luvio, config) {
1738
- createResourceParams(config);
1739
- return select();
1740
- }
1741
- function onFetchResponseSuccess(luvio, config, resourceParams, response) {
1742
- const snapshot = ingestSuccess(luvio, resourceParams, response, {
1743
- config,
1744
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1745
- });
1746
- return luvio.storeBroadcast().then(() => snapshot);
1747
- }
1748
- function onFetchResponseError(luvio, config, resourceParams, response) {
1749
- const snapshot = ingestError(luvio, resourceParams, response, {
1750
- config,
1751
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1752
- });
1753
- return luvio.storeBroadcast().then(() => snapshot);
1754
- }
1755
- function buildNetworkSnapshot(luvio, config, options) {
1756
- const resourceParams = createResourceParams(config);
1757
- const request = createResourceRequest(resourceParams);
1758
- return luvio.dispatchResourceRequest(request, options)
1759
- .then((response) => {
1760
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => getResponseCacheKeys(luvio, resourceParams, response.body));
1761
- }, (response) => {
1762
- return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
1763
- });
1764
- }
1765
- function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
1766
- const { luvio, config } = context;
1767
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
1768
- const dispatchOptions = {
1769
- resourceRequestContext: {
1770
- requestCorrelator,
1771
- luvioRequestMethod: undefined,
1772
- },
1773
- eventObservers
1774
- };
1775
- if (networkPriority !== 'normal') {
1776
- dispatchOptions.overrides = {
1777
- priority: networkPriority
1778
- };
1779
- }
1780
- return buildNetworkSnapshot(luvio, config, dispatchOptions);
1781
- }
1782
- function buildCachedSnapshotCachePolicy(context, storeLookup) {
1783
- const { luvio, config } = context;
1784
- const selector = {
1785
- recordId: keyBuilder(luvio, config),
1786
- node: adapterFragment(luvio, config),
1787
- variables: {},
1788
- };
1789
- const cacheSnapshot = storeLookup(selector, {
1790
- config,
1791
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1792
- });
1793
- return cacheSnapshot;
1794
- }
1795
- const getManagedContentRunningOrchestrationHistoryEventsAdapterFactory = (luvio) => function CMSOrchestrator__getManagedContentRunningOrchestrationHistoryEvents(untrustedConfig, requestContext) {
1796
- const config = validateAdapterConfig(untrustedConfig, getManagedContentRunningOrchestrationHistoryEvents_ConfigPropertyNames);
1797
- // Invalid or incomplete config
1798
- if (config === null) {
1799
- return null;
1800
- }
1801
- return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1802
- buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
1697
+ const getManagedContentRunningOrchestrationHistoryEvents_ConfigPropertyNames = {
1698
+ displayName: 'getManagedContentRunningOrchestrationHistoryEvents',
1699
+ parameters: {
1700
+ required: [],
1701
+ optional: ['managedContentVariantId']
1702
+ }
1703
+ };
1704
+ function createResourceParams(config) {
1705
+ const resourceParams = {
1706
+ queryParams: {
1707
+ managedContentVariantId: config.managedContentVariantId
1708
+ }
1709
+ };
1710
+ return resourceParams;
1711
+ }
1712
+ function keyBuilder(luvio, config) {
1713
+ const resourceParams = createResourceParams(config);
1714
+ return keyBuilder$1(luvio, resourceParams);
1715
+ }
1716
+ function typeCheckConfig(untrustedConfig) {
1717
+ const config = {};
1718
+ const untrustedConfig_managedContentVariantId = untrustedConfig.managedContentVariantId;
1719
+ if (typeof untrustedConfig_managedContentVariantId === 'string') {
1720
+ config.managedContentVariantId = untrustedConfig_managedContentVariantId;
1721
+ }
1722
+ return config;
1723
+ }
1724
+ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
1725
+ if (!untrustedIsObject(untrustedConfig)) {
1726
+ return null;
1727
+ }
1728
+ if (process.env.NODE_ENV !== 'production') {
1729
+ validateConfig(untrustedConfig, configPropertyNames);
1730
+ }
1731
+ const config = typeCheckConfig(untrustedConfig);
1732
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1733
+ return null;
1734
+ }
1735
+ return config;
1736
+ }
1737
+ function adapterFragment(luvio, config) {
1738
+ createResourceParams(config);
1739
+ return select();
1740
+ }
1741
+ function onFetchResponseSuccess(luvio, config, resourceParams, response) {
1742
+ const snapshot = ingestSuccess(luvio, resourceParams, response, {
1743
+ config,
1744
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1745
+ });
1746
+ return luvio.storeBroadcast().then(() => snapshot);
1747
+ }
1748
+ function onFetchResponseError(luvio, config, resourceParams, response) {
1749
+ const snapshot = ingestError(luvio, resourceParams, response, {
1750
+ config,
1751
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1752
+ });
1753
+ return luvio.storeBroadcast().then(() => snapshot);
1754
+ }
1755
+ function buildNetworkSnapshot(luvio, config, options) {
1756
+ const resourceParams = createResourceParams(config);
1757
+ const request = createResourceRequest(resourceParams);
1758
+ return luvio.dispatchResourceRequest(request, options)
1759
+ .then((response) => {
1760
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => getResponseCacheKeys(luvio, resourceParams, response.body));
1761
+ }, (response) => {
1762
+ return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
1763
+ });
1764
+ }
1765
+ function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
1766
+ const { luvio, config } = context;
1767
+ const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
1768
+ const dispatchOptions = {
1769
+ resourceRequestContext: {
1770
+ requestCorrelator,
1771
+ luvioRequestMethod: undefined,
1772
+ },
1773
+ eventObservers
1774
+ };
1775
+ if (networkPriority !== 'normal') {
1776
+ dispatchOptions.overrides = {
1777
+ priority: networkPriority
1778
+ };
1779
+ }
1780
+ return buildNetworkSnapshot(luvio, config, dispatchOptions);
1781
+ }
1782
+ function buildCachedSnapshotCachePolicy(context, storeLookup) {
1783
+ const { luvio, config } = context;
1784
+ const selector = {
1785
+ recordId: keyBuilder(luvio, config),
1786
+ node: adapterFragment(luvio, config),
1787
+ variables: {},
1788
+ };
1789
+ const cacheSnapshot = storeLookup(selector, {
1790
+ config,
1791
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
1792
+ });
1793
+ return cacheSnapshot;
1794
+ }
1795
+ const getManagedContentRunningOrchestrationHistoryEventsAdapterFactory = (luvio) => function CMSOrchestrator__getManagedContentRunningOrchestrationHistoryEvents(untrustedConfig, requestContext) {
1796
+ const config = validateAdapterConfig(untrustedConfig, getManagedContentRunningOrchestrationHistoryEvents_ConfigPropertyNames);
1797
+ // Invalid or incomplete config
1798
+ if (config === null) {
1799
+ return null;
1800
+ }
1801
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1802
+ buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
1803
1803
  };
1804
1804
 
1805
1805
  export { createManagedContentOrchestrationInstanceAdapterFactory, getManagedContentOrchestrationDefinitionsAdapterFactory, getManagedContentOrchestrationInstancesAdapterFactory, getManagedContentRunningOrchestrationHistoryEventsAdapterFactory };