@salesforce/lds-adapters-service-serviceplan 1.308.0 → 1.309.0-dev10
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 +1502 -328
- package/dist/es/es2018/types/src/generated/adapters/executeServicePlan.d.ts +4 -6
- 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 +5 -1
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +10 -2
- package/dist/es/es2018/types/src/generated/resources/{getConnectServicePlanExecuteByGeneratedPlanId.d.ts → getConnectServicePlanExecuteByPlanOrStepId.d.ts} +1 -1
- 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/{postConnectServicePlanGenerateSyncByRecordId.d.ts → postConnectServicePlanGenerationRequests.d.ts} +7 -6
- package/dist/es/es2018/types/src/generated/resources/{putConnectServicePlanExecuteByGeneratedPlanId.d.ts → putConnectServicePlanExecuteByPlanOrStepId.d.ts} +2 -4
- package/dist/es/es2018/types/src/generated/types/ServicePlanDataInputRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/ServicePlanDataOutputRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/ServicePlanDetailsOutputRepresentation.d.ts +60 -0
- package/dist/es/es2018/types/src/generated/types/ServicePlanDetailsRepresentation.d.ts +47 -0
- package/dist/es/es2018/types/src/generated/types/ServicePlanExecutionInputRepresentation.d.ts +4 -10
- package/dist/es/es2018/types/src/generated/types/ServicePlanExecutionOutputRepresentation.d.ts +11 -16
- package/dist/es/es2018/types/src/generated/types/ServicePlanExecutionSummaryRepresentation.d.ts +2 -11
- package/dist/es/es2018/types/src/generated/types/ServicePlanGenerationInputParamRepresentation.d.ts +5 -5
- package/dist/es/es2018/types/src/generated/types/ServicePlanGenerationOutputRepresentation.d.ts +73 -0
- package/dist/es/es2018/types/src/generated/types/ServicePlanGenerationSessionInformationOutputRepresentation.d.ts +13 -19
- package/dist/es/es2018/types/src/generated/types/ServicePlanOutputRepresentation.d.ts +27 -20
- package/dist/es/es2018/types/src/generated/types/ServicePlanStepDetailsRepresentation.d.ts +40 -0
- package/dist/es/es2018/types/src/generated/types/ServicePlanStepExecutionStatusRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/ServicePlanStepRepresentation.d.ts +14 -18
- package/package.json +3 -3
- package/sfdc/index.js +1583 -334
- package/src/raml/api.raml +238 -97
- package/src/raml/luvio.raml +39 -7
- package/dist/es/es2018/types/src/generated/adapters/generateSync.d.ts +0 -20
- package/dist/es/es2018/types/src/generated/types/ServicePlanGenerationSyncOutputRepresentation.d.ts +0 -56
- package/dist/es/es2018/types/src/generated/types/ServicePlanStepAttributeRepresentation.d.ts +0 -31
package/sfdc/index.js
CHANGED
|
@@ -12,11 +12,12 @@
|
|
|
12
12
|
* *******************************************************************************************
|
|
13
13
|
*/
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
|
+
import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
|
|
15
16
|
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
16
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$
|
|
17
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$4, typeCheckConfig as typeCheckConfig$4, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$2 } from 'force/luvioEngine';
|
|
17
18
|
|
|
18
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
19
|
-
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
20
|
+
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
20
21
|
const { isArray: ArrayIsArray$1 } = Array;
|
|
21
22
|
/**
|
|
22
23
|
* Validates an adapter config is well-formed.
|
|
@@ -40,7 +41,7 @@ function validateConfig(config, adapter, oneOf) {
|
|
|
40
41
|
throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
|
|
41
42
|
}
|
|
42
43
|
const supported = required.concat(optional);
|
|
43
|
-
if (ObjectKeys(config).some(key => !supported.includes(key))) {
|
|
44
|
+
if (ObjectKeys$1(config).some(key => !supported.includes(key))) {
|
|
44
45
|
throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
|
|
45
46
|
}
|
|
46
47
|
}
|
|
@@ -50,6 +51,13 @@ function untrustedIsObject(untrusted) {
|
|
|
50
51
|
function areRequiredParametersPresent(config, configPropertyNames) {
|
|
51
52
|
return configPropertyNames.parameters.required.every(req => req in config);
|
|
52
53
|
}
|
|
54
|
+
const snapshotRefreshOptions = {
|
|
55
|
+
overrides: {
|
|
56
|
+
headers: {
|
|
57
|
+
'Cache-Control': 'no-cache',
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
};
|
|
53
61
|
function generateParamConfigMetadata(name, required, resourceType, typeCheckShape, isArrayShape = false, coerceFn) {
|
|
54
62
|
return {
|
|
55
63
|
name,
|
|
@@ -73,6 +81,7 @@ function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
|
73
81
|
}
|
|
74
82
|
const keyPrefix = 'ServicePlan';
|
|
75
83
|
|
|
84
|
+
const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
|
|
76
85
|
const { isArray: ArrayIsArray } = Array;
|
|
77
86
|
const { stringify: JSONStringify } = JSON;
|
|
78
87
|
function equalsArray(a, b, equalsItem) {
|
|
@@ -94,105 +103,130 @@ function createLink(ref) {
|
|
|
94
103
|
};
|
|
95
104
|
}
|
|
96
105
|
|
|
97
|
-
const VERSION$
|
|
98
|
-
function validate$
|
|
106
|
+
const VERSION$5 = "de8249c0171ece44729fbb33b422a074";
|
|
107
|
+
function validate$8(obj, path = 'ServicePlanStepExecutionStatusRepresentation') {
|
|
99
108
|
const v_error = (() => {
|
|
100
109
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
101
110
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
102
111
|
}
|
|
103
|
-
const
|
|
104
|
-
const
|
|
105
|
-
if (typeof
|
|
106
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
112
|
+
const obj_executionStatus = obj.executionStatus;
|
|
113
|
+
const path_executionStatus = path + '.executionStatus';
|
|
114
|
+
if (typeof obj_executionStatus !== 'string') {
|
|
115
|
+
return new TypeError('Expected "string" but received "' + typeof obj_executionStatus + '" (at "' + path_executionStatus + '")');
|
|
107
116
|
}
|
|
108
|
-
const
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
|
|
117
|
+
const obj_stepId = obj.stepId;
|
|
118
|
+
const path_stepId = path + '.stepId';
|
|
119
|
+
let obj_stepId_union0 = null;
|
|
120
|
+
const obj_stepId_union0_error = (() => {
|
|
121
|
+
if (typeof obj_stepId !== 'string') {
|
|
122
|
+
return new TypeError('Expected "string" but received "' + typeof obj_stepId + '" (at "' + path_stepId + '")');
|
|
123
|
+
}
|
|
124
|
+
})();
|
|
125
|
+
if (obj_stepId_union0_error != null) {
|
|
126
|
+
obj_stepId_union0 = obj_stepId_union0_error.message;
|
|
127
|
+
}
|
|
128
|
+
let obj_stepId_union1 = null;
|
|
129
|
+
const obj_stepId_union1_error = (() => {
|
|
130
|
+
if (obj_stepId !== null) {
|
|
131
|
+
return new TypeError('Expected "null" but received "' + typeof obj_stepId + '" (at "' + path_stepId + '")');
|
|
132
|
+
}
|
|
133
|
+
})();
|
|
134
|
+
if (obj_stepId_union1_error != null) {
|
|
135
|
+
obj_stepId_union1 = obj_stepId_union1_error.message;
|
|
136
|
+
}
|
|
137
|
+
if (obj_stepId_union0 && obj_stepId_union1) {
|
|
138
|
+
let message = 'Object doesn\'t match union (at "' + path_stepId + '")';
|
|
139
|
+
message += '\n' + obj_stepId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
140
|
+
message += '\n' + obj_stepId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
141
|
+
return new TypeError(message);
|
|
112
142
|
}
|
|
113
143
|
})();
|
|
114
144
|
return v_error === undefined ? null : v_error;
|
|
115
145
|
}
|
|
116
|
-
const RepresentationType$
|
|
117
|
-
function normalize$
|
|
146
|
+
const RepresentationType$5 = 'ServicePlanStepExecutionStatusRepresentation';
|
|
147
|
+
function normalize$5(input, existing, path, luvio, store, timestamp) {
|
|
118
148
|
return input;
|
|
119
149
|
}
|
|
120
|
-
const select$
|
|
150
|
+
const select$9 = function ServicePlanStepExecutionStatusRepresentationSelect() {
|
|
121
151
|
return {
|
|
122
152
|
kind: 'Fragment',
|
|
123
|
-
version: VERSION$
|
|
153
|
+
version: VERSION$5,
|
|
124
154
|
private: [],
|
|
125
155
|
opaque: true
|
|
126
156
|
};
|
|
127
157
|
};
|
|
128
|
-
function equals$
|
|
158
|
+
function equals$5(existing, incoming) {
|
|
129
159
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
130
160
|
return false;
|
|
131
161
|
}
|
|
132
162
|
return true;
|
|
133
163
|
}
|
|
134
|
-
const ingest$
|
|
164
|
+
const ingest$5 = function ServicePlanStepExecutionStatusRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
135
165
|
if (process.env.NODE_ENV !== 'production') {
|
|
136
|
-
const validateError = validate$
|
|
166
|
+
const validateError = validate$8(input);
|
|
137
167
|
if (validateError !== null) {
|
|
138
168
|
throw validateError;
|
|
139
169
|
}
|
|
140
170
|
}
|
|
141
171
|
const key = path.fullPath;
|
|
142
172
|
const ttlToUse = path.ttl !== undefined ? path.ttl : 500;
|
|
143
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
173
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$5, "ServicePlan", VERSION$5, RepresentationType$5, equals$5);
|
|
144
174
|
return createLink(key);
|
|
145
175
|
};
|
|
146
|
-
function getTypeCacheKeys$
|
|
176
|
+
function getTypeCacheKeys$5(rootKeySet, luvio, input, fullPathFactory) {
|
|
147
177
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
148
178
|
const rootKey = fullPathFactory();
|
|
149
179
|
rootKeySet.set(rootKey, {
|
|
150
180
|
namespace: keyPrefix,
|
|
151
|
-
representationName: RepresentationType$
|
|
181
|
+
representationName: RepresentationType$5,
|
|
152
182
|
mergeable: false
|
|
153
183
|
});
|
|
154
184
|
}
|
|
155
185
|
|
|
156
|
-
const VERSION$
|
|
157
|
-
function validate$
|
|
186
|
+
const VERSION$4 = "f3a6de28bf56634adca757ba07accf43";
|
|
187
|
+
function validate$7(obj, path = 'ServicePlanExecutionOutputRepresentation') {
|
|
158
188
|
const v_error = (() => {
|
|
159
189
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
160
190
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
161
191
|
}
|
|
162
|
-
const
|
|
163
|
-
const
|
|
164
|
-
if (typeof
|
|
165
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
192
|
+
const obj_executionStatus = obj.executionStatus;
|
|
193
|
+
const path_executionStatus = path + '.executionStatus';
|
|
194
|
+
if (typeof obj_executionStatus !== 'string') {
|
|
195
|
+
return new TypeError('Expected "string" but received "' + typeof obj_executionStatus + '" (at "' + path_executionStatus + '")');
|
|
166
196
|
}
|
|
167
|
-
const
|
|
168
|
-
const
|
|
169
|
-
if (
|
|
170
|
-
return new TypeError('Expected "
|
|
171
|
-
}
|
|
172
|
-
const obj_steps = obj.steps;
|
|
173
|
-
const path_steps = path + '.steps';
|
|
174
|
-
if (!ArrayIsArray(obj_steps)) {
|
|
175
|
-
return new TypeError('Expected "array" but received "' + typeof obj_steps + '" (at "' + path_steps + '")');
|
|
197
|
+
const obj_planSteps = obj.planSteps;
|
|
198
|
+
const path_planSteps = path + '.planSteps';
|
|
199
|
+
if (!ArrayIsArray(obj_planSteps)) {
|
|
200
|
+
return new TypeError('Expected "array" but received "' + typeof obj_planSteps + '" (at "' + path_planSteps + '")');
|
|
176
201
|
}
|
|
177
|
-
for (let i = 0; i <
|
|
178
|
-
const
|
|
179
|
-
const
|
|
180
|
-
if (typeof
|
|
181
|
-
return new TypeError('Expected "object" but received "' + typeof
|
|
202
|
+
for (let i = 0; i < obj_planSteps.length; i++) {
|
|
203
|
+
const obj_planSteps_item = obj_planSteps[i];
|
|
204
|
+
const path_planSteps_item = path_planSteps + '[' + i + ']';
|
|
205
|
+
if (typeof obj_planSteps_item !== 'object') {
|
|
206
|
+
return new TypeError('Expected "object" but received "' + typeof obj_planSteps_item + '" (at "' + path_planSteps_item + '")');
|
|
182
207
|
}
|
|
183
208
|
}
|
|
184
209
|
})();
|
|
185
210
|
return v_error === undefined ? null : v_error;
|
|
186
211
|
}
|
|
187
|
-
const RepresentationType$
|
|
188
|
-
function
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
212
|
+
const RepresentationType$4 = 'ServicePlanExecutionOutputRepresentation';
|
|
213
|
+
function keyBuilder$6(luvio, config) {
|
|
214
|
+
return keyPrefix + '::' + RepresentationType$4 + ':' + config.id;
|
|
215
|
+
}
|
|
216
|
+
function keyBuilderFromType$2(luvio, object) {
|
|
217
|
+
const keyParams = {
|
|
218
|
+
id: object.executionStatus
|
|
219
|
+
};
|
|
220
|
+
return keyBuilder$6(luvio, keyParams);
|
|
221
|
+
}
|
|
222
|
+
function normalize$4(input, existing, path, luvio, store, timestamp) {
|
|
223
|
+
const input_planSteps = input.planSteps;
|
|
224
|
+
const input_planSteps_id = path.fullPath + '__planSteps';
|
|
225
|
+
for (let i = 0; i < input_planSteps.length; i++) {
|
|
226
|
+
const input_planSteps_item = input_planSteps[i];
|
|
227
|
+
let input_planSteps_item_id = input_planSteps_id + '__' + i;
|
|
228
|
+
input_planSteps[i] = ingest$5(input_planSteps_item, {
|
|
229
|
+
fullPath: input_planSteps_item_id,
|
|
196
230
|
propertyName: i,
|
|
197
231
|
parent: {
|
|
198
232
|
data: input,
|
|
@@ -204,53 +238,624 @@ function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
|
204
238
|
}
|
|
205
239
|
return input;
|
|
206
240
|
}
|
|
207
|
-
const select$
|
|
241
|
+
const select$8 = function ServicePlanExecutionOutputRepresentationSelect() {
|
|
208
242
|
return {
|
|
209
243
|
kind: 'Fragment',
|
|
210
|
-
version: VERSION$
|
|
244
|
+
version: VERSION$4,
|
|
211
245
|
private: [],
|
|
212
246
|
selections: [
|
|
213
247
|
{
|
|
214
|
-
name: '
|
|
248
|
+
name: 'executionStatus',
|
|
215
249
|
kind: 'Scalar'
|
|
216
250
|
},
|
|
217
251
|
{
|
|
218
|
-
name: '
|
|
219
|
-
kind: 'Scalar'
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
name: 'steps',
|
|
252
|
+
name: 'planSteps',
|
|
223
253
|
kind: 'Link',
|
|
224
254
|
plural: true,
|
|
225
|
-
fragment: select$
|
|
255
|
+
fragment: select$9()
|
|
226
256
|
}
|
|
227
257
|
]
|
|
228
258
|
};
|
|
229
259
|
};
|
|
230
|
-
function equals$
|
|
231
|
-
const
|
|
232
|
-
const
|
|
233
|
-
if (!(
|
|
260
|
+
function equals$4(existing, incoming) {
|
|
261
|
+
const existing_executionStatus = existing.executionStatus;
|
|
262
|
+
const incoming_executionStatus = incoming.executionStatus;
|
|
263
|
+
if (!(existing_executionStatus === incoming_executionStatus)) {
|
|
234
264
|
return false;
|
|
235
265
|
}
|
|
236
|
-
const
|
|
237
|
-
const
|
|
238
|
-
|
|
266
|
+
const existing_planSteps = existing.planSteps;
|
|
267
|
+
const incoming_planSteps = incoming.planSteps;
|
|
268
|
+
const equals_planSteps_items = equalsArray(existing_planSteps, incoming_planSteps, (existing_planSteps_item, incoming_planSteps_item) => {
|
|
269
|
+
if (!(existing_planSteps_item.__ref === incoming_planSteps_item.__ref)) {
|
|
270
|
+
return false;
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
if (equals_planSteps_items === false) {
|
|
239
274
|
return false;
|
|
240
275
|
}
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
276
|
+
return true;
|
|
277
|
+
}
|
|
278
|
+
const ingest$4 = function ServicePlanExecutionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
279
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
280
|
+
const validateError = validate$7(input);
|
|
281
|
+
if (validateError !== null) {
|
|
282
|
+
throw validateError;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
const key = keyBuilderFromType$2(luvio, input);
|
|
286
|
+
const ttlToUse = path.ttl !== undefined ? path.ttl : 500;
|
|
287
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$4, "ServicePlan", VERSION$4, RepresentationType$4, equals$4);
|
|
288
|
+
return createLink(key);
|
|
289
|
+
};
|
|
290
|
+
function getTypeCacheKeys$4(rootKeySet, luvio, input, fullPathFactory) {
|
|
291
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
292
|
+
const rootKey = keyBuilderFromType$2(luvio, input);
|
|
293
|
+
rootKeySet.set(rootKey, {
|
|
294
|
+
namespace: keyPrefix,
|
|
295
|
+
representationName: RepresentationType$4,
|
|
296
|
+
mergeable: false
|
|
297
|
+
});
|
|
298
|
+
const input_planSteps_length = input.planSteps.length;
|
|
299
|
+
for (let i = 0; i < input_planSteps_length; i++) {
|
|
300
|
+
getTypeCacheKeys$5(rootKeySet, luvio, input.planSteps[i], () => '');
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
function select$7(luvio, params) {
|
|
305
|
+
return select$8();
|
|
306
|
+
}
|
|
307
|
+
function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
|
|
308
|
+
getTypeCacheKeys$4(storeKeyMap, luvio, response);
|
|
309
|
+
}
|
|
310
|
+
function ingestSuccess$3(luvio, resourceParams, response) {
|
|
311
|
+
const { body } = response;
|
|
312
|
+
const key = keyBuilderFromType$2(luvio, body);
|
|
313
|
+
luvio.storeIngest(key, ingest$4, body);
|
|
314
|
+
const snapshot = luvio.storeLookup({
|
|
315
|
+
recordId: key,
|
|
316
|
+
node: select$7(),
|
|
317
|
+
variables: {},
|
|
318
|
+
});
|
|
319
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
320
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
321
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
246
322
|
}
|
|
323
|
+
}
|
|
324
|
+
deepFreeze(snapshot.data);
|
|
325
|
+
return snapshot;
|
|
326
|
+
}
|
|
327
|
+
function createResourceRequest$3(config) {
|
|
328
|
+
const headers = {};
|
|
329
|
+
return {
|
|
330
|
+
baseUri: '/services/data/v62.0',
|
|
331
|
+
basePath: '/connect/service-plan/execute/' + config.urlParams.planOrStepId + '',
|
|
332
|
+
method: 'put',
|
|
333
|
+
body: config.body,
|
|
334
|
+
urlParams: config.urlParams,
|
|
335
|
+
queryParams: {},
|
|
336
|
+
headers,
|
|
337
|
+
priority: 'normal',
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
const adapterName$3 = 'executeServicePlan';
|
|
342
|
+
const executeServicePlan_ConfigPropertyMetadata = [
|
|
343
|
+
generateParamConfigMetadata('planOrStepId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
344
|
+
generateParamConfigMetadata('action', true, 2 /* Body */, 0 /* String */),
|
|
345
|
+
];
|
|
346
|
+
const executeServicePlan_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, executeServicePlan_ConfigPropertyMetadata);
|
|
347
|
+
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$4(executeServicePlan_ConfigPropertyMetadata);
|
|
348
|
+
function typeCheckConfig$3(untrustedConfig) {
|
|
349
|
+
const config = {};
|
|
350
|
+
typeCheckConfig$4(untrustedConfig, config, executeServicePlan_ConfigPropertyMetadata);
|
|
351
|
+
return config;
|
|
352
|
+
}
|
|
353
|
+
function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
|
|
354
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
355
|
+
return null;
|
|
356
|
+
}
|
|
357
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
358
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
359
|
+
}
|
|
360
|
+
const config = typeCheckConfig$3(untrustedConfig);
|
|
361
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
362
|
+
return null;
|
|
363
|
+
}
|
|
364
|
+
return config;
|
|
365
|
+
}
|
|
366
|
+
function buildNetworkSnapshot$3(luvio, config, options) {
|
|
367
|
+
const resourceParams = createResourceParams$3(config);
|
|
368
|
+
const request = createResourceRequest$3(resourceParams);
|
|
369
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
370
|
+
.then((response) => {
|
|
371
|
+
return luvio.handleSuccessResponse(() => {
|
|
372
|
+
const snapshot = ingestSuccess$3(luvio, resourceParams, response);
|
|
373
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
374
|
+
}, () => {
|
|
375
|
+
const cache = new StoreKeyMap();
|
|
376
|
+
getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
|
|
377
|
+
return cache;
|
|
378
|
+
});
|
|
379
|
+
}, (response) => {
|
|
380
|
+
deepFreeze(response);
|
|
381
|
+
throw response;
|
|
247
382
|
});
|
|
248
|
-
|
|
383
|
+
}
|
|
384
|
+
const executeServicePlanAdapterFactory = (luvio) => {
|
|
385
|
+
return function executeServicePlan(untrustedConfig) {
|
|
386
|
+
const config = validateAdapterConfig$3(untrustedConfig, executeServicePlan_ConfigPropertyNames);
|
|
387
|
+
// Invalid or incomplete config
|
|
388
|
+
if (config === null) {
|
|
389
|
+
throw new Error('Invalid config for "executeServicePlan"');
|
|
390
|
+
}
|
|
391
|
+
return buildNetworkSnapshot$3(luvio, config);
|
|
392
|
+
};
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
function validate$6(obj, path = 'ServicePlanGenerationSessionInformationOutputRepresentation') {
|
|
396
|
+
const v_error = (() => {
|
|
397
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
398
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
399
|
+
}
|
|
400
|
+
const obj_clientFeatureKey = obj.clientFeatureKey;
|
|
401
|
+
const path_clientFeatureKey = path + '.clientFeatureKey';
|
|
402
|
+
let obj_clientFeatureKey_union0 = null;
|
|
403
|
+
const obj_clientFeatureKey_union0_error = (() => {
|
|
404
|
+
if (typeof obj_clientFeatureKey !== 'string') {
|
|
405
|
+
return new TypeError('Expected "string" but received "' + typeof obj_clientFeatureKey + '" (at "' + path_clientFeatureKey + '")');
|
|
406
|
+
}
|
|
407
|
+
})();
|
|
408
|
+
if (obj_clientFeatureKey_union0_error != null) {
|
|
409
|
+
obj_clientFeatureKey_union0 = obj_clientFeatureKey_union0_error.message;
|
|
410
|
+
}
|
|
411
|
+
let obj_clientFeatureKey_union1 = null;
|
|
412
|
+
const obj_clientFeatureKey_union1_error = (() => {
|
|
413
|
+
if (obj_clientFeatureKey !== null) {
|
|
414
|
+
return new TypeError('Expected "null" but received "' + typeof obj_clientFeatureKey + '" (at "' + path_clientFeatureKey + '")');
|
|
415
|
+
}
|
|
416
|
+
})();
|
|
417
|
+
if (obj_clientFeatureKey_union1_error != null) {
|
|
418
|
+
obj_clientFeatureKey_union1 = obj_clientFeatureKey_union1_error.message;
|
|
419
|
+
}
|
|
420
|
+
if (obj_clientFeatureKey_union0 && obj_clientFeatureKey_union1) {
|
|
421
|
+
let message = 'Object doesn\'t match union (at "' + path_clientFeatureKey + '")';
|
|
422
|
+
message += '\n' + obj_clientFeatureKey_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
423
|
+
message += '\n' + obj_clientFeatureKey_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
424
|
+
return new TypeError(message);
|
|
425
|
+
}
|
|
426
|
+
const obj_feedbackKey = obj.feedbackKey;
|
|
427
|
+
const path_feedbackKey = path + '.feedbackKey';
|
|
428
|
+
let obj_feedbackKey_union0 = null;
|
|
429
|
+
const obj_feedbackKey_union0_error = (() => {
|
|
430
|
+
if (typeof obj_feedbackKey !== 'string') {
|
|
431
|
+
return new TypeError('Expected "string" but received "' + typeof obj_feedbackKey + '" (at "' + path_feedbackKey + '")');
|
|
432
|
+
}
|
|
433
|
+
})();
|
|
434
|
+
if (obj_feedbackKey_union0_error != null) {
|
|
435
|
+
obj_feedbackKey_union0 = obj_feedbackKey_union0_error.message;
|
|
436
|
+
}
|
|
437
|
+
let obj_feedbackKey_union1 = null;
|
|
438
|
+
const obj_feedbackKey_union1_error = (() => {
|
|
439
|
+
if (obj_feedbackKey !== null) {
|
|
440
|
+
return new TypeError('Expected "null" but received "' + typeof obj_feedbackKey + '" (at "' + path_feedbackKey + '")');
|
|
441
|
+
}
|
|
442
|
+
})();
|
|
443
|
+
if (obj_feedbackKey_union1_error != null) {
|
|
444
|
+
obj_feedbackKey_union1 = obj_feedbackKey_union1_error.message;
|
|
445
|
+
}
|
|
446
|
+
if (obj_feedbackKey_union0 && obj_feedbackKey_union1) {
|
|
447
|
+
let message = 'Object doesn\'t match union (at "' + path_feedbackKey + '")';
|
|
448
|
+
message += '\n' + obj_feedbackKey_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
449
|
+
message += '\n' + obj_feedbackKey_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
450
|
+
return new TypeError(message);
|
|
451
|
+
}
|
|
452
|
+
const obj_planKey = obj.planKey;
|
|
453
|
+
const path_planKey = path + '.planKey';
|
|
454
|
+
let obj_planKey_union0 = null;
|
|
455
|
+
const obj_planKey_union0_error = (() => {
|
|
456
|
+
if (typeof obj_planKey !== 'string') {
|
|
457
|
+
return new TypeError('Expected "string" but received "' + typeof obj_planKey + '" (at "' + path_planKey + '")');
|
|
458
|
+
}
|
|
459
|
+
})();
|
|
460
|
+
if (obj_planKey_union0_error != null) {
|
|
461
|
+
obj_planKey_union0 = obj_planKey_union0_error.message;
|
|
462
|
+
}
|
|
463
|
+
let obj_planKey_union1 = null;
|
|
464
|
+
const obj_planKey_union1_error = (() => {
|
|
465
|
+
if (obj_planKey !== null) {
|
|
466
|
+
return new TypeError('Expected "null" but received "' + typeof obj_planKey + '" (at "' + path_planKey + '")');
|
|
467
|
+
}
|
|
468
|
+
})();
|
|
469
|
+
if (obj_planKey_union1_error != null) {
|
|
470
|
+
obj_planKey_union1 = obj_planKey_union1_error.message;
|
|
471
|
+
}
|
|
472
|
+
if (obj_planKey_union0 && obj_planKey_union1) {
|
|
473
|
+
let message = 'Object doesn\'t match union (at "' + path_planKey + '")';
|
|
474
|
+
message += '\n' + obj_planKey_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
475
|
+
message += '\n' + obj_planKey_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
476
|
+
return new TypeError(message);
|
|
477
|
+
}
|
|
478
|
+
const obj_sessionKey = obj.sessionKey;
|
|
479
|
+
const path_sessionKey = path + '.sessionKey';
|
|
480
|
+
let obj_sessionKey_union0 = null;
|
|
481
|
+
const obj_sessionKey_union0_error = (() => {
|
|
482
|
+
if (typeof obj_sessionKey !== 'string') {
|
|
483
|
+
return new TypeError('Expected "string" but received "' + typeof obj_sessionKey + '" (at "' + path_sessionKey + '")');
|
|
484
|
+
}
|
|
485
|
+
})();
|
|
486
|
+
if (obj_sessionKey_union0_error != null) {
|
|
487
|
+
obj_sessionKey_union0 = obj_sessionKey_union0_error.message;
|
|
488
|
+
}
|
|
489
|
+
let obj_sessionKey_union1 = null;
|
|
490
|
+
const obj_sessionKey_union1_error = (() => {
|
|
491
|
+
if (obj_sessionKey !== null) {
|
|
492
|
+
return new TypeError('Expected "null" but received "' + typeof obj_sessionKey + '" (at "' + path_sessionKey + '")');
|
|
493
|
+
}
|
|
494
|
+
})();
|
|
495
|
+
if (obj_sessionKey_union1_error != null) {
|
|
496
|
+
obj_sessionKey_union1 = obj_sessionKey_union1_error.message;
|
|
497
|
+
}
|
|
498
|
+
if (obj_sessionKey_union0 && obj_sessionKey_union1) {
|
|
499
|
+
let message = 'Object doesn\'t match union (at "' + path_sessionKey + '")';
|
|
500
|
+
message += '\n' + obj_sessionKey_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
501
|
+
message += '\n' + obj_sessionKey_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
502
|
+
return new TypeError(message);
|
|
503
|
+
}
|
|
504
|
+
})();
|
|
505
|
+
return v_error === undefined ? null : v_error;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
function validate$5(obj, path = 'ServicePlanStepRepresentation') {
|
|
509
|
+
const v_error = (() => {
|
|
510
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
511
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
512
|
+
}
|
|
513
|
+
const obj_groupName = obj.groupName;
|
|
514
|
+
const path_groupName = path + '.groupName';
|
|
515
|
+
let obj_groupName_union0 = null;
|
|
516
|
+
const obj_groupName_union0_error = (() => {
|
|
517
|
+
if (typeof obj_groupName !== 'string') {
|
|
518
|
+
return new TypeError('Expected "string" but received "' + typeof obj_groupName + '" (at "' + path_groupName + '")');
|
|
519
|
+
}
|
|
520
|
+
})();
|
|
521
|
+
if (obj_groupName_union0_error != null) {
|
|
522
|
+
obj_groupName_union0 = obj_groupName_union0_error.message;
|
|
523
|
+
}
|
|
524
|
+
let obj_groupName_union1 = null;
|
|
525
|
+
const obj_groupName_union1_error = (() => {
|
|
526
|
+
if (obj_groupName !== null) {
|
|
527
|
+
return new TypeError('Expected "null" but received "' + typeof obj_groupName + '" (at "' + path_groupName + '")');
|
|
528
|
+
}
|
|
529
|
+
})();
|
|
530
|
+
if (obj_groupName_union1_error != null) {
|
|
531
|
+
obj_groupName_union1 = obj_groupName_union1_error.message;
|
|
532
|
+
}
|
|
533
|
+
if (obj_groupName_union0 && obj_groupName_union1) {
|
|
534
|
+
let message = 'Object doesn\'t match union (at "' + path_groupName + '")';
|
|
535
|
+
message += '\n' + obj_groupName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
536
|
+
message += '\n' + obj_groupName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
537
|
+
return new TypeError(message);
|
|
538
|
+
}
|
|
539
|
+
const obj_id = obj.id;
|
|
540
|
+
const path_id = path + '.id';
|
|
541
|
+
if (typeof obj_id !== 'string') {
|
|
542
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
543
|
+
}
|
|
544
|
+
const obj_name = obj.name;
|
|
545
|
+
const path_name = path + '.name';
|
|
546
|
+
let obj_name_union0 = null;
|
|
547
|
+
const obj_name_union0_error = (() => {
|
|
548
|
+
if (typeof obj_name !== 'string') {
|
|
549
|
+
return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
550
|
+
}
|
|
551
|
+
})();
|
|
552
|
+
if (obj_name_union0_error != null) {
|
|
553
|
+
obj_name_union0 = obj_name_union0_error.message;
|
|
554
|
+
}
|
|
555
|
+
let obj_name_union1 = null;
|
|
556
|
+
const obj_name_union1_error = (() => {
|
|
557
|
+
if (obj_name !== null) {
|
|
558
|
+
return new TypeError('Expected "null" but received "' + typeof obj_name + '" (at "' + path_name + '")');
|
|
559
|
+
}
|
|
560
|
+
})();
|
|
561
|
+
if (obj_name_union1_error != null) {
|
|
562
|
+
obj_name_union1 = obj_name_union1_error.message;
|
|
563
|
+
}
|
|
564
|
+
if (obj_name_union0 && obj_name_union1) {
|
|
565
|
+
let message = 'Object doesn\'t match union (at "' + path_name + '")';
|
|
566
|
+
message += '\n' + obj_name_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
567
|
+
message += '\n' + obj_name_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
568
|
+
return new TypeError(message);
|
|
569
|
+
}
|
|
570
|
+
const obj_order = obj.order;
|
|
571
|
+
const path_order = path + '.order';
|
|
572
|
+
if (typeof obj_order !== 'number' || (typeof obj_order === 'number' && Math.floor(obj_order) !== obj_order)) {
|
|
573
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_order + '" (at "' + path_order + '")');
|
|
574
|
+
}
|
|
575
|
+
})();
|
|
576
|
+
return v_error === undefined ? null : v_error;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
const VERSION$3 = "4c0fefe9caa169c4221be369e384ee56";
|
|
580
|
+
function validate$4(obj, path = 'ServicePlanOutputRepresentation') {
|
|
581
|
+
const v_error = (() => {
|
|
582
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
583
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
584
|
+
}
|
|
585
|
+
const obj_copilotSessionInfo = obj.copilotSessionInfo;
|
|
586
|
+
const path_copilotSessionInfo = path + '.copilotSessionInfo';
|
|
587
|
+
let obj_copilotSessionInfo_union0 = null;
|
|
588
|
+
const obj_copilotSessionInfo_union0_error = (() => {
|
|
589
|
+
const referencepath_copilotSessionInfoValidationError = validate$6(obj_copilotSessionInfo, path_copilotSessionInfo);
|
|
590
|
+
if (referencepath_copilotSessionInfoValidationError !== null) {
|
|
591
|
+
let message = 'Object doesn\'t match ServicePlanGenerationSessionInformationOutputRepresentation (at "' + path_copilotSessionInfo + '")\n';
|
|
592
|
+
message += referencepath_copilotSessionInfoValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
593
|
+
return new TypeError(message);
|
|
594
|
+
}
|
|
595
|
+
})();
|
|
596
|
+
if (obj_copilotSessionInfo_union0_error != null) {
|
|
597
|
+
obj_copilotSessionInfo_union0 = obj_copilotSessionInfo_union0_error.message;
|
|
598
|
+
}
|
|
599
|
+
let obj_copilotSessionInfo_union1 = null;
|
|
600
|
+
const obj_copilotSessionInfo_union1_error = (() => {
|
|
601
|
+
if (obj_copilotSessionInfo !== null) {
|
|
602
|
+
return new TypeError('Expected "null" but received "' + typeof obj_copilotSessionInfo + '" (at "' + path_copilotSessionInfo + '")');
|
|
603
|
+
}
|
|
604
|
+
})();
|
|
605
|
+
if (obj_copilotSessionInfo_union1_error != null) {
|
|
606
|
+
obj_copilotSessionInfo_union1 = obj_copilotSessionInfo_union1_error.message;
|
|
607
|
+
}
|
|
608
|
+
if (obj_copilotSessionInfo_union0 && obj_copilotSessionInfo_union1) {
|
|
609
|
+
let message = 'Object doesn\'t match union (at "' + path_copilotSessionInfo + '")';
|
|
610
|
+
message += '\n' + obj_copilotSessionInfo_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
611
|
+
message += '\n' + obj_copilotSessionInfo_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
612
|
+
return new TypeError(message);
|
|
613
|
+
}
|
|
614
|
+
const obj_createdDate = obj.createdDate;
|
|
615
|
+
const path_createdDate = path + '.createdDate';
|
|
616
|
+
let obj_createdDate_union0 = null;
|
|
617
|
+
const obj_createdDate_union0_error = (() => {
|
|
618
|
+
if (typeof obj_createdDate !== 'string') {
|
|
619
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
620
|
+
}
|
|
621
|
+
})();
|
|
622
|
+
if (obj_createdDate_union0_error != null) {
|
|
623
|
+
obj_createdDate_union0 = obj_createdDate_union0_error.message;
|
|
624
|
+
}
|
|
625
|
+
let obj_createdDate_union1 = null;
|
|
626
|
+
const obj_createdDate_union1_error = (() => {
|
|
627
|
+
if (obj_createdDate !== null) {
|
|
628
|
+
return new TypeError('Expected "null" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
629
|
+
}
|
|
630
|
+
})();
|
|
631
|
+
if (obj_createdDate_union1_error != null) {
|
|
632
|
+
obj_createdDate_union1 = obj_createdDate_union1_error.message;
|
|
633
|
+
}
|
|
634
|
+
if (obj_createdDate_union0 && obj_createdDate_union1) {
|
|
635
|
+
let message = 'Object doesn\'t match union (at "' + path_createdDate + '")';
|
|
636
|
+
message += '\n' + obj_createdDate_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
637
|
+
message += '\n' + obj_createdDate_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
638
|
+
return new TypeError(message);
|
|
639
|
+
}
|
|
640
|
+
const obj_id = obj.id;
|
|
641
|
+
const path_id = path + '.id';
|
|
642
|
+
let obj_id_union0 = null;
|
|
643
|
+
const obj_id_union0_error = (() => {
|
|
644
|
+
if (typeof obj_id !== 'string') {
|
|
645
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
646
|
+
}
|
|
647
|
+
})();
|
|
648
|
+
if (obj_id_union0_error != null) {
|
|
649
|
+
obj_id_union0 = obj_id_union0_error.message;
|
|
650
|
+
}
|
|
651
|
+
let obj_id_union1 = null;
|
|
652
|
+
const obj_id_union1_error = (() => {
|
|
653
|
+
if (obj_id !== null) {
|
|
654
|
+
return new TypeError('Expected "null" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
655
|
+
}
|
|
656
|
+
})();
|
|
657
|
+
if (obj_id_union1_error != null) {
|
|
658
|
+
obj_id_union1 = obj_id_union1_error.message;
|
|
659
|
+
}
|
|
660
|
+
if (obj_id_union0 && obj_id_union1) {
|
|
661
|
+
let message = 'Object doesn\'t match union (at "' + path_id + '")';
|
|
662
|
+
message += '\n' + obj_id_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
663
|
+
message += '\n' + obj_id_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
664
|
+
return new TypeError(message);
|
|
665
|
+
}
|
|
666
|
+
const obj_intent = obj.intent;
|
|
667
|
+
const path_intent = path + '.intent';
|
|
668
|
+
let obj_intent_union0 = null;
|
|
669
|
+
const obj_intent_union0_error = (() => {
|
|
670
|
+
if (typeof obj_intent !== 'string') {
|
|
671
|
+
return new TypeError('Expected "string" but received "' + typeof obj_intent + '" (at "' + path_intent + '")');
|
|
672
|
+
}
|
|
673
|
+
})();
|
|
674
|
+
if (obj_intent_union0_error != null) {
|
|
675
|
+
obj_intent_union0 = obj_intent_union0_error.message;
|
|
676
|
+
}
|
|
677
|
+
let obj_intent_union1 = null;
|
|
678
|
+
const obj_intent_union1_error = (() => {
|
|
679
|
+
if (obj_intent !== null) {
|
|
680
|
+
return new TypeError('Expected "null" but received "' + typeof obj_intent + '" (at "' + path_intent + '")');
|
|
681
|
+
}
|
|
682
|
+
})();
|
|
683
|
+
if (obj_intent_union1_error != null) {
|
|
684
|
+
obj_intent_union1 = obj_intent_union1_error.message;
|
|
685
|
+
}
|
|
686
|
+
if (obj_intent_union0 && obj_intent_union1) {
|
|
687
|
+
let message = 'Object doesn\'t match union (at "' + path_intent + '")';
|
|
688
|
+
message += '\n' + obj_intent_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
689
|
+
message += '\n' + obj_intent_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
690
|
+
return new TypeError(message);
|
|
691
|
+
}
|
|
692
|
+
const obj_plan = obj.plan;
|
|
693
|
+
const path_plan = path + '.plan';
|
|
694
|
+
let obj_plan_union0 = null;
|
|
695
|
+
const obj_plan_union0_error = (() => {
|
|
696
|
+
if (typeof obj_plan !== 'string') {
|
|
697
|
+
return new TypeError('Expected "string" but received "' + typeof obj_plan + '" (at "' + path_plan + '")');
|
|
698
|
+
}
|
|
699
|
+
})();
|
|
700
|
+
if (obj_plan_union0_error != null) {
|
|
701
|
+
obj_plan_union0 = obj_plan_union0_error.message;
|
|
702
|
+
}
|
|
703
|
+
let obj_plan_union1 = null;
|
|
704
|
+
const obj_plan_union1_error = (() => {
|
|
705
|
+
if (obj_plan !== null) {
|
|
706
|
+
return new TypeError('Expected "null" but received "' + typeof obj_plan + '" (at "' + path_plan + '")');
|
|
707
|
+
}
|
|
708
|
+
})();
|
|
709
|
+
if (obj_plan_union1_error != null) {
|
|
710
|
+
obj_plan_union1 = obj_plan_union1_error.message;
|
|
711
|
+
}
|
|
712
|
+
if (obj_plan_union0 && obj_plan_union1) {
|
|
713
|
+
let message = 'Object doesn\'t match union (at "' + path_plan + '")';
|
|
714
|
+
message += '\n' + obj_plan_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
715
|
+
message += '\n' + obj_plan_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
716
|
+
return new TypeError(message);
|
|
717
|
+
}
|
|
718
|
+
const obj_steps = obj.steps;
|
|
719
|
+
const path_steps = path + '.steps';
|
|
720
|
+
if (!ArrayIsArray(obj_steps)) {
|
|
721
|
+
return new TypeError('Expected "array" but received "' + typeof obj_steps + '" (at "' + path_steps + '")');
|
|
722
|
+
}
|
|
723
|
+
for (let i = 0; i < obj_steps.length; i++) {
|
|
724
|
+
const obj_steps_item = obj_steps[i];
|
|
725
|
+
const path_steps_item = path_steps + '[' + i + ']';
|
|
726
|
+
const referencepath_steps_itemValidationError = validate$5(obj_steps_item, path_steps_item);
|
|
727
|
+
if (referencepath_steps_itemValidationError !== null) {
|
|
728
|
+
let message = 'Object doesn\'t match ServicePlanStepRepresentation (at "' + path_steps_item + '")\n';
|
|
729
|
+
message += referencepath_steps_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
730
|
+
return new TypeError(message);
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
const obj_topicDescription = obj.topicDescription;
|
|
734
|
+
const path_topicDescription = path + '.topicDescription';
|
|
735
|
+
let obj_topicDescription_union0 = null;
|
|
736
|
+
const obj_topicDescription_union0_error = (() => {
|
|
737
|
+
if (typeof obj_topicDescription !== 'string') {
|
|
738
|
+
return new TypeError('Expected "string" but received "' + typeof obj_topicDescription + '" (at "' + path_topicDescription + '")');
|
|
739
|
+
}
|
|
740
|
+
})();
|
|
741
|
+
if (obj_topicDescription_union0_error != null) {
|
|
742
|
+
obj_topicDescription_union0 = obj_topicDescription_union0_error.message;
|
|
743
|
+
}
|
|
744
|
+
let obj_topicDescription_union1 = null;
|
|
745
|
+
const obj_topicDescription_union1_error = (() => {
|
|
746
|
+
if (obj_topicDescription !== null) {
|
|
747
|
+
return new TypeError('Expected "null" but received "' + typeof obj_topicDescription + '" (at "' + path_topicDescription + '")');
|
|
748
|
+
}
|
|
749
|
+
})();
|
|
750
|
+
if (obj_topicDescription_union1_error != null) {
|
|
751
|
+
obj_topicDescription_union1 = obj_topicDescription_union1_error.message;
|
|
752
|
+
}
|
|
753
|
+
if (obj_topicDescription_union0 && obj_topicDescription_union1) {
|
|
754
|
+
let message = 'Object doesn\'t match union (at "' + path_topicDescription + '")';
|
|
755
|
+
message += '\n' + obj_topicDescription_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
756
|
+
message += '\n' + obj_topicDescription_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
757
|
+
return new TypeError(message);
|
|
758
|
+
}
|
|
759
|
+
const obj_topicId = obj.topicId;
|
|
760
|
+
const path_topicId = path + '.topicId';
|
|
761
|
+
let obj_topicId_union0 = null;
|
|
762
|
+
const obj_topicId_union0_error = (() => {
|
|
763
|
+
if (typeof obj_topicId !== 'string') {
|
|
764
|
+
return new TypeError('Expected "string" but received "' + typeof obj_topicId + '" (at "' + path_topicId + '")');
|
|
765
|
+
}
|
|
766
|
+
})();
|
|
767
|
+
if (obj_topicId_union0_error != null) {
|
|
768
|
+
obj_topicId_union0 = obj_topicId_union0_error.message;
|
|
769
|
+
}
|
|
770
|
+
let obj_topicId_union1 = null;
|
|
771
|
+
const obj_topicId_union1_error = (() => {
|
|
772
|
+
if (obj_topicId !== null) {
|
|
773
|
+
return new TypeError('Expected "null" but received "' + typeof obj_topicId + '" (at "' + path_topicId + '")');
|
|
774
|
+
}
|
|
775
|
+
})();
|
|
776
|
+
if (obj_topicId_union1_error != null) {
|
|
777
|
+
obj_topicId_union1 = obj_topicId_union1_error.message;
|
|
778
|
+
}
|
|
779
|
+
if (obj_topicId_union0 && obj_topicId_union1) {
|
|
780
|
+
let message = 'Object doesn\'t match union (at "' + path_topicId + '")';
|
|
781
|
+
message += '\n' + obj_topicId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
782
|
+
message += '\n' + obj_topicId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
783
|
+
return new TypeError(message);
|
|
784
|
+
}
|
|
785
|
+
const obj_topicName = obj.topicName;
|
|
786
|
+
const path_topicName = path + '.topicName';
|
|
787
|
+
let obj_topicName_union0 = null;
|
|
788
|
+
const obj_topicName_union0_error = (() => {
|
|
789
|
+
if (typeof obj_topicName !== 'string') {
|
|
790
|
+
return new TypeError('Expected "string" but received "' + typeof obj_topicName + '" (at "' + path_topicName + '")');
|
|
791
|
+
}
|
|
792
|
+
})();
|
|
793
|
+
if (obj_topicName_union0_error != null) {
|
|
794
|
+
obj_topicName_union0 = obj_topicName_union0_error.message;
|
|
795
|
+
}
|
|
796
|
+
let obj_topicName_union1 = null;
|
|
797
|
+
const obj_topicName_union1_error = (() => {
|
|
798
|
+
if (obj_topicName !== null) {
|
|
799
|
+
return new TypeError('Expected "null" but received "' + typeof obj_topicName + '" (at "' + path_topicName + '")');
|
|
800
|
+
}
|
|
801
|
+
})();
|
|
802
|
+
if (obj_topicName_union1_error != null) {
|
|
803
|
+
obj_topicName_union1 = obj_topicName_union1_error.message;
|
|
804
|
+
}
|
|
805
|
+
if (obj_topicName_union0 && obj_topicName_union1) {
|
|
806
|
+
let message = 'Object doesn\'t match union (at "' + path_topicName + '")';
|
|
807
|
+
message += '\n' + obj_topicName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
808
|
+
message += '\n' + obj_topicName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
809
|
+
return new TypeError(message);
|
|
810
|
+
}
|
|
811
|
+
const obj_type = obj.type;
|
|
812
|
+
const path_type = path + '.type';
|
|
813
|
+
let obj_type_union0 = null;
|
|
814
|
+
const obj_type_union0_error = (() => {
|
|
815
|
+
if (typeof obj_type !== 'string') {
|
|
816
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
817
|
+
}
|
|
818
|
+
})();
|
|
819
|
+
if (obj_type_union0_error != null) {
|
|
820
|
+
obj_type_union0 = obj_type_union0_error.message;
|
|
821
|
+
}
|
|
822
|
+
let obj_type_union1 = null;
|
|
823
|
+
const obj_type_union1_error = (() => {
|
|
824
|
+
if (obj_type !== null) {
|
|
825
|
+
return new TypeError('Expected "null" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
826
|
+
}
|
|
827
|
+
})();
|
|
828
|
+
if (obj_type_union1_error != null) {
|
|
829
|
+
obj_type_union1 = obj_type_union1_error.message;
|
|
830
|
+
}
|
|
831
|
+
if (obj_type_union0 && obj_type_union1) {
|
|
832
|
+
let message = 'Object doesn\'t match union (at "' + path_type + '")';
|
|
833
|
+
message += '\n' + obj_type_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
834
|
+
message += '\n' + obj_type_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
835
|
+
return new TypeError(message);
|
|
836
|
+
}
|
|
837
|
+
})();
|
|
838
|
+
return v_error === undefined ? null : v_error;
|
|
839
|
+
}
|
|
840
|
+
const RepresentationType$3 = 'ServicePlanOutputRepresentation';
|
|
841
|
+
function normalize$3(input, existing, path, luvio, store, timestamp) {
|
|
842
|
+
return input;
|
|
843
|
+
}
|
|
844
|
+
const select$6 = function ServicePlanOutputRepresentationSelect() {
|
|
845
|
+
return {
|
|
846
|
+
kind: 'Fragment',
|
|
847
|
+
version: VERSION$3,
|
|
848
|
+
private: [],
|
|
849
|
+
opaque: true
|
|
850
|
+
};
|
|
851
|
+
};
|
|
852
|
+
function equals$3(existing, incoming) {
|
|
853
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
249
854
|
return false;
|
|
250
855
|
}
|
|
251
856
|
return true;
|
|
252
857
|
}
|
|
253
|
-
const ingest$3 = function
|
|
858
|
+
const ingest$3 = function ServicePlanOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
254
859
|
if (process.env.NODE_ENV !== 'production') {
|
|
255
860
|
const validateError = validate$4(input);
|
|
256
861
|
if (validateError !== null) {
|
|
@@ -270,153 +875,465 @@ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
270
875
|
representationName: RepresentationType$3,
|
|
271
876
|
mergeable: false
|
|
272
877
|
});
|
|
273
|
-
const input_steps_length = input.steps.length;
|
|
274
|
-
for (let i = 0; i < input_steps_length; i++) {
|
|
275
|
-
getTypeCacheKeys$4(rootKeySet, luvio, input.steps[i], () => '');
|
|
276
|
-
}
|
|
277
878
|
}
|
|
278
879
|
|
|
279
|
-
const
|
|
280
|
-
|
|
880
|
+
const TTL$1 = 1000;
|
|
881
|
+
const VERSION$2 = "1b54ee684d826acba0725f11c75ee33b";
|
|
882
|
+
function validate$3(obj, path = 'ServicePlanGenerationOutputRepresentation') {
|
|
281
883
|
const v_error = (() => {
|
|
282
884
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
283
885
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
284
886
|
}
|
|
887
|
+
const obj_copilotId = obj.copilotId;
|
|
888
|
+
const path_copilotId = path + '.copilotId';
|
|
889
|
+
let obj_copilotId_union0 = null;
|
|
890
|
+
const obj_copilotId_union0_error = (() => {
|
|
891
|
+
if (typeof obj_copilotId !== 'string') {
|
|
892
|
+
return new TypeError('Expected "string" but received "' + typeof obj_copilotId + '" (at "' + path_copilotId + '")');
|
|
893
|
+
}
|
|
894
|
+
})();
|
|
895
|
+
if (obj_copilotId_union0_error != null) {
|
|
896
|
+
obj_copilotId_union0 = obj_copilotId_union0_error.message;
|
|
897
|
+
}
|
|
898
|
+
let obj_copilotId_union1 = null;
|
|
899
|
+
const obj_copilotId_union1_error = (() => {
|
|
900
|
+
if (obj_copilotId !== null) {
|
|
901
|
+
return new TypeError('Expected "null" but received "' + typeof obj_copilotId + '" (at "' + path_copilotId + '")');
|
|
902
|
+
}
|
|
903
|
+
})();
|
|
904
|
+
if (obj_copilotId_union1_error != null) {
|
|
905
|
+
obj_copilotId_union1 = obj_copilotId_union1_error.message;
|
|
906
|
+
}
|
|
907
|
+
if (obj_copilotId_union0 && obj_copilotId_union1) {
|
|
908
|
+
let message = 'Object doesn\'t match union (at "' + path_copilotId + '")';
|
|
909
|
+
message += '\n' + obj_copilotId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
910
|
+
message += '\n' + obj_copilotId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
911
|
+
return new TypeError(message);
|
|
912
|
+
}
|
|
913
|
+
const obj_copilotName = obj.copilotName;
|
|
914
|
+
const path_copilotName = path + '.copilotName';
|
|
915
|
+
let obj_copilotName_union0 = null;
|
|
916
|
+
const obj_copilotName_union0_error = (() => {
|
|
917
|
+
if (typeof obj_copilotName !== 'string') {
|
|
918
|
+
return new TypeError('Expected "string" but received "' + typeof obj_copilotName + '" (at "' + path_copilotName + '")');
|
|
919
|
+
}
|
|
920
|
+
})();
|
|
921
|
+
if (obj_copilotName_union0_error != null) {
|
|
922
|
+
obj_copilotName_union0 = obj_copilotName_union0_error.message;
|
|
923
|
+
}
|
|
924
|
+
let obj_copilotName_union1 = null;
|
|
925
|
+
const obj_copilotName_union1_error = (() => {
|
|
926
|
+
if (obj_copilotName !== null) {
|
|
927
|
+
return new TypeError('Expected "null" but received "' + typeof obj_copilotName + '" (at "' + path_copilotName + '")');
|
|
928
|
+
}
|
|
929
|
+
})();
|
|
930
|
+
if (obj_copilotName_union1_error != null) {
|
|
931
|
+
obj_copilotName_union1 = obj_copilotName_union1_error.message;
|
|
932
|
+
}
|
|
933
|
+
if (obj_copilotName_union0 && obj_copilotName_union1) {
|
|
934
|
+
let message = 'Object doesn\'t match union (at "' + path_copilotName + '")';
|
|
935
|
+
message += '\n' + obj_copilotName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
936
|
+
message += '\n' + obj_copilotName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
937
|
+
return new TypeError(message);
|
|
938
|
+
}
|
|
939
|
+
const obj_errorMessage = obj.errorMessage;
|
|
940
|
+
const path_errorMessage = path + '.errorMessage';
|
|
941
|
+
let obj_errorMessage_union0 = null;
|
|
942
|
+
const obj_errorMessage_union0_error = (() => {
|
|
943
|
+
if (typeof obj_errorMessage !== 'string') {
|
|
944
|
+
return new TypeError('Expected "string" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
|
|
945
|
+
}
|
|
946
|
+
})();
|
|
947
|
+
if (obj_errorMessage_union0_error != null) {
|
|
948
|
+
obj_errorMessage_union0 = obj_errorMessage_union0_error.message;
|
|
949
|
+
}
|
|
950
|
+
let obj_errorMessage_union1 = null;
|
|
951
|
+
const obj_errorMessage_union1_error = (() => {
|
|
952
|
+
if (obj_errorMessage !== null) {
|
|
953
|
+
return new TypeError('Expected "null" but received "' + typeof obj_errorMessage + '" (at "' + path_errorMessage + '")');
|
|
954
|
+
}
|
|
955
|
+
})();
|
|
956
|
+
if (obj_errorMessage_union1_error != null) {
|
|
957
|
+
obj_errorMessage_union1 = obj_errorMessage_union1_error.message;
|
|
958
|
+
}
|
|
959
|
+
if (obj_errorMessage_union0 && obj_errorMessage_union1) {
|
|
960
|
+
let message = 'Object doesn\'t match union (at "' + path_errorMessage + '")';
|
|
961
|
+
message += '\n' + obj_errorMessage_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
962
|
+
message += '\n' + obj_errorMessage_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
963
|
+
return new TypeError(message);
|
|
964
|
+
}
|
|
965
|
+
const obj_id = obj.id;
|
|
966
|
+
const path_id = path + '.id';
|
|
967
|
+
let obj_id_union0 = null;
|
|
968
|
+
const obj_id_union0_error = (() => {
|
|
969
|
+
if (typeof obj_id !== 'string') {
|
|
970
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
971
|
+
}
|
|
972
|
+
})();
|
|
973
|
+
if (obj_id_union0_error != null) {
|
|
974
|
+
obj_id_union0 = obj_id_union0_error.message;
|
|
975
|
+
}
|
|
976
|
+
let obj_id_union1 = null;
|
|
977
|
+
const obj_id_union1_error = (() => {
|
|
978
|
+
if (obj_id !== null) {
|
|
979
|
+
return new TypeError('Expected "null" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
980
|
+
}
|
|
981
|
+
})();
|
|
982
|
+
if (obj_id_union1_error != null) {
|
|
983
|
+
obj_id_union1 = obj_id_union1_error.message;
|
|
984
|
+
}
|
|
985
|
+
if (obj_id_union0 && obj_id_union1) {
|
|
986
|
+
let message = 'Object doesn\'t match union (at "' + path_id + '")';
|
|
987
|
+
message += '\n' + obj_id_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
988
|
+
message += '\n' + obj_id_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
989
|
+
return new TypeError(message);
|
|
990
|
+
}
|
|
991
|
+
const obj_plan = obj.plan;
|
|
992
|
+
const path_plan = path + '.plan';
|
|
993
|
+
let obj_plan_union0 = null;
|
|
994
|
+
const obj_plan_union0_error = (() => {
|
|
995
|
+
if (typeof obj_plan !== 'object') {
|
|
996
|
+
return new TypeError('Expected "object" but received "' + typeof obj_plan + '" (at "' + path_plan + '")');
|
|
997
|
+
}
|
|
998
|
+
})();
|
|
999
|
+
if (obj_plan_union0_error != null) {
|
|
1000
|
+
obj_plan_union0 = obj_plan_union0_error.message;
|
|
1001
|
+
}
|
|
1002
|
+
let obj_plan_union1 = null;
|
|
1003
|
+
const obj_plan_union1_error = (() => {
|
|
1004
|
+
if (obj_plan !== null) {
|
|
1005
|
+
return new TypeError('Expected "null" but received "' + typeof obj_plan + '" (at "' + path_plan + '")');
|
|
1006
|
+
}
|
|
1007
|
+
})();
|
|
1008
|
+
if (obj_plan_union1_error != null) {
|
|
1009
|
+
obj_plan_union1 = obj_plan_union1_error.message;
|
|
1010
|
+
}
|
|
1011
|
+
if (obj_plan_union0 && obj_plan_union1) {
|
|
1012
|
+
let message = 'Object doesn\'t match union (at "' + path_plan + '")';
|
|
1013
|
+
message += '\n' + obj_plan_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1014
|
+
message += '\n' + obj_plan_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1015
|
+
return new TypeError(message);
|
|
1016
|
+
}
|
|
285
1017
|
const obj_reason = obj.reason;
|
|
286
1018
|
const path_reason = path + '.reason';
|
|
287
1019
|
if (typeof obj_reason !== 'string') {
|
|
288
1020
|
return new TypeError('Expected "string" but received "' + typeof obj_reason + '" (at "' + path_reason + '")');
|
|
289
1021
|
}
|
|
290
|
-
const
|
|
291
|
-
const
|
|
292
|
-
if (typeof
|
|
293
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
294
|
-
}
|
|
295
|
-
const obj_servicePlan = obj.servicePlan;
|
|
296
|
-
const path_servicePlan = path + '.servicePlan';
|
|
297
|
-
if (typeof obj_servicePlan !== 'object') {
|
|
298
|
-
return new TypeError('Expected "object" but received "' + typeof obj_servicePlan + '" (at "' + path_servicePlan + '")');
|
|
1022
|
+
const obj_recordId = obj.recordId;
|
|
1023
|
+
const path_recordId = path + '.recordId';
|
|
1024
|
+
if (typeof obj_recordId !== 'string') {
|
|
1025
|
+
return new TypeError('Expected "string" but received "' + typeof obj_recordId + '" (at "' + path_recordId + '")');
|
|
299
1026
|
}
|
|
300
1027
|
const obj_status = obj.status;
|
|
301
1028
|
const path_status = path + '.status';
|
|
302
1029
|
if (typeof obj_status !== 'string') {
|
|
303
1030
|
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
304
1031
|
}
|
|
1032
|
+
const obj_type = obj.type;
|
|
1033
|
+
const path_type = path + '.type';
|
|
1034
|
+
if (typeof obj_type !== 'string') {
|
|
1035
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
1036
|
+
}
|
|
305
1037
|
})();
|
|
306
1038
|
return v_error === undefined ? null : v_error;
|
|
307
1039
|
}
|
|
308
|
-
const RepresentationType$2 = '
|
|
309
|
-
function keyBuilder$
|
|
310
|
-
return keyPrefix + '::' + RepresentationType$2 + ':' + config.id;
|
|
1040
|
+
const RepresentationType$2 = 'ServicePlanGenerationOutputRepresentation';
|
|
1041
|
+
function keyBuilder$5(luvio, config) {
|
|
1042
|
+
return keyPrefix + '::' + RepresentationType$2 + ':' + (config.id === null ? '' : config.id);
|
|
311
1043
|
}
|
|
312
1044
|
function keyBuilderFromType$1(luvio, object) {
|
|
313
1045
|
const keyParams = {
|
|
314
|
-
id: object.
|
|
1046
|
+
id: object.id
|
|
315
1047
|
};
|
|
316
|
-
return keyBuilder$
|
|
1048
|
+
return keyBuilder$5(luvio, keyParams);
|
|
317
1049
|
}
|
|
318
1050
|
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
319
|
-
const
|
|
320
|
-
const
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
1051
|
+
const input_plan = input.plan;
|
|
1052
|
+
const input_plan_id = path.fullPath + '__plan';
|
|
1053
|
+
if (input_plan !== null && typeof input_plan === 'object') {
|
|
1054
|
+
input.plan = ingest$3(input_plan, {
|
|
1055
|
+
fullPath: input_plan_id,
|
|
1056
|
+
propertyName: 'plan',
|
|
1057
|
+
parent: {
|
|
1058
|
+
data: input,
|
|
1059
|
+
key: path.fullPath,
|
|
1060
|
+
existing: existing,
|
|
1061
|
+
},
|
|
1062
|
+
ttl: path.ttl
|
|
1063
|
+
}, luvio, store, timestamp);
|
|
1064
|
+
}
|
|
331
1065
|
return input;
|
|
332
1066
|
}
|
|
333
|
-
const select$
|
|
1067
|
+
const select$5 = function ServicePlanGenerationOutputRepresentationSelect() {
|
|
334
1068
|
return {
|
|
335
1069
|
kind: 'Fragment',
|
|
336
1070
|
version: VERSION$2,
|
|
337
1071
|
private: [],
|
|
338
1072
|
selections: [
|
|
339
1073
|
{
|
|
340
|
-
name: '
|
|
1074
|
+
name: 'copilotId',
|
|
341
1075
|
kind: 'Scalar'
|
|
342
1076
|
},
|
|
343
1077
|
{
|
|
344
|
-
name: '
|
|
1078
|
+
name: 'copilotName',
|
|
1079
|
+
kind: 'Scalar'
|
|
1080
|
+
},
|
|
1081
|
+
{
|
|
1082
|
+
name: 'errorMessage',
|
|
1083
|
+
kind: 'Scalar'
|
|
1084
|
+
},
|
|
1085
|
+
{
|
|
1086
|
+
name: 'id',
|
|
345
1087
|
kind: 'Scalar'
|
|
346
1088
|
},
|
|
347
1089
|
{
|
|
348
|
-
name: '
|
|
1090
|
+
name: 'plan',
|
|
349
1091
|
kind: 'Link',
|
|
350
|
-
|
|
1092
|
+
nullable: true,
|
|
1093
|
+
fragment: select$6()
|
|
1094
|
+
},
|
|
1095
|
+
{
|
|
1096
|
+
name: 'reason',
|
|
1097
|
+
kind: 'Scalar'
|
|
1098
|
+
},
|
|
1099
|
+
{
|
|
1100
|
+
name: 'recordId',
|
|
1101
|
+
kind: 'Scalar'
|
|
351
1102
|
},
|
|
352
1103
|
{
|
|
353
1104
|
name: 'status',
|
|
354
1105
|
kind: 'Scalar'
|
|
1106
|
+
},
|
|
1107
|
+
{
|
|
1108
|
+
name: 'type',
|
|
1109
|
+
kind: 'Scalar'
|
|
1110
|
+
}
|
|
1111
|
+
]
|
|
1112
|
+
};
|
|
1113
|
+
};
|
|
1114
|
+
function equals$2(existing, incoming) {
|
|
1115
|
+
const existing_reason = existing.reason;
|
|
1116
|
+
const incoming_reason = incoming.reason;
|
|
1117
|
+
if (!(existing_reason === incoming_reason)) {
|
|
1118
|
+
return false;
|
|
1119
|
+
}
|
|
1120
|
+
const existing_recordId = existing.recordId;
|
|
1121
|
+
const incoming_recordId = incoming.recordId;
|
|
1122
|
+
if (!(existing_recordId === incoming_recordId)) {
|
|
1123
|
+
return false;
|
|
1124
|
+
}
|
|
1125
|
+
const existing_status = existing.status;
|
|
1126
|
+
const incoming_status = incoming.status;
|
|
1127
|
+
if (!(existing_status === incoming_status)) {
|
|
1128
|
+
return false;
|
|
1129
|
+
}
|
|
1130
|
+
const existing_type = existing.type;
|
|
1131
|
+
const incoming_type = incoming.type;
|
|
1132
|
+
if (!(existing_type === incoming_type)) {
|
|
1133
|
+
return false;
|
|
1134
|
+
}
|
|
1135
|
+
const existing_copilotId = existing.copilotId;
|
|
1136
|
+
const incoming_copilotId = incoming.copilotId;
|
|
1137
|
+
if (!(existing_copilotId === incoming_copilotId)) {
|
|
1138
|
+
return false;
|
|
1139
|
+
}
|
|
1140
|
+
const existing_copilotName = existing.copilotName;
|
|
1141
|
+
const incoming_copilotName = incoming.copilotName;
|
|
1142
|
+
if (!(existing_copilotName === incoming_copilotName)) {
|
|
1143
|
+
return false;
|
|
1144
|
+
}
|
|
1145
|
+
const existing_errorMessage = existing.errorMessage;
|
|
1146
|
+
const incoming_errorMessage = incoming.errorMessage;
|
|
1147
|
+
if (!(existing_errorMessage === incoming_errorMessage)) {
|
|
1148
|
+
return false;
|
|
1149
|
+
}
|
|
1150
|
+
const existing_id = existing.id;
|
|
1151
|
+
const incoming_id = incoming.id;
|
|
1152
|
+
if (!(existing_id === incoming_id)) {
|
|
1153
|
+
return false;
|
|
1154
|
+
}
|
|
1155
|
+
const existing_plan = existing.plan;
|
|
1156
|
+
const incoming_plan = incoming.plan;
|
|
1157
|
+
if (!(existing_plan === incoming_plan
|
|
1158
|
+
|| (existing_plan != null &&
|
|
1159
|
+
incoming_plan != null &&
|
|
1160
|
+
existing_plan.__ref != null &&
|
|
1161
|
+
incoming_plan.__ref != null &&
|
|
1162
|
+
existing_plan.__ref === incoming_plan.__ref))) {
|
|
1163
|
+
return false;
|
|
1164
|
+
}
|
|
1165
|
+
return true;
|
|
1166
|
+
}
|
|
1167
|
+
const ingest$2 = function ServicePlanGenerationOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
1168
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1169
|
+
const validateError = validate$3(input);
|
|
1170
|
+
if (validateError !== null) {
|
|
1171
|
+
throw validateError;
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
1175
|
+
const ttlToUse = TTL$1;
|
|
1176
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "ServicePlan", VERSION$2, RepresentationType$2, equals$2);
|
|
1177
|
+
return createLink(key);
|
|
1178
|
+
};
|
|
1179
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
1180
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
1181
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
1182
|
+
rootKeySet.set(rootKey, {
|
|
1183
|
+
namespace: keyPrefix,
|
|
1184
|
+
representationName: RepresentationType$2,
|
|
1185
|
+
mergeable: false
|
|
1186
|
+
});
|
|
1187
|
+
if (input.plan !== null && typeof input.plan === 'object') {
|
|
1188
|
+
getTypeCacheKeys$3(rootKeySet, luvio, input.plan, () => rootKey + "__" + "plan");
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
const notifyUpdateAvailableFactory$1 = (luvio) => {
|
|
1192
|
+
return function notifyServicePlanGenerationUpdateAvailable(configs) {
|
|
1193
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1194
|
+
const requiredKeyParams = ['id'];
|
|
1195
|
+
configs.forEach(config => {
|
|
1196
|
+
if (false === requiredKeyParams.every(req => req in config)) {
|
|
1197
|
+
throw new Error(`one of the configs did not contain all required parameters: ${JSONStringify(ObjectKeys(config))}`);
|
|
1198
|
+
}
|
|
1199
|
+
});
|
|
1200
|
+
}
|
|
1201
|
+
const keys = configs.map(c => keyBuilder$5(luvio, c));
|
|
1202
|
+
return luvio.notifyStoreUpdateAvailable(keys);
|
|
1203
|
+
};
|
|
1204
|
+
};
|
|
1205
|
+
|
|
1206
|
+
function select$4(luvio, params) {
|
|
1207
|
+
return select$5();
|
|
1208
|
+
}
|
|
1209
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
1210
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
1211
|
+
}
|
|
1212
|
+
function ingestSuccess$2(luvio, resourceParams, response) {
|
|
1213
|
+
const { body } = response;
|
|
1214
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
1215
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
1216
|
+
const snapshot = luvio.storeLookup({
|
|
1217
|
+
recordId: key,
|
|
1218
|
+
node: select$4(),
|
|
1219
|
+
variables: {},
|
|
1220
|
+
});
|
|
1221
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1222
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
1223
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
deepFreeze(snapshot.data);
|
|
1227
|
+
return snapshot;
|
|
1228
|
+
}
|
|
1229
|
+
function createResourceRequest$2(config) {
|
|
1230
|
+
const headers = {};
|
|
1231
|
+
return {
|
|
1232
|
+
baseUri: '/services/data/v62.0',
|
|
1233
|
+
basePath: '/connect/service-plan/generationRequests',
|
|
1234
|
+
method: 'post',
|
|
1235
|
+
body: config.body,
|
|
1236
|
+
urlParams: {},
|
|
1237
|
+
queryParams: config.queryParams,
|
|
1238
|
+
headers,
|
|
1239
|
+
priority: 'normal',
|
|
1240
|
+
};
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
const adapterName$2 = 'generateServicePlan';
|
|
1244
|
+
const generateServicePlan_ConfigPropertyMetadata = [
|
|
1245
|
+
generateParamConfigMetadata('processingMode', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1246
|
+
generateParamConfigMetadata('recordId', false, 1 /* QueryParameter */, 0 /* String */),
|
|
1247
|
+
generateParamConfigMetadata('additionalContext', true, 2 /* Body */, 4 /* Unsupported */),
|
|
1248
|
+
generateParamConfigMetadata('generationMode', true, 2 /* Body */, 0 /* String */),
|
|
1249
|
+
generateParamConfigMetadata('source', true, 2 /* Body */, 0 /* String */),
|
|
1250
|
+
];
|
|
1251
|
+
const generateServicePlan_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, generateServicePlan_ConfigPropertyMetadata);
|
|
1252
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$4(generateServicePlan_ConfigPropertyMetadata);
|
|
1253
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
1254
|
+
const config = {};
|
|
1255
|
+
typeCheckConfig$4(untrustedConfig, config, generateServicePlan_ConfigPropertyMetadata);
|
|
1256
|
+
const untrustedConfig_additionalContext = untrustedConfig.additionalContext;
|
|
1257
|
+
if (untrustedIsObject(untrustedConfig_additionalContext)) {
|
|
1258
|
+
const untrustedConfig_additionalContext_object = {};
|
|
1259
|
+
const untrustedConfig_additionalContext_keys = Object.keys(untrustedConfig_additionalContext);
|
|
1260
|
+
for (let i = 0, arrayLength = untrustedConfig_additionalContext_keys.length; i < arrayLength; i++) {
|
|
1261
|
+
const key = untrustedConfig_additionalContext_keys[i];
|
|
1262
|
+
const untrustedConfig_additionalContext_prop = untrustedConfig_additionalContext[key];
|
|
1263
|
+
if (typeof untrustedConfig_additionalContext_prop === 'string') {
|
|
1264
|
+
if (untrustedConfig_additionalContext_object !== undefined) {
|
|
1265
|
+
untrustedConfig_additionalContext_object[key] = untrustedConfig_additionalContext_prop;
|
|
1266
|
+
}
|
|
355
1267
|
}
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
const existing_reason = existing.reason;
|
|
361
|
-
const incoming_reason = incoming.reason;
|
|
362
|
-
if (!(existing_reason === incoming_reason)) {
|
|
363
|
-
return false;
|
|
1268
|
+
}
|
|
1269
|
+
if (untrustedConfig_additionalContext_object !== undefined && Object.keys(untrustedConfig_additionalContext_object).length >= 0) {
|
|
1270
|
+
config.additionalContext = untrustedConfig_additionalContext_object;
|
|
1271
|
+
}
|
|
364
1272
|
}
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
1273
|
+
return config;
|
|
1274
|
+
}
|
|
1275
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
1276
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
1277
|
+
return null;
|
|
369
1278
|
}
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
if (!(existing_status === incoming_status)) {
|
|
373
|
-
return false;
|
|
1279
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1280
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
374
1281
|
}
|
|
375
|
-
const
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
return false;
|
|
1282
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
1283
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
1284
|
+
return null;
|
|
379
1285
|
}
|
|
380
|
-
return
|
|
1286
|
+
return config;
|
|
381
1287
|
}
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
namespace: keyPrefix,
|
|
399
|
-
representationName: RepresentationType$2,
|
|
400
|
-
mergeable: false
|
|
1288
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
1289
|
+
const resourceParams = createResourceParams$2(config);
|
|
1290
|
+
const request = createResourceRequest$2(resourceParams);
|
|
1291
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
1292
|
+
.then((response) => {
|
|
1293
|
+
return luvio.handleSuccessResponse(() => {
|
|
1294
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response);
|
|
1295
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1296
|
+
}, () => {
|
|
1297
|
+
const cache = new StoreKeyMap();
|
|
1298
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
1299
|
+
return cache;
|
|
1300
|
+
});
|
|
1301
|
+
}, (response) => {
|
|
1302
|
+
deepFreeze(response);
|
|
1303
|
+
throw response;
|
|
401
1304
|
});
|
|
402
|
-
getTypeCacheKeys$3(rootKeySet, luvio, input.servicePlan, () => rootKey + "__" + "servicePlan");
|
|
403
1305
|
}
|
|
1306
|
+
const generateServicePlanAdapterFactory = (luvio) => {
|
|
1307
|
+
return function generateServicePlan(untrustedConfig) {
|
|
1308
|
+
const config = validateAdapterConfig$2(untrustedConfig, generateServicePlan_ConfigPropertyNames);
|
|
1309
|
+
// Invalid or incomplete config
|
|
1310
|
+
if (config === null) {
|
|
1311
|
+
throw new Error('Invalid config for "generateServicePlan"');
|
|
1312
|
+
}
|
|
1313
|
+
return buildNetworkSnapshot$2(luvio, config);
|
|
1314
|
+
};
|
|
1315
|
+
};
|
|
404
1316
|
|
|
405
1317
|
function select$3(luvio, params) {
|
|
406
|
-
return select$
|
|
1318
|
+
return select$5();
|
|
1319
|
+
}
|
|
1320
|
+
function keyBuilder$4(luvio, params) {
|
|
1321
|
+
return keyBuilder$5(luvio, {
|
|
1322
|
+
id: params.urlParams.requestId
|
|
1323
|
+
});
|
|
407
1324
|
}
|
|
408
1325
|
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
409
1326
|
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
410
1327
|
}
|
|
411
|
-
function ingestSuccess$1(luvio, resourceParams, response) {
|
|
1328
|
+
function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
412
1329
|
const { body } = response;
|
|
413
|
-
const key =
|
|
1330
|
+
const key = keyBuilder$4(luvio, resourceParams);
|
|
414
1331
|
luvio.storeIngest(key, ingest$2, body);
|
|
415
1332
|
const snapshot = luvio.storeLookup({
|
|
416
1333
|
recordId: key,
|
|
417
1334
|
node: select$3(),
|
|
418
1335
|
variables: {},
|
|
419
|
-
});
|
|
1336
|
+
}, snapshotRefresh);
|
|
420
1337
|
if (process.env.NODE_ENV !== 'production') {
|
|
421
1338
|
if (snapshot.state !== 'Fulfilled') {
|
|
422
1339
|
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
@@ -425,13 +1342,25 @@ function ingestSuccess$1(luvio, resourceParams, response) {
|
|
|
425
1342
|
deepFreeze(snapshot.data);
|
|
426
1343
|
return snapshot;
|
|
427
1344
|
}
|
|
1345
|
+
function ingestError$1(luvio, params, error, snapshotRefresh) {
|
|
1346
|
+
const key = keyBuilder$4(luvio, params);
|
|
1347
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1348
|
+
const storeMetadataParams = {
|
|
1349
|
+
ttl: TTL$1,
|
|
1350
|
+
namespace: keyPrefix,
|
|
1351
|
+
version: VERSION$2,
|
|
1352
|
+
representationName: RepresentationType$2
|
|
1353
|
+
};
|
|
1354
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1355
|
+
return errorSnapshot;
|
|
1356
|
+
}
|
|
428
1357
|
function createResourceRequest$1(config) {
|
|
429
1358
|
const headers = {};
|
|
430
1359
|
return {
|
|
431
1360
|
baseUri: '/services/data/v62.0',
|
|
432
|
-
basePath: '/connect/service-plan/
|
|
433
|
-
method: '
|
|
434
|
-
body:
|
|
1361
|
+
basePath: '/connect/service-plan/generationRequests/' + config.urlParams.requestId + '',
|
|
1362
|
+
method: 'get',
|
|
1363
|
+
body: null,
|
|
435
1364
|
urlParams: config.urlParams,
|
|
436
1365
|
queryParams: {},
|
|
437
1366
|
headers,
|
|
@@ -439,18 +1368,19 @@ function createResourceRequest$1(config) {
|
|
|
439
1368
|
};
|
|
440
1369
|
}
|
|
441
1370
|
|
|
442
|
-
const adapterName$1 = '
|
|
443
|
-
const
|
|
444
|
-
generateParamConfigMetadata('
|
|
445
|
-
generateParamConfigMetadata('intent', true, 2 /* Body */, 0 /* String */),
|
|
446
|
-
generateParamConfigMetadata('planId', true, 2 /* Body */, 0 /* String */),
|
|
447
|
-
generateParamConfigMetadata('sessionId', true, 2 /* Body */, 0 /* String */),
|
|
1371
|
+
const adapterName$1 = 'getGenerationRequest';
|
|
1372
|
+
const getGenerationRequest_ConfigPropertyMetadata = [
|
|
1373
|
+
generateParamConfigMetadata('requestId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
448
1374
|
];
|
|
449
|
-
const
|
|
450
|
-
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$
|
|
1375
|
+
const getGenerationRequest_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getGenerationRequest_ConfigPropertyMetadata);
|
|
1376
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$4(getGenerationRequest_ConfigPropertyMetadata);
|
|
1377
|
+
function keyBuilder$3(luvio, config) {
|
|
1378
|
+
const resourceParams = createResourceParams$1(config);
|
|
1379
|
+
return keyBuilder$4(luvio, resourceParams);
|
|
1380
|
+
}
|
|
451
1381
|
function typeCheckConfig$1(untrustedConfig) {
|
|
452
1382
|
const config = {};
|
|
453
|
-
typeCheckConfig$
|
|
1383
|
+
typeCheckConfig$4(untrustedConfig, config, getGenerationRequest_ConfigPropertyMetadata);
|
|
454
1384
|
return config;
|
|
455
1385
|
}
|
|
456
1386
|
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
@@ -466,138 +1396,304 @@ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
|
466
1396
|
}
|
|
467
1397
|
return config;
|
|
468
1398
|
}
|
|
1399
|
+
function adapterFragment$1(luvio, config) {
|
|
1400
|
+
createResourceParams$1(config);
|
|
1401
|
+
return select$3();
|
|
1402
|
+
}
|
|
1403
|
+
function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
|
|
1404
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
|
|
1405
|
+
config,
|
|
1406
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1407
|
+
});
|
|
1408
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1409
|
+
}
|
|
1410
|
+
function onFetchResponseError$1(luvio, config, resourceParams, response) {
|
|
1411
|
+
const snapshot = ingestError$1(luvio, resourceParams, response, {
|
|
1412
|
+
config,
|
|
1413
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1414
|
+
});
|
|
1415
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
1416
|
+
}
|
|
469
1417
|
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
470
1418
|
const resourceParams = createResourceParams$1(config);
|
|
471
1419
|
const request = createResourceRequest$1(resourceParams);
|
|
472
1420
|
return luvio.dispatchResourceRequest(request, options)
|
|
473
1421
|
.then((response) => {
|
|
474
|
-
return luvio.handleSuccessResponse(() => {
|
|
475
|
-
const snapshot = ingestSuccess$1(luvio, resourceParams, response);
|
|
476
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
477
|
-
}, () => {
|
|
1422
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
|
|
478
1423
|
const cache = new StoreKeyMap();
|
|
479
1424
|
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
480
1425
|
return cache;
|
|
481
1426
|
});
|
|
482
1427
|
}, (response) => {
|
|
483
|
-
|
|
484
|
-
throw response;
|
|
1428
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
|
|
485
1429
|
});
|
|
486
1430
|
}
|
|
487
|
-
|
|
488
|
-
return
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
1431
|
+
function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
|
|
1432
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
|
|
1433
|
+
}
|
|
1434
|
+
function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
|
|
1435
|
+
const { luvio, config } = context;
|
|
1436
|
+
const selector = {
|
|
1437
|
+
recordId: keyBuilder$3(luvio, config),
|
|
1438
|
+
node: adapterFragment$1(luvio, config),
|
|
1439
|
+
variables: {},
|
|
495
1440
|
};
|
|
1441
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
1442
|
+
config,
|
|
1443
|
+
resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
|
|
1444
|
+
});
|
|
1445
|
+
return cacheSnapshot;
|
|
1446
|
+
}
|
|
1447
|
+
const getGenerationRequestAdapterFactory = (luvio) => function ServicePlan__getGenerationRequest(untrustedConfig, requestContext) {
|
|
1448
|
+
const config = validateAdapterConfig$1(untrustedConfig, getGenerationRequest_ConfigPropertyNames);
|
|
1449
|
+
// Invalid or incomplete config
|
|
1450
|
+
if (config === null) {
|
|
1451
|
+
return null;
|
|
1452
|
+
}
|
|
1453
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
1454
|
+
buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
|
|
496
1455
|
};
|
|
497
1456
|
|
|
498
|
-
function validate$2(obj, path = '
|
|
1457
|
+
function validate$2(obj, path = 'ServicePlanStepDetailsRepresentation') {
|
|
499
1458
|
const v_error = (() => {
|
|
500
1459
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
501
1460
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
502
1461
|
}
|
|
503
|
-
const
|
|
504
|
-
const
|
|
505
|
-
if (typeof
|
|
506
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
1462
|
+
const obj_executionStatus = obj.executionStatus;
|
|
1463
|
+
const path_executionStatus = path + '.executionStatus';
|
|
1464
|
+
if (typeof obj_executionStatus !== 'string') {
|
|
1465
|
+
return new TypeError('Expected "string" but received "' + typeof obj_executionStatus + '" (at "' + path_executionStatus + '")');
|
|
507
1466
|
}
|
|
508
|
-
const
|
|
509
|
-
const
|
|
510
|
-
|
|
511
|
-
|
|
1467
|
+
const obj_groupName = obj.groupName;
|
|
1468
|
+
const path_groupName = path + '.groupName';
|
|
1469
|
+
let obj_groupName_union0 = null;
|
|
1470
|
+
const obj_groupName_union0_error = (() => {
|
|
1471
|
+
if (typeof obj_groupName !== 'string') {
|
|
1472
|
+
return new TypeError('Expected "string" but received "' + typeof obj_groupName + '" (at "' + path_groupName + '")');
|
|
1473
|
+
}
|
|
1474
|
+
})();
|
|
1475
|
+
if (obj_groupName_union0_error != null) {
|
|
1476
|
+
obj_groupName_union0 = obj_groupName_union0_error.message;
|
|
512
1477
|
}
|
|
513
|
-
|
|
514
|
-
const
|
|
515
|
-
|
|
516
|
-
|
|
1478
|
+
let obj_groupName_union1 = null;
|
|
1479
|
+
const obj_groupName_union1_error = (() => {
|
|
1480
|
+
if (obj_groupName !== null) {
|
|
1481
|
+
return new TypeError('Expected "null" but received "' + typeof obj_groupName + '" (at "' + path_groupName + '")');
|
|
1482
|
+
}
|
|
1483
|
+
})();
|
|
1484
|
+
if (obj_groupName_union1_error != null) {
|
|
1485
|
+
obj_groupName_union1 = obj_groupName_union1_error.message;
|
|
517
1486
|
}
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
1487
|
+
if (obj_groupName_union0 && obj_groupName_union1) {
|
|
1488
|
+
let message = 'Object doesn\'t match union (at "' + path_groupName + '")';
|
|
1489
|
+
message += '\n' + obj_groupName_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1490
|
+
message += '\n' + obj_groupName_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1491
|
+
return new TypeError(message);
|
|
522
1492
|
}
|
|
523
|
-
const
|
|
524
|
-
const
|
|
525
|
-
if (typeof
|
|
526
|
-
return new TypeError('Expected "
|
|
1493
|
+
const obj_order = obj.order;
|
|
1494
|
+
const path_order = path + '.order';
|
|
1495
|
+
if (typeof obj_order !== 'number' || (typeof obj_order === 'number' && Math.floor(obj_order) !== obj_order)) {
|
|
1496
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_order + '" (at "' + path_order + '")');
|
|
527
1497
|
}
|
|
528
|
-
const
|
|
529
|
-
const
|
|
530
|
-
if (typeof
|
|
531
|
-
return new TypeError('Expected "string" but received "' + typeof
|
|
1498
|
+
const obj_stepId = obj.stepId;
|
|
1499
|
+
const path_stepId = path + '.stepId';
|
|
1500
|
+
if (typeof obj_stepId !== 'string') {
|
|
1501
|
+
return new TypeError('Expected "string" but received "' + typeof obj_stepId + '" (at "' + path_stepId + '")');
|
|
1502
|
+
}
|
|
1503
|
+
const obj_stepName = obj.stepName;
|
|
1504
|
+
const path_stepName = path + '.stepName';
|
|
1505
|
+
if (typeof obj_stepName !== 'string') {
|
|
1506
|
+
return new TypeError('Expected "string" but received "' + typeof obj_stepName + '" (at "' + path_stepName + '")');
|
|
532
1507
|
}
|
|
533
1508
|
})();
|
|
534
1509
|
return v_error === undefined ? null : v_error;
|
|
535
1510
|
}
|
|
536
1511
|
|
|
537
|
-
const VERSION$1 = "
|
|
538
|
-
function validate$1(obj, path = '
|
|
1512
|
+
const VERSION$1 = "b4f5b09aa7f657ce0b31e25aa7b50b1c";
|
|
1513
|
+
function validate$1(obj, path = 'ServicePlanDetailsRepresentation') {
|
|
539
1514
|
const v_error = (() => {
|
|
540
1515
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
541
1516
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
542
1517
|
}
|
|
543
|
-
const
|
|
544
|
-
const
|
|
545
|
-
|
|
546
|
-
|
|
1518
|
+
const obj_clientFeatureId = obj.clientFeatureId;
|
|
1519
|
+
const path_clientFeatureId = path + '.clientFeatureId';
|
|
1520
|
+
let obj_clientFeatureId_union0 = null;
|
|
1521
|
+
const obj_clientFeatureId_union0_error = (() => {
|
|
1522
|
+
if (typeof obj_clientFeatureId !== 'string') {
|
|
1523
|
+
return new TypeError('Expected "string" but received "' + typeof obj_clientFeatureId + '" (at "' + path_clientFeatureId + '")');
|
|
1524
|
+
}
|
|
1525
|
+
})();
|
|
1526
|
+
if (obj_clientFeatureId_union0_error != null) {
|
|
1527
|
+
obj_clientFeatureId_union0 = obj_clientFeatureId_union0_error.message;
|
|
1528
|
+
}
|
|
1529
|
+
let obj_clientFeatureId_union1 = null;
|
|
1530
|
+
const obj_clientFeatureId_union1_error = (() => {
|
|
1531
|
+
if (obj_clientFeatureId !== null) {
|
|
1532
|
+
return new TypeError('Expected "null" but received "' + typeof obj_clientFeatureId + '" (at "' + path_clientFeatureId + '")');
|
|
1533
|
+
}
|
|
1534
|
+
})();
|
|
1535
|
+
if (obj_clientFeatureId_union1_error != null) {
|
|
1536
|
+
obj_clientFeatureId_union1 = obj_clientFeatureId_union1_error.message;
|
|
1537
|
+
}
|
|
1538
|
+
if (obj_clientFeatureId_union0 && obj_clientFeatureId_union1) {
|
|
1539
|
+
let message = 'Object doesn\'t match union (at "' + path_clientFeatureId + '")';
|
|
1540
|
+
message += '\n' + obj_clientFeatureId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1541
|
+
message += '\n' + obj_clientFeatureId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1542
|
+
return new TypeError(message);
|
|
547
1543
|
}
|
|
548
1544
|
const obj_createdDate = obj.createdDate;
|
|
549
1545
|
const path_createdDate = path + '.createdDate';
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
1546
|
+
let obj_createdDate_union0 = null;
|
|
1547
|
+
const obj_createdDate_union0_error = (() => {
|
|
1548
|
+
if (typeof obj_createdDate !== 'string') {
|
|
1549
|
+
return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
1550
|
+
}
|
|
1551
|
+
})();
|
|
1552
|
+
if (obj_createdDate_union0_error != null) {
|
|
1553
|
+
obj_createdDate_union0 = obj_createdDate_union0_error.message;
|
|
1554
|
+
}
|
|
1555
|
+
let obj_createdDate_union1 = null;
|
|
1556
|
+
const obj_createdDate_union1_error = (() => {
|
|
1557
|
+
if (obj_createdDate !== null) {
|
|
1558
|
+
return new TypeError('Expected "null" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
|
|
1559
|
+
}
|
|
1560
|
+
})();
|
|
1561
|
+
if (obj_createdDate_union1_error != null) {
|
|
1562
|
+
obj_createdDate_union1 = obj_createdDate_union1_error.message;
|
|
1563
|
+
}
|
|
1564
|
+
if (obj_createdDate_union0 && obj_createdDate_union1) {
|
|
1565
|
+
let message = 'Object doesn\'t match union (at "' + path_createdDate + '")';
|
|
1566
|
+
message += '\n' + obj_createdDate_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1567
|
+
message += '\n' + obj_createdDate_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
569
1568
|
return new TypeError(message);
|
|
570
1569
|
}
|
|
571
|
-
const
|
|
572
|
-
const
|
|
573
|
-
|
|
574
|
-
|
|
1570
|
+
const obj_executionStatus = obj.executionStatus;
|
|
1571
|
+
const path_executionStatus = path + '.executionStatus';
|
|
1572
|
+
let obj_executionStatus_union0 = null;
|
|
1573
|
+
const obj_executionStatus_union0_error = (() => {
|
|
1574
|
+
if (typeof obj_executionStatus !== 'string') {
|
|
1575
|
+
return new TypeError('Expected "string" but received "' + typeof obj_executionStatus + '" (at "' + path_executionStatus + '")');
|
|
1576
|
+
}
|
|
1577
|
+
})();
|
|
1578
|
+
if (obj_executionStatus_union0_error != null) {
|
|
1579
|
+
obj_executionStatus_union0 = obj_executionStatus_union0_error.message;
|
|
575
1580
|
}
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
1581
|
+
let obj_executionStatus_union1 = null;
|
|
1582
|
+
const obj_executionStatus_union1_error = (() => {
|
|
1583
|
+
if (obj_executionStatus !== null) {
|
|
1584
|
+
return new TypeError('Expected "null" but received "' + typeof obj_executionStatus + '" (at "' + path_executionStatus + '")');
|
|
1585
|
+
}
|
|
1586
|
+
})();
|
|
1587
|
+
if (obj_executionStatus_union1_error != null) {
|
|
1588
|
+
obj_executionStatus_union1 = obj_executionStatus_union1_error.message;
|
|
1589
|
+
}
|
|
1590
|
+
if (obj_executionStatus_union0 && obj_executionStatus_union1) {
|
|
1591
|
+
let message = 'Object doesn\'t match union (at "' + path_executionStatus + '")';
|
|
1592
|
+
message += '\n' + obj_executionStatus_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1593
|
+
message += '\n' + obj_executionStatus_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1594
|
+
return new TypeError(message);
|
|
1595
|
+
}
|
|
1596
|
+
const obj_feedbackId = obj.feedbackId;
|
|
1597
|
+
const path_feedbackId = path + '.feedbackId';
|
|
1598
|
+
let obj_feedbackId_union0 = null;
|
|
1599
|
+
const obj_feedbackId_union0_error = (() => {
|
|
1600
|
+
if (typeof obj_feedbackId !== 'string') {
|
|
1601
|
+
return new TypeError('Expected "string" but received "' + typeof obj_feedbackId + '" (at "' + path_feedbackId + '")');
|
|
1602
|
+
}
|
|
1603
|
+
})();
|
|
1604
|
+
if (obj_feedbackId_union0_error != null) {
|
|
1605
|
+
obj_feedbackId_union0 = obj_feedbackId_union0_error.message;
|
|
1606
|
+
}
|
|
1607
|
+
let obj_feedbackId_union1 = null;
|
|
1608
|
+
const obj_feedbackId_union1_error = (() => {
|
|
1609
|
+
if (obj_feedbackId !== null) {
|
|
1610
|
+
return new TypeError('Expected "null" but received "' + typeof obj_feedbackId + '" (at "' + path_feedbackId + '")');
|
|
1611
|
+
}
|
|
1612
|
+
})();
|
|
1613
|
+
if (obj_feedbackId_union1_error != null) {
|
|
1614
|
+
obj_feedbackId_union1 = obj_feedbackId_union1_error.message;
|
|
1615
|
+
}
|
|
1616
|
+
if (obj_feedbackId_union0 && obj_feedbackId_union1) {
|
|
1617
|
+
let message = 'Object doesn\'t match union (at "' + path_feedbackId + '")';
|
|
1618
|
+
message += '\n' + obj_feedbackId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1619
|
+
message += '\n' + obj_feedbackId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1620
|
+
return new TypeError(message);
|
|
1621
|
+
}
|
|
1622
|
+
const obj_planId = obj.planId;
|
|
1623
|
+
const path_planId = path + '.planId';
|
|
1624
|
+
let obj_planId_union0 = null;
|
|
1625
|
+
const obj_planId_union0_error = (() => {
|
|
1626
|
+
if (typeof obj_planId !== 'string') {
|
|
1627
|
+
return new TypeError('Expected "string" but received "' + typeof obj_planId + '" (at "' + path_planId + '")');
|
|
1628
|
+
}
|
|
1629
|
+
})();
|
|
1630
|
+
if (obj_planId_union0_error != null) {
|
|
1631
|
+
obj_planId_union0 = obj_planId_union0_error.message;
|
|
1632
|
+
}
|
|
1633
|
+
let obj_planId_union1 = null;
|
|
1634
|
+
const obj_planId_union1_error = (() => {
|
|
1635
|
+
if (obj_planId !== null) {
|
|
1636
|
+
return new TypeError('Expected "null" but received "' + typeof obj_planId + '" (at "' + path_planId + '")');
|
|
1637
|
+
}
|
|
1638
|
+
})();
|
|
1639
|
+
if (obj_planId_union1_error != null) {
|
|
1640
|
+
obj_planId_union1 = obj_planId_union1_error.message;
|
|
1641
|
+
}
|
|
1642
|
+
if (obj_planId_union0 && obj_planId_union1) {
|
|
1643
|
+
let message = 'Object doesn\'t match union (at "' + path_planId + '")';
|
|
1644
|
+
message += '\n' + obj_planId_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1645
|
+
message += '\n' + obj_planId_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1646
|
+
return new TypeError(message);
|
|
1647
|
+
}
|
|
1648
|
+
const obj_servicePlanSteps = obj.servicePlanSteps;
|
|
1649
|
+
const path_servicePlanSteps = path + '.servicePlanSteps';
|
|
1650
|
+
if (!ArrayIsArray(obj_servicePlanSteps)) {
|
|
1651
|
+
return new TypeError('Expected "array" but received "' + typeof obj_servicePlanSteps + '" (at "' + path_servicePlanSteps + '")');
|
|
1652
|
+
}
|
|
1653
|
+
for (let i = 0; i < obj_servicePlanSteps.length; i++) {
|
|
1654
|
+
const obj_servicePlanSteps_item = obj_servicePlanSteps[i];
|
|
1655
|
+
const path_servicePlanSteps_item = path_servicePlanSteps + '[' + i + ']';
|
|
1656
|
+
const referencepath_servicePlanSteps_itemValidationError = validate$2(obj_servicePlanSteps_item, path_servicePlanSteps_item);
|
|
1657
|
+
if (referencepath_servicePlanSteps_itemValidationError !== null) {
|
|
1658
|
+
let message = 'Object doesn\'t match ServicePlanStepDetailsRepresentation (at "' + path_servicePlanSteps_item + '")\n';
|
|
1659
|
+
message += referencepath_servicePlanSteps_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
1660
|
+
return new TypeError(message);
|
|
581
1661
|
}
|
|
582
1662
|
}
|
|
583
1663
|
const obj_topic = obj.topic;
|
|
584
1664
|
const path_topic = path + '.topic';
|
|
585
|
-
|
|
586
|
-
|
|
1665
|
+
let obj_topic_union0 = null;
|
|
1666
|
+
const obj_topic_union0_error = (() => {
|
|
1667
|
+
if (typeof obj_topic !== 'string') {
|
|
1668
|
+
return new TypeError('Expected "string" but received "' + typeof obj_topic + '" (at "' + path_topic + '")');
|
|
1669
|
+
}
|
|
1670
|
+
})();
|
|
1671
|
+
if (obj_topic_union0_error != null) {
|
|
1672
|
+
obj_topic_union0 = obj_topic_union0_error.message;
|
|
587
1673
|
}
|
|
588
|
-
|
|
589
|
-
const
|
|
590
|
-
|
|
591
|
-
|
|
1674
|
+
let obj_topic_union1 = null;
|
|
1675
|
+
const obj_topic_union1_error = (() => {
|
|
1676
|
+
if (obj_topic !== null) {
|
|
1677
|
+
return new TypeError('Expected "null" but received "' + typeof obj_topic + '" (at "' + path_topic + '")');
|
|
1678
|
+
}
|
|
1679
|
+
})();
|
|
1680
|
+
if (obj_topic_union1_error != null) {
|
|
1681
|
+
obj_topic_union1 = obj_topic_union1_error.message;
|
|
1682
|
+
}
|
|
1683
|
+
if (obj_topic_union0 && obj_topic_union1) {
|
|
1684
|
+
let message = 'Object doesn\'t match union (at "' + path_topic + '")';
|
|
1685
|
+
message += '\n' + obj_topic_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1686
|
+
message += '\n' + obj_topic_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1687
|
+
return new TypeError(message);
|
|
592
1688
|
}
|
|
593
1689
|
})();
|
|
594
1690
|
return v_error === undefined ? null : v_error;
|
|
595
1691
|
}
|
|
596
|
-
const RepresentationType$1 = '
|
|
1692
|
+
const RepresentationType$1 = 'ServicePlanDetailsRepresentation';
|
|
597
1693
|
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
598
1694
|
return input;
|
|
599
1695
|
}
|
|
600
|
-
const select$2 = function
|
|
1696
|
+
const select$2 = function ServicePlanDetailsRepresentationSelect() {
|
|
601
1697
|
return {
|
|
602
1698
|
kind: 'Fragment',
|
|
603
1699
|
version: VERSION$1,
|
|
@@ -611,7 +1707,7 @@ function equals$1(existing, incoming) {
|
|
|
611
1707
|
}
|
|
612
1708
|
return true;
|
|
613
1709
|
}
|
|
614
|
-
const ingest$1 = function
|
|
1710
|
+
const ingest$1 = function ServicePlanDetailsRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
615
1711
|
if (process.env.NODE_ENV !== 'production') {
|
|
616
1712
|
const validateError = validate$1(input);
|
|
617
1713
|
if (validateError !== null) {
|
|
@@ -634,12 +1730,22 @@ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
634
1730
|
}
|
|
635
1731
|
|
|
636
1732
|
const TTL = 1000;
|
|
637
|
-
const VERSION = "
|
|
638
|
-
function validate(obj, path = '
|
|
1733
|
+
const VERSION = "2dd60cd6c267351cb563fcc04cb5cb56";
|
|
1734
|
+
function validate(obj, path = 'ServicePlanDetailsOutputRepresentation') {
|
|
639
1735
|
const v_error = (() => {
|
|
640
1736
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
641
1737
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
642
1738
|
}
|
|
1739
|
+
const obj_plan = obj.plan;
|
|
1740
|
+
const path_plan = path + '.plan';
|
|
1741
|
+
if (typeof obj_plan !== 'object') {
|
|
1742
|
+
return new TypeError('Expected "object" but received "' + typeof obj_plan + '" (at "' + path_plan + '")');
|
|
1743
|
+
}
|
|
1744
|
+
const obj_planRequestId = obj.planRequestId;
|
|
1745
|
+
const path_planRequestId = path + '.planRequestId';
|
|
1746
|
+
if (typeof obj_planRequestId !== 'string') {
|
|
1747
|
+
return new TypeError('Expected "string" but received "' + typeof obj_planRequestId + '" (at "' + path_planRequestId + '")');
|
|
1748
|
+
}
|
|
643
1749
|
const obj_reason = obj.reason;
|
|
644
1750
|
const path_reason = path + '.reason';
|
|
645
1751
|
if (typeof obj_reason !== 'string') {
|
|
@@ -647,13 +1753,29 @@ function validate(obj, path = 'ServicePlanGenerationSyncOutputRepresentation') {
|
|
|
647
1753
|
}
|
|
648
1754
|
const obj_reasonDetails = obj.reasonDetails;
|
|
649
1755
|
const path_reasonDetails = path + '.reasonDetails';
|
|
650
|
-
|
|
651
|
-
|
|
1756
|
+
let obj_reasonDetails_union0 = null;
|
|
1757
|
+
const obj_reasonDetails_union0_error = (() => {
|
|
1758
|
+
if (typeof obj_reasonDetails !== 'string') {
|
|
1759
|
+
return new TypeError('Expected "string" but received "' + typeof obj_reasonDetails + '" (at "' + path_reasonDetails + '")');
|
|
1760
|
+
}
|
|
1761
|
+
})();
|
|
1762
|
+
if (obj_reasonDetails_union0_error != null) {
|
|
1763
|
+
obj_reasonDetails_union0 = obj_reasonDetails_union0_error.message;
|
|
652
1764
|
}
|
|
653
|
-
|
|
654
|
-
const
|
|
655
|
-
|
|
656
|
-
|
|
1765
|
+
let obj_reasonDetails_union1 = null;
|
|
1766
|
+
const obj_reasonDetails_union1_error = (() => {
|
|
1767
|
+
if (obj_reasonDetails !== null) {
|
|
1768
|
+
return new TypeError('Expected "null" but received "' + typeof obj_reasonDetails + '" (at "' + path_reasonDetails + '")');
|
|
1769
|
+
}
|
|
1770
|
+
})();
|
|
1771
|
+
if (obj_reasonDetails_union1_error != null) {
|
|
1772
|
+
obj_reasonDetails_union1 = obj_reasonDetails_union1_error.message;
|
|
1773
|
+
}
|
|
1774
|
+
if (obj_reasonDetails_union0 && obj_reasonDetails_union1) {
|
|
1775
|
+
let message = 'Object doesn\'t match union (at "' + path_reasonDetails + '")';
|
|
1776
|
+
message += '\n' + obj_reasonDetails_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
1777
|
+
message += '\n' + obj_reasonDetails_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
1778
|
+
return new TypeError(message);
|
|
657
1779
|
}
|
|
658
1780
|
const obj_status = obj.status;
|
|
659
1781
|
const path_status = path + '.status';
|
|
@@ -663,22 +1785,22 @@ function validate(obj, path = 'ServicePlanGenerationSyncOutputRepresentation') {
|
|
|
663
1785
|
})();
|
|
664
1786
|
return v_error === undefined ? null : v_error;
|
|
665
1787
|
}
|
|
666
|
-
const RepresentationType = '
|
|
667
|
-
function keyBuilder(luvio, config) {
|
|
1788
|
+
const RepresentationType = 'ServicePlanDetailsOutputRepresentation';
|
|
1789
|
+
function keyBuilder$2(luvio, config) {
|
|
668
1790
|
return keyPrefix + '::' + RepresentationType + ':' + config.id;
|
|
669
1791
|
}
|
|
670
1792
|
function keyBuilderFromType(luvio, object) {
|
|
671
1793
|
const keyParams = {
|
|
672
|
-
id: object.
|
|
1794
|
+
id: object.planRequestId
|
|
673
1795
|
};
|
|
674
|
-
return keyBuilder(luvio, keyParams);
|
|
1796
|
+
return keyBuilder$2(luvio, keyParams);
|
|
675
1797
|
}
|
|
676
1798
|
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
677
|
-
const
|
|
678
|
-
const
|
|
679
|
-
input.
|
|
680
|
-
fullPath:
|
|
681
|
-
propertyName: '
|
|
1799
|
+
const input_plan = input.plan;
|
|
1800
|
+
const input_plan_id = path.fullPath + '__plan';
|
|
1801
|
+
input.plan = ingest$1(input_plan, {
|
|
1802
|
+
fullPath: input_plan_id,
|
|
1803
|
+
propertyName: 'plan',
|
|
682
1804
|
parent: {
|
|
683
1805
|
data: input,
|
|
684
1806
|
key: path.fullPath,
|
|
@@ -688,24 +1810,28 @@ function normalize(input, existing, path, luvio, store, timestamp) {
|
|
|
688
1810
|
}, luvio, store, timestamp);
|
|
689
1811
|
return input;
|
|
690
1812
|
}
|
|
691
|
-
const select$1 = function
|
|
1813
|
+
const select$1 = function ServicePlanDetailsOutputRepresentationSelect() {
|
|
692
1814
|
return {
|
|
693
1815
|
kind: 'Fragment',
|
|
694
1816
|
version: VERSION,
|
|
695
1817
|
private: [],
|
|
696
1818
|
selections: [
|
|
697
1819
|
{
|
|
698
|
-
name: '
|
|
1820
|
+
name: 'plan',
|
|
1821
|
+
kind: 'Link',
|
|
1822
|
+
fragment: select$2()
|
|
1823
|
+
},
|
|
1824
|
+
{
|
|
1825
|
+
name: 'planRequestId',
|
|
699
1826
|
kind: 'Scalar'
|
|
700
1827
|
},
|
|
701
1828
|
{
|
|
702
|
-
name: '
|
|
1829
|
+
name: 'reason',
|
|
703
1830
|
kind: 'Scalar'
|
|
704
1831
|
},
|
|
705
1832
|
{
|
|
706
|
-
name: '
|
|
707
|
-
kind: '
|
|
708
|
-
fragment: select$2()
|
|
1833
|
+
name: 'reasonDetails',
|
|
1834
|
+
kind: 'Scalar'
|
|
709
1835
|
},
|
|
710
1836
|
{
|
|
711
1837
|
name: 'status',
|
|
@@ -715,29 +1841,34 @@ const select$1 = function ServicePlanGenerationSyncOutputRepresentationSelect()
|
|
|
715
1841
|
};
|
|
716
1842
|
};
|
|
717
1843
|
function equals(existing, incoming) {
|
|
1844
|
+
const existing_planRequestId = existing.planRequestId;
|
|
1845
|
+
const incoming_planRequestId = incoming.planRequestId;
|
|
1846
|
+
if (!(existing_planRequestId === incoming_planRequestId)) {
|
|
1847
|
+
return false;
|
|
1848
|
+
}
|
|
718
1849
|
const existing_reason = existing.reason;
|
|
719
1850
|
const incoming_reason = incoming.reason;
|
|
720
1851
|
if (!(existing_reason === incoming_reason)) {
|
|
721
1852
|
return false;
|
|
722
1853
|
}
|
|
723
|
-
const existing_reasonDetails = existing.reasonDetails;
|
|
724
|
-
const incoming_reasonDetails = incoming.reasonDetails;
|
|
725
|
-
if (!(existing_reasonDetails === incoming_reasonDetails)) {
|
|
726
|
-
return false;
|
|
727
|
-
}
|
|
728
1854
|
const existing_status = existing.status;
|
|
729
1855
|
const incoming_status = incoming.status;
|
|
730
1856
|
if (!(existing_status === incoming_status)) {
|
|
731
1857
|
return false;
|
|
732
1858
|
}
|
|
733
|
-
const
|
|
734
|
-
const
|
|
735
|
-
if (!(
|
|
1859
|
+
const existing_plan = existing.plan;
|
|
1860
|
+
const incoming_plan = incoming.plan;
|
|
1861
|
+
if (!(existing_plan.__ref === incoming_plan.__ref)) {
|
|
1862
|
+
return false;
|
|
1863
|
+
}
|
|
1864
|
+
const existing_reasonDetails = existing.reasonDetails;
|
|
1865
|
+
const incoming_reasonDetails = incoming.reasonDetails;
|
|
1866
|
+
if (!(existing_reasonDetails === incoming_reasonDetails)) {
|
|
736
1867
|
return false;
|
|
737
1868
|
}
|
|
738
1869
|
return true;
|
|
739
1870
|
}
|
|
740
|
-
const ingest = function
|
|
1871
|
+
const ingest = function ServicePlanDetailsOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
741
1872
|
if (process.env.NODE_ENV !== 'production') {
|
|
742
1873
|
const validateError = validate(input);
|
|
743
1874
|
if (validateError !== null) {
|
|
@@ -757,24 +1888,43 @@ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
|
757
1888
|
representationName: RepresentationType,
|
|
758
1889
|
mergeable: false
|
|
759
1890
|
});
|
|
760
|
-
getTypeCacheKeys$1(rootKeySet, luvio, input.
|
|
1891
|
+
getTypeCacheKeys$1(rootKeySet, luvio, input.plan, () => rootKey + "__" + "plan");
|
|
761
1892
|
}
|
|
1893
|
+
const notifyUpdateAvailableFactory = (luvio) => {
|
|
1894
|
+
return function notifyServicePlanDetailsUpdateAvailable(configs) {
|
|
1895
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1896
|
+
const requiredKeyParams = ['id'];
|
|
1897
|
+
configs.forEach(config => {
|
|
1898
|
+
if (false === requiredKeyParams.every(req => req in config)) {
|
|
1899
|
+
throw new Error(`one of the configs did not contain all required parameters: ${JSONStringify(ObjectKeys(config))}`);
|
|
1900
|
+
}
|
|
1901
|
+
});
|
|
1902
|
+
}
|
|
1903
|
+
const keys = configs.map(c => keyBuilder$2(luvio, c));
|
|
1904
|
+
return luvio.notifyStoreUpdateAvailable(keys);
|
|
1905
|
+
};
|
|
1906
|
+
};
|
|
762
1907
|
|
|
763
1908
|
function select(luvio, params) {
|
|
764
1909
|
return select$1();
|
|
765
1910
|
}
|
|
1911
|
+
function keyBuilder$1(luvio, params) {
|
|
1912
|
+
return keyBuilder$2(luvio, {
|
|
1913
|
+
id: params.urlParams.recordId
|
|
1914
|
+
});
|
|
1915
|
+
}
|
|
766
1916
|
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
767
1917
|
getTypeCacheKeys(storeKeyMap, luvio, response);
|
|
768
1918
|
}
|
|
769
|
-
function ingestSuccess(luvio, resourceParams, response) {
|
|
1919
|
+
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
770
1920
|
const { body } = response;
|
|
771
|
-
const key =
|
|
1921
|
+
const key = keyBuilder$1(luvio, resourceParams);
|
|
772
1922
|
luvio.storeIngest(key, ingest, body);
|
|
773
1923
|
const snapshot = luvio.storeLookup({
|
|
774
1924
|
recordId: key,
|
|
775
1925
|
node: select(),
|
|
776
1926
|
variables: {},
|
|
777
|
-
});
|
|
1927
|
+
}, snapshotRefresh);
|
|
778
1928
|
if (process.env.NODE_ENV !== 'production') {
|
|
779
1929
|
if (snapshot.state !== 'Fulfilled') {
|
|
780
1930
|
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
@@ -783,49 +1933,52 @@ function ingestSuccess(luvio, resourceParams, response) {
|
|
|
783
1933
|
deepFreeze(snapshot.data);
|
|
784
1934
|
return snapshot;
|
|
785
1935
|
}
|
|
1936
|
+
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
1937
|
+
const key = keyBuilder$1(luvio, params);
|
|
1938
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
1939
|
+
const storeMetadataParams = {
|
|
1940
|
+
ttl: TTL,
|
|
1941
|
+
namespace: keyPrefix,
|
|
1942
|
+
version: VERSION,
|
|
1943
|
+
representationName: RepresentationType
|
|
1944
|
+
};
|
|
1945
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
1946
|
+
return errorSnapshot;
|
|
1947
|
+
}
|
|
786
1948
|
function createResourceRequest(config) {
|
|
787
1949
|
const headers = {};
|
|
788
1950
|
return {
|
|
789
1951
|
baseUri: '/services/data/v62.0',
|
|
790
|
-
basePath: '/connect/service-plan/
|
|
791
|
-
method: '
|
|
792
|
-
body:
|
|
1952
|
+
basePath: '/connect/service-plan/servicePlanDetails/' + config.urlParams.recordId + '',
|
|
1953
|
+
method: 'get',
|
|
1954
|
+
body: null,
|
|
793
1955
|
urlParams: config.urlParams,
|
|
794
1956
|
queryParams: {},
|
|
795
1957
|
headers,
|
|
796
1958
|
priority: 'normal',
|
|
797
1959
|
};
|
|
798
1960
|
}
|
|
1961
|
+
function createResourceRequestFromRepresentation(representation) {
|
|
1962
|
+
const config = {
|
|
1963
|
+
urlParams: {},
|
|
1964
|
+
};
|
|
1965
|
+
config.urlParams.recordId = representation.planRequestId;
|
|
1966
|
+
return createResourceRequest(config);
|
|
1967
|
+
}
|
|
799
1968
|
|
|
800
|
-
const adapterName = '
|
|
801
|
-
const
|
|
1969
|
+
const adapterName = 'getServicePlan';
|
|
1970
|
+
const getServicePlan_ConfigPropertyMetadata = [
|
|
802
1971
|
generateParamConfigMetadata('recordId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
803
|
-
generateParamConfigMetadata('additionalContext', true, 2 /* Body */, 4 /* Unsupported */),
|
|
804
|
-
generateParamConfigMetadata('mode', true, 2 /* Body */, 0 /* String */),
|
|
805
|
-
generateParamConfigMetadata('source', true, 2 /* Body */, 0 /* String */),
|
|
806
1972
|
];
|
|
807
|
-
const
|
|
808
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
1973
|
+
const getServicePlan_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getServicePlan_ConfigPropertyMetadata);
|
|
1974
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$4(getServicePlan_ConfigPropertyMetadata);
|
|
1975
|
+
function keyBuilder(luvio, config) {
|
|
1976
|
+
const resourceParams = createResourceParams(config);
|
|
1977
|
+
return keyBuilder$1(luvio, resourceParams);
|
|
1978
|
+
}
|
|
809
1979
|
function typeCheckConfig(untrustedConfig) {
|
|
810
1980
|
const config = {};
|
|
811
|
-
typeCheckConfig$
|
|
812
|
-
const untrustedConfig_additionalContext = untrustedConfig.additionalContext;
|
|
813
|
-
if (untrustedIsObject(untrustedConfig_additionalContext)) {
|
|
814
|
-
const untrustedConfig_additionalContext_object = {};
|
|
815
|
-
const untrustedConfig_additionalContext_keys = Object.keys(untrustedConfig_additionalContext);
|
|
816
|
-
for (let i = 0, arrayLength = untrustedConfig_additionalContext_keys.length; i < arrayLength; i++) {
|
|
817
|
-
const key = untrustedConfig_additionalContext_keys[i];
|
|
818
|
-
const untrustedConfig_additionalContext_prop = untrustedConfig_additionalContext[key];
|
|
819
|
-
if (typeof untrustedConfig_additionalContext_prop === 'string') {
|
|
820
|
-
if (untrustedConfig_additionalContext_object !== undefined) {
|
|
821
|
-
untrustedConfig_additionalContext_object[key] = untrustedConfig_additionalContext_prop;
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
}
|
|
825
|
-
if (untrustedConfig_additionalContext_object !== undefined && Object.keys(untrustedConfig_additionalContext_object).length >= 0) {
|
|
826
|
-
config.additionalContext = untrustedConfig_additionalContext_object;
|
|
827
|
-
}
|
|
828
|
-
}
|
|
1981
|
+
typeCheckConfig$4(untrustedConfig, config, getServicePlan_ConfigPropertyMetadata);
|
|
829
1982
|
return config;
|
|
830
1983
|
}
|
|
831
1984
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -841,54 +1994,150 @@ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
|
841
1994
|
}
|
|
842
1995
|
return config;
|
|
843
1996
|
}
|
|
1997
|
+
function adapterFragment(luvio, config) {
|
|
1998
|
+
createResourceParams(config);
|
|
1999
|
+
return select();
|
|
2000
|
+
}
|
|
2001
|
+
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
2002
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
2003
|
+
config,
|
|
2004
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
2005
|
+
});
|
|
2006
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2007
|
+
}
|
|
2008
|
+
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
2009
|
+
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
2010
|
+
config,
|
|
2011
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
2012
|
+
});
|
|
2013
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
2014
|
+
}
|
|
844
2015
|
function buildNetworkSnapshot(luvio, config, options) {
|
|
845
2016
|
const resourceParams = createResourceParams(config);
|
|
846
2017
|
const request = createResourceRequest(resourceParams);
|
|
847
2018
|
return luvio.dispatchResourceRequest(request, options)
|
|
848
2019
|
.then((response) => {
|
|
849
|
-
return luvio.handleSuccessResponse(() => {
|
|
850
|
-
const snapshot = ingestSuccess(luvio, resourceParams, response);
|
|
851
|
-
return luvio.storeBroadcast().then(() => snapshot);
|
|
852
|
-
}, () => {
|
|
2020
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
853
2021
|
const cache = new StoreKeyMap();
|
|
854
2022
|
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
855
2023
|
return cache;
|
|
856
2024
|
});
|
|
857
2025
|
}, (response) => {
|
|
858
|
-
|
|
859
|
-
throw response;
|
|
2026
|
+
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
860
2027
|
});
|
|
861
2028
|
}
|
|
862
|
-
|
|
863
|
-
return
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
2029
|
+
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
2030
|
+
return buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
2031
|
+
}
|
|
2032
|
+
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
2033
|
+
const { luvio, config } = context;
|
|
2034
|
+
const selector = {
|
|
2035
|
+
recordId: keyBuilder(luvio, config),
|
|
2036
|
+
node: adapterFragment(luvio, config),
|
|
2037
|
+
variables: {},
|
|
2038
|
+
};
|
|
2039
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
2040
|
+
config,
|
|
2041
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
2042
|
+
});
|
|
2043
|
+
return cacheSnapshot;
|
|
2044
|
+
}
|
|
2045
|
+
const getServicePlanAdapterFactory = (luvio) => function ServicePlan__getServicePlan(untrustedConfig, requestContext) {
|
|
2046
|
+
const config = validateAdapterConfig(untrustedConfig, getServicePlan_ConfigPropertyNames);
|
|
2047
|
+
// Invalid or incomplete config
|
|
2048
|
+
if (config === null) {
|
|
2049
|
+
return null;
|
|
2050
|
+
}
|
|
2051
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
2052
|
+
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
2053
|
+
};
|
|
2054
|
+
const notifyChangeFactory = (luvio, options) => {
|
|
2055
|
+
return function getConnectServicePlanServicePlanDetailsByRecordIdNotifyChange(configs) {
|
|
2056
|
+
const keys = configs.map(c => keyBuilder$2(luvio, c));
|
|
2057
|
+
luvio.getNotifyChangeStoreEntries(keys).then(entries => {
|
|
2058
|
+
for (let i = 0, len = entries.length; i < len; i++) {
|
|
2059
|
+
const { key, record: val } = entries[i];
|
|
2060
|
+
const refreshRequest = createResourceRequestFromRepresentation(val);
|
|
2061
|
+
luvio.dispatchResourceRequest(refreshRequest, options)
|
|
2062
|
+
.then((response) => {
|
|
2063
|
+
return luvio.handleSuccessResponse(() => {
|
|
2064
|
+
const { body } = response;
|
|
2065
|
+
luvio.storeIngest(key, ingest, body);
|
|
2066
|
+
return luvio.storeBroadcast();
|
|
2067
|
+
}, () => {
|
|
2068
|
+
const cache = new StoreKeyMap();
|
|
2069
|
+
getTypeCacheKeys(cache, luvio, response.body);
|
|
2070
|
+
return cache;
|
|
2071
|
+
});
|
|
2072
|
+
}, (error) => {
|
|
2073
|
+
return luvio.handleErrorResponse(() => {
|
|
2074
|
+
const errorSnapshot = luvio.errorSnapshot(error);
|
|
2075
|
+
luvio.storeIngestError(key, errorSnapshot, {
|
|
2076
|
+
ttl: TTL,
|
|
2077
|
+
namespace: keyPrefix,
|
|
2078
|
+
version: VERSION,
|
|
2079
|
+
representationName: RepresentationType
|
|
2080
|
+
});
|
|
2081
|
+
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
2082
|
+
});
|
|
2083
|
+
});
|
|
2084
|
+
}
|
|
2085
|
+
});
|
|
870
2086
|
};
|
|
871
2087
|
};
|
|
872
2088
|
|
|
873
2089
|
let executeServicePlan;
|
|
874
|
-
let
|
|
2090
|
+
let generateServicePlan;
|
|
2091
|
+
let getGenerationRequest;
|
|
2092
|
+
let getServicePlan;
|
|
2093
|
+
let getServicePlanNotifyChange;
|
|
2094
|
+
// Imperative GET Adapters
|
|
2095
|
+
let getGenerationRequest_imperative;
|
|
2096
|
+
let getServicePlan_imperative;
|
|
2097
|
+
const getGenerationRequestMetadata = {
|
|
2098
|
+
apiFamily: 'ServicePlan',
|
|
2099
|
+
name: 'getGenerationRequest',
|
|
2100
|
+
ttl: 1000,
|
|
2101
|
+
};
|
|
2102
|
+
const getServicePlanMetadata = { apiFamily: 'ServicePlan', name: 'getServicePlan', ttl: 1000 };
|
|
875
2103
|
// Notify Update Available
|
|
2104
|
+
let notifyServicePlanDetailsUpdateAvailable;
|
|
2105
|
+
let notifyServicePlanGenerationUpdateAvailable;
|
|
876
2106
|
function bindExportsTo(luvio) {
|
|
877
2107
|
// LDS Adapters
|
|
2108
|
+
const getGenerationRequest_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getGenerationRequest', getGenerationRequestAdapterFactory), getGenerationRequestMetadata);
|
|
2109
|
+
const getServicePlan_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getServicePlan', getServicePlanAdapterFactory), getServicePlanMetadata);
|
|
878
2110
|
function unwrapSnapshotData(factory) {
|
|
879
2111
|
const adapter = factory(luvio);
|
|
880
2112
|
return (config) => adapter(config).then((snapshot) => snapshot.data);
|
|
881
2113
|
}
|
|
882
2114
|
return {
|
|
883
2115
|
executeServicePlan: unwrapSnapshotData(executeServicePlanAdapterFactory),
|
|
884
|
-
|
|
2116
|
+
generateServicePlan: unwrapSnapshotData(generateServicePlanAdapterFactory),
|
|
2117
|
+
getGenerationRequest: createWireAdapterConstructor(luvio, getGenerationRequest_ldsAdapter, getGenerationRequestMetadata),
|
|
2118
|
+
getServicePlan: createWireAdapterConstructor(luvio, getServicePlan_ldsAdapter, getServicePlanMetadata),
|
|
2119
|
+
getServicePlanNotifyChange: createLDSAdapter(luvio, 'getServicePlanNotifyChange', notifyChangeFactory),
|
|
885
2120
|
// Imperative GET Adapters
|
|
2121
|
+
getGenerationRequest_imperative: createImperativeAdapter(luvio, getGenerationRequest_ldsAdapter, getGenerationRequestMetadata),
|
|
2122
|
+
getServicePlan_imperative: createImperativeAdapter(luvio, getServicePlan_ldsAdapter, getServicePlanMetadata),
|
|
886
2123
|
// Notify Update Availables
|
|
2124
|
+
notifyServicePlanDetailsUpdateAvailable: createLDSAdapter(luvio, 'notifyServicePlanDetailsUpdateAvailable', notifyUpdateAvailableFactory),
|
|
2125
|
+
notifyServicePlanGenerationUpdateAvailable: createLDSAdapter(luvio, 'notifyServicePlanGenerationUpdateAvailable', notifyUpdateAvailableFactory$1),
|
|
887
2126
|
};
|
|
888
2127
|
}
|
|
889
2128
|
withDefaultLuvio((luvio) => {
|
|
890
|
-
({
|
|
2129
|
+
({
|
|
2130
|
+
executeServicePlan,
|
|
2131
|
+
generateServicePlan,
|
|
2132
|
+
getGenerationRequest,
|
|
2133
|
+
getServicePlan,
|
|
2134
|
+
getServicePlanNotifyChange,
|
|
2135
|
+
getGenerationRequest_imperative,
|
|
2136
|
+
getServicePlan_imperative,
|
|
2137
|
+
notifyServicePlanDetailsUpdateAvailable,
|
|
2138
|
+
notifyServicePlanGenerationUpdateAvailable,
|
|
2139
|
+
} = bindExportsTo(luvio));
|
|
891
2140
|
});
|
|
892
2141
|
|
|
893
|
-
export { executeServicePlan,
|
|
894
|
-
// version: 1.
|
|
2142
|
+
export { executeServicePlan, generateServicePlan, getGenerationRequest, getGenerationRequest_imperative, getServicePlan, getServicePlanNotifyChange, getServicePlan_imperative, notifyServicePlanDetailsUpdateAvailable, notifyServicePlanGenerationUpdateAvailable };
|
|
2143
|
+
// version: 1.309.0-dev10-96422fc06f
|