@salesforce/lds-adapters-industries-program-mgmt 1.451.0-dev4 → 1.451.0-dev6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/sfdc/index.js CHANGED
@@ -13,10 +13,10 @@
13
13
  */
14
14
  /* proxy-compat-disable */
15
15
  import { withDefaultLuvio } from 'force/ldsEngine';
16
- import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$1, typeCheckConfig as typeCheckConfig$1 } from 'force/luvioEngine';
16
+ import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$3, typeCheckConfig as typeCheckConfig$3 } from 'force/luvioEngine';
17
17
 
18
18
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
19
- const { keys: ObjectKeys, create: ObjectCreate } = Object;
19
+ const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
20
20
  const { isArray: ArrayIsArray$1 } = Array;
21
21
  /**
22
22
  * Validates an adapter config is well-formed.
@@ -40,7 +40,7 @@ function validateConfig(config, adapter, oneOf) {
40
40
  throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
41
41
  }
42
42
  const supported = required.concat(optional);
43
- if (ObjectKeys(config).some(key => !supported.includes(key))) {
43
+ if (ObjectKeys$1(config).some(key => !supported.includes(key))) {
44
44
  throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
45
45
  }
46
46
  }
@@ -73,6 +73,7 @@ function buildAdapterValidationConfig(displayName, paramsMeta) {
73
73
  }
74
74
  const keyPrefix = 'program-mgmt';
75
75
 
76
+ const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
76
77
  const { isArray: ArrayIsArray } = Array;
77
78
  const { stringify: JSONStringify } = JSON;
78
79
  function createLink(ref) {
@@ -81,9 +82,210 @@ function createLink(ref) {
81
82
  };
82
83
  }
83
84
 
84
- const TTL = 100;
85
- const VERSION = "c0d0d94c035c5fa3b02194b685c79ce3";
86
- function validate(obj, path = 'GenerateBenefitSessionOutputRepresentation') {
85
+ function validate$4(obj, path = 'BenefitSessions') {
86
+ const v_error = (() => {
87
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
88
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
89
+ }
90
+ const obj_endDate = obj.endDate;
91
+ const path_endDate = path + '.endDate';
92
+ if (typeof obj_endDate !== 'string') {
93
+ return new TypeError('Expected "string" but received "' + typeof obj_endDate + '" (at "' + path_endDate + '")');
94
+ }
95
+ const obj_name = obj.name;
96
+ const path_name = path + '.name';
97
+ if (typeof obj_name !== 'string') {
98
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
99
+ }
100
+ const obj_startDate = obj.startDate;
101
+ const path_startDate = path + '.startDate';
102
+ if (typeof obj_startDate !== 'string') {
103
+ return new TypeError('Expected "string" but received "' + typeof obj_startDate + '" (at "' + path_startDate + '")');
104
+ }
105
+ })();
106
+ return v_error === undefined ? null : v_error;
107
+ }
108
+
109
+ const TTL$2 = 100;
110
+ const VERSION$2 = "df34bd680bc967e0b41fd56d4ee79f3a";
111
+ function validate$3(obj, path = 'PreviewBenefitSessionsOutputRepresentation') {
112
+ const v_error = (() => {
113
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
114
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
115
+ }
116
+ const obj_sessions = obj.sessions;
117
+ const path_sessions = path + '.sessions';
118
+ if (!ArrayIsArray(obj_sessions)) {
119
+ return new TypeError('Expected "array" but received "' + typeof obj_sessions + '" (at "' + path_sessions + '")');
120
+ }
121
+ for (let i = 0; i < obj_sessions.length; i++) {
122
+ const obj_sessions_item = obj_sessions[i];
123
+ const path_sessions_item = path_sessions + '[' + i + ']';
124
+ const referencepath_sessions_itemValidationError = validate$4(obj_sessions_item, path_sessions_item);
125
+ if (referencepath_sessions_itemValidationError !== null) {
126
+ let message = 'Object doesn\'t match BenefitSessions (at "' + path_sessions_item + '")\n';
127
+ message += referencepath_sessions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
128
+ return new TypeError(message);
129
+ }
130
+ }
131
+ const obj_success = obj.success;
132
+ const path_success = path + '.success';
133
+ if (typeof obj_success !== 'boolean') {
134
+ return new TypeError('Expected "boolean" but received "' + typeof obj_success + '" (at "' + path_success + '")');
135
+ }
136
+ })();
137
+ return v_error === undefined ? null : v_error;
138
+ }
139
+ const RepresentationType$2 = 'PreviewBenefitSessionsOutputRepresentation';
140
+ function keyBuilder$2(luvio, config) {
141
+ return keyPrefix + '::' + RepresentationType$2 + ':' + config.success;
142
+ }
143
+ function keyBuilderFromType$2(luvio, object) {
144
+ const keyParams = {
145
+ success: object.success
146
+ };
147
+ return keyBuilder$2(luvio, keyParams);
148
+ }
149
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
150
+ return input;
151
+ }
152
+ const select$5 = function PreviewBenefitSessionsOutputRepresentationSelect() {
153
+ return {
154
+ kind: 'Fragment',
155
+ version: VERSION$2,
156
+ private: [],
157
+ opaque: true
158
+ };
159
+ };
160
+ function equals$2(existing, incoming) {
161
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
162
+ return false;
163
+ }
164
+ return true;
165
+ }
166
+ const ingest$2 = function PreviewBenefitSessionsOutputRepresentationIngest(input, path, luvio, store, timestamp) {
167
+ if (process.env.NODE_ENV !== 'production') {
168
+ const validateError = validate$3(input);
169
+ if (validateError !== null) {
170
+ throw validateError;
171
+ }
172
+ }
173
+ const key = keyBuilderFromType$2(luvio, input);
174
+ const ttlToUse = TTL$2;
175
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "program-mgmt", VERSION$2, RepresentationType$2, equals$2);
176
+ return createLink(key);
177
+ };
178
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
179
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
180
+ const rootKey = keyBuilderFromType$2(luvio, input);
181
+ rootKeySet.set(rootKey, {
182
+ namespace: keyPrefix,
183
+ representationName: RepresentationType$2,
184
+ mergeable: false
185
+ });
186
+ }
187
+
188
+ function select$4(luvio, params) {
189
+ return select$5();
190
+ }
191
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
192
+ getTypeCacheKeys$2(storeKeyMap, luvio, response);
193
+ }
194
+ function ingestSuccess$2(luvio, resourceParams, response) {
195
+ const { body } = response;
196
+ const key = keyBuilderFromType$2(luvio, body);
197
+ luvio.storeIngest(key, ingest$2, body);
198
+ const snapshot = luvio.storeLookup({
199
+ recordId: key,
200
+ node: select$4(),
201
+ variables: {},
202
+ });
203
+ if (process.env.NODE_ENV !== 'production') {
204
+ if (snapshot.state !== 'Fulfilled') {
205
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
206
+ }
207
+ }
208
+ deepFreeze(snapshot.data);
209
+ return snapshot;
210
+ }
211
+ function createResourceRequest$2(config) {
212
+ const headers = {};
213
+ return {
214
+ baseUri: '/services/data/v68.0',
215
+ basePath: '/connect/program-mgmt/benefit-schedules',
216
+ method: 'post',
217
+ body: config.body,
218
+ urlParams: {},
219
+ queryParams: {},
220
+ headers,
221
+ priority: 'normal',
222
+ };
223
+ }
224
+
225
+ const adapterName$2 = 'postBenefitSessionsPreview';
226
+ const postBenefitSessionsPreview_ConfigPropertyMetadata = [
227
+ generateParamConfigMetadata('firstSessionStartDate', false, 2 /* Body */, 0 /* String */),
228
+ generateParamConfigMetadata('firstSessionEndDate', false, 2 /* Body */, 0 /* String */),
229
+ generateParamConfigMetadata('scheduleFrequency', false, 2 /* Body */, 0 /* String */),
230
+ generateParamConfigMetadata('scheduleDays', false, 2 /* Body */, 3 /* Integer */),
231
+ generateParamConfigMetadata('totalRecurrencesCount', false, 2 /* Body */, 3 /* Integer */),
232
+ generateParamConfigMetadata('scheduleEndDate', false, 2 /* Body */, 0 /* String */),
233
+ generateParamConfigMetadata('benefitScheduleName', false, 2 /* Body */, 0 /* String */),
234
+ generateParamConfigMetadata('mode', false, 2 /* Body */, 0 /* String */),
235
+ generateParamConfigMetadata('noOfSessions', false, 2 /* Body */, 3 /* Integer */),
236
+ ];
237
+ const postBenefitSessionsPreview_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, postBenefitSessionsPreview_ConfigPropertyMetadata);
238
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(postBenefitSessionsPreview_ConfigPropertyMetadata);
239
+ function typeCheckConfig$2(untrustedConfig) {
240
+ const config = {};
241
+ typeCheckConfig$3(untrustedConfig, config, postBenefitSessionsPreview_ConfigPropertyMetadata);
242
+ return config;
243
+ }
244
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
245
+ if (!untrustedIsObject(untrustedConfig)) {
246
+ return null;
247
+ }
248
+ if (process.env.NODE_ENV !== 'production') {
249
+ validateConfig(untrustedConfig, configPropertyNames);
250
+ }
251
+ const config = typeCheckConfig$2(untrustedConfig);
252
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
253
+ return null;
254
+ }
255
+ return config;
256
+ }
257
+ function buildNetworkSnapshot$2(luvio, config, options) {
258
+ const resourceParams = createResourceParams$2(config);
259
+ const request = createResourceRequest$2(resourceParams);
260
+ return luvio.dispatchResourceRequest(request, options)
261
+ .then((response) => {
262
+ return luvio.handleSuccessResponse(() => {
263
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response);
264
+ return luvio.storeBroadcast().then(() => snapshot);
265
+ }, () => {
266
+ const cache = new StoreKeyMap();
267
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
268
+ return cache;
269
+ });
270
+ }, (response) => {
271
+ deepFreeze(response);
272
+ throw response;
273
+ });
274
+ }
275
+ const postBenefitSessionsPreviewAdapterFactory = (luvio) => {
276
+ return function postBenefitSessionsPreview(untrustedConfig) {
277
+ const config = validateAdapterConfig$2(untrustedConfig, postBenefitSessionsPreview_ConfigPropertyNames);
278
+ // Invalid or incomplete config
279
+ if (config === null) {
280
+ throw new Error('Invalid config for "postBenefitSessionsPreview"');
281
+ }
282
+ return buildNetworkSnapshot$2(luvio, config);
283
+ };
284
+ };
285
+
286
+ const TTL$1 = 100;
287
+ const VERSION$1 = "c0d0d94c035c5fa3b02194b685c79ce3";
288
+ function validate$2(obj, path = 'GenerateBenefitSessionOutputRepresentation') {
87
289
  const v_error = (() => {
88
290
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
89
291
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -103,7 +305,219 @@ function validate(obj, path = 'GenerateBenefitSessionOutputRepresentation') {
103
305
  })();
104
306
  return v_error === undefined ? null : v_error;
105
307
  }
106
- const RepresentationType = 'GenerateBenefitSessionOutputRepresentation';
308
+ const RepresentationType$1 = 'GenerateBenefitSessionOutputRepresentation';
309
+ function keyBuilder$1(luvio, config) {
310
+ return keyPrefix + '::' + RepresentationType$1 + ':' + config.success;
311
+ }
312
+ function keyBuilderFromType$1(luvio, object) {
313
+ const keyParams = {
314
+ success: object.success
315
+ };
316
+ return keyBuilder$1(luvio, keyParams);
317
+ }
318
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
319
+ return input;
320
+ }
321
+ const select$3 = function GenerateBenefitSessionOutputRepresentationSelect() {
322
+ return {
323
+ kind: 'Fragment',
324
+ version: VERSION$1,
325
+ private: [],
326
+ opaque: true
327
+ };
328
+ };
329
+ function equals$1(existing, incoming) {
330
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
331
+ return false;
332
+ }
333
+ return true;
334
+ }
335
+ const ingest$1 = function GenerateBenefitSessionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
336
+ if (process.env.NODE_ENV !== 'production') {
337
+ const validateError = validate$2(input);
338
+ if (validateError !== null) {
339
+ throw validateError;
340
+ }
341
+ }
342
+ const key = keyBuilderFromType$1(luvio, input);
343
+ const ttlToUse = TTL$1;
344
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "program-mgmt", VERSION$1, RepresentationType$1, equals$1);
345
+ return createLink(key);
346
+ };
347
+ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
348
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
349
+ const rootKey = keyBuilderFromType$1(luvio, input);
350
+ rootKeySet.set(rootKey, {
351
+ namespace: keyPrefix,
352
+ representationName: RepresentationType$1,
353
+ mergeable: false
354
+ });
355
+ }
356
+
357
+ function select$2(luvio, params) {
358
+ return select$3();
359
+ }
360
+ function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
361
+ getTypeCacheKeys$1(storeKeyMap, luvio, response);
362
+ }
363
+ function ingestSuccess$1(luvio, resourceParams, response) {
364
+ const { body } = response;
365
+ const key = keyBuilderFromType$1(luvio, body);
366
+ luvio.storeIngest(key, ingest$1, body);
367
+ const snapshot = luvio.storeLookup({
368
+ recordId: key,
369
+ node: select$2(),
370
+ variables: {},
371
+ });
372
+ if (process.env.NODE_ENV !== 'production') {
373
+ if (snapshot.state !== 'Fulfilled') {
374
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
375
+ }
376
+ }
377
+ deepFreeze(snapshot.data);
378
+ return snapshot;
379
+ }
380
+ function createResourceRequest$1(config) {
381
+ const headers = {};
382
+ return {
383
+ baseUri: '/services/data/v68.0',
384
+ basePath: '/connect/program-mgmt/benefit-schedules/' + config.urlParams.benefitScheduleId + '/sessions',
385
+ method: 'post',
386
+ body: null,
387
+ urlParams: config.urlParams,
388
+ queryParams: {},
389
+ headers,
390
+ priority: 'normal',
391
+ };
392
+ }
393
+
394
+ const adapterName$1 = 'postTriggerBenefitSessionGeneration';
395
+ const postTriggerBenefitSessionGeneration_ConfigPropertyMetadata = [
396
+ generateParamConfigMetadata('benefitScheduleId', true, 0 /* UrlParameter */, 0 /* String */),
397
+ ];
398
+ const postTriggerBenefitSessionGeneration_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, postTriggerBenefitSessionGeneration_ConfigPropertyMetadata);
399
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(postTriggerBenefitSessionGeneration_ConfigPropertyMetadata);
400
+ function typeCheckConfig$1(untrustedConfig) {
401
+ const config = {};
402
+ typeCheckConfig$3(untrustedConfig, config, postTriggerBenefitSessionGeneration_ConfigPropertyMetadata);
403
+ return config;
404
+ }
405
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
406
+ if (!untrustedIsObject(untrustedConfig)) {
407
+ return null;
408
+ }
409
+ if (process.env.NODE_ENV !== 'production') {
410
+ validateConfig(untrustedConfig, configPropertyNames);
411
+ }
412
+ const config = typeCheckConfig$1(untrustedConfig);
413
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
414
+ return null;
415
+ }
416
+ return config;
417
+ }
418
+ function buildNetworkSnapshot$1(luvio, config, options) {
419
+ const resourceParams = createResourceParams$1(config);
420
+ const request = createResourceRequest$1(resourceParams);
421
+ return luvio.dispatchResourceRequest(request, options)
422
+ .then((response) => {
423
+ return luvio.handleSuccessResponse(() => {
424
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response);
425
+ return luvio.storeBroadcast().then(() => snapshot);
426
+ }, () => {
427
+ const cache = new StoreKeyMap();
428
+ getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
429
+ return cache;
430
+ });
431
+ }, (response) => {
432
+ deepFreeze(response);
433
+ throw response;
434
+ });
435
+ }
436
+ const postTriggerBenefitSessionGenerationAdapterFactory = (luvio) => {
437
+ return function postTriggerBenefitSessionGeneration(untrustedConfig) {
438
+ const config = validateAdapterConfig$1(untrustedConfig, postTriggerBenefitSessionGeneration_ConfigPropertyNames);
439
+ // Invalid or incomplete config
440
+ if (config === null) {
441
+ throw new Error('Invalid config for "postTriggerBenefitSessionGeneration"');
442
+ }
443
+ return buildNetworkSnapshot$1(luvio, config);
444
+ };
445
+ };
446
+
447
+ function validate$1(obj, path = 'BenefitSessionUpsertInputRepresentation') {
448
+ const v_error = (() => {
449
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
450
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
451
+ }
452
+ const obj_fields = obj.fields;
453
+ const path_fields = path + '.fields';
454
+ if (typeof obj_fields !== 'object' || ArrayIsArray(obj_fields) || obj_fields === null) {
455
+ return new TypeError('Expected "object" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
456
+ }
457
+ const obj_fields_keys = ObjectKeys(obj_fields);
458
+ for (let i = 0; i < obj_fields_keys.length; i++) {
459
+ const key = obj_fields_keys[i];
460
+ const obj_fields_prop = obj_fields[key];
461
+ const path_fields_prop = path_fields + '["' + key + '"]';
462
+ if (obj_fields_prop === undefined) {
463
+ return new TypeError('Expected "defined" but received "' + typeof obj_fields_prop + '" (at "' + path_fields_prop + '")');
464
+ }
465
+ }
466
+ })();
467
+ return v_error === undefined ? null : v_error;
468
+ }
469
+
470
+ const TTL = 100;
471
+ const VERSION = "5821fdcb2a41b9e59a04ab5fa43ffe40";
472
+ function validate(obj, path = 'UpdateBenefitSessionsOutputRepresentation') {
473
+ const v_error = (() => {
474
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
475
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
476
+ }
477
+ if (obj.deletedDisbursementCount !== undefined) {
478
+ const obj_deletedDisbursementCount = obj.deletedDisbursementCount;
479
+ const path_deletedDisbursementCount = path + '.deletedDisbursementCount';
480
+ if (typeof obj_deletedDisbursementCount !== 'number' || (typeof obj_deletedDisbursementCount === 'number' && Math.floor(obj_deletedDisbursementCount) !== obj_deletedDisbursementCount)) {
481
+ return new TypeError('Expected "integer" but received "' + typeof obj_deletedDisbursementCount + '" (at "' + path_deletedDisbursementCount + '")');
482
+ }
483
+ }
484
+ if (obj.deletedSessionCount !== undefined) {
485
+ const obj_deletedSessionCount = obj.deletedSessionCount;
486
+ const path_deletedSessionCount = path + '.deletedSessionCount';
487
+ if (typeof obj_deletedSessionCount !== 'number' || (typeof obj_deletedSessionCount === 'number' && Math.floor(obj_deletedSessionCount) !== obj_deletedSessionCount)) {
488
+ return new TypeError('Expected "integer" but received "' + typeof obj_deletedSessionCount + '" (at "' + path_deletedSessionCount + '")');
489
+ }
490
+ }
491
+ if (obj.insertedDisbursementCount !== undefined) {
492
+ const obj_insertedDisbursementCount = obj.insertedDisbursementCount;
493
+ const path_insertedDisbursementCount = path + '.insertedDisbursementCount';
494
+ if (typeof obj_insertedDisbursementCount !== 'number' || (typeof obj_insertedDisbursementCount === 'number' && Math.floor(obj_insertedDisbursementCount) !== obj_insertedDisbursementCount)) {
495
+ return new TypeError('Expected "integer" but received "' + typeof obj_insertedDisbursementCount + '" (at "' + path_insertedDisbursementCount + '")');
496
+ }
497
+ }
498
+ if (obj.insertedSessionCount !== undefined) {
499
+ const obj_insertedSessionCount = obj.insertedSessionCount;
500
+ const path_insertedSessionCount = path + '.insertedSessionCount';
501
+ if (typeof obj_insertedSessionCount !== 'number' || (typeof obj_insertedSessionCount === 'number' && Math.floor(obj_insertedSessionCount) !== obj_insertedSessionCount)) {
502
+ return new TypeError('Expected "integer" but received "' + typeof obj_insertedSessionCount + '" (at "' + path_insertedSessionCount + '")');
503
+ }
504
+ }
505
+ const obj_success = obj.success;
506
+ const path_success = path + '.success';
507
+ if (typeof obj_success !== 'boolean') {
508
+ return new TypeError('Expected "boolean" but received "' + typeof obj_success + '" (at "' + path_success + '")');
509
+ }
510
+ if (obj.updatedSessionCount !== undefined) {
511
+ const obj_updatedSessionCount = obj.updatedSessionCount;
512
+ const path_updatedSessionCount = path + '.updatedSessionCount';
513
+ if (typeof obj_updatedSessionCount !== 'number' || (typeof obj_updatedSessionCount === 'number' && Math.floor(obj_updatedSessionCount) !== obj_updatedSessionCount)) {
514
+ return new TypeError('Expected "integer" but received "' + typeof obj_updatedSessionCount + '" (at "' + path_updatedSessionCount + '")');
515
+ }
516
+ }
517
+ })();
518
+ return v_error === undefined ? null : v_error;
519
+ }
520
+ const RepresentationType = 'UpdateBenefitSessionsOutputRepresentation';
107
521
  function keyBuilder(luvio, config) {
108
522
  return keyPrefix + '::' + RepresentationType + ':' + config.success;
109
523
  }
