@salesforce/lds-adapters-industries-guardrail 1.322.0 → 1.324.0

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.
@@ -91,8 +91,8 @@ function createLink(ref) {
91
91
  };
92
92
  }
93
93
 
94
- const VERSION$4 = "a1acf0d83a1b62fc32e4b546fc4efa95";
95
- function validate$4(obj, path = 'MessageRepresentation') {
94
+ const VERSION$5 = "a1acf0d83a1b62fc32e4b546fc4efa95";
95
+ function validate$5(obj, path = 'MessageRepresentation') {
96
96
  const v_error = (() => {
97
97
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
98
98
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -115,10 +115,10 @@ function validate$4(obj, path = 'MessageRepresentation') {
115
115
  })();
116
116
  return v_error === undefined ? null : v_error;
117
117
  }
118
- const select$7 = function MessageRepresentationSelect() {
118
+ const select$8 = function MessageRepresentationSelect() {
119
119
  return {
120
120
  kind: 'Fragment',
121
- version: VERSION$4,
121
+ version: VERSION$5,
122
122
  private: [],
123
123
  selections: [
124
124
  {
@@ -136,7 +136,7 @@ const select$7 = function MessageRepresentationSelect() {
136
136
  ]
137
137
  };
138
138
  };
139
- function equals$4(existing, incoming) {
139
+ function equals$5(existing, incoming) {
140
140
  const existing_code = existing.code;
141
141
  const incoming_code = incoming.code;
142
142
  if (!(existing_code === incoming_code)) {
@@ -155,13 +155,71 @@ function equals$4(existing, incoming) {
155
155
  return true;
156
156
  }
157
157
 
158
- const TTL$3 = 60000;
159
- const VERSION$3 = "07e24b92bd05c260032c4a19832828da";
158
+ const VERSION$4 = "8c2130ce844030c37ffa0ee5d346b578";
159
+ function validate$4(obj, path = 'MessageListRepresentation') {
160
+ const v_error = (() => {
161
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
162
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
163
+ }
164
+ const obj_messageList = obj.messageList;
165
+ const path_messageList = path + '.messageList';
166
+ if (!ArrayIsArray(obj_messageList)) {
167
+ return new TypeError('Expected "array" but received "' + typeof obj_messageList + '" (at "' + path_messageList + '")');
168
+ }
169
+ for (let i = 0; i < obj_messageList.length; i++) {
170
+ const obj_messageList_item = obj_messageList[i];
171
+ const path_messageList_item = path_messageList + '[' + i + ']';
172
+ const referencepath_messageList_itemValidationError = validate$5(obj_messageList_item, path_messageList_item);
173
+ if (referencepath_messageList_itemValidationError !== null) {
174
+ let message = 'Object doesn\'t match MessageRepresentation (at "' + path_messageList_item + '")\n';
175
+ message += referencepath_messageList_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
176
+ return new TypeError(message);
177
+ }
178
+ }
179
+ })();
180
+ return v_error === undefined ? null : v_error;
181
+ }
182
+ const select$7 = function MessageListRepresentationSelect() {
183
+ const { selections: MessageRepresentation__selections, opaque: MessageRepresentation__opaque, } = select$8();
184
+ return {
185
+ kind: 'Fragment',
186
+ version: VERSION$4,
187
+ private: [],
188
+ selections: [
189
+ {
190
+ name: 'messageList',
191
+ kind: 'Object',
192
+ plural: true,
193
+ selections: MessageRepresentation__selections
194
+ }
195
+ ]
196
+ };
197
+ };
198
+ function equals$4(existing, incoming) {
199
+ const existing_messageList = existing.messageList;
200
+ const incoming_messageList = incoming.messageList;
201
+ const equals_messageList_items = equalsArray(existing_messageList, incoming_messageList, (existing_messageList_item, incoming_messageList_item) => {
202
+ if (!(equals$5(existing_messageList_item, incoming_messageList_item))) {
203
+ return false;
204
+ }
205
+ });
206
+ if (equals_messageList_items === false) {
207
+ return false;
208
+ }
209
+ return true;
210
+ }
211
+
212
+ const VERSION$3 = "e807e4be6c8656a4a2761f06d272a041";
160
213
  function validate$3(obj, path = 'GuardrailDetailRepresentation') {
161
214
  const v_error = (() => {
162
215
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
163
216
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
164
217
  }
218
+ const obj_guardRailCurrentValue = obj.guardRailCurrentValue;
219
+ const path_guardRailCurrentValue = path + '.guardRailCurrentValue';
220
+ if (typeof obj_guardRailCurrentValue !== 'string') {
221
+ return new TypeError('Expected "string" but received "' + typeof obj_guardRailCurrentValue + '" (at "' + path_guardRailCurrentValue + '")');
222
+ }
165
223
  const obj_guardRailMaxValue = obj.guardRailMaxValue;
166
224
  const path_guardRailMaxValue = path + '.guardRailMaxValue';
167
225
  if (typeof obj_guardRailMaxValue !== 'string') {
@@ -182,37 +240,28 @@ function validate$3(obj, path = 'GuardrailDetailRepresentation') {
182
240
  if (typeof obj_guardRailRestrictionType !== 'string') {
183
241
  return new TypeError('Expected "string" but received "' + typeof obj_guardRailRestrictionType + '" (at "' + path_guardRailRestrictionType + '")');
184
242
  }
185
- const obj_message = obj.message;
186
- const path_message = path + '.message';
187
- const referencepath_messageValidationError = validate$4(obj_message, path_message);
188
- if (referencepath_messageValidationError !== null) {
189
- let message = 'Object doesn\'t match MessageRepresentation (at "' + path_message + '")\n';
190
- message += referencepath_messageValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
243
+ const obj_messages = obj.messages;
244
+ const path_messages = path + '.messages';
245
+ const referencepath_messagesValidationError = validate$4(obj_messages, path_messages);
246
+ if (referencepath_messagesValidationError !== null) {
247
+ let message = 'Object doesn\'t match MessageListRepresentation (at "' + path_messages + '")\n';
248
+ message += referencepath_messagesValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
191
249
  return new TypeError(message);
192
250
  }
193
251
  })();
194
252
  return v_error === undefined ? null : v_error;
195
253
  }
196
- const RepresentationType$3 = 'GuardrailDetailRepresentation';
197
- function keyBuilder$5(luvio, config) {
198
- return keyPrefix + '::' + RepresentationType$3 + ':' + config.guardRailName;
199
- }
200
- function keyBuilderFromType$1(luvio, object) {
201
- const keyParams = {
202
- guardRailName: object.guardRailName
203
- };
204
- return keyBuilder$5(luvio, keyParams);
205
- }
206
- function normalize$3(input, existing, path, luvio, store, timestamp) {
207
- return input;
208
- }
209
254
  const select$6 = function GuardrailDetailRepresentationSelect() {
210
- const { selections: MessageRepresentation__selections, opaque: MessageRepresentation__opaque, } = select$7();
255
+ const { selections: MessageListRepresentation__selections, opaque: MessageListRepresentation__opaque, } = select$7();
211
256
  return {
212
257
  kind: 'Fragment',
213
258
  version: VERSION$3,
214
259
  private: [],
215
260
  selections: [
261
+ {
262
+ name: 'guardRailCurrentValue',
263
+ kind: 'Scalar'
264
+ },
216
265
  {
217
266
  name: 'guardRailMaxValue',
218
267
  kind: 'Scalar'
@@ -230,14 +279,19 @@ const select$6 = function GuardrailDetailRepresentationSelect() {
230
279
  kind: 'Scalar'
231
280
  },
232
281
  {
233
- name: 'message',
282
+ name: 'messages',
234
283
  kind: 'Object',
235
- selections: MessageRepresentation__selections
284
+ selections: MessageListRepresentation__selections
236
285
  }
237
286
  ]
238
287
  };
239
288
  };
240
289
  function equals$3(existing, incoming) {
290
+ const existing_guardRailCurrentValue = existing.guardRailCurrentValue;
291
+ const incoming_guardRailCurrentValue = incoming.guardRailCurrentValue;
292
+ if (!(existing_guardRailCurrentValue === incoming_guardRailCurrentValue)) {
293
+ return false;
294
+ }
241
295
  const existing_guardRailMaxValue = existing.guardRailMaxValue;
242
296
  const incoming_guardRailMaxValue = incoming.guardRailMaxValue;
243
297
  if (!(existing_guardRailMaxValue === incoming_guardRailMaxValue)) {
@@ -258,37 +312,16 @@ function equals$3(existing, incoming) {
258
312
  if (!(existing_guardRailRestrictionType === incoming_guardRailRestrictionType)) {
259
313
  return false;
260
314
  }
261
- const existing_message = existing.message;
262
- const incoming_message = incoming.message;
263
- if (!(equals$4(existing_message, incoming_message))) {
315
+ const existing_messages = existing.messages;
316
+ const incoming_messages = incoming.messages;
317
+ if (!(equals$4(existing_messages, incoming_messages))) {
264
318
  return false;
265
319
  }
266
320
  return true;
267
321
  }
268
- const ingest$3 = function GuardrailDetailRepresentationIngest(input, path, luvio, store, timestamp) {
269
- if (process.env.NODE_ENV !== 'production') {
270
- const validateError = validate$3(input);
271
- if (validateError !== null) {
272
- throw validateError;
273
- }
274
- }
275
- const key = keyBuilderFromType$1(luvio, input);
276
- const ttlToUse = TTL$3;
277
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "Guardrail", VERSION$3, RepresentationType$3, equals$3);
278
- return createLink(key);
279
- };
280
- function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
281
- // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
282
- const rootKey = keyBuilderFromType$1(luvio, input);
283
- rootKeySet.set(rootKey, {
284
- namespace: keyPrefix,
285
- representationName: RepresentationType$3,
286
- mergeable: false
287
- });
288
- }
289
322
 
290
- const TTL$2 = 60000;
291
- const VERSION$2 = "59c734462982ee5ac130c47f27d71244";
323
+ const TTL$2 = 360000;
324
+ const VERSION$2 = "39fbf551eef01712a8ab2bf485e2b8e1";
292
325
  function validate$2(obj, path = 'IndustriesGuardrailRepresentation') {
293
326
  const v_error = (() => {
294
327
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -296,29 +329,21 @@ function validate$2(obj, path = 'IndustriesGuardrailRepresentation') {
296
329
  }
297
330
  const obj_industriesGuardrail = obj.industriesGuardrail;
298
331
  const path_industriesGuardrail = path + '.industriesGuardrail';
299
- if (typeof obj_industriesGuardrail !== 'object') {
300
- return new TypeError('Expected "object" but received "' + typeof obj_industriesGuardrail + '" (at "' + path_industriesGuardrail + '")');
332
+ const referencepath_industriesGuardrailValidationError = validate$3(obj_industriesGuardrail, path_industriesGuardrail);
333
+ if (referencepath_industriesGuardrailValidationError !== null) {
334
+ let message = 'Object doesn\'t match GuardrailDetailRepresentation (at "' + path_industriesGuardrail + '")\n';
335
+ message += referencepath_industriesGuardrailValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
336
+ return new TypeError(message);
301
337
  }
302
338
  })();
303
339
  return v_error === undefined ? null : v_error;
304
340
  }
305
341
  const RepresentationType$2 = 'IndustriesGuardrailRepresentation';
306
342
  function normalize$2(input, existing, path, luvio, store, timestamp) {
307
- const input_industriesGuardrail = input.industriesGuardrail;
308
- const input_industriesGuardrail_id = path.fullPath + '__industriesGuardrail';
309
- input.industriesGuardrail = ingest$3(input_industriesGuardrail, {
310
- fullPath: input_industriesGuardrail_id,
311
- propertyName: 'industriesGuardrail',
312
- parent: {
313
- data: input,
314
- key: path.fullPath,
315
- existing: existing,
316
- },
317
- ttl: path.ttl
318
- }, luvio, store, timestamp);
319
343
  return input;
320
344
  }
321
345
  const select$5 = function IndustriesGuardrailRepresentationSelect() {
346
+ const { selections: GuardrailDetailRepresentation__selections, opaque: GuardrailDetailRepresentation__opaque, } = select$6();
322
347
  return {
323
348
  kind: 'Fragment',
324
349
  version: VERSION$2,
@@ -326,8 +351,8 @@ const select$5 = function IndustriesGuardrailRepresentationSelect() {
326
351
  selections: [
327
352
  {
328
353
  name: 'industriesGuardrail',
329
- kind: 'Link',
330
- fragment: select$6()
354
+ kind: 'Object',
355
+ selections: GuardrailDetailRepresentation__selections
331
356
  }
332
357
  ]
333
358
  };
@@ -335,7 +360,7 @@ const select$5 = function IndustriesGuardrailRepresentationSelect() {
335
360
  function equals$2(existing, incoming) {
336
361
  const existing_industriesGuardrail = existing.industriesGuardrail;
337
362
  const incoming_industriesGuardrail = incoming.industriesGuardrail;
338
- if (!(existing_industriesGuardrail.__ref === incoming_industriesGuardrail.__ref)) {
363
+ if (!(equals$3(existing_industriesGuardrail, incoming_industriesGuardrail))) {
339
364
  return false;
340
365
  }
341
366
  return true;
@@ -360,7 +385,6 @@ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
360
385
  representationName: RepresentationType$2,
361
386
  mergeable: false
362
387
  });
363
- getTypeCacheKeys$3(rootKeySet, luvio, input.industriesGuardrail);
364
388
  }
365
389
 
366
390
  function select$4(luvio, params) {
@@ -503,7 +527,7 @@ const getIndustriesGuardrailAdapterFactory = (luvio) => function Guardrail__getI
503
527
  buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
504
528
  };
505
529
 
506
- const TTL$1 = 60000;
530
+ const TTL$1 = 360000;
507
531
  const VERSION$1 = "5cfade0dbffa50ea18bd23547286f851";
508
532
  function validate$1(obj, path = 'ValidationMessageRepresentation') {
509
533
  const v_error = (() => {
@@ -518,7 +542,7 @@ function validate$1(obj, path = 'ValidationMessageRepresentation') {
518
542
  if (obj.message !== undefined) {
519
543
  const obj_message = obj.message;
520
544
  const path_message = path + '.message';
521
- const referencepath_messageValidationError = validate$4(obj_message, path_message);
545
+ const referencepath_messageValidationError = validate$5(obj_message, path_message);
522
546
  if (referencepath_messageValidationError !== null) {
523
547
  let message = 'Object doesn\'t match MessageRepresentation (at "' + path_message + '")\n';
524
548
  message += referencepath_messageValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -547,7 +571,7 @@ function normalize$1(input, existing, path, luvio, store, timestamp) {
547
571
  return input;
548
572
  }
549
573
  const select$3 = function ValidationMessageRepresentationSelect() {
550
- const { selections: MessageRepresentation__selections, opaque: MessageRepresentation__opaque, } = select$7();
574
+ const { selections: MessageRepresentation__selections, opaque: MessageRepresentation__opaque, } = select$8();
551
575
  return {
552
576
  kind: 'Fragment',
553
577
  version: VERSION$1,
@@ -590,7 +614,7 @@ function equals$1(existing, incoming) {
590
614
  if (existing_message === undefined || incoming_message === undefined) {
591
615
  return false;
592
616
  }
593
- if (!(equals$4(existing_message, incoming_message))) {
617
+ if (!(equals$5(existing_message, incoming_message))) {
594
618
  return false;
595
619
  }
596
620
  }
@@ -647,7 +671,7 @@ function createResourceRequest$1(config) {
647
671
  baseUri: '/services/data/v63.0',
648
672
  basePath: '/connect/industries/guardrail/validate',
649
673
  method: 'post',
650
- body: null,
674
+ body: config.body,
651
675
  urlParams: {},
652
676
  queryParams: {},
653
677
  headers,
@@ -656,11 +680,17 @@ function createResourceRequest$1(config) {
656
680
  }
657
681
 
658
682
  const adapterName$1 = 'postValidateGuardrail';
659
- const postValidateGuardrail_ConfigPropertyMetadata = [];
683
+ const postValidateGuardrail_ConfigPropertyMetadata = [
684
+ generateParamConfigMetadata('component', true, 2 /* Body */, 0 /* String */),
685
+ generateParamConfigMetadata('guardrailName', true, 2 /* Body */, 0 /* String */),
686
+ generateParamConfigMetadata('guardrailValue', true, 2 /* Body */, 0 /* String */),
687
+ generateParamConfigMetadata('product', true, 2 /* Body */, 0 /* String */),
688
+ ];
660
689
  const postValidateGuardrail_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, postValidateGuardrail_ConfigPropertyMetadata);
661
690
  const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(postValidateGuardrail_ConfigPropertyMetadata);
662
691
  function typeCheckConfig$1(untrustedConfig) {
663
692
  const config = {};
693
+ typeCheckConfig$3(untrustedConfig, config, postValidateGuardrail_ConfigPropertyMetadata);
664
694
  return config;
665
695
  }
666
696
  function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
@@ -670,7 +700,7 @@ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
670
700
  if (process.env.NODE_ENV !== 'production') {
671
701
  validateConfig(untrustedConfig, configPropertyNames);
672
702
  }
673
- const config = typeCheckConfig$1();
703
+ const config = typeCheckConfig$1(untrustedConfig);
674
704
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
675
705
  return null;
676
706
  }
@@ -678,7 +708,7 @@ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
678
708
  }
679
709
  function buildNetworkSnapshot$1(luvio, config, options) {
680
710
  const resourceParams = createResourceParams$1(config);
681
- const request = createResourceRequest$1();
711
+ const request = createResourceRequest$1(resourceParams);
682
712
  return luvio.dispatchResourceRequest(request, options)
683
713
  .then((response) => {
684
714
  return luvio.handleSuccessResponse(() => {
@@ -705,8 +735,8 @@ const postValidateGuardrailAdapterFactory = (luvio) => {
705
735
  };
706
736
  };
707
737
 
708
- const TTL = 60000;
709
- const VERSION = "4a95ebefec5a82dc9ceb57f67d95359a";
738
+ const TTL = 360000;
739
+ const VERSION = "f4b13007f7482953a52db180f844af52";
710
740
  function validate(obj, path = 'IndustriesGuardrailListRepresentation') {
711
741
  const v_error = (() => {
712
742
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -720,8 +750,11 @@ function validate(obj, path = 'IndustriesGuardrailListRepresentation') {
720
750
  for (let i = 0; i < obj_industriesGuardrailList.length; i++) {
721
751
  const obj_industriesGuardrailList_item = obj_industriesGuardrailList[i];
722
752
  const path_industriesGuardrailList_item = path_industriesGuardrailList + '[' + i + ']';
723
- if (typeof obj_industriesGuardrailList_item !== 'object') {
724
- return new TypeError('Expected "object" but received "' + typeof obj_industriesGuardrailList_item + '" (at "' + path_industriesGuardrailList_item + '")');
753
+ const referencepath_industriesGuardrailList_itemValidationError = validate$3(obj_industriesGuardrailList_item, path_industriesGuardrailList_item);
754
+ if (referencepath_industriesGuardrailList_itemValidationError !== null) {
755
+ let message = 'Object doesn\'t match GuardrailDetailRepresentation (at "' + path_industriesGuardrailList_item + '")\n';
756
+ message += referencepath_industriesGuardrailList_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
757
+ return new TypeError(message);
725
758
  }
726
759
  }
727
760
  })();
@@ -729,25 +762,10 @@ function validate(obj, path = 'IndustriesGuardrailListRepresentation') {
729
762
  }
730
763
  const RepresentationType = 'IndustriesGuardrailListRepresentation';
731
764
  function normalize(input, existing, path, luvio, store, timestamp) {
732
- const input_industriesGuardrailList = input.industriesGuardrailList;
733
- const input_industriesGuardrailList_id = path.fullPath + '__industriesGuardrailList';
734
- for (let i = 0; i < input_industriesGuardrailList.length; i++) {
735
- const input_industriesGuardrailList_item = input_industriesGuardrailList[i];
736
- let input_industriesGuardrailList_item_id = input_industriesGuardrailList_id + '__' + i;
737
- input_industriesGuardrailList[i] = ingest$3(input_industriesGuardrailList_item, {
738
- fullPath: input_industriesGuardrailList_item_id,
739
- propertyName: i,
740
- parent: {
741
- data: input,
742
- key: path.fullPath,
743
- existing: existing,
744
- },
745
- ttl: path.ttl
746
- }, luvio, store, timestamp);
747
- }
748
765
  return input;
749
766
  }
750
767
  const select$1 = function IndustriesGuardrailListRepresentationSelect() {
768
+ const { selections: GuardrailDetailRepresentation__selections, opaque: GuardrailDetailRepresentation__opaque, } = select$6();
751
769
  return {
752
770
  kind: 'Fragment',
753
771
  version: VERSION,
@@ -755,9 +773,9 @@ const select$1 = function IndustriesGuardrailListRepresentationSelect() {
755
773
  selections: [
756
774
  {
757
775
  name: 'industriesGuardrailList',
758
- kind: 'Link',
776
+ kind: 'Object',
759
777
  plural: true,
760
- fragment: select$6()
778
+ selections: GuardrailDetailRepresentation__selections
761
779
  }
762
780
  ]
763
781
  };
@@ -766,7 +784,7 @@ function equals(existing, incoming) {
766
784
  const existing_industriesGuardrailList = existing.industriesGuardrailList;
767
785
  const incoming_industriesGuardrailList = incoming.industriesGuardrailList;
768
786
  const equals_industriesGuardrailList_items = equalsArray(existing_industriesGuardrailList, incoming_industriesGuardrailList, (existing_industriesGuardrailList_item, incoming_industriesGuardrailList_item) => {
769
- if (!(existing_industriesGuardrailList_item.__ref === incoming_industriesGuardrailList_item.__ref)) {
787
+ if (!(equals$3(existing_industriesGuardrailList_item, incoming_industriesGuardrailList_item))) {
770
788
  return false;
771
789
  }
772
790
  });
@@ -795,10 +813,6 @@ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
795
813
  representationName: RepresentationType,
796
814
  mergeable: false
797
815
  });
798
- const input_industriesGuardrailList_length = input.industriesGuardrailList.length;
799
- for (let i = 0; i < input_industriesGuardrailList_length; i++) {
800
- getTypeCacheKeys$3(rootKeySet, luvio, input.industriesGuardrailList[i]);
801
- }
802
816
  }
803
817
 
804
818
  function select(luvio, params) {
@@ -6,6 +6,10 @@ export declare const adapterName = "postValidateGuardrail";
6
6
  export declare const postValidateGuardrail_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
7
7
  export declare const postValidateGuardrail_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
8
8
  export interface PostValidateGuardrailConfig {
9
+ component: string;
10
+ guardrailName: string;
11
+ guardrailValue: string;
12
+ product: string;
9
13
  }
10
14
  export declare const createResourceParams: (config: PostValidateGuardrailConfig) => resources_postConnectIndustriesGuardrailValidate_ResourceRequestConfig;
11
15
  export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<PostValidateGuardrailConfig>): adapter$45$utils_Untrusted<PostValidateGuardrailConfig>;
@@ -1,6 +1,12 @@
1
1
  import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment, FetchResponse as $64$luvio_engine_FetchResponse, FulfilledSnapshot as $64$luvio_engine_FulfilledSnapshot, StaleSnapshot as $64$luvio_engine_StaleSnapshot, PendingSnapshot as $64$luvio_engine_PendingSnapshot, ResourceRequest as $64$luvio_engine_ResourceRequest } from '@luvio/engine';
2
2
  import { ValidationMessageRepresentation as types_ValidationMessageRepresentation_ValidationMessageRepresentation } from '../types/ValidationMessageRepresentation';
3
3
  export interface ResourceRequestConfig {
4
+ body: {
5
+ component: string;
6
+ guardrailName: string;
7
+ guardrailValue: string;
8
+ product: string;
9
+ };
4
10
  }
5
11
  export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
6
12
  export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_ValidationMessageRepresentation_ValidationMessageRepresentation): void;
@@ -1,18 +1,9 @@
1
- import { MessageRepresentation as MessageRepresentation_MessageRepresentation } from './MessageRepresentation';
2
- import { KeyMetadata as $64$luvio_engine_KeyMetadata, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Luvio as $64$luvio_engine_Luvio, IngestPath as $64$luvio_engine_IngestPath, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap } from '@luvio/engine';
3
- export declare const TTL = 60000;
4
- export declare const VERSION = "07e24b92bd05c260032c4a19832828da";
1
+ import { MessageListRepresentation as MessageListRepresentation_MessageListRepresentation } from './MessageListRepresentation';
2
+ import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
3
+ export declare const TTL = 360000;
4
+ export declare const VERSION = "e807e4be6c8656a4a2761f06d272a041";
5
5
  export declare function validate(obj: any, path?: string): TypeError | null;
6
6
  export declare const RepresentationType: string;
7
- export interface KeyParams extends $64$luvio_engine_KeyMetadata {
8
- guardRailName: string;
9
- }
10
- export type GuardrailDetailRepresentationNormalizedKeyMetadata = KeyParams & $64$luvio_engine_NormalizedKeyMetadata;
11
- export type PartialGuardrailDetailRepresentationNormalizedKeyMetadata = Partial<KeyParams> & $64$luvio_engine_NormalizedKeyMetadata;
12
- export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: KeyParams): string;
13
- export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, config: KeyParams): GuardrailDetailRepresentationNormalizedKeyMetadata;
14
- export declare function keyBuilderFromType(luvio: $64$luvio_engine_Luvio, object: GuardrailDetailRepresentation): string;
15
- export declare function keyBuilderFromType_StructuredKey(luvio: $64$luvio_engine_Luvio, object: GuardrailDetailRepresentation): $64$luvio_engine_NormalizedKeyMetadata;
16
7
  export declare function normalize(input: GuardrailDetailRepresentation, existing: GuardrailDetailRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): GuardrailDetailRepresentationNormalized;
17
8
  export declare const select: () => $64$luvio_engine_FragmentSelection;
18
9
  export declare function equals(existing: GuardrailDetailRepresentationNormalized, incoming: GuardrailDetailRepresentationNormalized): boolean;
@@ -22,9 +13,11 @@ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableSto
22
13
  * Detail of the Guardrail such as Name, Min and Max value
23
14
  *
24
15
  * Keys:
25
- * guardRailName (string): guardRailName
16
+ * (none)
26
17
  */
27
18
  export interface GuardrailDetailRepresentationNormalized {
19
+ /** Current Value of the Guardrail. */
20
+ guardRailCurrentValue: string;
28
21
  /** Max Value of the Guardrail */
29
22
  guardRailMaxValue: string;
30
23
  /** Min Value of the Guardrail. */
@@ -33,18 +26,19 @@ export interface GuardrailDetailRepresentationNormalized {
33
26
  guardRailName: string;
34
27
  /** Whether Guardrail type is soft or hard. */
35
28
  guardRailRestrictionType: string;
36
- message: MessageRepresentation_MessageRepresentation;
29
+ messages: MessageListRepresentation_MessageListRepresentation;
37
30
  }
38
31
  /**
39
32
  * Detail of the Guardrail such as Name, Min and Max value
40
33
  *
41
34
  * Keys:
42
- * guardRailName (string): guardRailName
35
+ * (none)
43
36
  */
44
37
  export interface GuardrailDetailRepresentation {
38
+ guardRailCurrentValue: string;
45
39
  guardRailMaxValue: string;
46
40
  guardRailMinValue: string;
47
41
  guardRailName: string;
48
42
  guardRailRestrictionType: string;
49
- message: MessageRepresentation_MessageRepresentation;
43
+ messages: MessageListRepresentation_MessageListRepresentation;
50
44
  }
@@ -1,5 +1,5 @@
1
1
  import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
2
- export declare const TTL = 60000;
2
+ export declare const TTL = 360000;
3
3
  export declare const VERSION = "f01a2b52f24b6170b273e1cf2d656de7";
4
4
  export declare function validate(obj: any, path?: string): TypeError | null;
5
5
  export declare const RepresentationType: string;
@@ -1,23 +1,14 @@
1
- import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, ResourceIngest as $64$luvio_engine_ResourceIngest, FragmentSelection as $64$luvio_engine_FragmentSelection, LinkSelection as $64$luvio_engine_LinkSelection, StoreLink as $64$luvio_engine_StoreLink, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
2
1
  import { GuardrailDetailRepresentation as GuardrailDetailRepresentation_GuardrailDetailRepresentation } from './GuardrailDetailRepresentation';
3
- export declare const TTL = 60000;
4
- export declare const VERSION = "4a95ebefec5a82dc9ceb57f67d95359a";
2
+ import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
3
+ export declare const TTL = 360000;
4
+ export declare const VERSION = "f4b13007f7482953a52db180f844af52";
5
5
  export declare function validate(obj: any, path?: string): TypeError | null;
6
6
  export declare const RepresentationType: string;
7
7
  export declare function normalize(input: IndustriesGuardrailListRepresentation, existing: IndustriesGuardrailListRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): IndustriesGuardrailListRepresentationNormalized;
8
- export interface DynamicIngestParams {
9
- industriesGuardrailList: $64$luvio_engine_ResourceIngest;
10
- }
11
- export declare function dynamicNormalize(ingestParams: DynamicIngestParams): (input: IndustriesGuardrailListRepresentation, existing: IndustriesGuardrailListRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number) => IndustriesGuardrailListRepresentationNormalized;
12
8
  export declare const select: () => $64$luvio_engine_FragmentSelection;
13
- export interface DynamicSelectParams {
14
- industriesGuardrailList?: $64$luvio_engine_LinkSelection;
15
- }
16
- export declare const dynamicSelect: (params: DynamicSelectParams) => $64$luvio_engine_FragmentSelection;
17
9
  export declare function equals(existing: IndustriesGuardrailListRepresentationNormalized, incoming: IndustriesGuardrailListRepresentationNormalized): boolean;
18
10
  export declare const ingest: $64$luvio_engine_ResourceIngest;
19
11
  export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: IndustriesGuardrailListRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
20
- export declare function dynamicIngest(ingestParams: DynamicIngestParams): $64$luvio_engine_ResourceIngest;
21
12
  /**
22
13
  * List of all Guardrails
23
14
  *
@@ -26,7 +17,7 @@ export declare function dynamicIngest(ingestParams: DynamicIngestParams): $64$lu
26
17
  */
27
18
  export interface IndustriesGuardrailListRepresentationNormalized {
28
19
  /** A list of GuardrailDetailRepresentation */
29
- industriesGuardrailList: Array<$64$luvio_engine_StoreLink>;
20
+ industriesGuardrailList: Array<GuardrailDetailRepresentation_GuardrailDetailRepresentation>;
30
21
  }
31
22
  /**
32
23
  * List of all Guardrails
@@ -1,23 +1,14 @@
1
- import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, ResourceIngest as $64$luvio_engine_ResourceIngest, FragmentSelection as $64$luvio_engine_FragmentSelection, LinkSelection as $64$luvio_engine_LinkSelection, StoreLink as $64$luvio_engine_StoreLink, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
2
1
  import { GuardrailDetailRepresentation as GuardrailDetailRepresentation_GuardrailDetailRepresentation } from './GuardrailDetailRepresentation';
3
- export declare const TTL = 60000;
4
- export declare const VERSION = "59c734462982ee5ac130c47f27d71244";
2
+ import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
3
+ export declare const TTL = 360000;
4
+ export declare const VERSION = "39fbf551eef01712a8ab2bf485e2b8e1";
5
5
  export declare function validate(obj: any, path?: string): TypeError | null;
6
6
  export declare const RepresentationType: string;
7
7
  export declare function normalize(input: IndustriesGuardrailRepresentation, existing: IndustriesGuardrailRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): IndustriesGuardrailRepresentationNormalized;
8
- export interface DynamicIngestParams {
9
- industriesGuardrail: $64$luvio_engine_ResourceIngest;
10
- }
11
- export declare function dynamicNormalize(ingestParams: DynamicIngestParams): (input: IndustriesGuardrailRepresentation, existing: IndustriesGuardrailRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number) => IndustriesGuardrailRepresentationNormalized;
12
8
  export declare const select: () => $64$luvio_engine_FragmentSelection;
13
- export interface DynamicSelectParams {
14
- industriesGuardrail?: $64$luvio_engine_LinkSelection;
15
- }
16
- export declare const dynamicSelect: (params: DynamicSelectParams) => $64$luvio_engine_FragmentSelection;
17
9
  export declare function equals(existing: IndustriesGuardrailRepresentationNormalized, incoming: IndustriesGuardrailRepresentationNormalized): boolean;
18
10
  export declare const ingest: $64$luvio_engine_ResourceIngest;
19
11
  export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: IndustriesGuardrailRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
20
- export declare function dynamicIngest(ingestParams: DynamicIngestParams): $64$luvio_engine_ResourceIngest;
21
12
  /**
22
13
  * The detail of a Guardrail
23
14
  *
@@ -26,7 +17,7 @@ export declare function dynamicIngest(ingestParams: DynamicIngestParams): $64$lu
26
17
  */
27
18
  export interface IndustriesGuardrailRepresentationNormalized {
28
19
  /** The detail of a Guardrail. */
29
- industriesGuardrail: $64$luvio_engine_StoreLink;
20
+ industriesGuardrail: GuardrailDetailRepresentation_GuardrailDetailRepresentation;
30
21
  }
31
22
  /**
32
23
  * The detail of a Guardrail
@@ -0,0 +1,30 @@
1
+ import { MessageRepresentation as MessageRepresentation_MessageRepresentation } from './MessageRepresentation';
2
+ import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
3
+ export declare const TTL = 360000;
4
+ export declare const VERSION = "8c2130ce844030c37ffa0ee5d346b578";
5
+ export declare function validate(obj: any, path?: string): TypeError | null;
6
+ export declare const RepresentationType: string;
7
+ export declare function normalize(input: MessageListRepresentation, existing: MessageListRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): MessageListRepresentationNormalized;
8
+ export declare const select: () => $64$luvio_engine_FragmentSelection;
9
+ export declare function equals(existing: MessageListRepresentationNormalized, incoming: MessageListRepresentationNormalized): boolean;
10
+ export declare const ingest: $64$luvio_engine_ResourceIngest;
11
+ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: MessageListRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
12
+ /**
13
+ * List of all Guardrail Messages
14
+ *
15
+ * Keys:
16
+ * (none)
17
+ */
18
+ export interface MessageListRepresentationNormalized {
19
+ /** A list of MessageRepresentation */
20
+ messageList: Array<MessageRepresentation_MessageRepresentation>;
21
+ }
22
+ /**
23
+ * List of all Guardrail Messages
24
+ *
25
+ * Keys:
26
+ * (none)
27
+ */
28
+ export interface MessageListRepresentation {
29
+ messageList: Array<MessageRepresentation_MessageRepresentation>;
30
+ }
@@ -1,5 +1,5 @@
1
1
  import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
2
- export declare const TTL = 60000;
2
+ export declare const TTL = 360000;
3
3
  export declare const VERSION = "a1acf0d83a1b62fc32e4b546fc4efa95";
4
4
  export declare function validate(obj: any, path?: string): TypeError | null;
5
5
  export declare const RepresentationType: string;
@@ -1,6 +1,6 @@
1
1
  import { MessageRepresentation as MessageRepresentation_MessageRepresentation } from './MessageRepresentation';
2
2
  import { KeyMetadata as $64$luvio_engine_KeyMetadata, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Luvio as $64$luvio_engine_Luvio, IngestPath as $64$luvio_engine_IngestPath, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap } from '@luvio/engine';
3
- export declare const TTL = 60000;
3
+ export declare const TTL = 360000;
4
4
  export declare const VERSION = "5cfade0dbffa50ea18bd23547286f851";
5
5
  export declare function validate(obj: any, path?: string): TypeError | null;
6
6
  export declare const RepresentationType: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-industries-guardrail",
3
- "version": "1.322.0",
3
+ "version": "1.324.0",
4
4
  "description": "Guardrail resource family to fetch and validate industries guardrails",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "dist/es/es2018/industries-guardrail.js",
@@ -40,10 +40,10 @@
40
40
  "test:unit": "jest"
41
41
  },
42
42
  "dependencies": {
43
- "@salesforce/lds-bindings": "^1.322.0"
43
+ "@salesforce/lds-bindings": "^1.324.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@salesforce/lds-compiler-plugins": "^1.322.0"
46
+ "@salesforce/lds-compiler-plugins": "^1.324.0"
47
47
  },
48
48
  "nx": {
49
49
  "targets": {
package/sfdc/index.js CHANGED
@@ -101,8 +101,8 @@ function createLink(ref) {
101
101
  };
102
102
  }
103
103
 
104
- const VERSION$4 = "a1acf0d83a1b62fc32e4b546fc4efa95";
105
- function validate$4(obj, path = 'MessageRepresentation') {
104
+ const VERSION$5 = "a1acf0d83a1b62fc32e4b546fc4efa95";
105
+ function validate$5(obj, path = 'MessageRepresentation') {
106
106
  const v_error = (() => {
107
107
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
108
108
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -125,10 +125,10 @@ function validate$4(obj, path = 'MessageRepresentation') {
125
125
  })();
126
126
  return v_error === undefined ? null : v_error;
127
127
  }
128
- const select$7 = function MessageRepresentationSelect() {
128
+ const select$8 = function MessageRepresentationSelect() {
129
129
  return {
130
130
  kind: 'Fragment',
131
- version: VERSION$4,
131
+ version: VERSION$5,
132
132
  private: [],
133
133
  selections: [
134
134
  {
@@ -146,7 +146,7 @@ const select$7 = function MessageRepresentationSelect() {
146
146
  ]
147
147
  };
148
148
  };
149
- function equals$4(existing, incoming) {
149
+ function equals$5(existing, incoming) {
150
150
  const existing_code = existing.code;
151
151
  const incoming_code = incoming.code;
152
152
  if (!(existing_code === incoming_code)) {
@@ -165,13 +165,71 @@ function equals$4(existing, incoming) {
165
165
  return true;
166
166
  }
167
167
 
168
- const TTL$3 = 60000;
169
- const VERSION$3 = "07e24b92bd05c260032c4a19832828da";
168
+ const VERSION$4 = "8c2130ce844030c37ffa0ee5d346b578";
169
+ function validate$4(obj, path = 'MessageListRepresentation') {
170
+ const v_error = (() => {
171
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
172
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
173
+ }
174
+ const obj_messageList = obj.messageList;
175
+ const path_messageList = path + '.messageList';
176
+ if (!ArrayIsArray(obj_messageList)) {
177
+ return new TypeError('Expected "array" but received "' + typeof obj_messageList + '" (at "' + path_messageList + '")');
178
+ }
179
+ for (let i = 0; i < obj_messageList.length; i++) {
180
+ const obj_messageList_item = obj_messageList[i];
181
+ const path_messageList_item = path_messageList + '[' + i + ']';
182
+ const referencepath_messageList_itemValidationError = validate$5(obj_messageList_item, path_messageList_item);
183
+ if (referencepath_messageList_itemValidationError !== null) {
184
+ let message = 'Object doesn\'t match MessageRepresentation (at "' + path_messageList_item + '")\n';
185
+ message += referencepath_messageList_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
186
+ return new TypeError(message);
187
+ }
188
+ }
189
+ })();
190
+ return v_error === undefined ? null : v_error;
191
+ }
192
+ const select$7 = function MessageListRepresentationSelect() {
193
+ const { selections: MessageRepresentation__selections, opaque: MessageRepresentation__opaque, } = select$8();
194
+ return {
195
+ kind: 'Fragment',
196
+ version: VERSION$4,
197
+ private: [],
198
+ selections: [
199
+ {
200
+ name: 'messageList',
201
+ kind: 'Object',
202
+ plural: true,
203
+ selections: MessageRepresentation__selections
204
+ }
205
+ ]
206
+ };
207
+ };
208
+ function equals$4(existing, incoming) {
209
+ const existing_messageList = existing.messageList;
210
+ const incoming_messageList = incoming.messageList;
211
+ const equals_messageList_items = equalsArray(existing_messageList, incoming_messageList, (existing_messageList_item, incoming_messageList_item) => {
212
+ if (!(equals$5(existing_messageList_item, incoming_messageList_item))) {
213
+ return false;
214
+ }
215
+ });
216
+ if (equals_messageList_items === false) {
217
+ return false;
218
+ }
219
+ return true;
220
+ }
221
+
222
+ const VERSION$3 = "e807e4be6c8656a4a2761f06d272a041";
170
223
  function validate$3(obj, path = 'GuardrailDetailRepresentation') {
171
224
  const v_error = (() => {
172
225
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
173
226
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
174
227
  }
228
+ const obj_guardRailCurrentValue = obj.guardRailCurrentValue;
229
+ const path_guardRailCurrentValue = path + '.guardRailCurrentValue';
230
+ if (typeof obj_guardRailCurrentValue !== 'string') {
231
+ return new TypeError('Expected "string" but received "' + typeof obj_guardRailCurrentValue + '" (at "' + path_guardRailCurrentValue + '")');
232
+ }
175
233
  const obj_guardRailMaxValue = obj.guardRailMaxValue;
176
234
  const path_guardRailMaxValue = path + '.guardRailMaxValue';
177
235
  if (typeof obj_guardRailMaxValue !== 'string') {
@@ -192,37 +250,28 @@ function validate$3(obj, path = 'GuardrailDetailRepresentation') {
192
250
  if (typeof obj_guardRailRestrictionType !== 'string') {
193
251
  return new TypeError('Expected "string" but received "' + typeof obj_guardRailRestrictionType + '" (at "' + path_guardRailRestrictionType + '")');
194
252
  }
195
- const obj_message = obj.message;
196
- const path_message = path + '.message';
197
- const referencepath_messageValidationError = validate$4(obj_message, path_message);
198
- if (referencepath_messageValidationError !== null) {
199
- let message = 'Object doesn\'t match MessageRepresentation (at "' + path_message + '")\n';
200
- message += referencepath_messageValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
253
+ const obj_messages = obj.messages;
254
+ const path_messages = path + '.messages';
255
+ const referencepath_messagesValidationError = validate$4(obj_messages, path_messages);
256
+ if (referencepath_messagesValidationError !== null) {
257
+ let message = 'Object doesn\'t match MessageListRepresentation (at "' + path_messages + '")\n';
258
+ message += referencepath_messagesValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
201
259
  return new TypeError(message);
202
260
  }
203
261
  })();
204
262
  return v_error === undefined ? null : v_error;
205
263
  }
206
- const RepresentationType$3 = 'GuardrailDetailRepresentation';
207
- function keyBuilder$5(luvio, config) {
208
- return keyPrefix + '::' + RepresentationType$3 + ':' + config.guardRailName;
209
- }
210
- function keyBuilderFromType$1(luvio, object) {
211
- const keyParams = {
212
- guardRailName: object.guardRailName
213
- };
214
- return keyBuilder$5(luvio, keyParams);
215
- }
216
- function normalize$3(input, existing, path, luvio, store, timestamp) {
217
- return input;
218
- }
219
264
  const select$6 = function GuardrailDetailRepresentationSelect() {
220
- const { selections: MessageRepresentation__selections, opaque: MessageRepresentation__opaque, } = select$7();
265
+ const { selections: MessageListRepresentation__selections, opaque: MessageListRepresentation__opaque, } = select$7();
221
266
  return {
222
267
  kind: 'Fragment',
223
268
  version: VERSION$3,
224
269
  private: [],
225
270
  selections: [
271
+ {
272
+ name: 'guardRailCurrentValue',
273
+ kind: 'Scalar'
274
+ },
226
275
  {
227
276
  name: 'guardRailMaxValue',
228
277
  kind: 'Scalar'
@@ -240,14 +289,19 @@ const select$6 = function GuardrailDetailRepresentationSelect() {
240
289
  kind: 'Scalar'
241
290
  },
242
291
  {
243
- name: 'message',
292
+ name: 'messages',
244
293
  kind: 'Object',
245
- selections: MessageRepresentation__selections
294
+ selections: MessageListRepresentation__selections
246
295
  }
247
296
  ]
248
297
  };
249
298
  };
250
299
  function equals$3(existing, incoming) {
300
+ const existing_guardRailCurrentValue = existing.guardRailCurrentValue;
301
+ const incoming_guardRailCurrentValue = incoming.guardRailCurrentValue;
302
+ if (!(existing_guardRailCurrentValue === incoming_guardRailCurrentValue)) {
303
+ return false;
304
+ }
251
305
  const existing_guardRailMaxValue = existing.guardRailMaxValue;
252
306
  const incoming_guardRailMaxValue = incoming.guardRailMaxValue;
253
307
  if (!(existing_guardRailMaxValue === incoming_guardRailMaxValue)) {
@@ -268,37 +322,16 @@ function equals$3(existing, incoming) {
268
322
  if (!(existing_guardRailRestrictionType === incoming_guardRailRestrictionType)) {
269
323
  return false;
270
324
  }
271
- const existing_message = existing.message;
272
- const incoming_message = incoming.message;
273
- if (!(equals$4(existing_message, incoming_message))) {
325
+ const existing_messages = existing.messages;
326
+ const incoming_messages = incoming.messages;
327
+ if (!(equals$4(existing_messages, incoming_messages))) {
274
328
  return false;
275
329
  }
276
330
  return true;
277
331
  }
278
- const ingest$3 = function GuardrailDetailRepresentationIngest(input, path, luvio, store, timestamp) {
279
- if (process.env.NODE_ENV !== 'production') {
280
- const validateError = validate$3(input);
281
- if (validateError !== null) {
282
- throw validateError;
283
- }
284
- }
285
- const key = keyBuilderFromType$1(luvio, input);
286
- const ttlToUse = TTL$3;
287
- ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$3, "Guardrail", VERSION$3, RepresentationType$3, equals$3);
288
- return createLink(key);
289
- };
290
- function getTypeCacheKeys$3(rootKeySet, luvio, input, fullPathFactory) {
291
- // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
292
- const rootKey = keyBuilderFromType$1(luvio, input);
293
- rootKeySet.set(rootKey, {
294
- namespace: keyPrefix,
295
- representationName: RepresentationType$3,
296
- mergeable: false
297
- });
298
- }
299
332
 
300
- const TTL$2 = 60000;
301
- const VERSION$2 = "59c734462982ee5ac130c47f27d71244";
333
+ const TTL$2 = 360000;
334
+ const VERSION$2 = "39fbf551eef01712a8ab2bf485e2b8e1";
302
335
  function validate$2(obj, path = 'IndustriesGuardrailRepresentation') {
303
336
  const v_error = (() => {
304
337
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -306,29 +339,21 @@ function validate$2(obj, path = 'IndustriesGuardrailRepresentation') {
306
339
  }
307
340
  const obj_industriesGuardrail = obj.industriesGuardrail;
308
341
  const path_industriesGuardrail = path + '.industriesGuardrail';
309
- if (typeof obj_industriesGuardrail !== 'object') {
310
- return new TypeError('Expected "object" but received "' + typeof obj_industriesGuardrail + '" (at "' + path_industriesGuardrail + '")');
342
+ const referencepath_industriesGuardrailValidationError = validate$3(obj_industriesGuardrail, path_industriesGuardrail);
343
+ if (referencepath_industriesGuardrailValidationError !== null) {
344
+ let message = 'Object doesn\'t match GuardrailDetailRepresentation (at "' + path_industriesGuardrail + '")\n';
345
+ message += referencepath_industriesGuardrailValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
346
+ return new TypeError(message);
311
347
  }
312
348
  })();
313
349
  return v_error === undefined ? null : v_error;
314
350
  }
315
351
  const RepresentationType$2 = 'IndustriesGuardrailRepresentation';
316
352
  function normalize$2(input, existing, path, luvio, store, timestamp) {
317
- const input_industriesGuardrail = input.industriesGuardrail;
318
- const input_industriesGuardrail_id = path.fullPath + '__industriesGuardrail';
319
- input.industriesGuardrail = ingest$3(input_industriesGuardrail, {
320
- fullPath: input_industriesGuardrail_id,
321
- propertyName: 'industriesGuardrail',
322
- parent: {
323
- data: input,
324
- key: path.fullPath,
325
- existing: existing,
326
- },
327
- ttl: path.ttl
328
- }, luvio, store, timestamp);
329
353
  return input;
330
354
  }
331
355
  const select$5 = function IndustriesGuardrailRepresentationSelect() {
356
+ const { selections: GuardrailDetailRepresentation__selections, opaque: GuardrailDetailRepresentation__opaque, } = select$6();
332
357
  return {
333
358
  kind: 'Fragment',
334
359
  version: VERSION$2,
@@ -336,8 +361,8 @@ const select$5 = function IndustriesGuardrailRepresentationSelect() {
336
361
  selections: [
337
362
  {
338
363
  name: 'industriesGuardrail',
339
- kind: 'Link',
340
- fragment: select$6()
364
+ kind: 'Object',
365
+ selections: GuardrailDetailRepresentation__selections
341
366
  }
342
367
  ]
343
368
  };
@@ -345,7 +370,7 @@ const select$5 = function IndustriesGuardrailRepresentationSelect() {
345
370
  function equals$2(existing, incoming) {
346
371
  const existing_industriesGuardrail = existing.industriesGuardrail;
347
372
  const incoming_industriesGuardrail = incoming.industriesGuardrail;
348
- if (!(existing_industriesGuardrail.__ref === incoming_industriesGuardrail.__ref)) {
373
+ if (!(equals$3(existing_industriesGuardrail, incoming_industriesGuardrail))) {
349
374
  return false;
350
375
  }
351
376
  return true;
@@ -370,7 +395,6 @@ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
370
395
  representationName: RepresentationType$2,
371
396
  mergeable: false
372
397
  });
373
- getTypeCacheKeys$3(rootKeySet, luvio, input.industriesGuardrail);
374
398
  }
375
399
 
376
400
  function select$4(luvio, params) {
@@ -513,8 +537,8 @@ const getIndustriesGuardrailAdapterFactory = (luvio) => function Guardrail__getI
513
537
  buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
514
538
  };
515
539
 
516
- const TTL$1 = 60000;
517
- const VERSION$1 = "4a95ebefec5a82dc9ceb57f67d95359a";
540
+ const TTL$1 = 360000;
541
+ const VERSION$1 = "f4b13007f7482953a52db180f844af52";
518
542
  function validate$1(obj, path = 'IndustriesGuardrailListRepresentation') {
519
543
  const v_error = (() => {
520
544
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -528,8 +552,11 @@ function validate$1(obj, path = 'IndustriesGuardrailListRepresentation') {
528
552
  for (let i = 0; i < obj_industriesGuardrailList.length; i++) {
529
553
  const obj_industriesGuardrailList_item = obj_industriesGuardrailList[i];
530
554
  const path_industriesGuardrailList_item = path_industriesGuardrailList + '[' + i + ']';
531
- if (typeof obj_industriesGuardrailList_item !== 'object') {
532
- return new TypeError('Expected "object" but received "' + typeof obj_industriesGuardrailList_item + '" (at "' + path_industriesGuardrailList_item + '")');
555
+ const referencepath_industriesGuardrailList_itemValidationError = validate$3(obj_industriesGuardrailList_item, path_industriesGuardrailList_item);
556
+ if (referencepath_industriesGuardrailList_itemValidationError !== null) {
557
+ let message = 'Object doesn\'t match GuardrailDetailRepresentation (at "' + path_industriesGuardrailList_item + '")\n';
558
+ message += referencepath_industriesGuardrailList_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
559
+ return new TypeError(message);
533
560
  }
534
561
  }
535
562
  })();
@@ -537,25 +564,10 @@ function validate$1(obj, path = 'IndustriesGuardrailListRepresentation') {
537
564
  }
538
565
  const RepresentationType$1 = 'IndustriesGuardrailListRepresentation';
539
566
  function normalize$1(input, existing, path, luvio, store, timestamp) {
540
- const input_industriesGuardrailList = input.industriesGuardrailList;
541
- const input_industriesGuardrailList_id = path.fullPath + '__industriesGuardrailList';
542
- for (let i = 0; i < input_industriesGuardrailList.length; i++) {
543
- const input_industriesGuardrailList_item = input_industriesGuardrailList[i];
544
- let input_industriesGuardrailList_item_id = input_industriesGuardrailList_id + '__' + i;
545
- input_industriesGuardrailList[i] = ingest$3(input_industriesGuardrailList_item, {
546
- fullPath: input_industriesGuardrailList_item_id,
547
- propertyName: i,
548
- parent: {
549
- data: input,
550
- key: path.fullPath,
551
- existing: existing,
552
- },
553
- ttl: path.ttl
554
- }, luvio, store, timestamp);
555
- }
556
567
  return input;
557
568
  }
558
569
  const select$3 = function IndustriesGuardrailListRepresentationSelect() {
570
+ const { selections: GuardrailDetailRepresentation__selections, opaque: GuardrailDetailRepresentation__opaque, } = select$6();
559
571
  return {
560
572
  kind: 'Fragment',
561
573
  version: VERSION$1,
@@ -563,9 +575,9 @@ const select$3 = function IndustriesGuardrailListRepresentationSelect() {
563
575
  selections: [
564
576
  {
565
577
  name: 'industriesGuardrailList',
566
- kind: 'Link',
578
+ kind: 'Object',
567
579
  plural: true,
568
- fragment: select$6()
580
+ selections: GuardrailDetailRepresentation__selections
569
581
  }
570
582
  ]
571
583
  };
@@ -574,7 +586,7 @@ function equals$1(existing, incoming) {
574
586
  const existing_industriesGuardrailList = existing.industriesGuardrailList;
575
587
  const incoming_industriesGuardrailList = incoming.industriesGuardrailList;
576
588
  const equals_industriesGuardrailList_items = equalsArray(existing_industriesGuardrailList, incoming_industriesGuardrailList, (existing_industriesGuardrailList_item, incoming_industriesGuardrailList_item) => {
577
- if (!(existing_industriesGuardrailList_item.__ref === incoming_industriesGuardrailList_item.__ref)) {
589
+ if (!(equals$3(existing_industriesGuardrailList_item, incoming_industriesGuardrailList_item))) {
578
590
  return false;
579
591
  }
580
592
  });
@@ -603,10 +615,6 @@ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
603
615
  representationName: RepresentationType$1,
604
616
  mergeable: false
605
617
  });
606
- const input_industriesGuardrailList_length = input.industriesGuardrailList.length;
607
- for (let i = 0; i < input_industriesGuardrailList_length; i++) {
608
- getTypeCacheKeys$3(rootKeySet, luvio, input.industriesGuardrailList[i]);
609
- }
610
618
  }
611
619
 
612
620
  function select$2(luvio, params) {
@@ -748,7 +756,7 @@ const getIndustriesGuardrailsAdapterFactory = (luvio) => function Guardrail__get
748
756
  buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
749
757
  };
750
758
 
751
- const TTL = 60000;
759
+ const TTL = 360000;
752
760
  const VERSION = "5cfade0dbffa50ea18bd23547286f851";
753
761
  function validate(obj, path = 'ValidationMessageRepresentation') {
754
762
  const v_error = (() => {
@@ -763,7 +771,7 @@ function validate(obj, path = 'ValidationMessageRepresentation') {
763
771
  if (obj.message !== undefined) {
764
772
  const obj_message = obj.message;
765
773
  const path_message = path + '.message';
766
- const referencepath_messageValidationError = validate$4(obj_message, path_message);
774
+ const referencepath_messageValidationError = validate$5(obj_message, path_message);
767
775
  if (referencepath_messageValidationError !== null) {
768
776
  let message = 'Object doesn\'t match MessageRepresentation (at "' + path_message + '")\n';
769
777
  message += referencepath_messageValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
@@ -792,7 +800,7 @@ function normalize(input, existing, path, luvio, store, timestamp) {
792
800
  return input;
793
801
  }
794
802
  const select$1 = function ValidationMessageRepresentationSelect() {
795
- const { selections: MessageRepresentation__selections, opaque: MessageRepresentation__opaque, } = select$7();
803
+ const { selections: MessageRepresentation__selections, opaque: MessageRepresentation__opaque, } = select$8();
796
804
  return {
797
805
  kind: 'Fragment',
798
806
  version: VERSION,
@@ -835,7 +843,7 @@ function equals(existing, incoming) {
835
843
  if (existing_message === undefined || incoming_message === undefined) {
836
844
  return false;
837
845
  }
838
- if (!(equals$4(existing_message, incoming_message))) {
846
+ if (!(equals$5(existing_message, incoming_message))) {
839
847
  return false;
840
848
  }
841
849
  }
@@ -892,7 +900,7 @@ function createResourceRequest(config) {
892
900
  baseUri: '/services/data/v63.0',
893
901
  basePath: '/connect/industries/guardrail/validate',
894
902
  method: 'post',
895
- body: null,
903
+ body: config.body,
896
904
  urlParams: {},
897
905
  queryParams: {},
898
906
  headers,
@@ -901,11 +909,17 @@ function createResourceRequest(config) {
901
909
  }
902
910
 
903
911
  const adapterName = 'postValidateGuardrail';
904
- const postValidateGuardrail_ConfigPropertyMetadata = [];
912
+ const postValidateGuardrail_ConfigPropertyMetadata = [
913
+ generateParamConfigMetadata('component', true, 2 /* Body */, 0 /* String */),
914
+ generateParamConfigMetadata('guardrailName', true, 2 /* Body */, 0 /* String */),
915
+ generateParamConfigMetadata('guardrailValue', true, 2 /* Body */, 0 /* String */),
916
+ generateParamConfigMetadata('product', true, 2 /* Body */, 0 /* String */),
917
+ ];
905
918
  const postValidateGuardrail_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, postValidateGuardrail_ConfigPropertyMetadata);
906
919
  const createResourceParams = /*#__PURE__*/ createResourceParams$3(postValidateGuardrail_ConfigPropertyMetadata);
907
920
  function typeCheckConfig(untrustedConfig) {
908
921
  const config = {};
922
+ typeCheckConfig$3(untrustedConfig, config, postValidateGuardrail_ConfigPropertyMetadata);
909
923
  return config;
910
924
  }
911
925
  function validateAdapterConfig(untrustedConfig, configPropertyNames) {
@@ -915,7 +929,7 @@ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
915
929
  if (process.env.NODE_ENV !== 'production') {
916
930
  validateConfig(untrustedConfig, configPropertyNames);
917
931
  }
918
- const config = typeCheckConfig();
932
+ const config = typeCheckConfig(untrustedConfig);
919
933
  if (!areRequiredParametersPresent(config, configPropertyNames)) {
920
934
  return null;
921
935
  }
@@ -923,7 +937,7 @@ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
923
937
  }
924
938
  function buildNetworkSnapshot(luvio, config, options) {
925
939
  const resourceParams = createResourceParams(config);
926
- const request = createResourceRequest();
940
+ const request = createResourceRequest(resourceParams);
927
941
  return luvio.dispatchResourceRequest(request, options)
928
942
  .then((response) => {
929
943
  return luvio.handleSuccessResponse(() => {
@@ -960,12 +974,12 @@ let getIndustriesGuardrails_imperative;
960
974
  const getIndustriesGuardrailMetadata = {
961
975
  apiFamily: 'Guardrail',
962
976
  name: 'getIndustriesGuardrail',
963
- ttl: 60000,
977
+ ttl: 360000,
964
978
  };
965
979
  const getIndustriesGuardrailsMetadata = {
966
980
  apiFamily: 'Guardrail',
967
981
  name: 'getIndustriesGuardrails',
968
- ttl: 60000,
982
+ ttl: 360000,
969
983
  };
970
984
  // Notify Update Available
971
985
  function bindExportsTo(luvio) {
@@ -997,4 +1011,4 @@ withDefaultLuvio((luvio) => {
997
1011
  });
998
1012
 
999
1013
  export { getIndustriesGuardrail, getIndustriesGuardrail_imperative, getIndustriesGuardrails, getIndustriesGuardrails_imperative, postValidateGuardrail };
1000
- // version: 1.322.0-87f682c9f3
1014
+ // version: 1.324.0-f16f2a27c7
package/src/raml/api.raml CHANGED
@@ -29,6 +29,9 @@ types:
29
29
  description: Detail of the Guardrail such as Name, Min and Max value
30
30
  type: object
31
31
  properties:
32
+ guardRailCurrentValue:
33
+ description: Current Value of the Guardrail.
34
+ type: string
32
35
  guardRailMaxValue:
33
36
  description: Max Value of the Guardrail
34
37
  type: string
@@ -41,10 +44,9 @@ types:
41
44
  guardRailRestrictionType:
42
45
  description: Whether Guardrail type is soft or hard.
43
46
  type: string
44
- message:
45
- description: The exception message that will be thrown at the time of guardrail
46
- violation.
47
- type: MessageRepresentation
47
+ messages:
48
+ description: The list exception messages for a guardrail.
49
+ type: MessageListRepresentation
48
50
  IndustriesGuardrailInputRepresentation:
49
51
  description: Input for Guardrail Validation
50
52
  type: object
@@ -78,6 +80,15 @@ types:
78
80
  industriesGuardrail:
79
81
  description: The detail of a Guardrail.
80
82
  type: GuardrailDetailRepresentation
83
+ MessageListRepresentation:
84
+ description: List of all Guardrail Messages
85
+ type: object
86
+ properties:
87
+ messageList:
88
+ description: A list of MessageRepresentation
89
+ type: array
90
+ items:
91
+ type: MessageRepresentation
81
92
  MessageRepresentation:
82
93
  description: During validation, the message is communicated to the user
83
94
  type: object
@@ -136,6 +147,10 @@ types:
136
147
  body:
137
148
  application/json:
138
149
  type: ValidationMessageRepresentation
150
+ body:
151
+ application/json:
152
+ type: IndustriesGuardrailInputRepresentation
153
+ (oas-body-name): industriesGuardrailDef
139
154
  /guardrails:
140
155
  get:
141
156
  displayName: getIndustriesGuardrails
@@ -8,24 +8,25 @@ uses:
8
8
 
9
9
  types:
10
10
  GuardrailDetailRepresentation:
11
- (luvio.ttl): 60000
12
- (luvio.key):
13
- guardRailName: guardRailName
11
+ (luvio.ttl): 360000
14
12
 
15
13
  IndustriesGuardrailInputRepresentation:
16
- (luvio.ttl): 60000
14
+ (luvio.ttl): 360000
17
15
 
18
16
  IndustriesGuardrailRepresentation:
19
- (luvio.ttl): 60000
17
+ (luvio.ttl): 360000
20
18
 
21
19
  IndustriesGuardrailListRepresentation:
22
- (luvio.ttl): 60000
20
+ (luvio.ttl): 360000
21
+
22
+ MessageListRepresentation:
23
+ (luvio.ttl): 360000
23
24
 
24
25
  MessageRepresentation:
25
- (luvio.ttl): 60000
26
+ (luvio.ttl): 360000
26
27
 
27
28
  ValidationMessageRepresentation:
28
- (luvio.ttl): 60000
29
+ (luvio.ttl): 360000
29
30
  (luvio.key):
30
31
  guardrailValue: guardrailValue
31
32