@salesforce/lds-adapters-industries-featurevalidation 1.282.0 → 1.284.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.
@@ -84,7 +84,7 @@ function createLink(ref) {
84
84
  };
85
85
  }
86
86
 
87
- function validate$3(obj, path = 'FeatureValidationInputRepresentation') {
87
+ function validate$4(obj, path = 'FeatureValidationInputRepresentation') {
88
88
  const v_error = (() => {
89
89
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
90
90
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -110,7 +110,85 @@ function validate$3(obj, path = 'FeatureValidationInputRepresentation') {
110
110
  return v_error === undefined ? null : v_error;
111
111
  }
112
112
 
113
- const VERSION$2 = "631aec0cb3216fffb314c3734733f29b";
113
+ const VERSION$3 = "0d47ccdcf5db6f8d66e7eef5eecfea77";
114
+ function validate$3(obj, path = 'FeatureValidationAccessInfoRepresentation') {
115
+ const v_error = (() => {
116
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
117
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
118
+ }
119
+ const obj_accessLevel = obj.accessLevel;
120
+ const path_accessLevel = path + '.accessLevel';
121
+ if (typeof obj_accessLevel !== 'string') {
122
+ return new TypeError('Expected "string" but received "' + typeof obj_accessLevel + '" (at "' + path_accessLevel + '")');
123
+ }
124
+ const obj_apiName = obj.apiName;
125
+ const path_apiName = path + '.apiName';
126
+ if (typeof obj_apiName !== 'string') {
127
+ return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
128
+ }
129
+ const obj_hasAccess = obj.hasAccess;
130
+ const path_hasAccess = path + '.hasAccess';
131
+ if (typeof obj_hasAccess !== 'boolean') {
132
+ return new TypeError('Expected "boolean" but received "' + typeof obj_hasAccess + '" (at "' + path_hasAccess + '")');
133
+ }
134
+ const obj_type = obj.type;
135
+ const path_type = path + '.type';
136
+ if (typeof obj_type !== 'string') {
137
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
138
+ }
139
+ })();
140
+ return v_error === undefined ? null : v_error;
141
+ }
142
+ const select$4 = function FeatureValidationAccessInfoRepresentationSelect() {
143
+ return {
144
+ kind: 'Fragment',
145
+ version: VERSION$3,
146
+ private: [],
147
+ selections: [
148
+ {
149
+ name: 'accessLevel',
150
+ kind: 'Scalar'
151
+ },
152
+ {
153
+ name: 'apiName',
154
+ kind: 'Scalar'
155
+ },
156
+ {
157
+ name: 'hasAccess',
158
+ kind: 'Scalar'
159
+ },
160
+ {
161
+ name: 'type',
162
+ kind: 'Scalar'
163
+ }
164
+ ]
165
+ };
166
+ };
167
+ function equals$3(existing, incoming) {
168
+ const existing_hasAccess = existing.hasAccess;
169
+ const incoming_hasAccess = incoming.hasAccess;
170
+ if (!(existing_hasAccess === incoming_hasAccess)) {
171
+ return false;
172
+ }
173
+ const existing_accessLevel = existing.accessLevel;
174
+ const incoming_accessLevel = incoming.accessLevel;
175
+ if (!(existing_accessLevel === incoming_accessLevel)) {
176
+ return false;
177
+ }
178
+ const existing_apiName = existing.apiName;
179
+ const incoming_apiName = incoming.apiName;
180
+ if (!(existing_apiName === incoming_apiName)) {
181
+ return false;
182
+ }
183
+ const existing_type = existing.type;
184
+ const incoming_type = incoming.type;
185
+ if (!(existing_type === incoming_type)) {
186
+ return false;
187
+ }
188
+ return true;
189
+ }
190
+
191
+ const VERSION$2 = "8b64929ba3ec78671e1ff0f37e0e40bf";
114
192
  function validate$2(obj, path = 'FeatureValidationFieldValuesRepresentation') {
115
193
  const v_error = (() => {
116
194
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -131,6 +209,11 @@ function validate$2(obj, path = 'FeatureValidationFieldValuesRepresentation') {
131
209
  if (typeof obj_message !== 'string') {
132
210
  return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
133
211
  }
212
+ const obj_messageType = obj.messageType;
213
+ const path_messageType = path + '.messageType';
214
+ if (typeof obj_messageType !== 'string') {
215
+ return new TypeError('Expected "string" but received "' + typeof obj_messageType + '" (at "' + path_messageType + '")');
216
+ }
134
217
  const obj_required = obj.required;
135
218
  const path_required = path + '.required';
136
219
  if (typeof obj_required !== 'boolean') {
@@ -157,6 +240,10 @@ const select$3 = function FeatureValidationFieldValuesRepresentationSelect() {
157
240
  name: 'message',
158
241
  kind: 'Scalar'
159
242
  },
243
+ {
244
+ name: 'messageType',
245
+ kind: 'Scalar'
246
+ },
160
247
  {
161
248
  name: 'required',
162
249
  kind: 'Scalar'
@@ -185,10 +272,15 @@ function equals$2(existing, incoming) {
185
272
  if (!(existing_message === incoming_message)) {
186
273
  return false;
187
274
  }
275
+ const existing_messageType = existing.messageType;
276
+ const incoming_messageType = incoming.messageType;
277
+ if (!(existing_messageType === incoming_messageType)) {
278
+ return false;
279
+ }
188
280
  return true;
189
281
  }
190
282
 
191
- const VERSION$1 = "b2421cf8b77991983bf69e64a9fa0236";
283
+ const VERSION$1 = "a1bf162cf98bc525d53bc137d27b2086";
192
284
  function validate$1(obj, path = 'FeatureValidationOutputDetailsRepresentation') {
193
285
  const v_error = (() => {
194
286
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -204,6 +296,21 @@ function validate$1(obj, path = 'FeatureValidationOutputDetailsRepresentation')
204
296
  if (typeof obj_bpoRecordId !== 'string') {
205
297
  return new TypeError('Expected "string" but received "' + typeof obj_bpoRecordId + '" (at "' + path_bpoRecordId + '")');
206
298
  }
299
+ const obj_featureValidationAccessInfo = obj.featureValidationAccessInfo;
300
+ const path_featureValidationAccessInfo = path + '.featureValidationAccessInfo';
301
+ if (!ArrayIsArray(obj_featureValidationAccessInfo)) {
302
+ return new TypeError('Expected "array" but received "' + typeof obj_featureValidationAccessInfo + '" (at "' + path_featureValidationAccessInfo + '")');
303
+ }
304
+ for (let i = 0; i < obj_featureValidationAccessInfo.length; i++) {
305
+ const obj_featureValidationAccessInfo_item = obj_featureValidationAccessInfo[i];
306
+ const path_featureValidationAccessInfo_item = path_featureValidationAccessInfo + '[' + i + ']';
307
+ const referencepath_featureValidationAccessInfo_itemValidationError = validate$3(obj_featureValidationAccessInfo_item, path_featureValidationAccessInfo_item);
308
+ if (referencepath_featureValidationAccessInfo_itemValidationError !== null) {
309
+ let message = 'Object doesn\'t match FeatureValidationAccessInfoRepresentation (at "' + path_featureValidationAccessInfo_item + '")\n';
310
+ message += referencepath_featureValidationAccessInfo_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
311
+ return new TypeError(message);
312
+ }
313
+ }
207
314
  const obj_featureValidationFieldValues = obj.featureValidationFieldValues;
208
315
  const path_featureValidationFieldValues = path + '.featureValidationFieldValues';
209
316
  if (!ArrayIsArray(obj_featureValidationFieldValues)) {
@@ -224,10 +331,16 @@ function validate$1(obj, path = 'FeatureValidationOutputDetailsRepresentation')
224
331
  if (typeof obj_message !== 'string') {
225
332
  return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
226
333
  }
334
+ const obj_messageType = obj.messageType;
335
+ const path_messageType = path + '.messageType';
336
+ if (typeof obj_messageType !== 'string') {
337
+ return new TypeError('Expected "string" but received "' + typeof obj_messageType + '" (at "' + path_messageType + '")');
338
+ }
227
339
  })();
228
340
  return v_error === undefined ? null : v_error;
229
341
  }
230
342
  const select$2 = function FeatureValidationOutputDetailsRepresentationSelect() {
343
+ const { selections: FeatureValidationAccessInfoRepresentation__selections, opaque: FeatureValidationAccessInfoRepresentation__opaque, } = select$4();
231
344
  const { selections: FeatureValidationFieldValuesRepresentation__selections, opaque: FeatureValidationFieldValuesRepresentation__opaque, } = select$3();
232
345
  return {
233
346
  kind: 'Fragment',
@@ -242,6 +355,12 @@ const select$2 = function FeatureValidationOutputDetailsRepresentationSelect() {
242
355
  name: 'bpoRecordId',
243
356
  kind: 'Scalar'
244
357
  },
358
+ {
359
+ name: 'featureValidationAccessInfo',
360
+ kind: 'Object',
361
+ plural: true,
362
+ selections: FeatureValidationAccessInfoRepresentation__selections
363
+ },
245
364
  {
246
365
  name: 'featureValidationFieldValues',
247
366
  kind: 'Object',
@@ -251,6 +370,10 @@ const select$2 = function FeatureValidationOutputDetailsRepresentationSelect() {
251
370
  {
252
371
  name: 'message',
253
372
  kind: 'Scalar'
373
+ },
374
+ {
375
+ name: 'messageType',
376
+ kind: 'Scalar'
254
377
  }
255
378
  ]
256
379
  };
@@ -271,6 +394,21 @@ function equals$1(existing, incoming) {
271
394
  if (!(existing_message === incoming_message)) {
272
395
  return false;
273
396
  }
397
+ const existing_messageType = existing.messageType;
398
+ const incoming_messageType = incoming.messageType;
399
+ if (!(existing_messageType === incoming_messageType)) {
400
+ return false;
401
+ }
402
+ const existing_featureValidationAccessInfo = existing.featureValidationAccessInfo;
403
+ const incoming_featureValidationAccessInfo = incoming.featureValidationAccessInfo;
404
+ const equals_featureValidationAccessInfo_items = equalsArray(existing_featureValidationAccessInfo, incoming_featureValidationAccessInfo, (existing_featureValidationAccessInfo_item, incoming_featureValidationAccessInfo_item) => {
405
+ if (!(equals$3(existing_featureValidationAccessInfo_item, incoming_featureValidationAccessInfo_item))) {
406
+ return false;
407
+ }
408
+ });
409
+ if (equals_featureValidationAccessInfo_items === false) {
410
+ return false;
411
+ }
274
412
  const existing_featureValidationFieldValues = existing.featureValidationFieldValues;
275
413
  const incoming_featureValidationFieldValues = incoming.featureValidationFieldValues;
276
414
  const equals_featureValidationFieldValues_items = equalsArray(existing_featureValidationFieldValues, incoming_featureValidationFieldValues, (existing_featureValidationFieldValues_item, incoming_featureValidationFieldValues_item) => {
@@ -458,7 +596,7 @@ const createResourceParams = /*#__PURE__*/ createResourceParams$1(featureValidat
458
596
  function typeCheckConfig(untrustedConfig) {
459
597
  const config = {};
460
598
  const untrustedConfig_FeatureValidationData = untrustedConfig.FeatureValidationData;
461
- const referenceFeatureValidationInputRepresentationValidationError = validate$3(untrustedConfig_FeatureValidationData);
599
+ const referenceFeatureValidationInputRepresentationValidationError = validate$4(untrustedConfig_FeatureValidationData);
462
600
  if (referenceFeatureValidationInputRepresentationValidationError === null) {
463
601
  config.FeatureValidationData = untrustedConfig_FeatureValidationData;
464
602
  }
@@ -0,0 +1,37 @@
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 VERSION = "0d47ccdcf5db6f8d66e7eef5eecfea77";
3
+ export declare function validate(obj: any, path?: string): TypeError | null;
4
+ export declare const RepresentationType: string;
5
+ export declare function normalize(input: FeatureValidationAccessInfoRepresentation, existing: FeatureValidationAccessInfoRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FeatureValidationAccessInfoRepresentationNormalized;
6
+ export declare const select: () => $64$luvio_engine_FragmentSelection;
7
+ export declare function equals(existing: FeatureValidationAccessInfoRepresentationNormalized, incoming: FeatureValidationAccessInfoRepresentationNormalized): boolean;
8
+ export declare const ingest: $64$luvio_engine_ResourceIngest;
9
+ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: FeatureValidationAccessInfoRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
10
+ /**
11
+ * Represents the access info of entities and fields
12
+ *
13
+ * Keys:
14
+ * (none)
15
+ */
16
+ export interface FeatureValidationAccessInfoRepresentationNormalized {
17
+ /** the level of access that needs to be validated */
18
+ accessLevel: string;
19
+ /** api name of the entity or field */
20
+ apiName: string;
21
+ /** validates the access level of the entity or field */
22
+ hasAccess: boolean;
23
+ /** specifies if the given name is an entity or a field */
24
+ type: string;
25
+ }
26
+ /**
27
+ * Represents the access info of entities and fields
28
+ *
29
+ * Keys:
30
+ * (none)
31
+ */
32
+ export interface FeatureValidationAccessInfoRepresentation {
33
+ accessLevel: string;
34
+ apiName: string;
35
+ hasAccess: boolean;
36
+ type: string;
37
+ }
@@ -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 VERSION = "631aec0cb3216fffb314c3734733f29b";
2
+ export declare const VERSION = "8b64929ba3ec78671e1ff0f37e0e40bf";
3
3
  export declare function validate(obj: any, path?: string): TypeError | null;
4
4
  export declare const RepresentationType: string;
5
5
  export declare function normalize(input: FeatureValidationFieldValuesRepresentation, existing: FeatureValidationFieldValuesRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FeatureValidationFieldValuesRepresentationNormalized;
@@ -20,6 +20,8 @@ export interface FeatureValidationFieldValuesRepresentationNormalized {
20
20
  fieldValue: string;
21
21
  /** Message related to the field. Example: Missing fls permissions. */
22
22
  message: string;
23
+ /** Describes the type of the message. Example: Error, Warning or Info. */
24
+ messageType: string;
23
25
  /** true if field is required. false otherwise. */
24
26
  required: boolean;
25
27
  }
@@ -33,5 +35,6 @@ export interface FeatureValidationFieldValuesRepresentation {
33
35
  fieldName: string;
34
36
  fieldValue: string;
35
37
  message: string;
38
+ messageType: string;
36
39
  required: boolean;
37
40
  }
@@ -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 VERSION = "c44e6bb91e9174cdf2f457aab34ebcf4";
2
+ export declare const VERSION = "60c73c655b3937ef7bd48858b4f78f29";
3
3
  export declare function validate(obj: any, path?: string): TypeError | null;
4
4
  export declare const RepresentationType: string;
5
5
  export declare function normalize(input: FeatureValidationInputDetailsRepresentation, existing: FeatureValidationInputDetailsRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FeatureValidationInputDetailsRepresentationNormalized;
@@ -19,6 +19,8 @@ export interface FeatureValidationInputDetailsRepresentationNormalized {
19
19
  bpoRecordId: string;
20
20
  /** How record is used in the feature. Example value: Patient. Note: Account is a bpo name but Patient is a business usage of the patient's account */
21
21
  recordUsage: string;
22
+ /** used for access checks, determines the scenario or the flow for the given feature */
23
+ scenarioName: string;
22
24
  }
23
25
  /**
24
26
  * Holds BPO recordUsage and bpo recordId. example: {"recordUsage": "Facility",
@@ -30,4 +32,5 @@ export interface FeatureValidationInputDetailsRepresentationNormalized {
30
32
  export interface FeatureValidationInputDetailsRepresentation {
31
33
  bpoRecordId: string;
32
34
  recordUsage: string;
35
+ scenarioName: string;
33
36
  }
@@ -16,7 +16,7 @@ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableSto
16
16
  export interface FeatureValidationInputRepresentationNormalized {
17
17
  /** Holds record usage and bpo recordId. */
18
18
  featureValidationInputDetails: Array<{}>;
19
- /** Use-case to validate the data. HealthCloudIAM needs user to pass on practitioner id, facility id, patient id, and worktype id in featureValidationInputDetails. */
19
+ /** Use-case to validate the data. Example: HealthCloudIAM needs user to pass on practitioner id, facility id, patient id, and worktype id in featureValidationInputDetails. */
20
20
  useCase: string;
21
21
  }
22
22
  /**
@@ -1,6 +1,7 @@
1
+ import { FeatureValidationAccessInfoRepresentation as FeatureValidationAccessInfoRepresentation_FeatureValidationAccessInfoRepresentation } from './FeatureValidationAccessInfoRepresentation';
1
2
  import { FeatureValidationFieldValuesRepresentation as FeatureValidationFieldValuesRepresentation_FeatureValidationFieldValuesRepresentation } from './FeatureValidationFieldValuesRepresentation';
2
3
  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 VERSION = "b2421cf8b77991983bf69e64a9fa0236";
4
+ export declare const VERSION = "a1bf162cf98bc525d53bc137d27b2086";
4
5
  export declare function validate(obj: any, path?: string): TypeError | null;
5
6
  export declare const RepresentationType: string;
6
7
  export declare function normalize(input: FeatureValidationOutputDetailsRepresentation, existing: FeatureValidationOutputDetailsRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): FeatureValidationOutputDetailsRepresentationNormalized;
@@ -19,10 +20,14 @@ export interface FeatureValidationOutputDetailsRepresentationNormalized {
19
20
  bpoName: string;
20
21
  /** BPO record id */
21
22
  bpoRecordId: string;
23
+ /** Access check results for the fields/entities */
24
+ featureValidationAccessInfo: Array<FeatureValidationAccessInfoRepresentation_FeatureValidationAccessInfoRepresentation>;
22
25
  /** Select fields that were validated as part of use-case implementation. */
23
26
  featureValidationFieldValues: Array<FeatureValidationFieldValuesRepresentation_FeatureValidationFieldValuesRepresentation>;
24
27
  /** Message related to the bpo. Example: Invalid record Id. */
25
28
  message: string;
29
+ /** Describes the type of the message. Example: Error, Warning or Info. */
30
+ messageType: string;
26
31
  }
27
32
  /**
28
33
  * Holds BPO name, bpoRecordId, select fields from the bpo and related error message.
@@ -33,6 +38,8 @@ export interface FeatureValidationOutputDetailsRepresentationNormalized {
33
38
  export interface FeatureValidationOutputDetailsRepresentation {
34
39
  bpoName: string;
35
40
  bpoRecordId: string;
41
+ featureValidationAccessInfo: Array<FeatureValidationAccessInfoRepresentation_FeatureValidationAccessInfoRepresentation>;
36
42
  featureValidationFieldValues: Array<FeatureValidationFieldValuesRepresentation_FeatureValidationFieldValuesRepresentation>;
37
43
  message: string;
44
+ messageType: string;
38
45
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-industries-featurevalidation",
3
- "version": "1.282.0",
3
+ "version": "1.284.0",
4
4
  "description": "Feature validation tool to debug setup issues.",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "dist/umd/es2018/industries-featurevalidation.js",
@@ -43,11 +43,11 @@
43
43
  "test": "nx build:karma && karma start --single-run"
44
44
  },
45
45
  "dependencies": {
46
- "@salesforce/lds-bindings": "^1.282.0"
46
+ "@salesforce/lds-bindings": "^1.284.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@salesforce/lds-compiler-plugins": "^1.282.0",
50
- "@salesforce/lds-karma": "^1.282.0"
49
+ "@salesforce/lds-compiler-plugins": "^1.284.0",
50
+ "@salesforce/lds-karma": "^1.284.0"
51
51
  },
52
52
  "nx": {
53
53
  "targets": {
package/sfdc/index.js CHANGED
@@ -93,7 +93,7 @@ function createLink(ref) {
93
93
  };
94
94
  }
95
95
 
96
- function validate$3(obj, path = 'FeatureValidationInputRepresentation') {
96
+ function validate$4(obj, path = 'FeatureValidationInputRepresentation') {
97
97
  const v_error = (() => {
98
98
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
99
99
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
@@ -119,7 +119,85 @@ function validate$3(obj, path = 'FeatureValidationInputRepresentation') {
119
119
  return v_error === undefined ? null : v_error;
120
120
  }
121
121
 
122
- const VERSION$2 = "631aec0cb3216fffb314c3734733f29b";
122
+ const VERSION$3 = "0d47ccdcf5db6f8d66e7eef5eecfea77";
123
+ function validate$3(obj, path = 'FeatureValidationAccessInfoRepresentation') {
124
+ const v_error = (() => {
125
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
126
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
127
+ }
128
+ const obj_accessLevel = obj.accessLevel;
129
+ const path_accessLevel = path + '.accessLevel';
130
+ if (typeof obj_accessLevel !== 'string') {
131
+ return new TypeError('Expected "string" but received "' + typeof obj_accessLevel + '" (at "' + path_accessLevel + '")');
132
+ }
133
+ const obj_apiName = obj.apiName;
134
+ const path_apiName = path + '.apiName';
135
+ if (typeof obj_apiName !== 'string') {
136
+ return new TypeError('Expected "string" but received "' + typeof obj_apiName + '" (at "' + path_apiName + '")');
137
+ }
138
+ const obj_hasAccess = obj.hasAccess;
139
+ const path_hasAccess = path + '.hasAccess';
140
+ if (typeof obj_hasAccess !== 'boolean') {
141
+ return new TypeError('Expected "boolean" but received "' + typeof obj_hasAccess + '" (at "' + path_hasAccess + '")');
142
+ }
143
+ const obj_type = obj.type;
144
+ const path_type = path + '.type';
145
+ if (typeof obj_type !== 'string') {
146
+ return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
147
+ }
148
+ })();
149
+ return v_error === undefined ? null : v_error;
150
+ }
151
+ const select$4 = function FeatureValidationAccessInfoRepresentationSelect() {
152
+ return {
153
+ kind: 'Fragment',
154
+ version: VERSION$3,
155
+ private: [],
156
+ selections: [
157
+ {
158
+ name: 'accessLevel',
159
+ kind: 'Scalar'
160
+ },
161
+ {
162
+ name: 'apiName',
163
+ kind: 'Scalar'
164
+ },
165
+ {
166
+ name: 'hasAccess',
167
+ kind: 'Scalar'
168
+ },
169
+ {
170
+ name: 'type',
171
+ kind: 'Scalar'
172
+ }
173
+ ]
174
+ };
175
+ };
176
+ function equals$3(existing, incoming) {
177
+ const existing_hasAccess = existing.hasAccess;
178
+ const incoming_hasAccess = incoming.hasAccess;
179
+ if (!(existing_hasAccess === incoming_hasAccess)) {
180
+ return false;
181
+ }
182
+ const existing_accessLevel = existing.accessLevel;
183
+ const incoming_accessLevel = incoming.accessLevel;
184
+ if (!(existing_accessLevel === incoming_accessLevel)) {
185
+ return false;
186
+ }
187
+ const existing_apiName = existing.apiName;
188
+ const incoming_apiName = incoming.apiName;
189
+ if (!(existing_apiName === incoming_apiName)) {
190
+ return false;
191
+ }
192
+ const existing_type = existing.type;
193
+ const incoming_type = incoming.type;
194
+ if (!(existing_type === incoming_type)) {
195
+ return false;
196
+ }
197
+ return true;
198
+ }
199
+
200
+ const VERSION$2 = "8b64929ba3ec78671e1ff0f37e0e40bf";
123
201
  function validate$2(obj, path = 'FeatureValidationFieldValuesRepresentation') {
124
202
  const v_error = (() => {
125
203
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -140,6 +218,11 @@ function validate$2(obj, path = 'FeatureValidationFieldValuesRepresentation') {
140
218
  if (typeof obj_message !== 'string') {
141
219
  return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
142
220
  }
221
+ const obj_messageType = obj.messageType;
222
+ const path_messageType = path + '.messageType';
223
+ if (typeof obj_messageType !== 'string') {
224
+ return new TypeError('Expected "string" but received "' + typeof obj_messageType + '" (at "' + path_messageType + '")');
225
+ }
143
226
  const obj_required = obj.required;
144
227
  const path_required = path + '.required';
145
228
  if (typeof obj_required !== 'boolean') {
@@ -166,6 +249,10 @@ const select$3 = function FeatureValidationFieldValuesRepresentationSelect() {
166
249
  name: 'message',
167
250
  kind: 'Scalar'
168
251
  },
252
+ {
253
+ name: 'messageType',
254
+ kind: 'Scalar'
255
+ },
169
256
  {
170
257
  name: 'required',
171
258
  kind: 'Scalar'
@@ -194,10 +281,15 @@ function equals$2(existing, incoming) {
194
281
  if (!(existing_message === incoming_message)) {
195
282
  return false;
196
283
  }
284
+ const existing_messageType = existing.messageType;
285
+ const incoming_messageType = incoming.messageType;
286
+ if (!(existing_messageType === incoming_messageType)) {
287
+ return false;
288
+ }
197
289
  return true;
198
290
  }
199
291
 
200
- const VERSION$1 = "b2421cf8b77991983bf69e64a9fa0236";
292
+ const VERSION$1 = "a1bf162cf98bc525d53bc137d27b2086";
201
293
  function validate$1(obj, path = 'FeatureValidationOutputDetailsRepresentation') {
202
294
  const v_error = (() => {
203
295
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -213,6 +305,21 @@ function validate$1(obj, path = 'FeatureValidationOutputDetailsRepresentation')
213
305
  if (typeof obj_bpoRecordId !== 'string') {
214
306
  return new TypeError('Expected "string" but received "' + typeof obj_bpoRecordId + '" (at "' + path_bpoRecordId + '")');
215
307
  }
308
+ const obj_featureValidationAccessInfo = obj.featureValidationAccessInfo;
309
+ const path_featureValidationAccessInfo = path + '.featureValidationAccessInfo';
310
+ if (!ArrayIsArray(obj_featureValidationAccessInfo)) {
311
+ return new TypeError('Expected "array" but received "' + typeof obj_featureValidationAccessInfo + '" (at "' + path_featureValidationAccessInfo + '")');
312
+ }
313
+ for (let i = 0; i < obj_featureValidationAccessInfo.length; i++) {
314
+ const obj_featureValidationAccessInfo_item = obj_featureValidationAccessInfo[i];
315
+ const path_featureValidationAccessInfo_item = path_featureValidationAccessInfo + '[' + i + ']';
316
+ const referencepath_featureValidationAccessInfo_itemValidationError = validate$3(obj_featureValidationAccessInfo_item, path_featureValidationAccessInfo_item);
317
+ if (referencepath_featureValidationAccessInfo_itemValidationError !== null) {
318
+ let message = 'Object doesn\'t match FeatureValidationAccessInfoRepresentation (at "' + path_featureValidationAccessInfo_item + '")\n';
319
+ message += referencepath_featureValidationAccessInfo_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
320
+ return new TypeError(message);
321
+ }
322
+ }
216
323
  const obj_featureValidationFieldValues = obj.featureValidationFieldValues;
217
324
  const path_featureValidationFieldValues = path + '.featureValidationFieldValues';
218
325
  if (!ArrayIsArray(obj_featureValidationFieldValues)) {
@@ -233,10 +340,16 @@ function validate$1(obj, path = 'FeatureValidationOutputDetailsRepresentation')
233
340
  if (typeof obj_message !== 'string') {
234
341
  return new TypeError('Expected "string" but received "' + typeof obj_message + '" (at "' + path_message + '")');
235
342
  }
343
+ const obj_messageType = obj.messageType;
344
+ const path_messageType = path + '.messageType';
345
+ if (typeof obj_messageType !== 'string') {
346
+ return new TypeError('Expected "string" but received "' + typeof obj_messageType + '" (at "' + path_messageType + '")');
347
+ }
236
348
  })();
237
349
  return v_error === undefined ? null : v_error;
238
350
  }
239
351
  const select$2 = function FeatureValidationOutputDetailsRepresentationSelect() {
352
+ const { selections: FeatureValidationAccessInfoRepresentation__selections, opaque: FeatureValidationAccessInfoRepresentation__opaque, } = select$4();
240
353
  const { selections: FeatureValidationFieldValuesRepresentation__selections, opaque: FeatureValidationFieldValuesRepresentation__opaque, } = select$3();
241
354
  return {
242
355
  kind: 'Fragment',
@@ -251,6 +364,12 @@ const select$2 = function FeatureValidationOutputDetailsRepresentationSelect() {
251
364
  name: 'bpoRecordId',
252
365
  kind: 'Scalar'
253
366
  },
367
+ {
368
+ name: 'featureValidationAccessInfo',
369
+ kind: 'Object',
370
+ plural: true,
371
+ selections: FeatureValidationAccessInfoRepresentation__selections
372
+ },
254
373
  {
255
374
  name: 'featureValidationFieldValues',
256
375
  kind: 'Object',
@@ -260,6 +379,10 @@ const select$2 = function FeatureValidationOutputDetailsRepresentationSelect() {
260
379
  {
261
380
  name: 'message',
262
381
  kind: 'Scalar'
382
+ },
383
+ {
384
+ name: 'messageType',
385
+ kind: 'Scalar'
263
386
  }
264
387
  ]
265
388
  };
@@ -280,6 +403,21 @@ function equals$1(existing, incoming) {
280
403
  if (!(existing_message === incoming_message)) {
281
404
  return false;
282
405
  }
406
+ const existing_messageType = existing.messageType;
407
+ const incoming_messageType = incoming.messageType;
408
+ if (!(existing_messageType === incoming_messageType)) {
409
+ return false;
410
+ }
411
+ const existing_featureValidationAccessInfo = existing.featureValidationAccessInfo;
412
+ const incoming_featureValidationAccessInfo = incoming.featureValidationAccessInfo;
413
+ const equals_featureValidationAccessInfo_items = equalsArray(existing_featureValidationAccessInfo, incoming_featureValidationAccessInfo, (existing_featureValidationAccessInfo_item, incoming_featureValidationAccessInfo_item) => {
414
+ if (!(equals$3(existing_featureValidationAccessInfo_item, incoming_featureValidationAccessInfo_item))) {
415
+ return false;
416
+ }
417
+ });
418
+ if (equals_featureValidationAccessInfo_items === false) {
419
+ return false;
420
+ }
283
421
  const existing_featureValidationFieldValues = existing.featureValidationFieldValues;
284
422
  const incoming_featureValidationFieldValues = incoming.featureValidationFieldValues;
285
423
  const equals_featureValidationFieldValues_items = equalsArray(existing_featureValidationFieldValues, incoming_featureValidationFieldValues, (existing_featureValidationFieldValues_item, incoming_featureValidationFieldValues_item) => {
@@ -467,7 +605,7 @@ const createResourceParams = /*#__PURE__*/ createResourceParams$1(featureValidat
467
605
  function typeCheckConfig(untrustedConfig) {
468
606
  const config = {};
469
607
  const untrustedConfig_FeatureValidationData = untrustedConfig.FeatureValidationData;
470
- const referenceFeatureValidationInputRepresentationValidationError = validate$3(untrustedConfig_FeatureValidationData);
608
+ const referenceFeatureValidationInputRepresentationValidationError = validate$4(untrustedConfig_FeatureValidationData);
471
609
  if (referenceFeatureValidationInputRepresentationValidationError === null) {
472
610
  config.FeatureValidationData = untrustedConfig_FeatureValidationData;
473
611
  }
@@ -534,4 +672,4 @@ withDefaultLuvio((luvio) => {
534
672
  });
535
673
 
536
674
  export { featureValidation };
537
- // version: 1.282.0-dd2e9831c
675
+ // version: 1.284.0-8b78b708e
package/src/raml/api.raml CHANGED
@@ -2,7 +2,7 @@
2
2
  securedBy:
3
3
  - OAuth2
4
4
  title: Salesforce Connect API
5
- version: '58.0'
5
+ version: '61.0'
6
6
  mediaType: application/json
7
7
  protocols:
8
8
  - https
@@ -25,6 +25,27 @@ annotationTypes:
25
25
  type: string
26
26
  allowedTargets: TypeDeclaration
27
27
  types:
28
+ FeatureValidationAccessInfoRepresentation:
29
+ description: Represents the access info of entities and fields
30
+ type: object
31
+ properties:
32
+ accessLevel:
33
+ description: the level of access that needs to be validated
34
+ type: string
35
+ enum:
36
+ - Create
37
+ - Delete
38
+ - Edit
39
+ - Read
40
+ apiName:
41
+ description: api name of the entity or field
42
+ type: string
43
+ hasAccess:
44
+ description: validates the access level of the entity or field
45
+ type: boolean
46
+ type:
47
+ description: specifies if the given name is an entity or a field
48
+ type: string
28
49
  FeatureValidationFieldValuesRepresentation:
29
50
  description: Select fields that were validated as part of use-case implementation.
30
51
  type: object
@@ -38,6 +59,14 @@ types:
38
59
  message:
39
60
  description: 'Message related to the field. Example: Missing fls permissions.'
40
61
  type: string
62
+ messageType:
63
+ description: 'Describes the type of the message. Example: Error, Warning or
64
+ Info.'
65
+ type: string
66
+ enum:
67
+ - Error
68
+ - Info
69
+ - Warning
41
70
  required:
42
71
  description: true if field is required. false otherwise.
43
72
  type: boolean
@@ -55,6 +84,10 @@ types:
55
84
  Account is a bpo name but Patient is a business usage of the patient's
56
85
  account"
57
86
  type: string
87
+ scenarioName:
88
+ description: used for access checks, determines the scenario or the flow for
89
+ the given feature
90
+ type: string
58
91
  FeatureValidationInputRepresentation:
59
92
  description: Feature validation input
60
93
  type: object
@@ -65,11 +98,13 @@ types:
65
98
  items:
66
99
  type: object
67
100
  useCase:
68
- description: Use-case to validate the data. HealthCloudIAM needs user to pass
69
- on practitioner id, facility id, patient id, and worktype id in featureValidationInputDetails.
101
+ description: 'Use-case to validate the data. Example: HealthCloudIAM needs
102
+ user to pass on practitioner id, facility id, patient id, and worktype id
103
+ in featureValidationInputDetails.'
70
104
  type: string
71
105
  enum:
72
106
  - HealthCloudIAM
107
+ - HealthCloudIAMAccessChecks
73
108
  # TODO [W-9807143]: Hand rolled due to issue in Generated RAML Gaps (https://salesforce.quip.com/NxVhAkxL6RTW#dGQACAxyxIv)
74
109
  FeatureValidationWrapperInputRepresentation:
75
110
  description: wrapper of FeatureValidationInputRepresentation
@@ -89,6 +124,11 @@ types:
89
124
  bpoRecordId:
90
125
  description: BPO record id
91
126
  type: string
127
+ featureValidationAccessInfo:
128
+ description: 'Access check results for the fields/entities '
129
+ type: array
130
+ items:
131
+ type: FeatureValidationAccessInfoRepresentation
92
132
  featureValidationFieldValues:
93
133
  description: Select fields that were validated as part of use-case implementation.
94
134
  type: array
@@ -97,6 +137,14 @@ types:
97
137
  message:
98
138
  description: 'Message related to the bpo. Example: Invalid record Id.'
99
139
  type: string
140
+ messageType:
141
+ description: 'Describes the type of the message. Example: Error, Warning or
142
+ Info.'
143
+ type: string
144
+ enum:
145
+ - Error
146
+ - Info
147
+ - Warning
100
148
  FeatureValidationOutputRepresentation:
101
149
  description: FeatureValidation output.
102
150
  type: object