@salesforce/lds-adapters-industries-education 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 (45) hide show
  1. package/dist/es/es2018/industries-education.js +2214 -2214
  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/createCarePlans.d.ts +15 -15
  4. package/dist/{types → es/es2018/types}/src/generated/adapters/getAvailableTimeSlots.d.ts +27 -27
  5. package/dist/{types → es/es2018/types}/src/generated/adapters/getAvailableTopics.d.ts +25 -25
  6. package/dist/{types → es/es2018/types}/src/generated/adapters/getSuccessTeam.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/getConnectEducationAppointmentBookingAvailableTopics.d.ts +12 -12
  10. package/dist/{types → es/es2018/types}/src/generated/resources/getConnectEducationSuccessTeamByAccountId.d.ts +15 -15
  11. package/dist/{types → es/es2018/types}/src/generated/resources/postConnectEducationAppointmentBookingAvailableTimeSlots.d.ts +16 -16
  12. package/dist/{types → es/es2018/types}/src/generated/resources/postConnectEducationCareplanBulk.d.ts +13 -13
  13. package/dist/{types → es/es2018/types}/src/generated/types/AvailableStaff.d.ts +60 -60
  14. package/dist/{types → es/es2018/types}/src/generated/types/AvailableTeam.d.ts +48 -48
  15. package/dist/{types → es/es2018/types}/src/generated/types/AvailableTimeSlotsInputRepresentation.d.ts +44 -44
  16. package/dist/{types → es/es2018/types}/src/generated/types/AvailableTimeSlotsInputRepresentationData.d.ts +30 -30
  17. package/dist/{types → es/es2018/types}/src/generated/types/AvailableTimeSlotsOuputRepresentation.d.ts +30 -30
  18. package/dist/{types → es/es2018/types}/src/generated/types/AvailableTopic.d.ts +42 -42
  19. package/dist/{types → es/es2018/types}/src/generated/types/AvailableTopicsOutputRepresentation.d.ts +30 -30
  20. package/dist/{types → es/es2018/types}/src/generated/types/BenefitAssignmentInputRepresentation.d.ts +72 -72
  21. package/dist/{types → es/es2018/types}/src/generated/types/BenefitAssignmentListInputRepresentation.d.ts +30 -30
  22. package/dist/{types → es/es2018/types}/src/generated/types/BenefitDisbursementForBenefitSessionInputRepresentation.d.ts +47 -47
  23. package/dist/{types → es/es2018/types}/src/generated/types/BenefitDisbursementListInputRepresentation.d.ts +30 -30
  24. package/dist/{types → es/es2018/types}/src/generated/types/CarePlanBulkInputRepresentation.d.ts +29 -29
  25. package/dist/{types → es/es2018/types}/src/generated/types/CarePlanBulkInputWrapperRepresentation.d.ts +29 -29
  26. package/dist/{types → es/es2018/types}/src/generated/types/CarePlanBulkOutputRepresentation.d.ts +45 -45
  27. package/dist/{types → es/es2018/types}/src/generated/types/CarePlanInputRepresentation.d.ts +68 -68
  28. package/dist/{types → es/es2018/types}/src/generated/types/CarePlanListInputRepresentation.d.ts +30 -30
  29. package/dist/{types → es/es2018/types}/src/generated/types/CarePlanTaskInputRepresentation.d.ts +50 -50
  30. package/dist/{types → es/es2018/types}/src/generated/types/CustomFieldInputRepresentation.d.ts +35 -35
  31. package/dist/{types → es/es2018/types}/src/generated/types/CustomFieldListInputRepresentation.d.ts +30 -30
  32. package/dist/{types → es/es2018/types}/src/generated/types/GetSuccessTeamResult.d.ts +40 -40
  33. package/dist/{types → es/es2018/types}/src/generated/types/GoalAssignmentInputRepresentation.d.ts +68 -68
  34. package/dist/{types → es/es2018/types}/src/generated/types/GoalAssignmentListInputRepresentation.d.ts +30 -30
  35. package/dist/{types → es/es2018/types}/src/generated/types/ServiceAppointment.d.ts +38 -38
  36. package/dist/{types → es/es2018/types}/src/generated/types/ServiceLocation.d.ts +32 -32
  37. package/dist/{types → es/es2018/types}/src/generated/types/SuccessTeamOutputRepresentation.d.ts +30 -30
  38. package/dist/{types → es/es2018/types}/src/generated/types/TimeSlot.d.ts +38 -38
  39. package/dist/{types → es/es2018/types}/src/generated/types/WorkType.d.ts +35 -35
  40. package/dist/{types → es/es2018/types}/src/generated/types/type-utils.d.ts +39 -39
  41. package/package.json +5 -5
  42. package/sfdc/index.d.ts +1 -1
  43. package/sfdc/index.js +2256 -2256
  44. package/dist/umd/es2018/industries-education.js +0 -2296
  45. package/dist/umd/es5/industries-education.js +0 -2317
@@ -6,2280 +6,2280 @@
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 = 'education';
52
52
 
53
- const { freeze: ObjectFreeze, keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
54
- const { isArray: ArrayIsArray } = Array;
55
- const { stringify: JSONStringify } = JSON;
56
- function equalsArray(a, b, equalsItem) {
57
- const aLength = a.length;
58
- const bLength = b.length;
59
- if (aLength !== bLength) {
60
- return false;
61
- }
62
- for (let i = 0; i < aLength; i++) {
63
- if (equalsItem(a[i], b[i]) === false) {
64
- return false;
65
- }
66
- }
67
- return true;
68
- }
69
- function equalsObject(a, b, equalsProp) {
70
- const aKeys = ObjectKeys(a).sort();
71
- const bKeys = ObjectKeys(b).sort();
72
- const aKeysLength = aKeys.length;
73
- const bKeysLength = bKeys.length;
74
- if (aKeysLength !== bKeysLength) {
75
- return false;
76
- }
77
- for (let i = 0; i < aKeys.length; i++) {
78
- const key = aKeys[i];
79
- if (key !== bKeys[i]) {
80
- return false;
81
- }
82
- if (equalsProp(a[key], b[key]) === false) {
83
- return false;
84
- }
85
- }
86
- return true;
87
- }
88
- function deepFreeze$1(value) {
89
- // No need to freeze primitives
90
- if (typeof value !== 'object' || value === null) {
91
- return;
92
- }
93
- if (ArrayIsArray(value)) {
94
- for (let i = 0, len = value.length; i < len; i += 1) {
95
- deepFreeze$1(value[i]);
96
- }
97
- }
98
- else {
99
- const keys = ObjectKeys(value);
100
- for (let i = 0, len = keys.length; i < len; i += 1) {
101
- deepFreeze$1(value[keys[i]]);
102
- }
103
- }
104
- ObjectFreeze(value);
105
- }
106
- function createLink(ref) {
107
- return {
108
- __ref: serializeStructuredKey(ref),
109
- };
53
+ const { freeze: ObjectFreeze, keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
54
+ const { isArray: ArrayIsArray } = Array;
55
+ const { stringify: JSONStringify } = JSON;
56
+ function equalsArray(a, b, equalsItem) {
57
+ const aLength = a.length;
58
+ const bLength = b.length;
59
+ if (aLength !== bLength) {
60
+ return false;
61
+ }
62
+ for (let i = 0; i < aLength; i++) {
63
+ if (equalsItem(a[i], b[i]) === false) {
64
+ return false;
65
+ }
66
+ }
67
+ return true;
68
+ }
69
+ function equalsObject(a, b, equalsProp) {
70
+ const aKeys = ObjectKeys(a).sort();
71
+ const bKeys = ObjectKeys(b).sort();
72
+ const aKeysLength = aKeys.length;
73
+ const bKeysLength = bKeys.length;
74
+ if (aKeysLength !== bKeysLength) {
75
+ return false;
76
+ }
77
+ for (let i = 0; i < aKeys.length; i++) {
78
+ const key = aKeys[i];
79
+ if (key !== bKeys[i]) {
80
+ return false;
81
+ }
82
+ if (equalsProp(a[key], b[key]) === false) {
83
+ return false;
84
+ }
85
+ }
86
+ return true;
87
+ }
88
+ function deepFreeze$1(value) {
89
+ // No need to freeze primitives
90
+ if (typeof value !== 'object' || value === null) {
91
+ return;
92
+ }
93
+ if (ArrayIsArray(value)) {
94
+ for (let i = 0, len = value.length; i < len; i += 1) {
95
+ deepFreeze$1(value[i]);
96
+ }
97
+ }
98
+ else {
99
+ const keys = ObjectKeys(value);
100
+ for (let i = 0, len = keys.length; i < len; i += 1) {
101
+ deepFreeze$1(value[keys[i]]);
102
+ }
103
+ }
104
+ ObjectFreeze(value);
105
+ }
106
+ function createLink(ref) {
107
+ return {
108
+ __ref: serializeStructuredKey(ref),
109
+ };
110
110
  }
111
111
 
112
- function validate$k(obj, path = 'AvailableTimeSlotsInputRepresentation') {
113
- const v_error = (() => {
114
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
115
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
116
- }
117
- if (obj.endTime !== undefined) {
118
- const obj_endTime = obj.endTime;
119
- const path_endTime = path + '.endTime';
120
- if (typeof obj_endTime !== 'string') {
121
- return new TypeError('Expected "string" but received "' + typeof obj_endTime + '" (at "' + path_endTime + '")');
122
- }
123
- }
124
- const obj_engagementChannelTypeIds = obj.engagementChannelTypeIds;
125
- const path_engagementChannelTypeIds = path + '.engagementChannelTypeIds';
126
- if (!ArrayIsArray(obj_engagementChannelTypeIds)) {
127
- return new TypeError('Expected "array" but received "' + typeof obj_engagementChannelTypeIds + '" (at "' + path_engagementChannelTypeIds + '")');
128
- }
129
- for (let i = 0; i < obj_engagementChannelTypeIds.length; i++) {
130
- const obj_engagementChannelTypeIds_item = obj_engagementChannelTypeIds[i];
131
- const path_engagementChannelTypeIds_item = path_engagementChannelTypeIds + '[' + i + ']';
132
- if (typeof obj_engagementChannelTypeIds_item !== 'string') {
133
- return new TypeError('Expected "string" but received "' + typeof obj_engagementChannelTypeIds_item + '" (at "' + path_engagementChannelTypeIds_item + '")');
134
- }
135
- }
136
- const obj_serviceResourceIds = obj.serviceResourceIds;
137
- const path_serviceResourceIds = path + '.serviceResourceIds';
138
- if (!ArrayIsArray(obj_serviceResourceIds)) {
139
- return new TypeError('Expected "array" but received "' + typeof obj_serviceResourceIds + '" (at "' + path_serviceResourceIds + '")');
140
- }
141
- for (let i = 0; i < obj_serviceResourceIds.length; i++) {
142
- const obj_serviceResourceIds_item = obj_serviceResourceIds[i];
143
- const path_serviceResourceIds_item = path_serviceResourceIds + '[' + i + ']';
144
- if (typeof obj_serviceResourceIds_item !== 'string') {
145
- return new TypeError('Expected "string" but received "' + typeof obj_serviceResourceIds_item + '" (at "' + path_serviceResourceIds_item + '")');
146
- }
147
- }
148
- const obj_serviceTerritoryIds = obj.serviceTerritoryIds;
149
- const path_serviceTerritoryIds = path + '.serviceTerritoryIds';
150
- if (!ArrayIsArray(obj_serviceTerritoryIds)) {
151
- return new TypeError('Expected "array" but received "' + typeof obj_serviceTerritoryIds + '" (at "' + path_serviceTerritoryIds + '")');
152
- }
153
- for (let i = 0; i < obj_serviceTerritoryIds.length; i++) {
154
- const obj_serviceTerritoryIds_item = obj_serviceTerritoryIds[i];
155
- const path_serviceTerritoryIds_item = path_serviceTerritoryIds + '[' + i + ']';
156
- if (typeof obj_serviceTerritoryIds_item !== 'string') {
157
- return new TypeError('Expected "string" but received "' + typeof obj_serviceTerritoryIds_item + '" (at "' + path_serviceTerritoryIds_item + '")');
158
- }
159
- }
160
- if (obj.startTime !== undefined) {
161
- const obj_startTime = obj.startTime;
162
- const path_startTime = path + '.startTime';
163
- if (typeof obj_startTime !== 'string') {
164
- return new TypeError('Expected "string" but received "' + typeof obj_startTime + '" (at "' + path_startTime + '")');
165
- }
166
- }
167
- const obj_workTypeGroupId = obj.workTypeGroupId;
168
- const path_workTypeGroupId = path + '.workTypeGroupId';
169
- if (typeof obj_workTypeGroupId !== 'string') {
170
- return new TypeError('Expected "string" but received "' + typeof obj_workTypeGroupId + '" (at "' + path_workTypeGroupId + '")');
171
- }
172
- })();
173
- return v_error === undefined ? null : v_error;
112
+ function validate$k(obj, path = 'AvailableTimeSlotsInputRepresentation') {
113
+ const v_error = (() => {
114
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
115
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
116
+ }
117
+ if (obj.endTime !== undefined) {
118
+ const obj_endTime = obj.endTime;
119
+ const path_endTime = path + '.endTime';
120
+ if (typeof obj_endTime !== 'string') {
121
+ return new TypeError('Expected "string" but received "' + typeof obj_endTime + '" (at "' + path_endTime + '")');
122
+ }
123
+ }
124
+ const obj_engagementChannelTypeIds = obj.engagementChannelTypeIds;
125
+ const path_engagementChannelTypeIds = path + '.engagementChannelTypeIds';
126
+ if (!ArrayIsArray(obj_engagementChannelTypeIds)) {
127
+ return new TypeError('Expected "array" but received "' + typeof obj_engagementChannelTypeIds + '" (at "' + path_engagementChannelTypeIds + '")');
128
+ }
129
+ for (let i = 0; i < obj_engagementChannelTypeIds.length; i++) {
130
+ const obj_engagementChannelTypeIds_item = obj_engagementChannelTypeIds[i];
131
+ const path_engagementChannelTypeIds_item = path_engagementChannelTypeIds + '[' + i + ']';
132
+ if (typeof obj_engagementChannelTypeIds_item !== 'string') {
133
+ return new TypeError('Expected "string" but received "' + typeof obj_engagementChannelTypeIds_item + '" (at "' + path_engagementChannelTypeIds_item + '")');
134
+ }
135
+ }
136
+ const obj_serviceResourceIds = obj.serviceResourceIds;
137
+ const path_serviceResourceIds = path + '.serviceResourceIds';
138
+ if (!ArrayIsArray(obj_serviceResourceIds)) {
139
+ return new TypeError('Expected "array" but received "' + typeof obj_serviceResourceIds + '" (at "' + path_serviceResourceIds + '")');
140
+ }
141
+ for (let i = 0; i < obj_serviceResourceIds.length; i++) {
142
+ const obj_serviceResourceIds_item = obj_serviceResourceIds[i];
143
+ const path_serviceResourceIds_item = path_serviceResourceIds + '[' + i + ']';
144
+ if (typeof obj_serviceResourceIds_item !== 'string') {
145
+ return new TypeError('Expected "string" but received "' + typeof obj_serviceResourceIds_item + '" (at "' + path_serviceResourceIds_item + '")');
146
+ }
147
+ }
148
+ const obj_serviceTerritoryIds = obj.serviceTerritoryIds;
149
+ const path_serviceTerritoryIds = path + '.serviceTerritoryIds';
150
+ if (!ArrayIsArray(obj_serviceTerritoryIds)) {
151
+ return new TypeError('Expected "array" but received "' + typeof obj_serviceTerritoryIds + '" (at "' + path_serviceTerritoryIds + '")');
152
+ }
153
+ for (let i = 0; i < obj_serviceTerritoryIds.length; i++) {
154
+ const obj_serviceTerritoryIds_item = obj_serviceTerritoryIds[i];
155
+ const path_serviceTerritoryIds_item = path_serviceTerritoryIds + '[' + i + ']';
156
+ if (typeof obj_serviceTerritoryIds_item !== 'string') {
157
+ return new TypeError('Expected "string" but received "' + typeof obj_serviceTerritoryIds_item + '" (at "' + path_serviceTerritoryIds_item + '")');
158
+ }
159
+ }
160
+ if (obj.startTime !== undefined) {
161
+ const obj_startTime = obj.startTime;
162
+ const path_startTime = path + '.startTime';
163
+ if (typeof obj_startTime !== 'string') {
164
+ return new TypeError('Expected "string" but received "' + typeof obj_startTime + '" (at "' + path_startTime + '")');
165
+ }
166
+ }
167
+ const obj_workTypeGroupId = obj.workTypeGroupId;
168
+ const path_workTypeGroupId = path + '.workTypeGroupId';
169
+ if (typeof obj_workTypeGroupId !== 'string') {
170
+ return new TypeError('Expected "string" but received "' + typeof obj_workTypeGroupId + '" (at "' + path_workTypeGroupId + '")');
171
+ }
172
+ })();
173
+ return v_error === undefined ? null : v_error;
174
174
  }
175
175
 
176
- const VERSION$7 = "cfd94fbef61f52ffe43428e23e7a68c8";
177
- function validate$j(obj, path = 'TimeSlot') {
178
- const v_error = (() => {
179
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
180
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
181
- }
182
- if (obj.endTime !== undefined) {
183
- const obj_endTime = obj.endTime;
184
- const path_endTime = path + '.endTime';
185
- if (typeof obj_endTime !== 'string') {
186
- return new TypeError('Expected "string" but received "' + typeof obj_endTime + '" (at "' + path_endTime + '")');
187
- }
188
- }
189
- if (obj.serviceResourceId !== undefined) {
190
- const obj_serviceResourceId = obj.serviceResourceId;
191
- const path_serviceResourceId = path + '.serviceResourceId';
192
- if (typeof obj_serviceResourceId !== 'string') {
193
- return new TypeError('Expected "string" but received "' + typeof obj_serviceResourceId + '" (at "' + path_serviceResourceId + '")');
194
- }
195
- }
196
- if (obj.serviceTerritoryId !== undefined) {
197
- const obj_serviceTerritoryId = obj.serviceTerritoryId;
198
- const path_serviceTerritoryId = path + '.serviceTerritoryId';
199
- if (typeof obj_serviceTerritoryId !== 'string') {
200
- return new TypeError('Expected "string" but received "' + typeof obj_serviceTerritoryId + '" (at "' + path_serviceTerritoryId + '")');
201
- }
202
- }
203
- if (obj.startTime !== undefined) {
204
- const obj_startTime = obj.startTime;
205
- const path_startTime = path + '.startTime';
206
- if (typeof obj_startTime !== 'string') {
207
- return new TypeError('Expected "string" but received "' + typeof obj_startTime + '" (at "' + path_startTime + '")');
208
- }
209
- }
210
- })();
211
- return v_error === undefined ? null : v_error;
212
- }
213
- const select$b = function TimeSlotSelect() {
214
- return {
215
- kind: 'Fragment',
216
- version: VERSION$7,
217
- private: [],
218
- selections: [
219
- {
220
- name: 'endTime',
221
- kind: 'Scalar',
222
- required: false
223
- },
224
- {
225
- name: 'serviceResourceId',
226
- kind: 'Scalar',
227
- required: false
228
- },
229
- {
230
- name: 'serviceTerritoryId',
231
- kind: 'Scalar',
232
- required: false
233
- },
234
- {
235
- name: 'startTime',
236
- kind: 'Scalar',
237
- required: false
238
- }
239
- ]
240
- };
241
- };
242
- function equals$7(existing, incoming) {
243
- const existing_endTime = existing.endTime;
244
- const incoming_endTime = incoming.endTime;
245
- // if at least one of these optionals is defined
246
- if (existing_endTime !== undefined || incoming_endTime !== undefined) {
247
- // if one of these is not defined we know the other is defined and therefore
248
- // not equal
249
- if (existing_endTime === undefined || incoming_endTime === undefined) {
250
- return false;
251
- }
252
- if (!(existing_endTime === incoming_endTime)) {
253
- return false;
254
- }
255
- }
256
- const existing_serviceResourceId = existing.serviceResourceId;
257
- const incoming_serviceResourceId = incoming.serviceResourceId;
258
- // if at least one of these optionals is defined
259
- if (existing_serviceResourceId !== undefined || incoming_serviceResourceId !== undefined) {
260
- // if one of these is not defined we know the other is defined and therefore
261
- // not equal
262
- if (existing_serviceResourceId === undefined || incoming_serviceResourceId === undefined) {
263
- return false;
264
- }
265
- if (!(existing_serviceResourceId === incoming_serviceResourceId)) {
266
- return false;
267
- }
268
- }
269
- const existing_serviceTerritoryId = existing.serviceTerritoryId;
270
- const incoming_serviceTerritoryId = incoming.serviceTerritoryId;
271
- // if at least one of these optionals is defined
272
- if (existing_serviceTerritoryId !== undefined || incoming_serviceTerritoryId !== undefined) {
273
- // if one of these is not defined we know the other is defined and therefore
274
- // not equal
275
- if (existing_serviceTerritoryId === undefined || incoming_serviceTerritoryId === undefined) {
276
- return false;
277
- }
278
- if (!(existing_serviceTerritoryId === incoming_serviceTerritoryId)) {
279
- return false;
280
- }
281
- }
282
- const existing_startTime = existing.startTime;
283
- const incoming_startTime = incoming.startTime;
284
- // if at least one of these optionals is defined
285
- if (existing_startTime !== undefined || incoming_startTime !== undefined) {
286
- // if one of these is not defined we know the other is defined and therefore
287
- // not equal
288
- if (existing_startTime === undefined || incoming_startTime === undefined) {
289
- return false;
290
- }
291
- if (!(existing_startTime === incoming_startTime)) {
292
- return false;
293
- }
294
- }
295
- return true;
176
+ const VERSION$7 = "cfd94fbef61f52ffe43428e23e7a68c8";
177
+ function validate$j(obj, path = 'TimeSlot') {
178
+ const v_error = (() => {
179
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
180
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
181
+ }
182
+ if (obj.endTime !== undefined) {
183
+ const obj_endTime = obj.endTime;
184
+ const path_endTime = path + '.endTime';
185
+ if (typeof obj_endTime !== 'string') {
186
+ return new TypeError('Expected "string" but received "' + typeof obj_endTime + '" (at "' + path_endTime + '")');
187
+ }
188
+ }
189
+ if (obj.serviceResourceId !== undefined) {
190
+ const obj_serviceResourceId = obj.serviceResourceId;
191
+ const path_serviceResourceId = path + '.serviceResourceId';
192
+ if (typeof obj_serviceResourceId !== 'string') {
193
+ return new TypeError('Expected "string" but received "' + typeof obj_serviceResourceId + '" (at "' + path_serviceResourceId + '")');
194
+ }
195
+ }
196
+ if (obj.serviceTerritoryId !== undefined) {
197
+ const obj_serviceTerritoryId = obj.serviceTerritoryId;
198
+ const path_serviceTerritoryId = path + '.serviceTerritoryId';
199
+ if (typeof obj_serviceTerritoryId !== 'string') {
200
+ return new TypeError('Expected "string" but received "' + typeof obj_serviceTerritoryId + '" (at "' + path_serviceTerritoryId + '")');
201
+ }
202
+ }
203
+ if (obj.startTime !== undefined) {
204
+ const obj_startTime = obj.startTime;
205
+ const path_startTime = path + '.startTime';
206
+ if (typeof obj_startTime !== 'string') {
207
+ return new TypeError('Expected "string" but received "' + typeof obj_startTime + '" (at "' + path_startTime + '")');
208
+ }
209
+ }
210
+ })();
211
+ return v_error === undefined ? null : v_error;
212
+ }
213
+ const select$b = function TimeSlotSelect() {
214
+ return {
215
+ kind: 'Fragment',
216
+ version: VERSION$7,
217
+ private: [],
218
+ selections: [
219
+ {
220
+ name: 'endTime',
221
+ kind: 'Scalar',
222
+ required: false
223
+ },
224
+ {
225
+ name: 'serviceResourceId',
226
+ kind: 'Scalar',
227
+ required: false
228
+ },
229
+ {
230
+ name: 'serviceTerritoryId',
231
+ kind: 'Scalar',
232
+ required: false
233
+ },
234
+ {
235
+ name: 'startTime',
236
+ kind: 'Scalar',
237
+ required: false
238
+ }
239
+ ]
240
+ };
241
+ };
242
+ function equals$7(existing, incoming) {
243
+ const existing_endTime = existing.endTime;
244
+ const incoming_endTime = incoming.endTime;
245
+ // if at least one of these optionals is defined
246
+ if (existing_endTime !== undefined || incoming_endTime !== undefined) {
247
+ // if one of these is not defined we know the other is defined and therefore
248
+ // not equal
249
+ if (existing_endTime === undefined || incoming_endTime === undefined) {
250
+ return false;
251
+ }
252
+ if (!(existing_endTime === incoming_endTime)) {
253
+ return false;
254
+ }
255
+ }
256
+ const existing_serviceResourceId = existing.serviceResourceId;
257
+ const incoming_serviceResourceId = incoming.serviceResourceId;
258
+ // if at least one of these optionals is defined
259
+ if (existing_serviceResourceId !== undefined || incoming_serviceResourceId !== undefined) {
260
+ // if one of these is not defined we know the other is defined and therefore
261
+ // not equal
262
+ if (existing_serviceResourceId === undefined || incoming_serviceResourceId === undefined) {
263
+ return false;
264
+ }
265
+ if (!(existing_serviceResourceId === incoming_serviceResourceId)) {
266
+ return false;
267
+ }
268
+ }
269
+ const existing_serviceTerritoryId = existing.serviceTerritoryId;
270
+ const incoming_serviceTerritoryId = incoming.serviceTerritoryId;
271
+ // if at least one of these optionals is defined
272
+ if (existing_serviceTerritoryId !== undefined || incoming_serviceTerritoryId !== undefined) {
273
+ // if one of these is not defined we know the other is defined and therefore
274
+ // not equal
275
+ if (existing_serviceTerritoryId === undefined || incoming_serviceTerritoryId === undefined) {
276
+ return false;
277
+ }
278
+ if (!(existing_serviceTerritoryId === incoming_serviceTerritoryId)) {
279
+ return false;
280
+ }
281
+ }
282
+ const existing_startTime = existing.startTime;
283
+ const incoming_startTime = incoming.startTime;
284
+ // if at least one of these optionals is defined
285
+ if (existing_startTime !== undefined || incoming_startTime !== undefined) {
286
+ // if one of these is not defined we know the other is defined and therefore
287
+ // not equal
288
+ if (existing_startTime === undefined || incoming_startTime === undefined) {
289
+ return false;
290
+ }
291
+ if (!(existing_startTime === incoming_startTime)) {
292
+ return false;
293
+ }
294
+ }
295
+ return true;
296
296
  }
297
297
 
298
- const VERSION$6 = "9c2ef94b89ee532c50c8423528617441";
299
- function validate$i(obj, path = 'AvailableTimeSlotsOuputRepresentation') {
300
- const v_error = (() => {
301
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
302
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
303
- }
304
- const obj_timeSlots = obj.timeSlots;
305
- const path_timeSlots = path + '.timeSlots';
306
- if (!ArrayIsArray(obj_timeSlots)) {
307
- return new TypeError('Expected "array" but received "' + typeof obj_timeSlots + '" (at "' + path_timeSlots + '")');
308
- }
309
- for (let i = 0; i < obj_timeSlots.length; i++) {
310
- const obj_timeSlots_item = obj_timeSlots[i];
311
- const path_timeSlots_item = path_timeSlots + '[' + i + ']';
312
- const referencepath_timeSlots_itemValidationError = validate$j(obj_timeSlots_item, path_timeSlots_item);
313
- if (referencepath_timeSlots_itemValidationError !== null) {
314
- let message = 'Object doesn\'t match TimeSlot (at "' + path_timeSlots_item + '")\n';
315
- message += referencepath_timeSlots_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
316
- return new TypeError(message);
317
- }
318
- }
319
- })();
320
- return v_error === undefined ? null : v_error;
321
- }
322
- const RepresentationType$3 = 'AvailableTimeSlotsOuputRepresentation';
323
- function normalize$3(input, existing, path, luvio, store, timestamp) {
324
- return input;
325
- }
326
- const select$a = function AvailableTimeSlotsOuputRepresentationSelect() {
327
- const { selections: TimeSlot__selections, opaque: TimeSlot__opaque, } = select$b();
328
- return {
329
- kind: 'Fragment',
330
- version: VERSION$6,
331
- private: [],
332
- selections: [
333
- {
334
- name: 'timeSlots',
335
- kind: 'Object',
336
- plural: true,
337
- selections: TimeSlot__selections
338
- }
339
- ]
340
- };
341
- };
342
- function equals$6(existing, incoming) {
343
- const existing_timeSlots = existing.timeSlots;
344
- const incoming_timeSlots = incoming.timeSlots;
345
- const equals_timeSlots_items = equalsArray(existing_timeSlots, incoming_timeSlots, (existing_timeSlots_item, incoming_timeSlots_item) => {
346
- if (!(equals$7(existing_timeSlots_item, incoming_timeSlots_item))) {
347
- return false;
348
- }
349
- });
350
- if (equals_timeSlots_items === false) {
351
- return false;
352
- }
353
- return true;
354
- }
355
- const ingest$3 = function AvailableTimeSlotsOuputRepresentationIngest(input, path, luvio, store, timestamp) {
356
- if (process.env.NODE_ENV !== 'production') {
357
- const validateError = validate$i(input);
358
- if (validateError !== null) {
359
- throw validateError;
360
- }
361
- }
362
- const key = path.fullPath;
363
- const existingRecord = store.readEntry(key);
364
- const ttlToUse = path.ttl !== undefined ? path.ttl : 360000;
365
- let incomingRecord = normalize$3(input, store.readEntry(key), {
366
- fullPath: key,
367
- parent: path.parent,
368
- propertyName: path.propertyName,
369
- ttl: ttlToUse
370
- });
371
- if (existingRecord === undefined || equals$6(existingRecord, incomingRecord) === false) {
372
- luvio.storePublish(key, incomingRecord);
373
- }
374
- if (ttlToUse !== undefined) {
375
- const storeMetadataParams = {
376
- ttl: ttlToUse,
377
- namespace: "education",
378
- version: VERSION$6,
379
- representationName: RepresentationType$3,
380
- };
381
- luvio.publishStoreMetadata(key, storeMetadataParams);
382
- }
383
- return createLink(key);
384
- };
385
- function getTypeCacheKeys$3(luvio, input, fullPathFactory) {
386
- const rootKeySet = new StoreKeyMap();
387
- // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
388
- const rootKey = fullPathFactory();
389
- rootKeySet.set(rootKey, {
390
- namespace: keyPrefix,
391
- representationName: RepresentationType$3,
392
- mergeable: false
393
- });
394
- return rootKeySet;
298
+ const VERSION$6 = "9c2ef94b89ee532c50c8423528617441";
299
+ function validate$i(obj, path = 'AvailableTimeSlotsOuputRepresentation') {
300
+ const v_error = (() => {
301
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
302
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
303
+ }
304
+ const obj_timeSlots = obj.timeSlots;
305
+ const path_timeSlots = path + '.timeSlots';
306
+ if (!ArrayIsArray(obj_timeSlots)) {
307
+ return new TypeError('Expected "array" but received "' + typeof obj_timeSlots + '" (at "' + path_timeSlots + '")');
308
+ }
309
+ for (let i = 0; i < obj_timeSlots.length; i++) {
310
+ const obj_timeSlots_item = obj_timeSlots[i];
311
+ const path_timeSlots_item = path_timeSlots + '[' + i + ']';
312
+ const referencepath_timeSlots_itemValidationError = validate$j(obj_timeSlots_item, path_timeSlots_item);
313
+ if (referencepath_timeSlots_itemValidationError !== null) {
314
+ let message = 'Object doesn\'t match TimeSlot (at "' + path_timeSlots_item + '")\n';
315
+ message += referencepath_timeSlots_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
316
+ return new TypeError(message);
317
+ }
318
+ }
319
+ })();
320
+ return v_error === undefined ? null : v_error;
321
+ }
322
+ const RepresentationType$3 = 'AvailableTimeSlotsOuputRepresentation';
323
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
324
+ return input;
325
+ }
326
+ const select$a = function AvailableTimeSlotsOuputRepresentationSelect() {
327
+ const { selections: TimeSlot__selections, opaque: TimeSlot__opaque, } = select$b();
328
+ return {
329
+ kind: 'Fragment',
330
+ version: VERSION$6,
331
+ private: [],
332
+ selections: [
333
+ {
334
+ name: 'timeSlots',
335
+ kind: 'Object',
336
+ plural: true,
337
+ selections: TimeSlot__selections
338
+ }
339
+ ]
340
+ };
341
+ };
342
+ function equals$6(existing, incoming) {
343
+ const existing_timeSlots = existing.timeSlots;
344
+ const incoming_timeSlots = incoming.timeSlots;
345
+ const equals_timeSlots_items = equalsArray(existing_timeSlots, incoming_timeSlots, (existing_timeSlots_item, incoming_timeSlots_item) => {
346
+ if (!(equals$7(existing_timeSlots_item, incoming_timeSlots_item))) {
347
+ return false;
348
+ }
349
+ });
350
+ if (equals_timeSlots_items === false) {
351
+ return false;
352
+ }
353
+ return true;
354
+ }
355
+ const ingest$3 = function AvailableTimeSlotsOuputRepresentationIngest(input, path, luvio, store, timestamp) {
356
+ if (process.env.NODE_ENV !== 'production') {
357
+ const validateError = validate$i(input);
358
+ if (validateError !== null) {
359
+ throw validateError;
360
+ }
361
+ }
362
+ const key = path.fullPath;
363
+ const existingRecord = store.readEntry(key);
364
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 360000;
365
+ let incomingRecord = normalize$3(input, store.readEntry(key), {
366
+ fullPath: key,
367
+ parent: path.parent,
368
+ propertyName: path.propertyName,
369
+ ttl: ttlToUse
370
+ });
371
+ if (existingRecord === undefined || equals$6(existingRecord, incomingRecord) === false) {
372
+ luvio.storePublish(key, incomingRecord);
373
+ }
374
+ if (ttlToUse !== undefined) {
375
+ const storeMetadataParams = {
376
+ ttl: ttlToUse,
377
+ namespace: "education",
378
+ version: VERSION$6,
379
+ representationName: RepresentationType$3,
380
+ };
381
+ luvio.publishStoreMetadata(key, storeMetadataParams);
382
+ }
383
+ return createLink(key);
384
+ };
385
+ function getTypeCacheKeys$3(luvio, input, fullPathFactory) {
386
+ const rootKeySet = new StoreKeyMap();
387
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
388
+ const rootKey = fullPathFactory();
389
+ rootKeySet.set(rootKey, {
390
+ namespace: keyPrefix,
391
+ representationName: RepresentationType$3,
392
+ mergeable: false
393
+ });
394
+ return rootKeySet;
395
395
  }
