@salesforce/lds-adapters-industries-constraints 1.308.0-dev2 → 1.308.0-dev3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. package/dist/es/es2018/industries-constraints.js +356 -128
  2. package/dist/es/es2018/types/src/generated/adapters/createConstraintVersion.d.ts +18 -0
  3. package/dist/es/es2018/types/src/generated/adapters/getConstraintVersion.d.ts +28 -0
  4. package/dist/es/es2018/types/src/generated/adapters/updateConstraintVersion.d.ts +19 -0
  5. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +3 -2
  6. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +5 -4
  7. package/dist/es/es2018/types/src/generated/resources/{getIndustriesConstraintActionsViewByExpressionSetDefinitionVersionId.d.ts → getIndustriesConstraintsVersionsByExpressionSetId.d.ts} +5 -5
  8. package/dist/es/es2018/types/src/generated/resources/getIndustriesConstraintsVersionsByExpressionSetIdAndExpressionSetVersionId.d.ts +16 -0
  9. package/dist/es/es2018/types/src/generated/resources/{patchIndustriesConstraintActionsUpdateByExpressionSetDefinitionVersionId.d.ts → patchIndustriesConstraintsVersionsByExpressionSetId.d.ts} +4 -4
  10. package/dist/es/es2018/types/src/generated/resources/patchIndustriesConstraintsVersionsByExpressionSetIdAndExpressionSetVersionId.d.ts +18 -0
  11. package/dist/es/es2018/types/src/generated/resources/postIndustriesConstraintsVersionsByExpressionSetId.d.ts +17 -0
  12. package/dist/es/es2018/types/src/generated/resources/postIndustriesConstraintsVersionsByExpressionSetIdAndExpressionSetVersionId.d.ts +18 -0
  13. package/dist/es/es2018/types/src/generated/types/{ViewConstraintOutputRepresentation.d.ts → ConstraintVersionOutputRepresentation.d.ts} +8 -8
  14. package/dist/es/es2018/types/src/generated/types/CreateConstraintVersionInputRepresentation.d.ts +34 -0
  15. package/dist/es/es2018/types/src/generated/types/CreateConstraintVersionOutputRepresentation.d.ts +54 -0
  16. package/dist/es/es2018/types/src/generated/types/{ConstraintInputRepresentation.d.ts → UpdateConstraintVersionInputRepresentation.d.ts} +8 -8
  17. package/dist/es/es2018/types/src/generated/types/{ConstraintOutputRepresentation.d.ts → UpdateConstraintVersionOutputRepresentation.d.ts} +14 -14
  18. package/package.json +3 -3
  19. package/sfdc/index.js +359 -126
  20. package/src/raml/api.raml +123 -42
  21. package/src/raml/luvio.raml +24 -17
  22. package/dist/es/es2018/types/src/generated/adapters/getViewConstraint.d.ts +0 -27
  23. package/dist/es/es2018/types/src/generated/adapters/patchUpdateConstraint.d.ts +0 -18
package/sfdc/index.js CHANGED
@@ -14,7 +14,7 @@
14
14
  /* proxy-compat-disable */
15
15
  import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
16
16
  import { withDefaultLuvio } from 'force/ldsEngine';
17
- import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1, typeCheckConfig as typeCheckConfig$2, StoreKeyMap, createResourceParams as createResourceParams$2 } from 'force/luvioEngine';
17
+ import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$3, typeCheckConfig as typeCheckConfig$3, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1 } from 'force/luvioEngine';
18
18
 
19
19
  const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
20
20
  const { keys: ObjectKeys, create: ObjectCreate } = Object;
@@ -102,9 +102,295 @@ function createLink(ref) {
102
102
  };
103
103
  }
104
104
 
