@salesforce/lds-adapters-platform-enablement 0.1.0-dev1

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 (30) hide show
  1. package/LICENSE.txt +82 -0
  2. package/dist/es/es2018/platform-enablement.js +1882 -0
  3. package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +62 -0
  4. package/dist/es/es2018/types/src/generated/adapters/getEnablementProgramSummary.d.ts +28 -0
  5. package/dist/es/es2018/types/src/generated/adapters/getProgramSummaryCollection.d.ts +30 -0
  6. package/dist/es/es2018/types/src/generated/adapters/getProgramSummaryCollectionForCommunity.d.ts +31 -0
  7. package/dist/es/es2018/types/src/generated/adapters/selfEnrollInEnablementProgram.d.ts +15 -0
  8. package/dist/es/es2018/types/src/generated/adapters/unenrollFromEnablementProgram.d.ts +15 -0
  9. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +6 -0
  10. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +11 -0
  11. package/dist/es/es2018/types/src/generated/resources/getConnectCommunitiesEnablementProgramSummaryCollectionByCommunityId.d.ts +21 -0
  12. package/dist/es/es2018/types/src/generated/resources/getConnectEnablementProgramSummaryByEnablementProgramId.d.ts +18 -0
  13. package/dist/es/es2018/types/src/generated/resources/getConnectEnablementProgramSummaryCollection.d.ts +18 -0
  14. package/dist/es/es2018/types/src/generated/resources/postConnectEnablementProgramActionsEnrollByEnablementProgramId.d.ts +12 -0
  15. package/dist/es/es2018/types/src/generated/resources/postConnectEnablementProgramActionsUnenrollByEnablementProgramId.d.ts +12 -0
  16. package/dist/es/es2018/types/src/generated/types/EnablementProgramSelfEnrollmentRepresentation.d.ts +38 -0
  17. package/dist/es/es2018/types/src/generated/types/EnablementProgramSelfUnenrollmentRepresentation.d.ts +26 -0
  18. package/dist/es/es2018/types/src/generated/types/EnablementProgramSummaryItemRepresentation.d.ts +47 -0
  19. package/dist/es/es2018/types/src/generated/types/EnablementProgramSummaryListRepresentation.d.ts +42 -0
  20. package/dist/es/es2018/types/src/generated/types/EnablementProgramSummaryMeasureRepresentation.d.ts +31 -0
  21. package/dist/es/es2018/types/src/generated/types/EnablementProgramSummaryMilestoneRepresentation.d.ts +67 -0
  22. package/dist/es/es2018/types/src/generated/types/EnablementProgramSummaryRepresentation.d.ts +67 -0
  23. package/dist/es/es2018/types/src/generated/types/EnablementProgramSummarySectionRepresentation.d.ts +31 -0
  24. package/dist/es/es2018/types/src/generated/types/EnablementProgramSummaryTaskRepresentation.d.ts +48 -0
  25. package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
  26. package/package.json +76 -0
  27. package/sfdc/index.d.ts +1 -0
  28. package/sfdc/index.js +1957 -0
  29. package/src/raml/api.raml +357 -0
  30. package/src/raml/luvio.raml +53 -0