396
396
 
397
- function select$9(luvio, params) {
398
- return select$a();
399
- }
400
- function keyBuilder$6(luvio, params) {
401
- return keyPrefix + '::AvailableTimeSlotsOuputRepresentation:(' + (params.body.availableTimeSlotsInput.endTime === undefined ? 'availableTimeSlotsInput.endTime' : 'availableTimeSlotsInput.endTime:' + params.body.availableTimeSlotsInput.endTime) + '::' + 'availableTimeSlotsInput.engagementChannelTypeIds:' + params.body.availableTimeSlotsInput.engagementChannelTypeIds + '::' + 'availableTimeSlotsInput.serviceResourceIds:' + params.body.availableTimeSlotsInput.serviceResourceIds + '::' + 'availableTimeSlotsInput.serviceTerritoryIds:' + params.body.availableTimeSlotsInput.serviceTerritoryIds + '::' + (params.body.availableTimeSlotsInput.startTime === undefined ? 'availableTimeSlotsInput.startTime' : 'availableTimeSlotsInput.startTime:' + params.body.availableTimeSlotsInput.startTime) + '::' + 'availableTimeSlotsInput.workTypeGroupId:' + params.body.availableTimeSlotsInput.workTypeGroupId + ')';
402
- }
403
- function getResponseCacheKeys$3(luvio, resourceParams, response) {
404
- return getTypeCacheKeys$3(luvio, response, () => keyBuilder$6(luvio, resourceParams));
405
- }
406
- function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
407
- const { body } = response;
408
- const key = keyBuilder$6(luvio, resourceParams);
409
- luvio.storeIngest(key, ingest$3, body);
410
- const snapshot = luvio.storeLookup({
411
- recordId: key,
412
- node: select$9(),
413
- variables: {},
414
- }, snapshotRefresh);
415
- if (process.env.NODE_ENV !== 'production') {
416
- if (snapshot.state !== 'Fulfilled') {
417
- throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
418
- }
419
- }
420
- return snapshot;
421
- }
422
- function ingestError$2(luvio, params, error, snapshotRefresh) {
423
- const key = keyBuilder$6(luvio, params);
424
- const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
425
- luvio.storeIngestError(key, errorSnapshot);
426
- return errorSnapshot;
427
- }
428
- function createResourceRequest$3(config) {
429
- const headers = {};
430
- return {
431
- baseUri: '/services/data/v58.0',
432
- basePath: '/connect/education/appointment-booking/available-time-slots',
433
- method: 'post',
434
- body: config.body,
435
- urlParams: {},
436
- queryParams: {},
437
- headers,
438
- priority: 'normal',
439
- };
397
+ function select$9(luvio, params) {
398
+ return select$a();
399
+ }
400
+ function keyBuilder$6(luvio, params) {
401
+ return keyPrefix + '::AvailableTimeSlotsOuputRepresentation:(' + (params.body.availableTimeSlotsInput.endTime === undefined ? 'availableTimeSlotsInput.endTime' : 'availableTimeSlotsInput.endTime:' + params.body.availableTimeSlotsInput.endTime) + '::' + 'availableTimeSlotsInput.engagementChannelTypeIds:' + params.body.availableTimeSlotsInput.engagementChannelTypeIds + '::' + 'availableTimeSlotsInput.serviceResourceIds:' + params.body.availableTimeSlotsInput.serviceResourceIds + '::' + 'availableTimeSlotsInput.serviceTerritoryIds:' + params.body.availableTimeSlotsInput.serviceTerritoryIds + '::' + (params.body.availableTimeSlotsInput.startTime === undefined ? 'availableTimeSlotsInput.startTime' : 'availableTimeSlotsInput.startTime:' + params.body.availableTimeSlotsInput.startTime) + '::' + 'availableTimeSlotsInput.workTypeGroupId:' + params.body.availableTimeSlotsInput.workTypeGroupId + ')';
402
+ }
403
+ function getResponseCacheKeys$3(luvio, resourceParams, response) {
404
+ return getTypeCacheKeys$3(luvio, response, () => keyBuilder$6(luvio, resourceParams));
405
+ }
406
+ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
407
+ const { body } = response;
408
+ const key = keyBuilder$6(luvio, resourceParams);
409
+ luvio.storeIngest(key, ingest$3, body);
410
+ const snapshot = luvio.storeLookup({
411
+ recordId: key,
412
+ node: select$9(),
413
+ variables: {},
414
+ }, snapshotRefresh);
415
+ if (process.env.NODE_ENV !== 'production') {
416
+ if (snapshot.state !== 'Fulfilled') {
417
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
418
+ }
419
+ }
420
+ return snapshot;
421
+ }
422
+ function ingestError$2(luvio, params, error, snapshotRefresh) {
423
+ const key = keyBuilder$6(luvio, params);
424
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
425
+ luvio.storeIngestError(key, errorSnapshot);
426
+ return errorSnapshot;
427
+ }
428
+ function createResourceRequest$3(config) {
429
+ const headers = {};
430
+ return {
431
+ baseUri: '/services/data/v58.0',
432
+ basePath: '/connect/education/appointment-booking/available-time-slots',
433
+ method: 'post',
434
+ body: config.body,
435
+ urlParams: {},
436
+ queryParams: {},
437
+ headers,
438
+ priority: 'normal',
439
+ };
440
440
  }
441
441
 
442
- const getAvailableTimeSlots_ConfigPropertyNames = {
443
- displayName: 'getAvailableTimeSlots',
444
- parameters: {
445
- required: ['availableTimeSlotsInput'],
446
- optional: []
447
- }
448
- };
449
- function createResourceParams$3(config) {
450
- const resourceParams = {
451
- body: {
452
- availableTimeSlotsInput: config.availableTimeSlotsInput
453
- }
454
- };
455
- return resourceParams;
456
- }
457
- function keyBuilder$5(luvio, config) {
458
- const resourceParams = createResourceParams$3(config);
459
- return keyBuilder$6(luvio, resourceParams);
460
- }
461
- function typeCheckConfig$3(untrustedConfig) {
462
- const config = {};
463
- const untrustedConfig_availableTimeSlotsInput = untrustedConfig.availableTimeSlotsInput;
464
- const referenceAvailableTimeSlotsInputRepresentationValidationError = validate$k(untrustedConfig_availableTimeSlotsInput);
465
- if (referenceAvailableTimeSlotsInputRepresentationValidationError === null) {
466
- config.availableTimeSlotsInput = untrustedConfig_availableTimeSlotsInput;
467
- }
468
- return config;
469
- }
470
- function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
471
- if (!untrustedIsObject(untrustedConfig)) {
472
- return null;
473
- }
474
- if (process.env.NODE_ENV !== 'production') {
475
- validateConfig(untrustedConfig, configPropertyNames);
476
- }
477
- const config = typeCheckConfig$3(untrustedConfig);
478
- if (!areRequiredParametersPresent(config, configPropertyNames)) {
479
- return null;
480
- }
481
- return config;
482
- }
483
- function adapterFragment$2(luvio, config) {
484
- createResourceParams$3(config);
485
- return select$9();
486
- }
487
- function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
488
- const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
489
- config,
490
- resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
491
- });
492
- return luvio.storeBroadcast().then(() => snapshot);
493
- }
494
- function onFetchResponseError$2(luvio, config, resourceParams, response) {
495
- const snapshot = ingestError$2(luvio, resourceParams, response, {
496
- config,
497
- resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
498
- });
499
- return luvio.storeBroadcast().then(() => snapshot);
500
- }
501
- function buildNetworkSnapshot$3(luvio, config, options) {
502
- const resourceParams = createResourceParams$3(config);
503
- const request = createResourceRequest$3(resourceParams);
504
- return luvio.dispatchResourceRequest(request, options)
505
- .then((response) => {
506
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => getResponseCacheKeys$3(luvio, resourceParams, response.body));
507
- }, (response) => {
508
- return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
509
- });
510
- }
511
- function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
512
- const { luvio, config } = context;
513
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
514
- const dispatchOptions = {
515
- resourceRequestContext: {
516
- requestCorrelator,
517
- luvioRequestMethod: 'get',
518
- },
519
- eventObservers
520
- };
521
- if (networkPriority !== 'normal') {
522
- dispatchOptions.overrides = {
523
- priority: networkPriority
524
- };
525
- }
526
- return buildNetworkSnapshot$3(luvio, config, dispatchOptions);
527
- }
528
- function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
529
- const { luvio, config } = context;
530
- const selector = {
531
- recordId: keyBuilder$5(luvio, config),
532
- node: adapterFragment$2(luvio, config),
533
- variables: {},
534
- };
535
- const cacheSnapshot = storeLookup(selector, {
536
- config,
537
- resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
538
- });
539
- return cacheSnapshot;
540
- }
541
- const getAvailableTimeSlotsAdapterFactory = (luvio) => function education__getAvailableTimeSlots(untrustedConfig, requestContext) {
542
- const config = validateAdapterConfig$3(untrustedConfig, getAvailableTimeSlots_ConfigPropertyNames);
543
- // Invalid or incomplete config
544
- if (config === null) {
545
- return null;
546
- }
547
- return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
548
- buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
442
+ const getAvailableTimeSlots_ConfigPropertyNames = {
443
+ displayName: 'getAvailableTimeSlots',
444
+ parameters: {
445
+ required: ['availableTimeSlotsInput'],
446
+ optional: []
447
+ }
448
+ };
449
+ function createResourceParams$3(config) {
450
+ const resourceParams = {
451
+ body: {
452
+ availableTimeSlotsInput: config.availableTimeSlotsInput
453
+ }
454
+ };
455
+ return resourceParams;
456
+ }
457
+ function keyBuilder$5(luvio, config) {
458
+ const resourceParams = createResourceParams$3(config);
459
+ return keyBuilder$6(luvio, resourceParams);
460
+ }
461
+ function typeCheckConfig$3(untrustedConfig) {
462
+ const config = {};
463
+ const untrustedConfig_availableTimeSlotsInput = untrustedConfig.availableTimeSlotsInput;
464
+ const referenceAvailableTimeSlotsInputRepresentationValidationError = validate$k(untrustedConfig_availableTimeSlotsInput);
465
+ if (referenceAvailableTimeSlotsInputRepresentationValidationError === null) {
466
+ config.availableTimeSlotsInput = untrustedConfig_availableTimeSlotsInput;
467
+ }
468
+ return config;
469
+ }
470
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
471
+ if (!untrustedIsObject(untrustedConfig)) {
472
+ return null;
473
+ }
474
+ if (process.env.NODE_ENV !== 'production') {
475
+ validateConfig(untrustedConfig, configPropertyNames);
476
+ }
477
+ const config = typeCheckConfig$3(untrustedConfig);
478
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
479
+ return null;
480
+ }
481
+ return config;
482
+ }
483
+ function adapterFragment$2(luvio, config) {
484
+ createResourceParams$3(config);
485
+ return select$9();
486
+ }
487
+ function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
488
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
489
+ config,
490
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
491
+ });
492
+ return luvio.storeBroadcast().then(() => snapshot);
493
+ }
494
+ function onFetchResponseError$2(luvio, config, resourceParams, response) {
495
+ const snapshot = ingestError$2(luvio, resourceParams, response, {
496
+ config,
497
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
498
+ });
499
+ return luvio.storeBroadcast().then(() => snapshot);
500
+ }
501
+ function buildNetworkSnapshot$3(luvio, config, options) {
502
+ const resourceParams = createResourceParams$3(config);
503
+ const request = createResourceRequest$3(resourceParams);
504
+ return luvio.dispatchResourceRequest(request, options)
505
+ .then((response) => {
506
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => getResponseCacheKeys$3(luvio, resourceParams, response.body));
507
+ }, (response) => {
508
+ return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
509
+ });
510
+ }
511
+ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
512
+ const { luvio, config } = context;
513
+ const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
514
+ const dispatchOptions = {
515
+ resourceRequestContext: {
516
+ requestCorrelator,
517
+ luvioRequestMethod: 'get',
518
+ },
519
+ eventObservers
520
+ };
521
+ if (networkPriority !== 'normal') {
522
+ dispatchOptions.overrides = {
523
+ priority: networkPriority
524
+ };
525
+ }
526
+ return buildNetworkSnapshot$3(luvio, config, dispatchOptions);
527
+ }
528
+ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
529
+ const { luvio, config } = context;
530
+ const selector = {
531
+ recordId: keyBuilder$5(luvio, config),
532
+ node: adapterFragment$2(luvio, config),
533
+ variables: {},
534
+ };
535
+ const cacheSnapshot = storeLookup(selector, {
536
+ config,
537
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
538
+ });
539
+ return cacheSnapshot;
540
+ }
541
+ const getAvailableTimeSlotsAdapterFactory = (luvio) => function education__getAvailableTimeSlots(untrustedConfig, requestContext) {
542
+ const config = validateAdapterConfig$3(untrustedConfig, getAvailableTimeSlots_ConfigPropertyNames);
543
+ // Invalid or incomplete config
544
+ if (config === null) {
545
+ return null;
546
+ }
547
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
548
+ buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
549
549
  };
550
550
 