105
+ const TTL$3 = 1000;
106
+ const VERSION$3 = "ced261010494087086be7d8b043d2fda";
107
+ function validate$3(obj, path = 'ConstraintErrorResponseRepresentation') {
108
+ const v_error = (() => {
109
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
110
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
111
+ }
112
+ const obj_errorCode = obj.errorCode;
113
+ const path_errorCode = path + '.errorCode';
114
+ if (typeof obj_errorCode !== 'string') {
115
+ return new TypeError('Expected "string" but received "' + typeof obj_errorCode + '" (at "' + path_errorCode + '")');
116
+ }
117
+ const obj_message = obj.message;
118
+ const path_message = path + '.message';
119
+ if (typeof obj_message !== 'string') {
120
+ return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
121
+ }
122
+ })();
123
+ return v_error === undefined ? null : v_error;
124
+ }
125
+ const RepresentationType$3 = 'ConstraintErrorResponseRepresentation';
126
+ function normalize$3(input, existing, path, luvio, store, timestamp) {
127
+ return input;
128
+ }
129
+ const select$6 = function ConstraintErrorResponseRepresentationSelect() {
130
+ return {
131
+ kind: 'Fragment',
132
+ version: VERSION$3,
133
+ private: [],
134
+ opaque: true
135
+ };
136
+ };
137
+ function equals$3(existing, incoming) {
138
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
139
+ return false;
140
+ }
141
+ return true;
142
+ }
143
+ const ingest$3 = function ConstraintErrorResponseRepresentationIngest(input, path, luvio, store, timestamp) {
144
+ if (process.env.NODE_ENV !== 'production') {
145
+ const validateError = validate$3(input);
146
+ if (validateError !== null) {
147
+ throw validateError;
148
+ }
149
+ }
150
+ const key = path.fullPath;
151
+ const ttlToUse = TTL$3;
152
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "constraints", VERSION$3, RepresentationType$3, equals$3);
153
+ return createLink(key);
154
+ };
155
+ function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
156
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
157
+ const rootKey = fullPathFactory();
158
+ rootKeySet.set(rootKey, {
159
+ namespace: keyPrefix,
160
+ representationName: RepresentationType$3,
161
+ mergeable: false
162
+ });
163
+ }
164
+
105
165
  const TTL$2 = 1000;