@@ -0,0 +1,1882 @@
1
+ /**
2
+ * Copyright (c) 2022, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+
7
+ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$3, typeCheckConfig as typeCheckConfig$5, StoreKeyMap, createResourceParams as createResourceParams$5 } from '@luvio/engine';
8
+
9
+ const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
10
+ const { keys: ObjectKeys$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
+ function generateParamConfigMetadata(name, required, resourceType, typeCheckShape, isArrayShape = false, coerceFn) {
52
+ return {
53
+ name,
54
+ required,
55
+ resourceType,
56
+ typeCheckShape,
57
+ isArrayShape,
58
+ coerceFn,
59
+ };
60
+ }
61
+ function buildAdapterValidationConfig(displayName, paramsMeta) {
62
+ const required = paramsMeta.filter(p => p.required).map(p => p.name);
63
+ const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
64
+ return {
65
+ displayName,
66
+ parameters: {
67
+ required,
68
+ optional,
69
+ }
70
+ };
71
+ }
72
+ const keyPrefix = 'enablement';
73
+
74
+ const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
75
+ const { isArray: ArrayIsArray } = Array;
76
+ const { stringify: JSONStringify } = JSON;
77
+ function equalsArray(a, b, equalsItem) {
78
+ const aLength = a.length;
79
+ const bLength = b.length;
80
+ if (aLength !== bLength) {
81
+ return false;
82
+ }
83
+ for (let i = 0; i < aLength; i++) {
84
+ if (equalsItem(a[i], b[i]) === false) {
85
+ return false;
86
+ }
87
+ }
88
+ return true;
89
+ }
90
+ function createLink(ref) {
91
+ return {
92
+ __ref: serializeStructuredKey(ref),
93
+ };
94
+ }
95
+
96
+ var DiscriminatorValues;
97
+ (function (DiscriminatorValues) {
98
+ DiscriminatorValues["Task"] = "Task";
99
+ DiscriminatorValues["Section"] = "Section";
100
+ DiscriminatorValues["Milestone"] = "Milestone";
101
+ })(DiscriminatorValues || (DiscriminatorValues = {}));
102
+ const VERSION$5 = "a9470f37b0d95500b425222897fff882";
103
+ function validate$5(obj, path = 'EnablementProgramSummaryItemRepresentation') {
104
+ const v_error = (() => {
105
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
106
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
107
+ }
108
+ const obj_description = obj.description;
109
+ const path_description = path + '.description';
110
+ if (typeof obj_description !== 'string') {
111
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
112
+ }
113
+ const obj_id = obj.id;
114
+ const path_id = path + '.id';
115
+ if (typeof obj_id !== 'string') {
116
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
117
+ }
118
+ const obj_sequenceNumber = obj.sequenceNumber;
119
+ const path_sequenceNumber = path + '.sequenceNumber';
120
+ if (typeof obj_sequenceNumber !== 'number' || (typeof obj_sequenceNumber === 'number' && Math.floor(obj_sequenceNumber) !== obj_sequenceNumber)) {
121
+ return new TypeError('Expected "integer" but received "' + typeof obj_sequenceNumber + '" (at "' + path_sequenceNumber + '")');
122
+ }
123
+ const obj_title = obj.title;
124
+ const path_title = path + '.title';
125
+ if (typeof obj_title !== 'string') {
126
+ return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
127
+ }
128
+ const obj_type = obj.type;
129
+ const path_type = path + '.type';
130
+ if (typeof obj_type !== 'string') {
131
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
132
+ }
133
+ })();
134
+ return v_error === undefined ? null : v_error;
135
+ }
136
+ const select$a = function EnablementProgramSummaryItemRepresentationSelect() {
137
+ return {
138
+ kind: 'Fragment',
139
+ version: VERSION$5,
140
+ private: [],
141
+ selections: [
142
+ {
143
+ name: 'description',
144
+ kind: 'Scalar'
145
+ },
146
+ {
147
+ name: 'id',
148
+ kind: 'Scalar'
149
+ },
150
+ {
151
+ name: 'sequenceNumber',
152
+ kind: 'Scalar'
153
+ },
154
+ {
155
+ name: 'title',
156
+ kind: 'Scalar'
157
+ },
158
+ {
159
+ name: 'type',
160
+ kind: 'Scalar'
161
+ }
162
+ ]
163
+ };
164
+ };
165
+ function equals$5(existing, incoming) {
166
+ const existing_sequenceNumber = existing.sequenceNumber;
167
+ const incoming_sequenceNumber = incoming.sequenceNumber;
168
+ if (!(existing_sequenceNumber === incoming_sequenceNumber)) {
169
+ return false;
170
+ }
171
+ const existing_description = existing.description;
172
+ const incoming_description = incoming.description;
173
+ if (!(existing_description === incoming_description)) {
174
+ return false;
175
+ }
176
+ const existing_id = existing.id;
177
+ const incoming_id = incoming.id;
178
+ if (!(existing_id === incoming_id)) {
179
+ return false;
180
+ }
181
+ const existing_title = existing.title;
182
+ const incoming_title = incoming.title;
183
+ if (!(existing_title === incoming_title)) {
184
+ return false;
185
+ }
186
+ const existing_type = existing.type;
187
+ const incoming_type = incoming.type;
188
+ if (!(existing_type === incoming_type)) {
189
+ return false;
190
+ }
191
+ return true;
192
+ }
193
+
194
+ const VERSION$4 = "66de8ceac57167914fa01284901b1a7d";
195
+ function validate$4(obj, path = 'EnablementProgramSummaryMeasureRepresentation') {
196
+ const v_error = (() => {
197
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
198
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
199
+ }
200
+ const obj_aggregationType = obj.aggregationType;
201
+ const path_aggregationType = path + '.aggregationType';
202
+ if (typeof obj_aggregationType !== 'string') {
203
+ return new TypeError('Expected "string" but received "' + typeof obj_aggregationType + '" (at "' + path_aggregationType + '")');
204
+ }
205
+ const obj_measureId = obj.measureId;
206
+ const path_measureId = path + '.measureId';
207
+ if (typeof obj_measureId !== 'string') {
208
+ return new TypeError('Expected "string" but received "' + typeof obj_measureId + '" (at "' + path_measureId + '")');
209
+ }
210
+ })();
211
+ return v_error === undefined ? null : v_error;
212
+ }
213
+ const select$9 = function EnablementProgramSummaryMeasureRepresentationSelect() {
214
+ return {
215
+ kind: 'Fragment',
216
+ version: VERSION$4,
217
+ private: [],
218
+ selections: [
219
+ {
220
+ name: 'aggregationType',
221
+ kind: 'Scalar'
222
+ },
223
+ {
224
+ name: 'measureId',
225
+ kind: 'Scalar'
226
+ }
227
+ ]
228
+ };
229
+ };
230
+ function equals$4(existing, incoming) {
231
+ const existing_aggregationType = existing.aggregationType;
232
+ const incoming_aggregationType = incoming.aggregationType;
233
+ if (!(existing_aggregationType === incoming_aggregationType)) {
234
+ return false;
235
+ }
236
+ const existing_measureId = existing.measureId;
237
+ const incoming_measureId = incoming.measureId;
238
+ if (!(existing_measureId === incoming_measureId)) {
239
+ return false;
240
+ }
241
+ return true;
242
+ }
243
+
244
+ const VERSION$3 = "aab7435705714d62f0dab55dbc5b925e";
245
+ function validate$3(obj, path = 'EnablementProgramSummaryMilestoneRepresentation') {
246
+ const validateEnablementProgramSummaryItemRepresentation_validateError = validate$5(obj, path);
247
+ if (validateEnablementProgramSummaryItemRepresentation_validateError !== null) {
248
+ return validateEnablementProgramSummaryItemRepresentation_validateError;
249
+ }
250
+ const v_error = (() => {
251
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
252
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
253
+ }
254
+ const obj_completedDate = obj.completedDate;
255
+ const path_completedDate = path + '.completedDate';
256
+ let obj_completedDate_union0 = null;
257
+ const obj_completedDate_union0_error = (() => {
258
+ if (typeof obj_completedDate !== 'string') {
259
+ return new TypeError('Expected "string" but received "' + typeof obj_completedDate + '" (at "' + path_completedDate + '")');
260
+ }
261
+ })();
262
+ if (obj_completedDate_union0_error != null) {
263
+ obj_completedDate_union0 = obj_completedDate_union0_error.message;
264
+ }
265
+ let obj_completedDate_union1 = null;
266
+ const obj_completedDate_union1_error = (() => {
267
+ if (obj_completedDate !== null) {
268
+ return new TypeError('Expected "null" but received "' + typeof obj_completedDate + '" (at "' + path_completedDate + '")');
269
+ }
270
+ })();
271
+ if (obj_completedDate_union1_error != null) {
272
+ obj_completedDate_union1 = obj_completedDate_union1_error.message;
273
+ }
274
+ if (obj_completedDate_union0 && obj_completedDate_union1) {
275
+ let message = 'Object doesn\'t match union (at "' + path_completedDate + '")';
276
+ message += '\n' + obj_completedDate_union0.split('\n').map((line) => '\t' + line).join('\n');
277
+ message += '\n' + obj_completedDate_union1.split('\n').map((line) => '\t' + line).join('\n');
278
+ return new TypeError(message);
279
+ }
280
+ const obj_completedPercent = obj.completedPercent;
281
+ const path_completedPercent = path + '.completedPercent';
282
+ let obj_completedPercent_union0 = null;
283
+ const obj_completedPercent_union0_error = (() => {
284
+ if (typeof obj_completedPercent !== 'number') {
285
+ return new TypeError('Expected "number" but received "' + typeof obj_completedPercent + '" (at "' + path_completedPercent + '")');
286
+ }
287
+ })();
288
+ if (obj_completedPercent_union0_error != null) {
289
+ obj_completedPercent_union0 = obj_completedPercent_union0_error.message;
290
+ }
291
+ let obj_completedPercent_union1 = null;
292
+ const obj_completedPercent_union1_error = (() => {
293
+ if (obj_completedPercent !== null) {
294
+ return new TypeError('Expected "null" but received "' + typeof obj_completedPercent + '" (at "' + path_completedPercent + '")');
295
+ }
296
+ })();
297
+ if (obj_completedPercent_union1_error != null) {
298
+ obj_completedPercent_union1 = obj_completedPercent_union1_error.message;
299
+ }
300
+ if (obj_completedPercent_union0 && obj_completedPercent_union1) {
301
+ let message = 'Object doesn\'t match union (at "' + path_completedPercent + '")';
302
+ message += '\n' + obj_completedPercent_union0.split('\n').map((line) => '\t' + line).join('\n');
303
+ message += '\n' + obj_completedPercent_union1.split('\n').map((line) => '\t' + line).join('\n');
304
+ return new TypeError(message);
305
+ }
306
+ const obj_compositeMilestoneType = obj.compositeMilestoneType;
307
+ const path_compositeMilestoneType = path + '.compositeMilestoneType';
308
+ let obj_compositeMilestoneType_union0 = null;
309
+ const obj_compositeMilestoneType_union0_error = (() => {
310
+ if (typeof obj_compositeMilestoneType !== 'string') {
311
+ return new TypeError('Expected "string" but received "' + typeof obj_compositeMilestoneType + '" (at "' + path_compositeMilestoneType + '")');
312
+ }
313
+ })();
314
+ if (obj_compositeMilestoneType_union0_error != null) {
315
+ obj_compositeMilestoneType_union0 = obj_compositeMilestoneType_union0_error.message;
316
+ }
317
+ let obj_compositeMilestoneType_union1 = null;
318
+ const obj_compositeMilestoneType_union1_error = (() => {
319
+ if (obj_compositeMilestoneType !== null) {
320
+ return new TypeError('Expected "null" but received "' + typeof obj_compositeMilestoneType + '" (at "' + path_compositeMilestoneType + '")');
321
+ }
322
+ })();
323
+ if (obj_compositeMilestoneType_union1_error != null) {
324
+ obj_compositeMilestoneType_union1 = obj_compositeMilestoneType_union1_error.message;
325
+ }
326
+ if (obj_compositeMilestoneType_union0 && obj_compositeMilestoneType_union1) {
327
+ let message = 'Object doesn\'t match union (at "' + path_compositeMilestoneType + '")';
328
+ message += '\n' + obj_compositeMilestoneType_union0.split('\n').map((line) => '\t' + line).join('\n');
329
+ message += '\n' + obj_compositeMilestoneType_union1.split('\n').map((line) => '\t' + line).join('\n');
330
+ return new TypeError(message);
331
+ }
332
+ const obj_contributingRecordCount = obj.contributingRecordCount;
333
+ const path_contributingRecordCount = path + '.contributingRecordCount';
334
+ let obj_contributingRecordCount_union0 = null;
335
+ const obj_contributingRecordCount_union0_error = (() => {
336
+ if (typeof obj_contributingRecordCount !== 'number' || (typeof obj_contributingRecordCount === 'number' && Math.floor(obj_contributingRecordCount) !== obj_contributingRecordCount)) {
337
+ return new TypeError('Expected "integer" but received "' + typeof obj_contributingRecordCount + '" (at "' + path_contributingRecordCount + '")');
338
+ }
339
+ })();
340
+ if (obj_contributingRecordCount_union0_error != null) {
341
+ obj_contributingRecordCount_union0 = obj_contributingRecordCount_union0_error.message;
342
+ }
343
+ let obj_contributingRecordCount_union1 = null;
344
+ const obj_contributingRecordCount_union1_error = (() => {
345
+ if (obj_contributingRecordCount !== null) {
346
+ return new TypeError('Expected "null" but received "' + typeof obj_contributingRecordCount + '" (at "' + path_contributingRecordCount + '")');
347
+ }
348
+ })();
349
+ if (obj_contributingRecordCount_union1_error != null) {
350
+ obj_contributingRecordCount_union1 = obj_contributingRecordCount_union1_error.message;
351
+ }
352
+ if (obj_contributingRecordCount_union0 && obj_contributingRecordCount_union1) {
353
+ let message = 'Object doesn\'t match union (at "' + path_contributingRecordCount + '")';
354
+ message += '\n' + obj_contributingRecordCount_union0.split('\n').map((line) => '\t' + line).join('\n');
355
+ message += '\n' + obj_contributingRecordCount_union1.split('\n').map((line) => '\t' + line).join('\n');
356
+ return new TypeError(message);
357
+ }
358
+ const obj_dueDate = obj.dueDate;
359
+ const path_dueDate = path + '.dueDate';
360
+ let obj_dueDate_union0 = null;
361
+ const obj_dueDate_union0_error = (() => {
362
+ if (typeof obj_dueDate !== 'string') {
363
+ return new TypeError('Expected "string" but received "' + typeof obj_dueDate + '" (at "' + path_dueDate + '")');
364
+ }
365
+ })();
366
+ if (obj_dueDate_union0_error != null) {
367
+ obj_dueDate_union0 = obj_dueDate_union0_error.message;
368
+ }
369
+ let obj_dueDate_union1 = null;
370
+ const obj_dueDate_union1_error = (() => {
371
+ if (obj_dueDate !== null) {
372
+ return new TypeError('Expected "null" but received "' + typeof obj_dueDate + '" (at "' + path_dueDate + '")');
373
+ }
374
+ })();
375
+ if (obj_dueDate_union1_error != null) {
376
+ obj_dueDate_union1 = obj_dueDate_union1_error.message;
377
+ }
378
+ if (obj_dueDate_union0 && obj_dueDate_union1) {
379
+ let message = 'Object doesn\'t match union (at "' + path_dueDate + '")';
380
+ message += '\n' + obj_dueDate_union0.split('\n').map((line) => '\t' + line).join('\n');
381
+ message += '\n' + obj_dueDate_union1.split('\n').map((line) => '\t' + line).join('\n');
382
+ return new TypeError(message);
383
+ }
384
+ const obj_isCompleted = obj.isCompleted;
385
+ const path_isCompleted = path + '.isCompleted';
386
+ let obj_isCompleted_union0 = null;
387
+ const obj_isCompleted_union0_error = (() => {
388
+ if (typeof obj_isCompleted !== 'boolean') {
389
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isCompleted + '" (at "' + path_isCompleted + '")');
390
+ }
391
+ })();
392
+ if (obj_isCompleted_union0_error != null) {
393
+ obj_isCompleted_union0 = obj_isCompleted_union0_error.message;
394
+ }
395
+ let obj_isCompleted_union1 = null;
396
+ const obj_isCompleted_union1_error = (() => {
397
+ if (obj_isCompleted !== null) {
398
+ return new TypeError('Expected "null" but received "' + typeof obj_isCompleted + '" (at "' + path_isCompleted + '")');
399
+ }
400
+ })();
401
+ if (obj_isCompleted_union1_error != null) {
402
+ obj_isCompleted_union1 = obj_isCompleted_union1_error.message;
403
+ }
404
+ if (obj_isCompleted_union0 && obj_isCompleted_union1) {
405
+ let message = 'Object doesn\'t match union (at "' + path_isCompleted + '")';
406
+ message += '\n' + obj_isCompleted_union0.split('\n').map((line) => '\t' + line).join('\n');
407
+ message += '\n' + obj_isCompleted_union1.split('\n').map((line) => '\t' + line).join('\n');
408
+ return new TypeError(message);
409
+ }
410
+ const obj_isOverdue = obj.isOverdue;
411
+ const path_isOverdue = path + '.isOverdue';
412
+ let obj_isOverdue_union0 = null;
413
+ const obj_isOverdue_union0_error = (() => {
414
+ if (typeof obj_isOverdue !== 'boolean') {
415
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isOverdue + '" (at "' + path_isOverdue + '")');
416
+ }
417
+ })();
418
+ if (obj_isOverdue_union0_error != null) {
419
+ obj_isOverdue_union0 = obj_isOverdue_union0_error.message;
420
+ }
421
+ let obj_isOverdue_union1 = null;
422
+ const obj_isOverdue_union1_error = (() => {
423
+ if (obj_isOverdue !== null) {
424
+ return new TypeError('Expected "null" but received "' + typeof obj_isOverdue + '" (at "' + path_isOverdue + '")');
425
+ }
426
+ })();
427
+ if (obj_isOverdue_union1_error != null) {
428
+ obj_isOverdue_union1 = obj_isOverdue_union1_error.message;
429
+ }
430
+ if (obj_isOverdue_union0 && obj_isOverdue_union1) {
431
+ let message = 'Object doesn\'t match union (at "' + path_isOverdue + '")';
432
+ message += '\n' + obj_isOverdue_union0.split('\n').map((line) => '\t' + line).join('\n');
433
+ message += '\n' + obj_isOverdue_union1.split('\n').map((line) => '\t' + line).join('\n');
434
+ return new TypeError(message);
435
+ }
436
+ const obj_measures = obj.measures;
437
+ const path_measures = path + '.measures';
438
+ if (!ArrayIsArray(obj_measures)) {
439
+ return new TypeError('Expected "array" but received "' + typeof obj_measures + '" (at "' + path_measures + '")');
440
+ }
441
+ for (let i = 0; i < obj_measures.length; i++) {
442
+ const obj_measures_item = obj_measures[i];
443
+ const path_measures_item = path_measures + '[' + i + ']';
444
+ const referencepath_measures_itemValidationError = validate$4(obj_measures_item, path_measures_item);
445
+ if (referencepath_measures_itemValidationError !== null) {
446
+ let message = 'Object doesn\'t match EnablementProgramSummaryMeasureRepresentation (at "' + path_measures_item + '")\n';
447
+ message += referencepath_measures_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
448
+ return new TypeError(message);
449
+ }
450
+ }
451
+ const obj_milestoneResult = obj.milestoneResult;
452
+ const path_milestoneResult = path + '.milestoneResult';
453
+ let obj_milestoneResult_union0 = null;
454
+ const obj_milestoneResult_union0_error = (() => {
455
+ if (typeof obj_milestoneResult !== 'number') {
456
+ return new TypeError('Expected "number" but received "' + typeof obj_milestoneResult + '" (at "' + path_milestoneResult + '")');
457
+ }
458
+ })();
459
+ if (obj_milestoneResult_union0_error != null) {
460
+ obj_milestoneResult_union0 = obj_milestoneResult_union0_error.message;
461
+ }
462
+ let obj_milestoneResult_union1 = null;
463
+ const obj_milestoneResult_union1_error = (() => {
464
+ if (obj_milestoneResult !== null) {
465
+ return new TypeError('Expected "null" but received "' + typeof obj_milestoneResult + '" (at "' + path_milestoneResult + '")');
466
+ }
467
+ })();
468
+ if (obj_milestoneResult_union1_error != null) {
469
+ obj_milestoneResult_union1 = obj_milestoneResult_union1_error.message;
470
+ }
471
+ if (obj_milestoneResult_union0 && obj_milestoneResult_union1) {
472
+ let message = 'Object doesn\'t match union (at "' + path_milestoneResult + '")';
473
+ message += '\n' + obj_milestoneResult_union0.split('\n').map((line) => '\t' + line).join('\n');
474
+ message += '\n' + obj_milestoneResult_union1.split('\n').map((line) => '\t' + line).join('\n');
475
+ return new TypeError(message);
476
+ }
477
+ const obj_milestoneTarget = obj.milestoneTarget;
478
+ const path_milestoneTarget = path + '.milestoneTarget';
479
+ let obj_milestoneTarget_union0 = null;
480
+ const obj_milestoneTarget_union0_error = (() => {
481
+ if (typeof obj_milestoneTarget !== 'number') {
482
+ return new TypeError('Expected "number" but received "' + typeof obj_milestoneTarget + '" (at "' + path_milestoneTarget + '")');
483
+ }
484
+ })();
485
+ if (obj_milestoneTarget_union0_error != null) {
486
+ obj_milestoneTarget_union0 = obj_milestoneTarget_union0_error.message;
487
+ }
488
+ let obj_milestoneTarget_union1 = null;
489
+ const obj_milestoneTarget_union1_error = (() => {
490
+ if (obj_milestoneTarget !== null) {
491
+ return new TypeError('Expected "null" but received "' + typeof obj_milestoneTarget + '" (at "' + path_milestoneTarget + '")');
492
+ }
493
+ })();
494
+ if (obj_milestoneTarget_union1_error != null) {
495
+ obj_milestoneTarget_union1 = obj_milestoneTarget_union1_error.message;
496
+ }
497
+ if (obj_milestoneTarget_union0 && obj_milestoneTarget_union1) {
498
+ let message = 'Object doesn\'t match union (at "' + path_milestoneTarget + '")';
499
+ message += '\n' + obj_milestoneTarget_union0.split('\n').map((line) => '\t' + line).join('\n');
500
+ message += '\n' + obj_milestoneTarget_union1.split('\n').map((line) => '\t' + line).join('\n');
501
+ return new TypeError(message);
502
+ }
503
+ const obj_minimumSampleSize = obj.minimumSampleSize;
504
+ const path_minimumSampleSize = path + '.minimumSampleSize';
505
+ let obj_minimumSampleSize_union0 = null;
506
+ const obj_minimumSampleSize_union0_error = (() => {
507
+ if (typeof obj_minimumSampleSize !== 'number' || (typeof obj_minimumSampleSize === 'number' && Math.floor(obj_minimumSampleSize) !== obj_minimumSampleSize)) {
508
+ return new TypeError('Expected "integer" but received "' + typeof obj_minimumSampleSize + '" (at "' + path_minimumSampleSize + '")');
509
+ }
510
+ })();
511
+ if (obj_minimumSampleSize_union0_error != null) {
512
+ obj_minimumSampleSize_union0 = obj_minimumSampleSize_union0_error.message;
513
+ }
514
+ let obj_minimumSampleSize_union1 = null;
515
+ const obj_minimumSampleSize_union1_error = (() => {
516
+ if (obj_minimumSampleSize !== null) {
517
+ return new TypeError('Expected "null" but received "' + typeof obj_minimumSampleSize + '" (at "' + path_minimumSampleSize + '")');
518
+ }
519
+ })();
520
+ if (obj_minimumSampleSize_union1_error != null) {
521
+ obj_minimumSampleSize_union1 = obj_minimumSampleSize_union1_error.message;
522
+ }
523
+ if (obj_minimumSampleSize_union0 && obj_minimumSampleSize_union1) {
524
+ let message = 'Object doesn\'t match union (at "' + path_minimumSampleSize + '")';
525
+ message += '\n' + obj_minimumSampleSize_union0.split('\n').map((line) => '\t' + line).join('\n');
526
+ message += '\n' + obj_minimumSampleSize_union1.split('\n').map((line) => '\t' + line).join('\n');
527
+ return new TypeError(message);
528
+ }
529
+ const obj_programDay = obj.programDay;
530
+ const path_programDay = path + '.programDay';
531
+ if (typeof obj_programDay !== 'number' || (typeof obj_programDay === 'number' && Math.floor(obj_programDay) !== obj_programDay)) {
532
+ return new TypeError('Expected "integer" but received "' + typeof obj_programDay + '" (at "' + path_programDay + '")');
533
+ }
534
+ const obj_progressStatus = obj.progressStatus;
535
+ const path_progressStatus = path + '.progressStatus';
536
+ let obj_progressStatus_union0 = null;
537
+ const obj_progressStatus_union0_error = (() => {
538
+ if (typeof obj_progressStatus !== 'string') {
539
+ return new TypeError('Expected "string" but received "' + typeof obj_progressStatus + '" (at "' + path_progressStatus + '")');
540
+ }
541
+ })();
542
+ if (obj_progressStatus_union0_error != null) {
543
+ obj_progressStatus_union0 = obj_progressStatus_union0_error.message;
544
+ }
545
+ let obj_progressStatus_union1 = null;
546
+ const obj_progressStatus_union1_error = (() => {
547
+ if (obj_progressStatus !== null) {
548
+ return new TypeError('Expected "null" but received "' + typeof obj_progressStatus + '" (at "' + path_progressStatus + '")');
549
+ }
550
+ })();
551
+ if (obj_progressStatus_union1_error != null) {
552
+ obj_progressStatus_union1 = obj_progressStatus_union1_error.message;
553
+ }
554
+ if (obj_progressStatus_union0 && obj_progressStatus_union1) {
555
+ let message = 'Object doesn\'t match union (at "' + path_progressStatus + '")';
556
+ message += '\n' + obj_progressStatus_union0.split('\n').map((line) => '\t' + line).join('\n');
557
+ message += '\n' + obj_progressStatus_union1.split('\n').map((line) => '\t' + line).join('\n');
558
+ return new TypeError(message);
559
+ }
560
+ })();
561
+ return v_error === undefined ? null : v_error;
562
+ }
563
+ const select$8 = function EnablementProgramSummaryMilestoneRepresentationSelect() {
564
+ const { selections: EnablementProgramSummaryItemRepresentationSelections } = select$a();
565
+ const { selections: EnablementProgramSummaryMeasureRepresentation__selections, opaque: EnablementProgramSummaryMeasureRepresentation__opaque, } = select$9();
566
+ return {
567
+ kind: 'Fragment',
568
+ version: VERSION$3,
569
+ private: [],
570
+ selections: [
571
+ ...EnablementProgramSummaryItemRepresentationSelections,
572
+ {
573
+ name: 'completedDate',
574
+ kind: 'Scalar'
575
+ },
576
+ {
577
+ name: 'completedPercent',
578
+ kind: 'Scalar'
579
+ },
580
+ {
581
+ name: 'compositeMilestoneType',
582
+ kind: 'Scalar'
583
+ },
584
+ {
585
+ name: 'contributingRecordCount',
586
+ kind: 'Scalar'
587
+ },
588
+ {
589
+ name: 'dueDate',
590
+ kind: 'Scalar'
591
+ },
592
+ {
593
+ name: 'isCompleted',
594
+ kind: 'Scalar'
595
+ },
596
+ {
597
+ name: 'isOverdue',
598
+ kind: 'Scalar'
599
+ },
600
+ {
601
+ name: 'measures',
602
+ kind: 'Object',
603
+ plural: true,
604
+ selections: EnablementProgramSummaryMeasureRepresentation__selections
605
+ },
606
+ {
607
+ name: 'milestoneResult',
608
+ kind: 'Scalar'
609
+ },
610
+ {
611
+ name: 'milestoneTarget',
612
+ kind: 'Scalar'
613
+ },
614
+ {
615
+ name: 'minimumSampleSize',
616
+ kind: 'Scalar'
617
+ },
618
+ {
619
+ name: 'programDay',
620
+ kind: 'Scalar'
621
+ },
622
+ {
623
+ name: 'progressStatus',
624
+ kind: 'Scalar'
625
+ }
626
+ ]
627
+ };
628
+ };
629
+ function equals$3(existing, incoming) {
630
+ if (equals$5(existing, incoming) === false) {
631
+ return false;
632
+ }
633
+ const existing_programDay = existing.programDay;
634
+ const incoming_programDay = incoming.programDay;
635
+ if (!(existing_programDay === incoming_programDay)) {
636
+ return false;
637
+ }
638
+ const existing_completedDate = existing.completedDate;
639
+ const incoming_completedDate = incoming.completedDate;
640
+ if (!(existing_completedDate === incoming_completedDate)) {
641
+ return false;
642
+ }
643
+ const existing_completedPercent = existing.completedPercent;
644
+ const incoming_completedPercent = incoming.completedPercent;
645
+ if (!(existing_completedPercent === incoming_completedPercent)) {
646
+ return false;
647
+ }
648
+ const existing_compositeMilestoneType = existing.compositeMilestoneType;
649
+ const incoming_compositeMilestoneType = incoming.compositeMilestoneType;
650
+ if (!(existing_compositeMilestoneType === incoming_compositeMilestoneType)) {
651
+ return false;
652
+ }
653
+ const existing_contributingRecordCount = existing.contributingRecordCount;
654
+ const incoming_contributingRecordCount = incoming.contributingRecordCount;
655
+ if (!(existing_contributingRecordCount === incoming_contributingRecordCount)) {
656
+ return false;
657
+ }
658
+ const existing_dueDate = existing.dueDate;
659
+ const incoming_dueDate = incoming.dueDate;
660
+ if (!(existing_dueDate === incoming_dueDate)) {
661
+ return false;
662
+ }
663
+ const existing_isCompleted = existing.isCompleted;
664
+ const incoming_isCompleted = incoming.isCompleted;
665
+ if (!(existing_isCompleted === incoming_isCompleted)) {
666
+ return false;
667
+ }
668
+ const existing_isOverdue = existing.isOverdue;
669
+ const incoming_isOverdue = incoming.isOverdue;
670
+ if (!(existing_isOverdue === incoming_isOverdue)) {
671
+ return false;
672
+ }
673
+ const existing_measures = existing.measures;
674
+ const incoming_measures = incoming.measures;
675
+ const equals_measures_items = equalsArray(existing_measures, incoming_measures, (existing_measures_item, incoming_measures_item) => {
676
+ if (!(equals$4(existing_measures_item, incoming_measures_item))) {
677
+ return false;
678
+ }
679
+ });
680
+ if (equals_measures_items === false) {
681
+ return false;
682
+ }
683
+ const existing_milestoneResult = existing.milestoneResult;
684
+ const incoming_milestoneResult = incoming.milestoneResult;
685
+ if (!(existing_milestoneResult === incoming_milestoneResult)) {
686
+ return false;
687
+ }
688
+ const existing_milestoneTarget = existing.milestoneTarget;
689
+ const incoming_milestoneTarget = incoming.milestoneTarget;
690
+ if (!(existing_milestoneTarget === incoming_milestoneTarget)) {
691
+ return false;
692
+ }
693
+ const existing_minimumSampleSize = existing.minimumSampleSize;
694
+ const incoming_minimumSampleSize = incoming.minimumSampleSize;
695
+ if (!(existing_minimumSampleSize === incoming_minimumSampleSize)) {
696
+ return false;
697
+ }
698
+ const existing_progressStatus = existing.progressStatus;
699
+ const incoming_progressStatus = incoming.progressStatus;
700
+ if (!(existing_progressStatus === incoming_progressStatus)) {
701
+ return false;
702
+ }
703
+ return true;
704
+ }
705
+
706
+ const TTL$2 = 15000;
707
+ const VERSION$2 = "8c024832561adc9be3b12d390c61abe5";
708
+ function validate$2(obj, path = 'EnablementProgramSummaryRepresentation') {
709
+ const v_error = (() => {
710
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
711
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
712
+ }
713
+ const obj_description = obj.description;
714
+ const path_description = path + '.description';
715
+ let obj_description_union0 = null;
716
+ const obj_description_union0_error = (() => {
717
+ if (typeof obj_description !== 'string') {
718
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
719
+ }
720
+ })();
721
+ if (obj_description_union0_error != null) {
722
+ obj_description_union0 = obj_description_union0_error.message;
723
+ }
724
+ let obj_description_union1 = null;
725
+ const obj_description_union1_error = (() => {
726
+ if (obj_description !== null) {
727
+ return new TypeError('Expected "null" but received "' + typeof obj_description + '" (at "' + path_description + '")');
728
+ }
729
+ })();
730
+ if (obj_description_union1_error != null) {
731
+ obj_description_union1 = obj_description_union1_error.message;
732
+ }
733
+ if (obj_description_union0 && obj_description_union1) {
734
+ let message = 'Object doesn\'t match union (at "' + path_description + '")';
735
+ message += '\n' + obj_description_union0.split('\n').map((line) => '\t' + line).join('\n');
736
+ message += '\n' + obj_description_union1.split('\n').map((line) => '\t' + line).join('\n');
737
+ return new TypeError(message);
738
+ }
739
+ const obj_doesAllowSelfEnrollment = obj.doesAllowSelfEnrollment;
740
+ const path_doesAllowSelfEnrollment = path + '.doesAllowSelfEnrollment';
741
+ if (typeof obj_doesAllowSelfEnrollment !== 'boolean') {
742
+ return new TypeError('Expected "boolean" but received "' + typeof obj_doesAllowSelfEnrollment + '" (at "' + path_doesAllowSelfEnrollment + '")');
743
+ }
744
+ const obj_dueDate = obj.dueDate;
745
+ const path_dueDate = path + '.dueDate';
746
+ let obj_dueDate_union0 = null;
747
+ const obj_dueDate_union0_error = (() => {
748
+ if (typeof obj_dueDate !== 'string') {
749
+ return new TypeError('Expected "string" but received "' + typeof obj_dueDate + '" (at "' + path_dueDate + '")');
750
+ }
751
+ })();
752
+ if (obj_dueDate_union0_error != null) {
753
+ obj_dueDate_union0 = obj_dueDate_union0_error.message;
754
+ }
755
+ let obj_dueDate_union1 = null;
756
+ const obj_dueDate_union1_error = (() => {
757
+ if (obj_dueDate !== null) {
758
+ return new TypeError('Expected "null" but received "' + typeof obj_dueDate + '" (at "' + path_dueDate + '")');
759
+ }
760
+ })();
761
+ if (obj_dueDate_union1_error != null) {
762
+ obj_dueDate_union1 = obj_dueDate_union1_error.message;
763
+ }
764
+ if (obj_dueDate_union0 && obj_dueDate_union1) {
765
+ let message = 'Object doesn\'t match union (at "' + path_dueDate + '")';
766
+ message += '\n' + obj_dueDate_union0.split('\n').map((line) => '\t' + line).join('\n');
767
+ message += '\n' + obj_dueDate_union1.split('\n').map((line) => '\t' + line).join('\n');
768
+ return new TypeError(message);
769
+ }
770
+ const obj_id = obj.id;
771
+ const path_id = path + '.id';
772
+ let obj_id_union0 = null;
773
+ const obj_id_union0_error = (() => {
774
+ if (typeof obj_id !== 'string') {
775
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
776
+ }
777
+ })();
778
+ if (obj_id_union0_error != null) {
779
+ obj_id_union0 = obj_id_union0_error.message;
780
+ }
781
+ let obj_id_union1 = null;
782
+ const obj_id_union1_error = (() => {
783
+ if (obj_id !== null) {
784
+ return new TypeError('Expected "null" but received "' + typeof obj_id + '" (at "' + path_id + '")');
785
+ }
786
+ })();
787
+ if (obj_id_union1_error != null) {
788
+ obj_id_union1 = obj_id_union1_error.message;
789
+ }
790
+ if (obj_id_union0 && obj_id_union1) {
791
+ let message = 'Object doesn\'t match union (at "' + path_id + '")';
792
+ message += '\n' + obj_id_union0.split('\n').map((line) => '\t' + line).join('\n');
793
+ message += '\n' + obj_id_union1.split('\n').map((line) => '\t' + line).join('\n');
794
+ return new TypeError(message);
795
+ }
796
+ const obj_items = obj.items;
797
+ const path_items = path + '.items';
798
+ if (!ArrayIsArray(obj_items)) {
799
+ return new TypeError('Expected "array" but received "' + typeof obj_items + '" (at "' + path_items + '")');
800
+ }
801
+ for (let i = 0; i < obj_items.length; i++) {
802
+ const obj_items_item = obj_items[i];
803
+ const path_items_item = path_items + '[' + i + ']';
804
+ if (obj_items_item === undefined) {
805
+ return new TypeError('Expected "defined" but received "' + typeof obj_items_item + '" (at "' + path_items_item + '")');
806
+ }
807
+ }
808
+ const obj_learningItemId = obj.learningItemId;
809
+ const path_learningItemId = path + '.learningItemId';
810
+ let obj_learningItemId_union0 = null;
811
+ const obj_learningItemId_union0_error = (() => {
812
+ if (typeof obj_learningItemId !== 'string') {
813
+ return new TypeError('Expected "string" but received "' + typeof obj_learningItemId + '" (at "' + path_learningItemId + '")');
814
+ }
815
+ })();
816
+ if (obj_learningItemId_union0_error != null) {
817
+ obj_learningItemId_union0 = obj_learningItemId_union0_error.message;
818
+ }
819
+ let obj_learningItemId_union1 = null;
820
+ const obj_learningItemId_union1_error = (() => {
821
+ if (obj_learningItemId !== null) {
822
+ return new TypeError('Expected "null" but received "' + typeof obj_learningItemId + '" (at "' + path_learningItemId + '")');
823
+ }
824
+ })();
825
+ if (obj_learningItemId_union1_error != null) {
826
+ obj_learningItemId_union1 = obj_learningItemId_union1_error.message;
827
+ }
828
+ if (obj_learningItemId_union0 && obj_learningItemId_union1) {
829
+ let message = 'Object doesn\'t match union (at "' + path_learningItemId + '")';
830
+ message += '\n' + obj_learningItemId_union0.split('\n').map((line) => '\t' + line).join('\n');
831
+ message += '\n' + obj_learningItemId_union1.split('\n').map((line) => '\t' + line).join('\n');
832
+ return new TypeError(message);
833
+ }
834
+ const obj_outcome = obj.outcome;
835
+ const path_outcome = path + '.outcome';
836
+ let obj_outcome_union0 = null;
837
+ const obj_outcome_union0_error = (() => {
838
+ const referencepath_outcomeValidationError = validate$3(obj_outcome, path_outcome);
839
+ if (referencepath_outcomeValidationError !== null) {
840
+ let message = 'Object doesn\'t match EnablementProgramSummaryMilestoneRepresentation (at "' + path_outcome + '")\n';
841
+ message += referencepath_outcomeValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
842
+ return new TypeError(message);
843
+ }
844
+ })();
845
+ if (obj_outcome_union0_error != null) {
846
+ obj_outcome_union0 = obj_outcome_union0_error.message;
847
+ }
848
+ let obj_outcome_union1 = null;
849
+ const obj_outcome_union1_error = (() => {
850
+ if (obj_outcome !== null) {
851
+ return new TypeError('Expected "null" but received "' + typeof obj_outcome + '" (at "' + path_outcome + '")');
852
+ }
853
+ })();
854
+ if (obj_outcome_union1_error != null) {
855
+ obj_outcome_union1 = obj_outcome_union1_error.message;
856
+ }
857
+ if (obj_outcome_union0 && obj_outcome_union1) {
858
+ let message = 'Object doesn\'t match union (at "' + path_outcome + '")';
859
+ message += '\n' + obj_outcome_union0.split('\n').map((line) => '\t' + line).join('\n');
860
+ message += '\n' + obj_outcome_union1.split('\n').map((line) => '\t' + line).join('\n');
861
+ return new TypeError(message);
862
+ }
863
+ const obj_status = obj.status;
864
+ const path_status = path + '.status';
865
+ if (typeof obj_status !== 'string') {
866
+ return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
867
+ }
868
+ if (obj.systemModStamp !== undefined) {
869
+ const obj_systemModStamp = obj.systemModStamp;
870
+ const path_systemModStamp = path + '.systemModStamp';
871
+ let obj_systemModStamp_union0 = null;
872
+ const obj_systemModStamp_union0_error = (() => {
873
+ if (typeof obj_systemModStamp !== 'string') {
874
+ return new TypeError('Expected "string" but received "' + typeof obj_systemModStamp + '" (at "' + path_systemModStamp + '")');
875
+ }
876
+ })();
877
+ if (obj_systemModStamp_union0_error != null) {
878
+ obj_systemModStamp_union0 = obj_systemModStamp_union0_error.message;
879
+ }
880
+ let obj_systemModStamp_union1 = null;
881
+ const obj_systemModStamp_union1_error = (() => {
882
+ if (obj_systemModStamp !== null) {
883
+ return new TypeError('Expected "null" but received "' + typeof obj_systemModStamp + '" (at "' + path_systemModStamp + '")');
884
+ }
885
+ })();
886
+ if (obj_systemModStamp_union1_error != null) {
887
+ obj_systemModStamp_union1 = obj_systemModStamp_union1_error.message;
888
+ }
889
+ if (obj_systemModStamp_union0 && obj_systemModStamp_union1) {
890
+ let message = 'Object doesn\'t match union (at "' + path_systemModStamp + '")';
891
+ message += '\n' + obj_systemModStamp_union0.split('\n').map((line) => '\t' + line).join('\n');
892
+ message += '\n' + obj_systemModStamp_union1.split('\n').map((line) => '\t' + line).join('\n');
893
+ return new TypeError(message);
894
+ }
895
+ }
896
+ const obj_title = obj.title;
897
+ const path_title = path + '.title';
898
+ let obj_title_union0 = null;
899
+ const obj_title_union0_error = (() => {
900
+ if (typeof obj_title !== 'string') {
901
+ return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
902
+ }
903
+ })();
904
+ if (obj_title_union0_error != null) {
905
+ obj_title_union0 = obj_title_union0_error.message;
906
+ }
907
+ let obj_title_union1 = null;
908
+ const obj_title_union1_error = (() => {
909
+ if (obj_title !== null) {
910
+ return new TypeError('Expected "null" but received "' + typeof obj_title + '" (at "' + path_title + '")');
911
+ }
912
+ })();
913
+ if (obj_title_union1_error != null) {
914
+ obj_title_union1 = obj_title_union1_error.message;
915
+ }
916
+ if (obj_title_union0 && obj_title_union1) {
917
+ let message = 'Object doesn\'t match union (at "' + path_title + '")';
918
+ message += '\n' + obj_title_union0.split('\n').map((line) => '\t' + line).join('\n');
919
+ message += '\n' + obj_title_union1.split('\n').map((line) => '\t' + line).join('\n');
920
+ return new TypeError(message);
921
+ }
922
+ })();
923
+ return v_error === undefined ? null : v_error;
924
+ }
925
+ const RepresentationType$2 = 'EnablementProgramSummaryRepresentation';
926
+ function keyBuilder$7(luvio, config) {
927
+ return keyPrefix + '::' + RepresentationType$2 + ':' + (config.enablement_program_id === null ? '' : config.enablement_program_id);
928
+ }
929
+ function keyBuilderFromType$1(luvio, object) {
930
+ const keyParams = {
931
+ enablement_program_id: object.id
932
+ };
933
+ return keyBuilder$7(luvio, keyParams);
934
+ }
935
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
936
+ return input;
937
+ }
938
+ const select$7 = function EnablementProgramSummaryRepresentationSelect() {
939
+ const { selections: EnablementProgramSummaryMilestoneRepresentation__selections, opaque: EnablementProgramSummaryMilestoneRepresentation__opaque, } = select$8();
940
+ return {
941
+ kind: 'Fragment',
942
+ version: VERSION$2,
943
+ private: [],
944
+ selections: [
945
+ {
946
+ name: 'description',
947
+ kind: 'Scalar'
948
+ },
949
+ {
950
+ name: 'doesAllowSelfEnrollment',
951
+ kind: 'Scalar'
952
+ },
953
+ {
954
+ name: 'dueDate',
955
+ kind: 'Scalar'
956
+ },
957
+ {
958
+ name: 'id',
959
+ kind: 'Scalar'
960
+ },
961
+ {
962
+ name: 'items',
963
+ kind: 'Object',
964
+ // any
965
+ },
966
+ {
967
+ name: 'learningItemId',
968
+ kind: 'Scalar'
969
+ },
970
+ {
971
+ name: 'outcome',
972
+ kind: 'Object',
973
+ nullable: true,
974
+ selections: EnablementProgramSummaryMilestoneRepresentation__selections
975
+ },
976
+ {
977
+ name: 'status',
978
+ kind: 'Scalar'
979
+ },
980
+ {
981
+ name: 'systemModStamp',
982
+ kind: 'Scalar',
983
+ required: false
984
+ },
985
+ {
986
+ name: 'title',
987
+ kind: 'Scalar'
988
+ }
989
+ ]
990
+ };
991
+ };
992
+ function equals$2(existing, incoming) {
993
+ const existing_doesAllowSelfEnrollment = existing.doesAllowSelfEnrollment;
994
+ const incoming_doesAllowSelfEnrollment = incoming.doesAllowSelfEnrollment;
995
+ if (!(existing_doesAllowSelfEnrollment === incoming_doesAllowSelfEnrollment)) {
996
+ return false;
997
+ }
998
+ const existing_status = existing.status;
999
+ const incoming_status = incoming.status;
1000
+ if (!(existing_status === incoming_status)) {
1001
+ return false;
1002
+ }
1003
+ const existing_description = existing.description;
1004
+ const incoming_description = incoming.description;
1005
+ if (!(existing_description === incoming_description)) {
1006
+ return false;
1007
+ }
1008
+ const existing_dueDate = existing.dueDate;
1009
+ const incoming_dueDate = incoming.dueDate;
1010
+ if (!(existing_dueDate === incoming_dueDate)) {
1011
+ return false;
1012
+ }
1013
+ const existing_id = existing.id;
1014
+ const incoming_id = incoming.id;
1015
+ if (!(existing_id === incoming_id)) {
1016
+ return false;
1017
+ }
1018
+ const existing_items = existing.items;
1019
+ const incoming_items = incoming.items;
1020
+ const equals_items_items = equalsArray(existing_items, incoming_items, (existing_items_item, incoming_items_item) => {
1021
+ if (JSONStringify(incoming_items_item) !== JSONStringify(existing_items_item)) {
1022
+ return false;
1023
+ }
1024
+ });
1025
+ if (equals_items_items === false) {
1026
+ return false;
1027
+ }
1028
+ const existing_learningItemId = existing.learningItemId;
1029
+ const incoming_learningItemId = incoming.learningItemId;
1030
+ if (!(existing_learningItemId === incoming_learningItemId)) {
1031
+ return false;
1032
+ }
1033
+ const existing_outcome = existing.outcome;
1034
+ const incoming_outcome = incoming.outcome;
1035
+ if (!(existing_outcome === incoming_outcome
1036
+ || (existing_outcome != null &&
1037
+ incoming_outcome != null &&
1038
+ equals$3(existing_outcome, incoming_outcome)))) {
1039
+ return false;
1040
+ }
1041
+ const existing_systemModStamp = existing.systemModStamp;
1042
+ const incoming_systemModStamp = incoming.systemModStamp;
1043
+ // if at least one of these optionals is defined
1044
+ if (existing_systemModStamp !== undefined || incoming_systemModStamp !== undefined) {
1045
+ // if one of these is not defined we know the other is defined and therefore
1046
+ // not equal
1047
+ if (existing_systemModStamp === undefined || incoming_systemModStamp === undefined) {
1048
+ return false;
1049
+ }
1050
+ if (!(existing_systemModStamp === incoming_systemModStamp)) {
1051
+ return false;
1052
+ }
1053
+ }
1054
+ const existing_title = existing.title;
1055
+ const incoming_title = incoming.title;
1056
+ if (!(existing_title === incoming_title)) {
1057
+ return false;
1058
+ }
1059
+ return true;
1060
+ }
1061
+ const ingest$2 = function EnablementProgramSummaryRepresentationIngest(input, path, luvio, store, timestamp) {
1062
+ if (process.env.NODE_ENV !== 'production') {
1063
+ const validateError = validate$2(input);
1064
+ if (validateError !== null) {
1065
+ throw validateError;
1066
+ }
1067
+ }
1068
+ const key = keyBuilderFromType$1(luvio, input);
1069
+ const ttlToUse = TTL$2;
1070
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "enablement", VERSION$2, RepresentationType$2, equals$2);
1071
+ return createLink(key);
1072
+ };
1073
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
1074
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1075
+ const rootKey = keyBuilderFromType$1(luvio, input);
1076
+ rootKeySet.set(rootKey, {
1077
+ namespace: keyPrefix,
1078
+ representationName: RepresentationType$2,
1079
+ mergeable: false
1080
+ });
1081
+ }
1082
+ const notifyUpdateAvailableFactory = (luvio) => {
1083
+ return function notifyEnablementProgramSummaryUpdateAvailable(configs) {
1084
+ if (process.env.NODE_ENV !== 'production') {
1085
+ const requiredKeyParams = ['enablement_program_id'];
1086
+ configs.forEach(config => {
1087
+ if (false === requiredKeyParams.every(req => req in config)) {
1088
+ throw new Error(`one of the configs did not contain all required parameters: ${JSONStringify(ObjectKeys(config))}`);
1089
+ }
1090
+ });
1091
+ }
1092
+ const keys = configs.map(c => keyBuilder$7(luvio, c));
1093
+ return luvio.notifyStoreUpdateAvailable(keys);
1094
+ };
1095
+ };
1096
+
1097
+ const TTL$1 = 15000;
1098
+ const VERSION$1 = "7ef7adad59a82a6a2a4ab4ba77434b67";
1099
+ function validate$1(obj, path = 'EnablementProgramSummaryListRepresentation') {
1100
+ const v_error = (() => {
1101
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1102
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1103
+ }
1104
+ const obj_hasMore = obj.hasMore;
1105
+ const path_hasMore = path + '.hasMore';
1106
+ if (typeof obj_hasMore !== 'boolean') {
1107
+ return new TypeError('Expected "boolean" but received "' + typeof obj_hasMore + '" (at "' + path_hasMore + '")');
1108
+ }
1109
+ const obj_programSummaryList = obj.programSummaryList;
1110
+ const path_programSummaryList = path + '.programSummaryList';
1111
+ if (!ArrayIsArray(obj_programSummaryList)) {
1112
+ return new TypeError('Expected "array" but received "' + typeof obj_programSummaryList + '" (at "' + path_programSummaryList + '")');
1113
+ }
1114
+ for (let i = 0; i < obj_programSummaryList.length; i++) {
1115
+ const obj_programSummaryList_item = obj_programSummaryList[i];
1116
+ const path_programSummaryList_item = path_programSummaryList + '[' + i + ']';
1117
+ if (typeof obj_programSummaryList_item !== 'object' || Array.isArray(obj_programSummaryList_item)) {
1118
+ return new TypeError('Expected "object" but received "' + typeof obj_programSummaryList_item + '" (at "' + path_programSummaryList_item + '")');
1119
+ }
1120
+ }
1121
+ })();
1122
+ return v_error === undefined ? null : v_error;
1123
+ }
1124
+ const RepresentationType$1 = 'EnablementProgramSummaryListRepresentation';
1125
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
1126
+ const input_programSummaryList = input.programSummaryList;
1127
+ const input_programSummaryList_id = path.fullPath + '__programSummaryList';
1128
+ for (let i = 0; i < input_programSummaryList.length; i++) {
1129
+ const input_programSummaryList_item = input_programSummaryList[i];
1130
+ let input_programSummaryList_item_id = input_programSummaryList_id + '__' + i;
1131
+ input_programSummaryList[i] = ingest$2(input_programSummaryList_item, {
1132
+ fullPath: input_programSummaryList_item_id,
1133
+ propertyName: i,
1134
+ parent: {
1135
+ data: input,
1136
+ key: path.fullPath,
1137
+ existing: existing,
1138
+ },
1139
+ ttl: path.ttl
1140
+ }, luvio, store, timestamp);
1141
+ }
1142
+ return input;
1143
+ }
1144
+ const select$6 = function EnablementProgramSummaryListRepresentationSelect() {
1145
+ return {
1146
+ kind: 'Fragment',
1147
+ version: VERSION$1,
1148
+ private: [],
1149
+ selections: [
1150
+ {
1151
+ name: 'hasMore',
1152
+ kind: 'Scalar'
1153
+ },
1154
+ {
1155
+ name: 'programSummaryList',
1156
+ kind: 'Link',
1157
+ plural: true,
1158
+ fragment: select$7()
1159
+ }
1160
+ ]
1161
+ };
1162
+ };
1163
+ function equals$1(existing, incoming) {
1164
+ const existing_hasMore = existing.hasMore;
1165
+ const incoming_hasMore = incoming.hasMore;
1166
+ if (!(existing_hasMore === incoming_hasMore)) {
1167
+ return false;
1168
+ }
1169
+ const existing_programSummaryList = existing.programSummaryList;
1170
+ const incoming_programSummaryList = incoming.programSummaryList;
1171
+ const equals_programSummaryList_items = equalsArray(existing_programSummaryList, incoming_programSummaryList, (existing_programSummaryList_item, incoming_programSummaryList_item) => {
1172
+ if (!(existing_programSummaryList_item.__ref === incoming_programSummaryList_item.__ref)) {
1173
+ return false;
1174
+ }
1175
+ });
1176
+ if (equals_programSummaryList_items === false) {
1177
+ return false;
1178
+ }
1179
+ return true;
1180
+ }
1181
+ const ingest$1 = function EnablementProgramSummaryListRepresentationIngest(input, path, luvio, store, timestamp) {
1182
+ if (process.env.NODE_ENV !== 'production') {
1183
+ const validateError = validate$1(input);
1184
+ if (validateError !== null) {
1185
+ throw validateError;
1186
+ }
1187
+ }
1188
+ const key = path.fullPath;
1189
+ const ttlToUse = TTL$1;
1190
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "enablement", VERSION$1, RepresentationType$1, equals$1);
1191
+ return createLink(key);
1192
+ };
1193
+ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
1194
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1195
+ const rootKey = fullPathFactory();
1196
+ rootKeySet.set(rootKey, {
1197
+ namespace: keyPrefix,
1198
+ representationName: RepresentationType$1,
1199
+ mergeable: false
1200
+ });
1201
+ const input_programSummaryList_length = input.programSummaryList.length;
1202
+ for (let i = 0; i < input_programSummaryList_length; i++) {
1203
+ getTypeCacheKeys$2(rootKeySet, luvio, input.programSummaryList[i]);
1204
+ }
1205
+ }
1206
+
1207
+ function select$5(luvio, params) {
1208
+ return select$6();
1209
+ }
1210
+ function keyBuilder$6(luvio, params) {
1211
+ return keyPrefix + '::EnablementProgramSummaryListRepresentation:(' + 'filter:' + params.queryParams.filter + ',' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'collectionKey:' + params.queryParams.collectionKey + ',' + 'communityId:' + params.urlParams.communityId + ')';
1212
+ }
1213
+ function getResponseCacheKeys$4(storeKeyMap, luvio, resourceParams, response) {
1214
+ getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$6(luvio, resourceParams));
1215
+ }
1216
+ function ingestSuccess$4(luvio, resourceParams, response, snapshotRefresh) {
1217
+ const { body } = response;
1218
+ const key = keyBuilder$6(luvio, resourceParams);
1219
+ luvio.storeIngest(key, ingest$1, body);
1220
+ const snapshot = luvio.storeLookup({
1221
+ recordId: key,
1222
+ node: select$5(),
1223
+ variables: {},
1224
+ }, snapshotRefresh);
1225
+ if (process.env.NODE_ENV !== 'production') {
1226
+ if (snapshot.state !== 'Fulfilled') {
1227
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1228
+ }
1229
+ }
1230
+ deepFreeze(snapshot.data);
1231
+ return snapshot;
1232
+ }
1233
+ function ingestError$2(luvio, params, error, snapshotRefresh) {
1234
+ const key = keyBuilder$6(luvio, params);
1235
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1236
+ const storeMetadataParams = {
1237
+ ttl: TTL$1,
1238
+ namespace: keyPrefix,
1239
+ version: VERSION$1,
1240
+ representationName: RepresentationType$1
1241
+ };
1242
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1243
+ return errorSnapshot;
1244
+ }
1245
+ function createResourceRequest$4(config) {
1246
+ const headers = {};
1247
+ return {
1248
+ baseUri: '/services/data/v66.0',
1249
+ basePath: '/connect/communities/' + config.urlParams.communityId + '/enablement/program/summary/collection',
1250
+ method: 'get',
1251
+ body: null,
1252
+ urlParams: config.urlParams,
1253
+ queryParams: config.queryParams,
1254
+ headers,
1255
+ priority: 'normal',
1256
+ };
1257
+ }
1258
+
1259
+ const adapterName$4 = 'getProgramSummaryCollectionForCommunity';
1260
+ const getProgramSummaryCollectionForCommunity_ConfigPropertyMetadata = [
1261
+ generateParamConfigMetadata('communityId', true, 0 /* UrlParameter */, 0 /* String */),
1262
+ generateParamConfigMetadata('filter', false, 1 /* QueryParameter */, 0 /* String */),
1263
+ generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
1264
+ generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
1265
+ generateParamConfigMetadata('collectionKey', false, 1 /* QueryParameter */, 0 /* String */),
1266
+ ];
1267
+ const getProgramSummaryCollectionForCommunity_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$4, getProgramSummaryCollectionForCommunity_ConfigPropertyMetadata);
1268
+ const createResourceParams$4 = /*#__PURE__*/ createResourceParams$5(getProgramSummaryCollectionForCommunity_ConfigPropertyMetadata);
1269
+ function keyBuilder$5(luvio, config) {
1270
+ const resourceParams = createResourceParams$4(config);
1271
+ return keyBuilder$6(luvio, resourceParams);
1272
+ }
1273
+ function typeCheckConfig$4(untrustedConfig) {
1274
+ const config = {};
1275
+ typeCheckConfig$5(untrustedConfig, config, getProgramSummaryCollectionForCommunity_ConfigPropertyMetadata);
1276
+ return config;
1277
+ }
1278
+ function validateAdapterConfig$4(untrustedConfig, configPropertyNames) {
1279
+ if (!untrustedIsObject(untrustedConfig)) {
1280
+ return null;
1281
+ }
1282
+ if (process.env.NODE_ENV !== 'production') {
1283
+ validateConfig(untrustedConfig, configPropertyNames);
1284
+ }
1285
+ const config = typeCheckConfig$4(untrustedConfig);
1286
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1287
+ return null;
1288
+ }
1289
+ return config;
1290
+ }
1291
+ function adapterFragment$2(luvio, config) {
1292
+ createResourceParams$4(config);
1293
+ return select$5();
1294
+ }
1295
+ function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
1296
+ const snapshot = ingestSuccess$4(luvio, resourceParams, response, {
1297
+ config,
1298
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
1299
+ });
1300
+ return luvio.storeBroadcast().then(() => snapshot);
1301
+ }
1302
+ function onFetchResponseError$2(luvio, config, resourceParams, response) {
1303
+ const snapshot = ingestError$2(luvio, resourceParams, response, {
1304
+ config,
1305
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
1306
+ });
1307
+ return luvio.storeBroadcast().then(() => snapshot);
1308
+ }
1309
+ function buildNetworkSnapshot$4(luvio, config, options) {
1310
+ const resourceParams = createResourceParams$4(config);
1311
+ const request = createResourceRequest$4(resourceParams);
1312
+ return luvio.dispatchResourceRequest(request, options)
1313
+ .then((response) => {
1314
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
1315
+ const cache = new StoreKeyMap();
1316
+ getResponseCacheKeys$4(cache, luvio, resourceParams, response.body);
1317
+ return cache;
1318
+ });
1319
+ }, (response) => {
1320
+ return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
1321
+ });
1322
+ }
1323
+ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
1324
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$4, undefined, false);
1325
+ }
1326
+ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
1327
+ const { luvio, config } = context;
1328
+ const selector = {
1329
+ recordId: keyBuilder$5(luvio, config),
1330
+ node: adapterFragment$2(luvio, config),
1331
+ variables: {},
1332
+ };
1333
+ const cacheSnapshot = storeLookup(selector, {
1334
+ config,
1335
+ resolve: () => buildNetworkSnapshot$4(luvio, config, snapshotRefreshOptions)
1336
+ });
1337
+ return cacheSnapshot;
1338
+ }
1339
+ const getProgramSummaryCollectionForCommunityAdapterFactory = (luvio) => function enablement__getProgramSummaryCollectionForCommunity(untrustedConfig, requestContext) {
1340
+ const config = validateAdapterConfig$4(untrustedConfig, getProgramSummaryCollectionForCommunity_ConfigPropertyNames);
1341
+ // Invalid or incomplete config
1342
+ if (config === null) {
1343
+ return null;
1344
+ }
1345
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1346
+ buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
1347
+ };
1348
+
1349
+ function select$4(luvio, params) {
1350
+ return select$6();
1351
+ }
1352
+ function keyBuilder$4(luvio, params) {
1353
+ return keyPrefix + '::EnablementProgramSummaryListRepresentation:(' + 'filter:' + params.queryParams.filter + ',' + 'limit:' + params.queryParams.limit + ',' + 'offset:' + params.queryParams.offset + ',' + 'collectionKey:' + params.queryParams.collectionKey + ')';
1354
+ }
1355
+ function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
1356
+ getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$4(luvio, resourceParams));
1357
+ }
1358
+ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
1359
+ const { body } = response;
1360
+ const key = keyBuilder$4(luvio, resourceParams);
1361
+ luvio.storeIngest(key, ingest$1, body);
1362
+ const snapshot = luvio.storeLookup({
1363
+ recordId: key,
1364
+ node: select$4(),
1365
+ variables: {},
1366
+ }, snapshotRefresh);
1367
+ if (process.env.NODE_ENV !== 'production') {
1368
+ if (snapshot.state !== 'Fulfilled') {
1369
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1370
+ }
1371
+ }
1372
+ deepFreeze(snapshot.data);
1373
+ return snapshot;
1374
+ }
1375
+ function ingestError$1(luvio, params, error, snapshotRefresh) {
1376
+ const key = keyBuilder$4(luvio, params);
1377
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1378
+ const storeMetadataParams = {
1379
+ ttl: TTL$1,
1380
+ namespace: keyPrefix,
1381
+ version: VERSION$1,
1382
+ representationName: RepresentationType$1
1383
+ };
1384
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1385
+ return errorSnapshot;
1386
+ }
1387
+ function createResourceRequest$3(config) {
1388
+ const headers = {};
1389
+ return {
1390
+ baseUri: '/services/data/v66.0',
1391
+ basePath: '/connect/enablement/program/summary/collection',
1392
+ method: 'get',
1393
+ body: null,
1394
+ urlParams: {},
1395
+ queryParams: config.queryParams,
1396
+ headers,
1397
+ priority: 'normal',
1398
+ };
1399
+ }
1400
+
1401
+ const adapterName$3 = 'getProgramSummaryCollection';
1402
+ const getProgramSummaryCollection_ConfigPropertyMetadata = [
1403
+ generateParamConfigMetadata('filter', false, 1 /* QueryParameter */, 0 /* String */),
1404
+ generateParamConfigMetadata('limit', false, 1 /* QueryParameter */, 3 /* Integer */),
1405
+ generateParamConfigMetadata('offset', false, 1 /* QueryParameter */, 3 /* Integer */),
1406
+ generateParamConfigMetadata('collectionKey', false, 1 /* QueryParameter */, 0 /* String */),
1407
+ ];
1408
+ const getProgramSummaryCollection_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getProgramSummaryCollection_ConfigPropertyMetadata);
1409
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$5(getProgramSummaryCollection_ConfigPropertyMetadata);
1410
+ function keyBuilder$3(luvio, config) {
1411
+ const resourceParams = createResourceParams$3(config);
1412
+ return keyBuilder$4(luvio, resourceParams);
1413
+ }
1414
+ function typeCheckConfig$3(untrustedConfig) {
1415
+ const config = {};
1416
+ typeCheckConfig$5(untrustedConfig, config, getProgramSummaryCollection_ConfigPropertyMetadata);
1417
+ return config;
1418
+ }
1419
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
1420
+ if (!untrustedIsObject(untrustedConfig)) {
1421
+ return null;
1422
+ }
1423
+ if (process.env.NODE_ENV !== 'production') {
1424
+ validateConfig(untrustedConfig, configPropertyNames);
1425
+ }
1426
+ const config = typeCheckConfig$3(untrustedConfig);
1427
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1428
+ return null;
1429
+ }
1430
+ return config;
1431
+ }
1432
+ function adapterFragment$1(luvio, config) {
1433
+ createResourceParams$3(config);
1434
+ return select$4();
1435
+ }
1436
+ function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
1437
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
1438
+ config,
1439
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
1440
+ });
1441
+ return luvio.storeBroadcast().then(() => snapshot);
1442
+ }
1443
+ function onFetchResponseError$1(luvio, config, resourceParams, response) {
1444
+ const snapshot = ingestError$1(luvio, resourceParams, response, {
1445
+ config,
1446
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
1447
+ });
1448
+ return luvio.storeBroadcast().then(() => snapshot);
1449
+ }
1450
+ function buildNetworkSnapshot$3(luvio, config, options) {
1451
+ const resourceParams = createResourceParams$3(config);
1452
+ const request = createResourceRequest$3(resourceParams);
1453
+ return luvio.dispatchResourceRequest(request, options)
1454
+ .then((response) => {
1455
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
1456
+ const cache = new StoreKeyMap();
1457
+ getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
1458
+ return cache;
1459
+ });
1460
+ }, (response) => {
1461
+ return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
1462
+ });
1463
+ }
1464
+ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
1465
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
1466
+ }
1467
+ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
1468
+ const { luvio, config } = context;
1469
+ const selector = {
1470
+ recordId: keyBuilder$3(luvio, config),
1471
+ node: adapterFragment$1(luvio, config),
1472
+ variables: {},
1473
+ };
1474
+ const cacheSnapshot = storeLookup(selector, {
1475
+ config,
1476
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
1477
+ });
1478
+ return cacheSnapshot;
1479
+ }
1480
+ const getProgramSummaryCollectionAdapterFactory = (luvio) => function enablement__getProgramSummaryCollection(untrustedConfig, requestContext) {
1481
+ const config = validateAdapterConfig$3(untrustedConfig, getProgramSummaryCollection_ConfigPropertyNames);
1482
+ // Invalid or incomplete config
1483
+ if (config === null) {
1484
+ return null;
1485
+ }
1486
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1487
+ buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
1488
+ };
1489
+
1490
+ function select$3(luvio, params) {
1491
+ return select$7();
1492
+ }
1493
+ function keyBuilder$2(luvio, params) {
1494
+ return keyBuilder$7(luvio, {
1495
+ enablement_program_id: params.urlParams.enablementProgramId
1496
+ });
1497
+ }
1498
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
1499
+ getTypeCacheKeys$2(storeKeyMap, luvio, response);
1500
+ }
1501
+ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
1502
+ const { body } = response;
1503
+ const key = keyBuilder$2(luvio, resourceParams);
1504
+ luvio.storeIngest(key, ingest$2, body);
1505
+ const snapshot = luvio.storeLookup({
1506
+ recordId: key,
1507
+ node: select$3(),
1508
+ variables: {},
1509
+ }, snapshotRefresh);
1510
+ if (process.env.NODE_ENV !== 'production') {
1511
+ if (snapshot.state !== 'Fulfilled') {
1512
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1513
+ }
1514
+ }
1515
+ deepFreeze(snapshot.data);
1516
+ return snapshot;
1517
+ }
1518
+ function ingestError(luvio, params, error, snapshotRefresh) {
1519
+ const key = keyBuilder$2(luvio, params);
1520
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
1521
+ const storeMetadataParams = {
1522
+ ttl: TTL$2,
1523
+ namespace: keyPrefix,
1524
+ version: VERSION$2,
1525
+ representationName: RepresentationType$2
1526
+ };
1527
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
1528
+ return errorSnapshot;
1529
+ }
1530
+ function createResourceRequest$2(config) {
1531
+ const headers = {};
1532
+ return {
1533
+ baseUri: '/services/data/v66.0',
1534
+ basePath: '/connect/enablement/program/summary/' + config.urlParams.enablementProgramId + '',
1535
+ method: 'get',
1536
+ body: null,
1537
+ urlParams: config.urlParams,
1538
+ queryParams: config.queryParams,
1539
+ headers,
1540
+ priority: 'normal',
1541
+ };
1542
+ }
1543
+
1544
+ const adapterName$2 = 'getEnablementProgramSummary';
1545
+ const getEnablementProgramSummary_ConfigPropertyMetadata = [
1546
+ generateParamConfigMetadata('enablementProgramId', true, 0 /* UrlParameter */, 0 /* String */),
1547
+ generateParamConfigMetadata('includeProgress', false, 1 /* QueryParameter */, 1 /* Boolean */),
1548
+ ];
1549
+ const getEnablementProgramSummary_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getEnablementProgramSummary_ConfigPropertyMetadata);
1550
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$5(getEnablementProgramSummary_ConfigPropertyMetadata);
1551
+ function keyBuilder$1(luvio, config) {
1552
+ const resourceParams = createResourceParams$2(config);
1553
+ return keyBuilder$2(luvio, resourceParams);
1554
+ }
1555
+ function typeCheckConfig$2(untrustedConfig) {
1556
+ const config = {};
1557
+ typeCheckConfig$5(untrustedConfig, config, getEnablementProgramSummary_ConfigPropertyMetadata);
1558
+ return config;
1559
+ }
1560
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
1561
+ if (!untrustedIsObject(untrustedConfig)) {
1562
+ return null;
1563
+ }
1564
+ if (process.env.NODE_ENV !== 'production') {
1565
+ validateConfig(untrustedConfig, configPropertyNames);
1566
+ }
1567
+ const config = typeCheckConfig$2(untrustedConfig);
1568
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1569
+ return null;
1570
+ }
1571
+ return config;
1572
+ }
1573
+ function adapterFragment(luvio, config) {
1574
+ createResourceParams$2(config);
1575
+ return select$3();
1576
+ }
1577
+ function onFetchResponseSuccess(luvio, config, resourceParams, response) {
1578
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
1579
+ config,
1580
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1581
+ });
1582
+ return luvio.storeBroadcast().then(() => snapshot);
1583
+ }
1584
+ function onFetchResponseError(luvio, config, resourceParams, response) {
1585
+ const snapshot = ingestError(luvio, resourceParams, response, {
1586
+ config,
1587
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1588
+ });
1589
+ return luvio.storeBroadcast().then(() => snapshot);
1590
+ }
1591
+ function buildNetworkSnapshot$2(luvio, config, options) {
1592
+ const resourceParams = createResourceParams$2(config);
1593
+ const request = createResourceRequest$2(resourceParams);
1594
+ return luvio.dispatchResourceRequest(request, options)
1595
+ .then((response) => {
1596
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
1597
+ const cache = new StoreKeyMap();
1598
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
1599
+ return cache;
1600
+ });
1601
+ }, (response) => {
1602
+ return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
1603
+ });
1604
+ }
1605
+ function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
1606
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
1607
+ }
1608
+ function buildCachedSnapshotCachePolicy(context, storeLookup) {
1609
+ const { luvio, config } = context;
1610
+ const selector = {
1611
+ recordId: keyBuilder$1(luvio, config),
1612
+ node: adapterFragment(luvio, config),
1613
+ variables: {},
1614
+ };
1615
+ const cacheSnapshot = storeLookup(selector, {
1616
+ config,
1617
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
1618
+ });
1619
+ return cacheSnapshot;
1620
+ }
1621
+ const getEnablementProgramSummaryAdapterFactory = (luvio) => function enablement__getEnablementProgramSummary(untrustedConfig, requestContext) {
1622
+ const config = validateAdapterConfig$2(untrustedConfig, getEnablementProgramSummary_ConfigPropertyNames);
1623
+ // Invalid or incomplete config
1624
+ if (config === null) {
1625
+ return null;
1626
+ }
1627
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
1628
+ buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
1629
+ };
1630
+
1631
+ const TTL = 15000;
1632
+ const VERSION = "f87a4ca2a25d6b000ce11b00273a58f4";
1633
+ function validate(obj, path = 'EnablementProgramSelfEnrollmentRepresentation') {
1634
+ const v_error = (() => {
1635
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1636
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1637
+ }
1638
+ const obj_learningItemAssignmentId = obj.learningItemAssignmentId;
1639
+ const path_learningItemAssignmentId = path + '.learningItemAssignmentId';
1640
+ if (typeof obj_learningItemAssignmentId !== 'string') {
1641
+ return new TypeError('Expected "string" but received "' + typeof obj_learningItemAssignmentId + '" (at "' + path_learningItemAssignmentId + '")');
1642
+ }
1643
+ })();
1644
+ return v_error === undefined ? null : v_error;
1645
+ }
1646
+ const RepresentationType = 'EnablementProgramSelfEnrollmentRepresentation';
1647
+ function keyBuilder(luvio, config) {
1648
+ return keyPrefix + '::' + RepresentationType + ':' + config.learning_item_assignment_id;
1649
+ }
1650
+ function keyBuilderFromType(luvio, object) {
1651
+ const keyParams = {
1652
+ learning_item_assignment_id: object.learningItemAssignmentId
1653
+ };
1654
+ return keyBuilder(luvio, keyParams);
1655
+ }
1656
+ function normalize(input, existing, path, luvio, store, timestamp) {
1657
+ return input;
1658
+ }
1659
+ const select$2 = function EnablementProgramSelfEnrollmentRepresentationSelect() {
1660
+ return {
1661
+ kind: 'Fragment',
1662
+ version: VERSION,
1663
+ private: [],
1664
+ selections: [
1665
+ {
1666
+ name: 'learningItemAssignmentId',
1667
+ kind: 'Scalar'
1668
+ }
1669
+ ]
1670
+ };
1671
+ };
1672
+ function equals(existing, incoming) {
1673
+ const existing_learningItemAssignmentId = existing.learningItemAssignmentId;
1674
+ const incoming_learningItemAssignmentId = incoming.learningItemAssignmentId;
1675
+ if (!(existing_learningItemAssignmentId === incoming_learningItemAssignmentId)) {
1676
+ return false;
1677
+ }
1678
+ return true;
1679
+ }
1680
+ const ingest = function EnablementProgramSelfEnrollmentRepresentationIngest(input, path, luvio, store, timestamp) {
1681
+ if (process.env.NODE_ENV !== 'production') {
1682
+ const validateError = validate(input);
1683
+ if (validateError !== null) {
1684
+ throw validateError;
1685
+ }
1686
+ }
1687
+ const key = keyBuilderFromType(luvio, input);
1688
+ const ttlToUse = TTL;
1689
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "enablement", VERSION, RepresentationType, equals);
1690
+ return createLink(key);
1691
+ };
1692
+ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
1693
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1694
+ const rootKey = keyBuilderFromType(luvio, input);
1695
+ rootKeySet.set(rootKey, {
1696
+ namespace: keyPrefix,
1697
+ representationName: RepresentationType,
1698
+ mergeable: false
1699
+ });
1700
+ }
1701
+
1702
+ function select$1(luvio, params) {
1703
+ return select$2();
1704
+ }
1705
+ function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
1706
+ getTypeCacheKeys(storeKeyMap, luvio, response);
1707
+ }
1708
+ function ingestSuccess$1(luvio, resourceParams, response) {
1709
+ const { body } = response;
1710
+ const key = keyBuilderFromType(luvio, body);
1711
+ luvio.storeIngest(key, ingest, body);
1712
+ const snapshot = luvio.storeLookup({
1713
+ recordId: key,
1714
+ node: select$1(),
1715
+ variables: {},
1716
+ });
1717
+ if (process.env.NODE_ENV !== 'production') {
1718
+ if (snapshot.state !== 'Fulfilled') {
1719
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1720
+ }
1721
+ }
1722
+ deepFreeze(snapshot.data);
1723
+ return snapshot;
1724
+ }
1725
+ function createResourceRequest$1(config) {
1726
+ const headers = {};
1727
+ return {
1728
+ baseUri: '/services/data/v66.0',
1729
+ basePath: '/connect/enablement/program/' + config.urlParams.enablementProgramId + '/actions/enroll',
1730
+ method: 'post',
1731
+ body: null,
1732
+ urlParams: config.urlParams,
1733
+ queryParams: {},
1734
+ headers,
1735
+ priority: 'normal',
1736
+ };
1737
+ }
1738
+
1739
+ const adapterName$1 = 'selfEnrollInEnablementProgram';
1740
+ const selfEnrollInEnablementProgram_ConfigPropertyMetadata = [
1741
+ generateParamConfigMetadata('enablementProgramId', true, 0 /* UrlParameter */, 0 /* String */),
1742
+ ];
1743
+ const selfEnrollInEnablementProgram_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, selfEnrollInEnablementProgram_ConfigPropertyMetadata);
1744
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$5(selfEnrollInEnablementProgram_ConfigPropertyMetadata);
1745
+ function typeCheckConfig$1(untrustedConfig) {
1746
+ const config = {};
1747
+ typeCheckConfig$5(untrustedConfig, config, selfEnrollInEnablementProgram_ConfigPropertyMetadata);
1748
+ return config;
1749
+ }
1750
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1751
+ if (!untrustedIsObject(untrustedConfig)) {
1752
+ return null;
1753
+ }
1754
+ if (process.env.NODE_ENV !== 'production') {
1755
+ validateConfig(untrustedConfig, configPropertyNames);
1756
+ }
1757
+ const config = typeCheckConfig$1(untrustedConfig);
1758
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1759
+ return null;
1760
+ }
1761
+ return config;
1762
+ }
1763
+ function buildNetworkSnapshot$1(luvio, config, options) {
1764
+ const resourceParams = createResourceParams$1(config);
1765
+ const request = createResourceRequest$1(resourceParams);
1766
+ return luvio.dispatchResourceRequest(request, options)
1767
+ .then((response) => {
1768
+ return luvio.handleSuccessResponse(() => {
1769
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response);
1770
+ return luvio.storeBroadcast().then(() => snapshot);
1771
+ }, () => {
1772
+ const cache = new StoreKeyMap();
1773
+ getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
1774
+ return cache;
1775
+ });
1776
+ }, (response) => {
1777
+ deepFreeze(response);
1778
+ throw response;
1779
+ });
1780
+ }
1781
+ const selfEnrollInEnablementProgramAdapterFactory = (luvio) => {
1782
+ return function selfEnrollInEnablementProgram(untrustedConfig) {
1783
+ const config = validateAdapterConfig$1(untrustedConfig, selfEnrollInEnablementProgram_ConfigPropertyNames);
1784
+ // Invalid or incomplete config
1785
+ if (config === null) {
1786
+ throw new Error('Invalid config for "selfEnrollInEnablementProgram"');
1787
+ }
1788
+ return buildNetworkSnapshot$1(luvio, config);
1789
+ };
1790
+ };
1791
+
1792
+ function select(luvio, params) {
1793
+ return select$2();
1794
+ }
1795
+ function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
1796
+ getTypeCacheKeys(storeKeyMap, luvio, response);
1797
+ }
1798
+ function ingestSuccess(luvio, resourceParams, response) {
1799
+ const { body } = response;
1800
+ const key = keyBuilderFromType(luvio, body);
1801
+ luvio.storeIngest(key, ingest, body);
1802
+ const snapshot = luvio.storeLookup({
1803
+ recordId: key,
1804
+ node: select(),
1805
+ variables: {},
1806
+ });
1807
+ if (process.env.NODE_ENV !== 'production') {
1808
+ if (snapshot.state !== 'Fulfilled') {
1809
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1810
+ }
1811
+ }
1812
+ deepFreeze(snapshot.data);
1813
+ return snapshot;
1814
+ }
1815
+ function createResourceRequest(config) {
1816
+ const headers = {};
1817
+ return {
1818
+ baseUri: '/services/data/v66.0',
1819
+ basePath: '/connect/enablement/program/' + config.urlParams.enablementProgramId + '/actions/unenroll',
1820
+ method: 'post',
1821
+ body: null,
1822
+ urlParams: config.urlParams,
1823
+ queryParams: {},
1824
+ headers,
1825
+ priority: 'normal',
1826
+ };
1827
+ }
1828
+
1829
+ const adapterName = 'unenrollFromEnablementProgram';
1830
+ const unenrollFromEnablementProgram_ConfigPropertyMetadata = [
1831
+ generateParamConfigMetadata('enablementProgramId', true, 0 /* UrlParameter */, 0 /* String */),
1832
+ ];
1833
+ const unenrollFromEnablementProgram_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, unenrollFromEnablementProgram_ConfigPropertyMetadata);
1834
+ const createResourceParams = /*#__PURE__*/ createResourceParams$5(unenrollFromEnablementProgram_ConfigPropertyMetadata);
1835
+ function typeCheckConfig(untrustedConfig) {
1836
+ const config = {};
1837
+ typeCheckConfig$5(untrustedConfig, config, unenrollFromEnablementProgram_ConfigPropertyMetadata);
1838
+ return config;
1839
+ }
1840
+ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
1841
+ if (!untrustedIsObject(untrustedConfig)) {
1842
+ return null;
1843
+ }
1844
+ if (process.env.NODE_ENV !== 'production') {
1845
+ validateConfig(untrustedConfig, configPropertyNames);
1846
+ }
1847
+ const config = typeCheckConfig(untrustedConfig);
1848
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1849
+ return null;
1850
+ }
1851
+ return config;
1852
+ }
1853
+ function buildNetworkSnapshot(luvio, config, options) {
1854
+ const resourceParams = createResourceParams(config);
1855
+ const request = createResourceRequest(resourceParams);
1856
+ return luvio.dispatchResourceRequest(request, options)
1857
+ .then((response) => {
1858
+ return luvio.handleSuccessResponse(() => {
1859
+ const snapshot = ingestSuccess(luvio, resourceParams, response);
1860
+ return luvio.storeBroadcast().then(() => snapshot);
1861
+ }, () => {
1862
+ const cache = new StoreKeyMap();
1863
+ getResponseCacheKeys(cache, luvio, resourceParams, response.body);
1864
+ return cache;
1865
+ });
1866
+ }, (response) => {
1867
+ deepFreeze(response);
1868
+ throw response;
1869
+ });
1870
+ }
1871
+ const unenrollFromEnablementProgramAdapterFactory = (luvio) => {
1872
+ return function unenrollFromEnablementProgram(untrustedConfig) {
1873
+ const config = validateAdapterConfig(untrustedConfig, unenrollFromEnablementProgram_ConfigPropertyNames);
1874
+ // Invalid or incomplete config
1875
+ if (config === null) {
1876
+ throw new Error('Invalid config for "unenrollFromEnablementProgram"');
1877
+ }
1878
+ return buildNetworkSnapshot(luvio, config);
1879
+ };
1880
+ };
1881
+
1882
+ export { getEnablementProgramSummaryAdapterFactory, getProgramSummaryCollectionAdapterFactory, getProgramSummaryCollectionForCommunityAdapterFactory, notifyUpdateAvailableFactory as notifyEnablementProgramSummaryUpdateAvailableFactory, selfEnrollInEnablementProgramAdapterFactory, unenrollFromEnablementProgramAdapterFactory };