551
- const VERSION$5 = "c470aba735607497dd11c1fcd34489d1";
552
- function validate$h(obj, path = 'AvailableTopic') {
553
- const v_error = (() => {
554
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
555
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
556
- }
557
- if (obj.parentWorkTypeGroupName !== undefined) {
558
- const obj_parentWorkTypeGroupName = obj.parentWorkTypeGroupName;
559
- const path_parentWorkTypeGroupName = path + '.parentWorkTypeGroupName';
560
- if (typeof obj_parentWorkTypeGroupName !== 'string') {
561
- return new TypeError('Expected "string" but received "' + typeof obj_parentWorkTypeGroupName + '" (at "' + path_parentWorkTypeGroupName + '")');
562
- }
563
- }
564
- if (obj.serviceTerritoryWorkTypes !== undefined) {
565
- const obj_serviceTerritoryWorkTypes = obj.serviceTerritoryWorkTypes;
566
- const path_serviceTerritoryWorkTypes = path + '.serviceTerritoryWorkTypes';
567
- if (typeof obj_serviceTerritoryWorkTypes !== 'object' || ArrayIsArray(obj_serviceTerritoryWorkTypes) || obj_serviceTerritoryWorkTypes === null) {
568
- return new TypeError('Expected "object" but received "' + typeof obj_serviceTerritoryWorkTypes + '" (at "' + path_serviceTerritoryWorkTypes + '")');
569
- }
570
- const obj_serviceTerritoryWorkTypes_keys = ObjectKeys(obj_serviceTerritoryWorkTypes);
571
- for (let i = 0; i < obj_serviceTerritoryWorkTypes_keys.length; i++) {
572
- const key = obj_serviceTerritoryWorkTypes_keys[i];
573
- const obj_serviceTerritoryWorkTypes_prop = obj_serviceTerritoryWorkTypes[key];
574
- const path_serviceTerritoryWorkTypes_prop = path_serviceTerritoryWorkTypes + '["' + key + '"]';
575
- if (obj_serviceTerritoryWorkTypes_prop === undefined) {
576
- return new TypeError('Expected "defined" but received "' + typeof obj_serviceTerritoryWorkTypes_prop + '" (at "' + path_serviceTerritoryWorkTypes_prop + '")');
577
- }
578
- }
579
- }
580
- if (obj.workTypeGroupId !== undefined) {
581
- const obj_workTypeGroupId = obj.workTypeGroupId;
582
- const path_workTypeGroupId = path + '.workTypeGroupId';
583
- if (typeof obj_workTypeGroupId !== 'string') {
584
- return new TypeError('Expected "string" but received "' + typeof obj_workTypeGroupId + '" (at "' + path_workTypeGroupId + '")');
585
- }
586
- }
587
- if (obj.workTypeGroupName !== undefined) {
588
- const obj_workTypeGroupName = obj.workTypeGroupName;
589
- const path_workTypeGroupName = path + '.workTypeGroupName';
590
- if (typeof obj_workTypeGroupName !== 'string') {
591
- return new TypeError('Expected "string" but received "' + typeof obj_workTypeGroupName + '" (at "' + path_workTypeGroupName + '")');
592
- }
593
- }
594
- })();
595
- return v_error === undefined ? null : v_error;
596
- }
597
- const select$8 = function AvailableTopicSelect() {
598
- return {
599
- kind: 'Fragment',
600
- version: VERSION$5,
601
- private: [],
602
- selections: [
603
- {
604
- name: 'parentWorkTypeGroupName',
605
- kind: 'Scalar',
606
- required: false
607
- },
608
- {
609
- name: 'serviceTerritoryWorkTypes',
610
- kind: 'Object',
611
- // any
612
- },
613
- {
614
- name: 'workTypeGroupId',
615
- kind: 'Scalar',
616
- required: false
617
- },
618
- {
619
- name: 'workTypeGroupName',
620
- kind: 'Scalar',
621
- required: false
622
- }
623
- ]
624
- };
625
- };
626
- function equals$5(existing, incoming) {
627
- const existing_parentWorkTypeGroupName = existing.parentWorkTypeGroupName;
628
- const incoming_parentWorkTypeGroupName = incoming.parentWorkTypeGroupName;
629
- // if at least one of these optionals is defined
630
- if (existing_parentWorkTypeGroupName !== undefined || incoming_parentWorkTypeGroupName !== undefined) {
631
- // if one of these is not defined we know the other is defined and therefore
632
- // not equal
633
- if (existing_parentWorkTypeGroupName === undefined || incoming_parentWorkTypeGroupName === undefined) {
634
- return false;
635
- }
636
- if (!(existing_parentWorkTypeGroupName === incoming_parentWorkTypeGroupName)) {
637
- return false;
638
- }
639
- }
640
- const existing_workTypeGroupId = existing.workTypeGroupId;
641
- const incoming_workTypeGroupId = incoming.workTypeGroupId;
642
- // if at least one of these optionals is defined
643
- if (existing_workTypeGroupId !== undefined || incoming_workTypeGroupId !== undefined) {
644
- // if one of these is not defined we know the other is defined and therefore
645
- // not equal
646
- if (existing_workTypeGroupId === undefined || incoming_workTypeGroupId === undefined) {
647
- return false;
648
- }
649
- if (!(existing_workTypeGroupId === incoming_workTypeGroupId)) {
650
- return false;
651
- }
652
- }
653
- const existing_workTypeGroupName = existing.workTypeGroupName;
654
- const incoming_workTypeGroupName = incoming.workTypeGroupName;
655
- // if at least one of these optionals is defined
656
- if (existing_workTypeGroupName !== undefined || incoming_workTypeGroupName !== undefined) {
657
- // if one of these is not defined we know the other is defined and therefore
658
- // not equal
659
- if (existing_workTypeGroupName === undefined || incoming_workTypeGroupName === undefined) {
660
- return false;
661
- }
662
- if (!(existing_workTypeGroupName === incoming_workTypeGroupName)) {
663
- return false;
664
- }
665
- }
666
- const existing_serviceTerritoryWorkTypes = existing.serviceTerritoryWorkTypes;
667
- const incoming_serviceTerritoryWorkTypes = incoming.serviceTerritoryWorkTypes;
668
- // if at least one of these optionals is defined
669
- if (existing_serviceTerritoryWorkTypes !== undefined || incoming_serviceTerritoryWorkTypes !== undefined) {
670
- // if one of these is not defined we know the other is defined and therefore
671
- // not equal
672
- if (existing_serviceTerritoryWorkTypes === undefined || incoming_serviceTerritoryWorkTypes === undefined) {
673
- return false;
674
- }
675
- const equals_serviceTerritoryWorkTypes_props = equalsObject(existing_serviceTerritoryWorkTypes, incoming_serviceTerritoryWorkTypes, (existing_serviceTerritoryWorkTypes_prop, incoming_serviceTerritoryWorkTypes_prop) => {
676
- if (JSONStringify(incoming_serviceTerritoryWorkTypes_prop) !== JSONStringify(existing_serviceTerritoryWorkTypes_prop)) {
677
- return false;
678
- }
679
- });
680
- if (equals_serviceTerritoryWorkTypes_props === false) {
681
- return false;
682
- }
683
- }
684
- return true;
551
+ const VERSION$5 = "c470aba735607497dd11c1fcd34489d1";
552
+ function validate$h(obj, path = 'AvailableTopic') {
553
+ const v_error = (() => {
554
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
555
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
556
+ }
557
+ if (obj.parentWorkTypeGroupName !== undefined) {
558
+ const obj_parentWorkTypeGroupName = obj.parentWorkTypeGroupName;
559
+ const path_parentWorkTypeGroupName = path + '.parentWorkTypeGroupName';
560
+ if (typeof obj_parentWorkTypeGroupName !== 'string') {
561
+ return new TypeError('Expected "string" but received "' + typeof obj_parentWorkTypeGroupName + '" (at "' + path_parentWorkTypeGroupName + '")');
562
+ }
563
+ }
564
+ if (obj.serviceTerritoryWorkTypes !== undefined) {
565
+ const obj_serviceTerritoryWorkTypes = obj.serviceTerritoryWorkTypes;
566
+ const path_serviceTerritoryWorkTypes = path + '.serviceTerritoryWorkTypes';
567
+ if (typeof obj_serviceTerritoryWorkTypes !== 'object' || ArrayIsArray(obj_serviceTerritoryWorkTypes) || obj_serviceTerritoryWorkTypes === null) {
568
+ return new TypeError('Expected "object" but received "' + typeof obj_serviceTerritoryWorkTypes + '" (at "' + path_serviceTerritoryWorkTypes + '")');
569
+ }
570
+ const obj_serviceTerritoryWorkTypes_keys = ObjectKeys(obj_serviceTerritoryWorkTypes);
571
+ for (let i = 0; i < obj_serviceTerritoryWorkTypes_keys.length; i++) {
572
+ const key = obj_serviceTerritoryWorkTypes_keys[i];
573
+ const obj_serviceTerritoryWorkTypes_prop = obj_serviceTerritoryWorkTypes[key];
574
+ const path_serviceTerritoryWorkTypes_prop = path_serviceTerritoryWorkTypes + '["' + key + '"]';
575
+ if (obj_serviceTerritoryWorkTypes_prop === undefined) {
576
+ return new TypeError('Expected "defined" but received "' + typeof obj_serviceTerritoryWorkTypes_prop + '" (at "' + path_serviceTerritoryWorkTypes_prop + '")');
577
+ }
578
+ }
579
+ }
580
+ if (obj.workTypeGroupId !== undefined) {
581
+ const obj_workTypeGroupId = obj.workTypeGroupId;
582
+ const path_workTypeGroupId = path + '.workTypeGroupId';
583
+ if (typeof obj_workTypeGroupId !== 'string') {
584
+ return new TypeError('Expected "string" but received "' + typeof obj_workTypeGroupId + '" (at "' + path_workTypeGroupId + '")');
585
+ }
586
+ }
587
+ if (obj.workTypeGroupName !== undefined) {
588
+ const obj_workTypeGroupName = obj.workTypeGroupName;
589
+ const path_workTypeGroupName = path + '.workTypeGroupName';
590
+ if (typeof obj_workTypeGroupName !== 'string') {
591
+ return new TypeError('Expected "string" but received "' + typeof obj_workTypeGroupName + '" (at "' + path_workTypeGroupName + '")');
592
+ }
593
+ }
594
+ })();
595
+ return v_error === undefined ? null : v_error;
596
+ }
597
+ const select$8 = function AvailableTopicSelect() {
598
+ return {
599
+ kind: 'Fragment',
600
+ version: VERSION$5,
601
+ private: [],
602
+ selections: [
603
+ {
604
+ name: 'parentWorkTypeGroupName',
605
+ kind: 'Scalar',
606
+ required: false
607
+ },
608
+ {
609
+ name: 'serviceTerritoryWorkTypes',
610
+ kind: 'Object',
611
+ // any
612
+ },
613
+ {
614
+ name: 'workTypeGroupId',
615
+ kind: 'Scalar',
616
+ required: false
617
+ },
618
+ {
619
+ name: 'workTypeGroupName',
620
+ kind: 'Scalar',
621
+ required: false
622
+ }
623
+ ]
624
+ };
625
+ };
626
+ function equals$5(existing, incoming) {
627
+ const existing_parentWorkTypeGroupName = existing.parentWorkTypeGroupName;
628
+ const incoming_parentWorkTypeGroupName = incoming.parentWorkTypeGroupName;
629
+ // if at least one of these optionals is defined
630
+ if (existing_parentWorkTypeGroupName !== undefined || incoming_parentWorkTypeGroupName !== undefined) {
631
+ // if one of these is not defined we know the other is defined and therefore
632
+ // not equal
633
+ if (existing_parentWorkTypeGroupName === undefined || incoming_parentWorkTypeGroupName === undefined) {
634
+ return false;
635
+ }
636
+ if (!(existing_parentWorkTypeGroupName === incoming_parentWorkTypeGroupName)) {
637
+ return false;
638
+ }
639
+ }
640
+ const existing_workTypeGroupId = existing.workTypeGroupId;
641
+ const incoming_workTypeGroupId = incoming.workTypeGroupId;
642
+ // if at least one of these optionals is defined
643
+ if (existing_workTypeGroupId !== undefined || incoming_workTypeGroupId !== undefined) {
644
+ // if one of these is not defined we know the other is defined and therefore
645
+ // not equal
646
+ if (existing_workTypeGroupId === undefined || incoming_workTypeGroupId === undefined) {
647
+ return false;
648
+ }
649
+ if (!(existing_workTypeGroupId === incoming_workTypeGroupId)) {
650
+ return false;
651
+ }
652
+ }
653
+ const existing_workTypeGroupName = existing.workTypeGroupName;
654
+ const incoming_workTypeGroupName = incoming.workTypeGroupName;
655
+ // if at least one of these optionals is defined
656
+ if (existing_workTypeGroupName !== undefined || incoming_workTypeGroupName !== undefined) {
657
+ // if one of these is not defined we know the other is defined and therefore
658
+ // not equal
659
+ if (existing_workTypeGroupName === undefined || incoming_workTypeGroupName === undefined) {
660
+ return false;
661
+ }
662
+ if (!(existing_workTypeGroupName === incoming_workTypeGroupName)) {
663
+ return false;
664
+ }
665
+ }
666
+ const existing_serviceTerritoryWorkTypes = existing.serviceTerritoryWorkTypes;
667
+ const incoming_serviceTerritoryWorkTypes = incoming.serviceTerritoryWorkTypes;
668
+ // if at least one of these optionals is defined
669
+ if (existing_serviceTerritoryWorkTypes !== undefined || incoming_serviceTerritoryWorkTypes !== undefined) {
670
+ // if one of these is not defined we know the other is defined and therefore
671
+ // not equal
672
+ if (existing_serviceTerritoryWorkTypes === undefined || incoming_serviceTerritoryWorkTypes === undefined) {
673
+ return false;
674
+ }
675
+ const equals_serviceTerritoryWorkTypes_props = equalsObject(existing_serviceTerritoryWorkTypes, incoming_serviceTerritoryWorkTypes, (existing_serviceTerritoryWorkTypes_prop, incoming_serviceTerritoryWorkTypes_prop) => {
676
+ if (JSONStringify(incoming_serviceTerritoryWorkTypes_prop) !== JSONStringify(existing_serviceTerritoryWorkTypes_prop)) {
677
+ return false;
678
+ }
679
+ });
680
+ if (equals_serviceTerritoryWorkTypes_props === false) {
681
+ return false;
682
+ }
683
+ }
684
+ return true;
685
685
  }
686
686
 
687
- const VERSION$4 = "3cb0110faf688dc57056aa83be527181";
688
- function validate$g(obj, path = 'AvailableTopicsOutputRepresentation') {
689
- const v_error = (() => {
690
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
691
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
692
- }
693
- const obj_topics = obj.topics;
694
- const path_topics = path + '.topics';
695
- if (!ArrayIsArray(obj_topics)) {
696
- return new TypeError('Expected "array" but received "' + typeof obj_topics + '" (at "' + path_topics + '")');
697
- }
698
- for (let i = 0; i < obj_topics.length; i++) {
699
- const obj_topics_item = obj_topics[i];
700
- const path_topics_item = path_topics + '[' + i + ']';
701
- const referencepath_topics_itemValidationError = validate$h(obj_topics_item, path_topics_item);
702
- if (referencepath_topics_itemValidationError !== null) {
703
- let message = 'Object doesn\'t match AvailableTopic (at "' + path_topics_item + '")\n';
704
- message += referencepath_topics_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
705
- return new TypeError(message);
706
- }
707
- }
708
- })();
709
- return v_error === undefined ? null : v_error;
710
- }
711
- const RepresentationType$2 = 'AvailableTopicsOutputRepresentation';
712
- function normalize$2(input, existing, path, luvio, store, timestamp) {
713
- return input;
714
- }
715
- const select$7 = function AvailableTopicsOutputRepresentationSelect() {
716
- const { selections: AvailableTopic__selections, opaque: AvailableTopic__opaque, } = select$8();
717
- return {
718
- kind: 'Fragment',
719
- version: VERSION$4,
720
- private: [],
721
- selections: [
722
- {
723
- name: 'topics',
724
- kind: 'Object',
725
- plural: true,
726
- selections: AvailableTopic__selections
727
- }
728
- ]
729
- };
730
- };
731
- function equals$4(existing, incoming) {
732
- const existing_topics = existing.topics;
733
- const incoming_topics = incoming.topics;
734
- const equals_topics_items = equalsArray(existing_topics, incoming_topics, (existing_topics_item, incoming_topics_item) => {
735
- if (!(equals$5(existing_topics_item, incoming_topics_item))) {
736
- return false;
737
- }
738
- });
739
- if (equals_topics_items === false) {
740
- return false;
741
- }
742
- return true;
743
- }
744
- const ingest$2 = function AvailableTopicsOutputRepresentationIngest(input, path, luvio, store, timestamp) {
745
- if (process.env.NODE_ENV !== 'production') {
746
- const validateError = validate$g(input);
747
- if (validateError !== null) {
748
- throw validateError;
749
- }
750
- }
751
- const key = path.fullPath;
752
- const existingRecord = store.readEntry(key);
753
- const ttlToUse = path.ttl !== undefined ? path.ttl : 360000;
754
- let incomingRecord = normalize$2(input, store.readEntry(key), {
755
- fullPath: key,
756
- parent: path.parent,
757
- propertyName: path.propertyName,
758
- ttl: ttlToUse
759
- });
760
- if (existingRecord === undefined || equals$4(existingRecord, incomingRecord) === false) {
761
- luvio.storePublish(key, incomingRecord);
762
- }
763
- if (ttlToUse !== undefined) {
764
- const storeMetadataParams = {
765
- ttl: ttlToUse,
766
- namespace: "education",
767
- version: VERSION$4,
768
- representationName: RepresentationType$2,
769
- };
770
- luvio.publishStoreMetadata(key, storeMetadataParams);
771
- }
772
- return createLink(key);
773
- };
774
- function getTypeCacheKeys$2(luvio, input, fullPathFactory) {
775
- const rootKeySet = new StoreKeyMap();
776
- // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
777
- const rootKey = fullPathFactory();
778
- rootKeySet.set(rootKey, {
779
- namespace: keyPrefix,
780
- representationName: RepresentationType$2,
781
- mergeable: false
782
- });
783
- return rootKeySet;
687
+ const VERSION$4 = "3cb0110faf688dc57056aa83be527181";
688
+ function validate$g(obj, path = 'AvailableTopicsOutputRepresentation') {
689
+ const v_error = (() => {
690
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
691
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
692
+ }
693
+ const obj_topics = obj.topics;
694
+ const path_topics = path + '.topics';
695
+ if (!ArrayIsArray(obj_topics)) {
696
+ return new TypeError('Expected "array" but received "' + typeof obj_topics + '" (at "' + path_topics + '")');
697
+ }
698
+ for (let i = 0; i < obj_topics.length; i++) {
699
+ const obj_topics_item = obj_topics[i];
700
+ const path_topics_item = path_topics + '[' + i + ']';
701
+ const referencepath_topics_itemValidationError = validate$h(obj_topics_item, path_topics_item);
702
+ if (referencepath_topics_itemValidationError !== null) {
703
+ let message = 'Object doesn\'t match AvailableTopic (at "' + path_topics_item + '")\n';
704
+ message += referencepath_topics_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
705
+ return new TypeError(message);
706
+ }
707
+ }
708
+ })();
709
+ return v_error === undefined ? null : v_error;
710
+ }
711
+ const RepresentationType$2 = 'AvailableTopicsOutputRepresentation';
712
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
713
+ return input;
714
+ }
715
+ const select$7 = function AvailableTopicsOutputRepresentationSelect() {
716
+ const { selections: AvailableTopic__selections, opaque: AvailableTopic__opaque, } = select$8();
717
+ return {
718
+ kind: 'Fragment',
719
+ version: VERSION$4,
720
+ private: [],
721
+ selections: [
722
+ {
723
+ name: 'topics',
724
+ kind: 'Object',
725
+ plural: true,
726
+ selections: AvailableTopic__selections
727
+ }
728
+ ]
729
+ };
730
+ };
731
+ function equals$4(existing, incoming) {
732
+ const existing_topics = existing.topics;
733
+ const incoming_topics = incoming.topics;
734
+ const equals_topics_items = equalsArray(existing_topics, incoming_topics, (existing_topics_item, incoming_topics_item) => {
735
+ if (!(equals$5(existing_topics_item, incoming_topics_item))) {
736
+ return false;
737
+ }
738
+ });
739
+ if (equals_topics_items === false) {
740
+ return false;
741
+ }
742
+ return true;
743
+ }
744
+ const ingest$2 = function AvailableTopicsOutputRepresentationIngest(input, path, luvio, store, timestamp) {
745
+ if (process.env.NODE_ENV !== 'production') {
746
+ const validateError = validate$g(input);
747
+ if (validateError !== null) {
748
+ throw validateError;
749
+ }
750
+ }
751
+ const key = path.fullPath;
752
+ const existingRecord = store.readEntry(key);
753
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 360000;
754
+ let incomingRecord = normalize$2(input, store.readEntry(key), {
755
+ fullPath: key,
756
+ parent: path.parent,
757
+ propertyName: path.propertyName,
758
+ ttl: ttlToUse
759
+ });
760
+ if (existingRecord === undefined || equals$4(existingRecord, incomingRecord) === false) {
761
+ luvio.storePublish(key, incomingRecord);
762
+ }
763
+ if (ttlToUse !== undefined) {
764
+ const storeMetadataParams = {
765
+ ttl: ttlToUse,
766
+ namespace: "education",
767
+ version: VERSION$4,
768
+ representationName: RepresentationType$2,
769
+ };
770
+ luvio.publishStoreMetadata(key, storeMetadataParams);
771
+ }
772
+ return createLink(key);
773
+ };
774
+ function getTypeCacheKeys$2(luvio, input, fullPathFactory) {
775
+ const rootKeySet = new StoreKeyMap();
776
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
777
+ const rootKey = fullPathFactory();
778
+ rootKeySet.set(rootKey, {
779
+ namespace: keyPrefix,
780
+ representationName: RepresentationType$2,
781
+ mergeable: false
782
+ });
783
+ return rootKeySet;
784
784
  }
785
785
 
786
- function select$6(luvio, params) {
787
- return select$7();
788
- }
789
- function keyBuilder$4(luvio, params) {
790
- return keyPrefix + '::AvailableTopicsOutputRepresentation:(' + ')';
791
- }
792
- function getResponseCacheKeys$2(luvio, resourceParams, response) {
793
- return getTypeCacheKeys$2(luvio, response, () => keyBuilder$4());
794
- }
795
- function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
796
- const { body } = response;
797
- const key = keyBuilder$4();
798
- luvio.storeIngest(key, ingest$2, body);
799
- const snapshot = luvio.storeLookup({
800
- recordId: key,
801
- node: select$6(),
802
- variables: {},
803
- }, snapshotRefresh);
804
- if (process.env.NODE_ENV !== 'production') {
805
- if (snapshot.state !== 'Fulfilled') {
806
- throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
807
- }
808
- }
809
- return snapshot;
810
- }
811
- function ingestError$1(luvio, params, error, snapshotRefresh) {
812
- const key = keyBuilder$4();
813
- const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
814
- luvio.storeIngestError(key, errorSnapshot);
815
- return errorSnapshot;
816
- }
817
- function createResourceRequest$2(config) {
818
- const headers = {};
819
- return {
820
- baseUri: '/services/data/v58.0',
821
- basePath: '/connect/education/appointment-booking/available-topics',
822
- method: 'get',
823
- body: null,
824
- urlParams: {},
825
- queryParams: {},
826
- headers,
827
- priority: 'normal',
828
- };
786
+ function select$6(luvio, params) {
787
+ return select$7();
788
+ }
789
+ function keyBuilder$4(luvio, params) {
790
+ return keyPrefix + '::AvailableTopicsOutputRepresentation:(' + ')';
791
+ }
792
+ function getResponseCacheKeys$2(luvio, resourceParams, response) {
793
+ return getTypeCacheKeys$2(luvio, response, () => keyBuilder$4());
794
+ }
795
+ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
796
+ const { body } = response;
797
+ const key = keyBuilder$4();
798
+ luvio.storeIngest(key, ingest$2, body);
799
+ const snapshot = luvio.storeLookup({
800
+ recordId: key,
801
+ node: select$6(),
802
+ variables: {},
803
+ }, snapshotRefresh);
804
+ if (process.env.NODE_ENV !== 'production') {
805
+ if (snapshot.state !== 'Fulfilled') {
806
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
807
+ }
808
+ }
809
+ return snapshot;
810
+ }
811
+ function ingestError$1(luvio, params, error, snapshotRefresh) {
812
+ const key = keyBuilder$4();
813
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
814
+ luvio.storeIngestError(key, errorSnapshot);
815
+ return errorSnapshot;
816
+ }
817
+ function createResourceRequest$2(config) {
818
+ const headers = {};
819
+ return {
820
+ baseUri: '/services/data/v58.0',
821
+ basePath: '/connect/education/appointment-booking/available-topics',
822
+ method: 'get',
823
+ body: null,
824
+ urlParams: {},
825
+ queryParams: {},
826
+ headers,
827
+ priority: 'normal',
828
+ };
829
829
  }
830
830
 