106
- const VERSION$2 = "76516fe771fad46e2555a4f24b577b13";
107
- function validate$2(obj, path = 'ViewConstraintOutputRepresentation') {
166
+ const VERSION$2 = "faf4a72fe3721080fa45e289d0a79216";
167
+ function validate$2(obj, path = 'CreateConstraintVersionOutputRepresentation') {
168
+ const v_error = (() => {
169
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
170
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
171
+ }
172
+ const obj_errors = obj.errors;
173
+ const path_errors = path + '.errors';
174
+ if (!ArrayIsArray(obj_errors)) {
175
+ return new TypeError('Expected "array" but received "' + typeof obj_errors + '" (at "' + path_errors + '")');
176
+ }
177
+ for (let i = 0; i < obj_errors.length; i++) {
178
+ const obj_errors_item = obj_errors[i];
179
+ const path_errors_item = path_errors + '[' + i + ']';
180
+ if (typeof obj_errors_item !== 'object') {
181
+ return new TypeError('Expected "object" but received "' + typeof obj_errors_item + '" (at "' + path_errors_item + '")');
182
+ }
183
+ }
184
+ const obj_success = obj.success;
185
+ const path_success = path + '.success';
186
+ if (typeof obj_success !== 'boolean') {
187
+ return new TypeError('Expected "boolean" but received "' + typeof obj_success + '" (at "' + path_success + '")');
188
+ }
189
+ const obj_versionId = obj.versionId;
190
+ const path_versionId = path + '.versionId';
191
+ if (typeof obj_versionId !== 'string') {
192
+ return new TypeError('Expected "string" but received "' + typeof obj_versionId + '" (at "' + path_versionId + '")');
193
+ }
194
+ })();
195
+ return v_error === undefined ? null : v_error;
196
+ }
197
+ const RepresentationType$2 = 'CreateConstraintVersionOutputRepresentation';
198
+ function keyBuilder$3(luvio, config) {
199
+ return keyPrefix + '::' + RepresentationType$2 + ':' + config.success;
200
+ }
201
+ function keyBuilderFromType$1(luvio, object) {
202
+ const keyParams = {
203
+ success: object.success
204
+ };
205
+ return keyBuilder$3(luvio, keyParams);
206
+ }
207
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
208
+ const input_errors = input.errors;
209
+ const input_errors_id = path.fullPath + '__errors';
210
+ for (let i = 0; i < input_errors.length; i++) {
211
+ const input_errors_item = input_errors[i];
212
+ let input_errors_item_id = input_errors_id + '__' + i;
213
+ input_errors[i] = ingest$3(input_errors_item, {
214
+ fullPath: input_errors_item_id,
215
+ propertyName: i,
216
+ parent: {
217
+ data: input,
218
+ key: path.fullPath,
219
+ existing: existing,
220
+ },
221
+ ttl: path.ttl
222
+ }, luvio, store, timestamp);
223
+ }
224
+ return input;
225
+ }
226
+ const select$5 = function CreateConstraintVersionOutputRepresentationSelect() {
227
+ return {
228
+ kind: 'Fragment',
229
+ version: VERSION$2,
230
+ private: [],
231
+ selections: [
232
+ {
233
+ name: 'errors',
234
+ kind: 'Link',
235
+ plural: true,
236
+ fragment: select$6()
237
+ },
238
+ {
239
+ name: 'success',
240
+ kind: 'Scalar'
241
+ },
242
+ {
243
+ name: 'versionId',
244
+ kind: 'Scalar'
245
+ }
246
+ ]
247
+ };
248
+ };
249
+ function equals$2(existing, incoming) {
250
+ const existing_success = existing.success;
251
+ const incoming_success = incoming.success;
252
+ if (!(existing_success === incoming_success)) {
253
+ return false;
254
+ }
255
+ const existing_versionId = existing.versionId;
256
+ const incoming_versionId = incoming.versionId;
257
+ if (!(existing_versionId === incoming_versionId)) {
258
+ return false;
259
+ }
260
+ const existing_errors = existing.errors;
261
+ const incoming_errors = incoming.errors;
262
+ const equals_errors_items = equalsArray(existing_errors, incoming_errors, (existing_errors_item, incoming_errors_item) => {
263
+ if (!(existing_errors_item.__ref === incoming_errors_item.__ref)) {
264
+ return false;
265
+ }
266
+ });
267
+ if (equals_errors_items === false) {
268
+ return false;
269
+ }
270
+ return true;
271
+ }
272
+ const ingest$2 = function CreateConstraintVersionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
273
+ if (process.env.NODE_ENV !== 'production') {
274
+ const validateError = validate$2(input);
275
+ if (validateError !== null) {
276
+ throw validateError;
277
+ }
278
+ }
279
+ const key = keyBuilderFromType$1(luvio, input);
280
+ const ttlToUse = TTL$2;
281
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "constraints", VERSION$2, RepresentationType$2, equals$2);
282
+ return createLink(key);
283
+ };
284
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
285
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
286
+ const rootKey = keyBuilderFromType$1(luvio, input);
287
+ rootKeySet.set(rootKey, {
288
+ namespace: keyPrefix,
289
+ representationName: RepresentationType$2,
290
+ mergeable: false
291
+ });
292
+ const input_errors_length = input.errors.length;
293
+ for (let i = 0; i < input_errors_length; i++) {
294
+ getTypeCacheKeys$3(rootKeySet, luvio, input.errors[i], () => '');
295
+ }
296
+ }
297
+
298
+ function select$4(luvio, params) {
299
+ return select$5();
300
+ }
301
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
302
+ getTypeCacheKeys$2(storeKeyMap, luvio, response);
303
+ }
304
+ function ingestSuccess$2(luvio, resourceParams, response) {
305
+ const { body } = response;
306
+ const key = keyBuilderFromType$1(luvio, body);
307
+ luvio.storeIngest(key, ingest$2, body);
308
+ const snapshot = luvio.storeLookup({
309
+ recordId: key,
310
+ node: select$4(),
311
+ variables: {},
312
+ });
313
+ if (process.env.NODE_ENV !== 'production') {
314
+ if (snapshot.state !== 'Fulfilled') {
315
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
316
+ }
317
+ }
318
+ deepFreeze(snapshot.data);
319
+ return snapshot;
320
+ }
321
+ function createResourceRequest$2(config) {
322
+ const headers = {};
323
+ return {
324
+ baseUri: '/services/data/v62.0',
325
+ basePath: '/industries/constraints/' + config.urlParams.expressionSetId + '/versions',
326
+ method: 'post',
327
+ body: config.body,
328
+ urlParams: config.urlParams,
329
+ queryParams: {},
330
+ headers,
331
+ priority: 'normal',
332
+ };
333
+ }
334
+
335
+ const adapterName$2 = 'createConstraintVersion';
336
+ const createConstraintVersion_ConfigPropertyMetadata = [
337
+ generateParamConfigMetadata('expressionSetId', true, 0 /* UrlParameter */, 0 /* String */),
338
+ generateParamConfigMetadata('constraintModel', true, 2 /* Body */, 0 /* String */),
339
+ generateParamConfigMetadata('description', true, 2 /* Body */, 0 /* String */),
340
+ generateParamConfigMetadata('status', true, 2 /* Body */, 0 /* String */),
341
+ ];
342
+ const createConstraintVersion_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, createConstraintVersion_ConfigPropertyMetadata);
343
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(createConstraintVersion_ConfigPropertyMetadata);
344
+ function typeCheckConfig$2(untrustedConfig) {
345
+ const config = {};
346
+ typeCheckConfig$3(untrustedConfig, config, createConstraintVersion_ConfigPropertyMetadata);
347
+ return config;
348
+ }
349
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
350
+ if (!untrustedIsObject(untrustedConfig)) {
351
+ return null;
352
+ }
353
+ if (process.env.NODE_ENV !== 'production') {
354
+ validateConfig(untrustedConfig, configPropertyNames);
355
+ }
356
+ const config = typeCheckConfig$2(untrustedConfig);
357
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
358
+ return null;
359
+ }
360
+ return config;
361
+ }
362
+ function buildNetworkSnapshot$2(luvio, config, options) {
363
+ const resourceParams = createResourceParams$2(config);
364
+ const request = createResourceRequest$2(resourceParams);
365
+ return luvio.dispatchResourceRequest(request, options)
366
+ .then((response) => {
367
+ return luvio.handleSuccessResponse(() => {
368
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response);
369
+ return luvio.storeBroadcast().then(() => snapshot);
370
+ }, () => {
371
+ const cache = new StoreKeyMap();
372
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
373
+ return cache;
374
+ });
375
+ }, (response) => {
376
+ deepFreeze(response);
377
+ throw response;
378
+ });
379
+ }
380
+ const createConstraintVersionAdapterFactory = (luvio) => {
381
+ return function createConstraintVersion(untrustedConfig) {
382
+ const config = validateAdapterConfig$2(untrustedConfig, createConstraintVersion_ConfigPropertyNames);
383
+ // Invalid or incomplete config
384
+ if (config === null) {
385
+ throw new Error('Invalid config for "createConstraintVersion"');
386
+ }
387
+ return buildNetworkSnapshot$2(luvio, config);
388
+ };
389
+ };
390
+
391
+ const TTL$1 = 1000;
392
+ const VERSION$1 = "77293f36036fd711f0617fb4a5f21057";
393
+ function validate$1(obj, path = 'ConstraintVersionOutputRepresentation') {
108
394
  const v_error = (() => {
109
395
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
110
396
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -127,62 +413,62 @@ function validate$2(obj, path = 'ViewConstraintOutputRepresentation') {
127
413
  })();
128
414
  return v_error === undefined ? null : v_error;
129
415
  }
130
- const RepresentationType$2 = 'ViewConstraintOutputRepresentation';
131
- function normalize$2(input, existing, path, luvio, store, timestamp) {
416
+ const RepresentationType$1 = 'ConstraintVersionOutputRepresentation';
417
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
132
418
  return input;
133
419
  }
134
- const select$4 = function ViewConstraintOutputRepresentationSelect() {
420
+ const select$3 = function ConstraintVersionOutputRepresentationSelect() {
135
421
  return {
136
422
  kind: 'Fragment',
137
- version: VERSION$2,
423
+ version: VERSION$1,
138
424
  private: [],
139
425
  opaque: true
140
426
  };
141
427
  };
142
- function equals$2(existing, incoming) {
428
+ function equals$1(existing, incoming) {
143
429
  if (JSONStringify(incoming) !== JSONStringify(existing)) {
144
430
  return false;
145
431
  }
146
432
  return true;
147
433
  }
148
- const ingest$2 = function ViewConstraintOutputRepresentationIngest(input, path, luvio, store, timestamp) {
434
+ const ingest$1 = function ConstraintVersionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
149
435
  if (process.env.NODE_ENV !== 'production') {
150
- const validateError = validate$2(input);
436
+ const validateError = validate$1(input);
151
437
  if (validateError !== null) {
152
438
  throw validateError;
153
439
  }
154
440
  }
155
441
  const key = path.fullPath;
156
- const ttlToUse = TTL$2;
157
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "constraints", VERSION$2, RepresentationType$2, equals$2);
442
+ const ttlToUse = TTL$1;
443
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "constraints", VERSION$1, RepresentationType$1, equals$1);
158
444
  return createLink(key);
159
445
  };
160
- function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
446
+ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
161
447
  // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
162
448
  const rootKey = fullPathFactory();
163
449
  rootKeySet.set(rootKey, {
164
450
  namespace: keyPrefix,
165
- representationName: RepresentationType$2,
451
+ representationName: RepresentationType$1,
166
452
  mergeable: false
167
453
  });
168
454
  }
