@salesforce/lds-adapters-industries-featurevalidation 0.1.0-dev1

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.
@@ -0,0 +1,183 @@
1
+ #%RAML 1.0
2
+ securedBy:
3
+ - OAuth2
4
+ title: Salesforce Connect API
5
+ version: '61.0'
6
+ mediaType: application/json
7
+ protocols:
8
+ - https
9
+ baseUri: /services/data/v66.0
10
+ securitySchemes:
11
+ OAuth2:
12
+ type: OAuth 2.0
13
+ settings:
14
+ authorizationUri: https://example.com/oauth/authorize
15
+ accessTokenUri: ''
16
+ authorizationGrants:
17
+ - implicit
18
+ annotationTypes:
19
+ oas-readOnly:
20
+ type: boolean
21
+ allowedTargets: TypeDeclaration
22
+ oas-collectionFormat:
23
+ type: string
24
+ oas-body-name:
25
+ type: string
26
+ allowedTargets: TypeDeclaration
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
49
+ FeatureValidationFieldValuesRepresentation:
50
+ description: Select fields that were validated as part of use-case implementation.
51
+ type: object
52
+ properties:
53
+ fieldName:
54
+ description: Field name
55
+ type: string
56
+ fieldValue:
57
+ description: Field value
58
+ type: string
59
+ message:
60
+ description: 'Message related to the field. Example: Missing fls permissions.'
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
70
+ required:
71
+ description: true if field is required. false otherwise.
72
+ type: boolean
73
+ FeatureValidationInputDetailsRepresentation:
74
+ description: |-
75
+ Holds BPO recordUsage and bpo recordId. example: {"recordUsage": "Facility",
76
+ "bpoRecordId": "0bSxx0000000005EAA"}
77
+ type: object
78
+ properties:
79
+ bpoRecordId:
80
+ description: Input BPO record id
81
+ type: string
82
+ recordUsage:
83
+ description: "How record is used in the feature. Example value: Patient. Note:
84
+ Account is a bpo name but Patient is a business usage of the patient's
85
+ account"
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
91
+ FeatureValidationInputRepresentation:
92
+ description: Feature validation input
93
+ type: object
94
+ properties:
95
+ featureValidationInputDetails:
96
+ description: Holds record usage and bpo recordId.
97
+ type: array
98
+ items:
99
+ type: object
100
+ useCase:
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.'
104
+ type: string
105
+ enum:
106
+ - HealthCloudIAM
107
+ - HealthCloudIAMAccessChecks
108
+ # TODO [W-9807143]: Hand rolled due to issue in Generated RAML Gaps (https://salesforce.quip.com/NxVhAkxL6RTW#dGQACAxyxIv)
109
+ FeatureValidationWrapperInputRepresentation:
110
+ description: wrapper of FeatureValidationInputRepresentation
111
+ type: object
112
+ properties:
113
+ FeatureValidationData:
114
+ description: Input representation for FeatureValidationInputRepresentation
115
+ type: FeatureValidationInputRepresentation
116
+ FeatureValidationOutputDetailsRepresentation:
117
+ description: Holds BPO name, bpoRecordId, select fields from the bpo and related
118
+ error message.
119
+ type: object
120
+ properties:
121
+ bpoName:
122
+ description: BPO name
123
+ type: string
124
+ bpoRecordId:
125
+ description: BPO record id
126
+ type: string
127
+ featureValidationAccessInfo:
128
+ description: 'Access check results for the fields/entities '
129
+ type: array
130
+ items:
131
+ type: FeatureValidationAccessInfoRepresentation
132
+ featureValidationFieldValues:
133
+ description: Select fields that were validated as part of use-case implementation.
134
+ type: array
135
+ items:
136
+ type: FeatureValidationFieldValuesRepresentation
137
+ message:
138
+ description: 'Message related to the bpo. Example: Invalid record Id.'
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
148
+ FeatureValidationOutputRepresentation:
149
+ description: FeatureValidation output.
150
+ type: object
151
+ properties:
152
+ errorMessage:
153
+ description: Get FeatureValidation error messages
154
+ type: string
155
+ required: false
156
+ featureValidationOutputDetails:
157
+ description: Holds BPO name, bpoRecordId, select fields from the bpo and related
158
+ error message.
159
+ type: array
160
+ items:
161
+ type: FeatureValidationOutputDetailsRepresentation
162
+ isSuccess:
163
+ description: Get FeatureValidation success flag
164
+ type: boolean
165
+ /connect:
166
+ /industries:
167
+ /feature-validation:
168
+ post:
169
+ displayName: postFeatureValidation
170
+ description: |-
171
+ Run a feature validation to validate data setup for a given use-case and respective record Ids. Supported use cases are @ FeatureValidationUseCaseEnum.
172
+ To add new usecase, add your implementation to this post method and FeatureValidationUseCaseEnum. Populate FeatureValidationOutputRepresentation with the validated BPOs.
173
+ responses:
174
+ '200':
175
+ description: Success
176
+ body:
177
+ application/json:
178
+ type: FeatureValidationOutputRepresentation
179
+ body:
180
+ application/json:
181
+ type: FeatureValidationWrapperInputRepresentation
182
+ # TODO [W-12609182]: Hand Rolled Change that removed 'required: false' since the 'required' property is not allowed in RAML 1.0
183
+ (oas-body-name): FeatureValidationData
@@ -0,0 +1,17 @@
1
+ #%RAML 1.0 Overlay
2
+ extends: ./api.raml
3
+
4
+ uses:
5
+ luvio: luvio://annotations.raml
6
+
7
+ (luvio.keyPrefix): 'featurevalidation'
8
+ types:
9
+ FeatureValidationOutputRepresentation:
10
+ (luvio.key):
11
+ isSuccess: isSuccess
12
+ (luvio.ttl): 300
13
+
14
+ /connect/industries/feature-validation:
15
+ post:
16
+ (luvio.adapter):
17
+ name: featureValidation