831
- const getAvailableTopics_ConfigPropertyNames = {
832
- displayName: 'getAvailableTopics',
833
- parameters: {
834
- required: [],
835
- optional: []
836
- }
837
- };
838
- function createResourceParams$2(config) {
839
- const resourceParams = {};
840
- return resourceParams;
841
- }
842
- function keyBuilder$3(luvio, config) {
843
- return keyBuilder$4();
844
- }
845
- function typeCheckConfig$2(untrustedConfig) {
846
- const config = {};
847
- return config;
848
- }
849
- function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
850
- if (!untrustedIsObject(untrustedConfig)) {
851
- return null;
852
- }
853
- if (process.env.NODE_ENV !== 'production') {
854
- validateConfig(untrustedConfig, configPropertyNames);
855
- }
856
- const config = typeCheckConfig$2();
857
- if (!areRequiredParametersPresent(config, configPropertyNames)) {
858
- return null;
859
- }
860
- return config;
861
- }
862
- function adapterFragment$1(luvio, config) {
863
- return select$6();
864
- }
865
- function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
866
- const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
867
- config,
868
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
869
- });
870
- return luvio.storeBroadcast().then(() => snapshot);
871
- }
872
- function onFetchResponseError$1(luvio, config, resourceParams, response) {
873
- const snapshot = ingestError$1(luvio, resourceParams, response, {
874
- config,
875
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
876
- });
877
- return luvio.storeBroadcast().then(() => snapshot);
878
- }
879
- function buildNetworkSnapshot$2(luvio, config, options) {
880
- const resourceParams = createResourceParams$2();
881
- const request = createResourceRequest$2();
882
- return luvio.dispatchResourceRequest(request, options)
883
- .then((response) => {
884
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => getResponseCacheKeys$2(luvio, resourceParams, response.body));
885
- }, (response) => {
886
- return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
887
- });
888
- }
889
- function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
890
- const { luvio, config } = context;
891
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
892
- const dispatchOptions = {
893
- resourceRequestContext: {
894
- requestCorrelator,
895
- luvioRequestMethod: undefined,
896
- },
897
- eventObservers
898
- };
899
- if (networkPriority !== 'normal') {
900
- dispatchOptions.overrides = {
901
- priority: networkPriority
902
- };
903
- }
904
- return buildNetworkSnapshot$2(luvio, config, dispatchOptions);
905
- }
906
- function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
907
- const { luvio, config } = context;
908
- const selector = {
909
- recordId: keyBuilder$3(),
910
- node: adapterFragment$1(),
911
- variables: {},
912
- };
913
- const cacheSnapshot = storeLookup(selector, {
914
- config,
915
- resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
916
- });
917
- return cacheSnapshot;
918
- }
919
- const getAvailableTopicsAdapterFactory = (luvio) => function education__getAvailableTopics(untrustedConfig, requestContext) {
920
- const config = validateAdapterConfig$2(untrustedConfig, getAvailableTopics_ConfigPropertyNames);
921
- // Invalid or incomplete config
922
- if (config === null) {
923
- return null;
924
- }
925
- return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
926
- buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
831
+ const getAvailableTopics_ConfigPropertyNames = {
832
+ displayName: 'getAvailableTopics',
833
+ parameters: {
834
+ required: [],
835
+ optional: []
836
+ }
837
+ };
838
+ function createResourceParams$2(config) {
839
+ const resourceParams = {};
840
+ return resourceParams;
841
+ }
842
+ function keyBuilder$3(luvio, config) {
843
+ return keyBuilder$4();
844
+ }
845
+ function typeCheckConfig$2(untrustedConfig) {
846
+ const config = {};
847
+ return config;
848
+ }
849
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
850
+ if (!untrustedIsObject(untrustedConfig)) {
851
+ return null;
852
+ }
853
+ if (process.env.NODE_ENV !== 'production') {
854
+ validateConfig(untrustedConfig, configPropertyNames);
855
+ }
856
+ const config = typeCheckConfig$2();
857
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
858
+ return null;
859
+ }
860
+ return config;
861
+ }
862
+ function adapterFragment$1(luvio, config) {
863
+ return select$6();
864
+ }
865
+ function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
866
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
867
+ config,
868
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
869
+ });
870
+ return luvio.storeBroadcast().then(() => snapshot);
871
+ }
872
+ function onFetchResponseError$1(luvio, config, resourceParams, response) {
873
+ const snapshot = ingestError$1(luvio, resourceParams, response, {
874
+ config,
875
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
876
+ });
877
+ return luvio.storeBroadcast().then(() => snapshot);
878
+ }
879
+ function buildNetworkSnapshot$2(luvio, config, options) {
880
+ const resourceParams = createResourceParams$2();
881
+ const request = createResourceRequest$2();
882
+ return luvio.dispatchResourceRequest(request, options)
883
+ .then((response) => {
884
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => getResponseCacheKeys$2(luvio, resourceParams, response.body));
885
+ }, (response) => {
886
+ return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
887
+ });
888
+ }
889
+ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
890
+ const { luvio, config } = context;
891
+ const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
892
+ const dispatchOptions = {
893
+ resourceRequestContext: {
894
+ requestCorrelator,
895
+ luvioRequestMethod: undefined,
896
+ },
897
+ eventObservers
898
+ };
899
+ if (networkPriority !== 'normal') {
900
+ dispatchOptions.overrides = {
901
+ priority: networkPriority
902
+ };
903
+ }
904
+ return buildNetworkSnapshot$2(luvio, config, dispatchOptions);
905
+ }
906
+ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
907
+ const { luvio, config } = context;
908
+ const selector = {
909
+ recordId: keyBuilder$3(),
910
+ node: adapterFragment$1(),
911
+ variables: {},
912
+ };
913
+ const cacheSnapshot = storeLookup(selector, {
914
+ config,
915
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
916
+ });
917
+ return cacheSnapshot;
918
+ }
919
+ const getAvailableTopicsAdapterFactory = (luvio) => function education__getAvailableTopics(untrustedConfig, requestContext) {
920
+ const config = validateAdapterConfig$2(untrustedConfig, getAvailableTopics_ConfigPropertyNames);
921
+ // Invalid or incomplete config
922
+ if (config === null) {
923
+ return null;
924
+ }
925
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
926
+ buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
927
927
  };
928
928
 
929
- function validate$f(obj, path = 'CarePlanTaskInputRepresentation') {
930
- const v_error = (() => {
931
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
932
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
933
- }
934
- if (obj.assignedTo !== undefined) {
935
- const obj_assignedTo = obj.assignedTo;
936
- const path_assignedTo = path + '.assignedTo';
937
- if (typeof obj_assignedTo !== 'string') {
938
- return new TypeError('Expected "string" but received "' + typeof obj_assignedTo + '" (at "' + path_assignedTo + '")');
939
- }
940
- }
941
- if (obj.comment !== undefined) {
942
- const obj_comment = obj.comment;
943
- const path_comment = path + '.comment';
944
- if (typeof obj_comment !== 'string') {
945
- return new TypeError('Expected "string" but received "' + typeof obj_comment + '" (at "' + path_comment + '")');
946
- }
947
- }
948
- if (obj.dueDate !== undefined) {
949
- const obj_dueDate = obj.dueDate;
950
- const path_dueDate = path + '.dueDate';
951
- if (typeof obj_dueDate !== 'string') {
952
- return new TypeError('Expected "string" but received "' + typeof obj_dueDate + '" (at "' + path_dueDate + '")');
953
- }
954
- }
955
- if (obj.id !== undefined) {
956
- const obj_id = obj.id;
957
- const path_id = path + '.id';
958
- if (typeof obj_id !== 'string') {
959
- return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
960
- }
961
- }
962
- if (obj.isRequired !== undefined) {
963
- const obj_isRequired = obj.isRequired;
964
- const path_isRequired = path + '.isRequired';
965
- if (typeof obj_isRequired !== 'boolean') {
966
- return new TypeError('Expected "boolean" but received "' + typeof obj_isRequired + '" (at "' + path_isRequired + '")');
967
- }
968
- }
969
- if (obj.priority !== undefined) {
970
- const obj_priority = obj.priority;
971
- const path_priority = path + '.priority';
972
- if (typeof obj_priority !== 'string') {
973
- return new TypeError('Expected "string" but received "' + typeof obj_priority + '" (at "' + path_priority + '")');
974
- }
975
- }
976
- if (obj.status !== undefined) {
977
- const obj_status = obj.status;
978
- const path_status = path + '.status';
979
- if (typeof obj_status !== 'string') {
980
- return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
981
- }
982
- }
983
- if (obj.subject !== undefined) {
984
- const obj_subject = obj.subject;
985
- const path_subject = path + '.subject';
986
- if (typeof obj_subject !== 'string') {
987
- return new TypeError('Expected "string" but received "' + typeof obj_subject + '" (at "' + path_subject + '")');
988
- }
989
- }
990
- })();
991
- return v_error === undefined ? null : v_error;
929
+ function validate$f(obj, path = 'CarePlanTaskInputRepresentation') {
930
+ const v_error = (() => {
931
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
932
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
933
+ }
934
+ if (obj.assignedTo !== undefined) {
935
+ const obj_assignedTo = obj.assignedTo;
936
+ const path_assignedTo = path + '.assignedTo';
937
+ if (typeof obj_assignedTo !== 'string') {
938
+ return new TypeError('Expected "string" but received "' + typeof obj_assignedTo + '" (at "' + path_assignedTo + '")');
939
+ }
940
+ }
941
+ if (obj.comment !== undefined) {
942
+ const obj_comment = obj.comment;
943
+ const path_comment = path + '.comment';
944
+ if (typeof obj_comment !== 'string') {
945
+ return new TypeError('Expected "string" but received "' + typeof obj_comment + '" (at "' + path_comment + '")');
946
+ }
947
+ }
948
+ if (obj.dueDate !== undefined) {
949
+ const obj_dueDate = obj.dueDate;
950
+ const path_dueDate = path + '.dueDate';
951
+ if (typeof obj_dueDate !== 'string') {
952
+ return new TypeError('Expected "string" but received "' + typeof obj_dueDate + '" (at "' + path_dueDate + '")');
953
+ }
954
+ }
955
+ if (obj.id !== undefined) {
956
+ const obj_id = obj.id;
957
+ const path_id = path + '.id';
958
+ if (typeof obj_id !== 'string') {
959
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
960
+ }
961
+ }
962
+ if (obj.isRequired !== undefined) {
963
+ const obj_isRequired = obj.isRequired;
964
+ const path_isRequired = path + '.isRequired';
965
+ if (typeof obj_isRequired !== 'boolean') {
966
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isRequired + '" (at "' + path_isRequired + '")');
967
+ }
968
+ }
969
+ if (obj.priority !== undefined) {
970
+ const obj_priority = obj.priority;
971
+ const path_priority = path + '.priority';
972
+ if (typeof obj_priority !== 'string') {
973
+ return new TypeError('Expected "string" but received "' + typeof obj_priority + '" (at "' + path_priority + '")');
974
+ }
975
+ }
976
+ if (obj.status !== undefined) {
977
+ const obj_status = obj.status;
978
+ const path_status = path + '.status';
979
+ if (typeof obj_status !== 'string') {
980
+ return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
981
+ }
982
+ }
983
+ if (obj.subject !== undefined) {
984
+ const obj_subject = obj.subject;
985
+ const path_subject = path + '.subject';
986
+ if (typeof obj_subject !== 'string') {
987
+ return new TypeError('Expected "string" but received "' + typeof obj_subject + '" (at "' + path_subject + '")');
988
+ }
989
+ }
990
+ })();
991
+ return v_error === undefined ? null : v_error;
992
992
  }
993
993
 
994
- function validate$e(obj, path = 'BenefitDisbursementForBenefitSessionInputRepresentation') {
995
- const v_error = (() => {
996
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
997
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
998
- }
999
- const obj_actualCompletionDate = obj.actualCompletionDate;
1000
- const path_actualCompletionDate = path + '.actualCompletionDate';
1001
- if (typeof obj_actualCompletionDate !== 'string') {
1002
- return new TypeError('Expected "string" but received "' + typeof obj_actualCompletionDate + '" (at "' + path_actualCompletionDate + '")');
1003
- }
1004
- if (obj.benefitCategory !== undefined) {
1005
- const obj_benefitCategory = obj.benefitCategory;
1006
- const path_benefitCategory = path + '.benefitCategory';
1007
- if (typeof obj_benefitCategory !== 'string') {
1008
- return new TypeError('Expected "string" but received "' + typeof obj_benefitCategory + '" (at "' + path_benefitCategory + '")');
1009
- }
1010
- }
1011
- const obj_benefitSessionId = obj.benefitSessionId;
1012
- const path_benefitSessionId = path + '.benefitSessionId';
1013
- if (typeof obj_benefitSessionId !== 'string') {
1014
- return new TypeError('Expected "string" but received "' + typeof obj_benefitSessionId + '" (at "' + path_benefitSessionId + '")');
1015
- }
1016
- if (obj.description !== undefined) {
1017
- const obj_description = obj.description;
1018
- const path_description = path + '.description';
1019
- if (typeof obj_description !== 'string') {
1020
- return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
1021
- }
1022
- }
1023
- if (obj.disbursementStatus !== undefined) {
1024
- const obj_disbursementStatus = obj.disbursementStatus;
1025
- const path_disbursementStatus = path + '.disbursementStatus';
1026
- if (typeof obj_disbursementStatus !== 'string') {
1027
- return new TypeError('Expected "string" but received "' + typeof obj_disbursementStatus + '" (at "' + path_disbursementStatus + '")');
1028
- }
1029
- }
1030
- if (obj.endDate !== undefined) {
1031
- const obj_endDate = obj.endDate;
1032
- const path_endDate = path + '.endDate';
1033
- if (typeof obj_endDate !== 'string') {
1034
- return new TypeError('Expected "string" but received "' + typeof obj_endDate + '" (at "' + path_endDate + '")');
1035
- }
1036
- }
1037
- if (obj.startDate !== undefined) {
1038
- const obj_startDate = obj.startDate;
1039
- const path_startDate = path + '.startDate';
1040
- if (typeof obj_startDate !== 'string') {
1041
- return new TypeError('Expected "string" but received "' + typeof obj_startDate + '" (at "' + path_startDate + '")');
1042
- }
1043
- }
1044
- })();
1045
- return v_error === undefined ? null : v_error;
994
+ function validate$e(obj, path = 'BenefitDisbursementForBenefitSessionInputRepresentation') {
995
+ const v_error = (() => {
996
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
997
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
998
+ }
999
+ const obj_actualCompletionDate = obj.actualCompletionDate;
1000
+ const path_actualCompletionDate = path + '.actualCompletionDate';
1001
+ if (typeof obj_actualCompletionDate !== 'string') {
1002
+ return new TypeError('Expected "string" but received "' + typeof obj_actualCompletionDate + '" (at "' + path_actualCompletionDate + '")');
1003
+ }
1004
+ if (obj.benefitCategory !== undefined) {
1005
+ const obj_benefitCategory = obj.benefitCategory;
1006
+ const path_benefitCategory = path + '.benefitCategory';
1007
+ if (typeof obj_benefitCategory !== 'string') {
1008
+ return new TypeError('Expected "string" but received "' + typeof obj_benefitCategory + '" (at "' + path_benefitCategory + '")');
1009
+ }
1010
+ }
1011
+ const obj_benefitSessionId = obj.benefitSessionId;
1012
+ const path_benefitSessionId = path + '.benefitSessionId';
1013
+ if (typeof obj_benefitSessionId !== 'string') {
1014
+ return new TypeError('Expected "string" but received "' + typeof obj_benefitSessionId + '" (at "' + path_benefitSessionId + '")');
1015
+ }
1016
+ if (obj.description !== undefined) {
1017
+ const obj_description = obj.description;
1018
+ const path_description = path + '.description';
1019
+ if (typeof obj_description !== 'string') {
1020
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
1021
+ }
1022
+ }
1023
+ if (obj.disbursementStatus !== undefined) {
1024
+ const obj_disbursementStatus = obj.disbursementStatus;
1025
+ const path_disbursementStatus = path + '.disbursementStatus';
1026
+ if (typeof obj_disbursementStatus !== 'string') {
1027
+ return new TypeError('Expected "string" but received "' + typeof obj_disbursementStatus + '" (at "' + path_disbursementStatus + '")');
1028
+ }
1029
+ }
1030
+ if (obj.endDate !== undefined) {
1031
+ const obj_endDate = obj.endDate;
1032
+ const path_endDate = path + '.endDate';
1033
+ if (typeof obj_endDate !== 'string') {
1034
+ return new TypeError('Expected "string" but received "' + typeof obj_endDate + '" (at "' + path_endDate + '")');
1035
+ }
1036
+ }
1037
+ if (obj.startDate !== undefined) {
1038
+ const obj_startDate = obj.startDate;
1039
+ const path_startDate = path + '.startDate';
1040
+ if (typeof obj_startDate !== 'string') {
1041
+ return new TypeError('Expected "string" but received "' + typeof obj_startDate + '" (at "' + path_startDate + '")');
1042
+ }
1043
+ }
1044
+ })();
1045
+ return v_error === undefined ? null : v_error;
1046
1046
  }
1047
1047
 
1048
- function validate$d(obj, path = 'BenefitDisbursementListInputRepresentation') {
1049
- const v_error = (() => {
1050
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1051
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1052
- }
1053
- const obj_records = obj.records;
1054
- const path_records = path + '.records';
1055
- if (!ArrayIsArray(obj_records)) {
1056
- return new TypeError('Expected "array" but received "' + typeof obj_records + '" (at "' + path_records + '")');
1057
- }
1058
- for (let i = 0; i < obj_records.length; i++) {
1059
- const obj_records_item = obj_records[i];
1060
- const path_records_item = path_records + '[' + i + ']';
1061
- const referencepath_records_itemValidationError = validate$e(obj_records_item, path_records_item);
1062
- if (referencepath_records_itemValidationError !== null) {
1063
- let message = 'Object doesn\'t match BenefitDisbursementForBenefitSessionInputRepresentation (at "' + path_records_item + '")\n';
1064
- message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1065
- return new TypeError(message);
1066
- }
1067
- }
1068
- })();
1069
- return v_error === undefined ? null : v_error;
1048
+ function validate$d(obj, path = 'BenefitDisbursementListInputRepresentation') {
1049
+ const v_error = (() => {
1050
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1051
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1052
+ }
1053
+ const obj_records = obj.records;
1054
+ const path_records = path + '.records';
1055
+ if (!ArrayIsArray(obj_records)) {
1056
+ return new TypeError('Expected "array" but received "' + typeof obj_records + '" (at "' + path_records + '")');
1057
+ }
1058
+ for (let i = 0; i < obj_records.length; i++) {
1059
+ const obj_records_item = obj_records[i];
1060
+ const path_records_item = path_records + '[' + i + ']';
1061
+ const referencepath_records_itemValidationError = validate$e(obj_records_item, path_records_item);
1062
+ if (referencepath_records_itemValidationError !== null) {
1063
+ let message = 'Object doesn\'t match BenefitDisbursementForBenefitSessionInputRepresentation (at "' + path_records_item + '")\n';
1064
+ message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1065
+ return new TypeError(message);
1066
+ }
1067
+ }
1068
+ })();
1069
+ return v_error === undefined ? null : v_error;
1070
1070
  }
1071
1071
 
1072
- function validate$c(obj, path = 'CustomFieldInputRepresentation') {
1073
- const v_error = (() => {
1074
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1075
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1076
- }
1077
- if (obj.dataType !== undefined) {
1078
- const obj_dataType = obj.dataType;
1079
- const path_dataType = path + '.dataType';
1080
- if (typeof obj_dataType !== 'string') {
1081
- return new TypeError('Expected "string" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
1082
- }
1083
- }
1084
- const obj_fieldName = obj.fieldName;
1085
- const path_fieldName = path + '.fieldName';
1086
- if (typeof obj_fieldName !== 'string') {
1087
- return new TypeError('Expected "string" but received "' + typeof obj_fieldName + '" (at "' + path_fieldName + '")');
1088
- }
1089
- const obj_fieldValue = obj.fieldValue;
1090
- const path_fieldValue = path + '.fieldValue';
1091
- if (obj_fieldValue === undefined) {
1092
- return new TypeError('Expected "defined" but received "' + typeof obj_fieldValue + '" (at "' + path_fieldValue + '")');
1093
- }
1094
- })();
1095
- return v_error === undefined ? null : v_error;
1072
+ function validate$c(obj, path = 'CustomFieldInputRepresentation') {
1073
+ const v_error = (() => {
1074
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1075
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1076
+ }
1077
+ if (obj.dataType !== undefined) {
1078
+ const obj_dataType = obj.dataType;
1079
+ const path_dataType = path + '.dataType';
1080
+ if (typeof obj_dataType !== 'string') {
1081
+ return new TypeError('Expected "string" but received "' + typeof obj_dataType + '" (at "' + path_dataType + '")');
1082
+ }
1083
+ }
1084
+ const obj_fieldName = obj.fieldName;
1085
+ const path_fieldName = path + '.fieldName';
1086
+ if (typeof obj_fieldName !== 'string') {
1087
+ return new TypeError('Expected "string" but received "' + typeof obj_fieldName + '" (at "' + path_fieldName + '")');
1088
+ }
1089
+ const obj_fieldValue = obj.fieldValue;
1090
+ const path_fieldValue = path + '.fieldValue';
1091
+ if (obj_fieldValue === undefined) {
1092
+ return new TypeError('Expected "defined" but received "' + typeof obj_fieldValue + '" (at "' + path_fieldValue + '")');
1093
+ }
1094
+ })();
1095
+ return v_error === undefined ? null : v_error;
1096
1096
  }
1097
1097
 
1098
- function validate$b(obj, path = 'CustomFieldListInputRepresentation') {
1099
- const v_error = (() => {
1100
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1101
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1102
- }
1103
- const obj_records = obj.records;
1104
- const path_records = path + '.records';
1105
- if (!ArrayIsArray(obj_records)) {
1106
- return new TypeError('Expected "array" but received "' + typeof obj_records + '" (at "' + path_records + '")');
1107
- }
1108
- for (let i = 0; i < obj_records.length; i++) {
1109
- const obj_records_item = obj_records[i];
1110
- const path_records_item = path_records + '[' + i + ']';
1111
- const referencepath_records_itemValidationError = validate$c(obj_records_item, path_records_item);
1112
- if (referencepath_records_itemValidationError !== null) {
1113
- let message = 'Object doesn\'t match CustomFieldInputRepresentation (at "' + path_records_item + '")\n';
1114
- message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1115
- return new TypeError(message);
1116
- }
1117
- }
1118
- })();
1119
- return v_error === undefined ? null : v_error;
1098
+ function validate$b(obj, path = 'CustomFieldListInputRepresentation') {
1099
+ const v_error = (() => {
1100
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1101
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1102
+ }
1103
+ const obj_records = obj.records;
1104
+ const path_records = path + '.records';
1105
+ if (!ArrayIsArray(obj_records)) {
1106
+ return new TypeError('Expected "array" but received "' + typeof obj_records + '" (at "' + path_records + '")');
1107
+ }
1108
+ for (let i = 0; i < obj_records.length; i++) {
1109
+ const obj_records_item = obj_records[i];
1110
+ const path_records_item = path_records + '[' + i + ']';
1111
+ const referencepath_records_itemValidationError = validate$c(obj_records_item, path_records_item);
1112
+ if (referencepath_records_itemValidationError !== null) {
1113
+ let message = 'Object doesn\'t match CustomFieldInputRepresentation (at "' + path_records_item + '")\n';
1114
+ message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1115
+ return new TypeError(message);
1116
+ }
1117
+ }
1118
+ })();
1119
+ return v_error === undefined ? null : v_error;
1120
1120
  }
1121
1121
 