169
455
 
170
- function select$3(luvio, params) {
171
- return select$4();
456
+ function select$2(luvio, params) {
457
+ return select$3();
172
458
  }
173
459
  function keyBuilder$2(luvio, params) {
174
- return keyPrefix + '::ViewConstraintOutputRepresentation:(' + 'expressionSetDefinitionVersionId:' + params.urlParams.expressionSetDefinitionVersionId + ')';
460
+ return keyPrefix + '::ConstraintVersionOutputRepresentation:(' + 'expressionSetId:' + params.urlParams.expressionSetId + ',' + 'expressionSetVersionId:' + params.urlParams.expressionSetVersionId + ')';
175
461
  }
176
462
  function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
177
- getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$2(luvio, resourceParams));
463
+ getTypeCacheKeys$1(storeKeyMap, luvio, response, () => keyBuilder$2(luvio, resourceParams));
178
464
  }
179
465
  function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
180
466
  const { body } = response;
181
467
  const key = keyBuilder$2(luvio, resourceParams);
182
- luvio.storeIngest(key, ingest$2, body);
468
+ luvio.storeIngest(key, ingest$1, body);
183
469
  const snapshot = luvio.storeLookup({
184
470
  recordId: key,
185
- node: select$3(),
471
+ node: select$2(),
186
472
  variables: {},
187
473
  }, snapshotRefresh);
