@salesforce/lds-adapters-service-serviceplan 1.308.0-dev4 → 1.308.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/dist/es/es2018/service-serviceplan.js +945 -187
- package/dist/es/es2018/types/src/generated/adapters/generateServicePlan.d.ts +21 -0
- package/dist/es/es2018/types/src/generated/adapters/getGenerationRequest.d.ts +27 -0
- package/dist/es/es2018/types/src/generated/adapters/getServicePlan.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +3 -1
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +7 -2
- package/dist/es/es2018/types/src/generated/resources/getConnectServicePlanGenerationRequestsByRequestId.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/resources/getConnectServicePlanServicePlanDetailsByRecordId.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/resources/postConnectServicePlanGenerationRequests.d.ts +5 -4
- package/dist/es/es2018/types/src/generated/types/ServicePlanDetailsOutputRepresentation.d.ts +59 -0
- package/dist/es/es2018/types/src/generated/types/ServicePlanDetailsRepresentation.d.ts +47 -0
- package/dist/es/es2018/types/src/generated/types/ServicePlanGenerationInputParamRepresentation.d.ts +3 -3
- package/dist/es/es2018/types/src/generated/types/{ServicePlanGenerationSyncOutputRepresentation.d.ts → ServicePlanGenerationOutputRepresentation.d.ts} +18 -20
- package/dist/es/es2018/types/src/generated/types/ServicePlanStepDetailsRepresentation.d.ts +40 -0
- package/dist/es/es2018/types/src/generated/types/ServicePlanStepRepresentation.d.ts +10 -13
- package/package.json +3 -3
- package/sfdc/index.js +1019 -192
- package/src/raml/api.raml +130 -21
- package/src/raml/luvio.raml +23 -3
- package/dist/es/es2018/types/src/generated/adapters/generateSync.d.ts +0 -20
|
@@ -4,7 +4,7 @@
|
|
|
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$4, typeCheckConfig as typeCheckConfig$4, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -41,6 +41,13 @@ function untrustedIsObject(untrusted) {
|
|
|
41
41
|
function areRequiredParametersPresent(config, configPropertyNames) {
|
|
42
42
|
return configPropertyNames.parameters.required.every(req => req in config);
|
|
43
43
|
}
|
|
44
|
+
const snapshotRefreshOptions = {
|
|
45
|
+
overrides: {
|
|
46
|
+
headers: {
|
|
47
|
+
'Cache-Control': 'no-cache',
|
|
48
|
+
},
|
|
49
|
+
}
|
|
50
|
+
};
|
|
44
51
|
function generateParamConfigMetadata(name, required, resourceType, typeCheckShape, isArrayShape = false, coerceFn) {
|
|
45
52
|
return {
|
|
46
53
|
name,
|
|
@@ -85,8 +92,8 @@ function createLink(ref) {
|
|
|
85
92
|
};
|
|
86
93
|
}
|
|
87
94
|
|
|
88
|
-
const VERSION$
|
|
89
|
-
function validate$
|
|
95
|
+
const VERSION$5 = "de8249c0171ece44729fbb33b422a074";
|
|
96
|
+
function validate$8(obj, path = 'ServicePlanStepExecutionStatusRepresentation') {
|
|
90
97
|
const v_error = (() => {
|
|
91
98
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
92
99
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -125,48 +132,48 @@ function validate$5(obj, path = 'ServicePlanStepExecutionStatusRepresentation')
|
|
|
125
132
|
})();
|
|
126
133
|
return v_error === undefined ? null : v_error;
|
|
127
134
|
}
|
|
128
|
-
const RepresentationType$
|
|
129
|
-
function normalize$
|
|
135
|
+
const RepresentationType$5 = 'ServicePlanStepExecutionStatusRepresentation';
|
|
136
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
130
137
|
return input;
|
|
131
138
|
}
|
|
132
|
-
const select$
|
|
139
|
+
const select$9 = function ServicePlanStepExecutionStatusRepresentationSelect() {
|
|
133
140
|
return {
|
|
134
141
|
kind: 'Fragment',
|
|
135
|
-
version: VERSION$
|
|
142
|
+
version: VERSION$5,
|
|
136
143
|
private: [],
|
|
137
144
|
opaque: true
|
|
138
145
|
};
|
|
139
146
|
};
|
|
140
|
-
function equals$
|
|
147
|
+
function equals$5(existing, incoming) {
|
|
141
148
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
142
149
|
return false;
|
|
143
150
|
}
|
|
144
151
|
return true;
|
|
145
152
|
}
|
|
146
|
-
const ingest$
|
|
153
|
+
const ingest$5 = function ServicePlanStepExecutionStatusRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
147
154
|
if (process.env.NODE_ENV !== 'production') {
|
|
148
|
-
const validateError = validate$
|
|
155
|
+
const validateError = validate$8(input);
|
|
149
156
|
if (validateError !== null) {
|
|
150
157
|
throw validateError;
|
|
151
158
|
}
|
|
152
159
|
}
|
|
153
160
|
const key = path.fullPath;
|
|
154
161
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 500;
|
|
155
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
162
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "ServicePlan", VERSION$5, RepresentationType$5, equals$5);
|
|
156
163
|
return createLink(key);
|
|
157
164
|
};
|
|
158
|
-
function getTypeCacheKeys$
|
|
165
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
159
166
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
160
167
|
const rootKey = fullPathFactory();
|
|
161
168
|
rootKeySet.set(rootKey, {
|
|
162
169
|
namespace: keyPrefix,
|
|
163
|
-
representationName: RepresentationType$
|
|
170
|
+
representationName: RepresentationType$5,
|
|
164
171
|
mergeable: false
|
|
165
172
|
});
|
|
166
173
|
}
|
|
167
174
|
|
|
168
|
-
const VERSION$
|
|
169
|
-
function validate$
|
|
175
|
+
const VERSION$4 = "f3a6de28bf56634adca757ba07accf43";
|
|
176
|
+
function validate$7(obj, path = 'ServicePlanExecutionOutputRepresentation') {
|
|
170
177
|
const v_error = (() => {
|
|
171
178
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
172
179
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -191,23 +198,23 @@ function validate$4(obj, path = 'ServicePlanExecutionOutputRepresentation') {
|
|
|
191
198
|
})();
|
|
192
199
|
return v_error === undefined ? null : v_error;
|
|
193
200
|
}
|
|
194
|
-
const RepresentationType$
|
|
195
|
-
function keyBuilder$
|
|
196
|
-
return keyPrefix + '::' + RepresentationType$
|
|
201
|
+
const RepresentationType$4 = 'ServicePlanExecutionOutputRepresentation';
|
|
202
|
+
function keyBuilder$6(luvio, config) {
|
|
203
|
+
return keyPrefix + '::' + RepresentationType$4 + ':' + config.id;
|
|
197
204
|
}
|
|
198
|
-
function keyBuilderFromType$
|
|
205
|
+
function keyBuilderFromType$2(luvio, object) {
|
|
199
206
|
const keyParams = {
|
|
200
207
|
id: object.executionStatus
|
|
201
208
|
};
|
|
202
|
-
return keyBuilder$
|
|
209
|
+
return keyBuilder$6(luvio, keyParams);
|
|
203
210
|
}
|
|
204
|
-
function normalize$
|
|
211
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
205
212
|
const input_planSteps = input.planSteps;
|
|
206
213
|
const input_planSteps_id = path.fullPath + '__planSteps';
|
|
207
214
|
for (let i = 0; i < input_planSteps.length; i++) {
|
|
208
215
|
const input_planSteps_item = input_planSteps[i];
|
|
209
216
|
let input_planSteps_item_id = input_planSteps_id + '__' + i;
|
|
210
|
-
input_planSteps[i] = ingest$
|
|
217
|
+
input_planSteps[i] = ingest$5(input_planSteps_item, {
|
|
211
218
|
fullPath: input_planSteps_item_id,
|
|
212
219
|
propertyName: i,
|
|
213
220
|
parent: {
|
|
@@ -220,10 +227,10 @@ function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
|
220
227
|
}
|
|
221
228
|
return input;
|
|
222
229
|
}
|
|
223
|
-
const select$
|
|
230
|
+
const select$8 = function ServicePlanExecutionOutputRepresentationSelect() {
|
|
224
231
|
return {
|
|
225
232
|
kind: 'Fragment',
|
|
226
|
-
version: VERSION$
|
|
233
|
+
version: VERSION$4,
|
|
227
234
|
private: [],
|
|
228
235
|
selections: [
|
|
229
236
|
{
|
|
@@ -234,12 +241,12 @@ const select$4 = function ServicePlanExecutionOutputRepresentationSelect() {
|
|
|
234
241
|
name: 'planSteps',
|
|
235
242
|
kind: 'Link',
|
|
236
243
|
plural: true,
|
|
237
|
-
fragment: select$
|
|
244
|
+
fragment: select$9()
|
|
238
245
|
}
|
|
239
246
|
]
|
|
240
247
|
};
|
|
241
248
|
};
|
|
242
|
-
function equals$
|
|
249
|
+
function equals$4(existing, incoming) {
|
|
243
250
|
const existing_executionStatus = existing.executionStatus;
|
|
244
251
|
const incoming_executionStatus = incoming.executionStatus;
|
|
245
252
|
if (!(existing_executionStatus === incoming_executionStatus)) {
|
|
@@ -257,45 +264,45 @@ function equals$2(existing, incoming) {
|
|
|
257
264
|
}
|
|
258
265
|
return true;
|
|
259
266
|
}
|
|
260
|
-
const ingest$
|
|
267
|
+
const ingest$4 = function ServicePlanExecutionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
261
268
|
if (process.env.NODE_ENV !== 'production') {
|
|
262
|
-
const validateError = validate$
|
|
269
|
+
const validateError = validate$7(input);
|
|
263
270
|
if (validateError !== null) {
|
|
264
271
|
throw validateError;
|
|
265
272
|
}
|
|
266
273
|
}
|
|
267
|
-
const key = keyBuilderFromType$
|
|
274
|
+
const key = keyBuilderFromType$2(luvio, input);
|
|
268
275
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 500;
|
|
269
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
276
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "ServicePlan", VERSION$4, RepresentationType$4, equals$4);
|
|
270
277
|
return createLink(key);
|
|
271
278
|
};
|
|
272
|
-
function getTypeCacheKeys$
|
|
279
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
273
280
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
274
|
-
const rootKey = keyBuilderFromType$
|
|
281
|
+
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
275
282
|
rootKeySet.set(rootKey, {
|
|
276
283
|
namespace: keyPrefix,
|
|
277
|
-
representationName: RepresentationType$
|
|
284
|
+
representationName: RepresentationType$4,
|
|
278
285
|
mergeable: false
|
|
279
286
|
});
|
|
280
287
|
const input_planSteps_length = input.planSteps.length;
|
|
281
288
|
for (let i = 0; i < input_planSteps_length; i++) {
|
|
282
|
-
getTypeCacheKeys$
|
|
289
|
+
getTypeCacheKeys$5(rootKeySet, luvio, input.planSteps[i], () => '');
|
|
283
290
|
}
|
|
284
291
|
}
|
|
285
292
|
|
|
286
|
-
function select$
|
|
287
|
-
return select$
|
|
293
|
+
function select$7(luvio, params) {
|
|
294
|
+
return select$8();
|
|
288
295
|
}
|
|
289
|
-
function getResponseCacheKeys$
|
|
290
|
-
getTypeCacheKeys$
|
|
296
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
297
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response);
|
|
291
298
|
}
|
|
292
|
-
function ingestSuccess$
|
|
299
|
+
function ingestSuccess$3(luvio, resourceParams, response) {
|
|
293
300
|
const { body } = response;
|
|
294
|
-
const key = keyBuilderFromType$
|
|
295
|
-
luvio.storeIngest(key, ingest$
|
|
301
|
+
const key = keyBuilderFromType$2(luvio, body);
|
|
302
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
296
303
|
const snapshot = luvio.storeLookup({
|
|
297
304
|
recordId: key,
|
|
298
|
-
node: select$
|
|
305
|
+
node: select$7(),
|
|
299
306
|
variables: {},
|
|
300
307
|
});
|
|
301
308
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -306,7 +313,7 @@ function ingestSuccess$1(luvio, resourceParams, response) {
|
|
|
306
313
|
deepFreeze(snapshot.data);
|
|
307
314
|
return snapshot;
|
|
308
315
|
}
|
|
309
|
-
function createResourceRequest$
|
|
316
|
+
function createResourceRequest$3(config) {
|
|
310
317
|
const headers = {};
|
|
311
318
|
return {
|
|
312
319
|
baseUri: '/services/data/v62.0',
|
|
@@ -320,42 +327,42 @@ function createResourceRequest$1(config) {
|
|
|
320
327
|
};
|
|
321
328
|
}
|
|
322
329
|
|
|
323
|
-
const adapterName$
|
|
330
|
+
const adapterName$3 = 'executeServicePlan';
|
|
324
331
|
const executeServicePlan_ConfigPropertyMetadata = [
|
|
325
332
|
generateParamConfigMetadata('planOrStepId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
326
333
|
generateParamConfigMetadata('action', true, 2 /* Body */, 0 /* String */),
|
|
327
334
|
];
|
|
328
|
-
const executeServicePlan_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
329
|
-
const createResourceParams$
|
|
330
|
-
function typeCheckConfig$
|
|
335
|
+
const executeServicePlan_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, executeServicePlan_ConfigPropertyMetadata);
|
|
336
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$4(executeServicePlan_ConfigPropertyMetadata);
|
|
337
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
331
338
|
const config = {};
|
|
332
|
-
typeCheckConfig$
|
|
339
|
+
typeCheckConfig$4(untrustedConfig, config, executeServicePlan_ConfigPropertyMetadata);
|
|
333
340
|
return config;
|
|
334
341
|
}
|
|
335
|
-
function validateAdapterConfig$
|
|
342
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
336
343
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
337
344
|
return null;
|
|
338
345
|
}
|
|
339
346
|
if (process.env.NODE_ENV !== 'production') {
|
|
340
347
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
341
348
|
}
|
|
342
|
-
const config = typeCheckConfig$
|
|
349
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
343
350
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
344
351
|
return null;
|
|
345
352
|
}
|
|
346
353
|
return config;
|
|
347
354
|
}
|
|
348
|
-
function buildNetworkSnapshot$
|
|
349
|
-
const resourceParams = createResourceParams$
|
|
350
|
-
const request = createResourceRequest$
|
|
355
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
356
|
+
const resourceParams = createResourceParams$3(config);
|
|
357
|
+
const request = createResourceRequest$3(resourceParams);
|
|
351
358
|
return luvio.dispatchResourceRequest(request, options)
|
|
352
359
|
.then((response) => {
|
|
353
360
|
return luvio.handleSuccessResponse(() => {
|
|
354
|
-
const snapshot = ingestSuccess$
|
|
361
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response);
|
|
355
362
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
356
363
|
}, () => {
|
|
357
364
|
const cache = new StoreKeyMap();
|
|
358
|
-
getResponseCacheKeys$
|
|
365
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
359
366
|
return cache;
|
|
360
367
|
});
|
|
361
368
|
}, (response) => {
|
|
@@ -365,16 +372,16 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
365
372
|
}
|
|
366
373
|
const executeServicePlanAdapterFactory = (luvio) => {
|
|
367
374
|
return function executeServicePlan(untrustedConfig) {
|
|
368
|
-
const config = validateAdapterConfig$
|
|
375
|
+
const config = validateAdapterConfig$3(untrustedConfig, executeServicePlan_ConfigPropertyNames);
|
|
369
376
|
// Invalid or incomplete config
|
|
370
377
|
if (config === null) {
|
|
371
378
|
throw new Error('Invalid config for "executeServicePlan"');
|
|
372
379
|
}
|
|
373
|
-
return buildNetworkSnapshot$
|
|
380
|
+
return buildNetworkSnapshot$3(luvio, config);
|
|
374
381
|
};
|
|
375
382
|
};
|
|
376
383
|
|
|
377
|
-
function validate$
|
|
384
|
+
function validate$6(obj, path = 'ServicePlanGenerationSessionInformationOutputRepresentation') {
|
|
378
385
|
const v_error = (() => {
|
|
379
386
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
380
387
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -487,42 +494,79 @@ function validate$3(obj, path = 'ServicePlanGenerationSessionInformationOutputRe
|
|
|
487
494
|
return v_error === undefined ? null : v_error;
|
|
488
495
|
}
|
|
489
496
|
|
|
490
|
-
function validate$
|
|
497
|
+
function validate$5(obj, path = 'ServicePlanStepRepresentation') {
|
|
491
498
|
const v_error = (() => {
|
|
492
499
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
493
500
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
494
501
|
}
|
|
495
|
-
const
|
|
496
|
-
const
|
|
497
|
-
|
|
498
|
-
|
|
502
|
+
const obj_groupName = obj.groupName;
|
|
503
|
+
const path_groupName = path + '.groupName';
|
|
504
|
+
let obj_groupName_union0 = null;
|
|
505
|
+
const obj_groupName_union0_error = (() => {
|
|
506
|
+
if (typeof obj_groupName !== 'string') {
|
|
507
|
+
return new TypeError('Expected "string" but received "' + typeof obj_groupName + '" (at "' + path_groupName + '")');
|
|
508
|
+
}
|
|
509
|
+
})();
|
|
510
|
+
if (obj_groupName_union0_error != null) {
|
|
511
|
+
obj_groupName_union0 = obj_groupName_union0_error.message;
|
|
512
|
+
}
|
|
513
|
+
let obj_groupName_union1 = null;
|
|
514
|
+
const obj_groupName_union1_error = (() => {
|
|
515
|
+
if (obj_groupName !== null) {
|
|
516
|
+
return new TypeError('Expected "null" but received "' + typeof obj_groupName + '" (at "' + path_groupName + '")');
|
|
517
|
+
}
|
|
518
|
+
})();
|
|
519
|
+
if (obj_groupName_union1_error != null) {
|
|
520
|
+
obj_groupName_union1 = obj_groupName_union1_error.message;
|
|
499
521
|
}
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
522
|
+
if (obj_groupName_union0 && obj_groupName_union1) {
|
|
523
|
+
let message = 'Object doesn\'t match union (at "' + path_groupName + '")';
|
|
524
|
+
message += '\n' + obj_groupName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
525
|
+
message += '\n' + obj_groupName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
526
|
+
return new TypeError(message);
|
|
504
527
|
}
|
|
505
528
|
const obj_id = obj.id;
|
|
506
529
|
const path_id = path + '.id';
|
|
507
530
|
if (typeof obj_id !== 'string') {
|
|
508
531
|
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
509
532
|
}
|
|
510
|
-
const
|
|
511
|
-
const
|
|
512
|
-
|
|
513
|
-
|
|
533
|
+
const obj_name = obj.name;
|
|
534
|
+
const path_name = path + '.name';
|
|
535
|
+
let obj_name_union0 = null;
|
|
536
|
+
const obj_name_union0_error = (() => {
|
|
537
|
+
if (typeof obj_name !== 'string') {
|
|
538
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
539
|
+
}
|
|
540
|
+
})();
|
|
541
|
+
if (obj_name_union0_error != null) {
|
|
542
|
+
obj_name_union0 = obj_name_union0_error.message;
|
|
543
|
+
}
|
|
544
|
+
let obj_name_union1 = null;
|
|
545
|
+
const obj_name_union1_error = (() => {
|
|
546
|
+
if (obj_name !== null) {
|
|
547
|
+
return new TypeError('Expected "null" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
548
|
+
}
|
|
549
|
+
})();
|
|
550
|
+
if (obj_name_union1_error != null) {
|
|
551
|
+
obj_name_union1 = obj_name_union1_error.message;
|
|
552
|
+
}
|
|
553
|
+
if (obj_name_union0 && obj_name_union1) {
|
|
554
|
+
let message = 'Object doesn\'t match union (at "' + path_name + '")';
|
|
555
|
+
message += '\n' + obj_name_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
556
|
+
message += '\n' + obj_name_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
557
|
+
return new TypeError(message);
|
|
514
558
|
}
|
|
515
|
-
const
|
|
516
|
-
const
|
|
517
|
-
if (typeof
|
|
518
|
-
return new TypeError('Expected "
|
|
559
|
+
const obj_order = obj.order;
|
|
560
|
+
const path_order = path + '.order';
|
|
561
|
+
if (typeof obj_order !== 'number' || (typeof obj_order === 'number' && Math.floor(obj_order) !== obj_order)) {
|
|
562
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_order + '" (at "' + path_order + '")');
|
|
519
563
|
}
|
|
520
564
|
})();
|
|
521
565
|
return v_error === undefined ? null : v_error;
|
|
522
566
|
}
|
|
523
567
|
|
|
524
|
-
const VERSION$
|
|
525
|
-
function validate$
|
|
568
|
+
const VERSION$3 = "4c0fefe9caa169c4221be369e384ee56";
|
|
569
|
+
function validate$4(obj, path = 'ServicePlanOutputRepresentation') {
|
|
526
570
|
const v_error = (() => {
|
|
527
571
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
528
572
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -531,7 +575,7 @@ function validate$1(obj, path = 'ServicePlanOutputRepresentation') {
|
|
|
531
575
|
const path_copilotSessionInfo = path + '.copilotSessionInfo';
|
|
532
576
|
let obj_copilotSessionInfo_union0 = null;
|
|
533
577
|
const obj_copilotSessionInfo_union0_error = (() => {
|
|
534
|
-
const referencepath_copilotSessionInfoValidationError = validate$
|
|
578
|
+
const referencepath_copilotSessionInfoValidationError = validate$6(obj_copilotSessionInfo, path_copilotSessionInfo);
|
|
535
579
|
if (referencepath_copilotSessionInfoValidationError !== null) {
|
|
536
580
|
let message = 'Object doesn\'t match ServicePlanGenerationSessionInformationOutputRepresentation (at "' + path_copilotSessionInfo + '")\n';
|
|
537
581
|
message += referencepath_copilotSessionInfoValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -668,7 +712,7 @@ function validate$1(obj, path = 'ServicePlanOutputRepresentation') {
|
|
|
668
712
|
for (let i = 0; i < obj_steps.length; i++) {
|
|
669
713
|
const obj_steps_item = obj_steps[i];
|
|
670
714
|
const path_steps_item = path_steps + '[' + i + ']';
|
|
671
|
-
const referencepath_steps_itemValidationError = validate$
|
|
715
|
+
const referencepath_steps_itemValidationError = validate$5(obj_steps_item, path_steps_item);
|
|
672
716
|
if (referencepath_steps_itemValidationError !== null) {
|
|
673
717
|
let message = 'Object doesn\'t match ServicePlanStepRepresentation (at "' + path_steps_item + '")\n';
|
|
674
718
|
message += referencepath_steps_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
@@ -782,49 +826,49 @@ function validate$1(obj, path = 'ServicePlanOutputRepresentation') {
|
|
|
782
826
|
})();
|
|
783
827
|
return v_error === undefined ? null : v_error;
|
|
784
828
|
}
|
|
785
|
-
const RepresentationType$
|
|
786
|
-
function normalize$
|
|
829
|
+
const RepresentationType$3 = 'ServicePlanOutputRepresentation';
|
|
830
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
787
831
|
return input;
|
|
788
832
|
}
|
|
789
|
-
const select$
|
|
833
|
+
const select$6 = function ServicePlanOutputRepresentationSelect() {
|
|
790
834
|
return {
|
|
791
835
|
kind: 'Fragment',
|
|
792
|
-
version: VERSION$
|
|
836
|
+
version: VERSION$3,
|
|
793
837
|
private: [],
|
|
794
838
|
opaque: true
|
|
795
839
|
};
|
|
796
840
|
};
|
|
797
|
-
function equals$
|
|
841
|
+
function equals$3(existing, incoming) {
|
|
798
842
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
799
843
|
return false;
|
|
800
844
|
}
|
|
801
845
|
return true;
|
|
802
846
|
}
|
|
803
|
-
const ingest$
|
|
847
|
+
const ingest$3 = function ServicePlanOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
804
848
|
if (process.env.NODE_ENV !== 'production') {
|
|
805
|
-
const validateError = validate$
|
|
849
|
+
const validateError = validate$4(input);
|
|
806
850
|
if (validateError !== null) {
|
|
807
851
|
throw validateError;
|
|
808
852
|
}
|
|
809
853
|
}
|
|
810
854
|
const key = path.fullPath;
|
|
811
855
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 500;
|
|
812
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
856
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "ServicePlan", VERSION$3, RepresentationType$3, equals$3);
|
|
813
857
|
return createLink(key);
|
|
814
858
|
};
|
|
815
|
-
function getTypeCacheKeys$
|
|
859
|
+
function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
816
860
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
817
861
|
const rootKey = fullPathFactory();
|
|
818
862
|
rootKeySet.set(rootKey, {
|
|
819
863
|
namespace: keyPrefix,
|
|
820
|
-
representationName: RepresentationType$
|
|
864
|
+
representationName: RepresentationType$3,
|
|
821
865
|
mergeable: false
|
|
822
866
|
});
|
|
823
867
|
}
|
|
824
868
|
|
|
825
|
-
const TTL = 1000;
|
|
826
|
-
const VERSION = "
|
|
827
|
-
function validate(obj, path = '
|
|
869
|
+
const TTL$1 = 1000;
|
|
870
|
+
const VERSION$2 = "1b54ee684d826acba0725f11c75ee33b";
|
|
871
|
+
function validate$3(obj, path = 'ServicePlanGenerationOutputRepresentation') {
|
|
828
872
|
const v_error = (() => {
|
|
829
873
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
830
874
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -935,40 +979,35 @@ function validate(obj, path = 'ServicePlanGenerationSyncOutputRepresentation') {
|
|
|
935
979
|
}
|
|
936
980
|
const obj_plan = obj.plan;
|
|
937
981
|
const path_plan = path + '.plan';
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
const path_reason = path + '.reason';
|
|
943
|
-
if (typeof obj_reason !== 'string') {
|
|
944
|
-
return new TypeError('Expected "string" but received "' + typeof obj_reason + '" (at "' + path_reason + '")');
|
|
945
|
-
}
|
|
946
|
-
const obj_reasonDetails = obj.reasonDetails;
|
|
947
|
-
const path_reasonDetails = path + '.reasonDetails';
|
|
948
|
-
let obj_reasonDetails_union0 = null;
|
|
949
|
-
const obj_reasonDetails_union0_error = (() => {
|
|
950
|
-
if (typeof obj_reasonDetails !== 'string') {
|
|
951
|
-
return new TypeError('Expected "string" but received "' + typeof obj_reasonDetails + '" (at "' + path_reasonDetails + '")');
|
|
982
|
+
let obj_plan_union0 = null;
|
|
983
|
+
const obj_plan_union0_error = (() => {
|
|
984
|
+
if (typeof obj_plan !== 'object') {
|
|
985
|
+
return new TypeError('Expected "object" but received "' + typeof obj_plan + '" (at "' + path_plan + '")');
|
|
952
986
|
}
|
|
953
987
|
})();
|
|
954
|
-
if (
|
|
955
|
-
|
|
988
|
+
if (obj_plan_union0_error != null) {
|
|
989
|
+
obj_plan_union0 = obj_plan_union0_error.message;
|
|
956
990
|
}
|
|
957
|
-
let
|
|
958
|
-
const
|
|
959
|
-
if (
|
|
960
|
-
return new TypeError('Expected "null" but received "' + typeof
|
|
991
|
+
let obj_plan_union1 = null;
|
|
992
|
+
const obj_plan_union1_error = (() => {
|
|
993
|
+
if (obj_plan !== null) {
|
|
994
|
+
return new TypeError('Expected "null" but received "' + typeof obj_plan + '" (at "' + path_plan + '")');
|
|
961
995
|
}
|
|
962
996
|
})();
|
|
963
|
-
if (
|
|
964
|
-
|
|
997
|
+
if (obj_plan_union1_error != null) {
|
|
998
|
+
obj_plan_union1 = obj_plan_union1_error.message;
|
|
965
999
|
}
|
|
966
|
-
if (
|
|
967
|
-
let message = 'Object doesn\'t match union (at "' +
|
|
968
|
-
message += '\n' +
|
|
969
|
-
message += '\n' +
|
|
1000
|
+
if (obj_plan_union0 && obj_plan_union1) {
|
|
1001
|
+
let message = 'Object doesn\'t match union (at "' + path_plan + '")';
|
|
1002
|
+
message += '\n' + obj_plan_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1003
|
+
message += '\n' + obj_plan_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
970
1004
|
return new TypeError(message);
|
|
971
1005
|
}
|
|
1006
|
+
const obj_reason = obj.reason;
|
|
1007
|
+
const path_reason = path + '.reason';
|
|
1008
|
+
if (typeof obj_reason !== 'string') {
|
|
1009
|
+
return new TypeError('Expected "string" but received "' + typeof obj_reason + '" (at "' + path_reason + '")');
|
|
1010
|
+
}
|
|
972
1011
|
const obj_recordId = obj.recordId;
|
|
973
1012
|
const path_recordId = path + '.recordId';
|
|
974
1013
|
if (typeof obj_recordId !== 'string') {
|
|
@@ -987,35 +1026,37 @@ function validate(obj, path = 'ServicePlanGenerationSyncOutputRepresentation') {
|
|
|
987
1026
|
})();
|
|
988
1027
|
return v_error === undefined ? null : v_error;
|
|
989
1028
|
}
|
|
990
|
-
const RepresentationType = '
|
|
991
|
-
function keyBuilder(luvio, config) {
|
|
992
|
-
return keyPrefix + '::' + RepresentationType + ':' + config.id;
|
|
1029
|
+
const RepresentationType$2 = 'ServicePlanGenerationOutputRepresentation';
|
|
1030
|
+
function keyBuilder$5(luvio, config) {
|
|
1031
|
+
return keyPrefix + '::' + RepresentationType$2 + ':' + (config.id === null ? '' : config.id);
|
|
993
1032
|
}
|
|
994
|
-
function keyBuilderFromType(luvio, object) {
|
|
1033
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
995
1034
|
const keyParams = {
|
|
996
|
-
id: object.
|
|
1035
|
+
id: object.id
|
|
997
1036
|
};
|
|
998
|
-
return keyBuilder(luvio, keyParams);
|
|
1037
|
+
return keyBuilder$5(luvio, keyParams);
|
|
999
1038
|
}
|
|
1000
|
-
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
1039
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
1001
1040
|
const input_plan = input.plan;
|
|
1002
1041
|
const input_plan_id = path.fullPath + '__plan';
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1042
|
+
if (input_plan !== null && typeof input_plan === 'object') {
|
|
1043
|
+
input.plan = ingest$3(input_plan, {
|
|
1044
|
+
fullPath: input_plan_id,
|
|
1045
|
+
propertyName: 'plan',
|
|
1046
|
+
parent: {
|
|
1047
|
+
data: input,
|
|
1048
|
+
key: path.fullPath,
|
|
1049
|
+
existing: existing,
|
|
1050
|
+
},
|
|
1051
|
+
ttl: path.ttl
|
|
1052
|
+
}, luvio, store, timestamp);
|
|
1053
|
+
}
|
|
1013
1054
|
return input;
|
|
1014
1055
|
}
|
|
1015
|
-
const select$
|
|
1056
|
+
const select$5 = function ServicePlanGenerationOutputRepresentationSelect() {
|
|
1016
1057
|
return {
|
|
1017
1058
|
kind: 'Fragment',
|
|
1018
|
-
version: VERSION,
|
|
1059
|
+
version: VERSION$2,
|
|
1019
1060
|
private: [],
|
|
1020
1061
|
selections: [
|
|
1021
1062
|
{
|
|
@@ -1037,16 +1078,13 @@ const select$1 = function ServicePlanGenerationSyncOutputRepresentationSelect()
|
|
|
1037
1078
|
{
|
|
1038
1079
|
name: 'plan',
|
|
1039
1080
|
kind: 'Link',
|
|
1040
|
-
|
|
1081
|
+
nullable: true,
|
|
1082
|
+
fragment: select$6()
|
|
1041
1083
|
},
|
|
1042
1084
|
{
|
|
1043
1085
|
name: 'reason',
|
|
1044
1086
|
kind: 'Scalar'
|
|
1045
1087
|
},
|
|
1046
|
-
{
|
|
1047
|
-
name: 'reasonDetails',
|
|
1048
|
-
kind: 'Scalar'
|
|
1049
|
-
},
|
|
1050
1088
|
{
|
|
1051
1089
|
name: 'recordId',
|
|
1052
1090
|
kind: 'Scalar'
|
|
@@ -1062,7 +1100,7 @@ const select$1 = function ServicePlanGenerationSyncOutputRepresentationSelect()
|
|
|
1062
1100
|
]
|
|
1063
1101
|
};
|
|
1064
1102
|
};
|
|
1065
|
-
function equals(existing, incoming) {
|
|
1103
|
+
function equals$2(existing, incoming) {
|
|
1066
1104
|
const existing_reason = existing.reason;
|
|
1067
1105
|
const incoming_reason = incoming.reason;
|
|
1068
1106
|
if (!(existing_reason === incoming_reason)) {
|
|
@@ -1105,52 +1143,54 @@ function equals(existing, incoming) {
|
|
|
1105
1143
|
}
|
|
1106
1144
|
const existing_plan = existing.plan;
|
|
1107
1145
|
const incoming_plan = incoming.plan;
|
|
1108
|
-
if (!(existing_plan
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1146
|
+
if (!(existing_plan === incoming_plan
|
|
1147
|
+
|| (existing_plan != null &&
|
|
1148
|
+
incoming_plan != null &&
|
|
1149
|
+
existing_plan.__ref != null &&
|
|
1150
|
+
incoming_plan.__ref != null &&
|
|
1151
|
+
existing_plan.__ref === incoming_plan.__ref))) {
|
|
1114
1152
|
return false;
|
|
1115
1153
|
}
|
|
1116
1154
|
return true;
|
|
1117
1155
|
}
|
|
1118
|
-
const ingest = function
|
|
1156
|
+
const ingest$2 = function ServicePlanGenerationOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1119
1157
|
if (process.env.NODE_ENV !== 'production') {
|
|
1120
|
-
const validateError = validate(input);
|
|
1158
|
+
const validateError = validate$3(input);
|
|
1121
1159
|
if (validateError !== null) {
|
|
1122
1160
|
throw validateError;
|
|
1123
1161
|
}
|
|
1124
1162
|
}
|
|
1125
|
-
const key = keyBuilderFromType(luvio, input);
|
|
1126
|
-
const ttlToUse = TTL;
|
|
1127
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "ServicePlan", VERSION, RepresentationType, equals);
|
|
1163
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
1164
|
+
const ttlToUse = TTL$1;
|
|
1165
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "ServicePlan", VERSION$2, RepresentationType$2, equals$2);
|
|
1128
1166
|
return createLink(key);
|
|
1129
1167
|
};
|
|
1130
|
-
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
1168
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
1131
1169
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1132
|
-
const rootKey = keyBuilderFromType(luvio, input);
|
|
1170
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
1133
1171
|
rootKeySet.set(rootKey, {
|
|
1134
1172
|
namespace: keyPrefix,
|
|
1135
|
-
representationName: RepresentationType,
|
|
1173
|
+
representationName: RepresentationType$2,
|
|
1136
1174
|
mergeable: false
|
|
1137
1175
|
});
|
|
1138
|
-
|
|
1176
|
+
if (input.plan !== null && typeof input.plan === 'object') {
|
|
1177
|
+
getTypeCacheKeys$3(rootKeySet, luvio, input.plan, () => rootKey + "__" + "plan");
|
|
1178
|
+
}
|
|
1139
1179
|
}
|
|
1140
1180
|
|
|
1141
|
-
function select(luvio, params) {
|
|
1142
|
-
return select$
|
|
1181
|
+
function select$4(luvio, params) {
|
|
1182
|
+
return select$5();
|
|
1143
1183
|
}
|
|
1144
|
-
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
1145
|
-
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
1184
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
1185
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
1146
1186
|
}
|
|
1147
|
-
function ingestSuccess(luvio, resourceParams, response) {
|
|
1187
|
+
function ingestSuccess$2(luvio, resourceParams, response) {
|
|
1148
1188
|
const { body } = response;
|
|
1149
|
-
const key = keyBuilderFromType(luvio, body);
|
|
1150
|
-
luvio.storeIngest(key, ingest, body);
|
|
1189
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
1190
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
1151
1191
|
const snapshot = luvio.storeLookup({
|
|
1152
1192
|
recordId: key,
|
|
1153
|
-
node: select(),
|
|
1193
|
+
node: select$4(),
|
|
1154
1194
|
variables: {},
|
|
1155
1195
|
});
|
|
1156
1196
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -1161,7 +1201,7 @@ function ingestSuccess(luvio, resourceParams, response) {
|
|
|
1161
1201
|
deepFreeze(snapshot.data);
|
|
1162
1202
|
return snapshot;
|
|
1163
1203
|
}
|
|
1164
|
-
function createResourceRequest(config) {
|
|
1204
|
+
function createResourceRequest$2(config) {
|
|
1165
1205
|
const headers = {};
|
|
1166
1206
|
return {
|
|
1167
1207
|
baseUri: '/services/data/v62.0',
|
|
@@ -1175,18 +1215,19 @@ function createResourceRequest(config) {
|
|
|
1175
1215
|
};
|
|
1176
1216
|
}
|
|
1177
1217
|
|
|
1178
|
-
const adapterName = '
|
|
1179
|
-
const
|
|
1218
|
+
const adapterName$2 = 'generateServicePlan';
|
|
1219
|
+
const generateServicePlan_ConfigPropertyMetadata = [
|
|
1220
|
+
generateParamConfigMetadata('processingMode', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1180
1221
|
generateParamConfigMetadata('recordId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1181
1222
|
generateParamConfigMetadata('additionalContext', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1182
|
-
generateParamConfigMetadata('
|
|
1223
|
+
generateParamConfigMetadata('generationMode', true, 2 /* Body */, 0 /* String */),
|
|
1183
1224
|
generateParamConfigMetadata('source', true, 2 /* Body */, 0 /* String */),
|
|
1184
1225
|
];
|
|
1185
|
-
const
|
|
1186
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
1187
|
-
function typeCheckConfig(untrustedConfig) {
|
|
1226
|
+
const generateServicePlan_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, generateServicePlan_ConfigPropertyMetadata);
|
|
1227
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$4(generateServicePlan_ConfigPropertyMetadata);
|
|
1228
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
1188
1229
|
const config = {};
|
|
1189
|
-
typeCheckConfig$
|
|
1230
|
+
typeCheckConfig$4(untrustedConfig, config, generateServicePlan_ConfigPropertyMetadata);
|
|
1190
1231
|
const untrustedConfig_additionalContext = untrustedConfig.additionalContext;
|
|
1191
1232
|
if (untrustedIsObject(untrustedConfig_additionalContext)) {
|
|
1192
1233
|
const untrustedConfig_additionalContext_object = {};
|
|
@@ -1206,30 +1247,30 @@ function typeCheckConfig(untrustedConfig) {
|
|
|
1206
1247
|
}
|
|
1207
1248
|
return config;
|
|
1208
1249
|
}
|
|
1209
|
-
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
1250
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
1210
1251
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
1211
1252
|
return null;
|
|
1212
1253
|
}
|
|
1213
1254
|
if (process.env.NODE_ENV !== 'production') {
|
|
1214
1255
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
1215
1256
|
}
|
|
1216
|
-
const config = typeCheckConfig(untrustedConfig);
|
|
1257
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
1217
1258
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1218
1259
|
return null;
|
|
1219
1260
|
}
|
|
1220
1261
|
return config;
|
|
1221
1262
|
}
|
|
1222
|
-
function buildNetworkSnapshot(luvio, config, options) {
|
|
1223
|
-
const resourceParams = createResourceParams(config);
|
|
1224
|
-
const request = createResourceRequest(resourceParams);
|
|
1263
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
1264
|
+
const resourceParams = createResourceParams$2(config);
|
|
1265
|
+
const request = createResourceRequest$2(resourceParams);
|
|
1225
1266
|
return luvio.dispatchResourceRequest(request, options)
|
|
1226
1267
|
.then((response) => {
|
|
1227
1268
|
return luvio.handleSuccessResponse(() => {
|
|
1228
|
-
const snapshot = ingestSuccess(luvio, resourceParams, response);
|
|
1269
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response);
|
|
1229
1270
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
1230
1271
|
}, () => {
|
|
1231
1272
|
const cache = new StoreKeyMap();
|
|
1232
|
-
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
1273
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
1233
1274
|
return cache;
|
|
1234
1275
|
});
|
|
1235
1276
|
}, (response) => {
|
|
@@ -1237,15 +1278,732 @@ function buildNetworkSnapshot(luvio, config, options) {
|
|
|
1237
1278
|
throw response;
|
|
1238
1279
|
});
|
|
1239
1280
|
}
|
|
1240
|
-
const
|
|
1241
|
-
return function
|
|
1242
|
-
const config = validateAdapterConfig(untrustedConfig,
|
|
1281
|
+
const generateServicePlanAdapterFactory = (luvio) => {
|
|
1282
|
+
return function generateServicePlan(untrustedConfig) {
|
|
1283
|
+
const config = validateAdapterConfig$2(untrustedConfig, generateServicePlan_ConfigPropertyNames);
|
|
1243
1284
|
// Invalid or incomplete config
|
|
1244
1285
|
if (config === null) {
|
|
1245
|
-
throw new Error('Invalid config for "
|
|
1286
|
+
throw new Error('Invalid config for "generateServicePlan"');
|
|
1287
|
+
}
|
|
1288
|
+
return buildNetworkSnapshot$2(luvio, config);
|
|
1289
|
+
};
|
|
1290
|
+
};
|
|
1291
|
+
|
|
1292
|
+
function select$3(luvio, params) {
|
|
1293
|
+
return select$5();
|
|
1294
|
+
}
|
|
1295
|
+
function keyBuilder$4(luvio, params) {
|
|
1296
|
+
return keyBuilder$5(luvio, {
|
|
1297
|
+
id: params.urlParams.requestId
|
|
1298
|
+
});
|
|
1299
|
+
}
|
|
1300
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
1301
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
1302
|
+
}
|
|
1303
|
+
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
1304
|
+
const { body } = response;
|
|
1305
|
+
const key = keyBuilder$4(luvio, resourceParams);
|
|
1306
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
1307
|
+
const snapshot = luvio.storeLookup({
|
|
1308
|
+
recordId: key,
|
|
1309
|
+
node: select$3(),
|
|
1310
|
+
variables: {},
|
|
1311
|
+
}, snapshotRefresh);
|
|
1312
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1313
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1314
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1246
1315
|
}
|
|
1247
|
-
|
|
1316
|
+
}
|
|
1317
|
+
deepFreeze(snapshot.data);
|
|
1318
|
+
return snapshot;
|
|
1319
|
+
}
|
|
1320
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
1321
|
+
const key = keyBuilder$4(luvio, params);
|
|
1322
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1323
|
+
const storeMetadataParams = {
|
|
1324
|
+
ttl: TTL$1,
|
|
1325
|
+
namespace: keyPrefix,
|
|
1326
|
+
version: VERSION$2,
|
|
1327
|
+
representationName: RepresentationType$2
|
|
1328
|
+
};
|
|
1329
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1330
|
+
return errorSnapshot;
|
|
1331
|
+
}
|
|
1332
|
+
function createResourceRequest$1(config) {
|
|
1333
|
+
const headers = {};
|
|
1334
|
+
return {
|
|
1335
|
+
baseUri: '/services/data/v62.0',
|
|
1336
|
+
basePath: '/connect/service-plan/generationRequests/' + config.urlParams.requestId + '',
|
|
1337
|
+
method: 'get',
|
|
1338
|
+
body: null,
|
|
1339
|
+
urlParams: config.urlParams,
|
|
1340
|
+
queryParams: {},
|
|
1341
|
+
headers,
|
|
1342
|
+
priority: 'normal',
|
|
1343
|
+
};
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
const adapterName$1 = 'getGenerationRequest';
|
|
1347
|
+
const getGenerationRequest_ConfigPropertyMetadata = [
|
|
1348
|
+
generateParamConfigMetadata('requestId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1349
|
+
];
|
|
1350
|
+
const getGenerationRequest_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getGenerationRequest_ConfigPropertyMetadata);
|
|
1351
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$4(getGenerationRequest_ConfigPropertyMetadata);
|
|
1352
|
+
function keyBuilder$3(luvio, config) {
|
|
1353
|
+
const resourceParams = createResourceParams$1(config);
|
|
1354
|
+
return keyBuilder$4(luvio, resourceParams);
|
|
1355
|
+
}
|
|
1356
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
1357
|
+
const config = {};
|
|
1358
|
+
typeCheckConfig$4(untrustedConfig, config, getGenerationRequest_ConfigPropertyMetadata);
|
|
1359
|
+
return config;
|
|
1360
|
+
}
|
|
1361
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
1362
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1363
|
+
return null;
|
|
1364
|
+
}
|
|
1365
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1366
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1367
|
+
}
|
|
1368
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
1369
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1370
|
+
return null;
|
|
1371
|
+
}
|
|
1372
|
+
return config;
|
|
1373
|
+
}
|
|
1374
|
+
function adapterFragment$1(luvio, config) {
|
|
1375
|
+
createResourceParams$1(config);
|
|
1376
|
+
return select$3();
|
|
1377
|
+
}
|
|
1378
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
1379
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
1380
|
+
config,
|
|
1381
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1382
|
+
});
|
|
1383
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1384
|
+
}
|
|
1385
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
1386
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
1387
|
+
config,
|
|
1388
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1389
|
+
});
|
|
1390
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1391
|
+
}
|
|
1392
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
1393
|
+
const resourceParams = createResourceParams$1(config);
|
|
1394
|
+
const request = createResourceRequest$1(resourceParams);
|
|
1395
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1396
|
+
.then((response) => {
|
|
1397
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
1398
|
+
const cache = new StoreKeyMap();
|
|
1399
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
1400
|
+
return cache;
|
|
1401
|
+
});
|
|
1402
|
+
}, (response) => {
|
|
1403
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
1404
|
+
});
|
|
1405
|
+
}
|
|
1406
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
1407
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
1408
|
+
}
|
|
1409
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
1410
|
+
const { luvio, config } = context;
|
|
1411
|
+
const selector = {
|
|
1412
|
+
recordId: keyBuilder$3(luvio, config),
|
|
1413
|
+
node: adapterFragment$1(luvio, config),
|
|
1414
|
+
variables: {},
|
|
1248
1415
|
};
|
|
1416
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1417
|
+
config,
|
|
1418
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1419
|
+
});
|
|
1420
|
+
return cacheSnapshot;
|
|
1421
|
+
}
|
|
1422
|
+
const getGenerationRequestAdapterFactory = (luvio) => function ServicePlan__getGenerationRequest(untrustedConfig, requestContext) {
|
|
1423
|
+
const config = validateAdapterConfig$1(untrustedConfig, getGenerationRequest_ConfigPropertyNames);
|
|
1424
|
+
// Invalid or incomplete config
|
|
1425
|
+
if (config === null) {
|
|
1426
|
+
return null;
|
|
1427
|
+
}
|
|
1428
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1429
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
1430
|
+
};
|
|
1431
|
+
|
|
1432
|
+
function validate$2(obj, path = 'ServicePlanStepDetailsRepresentation') {
|
|
1433
|
+
const v_error = (() => {
|
|
1434
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1435
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1436
|
+
}
|
|
1437
|
+
const obj_executionStatus = obj.executionStatus;
|
|
1438
|
+
const path_executionStatus = path + '.executionStatus';
|
|
1439
|
+
if (typeof obj_executionStatus !== 'string') {
|
|
1440
|
+
return new TypeError('Expected "string" but received "' + typeof obj_executionStatus + '" (at "' + path_executionStatus + '")');
|
|
1441
|
+
}
|
|
1442
|
+
const obj_groupName = obj.groupName;
|
|
1443
|
+
const path_groupName = path + '.groupName';
|
|
1444
|
+
let obj_groupName_union0 = null;
|
|
1445
|
+
const obj_groupName_union0_error = (() => {
|
|
1446
|
+
if (typeof obj_groupName !== 'string') {
|
|
1447
|
+
return new TypeError('Expected "string" but received "' + typeof obj_groupName + '" (at "' + path_groupName + '")');
|
|
1448
|
+
}
|
|
1449
|
+
})();
|
|
1450
|
+
if (obj_groupName_union0_error != null) {
|
|
1451
|
+
obj_groupName_union0 = obj_groupName_union0_error.message;
|
|
1452
|
+
}
|
|
1453
|
+
let obj_groupName_union1 = null;
|
|
1454
|
+
const obj_groupName_union1_error = (() => {
|
|
1455
|
+
if (obj_groupName !== null) {
|
|
1456
|
+
return new TypeError('Expected "null" but received "' + typeof obj_groupName + '" (at "' + path_groupName + '")');
|
|
1457
|
+
}
|
|
1458
|
+
})();
|
|
1459
|
+
if (obj_groupName_union1_error != null) {
|
|
1460
|
+
obj_groupName_union1 = obj_groupName_union1_error.message;
|
|
1461
|
+
}
|
|
1462
|
+
if (obj_groupName_union0 && obj_groupName_union1) {
|
|
1463
|
+
let message = 'Object doesn\'t match union (at "' + path_groupName + '")';
|
|
1464
|
+
message += '\n' + obj_groupName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1465
|
+
message += '\n' + obj_groupName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1466
|
+
return new TypeError(message);
|
|
1467
|
+
}
|
|
1468
|
+
const obj_order = obj.order;
|
|
1469
|
+
const path_order = path + '.order';
|
|
1470
|
+
if (typeof obj_order !== 'number' || (typeof obj_order === 'number' && Math.floor(obj_order) !== obj_order)) {
|
|
1471
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_order + '" (at "' + path_order + '")');
|
|
1472
|
+
}
|
|
1473
|
+
const obj_stepId = obj.stepId;
|
|
1474
|
+
const path_stepId = path + '.stepId';
|
|
1475
|
+
if (typeof obj_stepId !== 'string') {
|
|
1476
|
+
return new TypeError('Expected "string" but received "' + typeof obj_stepId + '" (at "' + path_stepId + '")');
|
|
1477
|
+
}
|
|
1478
|
+
const obj_stepName = obj.stepName;
|
|
1479
|
+
const path_stepName = path + '.stepName';
|
|
1480
|
+
if (typeof obj_stepName !== 'string') {
|
|
1481
|
+
return new TypeError('Expected "string" but received "' + typeof obj_stepName + '" (at "' + path_stepName + '")');
|
|
1482
|
+
}
|
|
1483
|
+
})();
|
|
1484
|
+
return v_error === undefined ? null : v_error;
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
const VERSION$1 = "b4f5b09aa7f657ce0b31e25aa7b50b1c";
|
|
1488
|
+
function validate$1(obj, path = 'ServicePlanDetailsRepresentation') {
|
|
1489
|
+
const v_error = (() => {
|
|
1490
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1491
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1492
|
+
}
|
|
1493
|
+
const obj_clientFeatureId = obj.clientFeatureId;
|
|
1494
|
+
const path_clientFeatureId = path + '.clientFeatureId';
|
|
1495
|
+
let obj_clientFeatureId_union0 = null;
|
|
1496
|
+
const obj_clientFeatureId_union0_error = (() => {
|
|
1497
|
+
if (typeof obj_clientFeatureId !== 'string') {
|
|
1498
|
+
return new TypeError('Expected "string" but received "' + typeof obj_clientFeatureId + '" (at "' + path_clientFeatureId + '")');
|
|
1499
|
+
}
|
|
1500
|
+
})();
|
|
1501
|
+
if (obj_clientFeatureId_union0_error != null) {
|
|
1502
|
+
obj_clientFeatureId_union0 = obj_clientFeatureId_union0_error.message;
|
|
1503
|
+
}
|
|
1504
|
+
let obj_clientFeatureId_union1 = null;
|
|
1505
|
+
const obj_clientFeatureId_union1_error = (() => {
|
|
1506
|
+
if (obj_clientFeatureId !== null) {
|
|
1507
|
+
return new TypeError('Expected "null" but received "' + typeof obj_clientFeatureId + '" (at "' + path_clientFeatureId + '")');
|
|
1508
|
+
}
|
|
1509
|
+
})();
|
|
1510
|
+
if (obj_clientFeatureId_union1_error != null) {
|
|
1511
|
+
obj_clientFeatureId_union1 = obj_clientFeatureId_union1_error.message;
|
|
1512
|
+
}
|
|
1513
|
+
if (obj_clientFeatureId_union0 && obj_clientFeatureId_union1) {
|
|
1514
|
+
let message = 'Object doesn\'t match union (at "' + path_clientFeatureId + '")';
|
|
1515
|
+
message += '\n' + obj_clientFeatureId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1516
|
+
message += '\n' + obj_clientFeatureId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1517
|
+
return new TypeError(message);
|
|
1518
|
+
}
|
|
1519
|
+
const obj_createdDate = obj.createdDate;
|
|
1520
|
+
const path_createdDate = path + '.createdDate';
|
|
1521
|
+
let obj_createdDate_union0 = null;
|
|
1522
|
+
const obj_createdDate_union0_error = (() => {
|
|
1523
|
+
if (typeof obj_createdDate !== 'string') {
|
|
1524
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
1525
|
+
}
|
|
1526
|
+
})();
|
|
1527
|
+
if (obj_createdDate_union0_error != null) {
|
|
1528
|
+
obj_createdDate_union0 = obj_createdDate_union0_error.message;
|
|
1529
|
+
}
|
|
1530
|
+
let obj_createdDate_union1 = null;
|
|
1531
|
+
const obj_createdDate_union1_error = (() => {
|
|
1532
|
+
if (obj_createdDate !== null) {
|
|
1533
|
+
return new TypeError('Expected "null" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
1534
|
+
}
|
|
1535
|
+
})();
|
|
1536
|
+
if (obj_createdDate_union1_error != null) {
|
|
1537
|
+
obj_createdDate_union1 = obj_createdDate_union1_error.message;
|
|
1538
|
+
}
|
|
1539
|
+
if (obj_createdDate_union0 && obj_createdDate_union1) {
|
|
1540
|
+
let message = 'Object doesn\'t match union (at "' + path_createdDate + '")';
|
|
1541
|
+
message += '\n' + obj_createdDate_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1542
|
+
message += '\n' + obj_createdDate_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1543
|
+
return new TypeError(message);
|
|
1544
|
+
}
|
|
1545
|
+
const obj_executionStatus = obj.executionStatus;
|
|
1546
|
+
const path_executionStatus = path + '.executionStatus';
|
|
1547
|
+
let obj_executionStatus_union0 = null;
|
|
1548
|
+
const obj_executionStatus_union0_error = (() => {
|
|
1549
|
+
if (typeof obj_executionStatus !== 'string') {
|
|
1550
|
+
return new TypeError('Expected "string" but received "' + typeof obj_executionStatus + '" (at "' + path_executionStatus + '")');
|
|
1551
|
+
}
|
|
1552
|
+
})();
|
|
1553
|
+
if (obj_executionStatus_union0_error != null) {
|
|
1554
|
+
obj_executionStatus_union0 = obj_executionStatus_union0_error.message;
|
|
1555
|
+
}
|
|
1556
|
+
let obj_executionStatus_union1 = null;
|
|
1557
|
+
const obj_executionStatus_union1_error = (() => {
|
|
1558
|
+
if (obj_executionStatus !== null) {
|
|
1559
|
+
return new TypeError('Expected "null" but received "' + typeof obj_executionStatus + '" (at "' + path_executionStatus + '")');
|
|
1560
|
+
}
|
|
1561
|
+
})();
|
|
1562
|
+
if (obj_executionStatus_union1_error != null) {
|
|
1563
|
+
obj_executionStatus_union1 = obj_executionStatus_union1_error.message;
|
|
1564
|
+
}
|
|
1565
|
+
if (obj_executionStatus_union0 && obj_executionStatus_union1) {
|
|
1566
|
+
let message = 'Object doesn\'t match union (at "' + path_executionStatus + '")';
|
|
1567
|
+
message += '\n' + obj_executionStatus_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1568
|
+
message += '\n' + obj_executionStatus_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1569
|
+
return new TypeError(message);
|
|
1570
|
+
}
|
|
1571
|
+
const obj_feedbackId = obj.feedbackId;
|
|
1572
|
+
const path_feedbackId = path + '.feedbackId';
|
|
1573
|
+
let obj_feedbackId_union0 = null;
|
|
1574
|
+
const obj_feedbackId_union0_error = (() => {
|
|
1575
|
+
if (typeof obj_feedbackId !== 'string') {
|
|
1576
|
+
return new TypeError('Expected "string" but received "' + typeof obj_feedbackId + '" (at "' + path_feedbackId + '")');
|
|
1577
|
+
}
|
|
1578
|
+
})();
|
|
1579
|
+
if (obj_feedbackId_union0_error != null) {
|
|
1580
|
+
obj_feedbackId_union0 = obj_feedbackId_union0_error.message;
|
|
1581
|
+
}
|
|
1582
|
+
let obj_feedbackId_union1 = null;
|
|
1583
|
+
const obj_feedbackId_union1_error = (() => {
|
|
1584
|
+
if (obj_feedbackId !== null) {
|
|
1585
|
+
return new TypeError('Expected "null" but received "' + typeof obj_feedbackId + '" (at "' + path_feedbackId + '")');
|
|
1586
|
+
}
|
|
1587
|
+
})();
|
|
1588
|
+
if (obj_feedbackId_union1_error != null) {
|
|
1589
|
+
obj_feedbackId_union1 = obj_feedbackId_union1_error.message;
|
|
1590
|
+
}
|
|
1591
|
+
if (obj_feedbackId_union0 && obj_feedbackId_union1) {
|
|
1592
|
+
let message = 'Object doesn\'t match union (at "' + path_feedbackId + '")';
|
|
1593
|
+
message += '\n' + obj_feedbackId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1594
|
+
message += '\n' + obj_feedbackId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1595
|
+
return new TypeError(message);
|
|
1596
|
+
}
|
|
1597
|
+
const obj_planId = obj.planId;
|
|
1598
|
+
const path_planId = path + '.planId';
|
|
1599
|
+
let obj_planId_union0 = null;
|
|
1600
|
+
const obj_planId_union0_error = (() => {
|
|
1601
|
+
if (typeof obj_planId !== 'string') {
|
|
1602
|
+
return new TypeError('Expected "string" but received "' + typeof obj_planId + '" (at "' + path_planId + '")');
|
|
1603
|
+
}
|
|
1604
|
+
})();
|
|
1605
|
+
if (obj_planId_union0_error != null) {
|
|
1606
|
+
obj_planId_union0 = obj_planId_union0_error.message;
|
|
1607
|
+
}
|
|
1608
|
+
let obj_planId_union1 = null;
|
|
1609
|
+
const obj_planId_union1_error = (() => {
|
|
1610
|
+
if (obj_planId !== null) {
|
|
1611
|
+
return new TypeError('Expected "null" but received "' + typeof obj_planId + '" (at "' + path_planId + '")');
|
|
1612
|
+
}
|
|
1613
|
+
})();
|
|
1614
|
+
if (obj_planId_union1_error != null) {
|
|
1615
|
+
obj_planId_union1 = obj_planId_union1_error.message;
|
|
1616
|
+
}
|
|
1617
|
+
if (obj_planId_union0 && obj_planId_union1) {
|
|
1618
|
+
let message = 'Object doesn\'t match union (at "' + path_planId + '")';
|
|
1619
|
+
message += '\n' + obj_planId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1620
|
+
message += '\n' + obj_planId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1621
|
+
return new TypeError(message);
|
|
1622
|
+
}
|
|
1623
|
+
const obj_servicePlanSteps = obj.servicePlanSteps;
|
|
1624
|
+
const path_servicePlanSteps = path + '.servicePlanSteps';
|
|
1625
|
+
if (!ArrayIsArray(obj_servicePlanSteps)) {
|
|
1626
|
+
return new TypeError('Expected "array" but received "' + typeof obj_servicePlanSteps + '" (at "' + path_servicePlanSteps + '")');
|
|
1627
|
+
}
|
|
1628
|
+
for (let i = 0; i < obj_servicePlanSteps.length; i++) {
|
|
1629
|
+
const obj_servicePlanSteps_item = obj_servicePlanSteps[i];
|
|
1630
|
+
const path_servicePlanSteps_item = path_servicePlanSteps + '[' + i + ']';
|
|
1631
|
+
const referencepath_servicePlanSteps_itemValidationError = validate$2(obj_servicePlanSteps_item, path_servicePlanSteps_item);
|
|
1632
|
+
if (referencepath_servicePlanSteps_itemValidationError !== null) {
|
|
1633
|
+
let message = 'Object doesn\'t match ServicePlanStepDetailsRepresentation (at "' + path_servicePlanSteps_item + '")\n';
|
|
1634
|
+
message += referencepath_servicePlanSteps_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1635
|
+
return new TypeError(message);
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
const obj_topic = obj.topic;
|
|
1639
|
+
const path_topic = path + '.topic';
|
|
1640
|
+
let obj_topic_union0 = null;
|
|
1641
|
+
const obj_topic_union0_error = (() => {
|
|
1642
|
+
if (typeof obj_topic !== 'string') {
|
|
1643
|
+
return new TypeError('Expected "string" but received "' + typeof obj_topic + '" (at "' + path_topic + '")');
|
|
1644
|
+
}
|
|
1645
|
+
})();
|
|
1646
|
+
if (obj_topic_union0_error != null) {
|
|
1647
|
+
obj_topic_union0 = obj_topic_union0_error.message;
|
|
1648
|
+
}
|
|
1649
|
+
let obj_topic_union1 = null;
|
|
1650
|
+
const obj_topic_union1_error = (() => {
|
|
1651
|
+
if (obj_topic !== null) {
|
|
1652
|
+
return new TypeError('Expected "null" but received "' + typeof obj_topic + '" (at "' + path_topic + '")');
|
|
1653
|
+
}
|
|
1654
|
+
})();
|
|
1655
|
+
if (obj_topic_union1_error != null) {
|
|
1656
|
+
obj_topic_union1 = obj_topic_union1_error.message;
|
|
1657
|
+
}
|
|
1658
|
+
if (obj_topic_union0 && obj_topic_union1) {
|
|
1659
|
+
let message = 'Object doesn\'t match union (at "' + path_topic + '")';
|
|
1660
|
+
message += '\n' + obj_topic_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1661
|
+
message += '\n' + obj_topic_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1662
|
+
return new TypeError(message);
|
|
1663
|
+
}
|
|
1664
|
+
})();
|
|
1665
|
+
return v_error === undefined ? null : v_error;
|
|
1666
|
+
}
|
|
1667
|
+
const RepresentationType$1 = 'ServicePlanDetailsRepresentation';
|
|
1668
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
1669
|
+
return input;
|
|
1670
|
+
}
|
|
1671
|
+
const select$2 = function ServicePlanDetailsRepresentationSelect() {
|
|
1672
|
+
return {
|
|
1673
|
+
kind: 'Fragment',
|
|
1674
|
+
version: VERSION$1,
|
|
1675
|
+
private: [],
|
|
1676
|
+
opaque: true
|
|
1677
|
+
};
|
|
1678
|
+
};
|
|
1679
|
+
function equals$1(existing, incoming) {
|
|
1680
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
1681
|
+
return false;
|
|
1682
|
+
}
|
|
1683
|
+
return true;
|
|
1684
|
+
}
|
|
1685
|
+
const ingest$1 = function ServicePlanDetailsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1686
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1687
|
+
const validateError = validate$1(input);
|
|
1688
|
+
if (validateError !== null) {
|
|
1689
|
+
throw validateError;
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1692
|
+
const key = path.fullPath;
|
|
1693
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 500;
|
|
1694
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "ServicePlan", VERSION$1, RepresentationType$1, equals$1);
|
|
1695
|
+
return createLink(key);
|
|
1696
|
+
};
|
|
1697
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
1698
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1699
|
+
const rootKey = fullPathFactory();
|
|
1700
|
+
rootKeySet.set(rootKey, {
|
|
1701
|
+
namespace: keyPrefix,
|
|
1702
|
+
representationName: RepresentationType$1,
|
|
1703
|
+
mergeable: false
|
|
1704
|
+
});
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1707
|
+
const TTL = 1000;
|
|
1708
|
+
const VERSION = "2dd60cd6c267351cb563fcc04cb5cb56";
|
|
1709
|
+
function validate(obj, path = 'ServicePlanDetailsOutputRepresentation') {
|
|
1710
|
+
const v_error = (() => {
|
|
1711
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
1712
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
1713
|
+
}
|
|
1714
|
+
const obj_plan = obj.plan;
|
|
1715
|
+
const path_plan = path + '.plan';
|
|
1716
|
+
if (typeof obj_plan !== 'object') {
|
|
1717
|
+
return new TypeError('Expected "object" but received "' + typeof obj_plan + '" (at "' + path_plan + '")');
|
|
1718
|
+
}
|
|
1719
|
+
const obj_planRequestId = obj.planRequestId;
|
|
1720
|
+
const path_planRequestId = path + '.planRequestId';
|
|
1721
|
+
if (typeof obj_planRequestId !== 'string') {
|
|
1722
|
+
return new TypeError('Expected "string" but received "' + typeof obj_planRequestId + '" (at "' + path_planRequestId + '")');
|
|
1723
|
+
}
|
|
1724
|
+
const obj_reason = obj.reason;
|
|
1725
|
+
const path_reason = path + '.reason';
|
|
1726
|
+
if (typeof obj_reason !== 'string') {
|
|
1727
|
+
return new TypeError('Expected "string" but received "' + typeof obj_reason + '" (at "' + path_reason + '")');
|
|
1728
|
+
}
|
|
1729
|
+
const obj_reasonDetails = obj.reasonDetails;
|
|
1730
|
+
const path_reasonDetails = path + '.reasonDetails';
|
|
1731
|
+
let obj_reasonDetails_union0 = null;
|
|
1732
|
+
const obj_reasonDetails_union0_error = (() => {
|
|
1733
|
+
if (typeof obj_reasonDetails !== 'string') {
|
|
1734
|
+
return new TypeError('Expected "string" but received "' + typeof obj_reasonDetails + '" (at "' + path_reasonDetails + '")');
|
|
1735
|
+
}
|
|
1736
|
+
})();
|
|
1737
|
+
if (obj_reasonDetails_union0_error != null) {
|
|
1738
|
+
obj_reasonDetails_union0 = obj_reasonDetails_union0_error.message;
|
|
1739
|
+
}
|
|
1740
|
+
let obj_reasonDetails_union1 = null;
|
|
1741
|
+
const obj_reasonDetails_union1_error = (() => {
|
|
1742
|
+
if (obj_reasonDetails !== null) {
|
|
1743
|
+
return new TypeError('Expected "null" but received "' + typeof obj_reasonDetails + '" (at "' + path_reasonDetails + '")');
|
|
1744
|
+
}
|
|
1745
|
+
})();
|
|
1746
|
+
if (obj_reasonDetails_union1_error != null) {
|
|
1747
|
+
obj_reasonDetails_union1 = obj_reasonDetails_union1_error.message;
|
|
1748
|
+
}
|
|
1749
|
+
if (obj_reasonDetails_union0 && obj_reasonDetails_union1) {
|
|
1750
|
+
let message = 'Object doesn\'t match union (at "' + path_reasonDetails + '")';
|
|
1751
|
+
message += '\n' + obj_reasonDetails_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1752
|
+
message += '\n' + obj_reasonDetails_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1753
|
+
return new TypeError(message);
|
|
1754
|
+
}
|
|
1755
|
+
const obj_status = obj.status;
|
|
1756
|
+
const path_status = path + '.status';
|
|
1757
|
+
if (typeof obj_status !== 'string') {
|
|
1758
|
+
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
1759
|
+
}
|
|
1760
|
+
})();
|
|
1761
|
+
return v_error === undefined ? null : v_error;
|
|
1762
|
+
}
|
|
1763
|
+
const RepresentationType = 'ServicePlanDetailsOutputRepresentation';
|
|
1764
|
+
function keyBuilder$2(luvio, config) {
|
|
1765
|
+
return keyPrefix + '::' + RepresentationType + ':' + config.id;
|
|
1766
|
+
}
|
|
1767
|
+
function keyBuilderFromType(luvio, object) {
|
|
1768
|
+
const keyParams = {
|
|
1769
|
+
id: object.planRequestId
|
|
1770
|
+
};
|
|
1771
|
+
return keyBuilder$2(luvio, keyParams);
|
|
1772
|
+
}
|
|
1773
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
1774
|
+
const input_plan = input.plan;
|
|
1775
|
+
const input_plan_id = path.fullPath + '__plan';
|
|
1776
|
+
input.plan = ingest$1(input_plan, {
|
|
1777
|
+
fullPath: input_plan_id,
|
|
1778
|
+
propertyName: 'plan',
|
|
1779
|
+
parent: {
|
|
1780
|
+
data: input,
|
|
1781
|
+
key: path.fullPath,
|
|
1782
|
+
existing: existing,
|
|
1783
|
+
},
|
|
1784
|
+
ttl: path.ttl
|
|
1785
|
+
}, luvio, store, timestamp);
|
|
1786
|
+
return input;
|
|
1787
|
+
}
|
|
1788
|
+
const select$1 = function ServicePlanDetailsOutputRepresentationSelect() {
|
|
1789
|
+
return {
|
|
1790
|
+
kind: 'Fragment',
|
|
1791
|
+
version: VERSION,
|
|
1792
|
+
private: [],
|
|
1793
|
+
selections: [
|
|
1794
|
+
{
|
|
1795
|
+
name: 'plan',
|
|
1796
|
+
kind: 'Link',
|
|
1797
|
+
fragment: select$2()
|
|
1798
|
+
},
|
|
1799
|
+
{
|
|
1800
|
+
name: 'planRequestId',
|
|
1801
|
+
kind: 'Scalar'
|
|
1802
|
+
},
|
|
1803
|
+
{
|
|
1804
|
+
name: 'reason',
|
|
1805
|
+
kind: 'Scalar'
|
|
1806
|
+
},
|
|
1807
|
+
{
|
|
1808
|
+
name: 'reasonDetails',
|
|
1809
|
+
kind: 'Scalar'
|
|
1810
|
+
},
|
|
1811
|
+
{
|
|
1812
|
+
name: 'status',
|
|
1813
|
+
kind: 'Scalar'
|
|
1814
|
+
}
|
|
1815
|
+
]
|
|
1816
|
+
};
|
|
1817
|
+
};
|
|
1818
|
+
function equals(existing, incoming) {
|
|
1819
|
+
const existing_planRequestId = existing.planRequestId;
|
|
1820
|
+
const incoming_planRequestId = incoming.planRequestId;
|
|
1821
|
+
if (!(existing_planRequestId === incoming_planRequestId)) {
|
|
1822
|
+
return false;
|
|
1823
|
+
}
|
|
1824
|
+
const existing_reason = existing.reason;
|
|
1825
|
+
const incoming_reason = incoming.reason;
|
|
1826
|
+
if (!(existing_reason === incoming_reason)) {
|
|
1827
|
+
return false;
|
|
1828
|
+
}
|
|
1829
|
+
const existing_status = existing.status;
|
|
1830
|
+
const incoming_status = incoming.status;
|
|
1831
|
+
if (!(existing_status === incoming_status)) {
|
|
1832
|
+
return false;
|
|
1833
|
+
}
|
|
1834
|
+
const existing_plan = existing.plan;
|
|
1835
|
+
const incoming_plan = incoming.plan;
|
|
1836
|
+
if (!(existing_plan.__ref === incoming_plan.__ref)) {
|
|
1837
|
+
return false;
|
|
1838
|
+
}
|
|
1839
|
+
const existing_reasonDetails = existing.reasonDetails;
|
|
1840
|
+
const incoming_reasonDetails = incoming.reasonDetails;
|
|
1841
|
+
if (!(existing_reasonDetails === incoming_reasonDetails)) {
|
|
1842
|
+
return false;
|
|
1843
|
+
}
|
|
1844
|
+
return true;
|
|
1845
|
+
}
|
|
1846
|
+
const ingest = function ServicePlanDetailsOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1847
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1848
|
+
const validateError = validate(input);
|
|
1849
|
+
if (validateError !== null) {
|
|
1850
|
+
throw validateError;
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1853
|
+
const key = keyBuilderFromType(luvio, input);
|
|
1854
|
+
const ttlToUse = TTL;
|
|
1855
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "ServicePlan", VERSION, RepresentationType, equals);
|
|
1856
|
+
return createLink(key);
|
|
1857
|
+
};
|
|
1858
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
1859
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1860
|
+
const rootKey = keyBuilderFromType(luvio, input);
|
|
1861
|
+
rootKeySet.set(rootKey, {
|
|
1862
|
+
namespace: keyPrefix,
|
|
1863
|
+
representationName: RepresentationType,
|
|
1864
|
+
mergeable: false
|
|
1865
|
+
});
|
|
1866
|
+
getTypeCacheKeys$1(rootKeySet, luvio, input.plan, () => rootKey + "__" + "plan");
|
|
1867
|
+
}
|
|
1868
|
+
|
|
1869
|
+
function select(luvio, params) {
|
|
1870
|
+
return select$1();
|
|
1871
|
+
}
|
|
1872
|
+
function keyBuilder$1(luvio, params) {
|
|
1873
|
+
return keyBuilder$2(luvio, {
|
|
1874
|
+
id: params.urlParams.recordId
|
|
1875
|
+
});
|
|
1876
|
+
}
|
|
1877
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
1878
|
+
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
1879
|
+
}
|
|
1880
|
+
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
1881
|
+
const { body } = response;
|
|
1882
|
+
const key = keyBuilder$1(luvio, resourceParams);
|
|
1883
|
+
luvio.storeIngest(key, ingest, body);
|
|
1884
|
+
const snapshot = luvio.storeLookup({
|
|
1885
|
+
recordId: key,
|
|
1886
|
+
node: select(),
|
|
1887
|
+
variables: {},
|
|
1888
|
+
}, snapshotRefresh);
|
|
1889
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1890
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1891
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1894
|
+
deepFreeze(snapshot.data);
|
|
1895
|
+
return snapshot;
|
|
1896
|
+
}
|
|
1897
|
+
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
1898
|
+
const key = keyBuilder$1(luvio, params);
|
|
1899
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1900
|
+
const storeMetadataParams = {
|
|
1901
|
+
ttl: TTL,
|
|
1902
|
+
namespace: keyPrefix,
|
|
1903
|
+
version: VERSION,
|
|
1904
|
+
representationName: RepresentationType
|
|
1905
|
+
};
|
|
1906
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1907
|
+
return errorSnapshot;
|
|
1908
|
+
}
|
|
1909
|
+
function createResourceRequest(config) {
|
|
1910
|
+
const headers = {};
|
|
1911
|
+
return {
|
|
1912
|
+
baseUri: '/services/data/v62.0',
|
|
1913
|
+
basePath: '/connect/service-plan/servicePlanDetails/' + config.urlParams.recordId + '',
|
|
1914
|
+
method: 'get',
|
|
1915
|
+
body: null,
|
|
1916
|
+
urlParams: config.urlParams,
|
|
1917
|
+
queryParams: {},
|
|
1918
|
+
headers,
|
|
1919
|
+
priority: 'normal',
|
|
1920
|
+
};
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1923
|
+
const adapterName = 'getServicePlan';
|
|
1924
|
+
const getServicePlan_ConfigPropertyMetadata = [
|
|
1925
|
+
generateParamConfigMetadata('recordId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
1926
|
+
];
|
|
1927
|
+
const getServicePlan_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getServicePlan_ConfigPropertyMetadata);
|
|
1928
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$4(getServicePlan_ConfigPropertyMetadata);
|
|
1929
|
+
function keyBuilder(luvio, config) {
|
|
1930
|
+
const resourceParams = createResourceParams(config);
|
|
1931
|
+
return keyBuilder$1(luvio, resourceParams);
|
|
1932
|
+
}
|
|
1933
|
+
function typeCheckConfig(untrustedConfig) {
|
|
1934
|
+
const config = {};
|
|
1935
|
+
typeCheckConfig$4(untrustedConfig, config, getServicePlan_ConfigPropertyMetadata);
|
|
1936
|
+
return config;
|
|
1937
|
+
}
|
|
1938
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
1939
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1940
|
+
return null;
|
|
1941
|
+
}
|
|
1942
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1943
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
1944
|
+
}
|
|
1945
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
1946
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1947
|
+
return null;
|
|
1948
|
+
}
|
|
1949
|
+
return config;
|
|
1950
|
+
}
|
|
1951
|
+
function adapterFragment(luvio, config) {
|
|
1952
|
+
createResourceParams(config);
|
|
1953
|
+
return select();
|
|
1954
|
+
}
|
|
1955
|
+
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
1956
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
1957
|
+
config,
|
|
1958
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1959
|
+
});
|
|
1960
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1961
|
+
}
|
|
1962
|
+
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
1963
|
+
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
1964
|
+
config,
|
|
1965
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1966
|
+
});
|
|
1967
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1968
|
+
}
|
|
1969
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
1970
|
+
const resourceParams = createResourceParams(config);
|
|
1971
|
+
const request = createResourceRequest(resourceParams);
|
|
1972
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1973
|
+
.then((response) => {
|
|
1974
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
1975
|
+
const cache = new StoreKeyMap();
|
|
1976
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
1977
|
+
return cache;
|
|
1978
|
+
});
|
|
1979
|
+
}, (response) => {
|
|
1980
|
+
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
1981
|
+
});
|
|
1982
|
+
}
|
|
1983
|
+
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
1984
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
1985
|
+
}
|
|
1986
|
+
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
1987
|
+
const { luvio, config } = context;
|
|
1988
|
+
const selector = {
|
|
1989
|
+
recordId: keyBuilder(luvio, config),
|
|
1990
|
+
node: adapterFragment(luvio, config),
|
|
1991
|
+
variables: {},
|
|
1992
|
+
};
|
|
1993
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1994
|
+
config,
|
|
1995
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
1996
|
+
});
|
|
1997
|
+
return cacheSnapshot;
|
|
1998
|
+
}
|
|
1999
|
+
const getServicePlanAdapterFactory = (luvio) => function ServicePlan__getServicePlan(untrustedConfig, requestContext) {
|
|
2000
|
+
const config = validateAdapterConfig(untrustedConfig, getServicePlan_ConfigPropertyNames);
|
|
2001
|
+
// Invalid or incomplete config
|
|
2002
|
+
if (config === null) {
|
|
2003
|
+
return null;
|
|
2004
|
+
}
|
|
2005
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2006
|
+
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
1249
2007
|
};
|
|
1250
2008
|
|
|
1251
|
-
export { executeServicePlanAdapterFactory,
|
|
2009
|
+
export { executeServicePlanAdapterFactory, generateServicePlanAdapterFactory, getGenerationRequestAdapterFactory, getServicePlanAdapterFactory };
|