1122
- function validate$a(obj, path = 'BenefitAssignmentInputRepresentation') {
1123
- const v_error = (() => {
1124
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1125
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1126
- }
1127
- if (obj.benefitAssignmentTasks !== undefined) {
1128
- const obj_benefitAssignmentTasks = obj.benefitAssignmentTasks;
1129
- const path_benefitAssignmentTasks = path + '.benefitAssignmentTasks';
1130
- const referencepath_benefitAssignmentTasksValidationError = validate$f(obj_benefitAssignmentTasks, path_benefitAssignmentTasks);
1131
- if (referencepath_benefitAssignmentTasksValidationError !== null) {
1132
- let message = 'Object doesn\'t match CarePlanTaskInputRepresentation (at "' + path_benefitAssignmentTasks + '")\n';
1133
- message += referencepath_benefitAssignmentTasksValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1134
- return new TypeError(message);
1135
- }
1136
- }
1137
- if (obj.benefitDisbursements !== undefined) {
1138
- const obj_benefitDisbursements = obj.benefitDisbursements;
1139
- const path_benefitDisbursements = path + '.benefitDisbursements';
1140
- const referencepath_benefitDisbursementsValidationError = validate$d(obj_benefitDisbursements, path_benefitDisbursements);
1141
- if (referencepath_benefitDisbursementsValidationError !== null) {
1142
- let message = 'Object doesn\'t match BenefitDisbursementListInputRepresentation (at "' + path_benefitDisbursements + '")\n';
1143
- message += referencepath_benefitDisbursementsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1144
- return new TypeError(message);
1145
- }
1146
- }
1147
- if (obj.benefitFrequency !== undefined) {
1148
- const obj_benefitFrequency = obj.benefitFrequency;
1149
- const path_benefitFrequency = path + '.benefitFrequency';
1150
- if (typeof obj_benefitFrequency !== 'string') {
1151
- return new TypeError('Expected "string" but received "' + typeof obj_benefitFrequency + '" (at "' + path_benefitFrequency + '")');
1152
- }
1153
- }
1154
- const obj_benefitId = obj.benefitId;
1155
- const path_benefitId = path + '.benefitId';
1156
- if (typeof obj_benefitId !== 'string') {
1157
- return new TypeError('Expected "string" but received "' + typeof obj_benefitId + '" (at "' + path_benefitId + '")');
1158
- }
1159
- if (obj.customFields !== undefined) {
1160
- const obj_customFields = obj.customFields;
1161
- const path_customFields = path + '.customFields';
1162
- const referencepath_customFieldsValidationError = validate$b(obj_customFields, path_customFields);
1163
- if (referencepath_customFieldsValidationError !== null) {
1164
- let message = 'Object doesn\'t match CustomFieldListInputRepresentation (at "' + path_customFields + '")\n';
1165
- message += referencepath_customFieldsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1166
- return new TypeError(message);
1167
- }
1168
- }
1169
- if (obj.endDate !== undefined) {
1170
- const obj_endDate = obj.endDate;
1171
- const path_endDate = path + '.endDate';
1172
- if (typeof obj_endDate !== 'string') {
1173
- return new TypeError('Expected "string" but received "' + typeof obj_endDate + '" (at "' + path_endDate + '")');
1174
- }
1175
- }
1176
- if (obj.enrollmentCount !== undefined) {
1177
- const obj_enrollmentCount = obj.enrollmentCount;
1178
- const path_enrollmentCount = path + '.enrollmentCount';
1179
- if (typeof obj_enrollmentCount !== 'number' || (typeof obj_enrollmentCount === 'number' && Math.floor(obj_enrollmentCount) !== obj_enrollmentCount)) {
1180
- return new TypeError('Expected "integer" but received "' + typeof obj_enrollmentCount + '" (at "' + path_enrollmentCount + '")');
1181
- }
1182
- }
1183
- if (obj.entitlementAmount !== undefined) {
1184
- obj.entitlementAmount;
1185
- }
1186
- if (obj.id !== undefined) {
1187
- const obj_id = obj.id;
1188
- const path_id = path + '.id';
1189
- if (typeof obj_id !== 'string') {
1190
- return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
1191
- }
1192
- }
1193
- if (obj.maximumAmount !== undefined) {
1194
- obj.maximumAmount;
1195
- }
1196
- const obj_participantId = obj.participantId;
1197
- const path_participantId = path + '.participantId';
1198
- if (typeof obj_participantId !== 'string') {
1199
- return new TypeError('Expected "string" but received "' + typeof obj_participantId + '" (at "' + path_participantId + '")');
1200
- }
1201
- if (obj.payoutFrequency !== undefined) {
1202
- const obj_payoutFrequency = obj.payoutFrequency;
1203
- const path_payoutFrequency = path + '.payoutFrequency';
1204
- if (typeof obj_payoutFrequency !== 'string') {
1205
- return new TypeError('Expected "string" but received "' + typeof obj_payoutFrequency + '" (at "' + path_payoutFrequency + '")');
1206
- }
1207
- }
1208
- if (obj.priority !== undefined) {
1209
- const obj_priority = obj.priority;
1210
- const path_priority = path + '.priority';
1211
- if (typeof obj_priority !== 'string') {
1212
- return new TypeError('Expected "string" but received "' + typeof obj_priority + '" (at "' + path_priority + '")');
1213
- }
1214
- }
1215
- if (obj.startDate !== undefined) {
1216
- const obj_startDate = obj.startDate;
1217
- const path_startDate = path + '.startDate';
1218
- if (typeof obj_startDate !== 'string') {
1219
- return new TypeError('Expected "string" but received "' + typeof obj_startDate + '" (at "' + path_startDate + '")');
1220
- }
1221
- }
1222
- if (obj.status !== undefined) {
1223
- const obj_status = obj.status;
1224
- const path_status = path + '.status';
1225
- if (typeof obj_status !== 'string') {
1226
- return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
1227
- }
1228
- }
1229
- })();
1230
- return v_error === undefined ? null : v_error;
1122
+ function validate$a(obj, path = 'BenefitAssignmentInputRepresentation') {
1123
+ const v_error = (() => {
1124
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1125
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1126
+ }
1127
+ if (obj.benefitAssignmentTasks !== undefined) {
1128
+ const obj_benefitAssignmentTasks = obj.benefitAssignmentTasks;
1129
+ const path_benefitAssignmentTasks = path + '.benefitAssignmentTasks';
1130
+ const referencepath_benefitAssignmentTasksValidationError = validate$f(obj_benefitAssignmentTasks, path_benefitAssignmentTasks);
1131
+ if (referencepath_benefitAssignmentTasksValidationError !== null) {
1132
+ let message = 'Object doesn\'t match CarePlanTaskInputRepresentation (at "' + path_benefitAssignmentTasks + '")\n';
1133
+ message += referencepath_benefitAssignmentTasksValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1134
+ return new TypeError(message);
1135
+ }
1136
+ }
1137
+ if (obj.benefitDisbursements !== undefined) {
1138
+ const obj_benefitDisbursements = obj.benefitDisbursements;
1139
+ const path_benefitDisbursements = path + '.benefitDisbursements';
1140
+ const referencepath_benefitDisbursementsValidationError = validate$d(obj_benefitDisbursements, path_benefitDisbursements);
1141
+ if (referencepath_benefitDisbursementsValidationError !== null) {
1142
+ let message = 'Object doesn\'t match BenefitDisbursementListInputRepresentation (at "' + path_benefitDisbursements + '")\n';
1143
+ message += referencepath_benefitDisbursementsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1144
+ return new TypeError(message);
1145
+ }
1146
+ }
1147
+ if (obj.benefitFrequency !== undefined) {
1148
+ const obj_benefitFrequency = obj.benefitFrequency;
1149
+ const path_benefitFrequency = path + '.benefitFrequency';
1150
+ if (typeof obj_benefitFrequency !== 'string') {
1151
+ return new TypeError('Expected "string" but received "' + typeof obj_benefitFrequency + '" (at "' + path_benefitFrequency + '")');
1152
+ }
1153
+ }
1154
+ const obj_benefitId = obj.benefitId;
1155
+ const path_benefitId = path + '.benefitId';
1156
+ if (typeof obj_benefitId !== 'string') {
1157
+ return new TypeError('Expected "string" but received "' + typeof obj_benefitId + '" (at "' + path_benefitId + '")');
1158
+ }
1159
+ if (obj.customFields !== undefined) {
1160
+ const obj_customFields = obj.customFields;
1161
+ const path_customFields = path + '.customFields';
1162
+ const referencepath_customFieldsValidationError = validate$b(obj_customFields, path_customFields);
1163
+ if (referencepath_customFieldsValidationError !== null) {
1164
+ let message = 'Object doesn\'t match CustomFieldListInputRepresentation (at "' + path_customFields + '")\n';
1165
+ message += referencepath_customFieldsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1166
+ return new TypeError(message);
1167
+ }
1168
+ }
1169
+ if (obj.endDate !== undefined) {
1170
+ const obj_endDate = obj.endDate;
1171
+ const path_endDate = path + '.endDate';
1172
+ if (typeof obj_endDate !== 'string') {
1173
+ return new TypeError('Expected "string" but received "' + typeof obj_endDate + '" (at "' + path_endDate + '")');
1174
+ }
1175
+ }
1176
+ if (obj.enrollmentCount !== undefined) {
1177
+ const obj_enrollmentCount = obj.enrollmentCount;
1178
+ const path_enrollmentCount = path + '.enrollmentCount';
1179
+ if (typeof obj_enrollmentCount !== 'number' || (typeof obj_enrollmentCount === 'number' && Math.floor(obj_enrollmentCount) !== obj_enrollmentCount)) {
1180
+ return new TypeError('Expected "integer" but received "' + typeof obj_enrollmentCount + '" (at "' + path_enrollmentCount + '")');
1181
+ }
1182
+ }
1183
+ if (obj.entitlementAmount !== undefined) {
1184
+ obj.entitlementAmount;
1185
+ }
1186
+ if (obj.id !== undefined) {
1187
+ const obj_id = obj.id;
1188
+ const path_id = path + '.id';
1189
+ if (typeof obj_id !== 'string') {
1190
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
1191
+ }
1192
+ }
1193
+ if (obj.maximumAmount !== undefined) {
1194
+ obj.maximumAmount;
1195
+ }
1196
+ const obj_participantId = obj.participantId;
1197
+ const path_participantId = path + '.participantId';
1198
+ if (typeof obj_participantId !== 'string') {
1199
+ return new TypeError('Expected "string" but received "' + typeof obj_participantId + '" (at "' + path_participantId + '")');
1200
+ }
1201
+ if (obj.payoutFrequency !== undefined) {
1202
+ const obj_payoutFrequency = obj.payoutFrequency;
1203
+ const path_payoutFrequency = path + '.payoutFrequency';
1204
+ if (typeof obj_payoutFrequency !== 'string') {
1205
+ return new TypeError('Expected "string" but received "' + typeof obj_payoutFrequency + '" (at "' + path_payoutFrequency + '")');
1206
+ }
1207
+ }
1208
+ if (obj.priority !== undefined) {
1209
+ const obj_priority = obj.priority;
1210
+ const path_priority = path + '.priority';
1211
+ if (typeof obj_priority !== 'string') {
1212
+ return new TypeError('Expected "string" but received "' + typeof obj_priority + '" (at "' + path_priority + '")');
1213
+ }
1214
+ }
1215
+ if (obj.startDate !== undefined) {
1216
+ const obj_startDate = obj.startDate;
1217
+ const path_startDate = path + '.startDate';
1218
+ if (typeof obj_startDate !== 'string') {
1219
+ return new TypeError('Expected "string" but received "' + typeof obj_startDate + '" (at "' + path_startDate + '")');
1220
+ }
1221
+ }
1222
+ if (obj.status !== undefined) {
1223
+ const obj_status = obj.status;
1224
+ const path_status = path + '.status';
1225
+ if (typeof obj_status !== 'string') {
1226
+ return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
1227
+ }
1228
+ }
1229
+ })();
1230
+ return v_error === undefined ? null : v_error;
1231
1231
  }
1232
1232
 
1233
- function validate$9(obj, path = 'BenefitAssignmentListInputRepresentation') {
1234
- const v_error = (() => {
1235
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1236
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1237
- }
1238
- const obj_records = obj.records;
1239
- const path_records = path + '.records';
1240
- if (!ArrayIsArray(obj_records)) {
1241
- return new TypeError('Expected "array" but received "' + typeof obj_records + '" (at "' + path_records + '")');
1242
- }
1243
- for (let i = 0; i < obj_records.length; i++) {
1244
- const obj_records_item = obj_records[i];
1245
- const path_records_item = path_records + '[' + i + ']';
1246
- const referencepath_records_itemValidationError = validate$a(obj_records_item, path_records_item);
1247
- if (referencepath_records_itemValidationError !== null) {
1248
- let message = 'Object doesn\'t match BenefitAssignmentInputRepresentation (at "' + path_records_item + '")\n';
1249
- message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1250
- return new TypeError(message);
1251
- }
1252
- }
1253
- })();
1254
- return v_error === undefined ? null : v_error;
1233
+ function validate$9(obj, path = 'BenefitAssignmentListInputRepresentation') {
1234
+ const v_error = (() => {
1235
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1236
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1237
+ }
1238
+ const obj_records = obj.records;
1239
+ const path_records = path + '.records';
1240
+ if (!ArrayIsArray(obj_records)) {
1241
+ return new TypeError('Expected "array" but received "' + typeof obj_records + '" (at "' + path_records + '")');
1242
+ }
1243
+ for (let i = 0; i < obj_records.length; i++) {
1244
+ const obj_records_item = obj_records[i];
1245
+ const path_records_item = path_records + '[' + i + ']';
1246
+ const referencepath_records_itemValidationError = validate$a(obj_records_item, path_records_item);
1247
+ if (referencepath_records_itemValidationError !== null) {
1248
+ let message = 'Object doesn\'t match BenefitAssignmentInputRepresentation (at "' + path_records_item + '")\n';
1249
+ message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1250
+ return new TypeError(message);
1251
+ }
1252
+ }
1253
+ })();
1254
+ return v_error === undefined ? null : v_error;
1255
1255
  }
1256
1256
 
1257
- function validate$8(obj, path = 'GoalAssignmentInputRepresentation') {
1258
- const v_error = (() => {
1259
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1260
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1261
- }
1262
- if (obj.associatedBenefitAssignments !== undefined) {
1263
- const obj_associatedBenefitAssignments = obj.associatedBenefitAssignments;
1264
- const path_associatedBenefitAssignments = path + '.associatedBenefitAssignments';
1265
- const referencepath_associatedBenefitAssignmentsValidationError = validate$9(obj_associatedBenefitAssignments, path_associatedBenefitAssignments);
1266
- if (referencepath_associatedBenefitAssignmentsValidationError !== null) {
1267
- let message = 'Object doesn\'t match BenefitAssignmentListInputRepresentation (at "' + path_associatedBenefitAssignments + '")\n';
1268
- message += referencepath_associatedBenefitAssignmentsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1269
- return new TypeError(message);
1270
- }
1271
- }
1272
- if (obj.associatedSubGoalAssignments !== undefined) {
1273
- const obj_associatedSubGoalAssignments = obj.associatedSubGoalAssignments;
1274
- const path_associatedSubGoalAssignments = path + '.associatedSubGoalAssignments';
1275
- const referencepath_associatedSubGoalAssignmentsValidationError = validate$7(obj_associatedSubGoalAssignments, path_associatedSubGoalAssignments);
1276
- if (referencepath_associatedSubGoalAssignmentsValidationError !== null) {
1277
- let message = 'Object doesn\'t match GoalAssignmentListInputRepresentation (at "' + path_associatedSubGoalAssignments + '")\n';
1278
- message += referencepath_associatedSubGoalAssignmentsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1279
- return new TypeError(message);
1280
- }
1281
- }
1282
- if (obj.completionDate !== undefined) {
1283
- const obj_completionDate = obj.completionDate;
1284
- const path_completionDate = path + '.completionDate';
1285
- if (typeof obj_completionDate !== 'string') {
1286
- return new TypeError('Expected "string" but received "' + typeof obj_completionDate + '" (at "' + path_completionDate + '")');
1287
- }
1288
- }
1289
- if (obj.completionPercentage !== undefined) {
1290
- obj.completionPercentage;
1291
- }
1292
- if (obj.customFields !== undefined) {
1293
- const obj_customFields = obj.customFields;
1294
- const path_customFields = path + '.customFields';
1295
- const referencepath_customFieldsValidationError = validate$b(obj_customFields, path_customFields);
1296
- if (referencepath_customFieldsValidationError !== null) {
1297
- let message = 'Object doesn\'t match CustomFieldListInputRepresentation (at "' + path_customFields + '")\n';
1298
- message += referencepath_customFieldsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1299
- return new TypeError(message);
1300
- }
1301
- }
1302
- if (obj.description !== undefined) {
1303
- const obj_description = obj.description;
1304
- const path_description = path + '.description';
1305
- if (typeof obj_description !== 'string') {
1306
- return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
1307
- }
1308
- }
1309
- if (obj.goalAssigneeId !== undefined) {
1310
- const obj_goalAssigneeId = obj.goalAssigneeId;
1311
- const path_goalAssigneeId = path + '.goalAssigneeId';
1312
- if (typeof obj_goalAssigneeId !== 'string') {
1313
- return new TypeError('Expected "string" but received "' + typeof obj_goalAssigneeId + '" (at "' + path_goalAssigneeId + '")');
1314
- }
1315
- }
1316
- if (obj.goalAssignmentTasks !== undefined) {
1317
- const obj_goalAssignmentTasks = obj.goalAssignmentTasks;
1318
- const path_goalAssignmentTasks = path + '.goalAssignmentTasks';
1319
- const referencepath_goalAssignmentTasksValidationError = validate$f(obj_goalAssignmentTasks, path_goalAssignmentTasks);
1320
- if (referencepath_goalAssignmentTasksValidationError !== null) {
1321
- let message = 'Object doesn\'t match CarePlanTaskInputRepresentation (at "' + path_goalAssignmentTasks + '")\n';
1322
- message += referencepath_goalAssignmentTasksValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1323
- return new TypeError(message);
1324
- }
1325
- }
1326
- const obj_goalDefinitionId = obj.goalDefinitionId;
1327
- const path_goalDefinitionId = path + '.goalDefinitionId';
1328
- if (typeof obj_goalDefinitionId !== 'string') {
1329
- return new TypeError('Expected "string" but received "' + typeof obj_goalDefinitionId + '" (at "' + path_goalDefinitionId + '")');
1330
- }
1331
- if (obj.id !== undefined) {
1332
- const obj_id = obj.id;
1333
- const path_id = path + '.id';
1334
- if (typeof obj_id !== 'string') {
1335
- return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
1336
- }
1337
- }
1338
- if (obj.priority !== undefined) {
1339
- const obj_priority = obj.priority;
1340
- const path_priority = path + '.priority';
1341
- if (typeof obj_priority !== 'string') {
1342
- return new TypeError('Expected "string" but received "' + typeof obj_priority + '" (at "' + path_priority + '")');
1343
- }
1344
- }
1345
- if (obj.startDate !== undefined) {
1346
- const obj_startDate = obj.startDate;
1347
- const path_startDate = path + '.startDate';
1348
- if (typeof obj_startDate !== 'string') {
1349
- return new TypeError('Expected "string" but received "' + typeof obj_startDate + '" (at "' + path_startDate + '")');
1350
- }
1351
- }
1352
- if (obj.status !== undefined) {
1353
- const obj_status = obj.status;
1354
- const path_status = path + '.status';
1355
- if (typeof obj_status !== 'string') {
1356
- return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
1357
- }
1358
- }
1359
- if (obj.targetCompletionDate !== undefined) {
1360
- const obj_targetCompletionDate = obj.targetCompletionDate;
1361
- const path_targetCompletionDate = path + '.targetCompletionDate';
1362
- if (typeof obj_targetCompletionDate !== 'string') {
1363
- return new TypeError('Expected "string" but received "' + typeof obj_targetCompletionDate + '" (at "' + path_targetCompletionDate + '")');
1364
- }
1365
- }
1366
- })();
1367
- return v_error === undefined ? null : v_error;
1257
+ function validate$8(obj, path = 'GoalAssignmentInputRepresentation') {
1258
+ const v_error = (() => {
1259
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1260
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1261
+ }
1262
+ if (obj.associatedBenefitAssignments !== undefined) {
1263
+ const obj_associatedBenefitAssignments = obj.associatedBenefitAssignments;
1264
+ const path_associatedBenefitAssignments = path + '.associatedBenefitAssignments';
1265
+ const referencepath_associatedBenefitAssignmentsValidationError = validate$9(obj_associatedBenefitAssignments, path_associatedBenefitAssignments);
1266
+ if (referencepath_associatedBenefitAssignmentsValidationError !== null) {
1267
+ let message = 'Object doesn\'t match BenefitAssignmentListInputRepresentation (at "' + path_associatedBenefitAssignments + '")\n';
1268
+ message += referencepath_associatedBenefitAssignmentsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1269
+ return new TypeError(message);
1270
+ }
1271
+ }
1272
+ if (obj.associatedSubGoalAssignments !== undefined) {
1273
+ const obj_associatedSubGoalAssignments = obj.associatedSubGoalAssignments;
1274
+ const path_associatedSubGoalAssignments = path + '.associatedSubGoalAssignments';
1275
+ const referencepath_associatedSubGoalAssignmentsValidationError = validate$7(obj_associatedSubGoalAssignments, path_associatedSubGoalAssignments);
1276
+ if (referencepath_associatedSubGoalAssignmentsValidationError !== null) {
1277
+ let message = 'Object doesn\'t match GoalAssignmentListInputRepresentation (at "' + path_associatedSubGoalAssignments + '")\n';
1278
+ message += referencepath_associatedSubGoalAssignmentsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1279
+ return new TypeError(message);
1280
+ }
1281
+ }
1282
+ if (obj.completionDate !== undefined) {
1283
+ const obj_completionDate = obj.completionDate;
1284
+ const path_completionDate = path + '.completionDate';
1285
+ if (typeof obj_completionDate !== 'string') {
1286
+ return new TypeError('Expected "string" but received "' + typeof obj_completionDate + '" (at "' + path_completionDate + '")');
1287
+ }
1288
+ }
1289
+ if (obj.completionPercentage !== undefined) {
1290
+ obj.completionPercentage;
1291
+ }
1292
+ if (obj.customFields !== undefined) {
1293
+ const obj_customFields = obj.customFields;
1294
+ const path_customFields = path + '.customFields';
1295
+ const referencepath_customFieldsValidationError = validate$b(obj_customFields, path_customFields);
1296
+ if (referencepath_customFieldsValidationError !== null) {
1297
+ let message = 'Object doesn\'t match CustomFieldListInputRepresentation (at "' + path_customFields + '")\n';
1298
+ message += referencepath_customFieldsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1299
+ return new TypeError(message);
1300
+ }
1301
+ }
1302
+ if (obj.description !== undefined) {
1303
+ const obj_description = obj.description;
1304
+ const path_description = path + '.description';
1305
+ if (typeof obj_description !== 'string') {
1306
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
1307
+ }
1308
+ }
1309
+ if (obj.goalAssigneeId !== undefined) {
1310
+ const obj_goalAssigneeId = obj.goalAssigneeId;
1311
+ const path_goalAssigneeId = path + '.goalAssigneeId';
1312
+ if (typeof obj_goalAssigneeId !== 'string') {
1313
+ return new TypeError('Expected "string" but received "' + typeof obj_goalAssigneeId + '" (at "' + path_goalAssigneeId + '")');
1314
+ }
1315
+ }
1316
+ if (obj.goalAssignmentTasks !== undefined) {
1317
+ const obj_goalAssignmentTasks = obj.goalAssignmentTasks;
1318
+ const path_goalAssignmentTasks = path + '.goalAssignmentTasks';
1319
+ const referencepath_goalAssignmentTasksValidationError = validate$f(obj_goalAssignmentTasks, path_goalAssignmentTasks);
1320
+ if (referencepath_goalAssignmentTasksValidationError !== null) {
1321
+ let message = 'Object doesn\'t match CarePlanTaskInputRepresentation (at "' + path_goalAssignmentTasks + '")\n';
1322
+ message += referencepath_goalAssignmentTasksValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1323
+ return new TypeError(message);
1324
+ }
1325
+ }
1326
+ const obj_goalDefinitionId = obj.goalDefinitionId;
1327
+ const path_goalDefinitionId = path + '.goalDefinitionId';
1328
+ if (typeof obj_goalDefinitionId !== 'string') {
1329
+ return new TypeError('Expected "string" but received "' + typeof obj_goalDefinitionId + '" (at "' + path_goalDefinitionId + '")');
1330
+ }
1331
+ if (obj.id !== undefined) {
1332
+ const obj_id = obj.id;
1333
+ const path_id = path + '.id';
1334
+ if (typeof obj_id !== 'string') {
1335
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
1336
+ }
1337
+ }
1338
+ if (obj.priority !== undefined) {
1339
+ const obj_priority = obj.priority;
1340
+ const path_priority = path + '.priority';
1341
+ if (typeof obj_priority !== 'string') {
1342
+ return new TypeError('Expected "string" but received "' + typeof obj_priority + '" (at "' + path_priority + '")');
1343
+ }
1344
+ }
1345
+ if (obj.startDate !== undefined) {
1346
+ const obj_startDate = obj.startDate;
1347
+ const path_startDate = path + '.startDate';
1348
+ if (typeof obj_startDate !== 'string') {
1349
+ return new TypeError('Expected "string" but received "' + typeof obj_startDate + '" (at "' + path_startDate + '")');
1350
+ }
1351
+ }
1352
+ if (obj.status !== undefined) {
1353
+ const obj_status = obj.status;
1354
+ const path_status = path + '.status';
1355
+ if (typeof obj_status !== 'string') {
1356
+ return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
1357
+ }
1358
+ }
1359
+ if (obj.targetCompletionDate !== undefined) {
1360
+ const obj_targetCompletionDate = obj.targetCompletionDate;
1361
+ const path_targetCompletionDate = path + '.targetCompletionDate';
1362
+ if (typeof obj_targetCompletionDate !== 'string') {
1363
+ return new TypeError('Expected "string" but received "' + typeof obj_targetCompletionDate + '" (at "' + path_targetCompletionDate + '")');
1364
+ }
1365
+ }
1366
+ })();
1367
+ return v_error === undefined ? null : v_error;
1368
1368
  }
1369
1369
 
1370
- function validate$7(obj, path = 'GoalAssignmentListInputRepresentation') {
1371
- const v_error = (() => {
1372
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1373
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1374
- }
1375
- const obj_records = obj.records;
1376
- const path_records = path + '.records';
1377
- if (!ArrayIsArray(obj_records)) {
1378
- return new TypeError('Expected "array" but received "' + typeof obj_records + '" (at "' + path_records + '")');
1379
- }
1380
- for (let i = 0; i < obj_records.length; i++) {
1381
- const obj_records_item = obj_records[i];
1382
- const path_records_item = path_records + '[' + i + ']';
1383
- const referencepath_records_itemValidationError = validate$8(obj_records_item, path_records_item);
1384
- if (referencepath_records_itemValidationError !== null) {
1385
- let message = 'Object doesn\'t match GoalAssignmentInputRepresentation (at "' + path_records_item + '")\n';
1386
- message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1387
- return new TypeError(message);
1388
- }
1389
- }
1390
- })();
1391
- return v_error === undefined ? null : v_error;
1370
+ function validate$7(obj, path = 'GoalAssignmentListInputRepresentation') {
1371
+ const v_error = (() => {
1372
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1373
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1374
+ }
1375
+ const obj_records = obj.records;
1376
+ const path_records = path + '.records';
1377
+ if (!ArrayIsArray(obj_records)) {
1378
+ return new TypeError('Expected "array" but received "' + typeof obj_records + '" (at "' + path_records + '")');
1379
+ }
1380
+ for (let i = 0; i < obj_records.length; i++) {
1381
+ const obj_records_item = obj_records[i];
1382
+ const path_records_item = path_records + '[' + i + ']';
1383
+ const referencepath_records_itemValidationError = validate$8(obj_records_item, path_records_item);
1384
+ if (referencepath_records_itemValidationError !== null) {
1385
+ let message = 'Object doesn\'t match GoalAssignmentInputRepresentation (at "' + path_records_item + '")\n';
1386
+ message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1387
+ return new TypeError(message);
1388
+ }
1389
+ }
1390
+ })();
1391
+ return v_error === undefined ? null : v_error;
1392
1392
  }
1393
1393
 