188
474
  if (process.env.NODE_ENV !== 'production') {
@@ -197,10 +483,10 @@ function ingestError(luvio, params, error, snapshotRefresh) {
197
483
  const key = keyBuilder$2(luvio, params);
198
484
  const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
199
485
  const storeMetadataParams = {
200
- ttl: TTL$2,
486
+ ttl: TTL$1,
201
487
  namespace: keyPrefix,
202
- version: VERSION$2,
203
- representationName: RepresentationType$2
488
+ version: VERSION$1,
489
+ representationName: RepresentationType$1
204
490
  };
205
491
  luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
206
492
  return errorSnapshot;
@@ -209,7 +495,7 @@ function createResourceRequest$1(config) {
209
495
  const headers = {};
210
496
  return {
211
497
  baseUri: '/services/data/v62.0',
212
- basePath: '/industries/constraint/actions/' + config.urlParams.expressionSetDefinitionVersionId + '/view',
498
+ basePath: '/industries/constraints/' + config.urlParams.expressionSetId + '/versions/' + config.urlParams.expressionSetVersionId + '',
213
499
  method: 'get',
214
500
  body: null,
215
501
  urlParams: config.urlParams,
@@ -219,19 +505,20 @@ function createResourceRequest$1(config) {
219
505
  };
220
506
  }
221
507
 
222
- const adapterName$1 = 'getViewConstraint';
223
- const getViewConstraint_ConfigPropertyMetadata = [
224
- generateParamConfigMetadata('expressionSetDefinitionVersionId', true, 0 /* UrlParameter */, 0 /* String */),
508
+ const adapterName$1 = 'getConstraintVersion';
509
+ const getConstraintVersion_ConfigPropertyMetadata = [
510
+ generateParamConfigMetadata('expressionSetId', true, 0 /* UrlParameter */, 0 /* String */),
511
+ generateParamConfigMetadata('expressionSetVersionId', true, 0 /* UrlParameter */, 0 /* String */),
225
512
  ];
226
- const getViewConstraint_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getViewConstraint_ConfigPropertyMetadata);
227
- const createResourceParams$1 = /*#__PURE__*/ createResourceParams$2(getViewConstraint_ConfigPropertyMetadata);
513
+ const getConstraintVersion_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getConstraintVersion_ConfigPropertyMetadata);
514
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(getConstraintVersion_ConfigPropertyMetadata);
228
515
  function keyBuilder$1(luvio, config) {
229
516
  const resourceParams = createResourceParams$1(config);
230
517
  return keyBuilder$2(luvio, resourceParams);
231
518
  }
232
519
  function typeCheckConfig$1(untrustedConfig) {
233
520
  const config = {};
234
- typeCheckConfig$2(untrustedConfig, config, getViewConstraint_ConfigPropertyMetadata);
521
+ typeCheckConfig$3(untrustedConfig, config, getConstraintVersion_ConfigPropertyMetadata);
235
522
  return config;
236
523
  }
237
524
  function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
@@ -249,7 +536,7 @@ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
249
536
  }
250
537
  function adapterFragment(luvio, config) {
251
538
  createResourceParams$1(config);
252
- return select$3();
539
+ return select$2();
253
540
  }
254
541
  function onFetchResponseSuccess(luvio, config, resourceParams, response) {
255
542
  const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
@@ -295,8 +582,8 @@ function buildCachedSnapshotCachePolicy(context, storeLookup) {
295
582
  });
296
583
  return cacheSnapshot;
297
584
  }
