@salesforce/lds-adapters-industries-program-mgmt 1.451.0-dev5 → 1.451.0-dev7
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/dist/es/es2018/industries-program-mgmt.js +449 -21
- package/dist/es/es2018/types/src/generated/adapters/postBenefitSessionsPreview.d.ts +23 -0
- package/dist/es/es2018/types/src/generated/adapters/postUpdateBenefitSessions.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +3 -1
- package/dist/es/es2018/types/src/generated/resources/postConnectProgramMgmtBenefitSchedules.d.ts +20 -0
- package/dist/es/es2018/types/src/generated/resources/postConnectProgramMgmtBenefitSchedulesSessionUpdatesByBenefitScheduleId.d.ts +17 -0
- package/dist/es/es2018/types/src/generated/types/BenefitSessionUpsertInputRepresentation.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/types/BenefitSessions.d.ts +34 -0
- package/dist/es/es2018/types/src/generated/types/PreviewBenefitSessionInputRepresentation.d.ts +52 -0
- package/dist/es/es2018/types/src/generated/types/PreviewBenefitSessionsOutputRepresentation.d.ts +42 -0
- package/dist/es/es2018/types/src/generated/types/UpdateBenefitSessionsInputRepresentation.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/types/UpdateBenefitSessionsOutputRepresentation.d.ts +53 -0
- package/package.json +3 -3
- package/sfdc/index.js +459 -23
- package/src/raml/api.raml +157 -0
- package/src/raml/luvio.raml +18 -0
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$3, typeCheckConfig as typeCheckConfig$3 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
|
-
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
10
|
+
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
11
11
|
const { isArray: ArrayIsArray$1 } = Array;
|
|
12
12
|
/**
|
|
13
13
|
* Validates an adapter config is well-formed.
|
|
@@ -31,7 +31,7 @@ function validateConfig(config, adapter, oneOf) {
|
|
|
31
31
|
throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
|
|
32
32
|
}
|
|
33
33
|
const supported = required.concat(optional);
|
|
34
|
-
if (ObjectKeys(config).some(key => !supported.includes(key))) {
|
|
34
|
+
if (ObjectKeys$1(config).some(key => !supported.includes(key))) {
|
|
35
35
|
throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -64,6 +64,7 @@ function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
|
64
64
|
}
|
|
65
65
|
const keyPrefix = 'program-mgmt';
|
|
66
66
|
|
|
67
|
+
const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
|
|
67
68
|
const { isArray: ArrayIsArray } = Array;
|
|
68
69
|
const { stringify: JSONStringify } = JSON;
|
|
69
70
|
function createLink(ref) {
|
|
@@ -72,9 +73,9 @@ function createLink(ref) {
|
|
|
72
73
|
};
|
|
73
74
|
}
|
|
74
75
|
|
|
75
|
-
const TTL = 100;
|
|
76
|
-
const VERSION = "c0d0d94c035c5fa3b02194b685c79ce3";
|
|
77
|
-
function validate(obj, path = 'GenerateBenefitSessionOutputRepresentation') {
|
|
76
|
+
const TTL$2 = 100;
|
|
77
|
+
const VERSION$2 = "c0d0d94c035c5fa3b02194b685c79ce3";
|
|
78
|
+
function validate$4(obj, path = 'GenerateBenefitSessionOutputRepresentation') {
|
|
78
79
|
const v_error = (() => {
|
|
79
80
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
80
81
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -94,7 +95,420 @@ function validate(obj, path = 'GenerateBenefitSessionOutputRepresentation') {
|
|
|
94
95
|
})();
|
|
95
96
|
return v_error === undefined ? null : v_error;
|
|
96
97
|
}
|
|
97
|
-
const RepresentationType = 'GenerateBenefitSessionOutputRepresentation';
|
|
98
|
+
const RepresentationType$2 = 'GenerateBenefitSessionOutputRepresentation';
|
|
99
|
+
function keyBuilder$2(luvio, config) {
|
|
100
|
+
return keyPrefix + '::' + RepresentationType$2 + ':' + config.success;
|
|
101
|
+
}
|
|
102
|
+
function keyBuilderFromType$2(luvio, object) {
|
|
103
|
+
const keyParams = {
|
|
104
|
+
success: object.success
|
|
105
|
+
};
|
|
106
|
+
return keyBuilder$2(luvio, keyParams);
|
|
107
|
+
}
|
|
108
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
109
|
+
return input;
|
|
110
|
+
}
|
|
111
|
+
const select$5 = function GenerateBenefitSessionOutputRepresentationSelect() {
|
|
112
|
+
return {
|
|
113
|
+
kind: 'Fragment',
|
|
114
|
+
version: VERSION$2,
|
|
115
|
+
private: [],
|
|
116
|
+
opaque: true
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
function equals$2(existing, incoming) {
|
|
120
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
return true;
|
|
124
|
+
}
|
|
125
|
+
const ingest$2 = function GenerateBenefitSessionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
126
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
127
|
+
const validateError = validate$4(input);
|
|
128
|
+
if (validateError !== null) {
|
|
129
|
+
throw validateError;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
const key = keyBuilderFromType$2(luvio, input);
|
|
133
|
+
const ttlToUse = TTL$2;
|
|
134
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "program-mgmt", VERSION$2, RepresentationType$2, equals$2);
|
|
135
|
+
return createLink(key);
|
|
136
|
+
};
|
|
137
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
138
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
139
|
+
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
140
|
+
rootKeySet.set(rootKey, {
|
|
141
|
+
namespace: keyPrefix,
|
|
142
|
+
representationName: RepresentationType$2,
|
|
143
|
+
mergeable: false
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function select$4(luvio, params) {
|
|
148
|
+
return select$5();
|
|
149
|
+
}
|
|
150
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
151
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
152
|
+
}
|
|
153
|
+
function ingestSuccess$2(luvio, resourceParams, response) {
|
|
154
|
+
const { body } = response;
|
|
155
|
+
const key = keyBuilderFromType$2(luvio, body);
|
|
156
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
157
|
+
const snapshot = luvio.storeLookup({
|
|
158
|
+
recordId: key,
|
|
159
|
+
node: select$4(),
|
|
160
|
+
variables: {},
|
|
161
|
+
});
|
|
162
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
163
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
164
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
deepFreeze(snapshot.data);
|
|
168
|
+
return snapshot;
|
|
169
|
+
}
|
|
170
|
+
function createResourceRequest$2(config) {
|
|
171
|
+
const headers = {};
|
|
172
|
+
return {
|
|
173
|
+
baseUri: '/services/data/v68.0',
|
|
174
|
+
basePath: '/connect/program-mgmt/benefit-schedules/' + config.urlParams.benefitScheduleId + '/sessions',
|
|
175
|
+
method: 'post',
|
|
176
|
+
body: null,
|
|
177
|
+
urlParams: config.urlParams,
|
|
178
|
+
queryParams: {},
|
|
179
|
+
headers,
|
|
180
|
+
priority: 'normal',
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
const adapterName$2 = 'postTriggerBenefitSessionGeneration';
|
|
185
|
+
const postTriggerBenefitSessionGeneration_ConfigPropertyMetadata = [
|
|
186
|
+
generateParamConfigMetadata('benefitScheduleId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
187
|
+
];
|
|
188
|
+
const postTriggerBenefitSessionGeneration_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, postTriggerBenefitSessionGeneration_ConfigPropertyMetadata);
|
|
189
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(postTriggerBenefitSessionGeneration_ConfigPropertyMetadata);
|
|
190
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
191
|
+
const config = {};
|
|
192
|
+
typeCheckConfig$3(untrustedConfig, config, postTriggerBenefitSessionGeneration_ConfigPropertyMetadata);
|
|
193
|
+
return config;
|
|
194
|
+
}
|
|
195
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
196
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
197
|
+
return null;
|
|
198
|
+
}
|
|
199
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
200
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
201
|
+
}
|
|
202
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
203
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
204
|
+
return null;
|
|
205
|
+
}
|
|
206
|
+
return config;
|
|
207
|
+
}
|
|
208
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
209
|
+
const resourceParams = createResourceParams$2(config);
|
|
210
|
+
const request = createResourceRequest$2(resourceParams);
|
|
211
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
212
|
+
.then((response) => {
|
|
213
|
+
return luvio.handleSuccessResponse(() => {
|
|
214
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response);
|
|
215
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
216
|
+
}, () => {
|
|
217
|
+
const cache = new StoreKeyMap();
|
|
218
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
219
|
+
return cache;
|
|
220
|
+
});
|
|
221
|
+
}, (response) => {
|
|
222
|
+
deepFreeze(response);
|
|
223
|
+
throw response;
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
const postTriggerBenefitSessionGenerationAdapterFactory = (luvio) => {
|
|
227
|
+
return function postTriggerBenefitSessionGeneration(untrustedConfig) {
|
|
228
|
+
const config = validateAdapterConfig$2(untrustedConfig, postTriggerBenefitSessionGeneration_ConfigPropertyNames);
|
|
229
|
+
// Invalid or incomplete config
|
|
230
|
+
if (config === null) {
|
|
231
|
+
throw new Error('Invalid config for "postTriggerBenefitSessionGeneration"');
|
|
232
|
+
}
|
|
233
|
+
return buildNetworkSnapshot$2(luvio, config);
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
function validate$3(obj, path = 'BenefitSessions') {
|
|
238
|
+
const v_error = (() => {
|
|
239
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
240
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
241
|
+
}
|
|
242
|
+
const obj_endDate = obj.endDate;
|
|
243
|
+
const path_endDate = path + '.endDate';
|
|
244
|
+
if (typeof obj_endDate !== 'string') {
|
|
245
|
+
return new TypeError('Expected "string" but received "' + typeof obj_endDate + '" (at "' + path_endDate + '")');
|
|
246
|
+
}
|
|
247
|
+
const obj_name = obj.name;
|
|
248
|
+
const path_name = path + '.name';
|
|
249
|
+
if (typeof obj_name !== 'string') {
|
|
250
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
251
|
+
}
|
|
252
|
+
const obj_startDate = obj.startDate;
|
|
253
|
+
const path_startDate = path + '.startDate';
|
|
254
|
+
if (typeof obj_startDate !== 'string') {
|
|
255
|
+
return new TypeError('Expected "string" but received "' + typeof obj_startDate + '" (at "' + path_startDate + '")');
|
|
256
|
+
}
|
|
257
|
+
})();
|
|
258
|
+
return v_error === undefined ? null : v_error;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
const TTL$1 = 100;
|
|
262
|
+
const VERSION$1 = "df34bd680bc967e0b41fd56d4ee79f3a";
|
|
263
|
+
function validate$2(obj, path = 'PreviewBenefitSessionsOutputRepresentation') {
|
|
264
|
+
const v_error = (() => {
|
|
265
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
266
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
267
|
+
}
|
|
268
|
+
const obj_sessions = obj.sessions;
|
|
269
|
+
const path_sessions = path + '.sessions';
|
|
270
|
+
if (!ArrayIsArray(obj_sessions)) {
|
|
271
|
+
return new TypeError('Expected "array" but received "' + typeof obj_sessions + '" (at "' + path_sessions + '")');
|
|
272
|
+
}
|
|
273
|
+
for (let i = 0; i < obj_sessions.length; i++) {
|
|
274
|
+
const obj_sessions_item = obj_sessions[i];
|
|
275
|
+
const path_sessions_item = path_sessions + '[' + i + ']';
|
|
276
|
+
const referencepath_sessions_itemValidationError = validate$3(obj_sessions_item, path_sessions_item);
|
|
277
|
+
if (referencepath_sessions_itemValidationError !== null) {
|
|
278
|
+
let message = 'Object doesn\'t match BenefitSessions (at "' + path_sessions_item + '")\n';
|
|
279
|
+
message += referencepath_sessions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
280
|
+
return new TypeError(message);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
const obj_success = obj.success;
|
|
284
|
+
const path_success = path + '.success';
|
|
285
|
+
if (typeof obj_success !== 'boolean') {
|
|
286
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_success + '" (at "' + path_success + '")');
|
|
287
|
+
}
|
|
288
|
+
})();
|
|
289
|
+
return v_error === undefined ? null : v_error;
|
|
290
|
+
}
|
|
291
|
+
const RepresentationType$1 = 'PreviewBenefitSessionsOutputRepresentation';
|
|
292
|
+
function keyBuilder$1(luvio, config) {
|
|
293
|
+
return keyPrefix + '::' + RepresentationType$1 + ':' + config.success;
|
|
294
|
+
}
|
|
295
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
296
|
+
const keyParams = {
|
|
297
|
+
success: object.success
|
|
298
|
+
};
|
|
299
|
+
return keyBuilder$1(luvio, keyParams);
|
|
300
|
+
}
|
|
301
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
302
|
+
return input;
|
|
303
|
+
}
|
|
304
|
+
const select$3 = function PreviewBenefitSessionsOutputRepresentationSelect() {
|
|
305
|
+
return {
|
|
306
|
+
kind: 'Fragment',
|
|
307
|
+
version: VERSION$1,
|
|
308
|
+
private: [],
|
|
309
|
+
opaque: true
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
function equals$1(existing, incoming) {
|
|
313
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
314
|
+
return false;
|
|
315
|
+
}
|
|
316
|
+
return true;
|
|
317
|
+
}
|
|
318
|
+
const ingest$1 = function PreviewBenefitSessionsOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
319
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
320
|
+
const validateError = validate$2(input);
|
|
321
|
+
if (validateError !== null) {
|
|
322
|
+
throw validateError;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
326
|
+
const ttlToUse = TTL$1;
|
|
327
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "program-mgmt", VERSION$1, RepresentationType$1, equals$1);
|
|
328
|
+
return createLink(key);
|
|
329
|
+
};
|
|
330
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
331
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
332
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
333
|
+
rootKeySet.set(rootKey, {
|
|
334
|
+
namespace: keyPrefix,
|
|
335
|
+
representationName: RepresentationType$1,
|
|
336
|
+
mergeable: false
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
function select$2(luvio, params) {
|
|
341
|
+
return select$3();
|
|
342
|
+
}
|
|
343
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
344
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
345
|
+
}
|
|
346
|
+
function ingestSuccess$1(luvio, resourceParams, response) {
|
|
347
|
+
const { body } = response;
|
|
348
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
349
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
350
|
+
const snapshot = luvio.storeLookup({
|
|
351
|
+
recordId: key,
|
|
352
|
+
node: select$2(),
|
|
353
|
+
variables: {},
|
|
354
|
+
});
|
|
355
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
356
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
357
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
deepFreeze(snapshot.data);
|
|
361
|
+
return snapshot;
|
|
362
|
+
}
|
|
363
|
+
function createResourceRequest$1(config) {
|
|
364
|
+
const headers = {};
|
|
365
|
+
return {
|
|
366
|
+
baseUri: '/services/data/v68.0',
|
|
367
|
+
basePath: '/connect/program-mgmt/benefit-schedules',
|
|
368
|
+
method: 'post',
|
|
369
|
+
body: config.body,
|
|
370
|
+
urlParams: {},
|
|
371
|
+
queryParams: {},
|
|
372
|
+
headers,
|
|
373
|
+
priority: 'normal',
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
const adapterName$1 = 'postBenefitSessionsPreview';
|
|
378
|
+
const postBenefitSessionsPreview_ConfigPropertyMetadata = [
|
|
379
|
+
generateParamConfigMetadata('firstSessionStartDate', false, 2 /* Body */, 0 /* String */),
|
|
380
|
+
generateParamConfigMetadata('firstSessionEndDate', false, 2 /* Body */, 0 /* String */),
|
|
381
|
+
generateParamConfigMetadata('scheduleFrequency', false, 2 /* Body */, 0 /* String */),
|
|
382
|
+
generateParamConfigMetadata('scheduleDays', false, 2 /* Body */, 3 /* Integer */),
|
|
383
|
+
generateParamConfigMetadata('totalRecurrencesCount', false, 2 /* Body */, 3 /* Integer */),
|
|
384
|
+
generateParamConfigMetadata('scheduleEndDate', false, 2 /* Body */, 0 /* String */),
|
|
385
|
+
generateParamConfigMetadata('benefitScheduleName', false, 2 /* Body */, 0 /* String */),
|
|
386
|
+
generateParamConfigMetadata('mode', false, 2 /* Body */, 0 /* String */),
|
|
387
|
+
generateParamConfigMetadata('noOfSessions', false, 2 /* Body */, 3 /* Integer */),
|
|
388
|
+
];
|
|
389
|
+
const postBenefitSessionsPreview_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, postBenefitSessionsPreview_ConfigPropertyMetadata);
|
|
390
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(postBenefitSessionsPreview_ConfigPropertyMetadata);
|
|
391
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
392
|
+
const config = {};
|
|
393
|
+
typeCheckConfig$3(untrustedConfig, config, postBenefitSessionsPreview_ConfigPropertyMetadata);
|
|
394
|
+
return config;
|
|
395
|
+
}
|
|
396
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
397
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
398
|
+
return null;
|
|
399
|
+
}
|
|
400
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
401
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
402
|
+
}
|
|
403
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
404
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
405
|
+
return null;
|
|
406
|
+
}
|
|
407
|
+
return config;
|
|
408
|
+
}
|
|
409
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
410
|
+
const resourceParams = createResourceParams$1(config);
|
|
411
|
+
const request = createResourceRequest$1(resourceParams);
|
|
412
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
413
|
+
.then((response) => {
|
|
414
|
+
return luvio.handleSuccessResponse(() => {
|
|
415
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response);
|
|
416
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
417
|
+
}, () => {
|
|
418
|
+
const cache = new StoreKeyMap();
|
|
419
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
420
|
+
return cache;
|
|
421
|
+
});
|
|
422
|
+
}, (response) => {
|
|
423
|
+
deepFreeze(response);
|
|
424
|
+
throw response;
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
const postBenefitSessionsPreviewAdapterFactory = (luvio) => {
|
|
428
|
+
return function postBenefitSessionsPreview(untrustedConfig) {
|
|
429
|
+
const config = validateAdapterConfig$1(untrustedConfig, postBenefitSessionsPreview_ConfigPropertyNames);
|
|
430
|
+
// Invalid or incomplete config
|
|
431
|
+
if (config === null) {
|
|
432
|
+
throw new Error('Invalid config for "postBenefitSessionsPreview"');
|
|
433
|
+
}
|
|
434
|
+
return buildNetworkSnapshot$1(luvio, config);
|
|
435
|
+
};
|
|
436
|
+
};
|
|
437
|
+
|
|
438
|
+
function validate$1(obj, path = 'BenefitSessionUpsertInputRepresentation') {
|
|
439
|
+
const v_error = (() => {
|
|
440
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
441
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
442
|
+
}
|
|
443
|
+
const obj_fields = obj.fields;
|
|
444
|
+
const path_fields = path + '.fields';
|
|
445
|
+
if (typeof obj_fields !== 'object' || ArrayIsArray(obj_fields) || obj_fields === null) {
|
|
446
|
+
return new TypeError('Expected "object" but received "' + typeof obj_fields + '" (at "' + path_fields + '")');
|
|
447
|
+
}
|
|
448
|
+
const obj_fields_keys = ObjectKeys(obj_fields);
|
|
449
|
+
for (let i = 0; i < obj_fields_keys.length; i++) {
|
|
450
|
+
const key = obj_fields_keys[i];
|
|
451
|
+
const obj_fields_prop = obj_fields[key];
|
|
452
|
+
const path_fields_prop = path_fields + '["' + key + '"]';
|
|
453
|
+
if (obj_fields_prop === undefined) {
|
|
454
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_fields_prop + '" (at "' + path_fields_prop + '")');
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
})();
|
|
458
|
+
return v_error === undefined ? null : v_error;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
const TTL = 100;
|
|
462
|
+
const VERSION = "5821fdcb2a41b9e59a04ab5fa43ffe40";
|
|
463
|
+
function validate(obj, path = 'UpdateBenefitSessionsOutputRepresentation') {
|
|
464
|
+
const v_error = (() => {
|
|
465
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
466
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
467
|
+
}
|
|
468
|
+
if (obj.deletedDisbursementCount !== undefined) {
|
|
469
|
+
const obj_deletedDisbursementCount = obj.deletedDisbursementCount;
|
|
470
|
+
const path_deletedDisbursementCount = path + '.deletedDisbursementCount';
|
|
471
|
+
if (typeof obj_deletedDisbursementCount !== 'number' || (typeof obj_deletedDisbursementCount === 'number' && Math.floor(obj_deletedDisbursementCount) !== obj_deletedDisbursementCount)) {
|
|
472
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_deletedDisbursementCount + '" (at "' + path_deletedDisbursementCount + '")');
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
if (obj.deletedSessionCount !== undefined) {
|
|
476
|
+
const obj_deletedSessionCount = obj.deletedSessionCount;
|
|
477
|
+
const path_deletedSessionCount = path + '.deletedSessionCount';
|
|
478
|
+
if (typeof obj_deletedSessionCount !== 'number' || (typeof obj_deletedSessionCount === 'number' && Math.floor(obj_deletedSessionCount) !== obj_deletedSessionCount)) {
|
|
479
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_deletedSessionCount + '" (at "' + path_deletedSessionCount + '")');
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
if (obj.insertedDisbursementCount !== undefined) {
|
|
483
|
+
const obj_insertedDisbursementCount = obj.insertedDisbursementCount;
|
|
484
|
+
const path_insertedDisbursementCount = path + '.insertedDisbursementCount';
|
|
485
|
+
if (typeof obj_insertedDisbursementCount !== 'number' || (typeof obj_insertedDisbursementCount === 'number' && Math.floor(obj_insertedDisbursementCount) !== obj_insertedDisbursementCount)) {
|
|
486
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_insertedDisbursementCount + '" (at "' + path_insertedDisbursementCount + '")');
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
if (obj.insertedSessionCount !== undefined) {
|
|
490
|
+
const obj_insertedSessionCount = obj.insertedSessionCount;
|
|
491
|
+
const path_insertedSessionCount = path + '.insertedSessionCount';
|
|
492
|
+
if (typeof obj_insertedSessionCount !== 'number' || (typeof obj_insertedSessionCount === 'number' && Math.floor(obj_insertedSessionCount) !== obj_insertedSessionCount)) {
|
|
493
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_insertedSessionCount + '" (at "' + path_insertedSessionCount + '")');
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
const obj_success = obj.success;
|
|
497
|
+
const path_success = path + '.success';
|
|
498
|
+
if (typeof obj_success !== 'boolean') {
|
|
499
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_success + '" (at "' + path_success + '")');
|
|
500
|
+
}
|
|
501
|
+
if (obj.updatedSessionCount !== undefined) {
|
|
502
|
+
const obj_updatedSessionCount = obj.updatedSessionCount;
|
|
503
|
+
const path_updatedSessionCount = path + '.updatedSessionCount';
|
|
504
|
+
if (typeof obj_updatedSessionCount !== 'number' || (typeof obj_updatedSessionCount === 'number' && Math.floor(obj_updatedSessionCount) !== obj_updatedSessionCount)) {
|
|
505
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_updatedSessionCount + '" (at "' + path_updatedSessionCount + '")');
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
})();
|
|
509
|
+
return v_error === undefined ? null : v_error;
|
|
510
|
+
}
|
|
511
|
+
const RepresentationType = 'UpdateBenefitSessionsOutputRepresentation';
|
|
98
512
|
function keyBuilder(luvio, config) {
|
|
99
513
|
return keyPrefix + '::' + RepresentationType + ':' + config.success;
|
|
100
514
|
}
|
|
@@ -107,7 +521,7 @@ function keyBuilderFromType(luvio, object) {
|
|
|
107
521
|
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
108
522
|
return input;
|
|
109
523
|
}
|
|
110
|
-
const select$1 = function
|
|
524
|
+
const select$1 = function UpdateBenefitSessionsOutputRepresentationSelect() {
|
|
111
525
|
return {
|
|
112
526
|
kind: 'Fragment',
|
|
113
527
|
version: VERSION,
|
|
@@ -121,7 +535,7 @@ function equals(existing, incoming) {
|
|
|
121
535
|
}
|
|
122
536
|
return true;
|
|
123
537
|
}
|
|
124
|
-
const ingest = function
|
|
538
|
+
const ingest = function UpdateBenefitSessionsOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
125
539
|
if (process.env.NODE_ENV !== 'production') {
|
|
126
540
|
const validateError = validate(input);
|
|
127
541
|
if (validateError !== null) {
|
|
@@ -170,9 +584,9 @@ function createResourceRequest(config) {
|
|
|
170
584
|
const headers = {};
|
|
171
585
|
return {
|
|
172
586
|
baseUri: '/services/data/v68.0',
|
|
173
|
-
basePath: '/connect/program-mgmt/benefit-schedules/' + config.urlParams.benefitScheduleId + '/
|
|
587
|
+
basePath: '/connect/program-mgmt/benefit-schedules/' + config.urlParams.benefitScheduleId + '/session-updates',
|
|
174
588
|
method: 'post',
|
|
175
|
-
body:
|
|
589
|
+
body: config.body,
|
|
176
590
|
urlParams: config.urlParams,
|
|
177
591
|
queryParams: {},
|
|
178
592
|
headers,
|
|
@@ -180,15 +594,29 @@ function createResourceRequest(config) {
|
|
|
180
594
|
};
|
|
181
595
|
}
|
|
182
596
|
|
|
183
|
-
const adapterName = '
|
|
184
|
-
const
|
|
597
|
+
const adapterName = 'postUpdateBenefitSessions';
|
|
598
|
+
const postUpdateBenefitSessions_ConfigPropertyMetadata = [
|
|
185
599
|
generateParamConfigMetadata('benefitScheduleId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
600
|
+
generateParamConfigMetadata('upsertSessions', false, 2 /* Body */, 4 /* Unsupported */, true),
|
|
601
|
+
generateParamConfigMetadata('deleteSessions', false, 2 /* Body */, 0 /* String */, true),
|
|
186
602
|
];
|
|
187
|
-
const
|
|
188
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
603
|
+
const postUpdateBenefitSessions_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, postUpdateBenefitSessions_ConfigPropertyMetadata);
|
|
604
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$3(postUpdateBenefitSessions_ConfigPropertyMetadata);
|
|
189
605
|
function typeCheckConfig(untrustedConfig) {
|
|
190
606
|
const config = {};
|
|
191
|
-
typeCheckConfig$
|
|
607
|
+
typeCheckConfig$3(untrustedConfig, config, postUpdateBenefitSessions_ConfigPropertyMetadata);
|
|
608
|
+
const untrustedConfig_upsertSessions = untrustedConfig.upsertSessions;
|
|
609
|
+
if (ArrayIsArray$1(untrustedConfig_upsertSessions)) {
|
|
610
|
+
const untrustedConfig_upsertSessions_array = [];
|
|
611
|
+
for (let i = 0, arrayLength = untrustedConfig_upsertSessions.length; i < arrayLength; i++) {
|
|
612
|
+
const untrustedConfig_upsertSessions_item = untrustedConfig_upsertSessions[i];
|
|
613
|
+
const referenceBenefitSessionUpsertInputRepresentationValidationError = validate$1(untrustedConfig_upsertSessions_item);
|
|
614
|
+
if (referenceBenefitSessionUpsertInputRepresentationValidationError === null) {
|
|
615
|
+
untrustedConfig_upsertSessions_array.push(untrustedConfig_upsertSessions_item);
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
config.upsertSessions = untrustedConfig_upsertSessions_array;
|
|
619
|
+
}
|
|
192
620
|
return config;
|
|
193
621
|
}
|
|
194
622
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -222,15 +650,15 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
222
650
|
throw response;
|
|
223
651
|
});
|
|
224
652
|
}
|
|
225
|
-
const
|
|
226
|
-
return function
|
|
227
|
-
const config = validateAdapterConfig(untrustedConfig,
|
|
653
|
+
const postUpdateBenefitSessionsAdapterFactory = (luvio) => {
|
|
654
|
+
return function postUpdateBenefitSessions(untrustedConfig) {
|
|
655
|
+
const config = validateAdapterConfig(untrustedConfig, postUpdateBenefitSessions_ConfigPropertyNames);
|
|
228
656
|
// Invalid or incomplete config
|
|
229
657
|
if (config === null) {
|
|
230
|
-
throw new Error('Invalid config for "
|
|
658
|
+
throw new Error('Invalid config for "postUpdateBenefitSessions"');
|
|
231
659
|
}
|
|
232
660
|
return buildNetworkSnapshot(luvio, config);
|
|
233
661
|
};
|
|
234
662
|
};
|
|
235
663
|
|
|
236
|
-
export { postTriggerBenefitSessionGenerationAdapterFactory };
|
|
664
|
+
export { postBenefitSessionsPreviewAdapterFactory, postTriggerBenefitSessionGenerationAdapterFactory, postUpdateBenefitSessionsAdapterFactory };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
|
|
2
|
+
import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
|
|
3
|
+
import { ResourceRequestConfig as resources_postConnectProgramMgmtBenefitSchedules_ResourceRequestConfig } from '../resources/postConnectProgramMgmtBenefitSchedules';
|
|
4
|
+
import { PreviewBenefitSessionsOutputRepresentation as types_PreviewBenefitSessionsOutputRepresentation_PreviewBenefitSessionsOutputRepresentation } from '../types/PreviewBenefitSessionsOutputRepresentation';
|
|
5
|
+
export declare const adapterName = "postBenefitSessionsPreview";
|
|
6
|
+
export declare const postBenefitSessionsPreview_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
7
|
+
export declare const postBenefitSessionsPreview_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
8
|
+
export interface PostBenefitSessionsPreviewConfig {
|
|
9
|
+
firstSessionStartDate?: string;
|
|
10
|
+
firstSessionEndDate?: string;
|
|
11
|
+
scheduleFrequency?: string;
|
|
12
|
+
scheduleDays?: number;
|
|
13
|
+
totalRecurrencesCount?: number;
|
|
14
|
+
scheduleEndDate?: string;
|
|
15
|
+
benefitScheduleName?: string;
|
|
16
|
+
mode?: string;
|
|
17
|
+
noOfSessions?: number;
|
|
18
|
+
}
|
|
19
|
+
export declare const createResourceParams: (config: PostBenefitSessionsPreviewConfig) => resources_postConnectProgramMgmtBenefitSchedules_ResourceRequestConfig;
|
|
20
|
+
export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<PostBenefitSessionsPreviewConfig>): adapter$45$utils_Untrusted<PostBenefitSessionsPreviewConfig>;
|
|
21
|
+
export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): PostBenefitSessionsPreviewConfig | null;
|
|
22
|
+
export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: PostBenefitSessionsPreviewConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<import("@luvio/engine").FulfilledSnapshot<types_PreviewBenefitSessionsOutputRepresentation_PreviewBenefitSessionsOutputRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_PreviewBenefitSessionsOutputRepresentation_PreviewBenefitSessionsOutputRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_PreviewBenefitSessionsOutputRepresentation_PreviewBenefitSessionsOutputRepresentation, any>>;
|
|
23
|
+
export declare const postBenefitSessionsPreviewAdapterFactory: $64$luvio_engine_AdapterFactory<PostBenefitSessionsPreviewConfig, types_PreviewBenefitSessionsOutputRepresentation_PreviewBenefitSessionsOutputRepresentation>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
|
|
2
|
+
import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
|
|
3
|
+
import { BenefitSessionUpsertInputRepresentation as types_BenefitSessionUpsertInputRepresentation_BenefitSessionUpsertInputRepresentation } from '../types/BenefitSessionUpsertInputRepresentation';
|
|
4
|
+
import { ResourceRequestConfig as resources_postConnectProgramMgmtBenefitSchedulesSessionUpdatesByBenefitScheduleId_ResourceRequestConfig } from '../resources/postConnectProgramMgmtBenefitSchedulesSessionUpdatesByBenefitScheduleId';
|
|
5
|
+
import { UpdateBenefitSessionsOutputRepresentation as types_UpdateBenefitSessionsOutputRepresentation_UpdateBenefitSessionsOutputRepresentation } from '../types/UpdateBenefitSessionsOutputRepresentation';
|
|
6
|
+
export declare const adapterName = "postUpdateBenefitSessions";
|
|
7
|
+
export declare const postUpdateBenefitSessions_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
8
|
+
export declare const postUpdateBenefitSessions_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
9
|
+
export interface PostUpdateBenefitSessionsConfig {
|
|
10
|
+
benefitScheduleId: string;
|
|
11
|
+
upsertSessions?: Array<types_BenefitSessionUpsertInputRepresentation_BenefitSessionUpsertInputRepresentation>;
|
|
12
|
+
deleteSessions?: Array<string>;
|
|
13
|
+
}
|
|
14
|
+
export declare const createResourceParams: (config: PostUpdateBenefitSessionsConfig) => resources_postConnectProgramMgmtBenefitSchedulesSessionUpdatesByBenefitScheduleId_ResourceRequestConfig;
|
|
15
|
+
export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<PostUpdateBenefitSessionsConfig>): adapter$45$utils_Untrusted<PostUpdateBenefitSessionsConfig>;
|
|
16
|
+
export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): PostUpdateBenefitSessionsConfig | null;
|
|
17
|
+
export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: PostUpdateBenefitSessionsConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<import("@luvio/engine").FulfilledSnapshot<types_UpdateBenefitSessionsOutputRepresentation_UpdateBenefitSessionsOutputRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_UpdateBenefitSessionsOutputRepresentation_UpdateBenefitSessionsOutputRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_UpdateBenefitSessionsOutputRepresentation_UpdateBenefitSessionsOutputRepresentation, any>>;
|
|
18
|
+
export declare const postUpdateBenefitSessionsAdapterFactory: $64$luvio_engine_AdapterFactory<PostUpdateBenefitSessionsConfig, types_UpdateBenefitSessionsOutputRepresentation_UpdateBenefitSessionsOutputRepresentation>;
|
|
@@ -1 +1,3 @@
|
|
|
1
1
|
export { postTriggerBenefitSessionGenerationAdapterFactory } from '../adapters/postTriggerBenefitSessionGeneration';
|
|
2
|
+
export { postBenefitSessionsPreviewAdapterFactory } from '../adapters/postBenefitSessionsPreview';
|
|
3
|
+
export { postUpdateBenefitSessionsAdapterFactory } from '../adapters/postUpdateBenefitSessions';
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
declare let postBenefitSessionsPreview: any;
|
|
1
2
|
declare let postTriggerBenefitSessionGeneration: any;
|
|
2
|
-
|
|
3
|
+
declare let postUpdateBenefitSessions: any;
|
|
4
|
+
export { postBenefitSessionsPreview, postTriggerBenefitSessionGeneration, postUpdateBenefitSessions, };
|
package/dist/es/es2018/types/src/generated/resources/postConnectProgramMgmtBenefitSchedules.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment, FetchResponse as $64$luvio_engine_FetchResponse, FulfilledSnapshot as $64$luvio_engine_FulfilledSnapshot, StaleSnapshot as $64$luvio_engine_StaleSnapshot, PendingSnapshot as $64$luvio_engine_PendingSnapshot, ResourceRequest as $64$luvio_engine_ResourceRequest } from '@luvio/engine';
|
|
2
|
+
import { PreviewBenefitSessionsOutputRepresentation as types_PreviewBenefitSessionsOutputRepresentation_PreviewBenefitSessionsOutputRepresentation } from '../types/PreviewBenefitSessionsOutputRepresentation';
|
|
3
|
+
export interface ResourceRequestConfig {
|
|
4
|
+
body: {
|
|
5
|
+
firstSessionStartDate?: string;
|
|
6
|
+
firstSessionEndDate?: string;
|
|
7
|
+
scheduleFrequency?: string;
|
|
8
|
+
scheduleDays?: number;
|
|
9
|
+
totalRecurrencesCount?: number;
|
|
10
|
+
scheduleEndDate?: string;
|
|
11
|
+
benefitScheduleName?: string;
|
|
12
|
+
mode?: string;
|
|
13
|
+
noOfSessions?: number;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
|
|
17
|
+
export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_PreviewBenefitSessionsOutputRepresentation_PreviewBenefitSessionsOutputRepresentation): void;
|
|
18
|
+
export declare function ingestSuccess(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_PreviewBenefitSessionsOutputRepresentation_PreviewBenefitSessionsOutputRepresentation>): $64$luvio_engine_FulfilledSnapshot<types_PreviewBenefitSessionsOutputRepresentation_PreviewBenefitSessionsOutputRepresentation, {}> | $64$luvio_engine_StaleSnapshot<types_PreviewBenefitSessionsOutputRepresentation_PreviewBenefitSessionsOutputRepresentation, {}> | $64$luvio_engine_PendingSnapshot<types_PreviewBenefitSessionsOutputRepresentation_PreviewBenefitSessionsOutputRepresentation, any>;
|
|
19
|
+
export declare function createResourceRequest(config: ResourceRequestConfig): $64$luvio_engine_ResourceRequest;
|
|
20
|
+
export default createResourceRequest;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BenefitSessionUpsertInputRepresentation as types_BenefitSessionUpsertInputRepresentation_BenefitSessionUpsertInputRepresentation } from '../types/BenefitSessionUpsertInputRepresentation';
|
|
2
|
+
import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment, FetchResponse as $64$luvio_engine_FetchResponse, FulfilledSnapshot as $64$luvio_engine_FulfilledSnapshot, StaleSnapshot as $64$luvio_engine_StaleSnapshot, PendingSnapshot as $64$luvio_engine_PendingSnapshot, ResourceRequest as $64$luvio_engine_ResourceRequest } from '@luvio/engine';
|
|
3
|
+
import { UpdateBenefitSessionsOutputRepresentation as types_UpdateBenefitSessionsOutputRepresentation_UpdateBenefitSessionsOutputRepresentation } from '../types/UpdateBenefitSessionsOutputRepresentation';
|
|
4
|
+
export interface ResourceRequestConfig {
|
|
5
|
+
urlParams: {
|
|
6
|
+
benefitScheduleId: string;
|
|
7
|
+
};
|
|
8
|
+
body: {
|
|
9
|
+
upsertSessions?: Array<types_BenefitSessionUpsertInputRepresentation_BenefitSessionUpsertInputRepresentation>;
|
|
10
|
+
deleteSessions?: Array<string>;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
|
|
14
|
+
export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_UpdateBenefitSessionsOutputRepresentation_UpdateBenefitSessionsOutputRepresentation): void;
|
|
15
|
+
export declare function ingestSuccess(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_UpdateBenefitSessionsOutputRepresentation_UpdateBenefitSessionsOutputRepresentation>): $64$luvio_engine_FulfilledSnapshot<types_UpdateBenefitSessionsOutputRepresentation_UpdateBenefitSessionsOutputRepresentation, {}> | $64$luvio_engine_StaleSnapshot<types_UpdateBenefitSessionsOutputRepresentation_UpdateBenefitSessionsOutputRepresentation, {}> | $64$luvio_engine_PendingSnapshot<types_UpdateBenefitSessionsOutputRepresentation_UpdateBenefitSessionsOutputRepresentation, any>;
|
|
16
|
+
export declare function createResourceRequest(config: ResourceRequestConfig): $64$luvio_engine_ResourceRequest;
|
|
17
|
+
export default createResourceRequest;
|