1394
- function validate$6(obj, path = 'CarePlanInputRepresentation') {
1395
- const v_error = (() => {
1396
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1397
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1398
- }
1399
- if (obj.benefitAssignments !== undefined) {
1400
- const obj_benefitAssignments = obj.benefitAssignments;
1401
- const path_benefitAssignments = path + '.benefitAssignments';
1402
- const referencepath_benefitAssignmentsValidationError = validate$9(obj_benefitAssignments, path_benefitAssignments);
1403
- if (referencepath_benefitAssignmentsValidationError !== null) {
1404
- let message = 'Object doesn\'t match BenefitAssignmentListInputRepresentation (at "' + path_benefitAssignments + '")\n';
1405
- message += referencepath_benefitAssignmentsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1406
- return new TypeError(message);
1407
- }
1408
- }
1409
- if (obj.carePlanTasks !== undefined) {
1410
- const obj_carePlanTasks = obj.carePlanTasks;
1411
- const path_carePlanTasks = path + '.carePlanTasks';
1412
- const referencepath_carePlanTasksValidationError = validate$f(obj_carePlanTasks, path_carePlanTasks);
1413
- if (referencepath_carePlanTasksValidationError !== null) {
1414
- let message = 'Object doesn\'t match CarePlanTaskInputRepresentation (at "' + path_carePlanTasks + '")\n';
1415
- message += referencepath_carePlanTasksValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1416
- return new TypeError(message);
1417
- }
1418
- }
1419
- if (obj.carePlanTemplateId !== undefined) {
1420
- const obj_carePlanTemplateId = obj.carePlanTemplateId;
1421
- const path_carePlanTemplateId = path + '.carePlanTemplateId';
1422
- if (typeof obj_carePlanTemplateId !== 'string') {
1423
- return new TypeError('Expected "string" but received "' + typeof obj_carePlanTemplateId + '" (at "' + path_carePlanTemplateId + '")');
1424
- }
1425
- }
1426
- const obj_caseId = obj.caseId;
1427
- const path_caseId = path + '.caseId';
1428
- if (typeof obj_caseId !== 'string') {
1429
- return new TypeError('Expected "string" but received "' + typeof obj_caseId + '" (at "' + path_caseId + '")');
1430
- }
1431
- if (obj.customFields !== undefined) {
1432
- const obj_customFields = obj.customFields;
1433
- const path_customFields = path + '.customFields';
1434
- const referencepath_customFieldsValidationError = validate$b(obj_customFields, path_customFields);
1435
- if (referencepath_customFieldsValidationError !== null) {
1436
- let message = 'Object doesn\'t match CustomFieldListInputRepresentation (at "' + path_customFields + '")\n';
1437
- message += referencepath_customFieldsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1438
- return new TypeError(message);
1439
- }
1440
- }
1441
- if (obj.description !== undefined) {
1442
- const obj_description = obj.description;
1443
- const path_description = path + '.description';
1444
- if (typeof obj_description !== 'string') {
1445
- return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
1446
- }
1447
- }
1448
- if (obj.endDate !== undefined) {
1449
- const obj_endDate = obj.endDate;
1450
- const path_endDate = path + '.endDate';
1451
- if (typeof obj_endDate !== 'string') {
1452
- return new TypeError('Expected "string" but received "' + typeof obj_endDate + '" (at "' + path_endDate + '")');
1453
- }
1454
- }
1455
- if (obj.goalAssignments !== undefined) {
1456
- const obj_goalAssignments = obj.goalAssignments;
1457
- const path_goalAssignments = path + '.goalAssignments';
1458
- const referencepath_goalAssignmentsValidationError = validate$7(obj_goalAssignments, path_goalAssignments);
1459
- if (referencepath_goalAssignmentsValidationError !== null) {
1460
- let message = 'Object doesn\'t match GoalAssignmentListInputRepresentation (at "' + path_goalAssignments + '")\n';
1461
- message += referencepath_goalAssignmentsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1462
- return new TypeError(message);
1463
- }
1464
- }
1465
- if (obj.id !== undefined) {
1466
- const obj_id = obj.id;
1467
- const path_id = path + '.id';
1468
- if (typeof obj_id !== 'string') {
1469
- return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
1470
- }
1471
- }
1472
- if (obj.medicationTherapyReview !== undefined) {
1473
- const obj_medicationTherapyReview = obj.medicationTherapyReview;
1474
- const path_medicationTherapyReview = path + '.medicationTherapyReview';
1475
- if (typeof obj_medicationTherapyReview !== 'string') {
1476
- return new TypeError('Expected "string" but received "' + typeof obj_medicationTherapyReview + '" (at "' + path_medicationTherapyReview + '")');
1477
- }
1478
- }
1479
- const obj_name = obj.name;
1480
- const path_name = path + '.name';
1481
- if (typeof obj_name !== 'string') {
1482
- return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
1483
- }
1484
- const obj_participantId = obj.participantId;
1485
- const path_participantId = path + '.participantId';
1486
- if (typeof obj_participantId !== 'string') {
1487
- return new TypeError('Expected "string" but received "' + typeof obj_participantId + '" (at "' + path_participantId + '")');
1488
- }
1489
- if (obj.startDate !== undefined) {
1490
- const obj_startDate = obj.startDate;
1491
- const path_startDate = path + '.startDate';
1492
- if (typeof obj_startDate !== 'string') {
1493
- return new TypeError('Expected "string" but received "' + typeof obj_startDate + '" (at "' + path_startDate + '")');
1494
- }
1495
- }
1496
- const obj_status = obj.status;
1497
- const path_status = path + '.status';
1498
- if (typeof obj_status !== 'string') {
1499
- return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
1500
- }
1501
- })();
1502
- return v_error === undefined ? null : v_error;
1394
+ function validate$6(obj, path = 'CarePlanInputRepresentation') {
1395
+ const v_error = (() => {
1396
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1397
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1398
+ }
1399
+ if (obj.benefitAssignments !== undefined) {
1400
+ const obj_benefitAssignments = obj.benefitAssignments;
1401
+ const path_benefitAssignments = path + '.benefitAssignments';
1402
+ const referencepath_benefitAssignmentsValidationError = validate$9(obj_benefitAssignments, path_benefitAssignments);
1403
+ if (referencepath_benefitAssignmentsValidationError !== null) {
1404
+ let message = 'Object doesn\'t match BenefitAssignmentListInputRepresentation (at "' + path_benefitAssignments + '")\n';
1405
+ message += referencepath_benefitAssignmentsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1406
+ return new TypeError(message);
1407
+ }
1408
+ }
1409
+ if (obj.carePlanTasks !== undefined) {
1410
+ const obj_carePlanTasks = obj.carePlanTasks;
1411
+ const path_carePlanTasks = path + '.carePlanTasks';
1412
+ const referencepath_carePlanTasksValidationError = validate$f(obj_carePlanTasks, path_carePlanTasks);
1413
+ if (referencepath_carePlanTasksValidationError !== null) {
1414
+ let message = 'Object doesn\'t match CarePlanTaskInputRepresentation (at "' + path_carePlanTasks + '")\n';
1415
+ message += referencepath_carePlanTasksValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1416
+ return new TypeError(message);
1417
+ }
1418
+ }
1419
+ if (obj.carePlanTemplateId !== undefined) {
1420
+ const obj_carePlanTemplateId = obj.carePlanTemplateId;
1421
+ const path_carePlanTemplateId = path + '.carePlanTemplateId';
1422
+ if (typeof obj_carePlanTemplateId !== 'string') {
1423
+ return new TypeError('Expected "string" but received "' + typeof obj_carePlanTemplateId + '" (at "' + path_carePlanTemplateId + '")');
1424
+ }
1425
+ }
1426
+ const obj_caseId = obj.caseId;
1427
+ const path_caseId = path + '.caseId';
1428
+ if (typeof obj_caseId !== 'string') {
1429
+ return new TypeError('Expected "string" but received "' + typeof obj_caseId + '" (at "' + path_caseId + '")');
1430
+ }
1431
+ if (obj.customFields !== undefined) {
1432
+ const obj_customFields = obj.customFields;
1433
+ const path_customFields = path + '.customFields';
1434
+ const referencepath_customFieldsValidationError = validate$b(obj_customFields, path_customFields);
1435
+ if (referencepath_customFieldsValidationError !== null) {
1436
+ let message = 'Object doesn\'t match CustomFieldListInputRepresentation (at "' + path_customFields + '")\n';
1437
+ message += referencepath_customFieldsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1438
+ return new TypeError(message);
1439
+ }
1440
+ }
1441
+ if (obj.description !== undefined) {
1442
+ const obj_description = obj.description;
1443
+ const path_description = path + '.description';
1444
+ if (typeof obj_description !== 'string') {
1445
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
1446
+ }
1447
+ }
1448
+ if (obj.endDate !== undefined) {
1449
+ const obj_endDate = obj.endDate;
1450
+ const path_endDate = path + '.endDate';
1451
+ if (typeof obj_endDate !== 'string') {
1452
+ return new TypeError('Expected "string" but received "' + typeof obj_endDate + '" (at "' + path_endDate + '")');
1453
+ }
1454
+ }
1455
+ if (obj.goalAssignments !== undefined) {
1456
+ const obj_goalAssignments = obj.goalAssignments;
1457
+ const path_goalAssignments = path + '.goalAssignments';
1458
+ const referencepath_goalAssignmentsValidationError = validate$7(obj_goalAssignments, path_goalAssignments);
1459
+ if (referencepath_goalAssignmentsValidationError !== null) {
1460
+ let message = 'Object doesn\'t match GoalAssignmentListInputRepresentation (at "' + path_goalAssignments + '")\n';
1461
+ message += referencepath_goalAssignmentsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1462
+ return new TypeError(message);
1463
+ }
1464
+ }
1465
+ if (obj.id !== undefined) {
1466
+ const obj_id = obj.id;
1467
+ const path_id = path + '.id';
1468
+ if (typeof obj_id !== 'string') {
1469
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
1470
+ }
1471
+ }
1472
+ if (obj.medicationTherapyReview !== undefined) {
1473
+ const obj_medicationTherapyReview = obj.medicationTherapyReview;
1474
+ const path_medicationTherapyReview = path + '.medicationTherapyReview';
1475
+ if (typeof obj_medicationTherapyReview !== 'string') {
1476
+ return new TypeError('Expected "string" but received "' + typeof obj_medicationTherapyReview + '" (at "' + path_medicationTherapyReview + '")');
1477
+ }
1478
+ }
1479
+ const obj_name = obj.name;
1480
+ const path_name = path + '.name';
1481
+ if (typeof obj_name !== 'string') {
1482
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
1483
+ }
1484
+ const obj_participantId = obj.participantId;
1485
+ const path_participantId = path + '.participantId';
1486
+ if (typeof obj_participantId !== 'string') {
1487
+ return new TypeError('Expected "string" but received "' + typeof obj_participantId + '" (at "' + path_participantId + '")');
1488
+ }
1489
+ if (obj.startDate !== undefined) {
1490
+ const obj_startDate = obj.startDate;
1491
+ const path_startDate = path + '.startDate';
1492
+ if (typeof obj_startDate !== 'string') {
1493
+ return new TypeError('Expected "string" but received "' + typeof obj_startDate + '" (at "' + path_startDate + '")');
1494
+ }
1495
+ }
1496
+ const obj_status = obj.status;
1497
+ const path_status = path + '.status';
1498
+ if (typeof obj_status !== 'string') {
1499
+ return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
1500
+ }
1501
+ })();
1502
+ return v_error === undefined ? null : v_error;
1503
1503
  }
1504
1504
 
1505
- function validate$5(obj, path = 'CarePlanListInputRepresentation') {
1506
- const v_error = (() => {
1507
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1508
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1509
- }
1510
- const obj_records = obj.records;
1511
- const path_records = path + '.records';
1512
- if (!ArrayIsArray(obj_records)) {
1513
- return new TypeError('Expected "array" but received "' + typeof obj_records + '" (at "' + path_records + '")');
1514
- }
1515
- for (let i = 0; i < obj_records.length; i++) {
1516
- const obj_records_item = obj_records[i];
1517
- const path_records_item = path_records + '[' + i + ']';
1518
- const referencepath_records_itemValidationError = validate$6(obj_records_item, path_records_item);
1519
- if (referencepath_records_itemValidationError !== null) {
1520
- let message = 'Object doesn\'t match CarePlanInputRepresentation (at "' + path_records_item + '")\n';
1521
- message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1522
- return new TypeError(message);
1523
- }
1524
- }
1525
- })();
1526
- return v_error === undefined ? null : v_error;
1505
+ function validate$5(obj, path = 'CarePlanListInputRepresentation') {
1506
+ const v_error = (() => {
1507
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1508
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1509
+ }
1510
+ const obj_records = obj.records;
1511
+ const path_records = path + '.records';
1512
+ if (!ArrayIsArray(obj_records)) {
1513
+ return new TypeError('Expected "array" but received "' + typeof obj_records + '" (at "' + path_records + '")');
1514
+ }
1515
+ for (let i = 0; i < obj_records.length; i++) {
1516
+ const obj_records_item = obj_records[i];
1517
+ const path_records_item = path_records + '[' + i + ']';
1518
+ const referencepath_records_itemValidationError = validate$6(obj_records_item, path_records_item);
1519
+ if (referencepath_records_itemValidationError !== null) {
1520
+ let message = 'Object doesn\'t match CarePlanInputRepresentation (at "' + path_records_item + '")\n';
1521
+ message += referencepath_records_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1522
+ return new TypeError(message);
1523
+ }
1524
+ }
1525
+ })();
1526
+ return v_error === undefined ? null : v_error;
1527
1527
  }
1528
1528
 
1529
- function validate$4(obj, path = 'CarePlanBulkInputRepresentation') {
1530
- const v_error = (() => {
1531
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1532
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1533
- }
1534
- const obj_carePlans = obj.carePlans;
1535
- const path_carePlans = path + '.carePlans';
1536
- const referencepath_carePlansValidationError = validate$5(obj_carePlans, path_carePlans);
1537
- if (referencepath_carePlansValidationError !== null) {
1538
- let message = 'Object doesn\'t match CarePlanListInputRepresentation (at "' + path_carePlans + '")\n';
1539
- message += referencepath_carePlansValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1540
- return new TypeError(message);
1541
- }
1542
- })();
1543
- return v_error === undefined ? null : v_error;
1529
+ function validate$4(obj, path = 'CarePlanBulkInputRepresentation') {
1530
+ const v_error = (() => {
1531
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1532
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1533
+ }
1534
+ const obj_carePlans = obj.carePlans;
1535
+ const path_carePlans = path + '.carePlans';
1536
+ const referencepath_carePlansValidationError = validate$5(obj_carePlans, path_carePlans);
1537
+ if (referencepath_carePlansValidationError !== null) {
1538
+ let message = 'Object doesn\'t match CarePlanListInputRepresentation (at "' + path_carePlans + '")\n';
1539
+ message += referencepath_carePlansValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1540
+ return new TypeError(message);
1541
+ }
1542
+ })();
1543
+ return v_error === undefined ? null : v_error;
1544
1544
  }
1545
1545
 
1546
- const TTL = 100;
1547
- const VERSION$3 = "83a45266096a71720e9049cb0f0477d6";
1548
- function validate$3(obj, path = 'CarePlanBulkOutputRepresentation') {
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
- if (obj.errorMessage !== undefined) {
1554
- const obj_errorMessage = obj.errorMessage;
1555
- const path_errorMessage = path + '.errorMessage';
1556
- if (typeof obj_errorMessage !== 'string') {
1557
- return new TypeError('Expected "string" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
1558
- }
1559
- }
1560
- if (obj.numberOfCarePlans !== undefined) {
1561
- const obj_numberOfCarePlans = obj.numberOfCarePlans;
1562
- const path_numberOfCarePlans = path + '.numberOfCarePlans';
1563
- if (typeof obj_numberOfCarePlans !== 'number' || (typeof obj_numberOfCarePlans === 'number' && Math.floor(obj_numberOfCarePlans) !== obj_numberOfCarePlans)) {
1564
- return new TypeError('Expected "integer" but received "' + typeof obj_numberOfCarePlans + '" (at "' + path_numberOfCarePlans + '")');
1565
- }
1566
- }
1567
- const obj_statusCode = obj.statusCode;
1568
- const path_statusCode = path + '.statusCode';
1569
- if (typeof obj_statusCode !== 'string') {
1570
- return new TypeError('Expected "string" but received "' + typeof obj_statusCode + '" (at "' + path_statusCode + '")');
1571
- }
1572
- })();
1573
- return v_error === undefined ? null : v_error;
1574
- }
1575
- const RepresentationType$1 = 'CarePlanBulkOutputRepresentation';
1576
- function keyBuilder$2(luvio, config) {
1577
- return keyPrefix + '::' + RepresentationType$1 + ':' + config.id;
1578
- }
1579
- function keyBuilderFromType(luvio, object) {
1580
- const keyParams = {
1581
- id: object.statusCode
1582
- };
1583
- return keyBuilder$2(luvio, keyParams);
1584
- }
1585
- function normalize$1(input, existing, path, luvio, store, timestamp) {
1586
- return input;
1587
- }
1588
- const select$5 = function CarePlanBulkOutputRepresentationSelect() {
1589
- return {
1590
- kind: 'Fragment',
1591
- version: VERSION$3,
1592
- private: [],
1593
- opaque: true
1594
- };
1595
- };
1596
- function equals$3(existing, incoming) {
1597
- if (JSONStringify(incoming) !== JSONStringify(existing)) {
1598
- return false;
1599
- }
1600
- return true;
1601
- }
1602
- function deepFreeze(input) {
1603
- ObjectFreeze(input);
1604
- }
1605
- const ingest$1 = function CarePlanBulkOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1606
- if (process.env.NODE_ENV !== 'production') {
1607
- const validateError = validate$3(input);
1608
- if (validateError !== null) {
1609
- throw validateError;
1610
- }
1611
- }
1612
- const key = keyBuilderFromType(luvio, input);
1613
- const existingRecord = store.readEntry(key);
1614
- const ttlToUse = TTL;
1615
- let incomingRecord = normalize$1(input, store.readEntry(key), {
1616
- fullPath: key,
1617
- parent: path.parent,
1618
- propertyName: path.propertyName,
1619
- ttl: ttlToUse
1620
- });
1621
- deepFreeze(input);
1622
- if (existingRecord === undefined || equals$3(existingRecord, incomingRecord) === false) {
1623
- luvio.storePublish(key, incomingRecord);
1624
- }
1625
- {
1626
- const storeMetadataParams = {
1627
- ttl: ttlToUse,
1628
- namespace: "education",
1629
- version: VERSION$3,
1630
- representationName: RepresentationType$1,
1631
- };
1632
- luvio.publishStoreMetadata(key, storeMetadataParams);
1633
- }
1634
- return createLink(key);
1635
- };
1636
- function getTypeCacheKeys$1(luvio, input, fullPathFactory) {
1637
- const rootKeySet = new StoreKeyMap();
1638
- // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1639
- const rootKey = keyBuilderFromType(luvio, input);
1640
- rootKeySet.set(rootKey, {
1641
- namespace: keyPrefix,
1642
- representationName: RepresentationType$1,
1643
- mergeable: false
1644
- });
1645
- return rootKeySet;
1546
+ const TTL = 100;
1547
+ const VERSION$3 = "83a45266096a71720e9049cb0f0477d6";
1548
+ function validate$3(obj, path = 'CarePlanBulkOutputRepresentation') {
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
+ if (obj.errorMessage !== undefined) {
1554
+ const obj_errorMessage = obj.errorMessage;
1555
+ const path_errorMessage = path + '.errorMessage';
1556
+ if (typeof obj_errorMessage !== 'string') {
1557
+ return new TypeError('Expected "string" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
1558
+ }
1559
+ }
1560
+ if (obj.numberOfCarePlans !== undefined) {
1561
+ const obj_numberOfCarePlans = obj.numberOfCarePlans;
1562
+ const path_numberOfCarePlans = path + '.numberOfCarePlans';
1563
+ if (typeof obj_numberOfCarePlans !== 'number' || (typeof obj_numberOfCarePlans === 'number' && Math.floor(obj_numberOfCarePlans) !== obj_numberOfCarePlans)) {
1564
+ return new TypeError('Expected "integer" but received "' + typeof obj_numberOfCarePlans + '" (at "' + path_numberOfCarePlans + '")');
1565
+ }
1566
+ }
1567
+ const obj_statusCode = obj.statusCode;
1568
+ const path_statusCode = path + '.statusCode';
1569
+ if (typeof obj_statusCode !== 'string') {
1570
+ return new TypeError('Expected "string" but received "' + typeof obj_statusCode + '" (at "' + path_statusCode + '")');
1571
+ }
1572
+ })();
1573
+ return v_error === undefined ? null : v_error;
1574
+ }
1575
+ const RepresentationType$1 = 'CarePlanBulkOutputRepresentation';
1576
+ function keyBuilder$2(luvio, config) {
1577
+ return keyPrefix + '::' + RepresentationType$1 + ':' + config.id;
1578
+ }
1579
+ function keyBuilderFromType(luvio, object) {
1580
+ const keyParams = {
1581
+ id: object.statusCode
1582
+ };
1583
+ return keyBuilder$2(luvio, keyParams);
1584
+ }
1585
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
1586
+ return input;
1587
+ }
1588
+ const select$5 = function CarePlanBulkOutputRepresentationSelect() {
1589
+ return {
1590
+ kind: 'Fragment',
1591
+ version: VERSION$3,
1592
+ private: [],
1593
+ opaque: true
1594
+ };
1595
+ };
1596
+ function equals$3(existing, incoming) {
1597
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
1598
+ return false;
1599
+ }
1600
+ return true;
1601
+ }
1602
+ function deepFreeze(input) {
1603
+ ObjectFreeze(input);
1604
+ }
1605
+ const ingest$1 = function CarePlanBulkOutputRepresentationIngest(input, path, luvio, store, timestamp) {
1606
+ if (process.env.NODE_ENV !== 'production') {
1607
+ const validateError = validate$3(input);
1608
+ if (validateError !== null) {
1609
+ throw validateError;
1610
+ }
1611
+ }
1612
+ const key = keyBuilderFromType(luvio, input);
1613
+ const existingRecord = store.readEntry(key);
1614
+ const ttlToUse = TTL;
1615
+ let incomingRecord = normalize$1(input, store.readEntry(key), {
1616
+ fullPath: key,
1617
+ parent: path.parent,
1618
+ propertyName: path.propertyName,
1619
+ ttl: ttlToUse
1620
+ });
1621
+ deepFreeze(input);
1622
+ if (existingRecord === undefined || equals$3(existingRecord, incomingRecord) === false) {
1623
+ luvio.storePublish(key, incomingRecord);
1624
+ }
1625
+ {
1626
+ const storeMetadataParams = {
1627
+ ttl: ttlToUse,
1628
+ namespace: "education",
1629
+ version: VERSION$3,
1630
+ representationName: RepresentationType$1,
1631
+ };
1632
+ luvio.publishStoreMetadata(key, storeMetadataParams);
1633
+ }
1634
+ return createLink(key);
1635
+ };
1636
+ function getTypeCacheKeys$1(luvio, input, fullPathFactory) {
1637
+ const rootKeySet = new StoreKeyMap();
1638
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
1639
+ const rootKey = keyBuilderFromType(luvio, input);
1640
+ rootKeySet.set(rootKey, {
1641
+ namespace: keyPrefix,
1642
+ representationName: RepresentationType$1,
1643
+ mergeable: false
1644
+ });
1645
+ return rootKeySet;
1646
1646
  }
1647
1647
 