298
- const getViewConstraintAdapterFactory = (luvio) => function constraints__getViewConstraint(untrustedConfig, requestContext) {
299
- const config = validateAdapterConfig$1(untrustedConfig, getViewConstraint_ConfigPropertyNames);
585
+ const getConstraintVersionAdapterFactory = (luvio) => function constraints__getConstraintVersion(untrustedConfig, requestContext) {
586
+ const config = validateAdapterConfig$1(untrustedConfig, getConstraintVersion_ConfigPropertyNames);
300
587
  // Invalid or incomplete config
301
588
  if (config === null) {
302
589
  return null;
@@ -305,69 +592,9 @@ const getViewConstraintAdapterFactory = (luvio) => function constraints__getView
305
592
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
306
593
  };
307
594
 
308
- const TTL$1 = 1000;
309
- const VERSION$1 = "ced261010494087086be7d8b043d2fda";
310
- function validate$1(obj, path = 'ConstraintErrorResponseRepresentation') {
311
- const v_error = (() => {
312
- if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
313
- return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
314
- }
315
- const obj_errorCode = obj.errorCode;
316
- const path_errorCode = path + '.errorCode';
317
- if (typeof obj_errorCode !== 'string') {
318
- return new TypeError('Expected "string" but received "' + typeof obj_errorCode + '" (at "' + path_errorCode + '")');
319
- }
320
- const obj_message = obj.message;
321
- const path_message = path + '.message';
322
- if (typeof obj_message !== 'string') {
323
- return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
324
- }
325
- })();
326
- return v_error === undefined ? null : v_error;
327
- }
328
- const RepresentationType$1 = 'ConstraintErrorResponseRepresentation';
329
- function normalize$1(input, existing, path, luvio, store, timestamp) {
330
- return input;
331
- }
332
- const select$2 = function ConstraintErrorResponseRepresentationSelect() {
333
- return {
334
- kind: 'Fragment',
335
- version: VERSION$1,
336
- private: [],
337
- opaque: true
338
- };
339
- };
340
- function equals$1(existing, incoming) {
341
- if (JSONStringify(incoming) !== JSONStringify(existing)) {
342
- return false;
343
- }
344
- return true;
345
- }
346
- const ingest$1 = function ConstraintErrorResponseRepresentationIngest(input, path, luvio, store, timestamp) {
347
- if (process.env.NODE_ENV !== 'production') {
348
- const validateError = validate$1(input);
349
- if (validateError !== null) {
350
- throw validateError;
351
- }
352
- }
353
- const key = path.fullPath;
354
- const ttlToUse = TTL$1;
355
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "constraints", VERSION$1, RepresentationType$1, equals$1);
356
- return createLink(key);
357
- };
358
- function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
359
- // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
360
- const rootKey = fullPathFactory();
361
- rootKeySet.set(rootKey, {
362
- namespace: keyPrefix,
363
- representationName: RepresentationType$1,
364
- mergeable: false
365
- });
366
- }
367
-
368
595
  const TTL = 1000;