@@ -116,7 +530,7 @@ function keyBuilderFromType(luvio, object) {
116
530
  function normalize(input, existing, path, luvio, store, timestamp) {
117
531
  return input;
118
532
  }
119
- const select$1 = function GenerateBenefitSessionOutputRepresentationSelect() {
533
+ const select$1 = function UpdateBenefitSessionsOutputRepresentationSelect() {
120
534
  return {
121
535
  kind: 'Fragment',
122
536
  version: VERSION,
@@ -130,7 +544,7 @@ function equals(existing, incoming) {
130
544
  }
131
545
  return true;
132
546
  }
133
- const ingest = function GenerateBenefitSessionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
547
+ const ingest = function UpdateBenefitSessionsOutputRepresentationIngest(input, path, luvio, store, timestamp) {
134
548
  if (process.env.NODE_ENV !== 'production') {
135
549
  const validateError = validate(input);
136
550
  if (validateError !== null) {
@@ -179,9 +593,9 @@ function createResourceRequest(config) {
179
593
  const headers = {};
180
594
  return {
181
595
  baseUri: '/services/data/v68.0',
182
- basePath: '/connect/program-mgmt/benefit-schedules/' + config.urlParams.benefitScheduleId + '/sessions',
596
+ basePath: '/connect/program-mgmt/benefit-schedules/' + config.urlParams.benefitScheduleId + '/session-updates',
183
597
  method: 'post',
184
- body: null,
598
+ body: config.body,
185
599
  urlParams: config.urlParams,
186
600
  queryParams: {},
187
601
  headers,
@@ -189,15 +603,29 @@ function createResourceRequest(config) {
189
603
  };
190
604
  }
191
605
 
192
- const adapterName = 'postTriggerBenefitSessionGeneration';
193
- const postTriggerBenefitSessionGeneration_ConfigPropertyMetadata = [
606
+ const adapterName = 'postUpdateBenefitSessions';
607
+ const postUpdateBenefitSessions_ConfigPropertyMetadata = [
194
608
  generateParamConfigMetadata('benefitScheduleId', true, 0 /* UrlParameter */, 0 /* String */),
609
+ generateParamConfigMetadata('upsertSessions', false, 2 /* Body */, 4 /* Unsupported */, true),
610
+ generateParamConfigMetadata('deleteSessions', false, 2 /* Body */, 0 /* String */, true),
195
611
  ];
196
- const postTriggerBenefitSessionGeneration_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, postTriggerBenefitSessionGeneration_ConfigPropertyMetadata);
197
- const createResourceParams = /*#__PURE__*/ createResourceParams$1(postTriggerBenefitSessionGeneration_ConfigPropertyMetadata);
612
+ const postUpdateBenefitSessions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, postUpdateBenefitSessions_ConfigPropertyMetadata);
613
+ const createResourceParams = /*#__PURE__*/ createResourceParams$3(postUpdateBenefitSessions_ConfigPropertyMetadata);
198
614
  function typeCheckConfig(untrustedConfig) {
199
615
  const config = {};
200
- typeCheckConfig$1(untrustedConfig, config, postTriggerBenefitSessionGeneration_ConfigPropertyMetadata);
616
+ typeCheckConfig$3(untrustedConfig, config, postUpdateBenefitSessions_ConfigPropertyMetadata);
617
+ const untrustedConfig_upsertSessions = untrustedConfig.upsertSessions;
618
+ if (ArrayIsArray$1(untrustedConfig_upsertSessions)) {
619
+ const untrustedConfig_upsertSessions_array = [];
620
+ for (let i = 0, arrayLength = untrustedConfig_upsertSessions.length; i < arrayLength; i++) {
621
+ const untrustedConfig_upsertSessions_item = untrustedConfig_upsertSessions[i];
622
+ const referenceBenefitSessionUpsertInputRepresentationValidationError = validate$1(untrustedConfig_upsertSessions_item);
623
+ if (referenceBenefitSessionUpsertInputRepresentationValidationError === null) {
624
+ untrustedConfig_upsertSessions_array.push(untrustedConfig_upsertSessions_item);
625
+ }
626
+ }
627
+ config.upsertSessions = untrustedConfig_upsertSessions_array;
628
+ }
201
629
  return config;
202
630
  }
203
631
  function validateAdapterConfig(untrustedConfig, configPropertyNames) {
@@ -231,18 +659,20 @@ function buildNetworkSnapshot(luvio, config, options) {
231
659
  throw response;
232
660
  });
233
661
  }
234
- const postTriggerBenefitSessionGenerationAdapterFactory = (luvio) => {
235
- return function postTriggerBenefitSessionGeneration(untrustedConfig) {
236
- const config = validateAdapterConfig(untrustedConfig, postTriggerBenefitSessionGeneration_ConfigPropertyNames);
662
+ const postUpdateBenefitSessionsAdapterFactory = (luvio) => {
663
+ return function postUpdateBenefitSessions(untrustedConfig) {
664
+ const config = validateAdapterConfig(untrustedConfig, postUpdateBenefitSessions_ConfigPropertyNames);
237
665
  // Invalid or incomplete config
238
666
  if (config === null) {
239
- throw new Error('Invalid config for "postTriggerBenefitSessionGeneration"');
667
+ throw new Error('Invalid config for "postUpdateBenefitSessions"');
240
668
  }
241
669
  return buildNetworkSnapshot(luvio, config);
242
670
  };
243
671
  };
244
672
 
673
+ let postBenefitSessionsPreview;
245
674
  let postTriggerBenefitSessionGeneration;
675
+ let postUpdateBenefitSessions;
246
676
  // Notify Update Available
247
677
  function bindExportsTo(luvio) {
248
678
  // LDS Adapters
@@ -251,14 +681,20 @@ function bindExportsTo(luvio) {
251
681
  return (config) => adapter(config).then((snapshot) => snapshot.data);
252
682
  }
253
683
  return {
684
+ postBenefitSessionsPreview: unwrapSnapshotData(postBenefitSessionsPreviewAdapterFactory),
254
685
  postTriggerBenefitSessionGeneration: unwrapSnapshotData(postTriggerBenefitSessionGenerationAdapterFactory),
686
+ postUpdateBenefitSessions: unwrapSnapshotData(postUpdateBenefitSessionsAdapterFactory),
255
687
  // Imperative GET Adapters
256
688
  // Notify Update Availables
257
689
  };
258
690
  }
259
691
  withDefaultLuvio((luvio) => {
260
- ({ postTriggerBenefitSessionGeneration } = bindExportsTo(luvio));
692
+ ({
693
+ postBenefitSessionsPreview,
694
+ postTriggerBenefitSessionGeneration,
695
+ postUpdateBenefitSessions,
696
+ } = bindExportsTo(luvio));
261
697
  });
262
698
 
263
- export { postTriggerBenefitSessionGeneration };
264
- // version: 1.451.0-dev4-4d3d402e25
699
+ export { postBenefitSessionsPreview, postTriggerBenefitSessionGeneration, postUpdateBenefitSessions };
700
+ // version: 1.451.0-dev6-6ec7cea03f