1648
- function select$4(luvio, params) {
1649
- return select$5();
1650
- }
1651
- function getResponseCacheKeys$1(luvio, resourceParams, response) {
1652
- return getTypeCacheKeys$1(luvio, response);
1653
- }
1654
- function ingestSuccess$1(luvio, resourceParams, response) {
1655
- const { body } = response;
1656
- const key = keyBuilderFromType(luvio, body);
1657
- luvio.storeIngest(key, ingest$1, body);
1658
- const snapshot = luvio.storeLookup({
1659
- recordId: key,
1660
- node: select$4(),
1661
- variables: {},
1662
- });
1663
- if (process.env.NODE_ENV !== 'production') {
1664
- if (snapshot.state !== 'Fulfilled') {
1665
- throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1666
- }
1667
- }
1668
- return snapshot;
1669
- }
1670
- function createResourceRequest$1(config) {
1671
- const headers = {};
1672
- return {
1673
- baseUri: '/services/data/v58.0',
1674
- basePath: '/connect/education/careplan/bulk',
1675
- method: 'post',
1676
- body: config.body,
1677
- urlParams: {},
1678
- queryParams: {},
1679
- headers,
1680
- priority: 'normal',
1681
- };
1648
+ function select$4(luvio, params) {
1649
+ return select$5();
1650
+ }
1651
+ function getResponseCacheKeys$1(luvio, resourceParams, response) {
1652
+ return getTypeCacheKeys$1(luvio, response);
1653
+ }
1654
+ function ingestSuccess$1(luvio, resourceParams, response) {
1655
+ const { body } = response;
1656
+ const key = keyBuilderFromType(luvio, body);
1657
+ luvio.storeIngest(key, ingest$1, body);
1658
+ const snapshot = luvio.storeLookup({
1659
+ recordId: key,
1660
+ node: select$4(),
1661
+ variables: {},
1662
+ });
1663
+ if (process.env.NODE_ENV !== 'production') {
1664
+ if (snapshot.state !== 'Fulfilled') {
1665
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
1666
+ }
1667
+ }
1668
+ return snapshot;
1669
+ }
1670
+ function createResourceRequest$1(config) {
1671
+ const headers = {};
1672
+ return {
1673
+ baseUri: '/services/data/v58.0',
1674
+ basePath: '/connect/education/careplan/bulk',
1675
+ method: 'post',
1676
+ body: config.body,
1677
+ urlParams: {},
1678
+ queryParams: {},
1679
+ headers,
1680
+ priority: 'normal',
1681
+ };
1682
1682
  }
1683
1683
 
1684
- const createCarePlans_ConfigPropertyNames = {
1685
- displayName: 'createCarePlans',
1686
- parameters: {
1687
- required: ['carePlanBulkRecord'],
1688
- optional: []
1689
- }
1690
- };
1691
- function createResourceParams$1(config) {
1692
- const resourceParams = {
1693
- body: {
1694
- carePlanBulkRecord: config.carePlanBulkRecord
1695
- }
1696
- };
1697
- return resourceParams;
1698
- }
1699
- function typeCheckConfig$1(untrustedConfig) {
1700
- const config = {};
1701
- const untrustedConfig_carePlanBulkRecord = untrustedConfig.carePlanBulkRecord;
1702
- const referenceCarePlanBulkInputRepresentationValidationError = validate$4(untrustedConfig_carePlanBulkRecord);
1703
- if (referenceCarePlanBulkInputRepresentationValidationError === null) {
1704
- config.carePlanBulkRecord = untrustedConfig_carePlanBulkRecord;
1705
- }
1706
- return config;
1707
- }
1708
- function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1709
- if (!untrustedIsObject(untrustedConfig)) {
1710
- return null;
1711
- }
1712
- if (process.env.NODE_ENV !== 'production') {
1713
- validateConfig(untrustedConfig, configPropertyNames);
1714
- }
1715
- const config = typeCheckConfig$1(untrustedConfig);
1716
- if (!areRequiredParametersPresent(config, configPropertyNames)) {
1717
- return null;
1718
- }
1719
- return config;
1720
- }
1721
- function buildNetworkSnapshot$1(luvio, config, options) {
1722
- const resourceParams = createResourceParams$1(config);
1723
- const request = createResourceRequest$1(resourceParams);
1724
- return luvio.dispatchResourceRequest(request, options)
1725
- .then((response) => {
1726
- return luvio.handleSuccessResponse(() => {
1727
- const snapshot = ingestSuccess$1(luvio, resourceParams, response);
1728
- return luvio.storeBroadcast().then(() => snapshot);
1729
- }, () => getResponseCacheKeys$1(luvio, resourceParams, response.body));
1730
- }, (response) => {
1731
- deepFreeze$1(response);
1732
- throw response;
1733
- });
1734
- }
1735
- const createCarePlansAdapterFactory = (luvio) => {
1736
- return function createCarePlans(untrustedConfig) {
1737
- const config = validateAdapterConfig$1(untrustedConfig, createCarePlans_ConfigPropertyNames);
1738
- // Invalid or incomplete config
1739
- if (config === null) {
1740
- throw new Error('Invalid config for "createCarePlans"');
1741
- }
1742
- return buildNetworkSnapshot$1(luvio, config);
1743
- };
1684
+ const createCarePlans_ConfigPropertyNames = {
1685
+ displayName: 'createCarePlans',
1686
+ parameters: {
1687
+ required: ['carePlanBulkRecord'],
1688
+ optional: []
1689
+ }
1690
+ };
1691
+ function createResourceParams$1(config) {
1692
+ const resourceParams = {
1693
+ body: {
1694
+ carePlanBulkRecord: config.carePlanBulkRecord
1695
+ }
1696
+ };
1697
+ return resourceParams;
1698
+ }
1699
+ function typeCheckConfig$1(untrustedConfig) {
1700
+ const config = {};
1701
+ const untrustedConfig_carePlanBulkRecord = untrustedConfig.carePlanBulkRecord;
1702
+ const referenceCarePlanBulkInputRepresentationValidationError = validate$4(untrustedConfig_carePlanBulkRecord);
1703
+ if (referenceCarePlanBulkInputRepresentationValidationError === null) {
1704
+ config.carePlanBulkRecord = untrustedConfig_carePlanBulkRecord;
1705
+ }
1706
+ return config;
1707
+ }
1708
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
1709
+ if (!untrustedIsObject(untrustedConfig)) {
1710
+ return null;
1711
+ }
1712
+ if (process.env.NODE_ENV !== 'production') {
1713
+ validateConfig(untrustedConfig, configPropertyNames);
1714
+ }
1715
+ const config = typeCheckConfig$1(untrustedConfig);
1716
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
1717
+ return null;
1718
+ }
1719
+ return config;
1720
+ }
1721
+ function buildNetworkSnapshot$1(luvio, config, options) {
1722
+ const resourceParams = createResourceParams$1(config);
1723
+ const request = createResourceRequest$1(resourceParams);
1724
+ return luvio.dispatchResourceRequest(request, options)
1725
+ .then((response) => {
1726
+ return luvio.handleSuccessResponse(() => {
1727
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response);
1728
+ return luvio.storeBroadcast().then(() => snapshot);
1729
+ }, () => getResponseCacheKeys$1(luvio, resourceParams, response.body));
1730
+ }, (response) => {
1731
+ deepFreeze$1(response);
1732
+ throw response;
1733
+ });
1734
+ }
1735
+ const createCarePlansAdapterFactory = (luvio) => {
1736
+ return function createCarePlans(untrustedConfig) {
1737
+ const config = validateAdapterConfig$1(untrustedConfig, createCarePlans_ConfigPropertyNames);
1738
+ // Invalid or incomplete config
1739
+ if (config === null) {
1740
+ throw new Error('Invalid config for "createCarePlans"');
1741
+ }
1742
+ return buildNetworkSnapshot$1(luvio, config);
1743
+ };
1744
1744
  };
1745
1745
 
1746
- const VERSION$2 = "256a3344cb09454a859ca2f0645eb0bc";
1747
- function validate$2(obj, path = 'AvailableTeam') {
1748
- const v_error = (() => {
1749
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1750
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1751
- }
1752
- if (obj.canSelfSchedule !== undefined) {
1753
- const obj_canSelfSchedule = obj.canSelfSchedule;
1754
- const path_canSelfSchedule = path + '.canSelfSchedule';
1755
- if (typeof obj_canSelfSchedule !== 'boolean') {
1756
- return new TypeError('Expected "boolean" but received "' + typeof obj_canSelfSchedule + '" (at "' + path_canSelfSchedule + '")');
1757
- }
1758
- }
1759
- if (obj.caseId !== undefined) {
1760
- const obj_caseId = obj.caseId;
1761
- const path_caseId = path + '.caseId';
1762
- if (typeof obj_caseId !== 'string') {
1763
- return new TypeError('Expected "string" but received "' + typeof obj_caseId + '" (at "' + path_caseId + '")');
1764
- }
1765
- }
1766
- if (obj.caseRecordTypeName !== undefined) {
1767
- const obj_caseRecordTypeName = obj.caseRecordTypeName;
1768
- const path_caseRecordTypeName = path + '.caseRecordTypeName';
1769
- if (typeof obj_caseRecordTypeName !== 'string') {
1770
- return new TypeError('Expected "string" but received "' + typeof obj_caseRecordTypeName + '" (at "' + path_caseRecordTypeName + '")');
1771
- }
1772
- }
1773
- if (obj.members !== undefined) {
1774
- const obj_members = obj.members;
1775
- const path_members = path + '.members';
1776
- if (typeof obj_members !== 'object' || ArrayIsArray(obj_members) || obj_members === null) {
1777
- return new TypeError('Expected "object" but received "' + typeof obj_members + '" (at "' + path_members + '")');
1778
- }
1779
- const obj_members_keys = ObjectKeys(obj_members);
1780
- for (let i = 0; i < obj_members_keys.length; i++) {
1781
- const key = obj_members_keys[i];
1782
- const obj_members_prop = obj_members[key];
1783
- const path_members_prop = path_members + '["' + key + '"]';
1784
- if (obj_members_prop === undefined) {
1785
- return new TypeError('Expected "defined" but received "' + typeof obj_members_prop + '" (at "' + path_members_prop + '")');
1786
- }
1787
- }
1788
- }
1789
- if (obj.name !== undefined) {
1790
- const obj_name = obj.name;
1791
- const path_name = path + '.name';
1792
- if (typeof obj_name !== 'string') {
1793
- return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
1794
- }
1795
- }
1796
- if (obj.teamId !== undefined) {
1797
- const obj_teamId = obj.teamId;
1798
- const path_teamId = path + '.teamId';
1799
- if (typeof obj_teamId !== 'string') {
1800
- return new TypeError('Expected "string" but received "' + typeof obj_teamId + '" (at "' + path_teamId + '")');
1801
- }
1802
- }
1803
- })();
1804
- return v_error === undefined ? null : v_error;
1805
- }
1806
- const select$3 = function AvailableTeamSelect() {
1807
- return {
1808
- kind: 'Fragment',
1809
- version: VERSION$2,
1810
- private: [],
1811
- selections: [
1812
- {
1813
- name: 'canSelfSchedule',
1814
- kind: 'Scalar',
1815
- required: false
1816
- },
1817
- {
1818
- name: 'caseId',
1819
- kind: 'Scalar',
1820
- required: false
1821
- },
1822
- {
1823
- name: 'caseRecordTypeName',
1824
- kind: 'Scalar',
1825
- required: false
1826
- },
1827
- {
1828
- name: 'members',
1829
- kind: 'Object',
1830
- // any
1831
- },
1832
- {
1833
- name: 'name',
1834
- kind: 'Scalar',
1835
- required: false
1836
- },
1837
- {
1838
- name: 'teamId',
1839
- kind: 'Scalar',
1840
- required: false
1841
- }
1842
- ]
1843
- };
1844
- };
1845
- function equals$2(existing, incoming) {
1846
- const existing_canSelfSchedule = existing.canSelfSchedule;
1847
- const incoming_canSelfSchedule = incoming.canSelfSchedule;
1848
- // if at least one of these optionals is defined
1849
- if (existing_canSelfSchedule !== undefined || incoming_canSelfSchedule !== undefined) {
1850
- // if one of these is not defined we know the other is defined and therefore
1851
- // not equal
1852
- if (existing_canSelfSchedule === undefined || incoming_canSelfSchedule === undefined) {
1853
- return false;
1854
- }
1855
- if (!(existing_canSelfSchedule === incoming_canSelfSchedule)) {
1856
- return false;
1857
- }
1858
- }
1859
- const existing_caseId = existing.caseId;
1860
- const incoming_caseId = incoming.caseId;
1861
- // if at least one of these optionals is defined
1862
- if (existing_caseId !== undefined || incoming_caseId !== undefined) {
1863
- // if one of these is not defined we know the other is defined and therefore
1864
- // not equal
1865
- if (existing_caseId === undefined || incoming_caseId === undefined) {
1866
- return false;
1867
- }
1868
- if (!(existing_caseId === incoming_caseId)) {
1869
- return false;
1870
- }
1871
- }
1872
- const existing_caseRecordTypeName = existing.caseRecordTypeName;
1873
- const incoming_caseRecordTypeName = incoming.caseRecordTypeName;
1874
- // if at least one of these optionals is defined
1875
- if (existing_caseRecordTypeName !== undefined || incoming_caseRecordTypeName !== undefined) {
1876
- // if one of these is not defined we know the other is defined and therefore
1877
- // not equal
1878
- if (existing_caseRecordTypeName === undefined || incoming_caseRecordTypeName === undefined) {
1879
- return false;
1880
- }
1881
- if (!(existing_caseRecordTypeName === incoming_caseRecordTypeName)) {
1882
- return false;
1883
- }
1884
- }
1885
- const existing_name = existing.name;
1886
- const incoming_name = incoming.name;
1887
- // if at least one of these optionals is defined
1888
- if (existing_name !== undefined || incoming_name !== undefined) {
1889
- // if one of these is not defined we know the other is defined and therefore
1890
- // not equal
1891
- if (existing_name === undefined || incoming_name === undefined) {
1892
- return false;
1893
- }
1894
- if (!(existing_name === incoming_name)) {
1895
- return false;
1896
- }
1897
- }
1898
- const existing_teamId = existing.teamId;
1899
- const incoming_teamId = incoming.teamId;
1900
- // if at least one of these optionals is defined
1901
- if (existing_teamId !== undefined || incoming_teamId !== undefined) {
1902
- // if one of these is not defined we know the other is defined and therefore
1903
- // not equal
1904
- if (existing_teamId === undefined || incoming_teamId === undefined) {
1905
- return false;
1906
- }
1907
- if (!(existing_teamId === incoming_teamId)) {
1908
- return false;
1909
- }
1910
- }
1911
- const existing_members = existing.members;
1912
- const incoming_members = incoming.members;
1913
- // if at least one of these optionals is defined
1914
- if (existing_members !== undefined || incoming_members !== undefined) {
1915
- // if one of these is not defined we know the other is defined and therefore
1916
- // not equal
1917
- if (existing_members === undefined || incoming_members === undefined) {
1918
- return false;
1919
- }
1920
- const equals_members_props = equalsObject(existing_members, incoming_members, (existing_members_prop, incoming_members_prop) => {
1921
- if (JSONStringify(incoming_members_prop) !== JSONStringify(existing_members_prop)) {
1922
- return false;
1923
- }
1924
- });
1925
- if (equals_members_props === false) {
1926
- return false;
1927
- }
1928
- }
1929
- return true;
1746
+ const VERSION$2 = "256a3344cb09454a859ca2f0645eb0bc";
1747
+ function validate$2(obj, path = 'AvailableTeam') {
1748
+ const v_error = (() => {
1749
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1750
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1751
+ }
1752
+ if (obj.canSelfSchedule !== undefined) {
1753
+ const obj_canSelfSchedule = obj.canSelfSchedule;
1754
+ const path_canSelfSchedule = path + '.canSelfSchedule';
1755
+ if (typeof obj_canSelfSchedule !== 'boolean') {
1756
+ return new TypeError('Expected "boolean" but received "' + typeof obj_canSelfSchedule + '" (at "' + path_canSelfSchedule + '")');
1757
+ }
1758
+ }
1759
+ if (obj.caseId !== undefined) {
1760
+ const obj_caseId = obj.caseId;
1761
+ const path_caseId = path + '.caseId';
1762
+ if (typeof obj_caseId !== 'string') {
1763
+ return new TypeError('Expected "string" but received "' + typeof obj_caseId + '" (at "' + path_caseId + '")');
1764
+ }
1765
+ }
1766
+ if (obj.caseRecordTypeName !== undefined) {
1767
+ const obj_caseRecordTypeName = obj.caseRecordTypeName;
1768
+ const path_caseRecordTypeName = path + '.caseRecordTypeName';
1769
+ if (typeof obj_caseRecordTypeName !== 'string') {
1770
+ return new TypeError('Expected "string" but received "' + typeof obj_caseRecordTypeName + '" (at "' + path_caseRecordTypeName + '")');
1771
+ }
1772
+ }
1773
+ if (obj.members !== undefined) {
1774
+ const obj_members = obj.members;
1775
+ const path_members = path + '.members';
1776
+ if (typeof obj_members !== 'object' || ArrayIsArray(obj_members) || obj_members === null) {
1777
+ return new TypeError('Expected "object" but received "' + typeof obj_members + '" (at "' + path_members + '")');
1778
+ }
1779
+ const obj_members_keys = ObjectKeys(obj_members);
1780
+ for (let i = 0; i < obj_members_keys.length; i++) {
1781
+ const key = obj_members_keys[i];
1782
+ const obj_members_prop = obj_members[key];
1783
+ const path_members_prop = path_members + '["' + key + '"]';
1784
+ if (obj_members_prop === undefined) {
1785
+ return new TypeError('Expected "defined" but received "' + typeof obj_members_prop + '" (at "' + path_members_prop + '")');
1786
+ }
1787
+ }
1788
+ }
1789
+ if (obj.name !== undefined) {
1790
+ const obj_name = obj.name;
1791
+ const path_name = path + '.name';
1792
+ if (typeof obj_name !== 'string') {
1793
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
1794
+ }
1795
+ }
1796
+ if (obj.teamId !== undefined) {
1797
+ const obj_teamId = obj.teamId;
1798
+ const path_teamId = path + '.teamId';
1799
+ if (typeof obj_teamId !== 'string') {
1800
+ return new TypeError('Expected "string" but received "' + typeof obj_teamId + '" (at "' + path_teamId + '")');
1801
+ }
1802
+ }
1803
+ })();
1804
+ return v_error === undefined ? null : v_error;
1805
+ }
1806
+ const select$3 = function AvailableTeamSelect() {
1807
+ return {
1808
+ kind: 'Fragment',
1809
+ version: VERSION$2,
1810
+ private: [],
1811
+ selections: [
1812
+ {
1813
+ name: 'canSelfSchedule',
1814
+ kind: 'Scalar',
1815
+ required: false
1816
+ },
1817
+ {
1818
+ name: 'caseId',
1819
+ kind: 'Scalar',
1820
+ required: false
1821
+ },
1822
+ {
1823
+ name: 'caseRecordTypeName',
1824
+ kind: 'Scalar',
1825
+ required: false
1826
+ },
1827
+ {
1828
+ name: 'members',
1829
+ kind: 'Object',
1830
+ // any
1831
+ },
1832
+ {
1833
+ name: 'name',
1834
+ kind: 'Scalar',
1835
+ required: false
1836
+ },
1837
+ {
1838
+ name: 'teamId',
1839
+ kind: 'Scalar',
1840
+ required: false
1841
+ }
1842
+ ]
1843
+ };
1844
+ };
1845
+ function equals$2(existing, incoming) {
1846
+ const existing_canSelfSchedule = existing.canSelfSchedule;
1847
+ const incoming_canSelfSchedule = incoming.canSelfSchedule;
1848
+ // if at least one of these optionals is defined
1849
+ if (existing_canSelfSchedule !== undefined || incoming_canSelfSchedule !== undefined) {
1850
+ // if one of these is not defined we know the other is defined and therefore
1851
+ // not equal
1852
+ if (existing_canSelfSchedule === undefined || incoming_canSelfSchedule === undefined) {
1853
+ return false;
1854
+ }
1855
+ if (!(existing_canSelfSchedule === incoming_canSelfSchedule)) {
1856
+ return false;
1857
+ }
1858
+ }
1859
+ const existing_caseId = existing.caseId;
1860
+ const incoming_caseId = incoming.caseId;
1861
+ // if at least one of these optionals is defined
1862
+ if (existing_caseId !== undefined || incoming_caseId !== undefined) {
1863
+ // if one of these is not defined we know the other is defined and therefore
1864
+ // not equal
1865
+ if (existing_caseId === undefined || incoming_caseId === undefined) {
1866
+ return false;
1867
+ }
1868
+ if (!(existing_caseId === incoming_caseId)) {
1869
+ return false;
1870
+ }
1871
+ }
1872
+ const existing_caseRecordTypeName = existing.caseRecordTypeName;
1873
+ const incoming_caseRecordTypeName = incoming.caseRecordTypeName;
1874
+ // if at least one of these optionals is defined
1875
+ if (existing_caseRecordTypeName !== undefined || incoming_caseRecordTypeName !== undefined) {
1876
+ // if one of these is not defined we know the other is defined and therefore
1877
+ // not equal
1878
+ if (existing_caseRecordTypeName === undefined || incoming_caseRecordTypeName === undefined) {
1879
+ return false;
1880
+ }
1881
+ if (!(existing_caseRecordTypeName === incoming_caseRecordTypeName)) {
1882
+ return false;
1883
+ }
1884
+ }
1885
+ const existing_name = existing.name;
1886
+ const incoming_name = incoming.name;
1887
+ // if at least one of these optionals is defined
1888
+ if (existing_name !== undefined || incoming_name !== undefined) {
1889
+ // if one of these is not defined we know the other is defined and therefore
1890
+ // not equal
1891
+ if (existing_name === undefined || incoming_name === undefined) {
1892
+ return false;
1893
+ }
1894
+ if (!(existing_name === incoming_name)) {
1895
+ return false;
1896
+ }
1897
+ }
1898
+ const existing_teamId = existing.teamId;
1899
+ const incoming_teamId = incoming.teamId;
1900
+ // if at least one of these optionals is defined
1901
+ if (existing_teamId !== undefined || incoming_teamId !== undefined) {
1902
+ // if one of these is not defined we know the other is defined and therefore
1903
+ // not equal
1904
+ if (existing_teamId === undefined || incoming_teamId === undefined) {
1905
+ return false;
1906
+ }
1907
+ if (!(existing_teamId === incoming_teamId)) {
1908
+ return false;
1909
+ }
1910
+ }
1911
+ const existing_members = existing.members;
1912
+ const incoming_members = incoming.members;
1913
+ // if at least one of these optionals is defined
1914
+ if (existing_members !== undefined || incoming_members !== undefined) {
1915
+ // if one of these is not defined we know the other is defined and therefore
1916
+ // not equal
1917
+ if (existing_members === undefined || incoming_members === undefined) {
1918
+ return false;
1919
+ }
1920
+ const equals_members_props = equalsObject(existing_members, incoming_members, (existing_members_prop, incoming_members_prop) => {
1921
+ if (JSONStringify(incoming_members_prop) !== JSONStringify(existing_members_prop)) {
1922
+ return false;
1923
+ }
1924
+ });
1925
+ if (equals_members_props === false) {
1926
+ return false;
1927
+ }
1928
+ }
1929
+ return true;
1930
1930
  }
1931
1931
 