369
- const VERSION = "5646f5b52bdab0ca9d29c0a28b60ac39";
370
- function validate(obj, path = 'ConstraintOutputRepresentation') {
596
+ const VERSION = "b590e58041197454c14f0163a2fc28e3";
597
+ function validate(obj, path = 'UpdateConstraintVersionOutputRepresentation') {
371
598
  const v_error = (() => {
372
599
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
373
600
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -392,7 +619,7 @@ function validate(obj, path = 'ConstraintOutputRepresentation') {
392
619
  })();
393
620
  return v_error === undefined ? null : v_error;
394
621
  }
395
- const RepresentationType = 'ConstraintOutputRepresentation';
622
+ const RepresentationType = 'UpdateConstraintVersionOutputRepresentation';
396
623
  function keyBuilder(luvio, config) {
397
624
  return keyPrefix + '::' + RepresentationType + ':' + config.success;
398
625
  }
@@ -408,7 +635,7 @@ function normalize(input, existing, path, luvio, store, timestamp) {
408
635
  for (let i = 0; i < input_errors.length; i++) {
409
636
  const input_errors_item = input_errors[i];
410
637
  let input_errors_item_id = input_errors_id + '__' + i;
411
- input_errors[i] = ingest$1(input_errors_item, {
638
+ input_errors[i] = ingest$3(input_errors_item, {
412
639
  fullPath: input_errors_item_id,
413
640
  propertyName: i,
414
641
  parent: {
@@ -421,7 +648,7 @@ function normalize(input, existing, path, luvio, store, timestamp) {
421
648
  }
422
649
  return input;
423
650
  }
424
- const select$1 = function ConstraintOutputRepresentationSelect() {
651
+ const select$1 = function UpdateConstraintVersionOutputRepresentationSelect() {
425
652
  return {
426
653
  kind: 'Fragment',
427
654
  version: VERSION,
@@ -431,7 +658,7 @@ const select$1 = function ConstraintOutputRepresentationSelect() {
431
658
  name: 'errors',
432
659
  kind: 'Link',
433
660
  plural: true,
434
- fragment: select$2()
661
+ fragment: select$6()
435
662
  },
436
663
  {
437
664
  name: 'success',
@@ -458,7 +685,7 @@ function equals(existing, incoming) {
458
685
  }
459
686
  return true;
460
687
  }
461
- const ingest = function ConstraintOutputRepresentationIngest(input, path, luvio, store, timestamp) {
688
+ const ingest = function UpdateConstraintVersionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
462
689
  if (process.env.NODE_ENV !== 'production') {
463
690
  const validateError = validate(input);
464
691
  if (validateError !== null) {
@@ -480,7 +707,7 @@ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
480
707
  });
481
708
  const input_errors_length = input.errors.length;
482
709
  for (let i = 0; i < input_errors_length; i++) {
483
- getTypeCacheKeys$1(rootKeySet, luvio, input.errors[i], () => '');
710
+ getTypeCacheKeys$3(rootKeySet, luvio, input.errors[i], () => '');
484
711
  }
485
712
  }
486
713
 
@@ -511,7 +738,7 @@ function createResourceRequest(config) {
511
738
  const headers = {};
512
739
  return {
513
740
  baseUri: '/services/data/v62.0',
514
- basePath: '/industries/constraint/actions/' + config.urlParams.expressionSetDefinitionVersionId + '/update',
741
+ basePath: '/industries/constraints/' + config.urlParams.expressionSetId + '/versions/' + config.urlParams.expressionSetVersionId + '',
515
742
  method: 'patch',
516
743
  body: config.body,
517
744
  urlParams: config.urlParams,
@@ -521,18 +748,19 @@ function createResourceRequest(config) {
521
748
  };
522
749
  }
523
750
 
524
- const adapterName = 'patchUpdateConstraint';
525
- const patchUpdateConstraint_ConfigPropertyMetadata = [
526
- generateParamConfigMetadata('expressionSetDefinitionVersionId', true, 0 /* UrlParameter */, 0 /* String */),
751
+ const adapterName = 'updateConstraintVersion';
752
+ const updateConstraintVersion_ConfigPropertyMetadata = [
753
+ generateParamConfigMetadata('expressionSetId', true, 0 /* UrlParameter */, 0 /* String */),
754
+ generateParamConfigMetadata('expressionSetVersionId', true, 0 /* UrlParameter */, 0 /* String */),
527
755
  generateParamConfigMetadata('constraintModel', false, 2 /* Body */, 0 /* String */),
528
756
  generateParamConfigMetadata('description', false, 2 /* Body */, 0 /* String */),
529
757
  generateParamConfigMetadata('status', false, 2 /* Body */, 0 /* String */),
530
758
  ];
531
- const patchUpdateConstraint_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, patchUpdateConstraint_ConfigPropertyMetadata);
532
- const createResourceParams = /*#__PURE__*/ createResourceParams$2(patchUpdateConstraint_ConfigPropertyMetadata);
759
+ const updateConstraintVersion_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, updateConstraintVersion_ConfigPropertyMetadata);
760
+ const createResourceParams = /*#__PURE__*/ createResourceParams$3(updateConstraintVersion_ConfigPropertyMetadata);
533
761
  function typeCheckConfig(untrustedConfig) {
534
762
  const config = {};
535
- typeCheckConfig$2(untrustedConfig, config, patchUpdateConstraint_ConfigPropertyMetadata);
763
+ typeCheckConfig$3(untrustedConfig, config, updateConstraintVersion_ConfigPropertyMetadata);
536
764
  return config;
537
765
  }
538
766
  function validateAdapterConfig(untrustedConfig, configPropertyNames) {
@@ -566,47 +794,52 @@ function buildNetworkSnapshot(luvio, config, options) {
566
794
  throw response;
567
795
  });
568
796
  }
569
- const patchUpdateConstraintAdapterFactory = (luvio) => {
570
- return function patchUpdateConstraint(untrustedConfig) {
571
- const config = validateAdapterConfig(untrustedConfig, patchUpdateConstraint_ConfigPropertyNames);
797
+ const updateConstraintVersionAdapterFactory = (luvio) => {
798
+ return function updateConstraintVersion(untrustedConfig) {
799
+ const config = validateAdapterConfig(untrustedConfig, updateConstraintVersion_ConfigPropertyNames);
572
800
  // Invalid or incomplete config
573
801
  if (config === null) {
574
- throw new Error('Invalid config for "patchUpdateConstraint"');
802
+ throw new Error('Invalid config for "updateConstraintVersion"');
575
803
  }
576
804
  return buildNetworkSnapshot(luvio, config);
577
805
  };
578
806
  };
579
807
 
580
- let getViewConstraint;
581
- let patchUpdateConstraint;
808
+ let createConstraintVersion;
809
+ let getConstraintVersion;
810
+ let updateConstraintVersion;
582
811
  // Imperative GET Adapters
583
- let getViewConstraint_imperative;
584
- // Adapter Metadata
585
- const getViewConstraintMetadata = {
812
+ let getConstraintVersion_imperative;
813
+ const getConstraintVersionMetadata = {
586
814
  apiFamily: 'constraints',
587
- name: 'getViewConstraint',
815
+ name: 'getConstraintVersion',
588
816
  ttl: 1000,
589
817
  };
590
818
  // Notify Update Available
591
819
  function bindExportsTo(luvio) {
592
820
  // LDS Adapters
593
- const getViewConstraint_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getViewConstraint', getViewConstraintAdapterFactory), getViewConstraintMetadata);
821
+ const getConstraintVersion_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getConstraintVersion', getConstraintVersionAdapterFactory), getConstraintVersionMetadata);
594
822
  function unwrapSnapshotData(factory) {
595
823
  const adapter = factory(luvio);
596
824
  return (config) => adapter(config).then((snapshot) => snapshot.data);
597
825
  }
598
826
  return {
599
- getViewConstraint: createWireAdapterConstructor(luvio, getViewConstraint_ldsAdapter, getViewConstraintMetadata),
600
- patchUpdateConstraint: unwrapSnapshotData(patchUpdateConstraintAdapterFactory),
827
+ createConstraintVersion: unwrapSnapshotData(createConstraintVersionAdapterFactory),
828
+ getConstraintVersion: createWireAdapterConstructor(luvio, getConstraintVersion_ldsAdapter, getConstraintVersionMetadata),
829
+ updateConstraintVersion: unwrapSnapshotData(updateConstraintVersionAdapterFactory),
601
830
  // Imperative GET Adapters
602
- getViewConstraint_imperative: createImperativeAdapter(luvio, getViewConstraint_ldsAdapter, getViewConstraintMetadata),
831
+ getConstraintVersion_imperative: createImperativeAdapter(luvio, getConstraintVersion_ldsAdapter, getConstraintVersionMetadata),
603
832
  // Notify Update Availables
604
833
  };
605
834
  }
606
835
  withDefaultLuvio((luvio) => {
607
- ({ getViewConstraint, patchUpdateConstraint, getViewConstraint_imperative } =
608
- bindExportsTo(luvio));
836
+ ({
837
+ createConstraintVersion,
838
+ getConstraintVersion,
839
+ updateConstraintVersion,
840
+ getConstraintVersion_imperative,
841
+ } = bindExportsTo(luvio));
609
842
  });
610
843
 
611
- export { getViewConstraint, getViewConstraint_imperative, patchUpdateConstraint };
612
- // version: 1.308.0-dev2-9bec7cb98f
844
+ export { createConstraintVersion, getConstraintVersion, getConstraintVersion_imperative, updateConstraintVersion };
845
+ // version: 1.308.0-dev3-5eb971dcf6