1932
- const VERSION$1 = "4fc48796f6987d3512fb81d3baf6479c";
1933
- function validate$1(obj, path = 'GetSuccessTeamResult') {
1934
- const v_error = (() => {
1935
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1936
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1937
- }
1938
- const obj_assignedStaff = obj.assignedStaff;
1939
- const path_assignedStaff = path + '.assignedStaff';
1940
- if (typeof obj_assignedStaff !== 'object' || ArrayIsArray(obj_assignedStaff) || obj_assignedStaff === null) {
1941
- return new TypeError('Expected "object" but received "' + typeof obj_assignedStaff + '" (at "' + path_assignedStaff + '")');
1942
- }
1943
- const obj_assignedStaff_keys = ObjectKeys(obj_assignedStaff);
1944
- for (let i = 0; i < obj_assignedStaff_keys.length; i++) {
1945
- const key = obj_assignedStaff_keys[i];
1946
- const obj_assignedStaff_prop = obj_assignedStaff[key];
1947
- const path_assignedStaff_prop = path_assignedStaff + '["' + key + '"]';
1948
- if (obj_assignedStaff_prop === undefined) {
1949
- return new TypeError('Expected "defined" but received "' + typeof obj_assignedStaff_prop + '" (at "' + path_assignedStaff_prop + '")');
1950
- }
1951
- }
1952
- const obj_assignedTeams = obj.assignedTeams;
1953
- const path_assignedTeams = path + '.assignedTeams';
1954
- if (!ArrayIsArray(obj_assignedTeams)) {
1955
- return new TypeError('Expected "array" but received "' + typeof obj_assignedTeams + '" (at "' + path_assignedTeams + '")');
1956
- }
1957
- for (let i = 0; i < obj_assignedTeams.length; i++) {
1958
- const obj_assignedTeams_item = obj_assignedTeams[i];
1959
- const path_assignedTeams_item = path_assignedTeams + '[' + i + ']';
1960
- const referencepath_assignedTeams_itemValidationError = validate$2(obj_assignedTeams_item, path_assignedTeams_item);
1961
- if (referencepath_assignedTeams_itemValidationError !== null) {
1962
- let message = 'Object doesn\'t match AvailableTeam (at "' + path_assignedTeams_item + '")\n';
1963
- message += referencepath_assignedTeams_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1964
- return new TypeError(message);
1965
- }
1966
- }
1967
- const obj_unassignedTeams = obj.unassignedTeams;
1968
- const path_unassignedTeams = path + '.unassignedTeams';
1969
- if (!ArrayIsArray(obj_unassignedTeams)) {
1970
- return new TypeError('Expected "array" but received "' + typeof obj_unassignedTeams + '" (at "' + path_unassignedTeams + '")');
1971
- }
1972
- for (let i = 0; i < obj_unassignedTeams.length; i++) {
1973
- const obj_unassignedTeams_item = obj_unassignedTeams[i];
1974
- const path_unassignedTeams_item = path_unassignedTeams + '[' + i + ']';
1975
- const referencepath_unassignedTeams_itemValidationError = validate$2(obj_unassignedTeams_item, path_unassignedTeams_item);
1976
- if (referencepath_unassignedTeams_itemValidationError !== null) {
1977
- let message = 'Object doesn\'t match AvailableTeam (at "' + path_unassignedTeams_item + '")\n';
1978
- message += referencepath_unassignedTeams_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1979
- return new TypeError(message);
1980
- }
1981
- }
1982
- })();
1983
- return v_error === undefined ? null : v_error;
1984
- }
1985
- const select$2 = function GetSuccessTeamResultSelect() {
1986
- const { selections: AvailableTeam__selections, opaque: AvailableTeam__opaque, } = select$3();
1987
- return {
1988
- kind: 'Fragment',
1989
- version: VERSION$1,
1990
- private: [],
1991
- selections: [
1992
- {
1993
- name: 'assignedStaff',
1994
- kind: 'Object',
1995
- // any
1996
- },
1997
- {
1998
- name: 'assignedTeams',
1999
- kind: 'Object',
2000
- plural: true,
2001
- selections: AvailableTeam__selections
2002
- },
2003
- {
2004
- name: 'unassignedTeams',
2005
- kind: 'Object',
2006
- plural: true,
2007
- selections: AvailableTeam__selections
2008
- }
2009
- ]
2010
- };
2011
- };
2012
- function equals$1(existing, incoming) {
2013
- const existing_assignedStaff = existing.assignedStaff;
2014
- const incoming_assignedStaff = incoming.assignedStaff;
2015
- const equals_assignedStaff_props = equalsObject(existing_assignedStaff, incoming_assignedStaff, (existing_assignedStaff_prop, incoming_assignedStaff_prop) => {
2016
- if (JSONStringify(incoming_assignedStaff_prop) !== JSONStringify(existing_assignedStaff_prop)) {
2017
- return false;
2018
- }
2019
- });
2020
- if (equals_assignedStaff_props === false) {
2021
- return false;
2022
- }
2023
- const existing_assignedTeams = existing.assignedTeams;
2024
- const incoming_assignedTeams = incoming.assignedTeams;
2025
- const equals_assignedTeams_items = equalsArray(existing_assignedTeams, incoming_assignedTeams, (existing_assignedTeams_item, incoming_assignedTeams_item) => {
2026
- if (!(equals$2(existing_assignedTeams_item, incoming_assignedTeams_item))) {
2027
- return false;
2028
- }
2029
- });
2030
- if (equals_assignedTeams_items === false) {
2031
- return false;
2032
- }
2033
- const existing_unassignedTeams = existing.unassignedTeams;
2034
- const incoming_unassignedTeams = incoming.unassignedTeams;
2035
- const equals_unassignedTeams_items = equalsArray(existing_unassignedTeams, incoming_unassignedTeams, (existing_unassignedTeams_item, incoming_unassignedTeams_item) => {
2036
- if (!(equals$2(existing_unassignedTeams_item, incoming_unassignedTeams_item))) {
2037
- return false;
2038
- }
2039
- });
2040
- if (equals_unassignedTeams_items === false) {
2041
- return false;
2042
- }
2043
- return true;
1932
+ const VERSION$1 = "4fc48796f6987d3512fb81d3baf6479c";
1933
+ function validate$1(obj, path = 'GetSuccessTeamResult') {
1934
+ const v_error = (() => {
1935
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
1936
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
1937
+ }
1938
+ const obj_assignedStaff = obj.assignedStaff;
1939
+ const path_assignedStaff = path + '.assignedStaff';
1940
+ if (typeof obj_assignedStaff !== 'object' || ArrayIsArray(obj_assignedStaff) || obj_assignedStaff === null) {
1941
+ return new TypeError('Expected "object" but received "' + typeof obj_assignedStaff + '" (at "' + path_assignedStaff + '")');
1942
+ }
1943
+ const obj_assignedStaff_keys = ObjectKeys(obj_assignedStaff);
1944
+ for (let i = 0; i < obj_assignedStaff_keys.length; i++) {
1945
+ const key = obj_assignedStaff_keys[i];
1946
+ const obj_assignedStaff_prop = obj_assignedStaff[key];
1947
+ const path_assignedStaff_prop = path_assignedStaff + '["' + key + '"]';
1948
+ if (obj_assignedStaff_prop === undefined) {
1949
+ return new TypeError('Expected "defined" but received "' + typeof obj_assignedStaff_prop + '" (at "' + path_assignedStaff_prop + '")');
1950
+ }
1951
+ }
1952
+ const obj_assignedTeams = obj.assignedTeams;
1953
+ const path_assignedTeams = path + '.assignedTeams';
1954
+ if (!ArrayIsArray(obj_assignedTeams)) {
1955
+ return new TypeError('Expected "array" but received "' + typeof obj_assignedTeams + '" (at "' + path_assignedTeams + '")');
1956
+ }
1957
+ for (let i = 0; i < obj_assignedTeams.length; i++) {
1958
+ const obj_assignedTeams_item = obj_assignedTeams[i];
1959
+ const path_assignedTeams_item = path_assignedTeams + '[' + i + ']';
1960
+ const referencepath_assignedTeams_itemValidationError = validate$2(obj_assignedTeams_item, path_assignedTeams_item);
1961
+ if (referencepath_assignedTeams_itemValidationError !== null) {
1962
+ let message = 'Object doesn\'t match AvailableTeam (at "' + path_assignedTeams_item + '")\n';
1963
+ message += referencepath_assignedTeams_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1964
+ return new TypeError(message);
1965
+ }
1966
+ }
1967
+ const obj_unassignedTeams = obj.unassignedTeams;
1968
+ const path_unassignedTeams = path + '.unassignedTeams';
1969
+ if (!ArrayIsArray(obj_unassignedTeams)) {
1970
+ return new TypeError('Expected "array" but received "' + typeof obj_unassignedTeams + '" (at "' + path_unassignedTeams + '")');
1971
+ }
1972
+ for (let i = 0; i < obj_unassignedTeams.length; i++) {
1973
+ const obj_unassignedTeams_item = obj_unassignedTeams[i];
1974
+ const path_unassignedTeams_item = path_unassignedTeams + '[' + i + ']';
1975
+ const referencepath_unassignedTeams_itemValidationError = validate$2(obj_unassignedTeams_item, path_unassignedTeams_item);
1976
+ if (referencepath_unassignedTeams_itemValidationError !== null) {
1977
+ let message = 'Object doesn\'t match AvailableTeam (at "' + path_unassignedTeams_item + '")\n';
1978
+ message += referencepath_unassignedTeams_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
1979
+ return new TypeError(message);
1980
+ }
1981
+ }
1982
+ })();
1983
+ return v_error === undefined ? null : v_error;
1984
+ }
1985
+ const select$2 = function GetSuccessTeamResultSelect() {
1986
+ const { selections: AvailableTeam__selections, opaque: AvailableTeam__opaque, } = select$3();
1987
+ return {
1988
+ kind: 'Fragment',
1989
+ version: VERSION$1,
1990
+ private: [],
1991
+ selections: [
1992
+ {
1993
+ name: 'assignedStaff',
1994
+ kind: 'Object',
1995
+ // any
1996
+ },
1997
+ {
1998
+ name: 'assignedTeams',
1999
+ kind: 'Object',
2000
+ plural: true,
2001
+ selections: AvailableTeam__selections
2002
+ },
2003
+ {
2004
+ name: 'unassignedTeams',
2005
+ kind: 'Object',
2006
+ plural: true,
2007
+ selections: AvailableTeam__selections
2008
+ }
2009
+ ]
2010
+ };
2011
+ };
2012
+ function equals$1(existing, incoming) {
2013
+ const existing_assignedStaff = existing.assignedStaff;
2014
+ const incoming_assignedStaff = incoming.assignedStaff;
2015
+ const equals_assignedStaff_props = equalsObject(existing_assignedStaff, incoming_assignedStaff, (existing_assignedStaff_prop, incoming_assignedStaff_prop) => {
2016
+ if (JSONStringify(incoming_assignedStaff_prop) !== JSONStringify(existing_assignedStaff_prop)) {
2017
+ return false;
2018
+ }
2019
+ });
2020
+ if (equals_assignedStaff_props === false) {
2021
+ return false;
2022
+ }
2023
+ const existing_assignedTeams = existing.assignedTeams;
2024
+ const incoming_assignedTeams = incoming.assignedTeams;
2025
+ const equals_assignedTeams_items = equalsArray(existing_assignedTeams, incoming_assignedTeams, (existing_assignedTeams_item, incoming_assignedTeams_item) => {
2026
+ if (!(equals$2(existing_assignedTeams_item, incoming_assignedTeams_item))) {
2027
+ return false;
2028
+ }
2029
+ });
2030
+ if (equals_assignedTeams_items === false) {
2031
+ return false;
2032
+ }
2033
+ const existing_unassignedTeams = existing.unassignedTeams;
2034
+ const incoming_unassignedTeams = incoming.unassignedTeams;
2035
+ const equals_unassignedTeams_items = equalsArray(existing_unassignedTeams, incoming_unassignedTeams, (existing_unassignedTeams_item, incoming_unassignedTeams_item) => {
2036
+ if (!(equals$2(existing_unassignedTeams_item, incoming_unassignedTeams_item))) {
2037
+ return false;
2038
+ }
2039
+ });
2040
+ if (equals_unassignedTeams_items === false) {
2041
+ return false;
2042
+ }
2043
+ return true;
2044
2044
  }
2045
2045
 
2046
- const VERSION = "bb85bc85ab5fe2cd81d05e073d1bccf5";
2047
- function validate(obj, path = 'SuccessTeamOutputRepresentation') {
2048
- const v_error = (() => {
2049
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2050
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2051
- }
2052
- const obj_result = obj.result;
2053
- const path_result = path + '.result';
2054
- const referencepath_resultValidationError = validate$1(obj_result, path_result);
2055
- if (referencepath_resultValidationError !== null) {
2056
- let message = 'Object doesn\'t match GetSuccessTeamResult (at "' + path_result + '")\n';
2057
- message += referencepath_resultValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2058
- return new TypeError(message);
2059
- }
2060
- })();
2061
- return v_error === undefined ? null : v_error;
2062
- }
2063
- const RepresentationType = 'SuccessTeamOutputRepresentation';
2064
- function normalize(input, existing, path, luvio, store, timestamp) {
2065
- return input;
2066
- }
2067
- const select$1 = function SuccessTeamOutputRepresentationSelect() {
2068
- const { selections: GetSuccessTeamResult__selections, opaque: GetSuccessTeamResult__opaque, } = select$2();
2069
- return {
2070
- kind: 'Fragment',
2071
- version: VERSION,
2072
- private: [],
2073
- selections: [
2074
- {
2075
- name: 'result',
2076
- kind: 'Object',
2077
- selections: GetSuccessTeamResult__selections
2078
- }
2079
- ]
2080
- };
2081
- };
2082
- function equals(existing, incoming) {
2083
- const existing_result = existing.result;
2084
- const incoming_result = incoming.result;
2085
- if (!(equals$1(existing_result, incoming_result))) {
2086
- return false;
2087
- }
2088
- return true;
2089
- }
2090
- const ingest = function SuccessTeamOutputRepresentationIngest(input, path, luvio, store, timestamp) {
2091
- if (process.env.NODE_ENV !== 'production') {
2092
- const validateError = validate(input);
2093
- if (validateError !== null) {
2094
- throw validateError;
2095
- }
2096
- }
2097
- const key = path.fullPath;
2098
- const existingRecord = store.readEntry(key);
2099
- const ttlToUse = path.ttl !== undefined ? path.ttl : 360000;
2100
- let incomingRecord = normalize(input, store.readEntry(key), {
2101
- fullPath: key,
2102
- parent: path.parent,
2103
- propertyName: path.propertyName,
2104
- ttl: ttlToUse
2105
- });
2106
- if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
2107
- luvio.storePublish(key, incomingRecord);
2108
- }
2109
- if (ttlToUse !== undefined) {
2110
- const storeMetadataParams = {
2111
- ttl: ttlToUse,
2112
- namespace: "education",
2113
- version: VERSION,
2114
- representationName: RepresentationType,
2115
- };
2116
- luvio.publishStoreMetadata(key, storeMetadataParams);
2117
- }
2118
- return createLink(key);
2119
- };
2120
- function getTypeCacheKeys(luvio, input, fullPathFactory) {
2121
- const rootKeySet = new StoreKeyMap();
2122
- // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
2123
- const rootKey = fullPathFactory();
2124
- rootKeySet.set(rootKey, {
2125
- namespace: keyPrefix,
2126
- representationName: RepresentationType,
2127
- mergeable: false
2128
- });
2129
- return rootKeySet;
2046
+ const VERSION = "bb85bc85ab5fe2cd81d05e073d1bccf5";
2047
+ function validate(obj, path = 'SuccessTeamOutputRepresentation') {
2048
+ const v_error = (() => {
2049
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
2050
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
2051
+ }
2052
+ const obj_result = obj.result;
2053
+ const path_result = path + '.result';
2054
+ const referencepath_resultValidationError = validate$1(obj_result, path_result);
2055
+ if (referencepath_resultValidationError !== null) {
2056
+ let message = 'Object doesn\'t match GetSuccessTeamResult (at "' + path_result + '")\n';
2057
+ message += referencepath_resultValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
2058
+ return new TypeError(message);
2059
+ }
2060
+ })();
2061
+ return v_error === undefined ? null : v_error;
2062
+ }
2063
+ const RepresentationType = 'SuccessTeamOutputRepresentation';
2064
+ function normalize(input, existing, path, luvio, store, timestamp) {
2065
+ return input;
2066
+ }
2067
+ const select$1 = function SuccessTeamOutputRepresentationSelect() {
2068
+ const { selections: GetSuccessTeamResult__selections, opaque: GetSuccessTeamResult__opaque, } = select$2();
2069
+ return {
2070
+ kind: 'Fragment',
2071
+ version: VERSION,
2072
+ private: [],
2073
+ selections: [
2074
+ {
2075
+ name: 'result',
2076
+ kind: 'Object',
2077
+ selections: GetSuccessTeamResult__selections
2078
+ }
2079
+ ]
2080
+ };
2081
+ };
2082
+ function equals(existing, incoming) {
2083
+ const existing_result = existing.result;
2084
+ const incoming_result = incoming.result;
2085
+ if (!(equals$1(existing_result, incoming_result))) {
2086
+ return false;
2087
+ }
2088
+ return true;
2089
+ }
2090
+ const ingest = function SuccessTeamOutputRepresentationIngest(input, path, luvio, store, timestamp) {
2091
+ if (process.env.NODE_ENV !== 'production') {
2092
+ const validateError = validate(input);
2093
+ if (validateError !== null) {
2094
+ throw validateError;
2095
+ }
2096
+ }
2097
+ const key = path.fullPath;
2098
+ const existingRecord = store.readEntry(key);
2099
+ const ttlToUse = path.ttl !== undefined ? path.ttl : 360000;
2100
+ let incomingRecord = normalize(input, store.readEntry(key), {
2101
+ fullPath: key,
2102
+ parent: path.parent,
2103
+ propertyName: path.propertyName,
2104
+ ttl: ttlToUse
2105
+ });
2106
+ if (existingRecord === undefined || equals(existingRecord, incomingRecord) === false) {
2107
+ luvio.storePublish(key, incomingRecord);
2108
+ }
2109
+ if (ttlToUse !== undefined) {
2110
+ const storeMetadataParams = {
2111
+ ttl: ttlToUse,
2112
+ namespace: "education",
2113
+ version: VERSION,
2114
+ representationName: RepresentationType,
2115
+ };
2116
+ luvio.publishStoreMetadata(key, storeMetadataParams);
2117
+ }
2118
+ return createLink(key);
2119
+ };
2120
+ function getTypeCacheKeys(luvio, input, fullPathFactory) {
2121
+ const rootKeySet = new StoreKeyMap();
2122
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
2123
+ const rootKey = fullPathFactory();
2124
+ rootKeySet.set(rootKey, {
2125
+ namespace: keyPrefix,
2126
+ representationName: RepresentationType,
2127
+ mergeable: false
2128
+ });
2129
+ return rootKeySet;
2130
2130
  }
2131
2131
 
2132
- function select(luvio, params) {
2133
- return select$1();
2134
- }
2135
- function keyBuilder$1(luvio, params) {
2136
- return keyPrefix + '::SuccessTeamOutputRepresentation:(' + 'accountId:' + params.urlParams.accountId + ')';
2137
- }
2138
- function getResponseCacheKeys(luvio, resourceParams, response) {
2139
- return getTypeCacheKeys(luvio, response, () => keyBuilder$1(luvio, resourceParams));
2140
- }
2141
- function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
2142
- const { body } = response;
2143
- const key = keyBuilder$1(luvio, resourceParams);
2144
- luvio.storeIngest(key, ingest, body);
2145
- const snapshot = luvio.storeLookup({
2146
- recordId: key,
2147
- node: select(),
2148
- variables: {},
2149
- }, snapshotRefresh);
2150
- if (process.env.NODE_ENV !== 'production') {
2151
- if (snapshot.state !== 'Fulfilled') {
2152
- throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
2153
- }
2154
- }
2155
- return snapshot;
2156
- }
2157
- function ingestError(luvio, params, error, snapshotRefresh) {
2158
- const key = keyBuilder$1(luvio, params);
2159
- const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
2160
- luvio.storeIngestError(key, errorSnapshot);
2161
- return errorSnapshot;
2162
- }
2163
- function createResourceRequest(config) {
2164
- const headers = {};
2165
- return {
2166
- baseUri: '/services/data/v58.0',
2167
- basePath: '/connect/education/' + config.urlParams.accountId + '/success-team',
2168
- method: 'get',
2169
- body: null,
2170
- urlParams: config.urlParams,
2171
- queryParams: {},
2172
- headers,
2173
- priority: 'normal',
2174
- };
2132
+ function select(luvio, params) {
2133
+ return select$1();
2134
+ }
2135
+ function keyBuilder$1(luvio, params) {
2136
+ return keyPrefix + '::SuccessTeamOutputRepresentation:(' + 'accountId:' + params.urlParams.accountId + ')';
2137
+ }
2138
+ function getResponseCacheKeys(luvio, resourceParams, response) {
2139
+ return getTypeCacheKeys(luvio, response, () => keyBuilder$1(luvio, resourceParams));
2140
+ }
2141
+ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
2142
+ const { body } = response;
2143
+ const key = keyBuilder$1(luvio, resourceParams);
2144
+ luvio.storeIngest(key, ingest, body);
2145
+ const snapshot = luvio.storeLookup({
2146
+ recordId: key,
2147
+ node: select(),
2148
+ variables: {},
2149
+ }, snapshotRefresh);
2150
+ if (process.env.NODE_ENV !== 'production') {
2151
+ if (snapshot.state !== 'Fulfilled') {
2152
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
2153
+ }
2154
+ }
2155
+ return snapshot;
2156
+ }
2157
+ function ingestError(luvio, params, error, snapshotRefresh) {
2158
+ const key = keyBuilder$1(luvio, params);
2159
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
2160
+ luvio.storeIngestError(key, errorSnapshot);
2161
+ return errorSnapshot;
2162
+ }
2163
+ function createResourceRequest(config) {
2164
+ const headers = {};
2165
+ return {
2166
+ baseUri: '/services/data/v58.0',
2167
+ basePath: '/connect/education/' + config.urlParams.accountId + '/success-team',
2168
+ method: 'get',
2169
+ body: null,
2170
+ urlParams: config.urlParams,
2171
+ queryParams: {},
2172
+ headers,
2173
+ priority: 'normal',
2174
+ };
2175
2175
  }
2176
2176
 
2177
- const getSuccessTeam_ConfigPropertyNames = {
2178
- displayName: 'getSuccessTeam',
2179
- parameters: {
2180
- required: ['accountId'],
2181
- optional: []
2182
- }
2183
- };
2184
- function createResourceParams(config) {
2185
- const resourceParams = {
2186
- urlParams: {
2187
- accountId: config.accountId
2188
- }
2189
- };
2190
- return resourceParams;
2191
- }
2192
- function keyBuilder(luvio, config) {
2193
- const resourceParams = createResourceParams(config);
2194
- return keyBuilder$1(luvio, resourceParams);
2195
- }
2196
- function typeCheckConfig(untrustedConfig) {
2197
- const config = {};
2198
- const untrustedConfig_accountId = untrustedConfig.accountId;
2199
- if (typeof untrustedConfig_accountId === 'string') {
2200
- config.accountId = untrustedConfig_accountId;
2201
- }
2202
- return config;
2203
- }
2204
- function validateAdapterConfig(untrustedConfig, configPropertyNames) {
2205
- if (!untrustedIsObject(untrustedConfig)) {
2206
- return null;
2207
- }
2208
- if (process.env.NODE_ENV !== 'production') {
2209
- validateConfig(untrustedConfig, configPropertyNames);
2210
- }
2211
- const config = typeCheckConfig(untrustedConfig);
2212
- if (!areRequiredParametersPresent(config, configPropertyNames)) {
2213
- return null;
2214
- }
2215
- return config;
2216
- }
2217
- function adapterFragment(luvio, config) {
2218
- createResourceParams(config);
2219
- return select();
2220
- }
2221
- function onFetchResponseSuccess(luvio, config, resourceParams, response) {
2222
- const snapshot = ingestSuccess(luvio, resourceParams, response, {
2223
- config,
2224
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
2225
- });
2226
- return luvio.storeBroadcast().then(() => snapshot);
2227
- }
2228
- function onFetchResponseError(luvio, config, resourceParams, response) {
2229
- const snapshot = ingestError(luvio, resourceParams, response, {
2230
- config,
2231
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
2232
- });
2233
- return luvio.storeBroadcast().then(() => snapshot);
2234
- }
2235
- function buildNetworkSnapshot(luvio, config, options) {
2236
- const resourceParams = createResourceParams(config);
2237
- const request = createResourceRequest(resourceParams);
2238
- return luvio.dispatchResourceRequest(request, options)
2239
- .then((response) => {
2240
- return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => getResponseCacheKeys(luvio, resourceParams, response.body));
2241
- }, (response) => {
2242
- return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
2243
- });
2244
- }
2245
- function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
2246
- const { luvio, config } = context;
2247
- const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
2248
- const dispatchOptions = {
2249
- resourceRequestContext: {
2250
- requestCorrelator,
2251
- luvioRequestMethod: undefined,
2252
- },
2253
- eventObservers
2254
- };
2255
- if (networkPriority !== 'normal') {
2256
- dispatchOptions.overrides = {
2257
- priority: networkPriority
2258
- };
2259
- }
2260
- return buildNetworkSnapshot(luvio, config, dispatchOptions);
2261
- }
2262
- function buildCachedSnapshotCachePolicy(context, storeLookup) {
2263
- const { luvio, config } = context;
2264
- const selector = {
2265
- recordId: keyBuilder(luvio, config),
2266
- node: adapterFragment(luvio, config),
2267
- variables: {},
2268
- };
2269
- const cacheSnapshot = storeLookup(selector, {
2270
- config,
2271
- resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
2272
- });
2273
- return cacheSnapshot;
2274
- }
2275
- const getSuccessTeamAdapterFactory = (luvio) => function education__getSuccessTeam(untrustedConfig, requestContext) {
2276
- const config = validateAdapterConfig(untrustedConfig, getSuccessTeam_ConfigPropertyNames);
2277
- // Invalid or incomplete config
2278
- if (config === null) {
2279
- return null;
2280
- }
2281
- return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
2282
- buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
2177
+ const getSuccessTeam_ConfigPropertyNames = {
2178
+ displayName: 'getSuccessTeam',
2179
+ parameters: {
2180
+ required: ['accountId'],
2181
+ optional: []
2182
+ }
2183
+ };
2184
+ function createResourceParams(config) {
2185
+ const resourceParams = {
2186
+ urlParams: {
2187
+ accountId: config.accountId
2188
+ }
2189
+ };
2190
+ return resourceParams;
2191
+ }
2192
+ function keyBuilder(luvio, config) {
2193
+ const resourceParams = createResourceParams(config);
2194
+ return keyBuilder$1(luvio, resourceParams);
2195
+ }
2196
+ function typeCheckConfig(untrustedConfig) {
2197
+ const config = {};
2198
+ const untrustedConfig_accountId = untrustedConfig.accountId;
2199
+ if (typeof untrustedConfig_accountId === 'string') {
2200
+ config.accountId = untrustedConfig_accountId;
2201
+ }
2202
+ return config;
2203
+ }
2204
+ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
2205
+ if (!untrustedIsObject(untrustedConfig)) {
2206
+ return null;
2207
+ }
2208
+ if (process.env.NODE_ENV !== 'production') {
2209
+ validateConfig(untrustedConfig, configPropertyNames);
2210
+ }
2211
+ const config = typeCheckConfig(untrustedConfig);
2212
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
2213
+ return null;
2214
+ }
2215
+ return config;
2216
+ }
2217
+ function adapterFragment(luvio, config) {
2218
+ createResourceParams(config);
2219
+ return select();
2220
+ }
2221
+ function onFetchResponseSuccess(luvio, config, resourceParams, response) {
2222
+ const snapshot = ingestSuccess(luvio, resourceParams, response, {
2223
+ config,
2224
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
2225
+ });
2226
+ return luvio.storeBroadcast().then(() => snapshot);
2227
+ }
2228
+ function onFetchResponseError(luvio, config, resourceParams, response) {
2229
+ const snapshot = ingestError(luvio, resourceParams, response, {
2230
+ config,
2231
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
2232
+ });
2233
+ return luvio.storeBroadcast().then(() => snapshot);
2234
+ }
2235
+ function buildNetworkSnapshot(luvio, config, options) {
2236
+ const resourceParams = createResourceParams(config);
2237
+ const request = createResourceRequest(resourceParams);
2238
+ return luvio.dispatchResourceRequest(request, options)
2239
+ .then((response) => {
2240
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => getResponseCacheKeys(luvio, resourceParams, response.body));
2241
+ }, (response) => {
2242
+ return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
2243
+ });
2244
+ }
2245
+ function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
2246
+ const { luvio, config } = context;
2247
+ const { networkPriority, requestCorrelator, eventObservers } = coercedAdapterRequestContext;
2248
+ const dispatchOptions = {
2249
+ resourceRequestContext: {
2250
+ requestCorrelator,
2251
+ luvioRequestMethod: undefined,
2252
+ },
2253
+ eventObservers
2254
+ };
2255
+ if (networkPriority !== 'normal') {
2256
+ dispatchOptions.overrides = {
2257
+ priority: networkPriority
2258
+ };
2259
+ }
2260
+ return buildNetworkSnapshot(luvio, config, dispatchOptions);
2261
+ }
2262
+ function buildCachedSnapshotCachePolicy(context, storeLookup) {
2263
+ const { luvio, config } = context;
2264
+ const selector = {
2265
+ recordId: keyBuilder(luvio, config),
2266
+ node: adapterFragment(luvio, config),
2267
+ variables: {},
2268
+ };
2269
+ const cacheSnapshot = storeLookup(selector, {
2270
+ config,
2271
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
2272
+ });
2273
+ return cacheSnapshot;
2274
+ }
2275
+ const getSuccessTeamAdapterFactory = (luvio) => function education__getSuccessTeam(untrustedConfig, requestContext) {
2276
+ const config = validateAdapterConfig(untrustedConfig, getSuccessTeam_ConfigPropertyNames);
2277
+ // Invalid or incomplete config
2278
+ if (config === null) {
2279
+ return null;
2280
+ }
2281
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
2282
+ buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
2283
2283
  };
2284
2284
 
2285
2285
  export { createCarePlansAdapterFactory, getAvailableTimeSlotsAdapterFactory, getAvailableTopicsAdapterFactory, getSuccessTeamAdapterFactory };