@salesforce/lds-adapters-platform-formula 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.
- package/LICENSE.txt +82 -0
- package/dist/es/es2018/platform-formula.js +642 -0
- package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +62 -0
- package/dist/es/es2018/types/src/generated/adapters/fixFormula.d.ts +19 -0
- package/dist/es/es2018/types/src/generated/adapters/getExplanation.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/adapters/validateFormula.d.ts +19 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +3 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +4 -0
- package/dist/es/es2018/types/src/generated/resources/postConnectFormulaEinsteinExplain.d.ts +15 -0
- package/dist/es/es2018/types/src/generated/resources/postConnectFormulaEinsteinFix.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/resources/postConnectFormulaValidate.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/types/ExplainPromptInputRepresentation.d.ts +37 -0
- package/dist/es/es2018/types/src/generated/types/FixFormulaInputRepresentation.d.ts +40 -0
- package/dist/es/es2018/types/src/generated/types/FixFormulaRepresentation.d.ts +41 -0
- package/dist/es/es2018/types/src/generated/types/FormulaExplanationRepresentation.d.ts +41 -0
- package/dist/es/es2018/types/src/generated/types/FormulaValidationInputRepresentation.d.ts +40 -0
- package/dist/es/es2018/types/src/generated/types/FormulaValidationRepresentation.d.ts +41 -0
- package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
- package/package.json +67 -0
- package/sfdc/index.d.ts +1 -0
- package/sfdc/index.js +674 -0
- package/src/raml/api.raml +199 -0
- package/src/raml/luvio.raml +37 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
#%RAML 1.0
|
|
2
|
+
securedBy:
|
|
3
|
+
- OAuth2
|
|
4
|
+
title: Salesforce Connect API
|
|
5
|
+
version: '60.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
|
+
ExplainPromptInputRepresentation:
|
|
29
|
+
description: The input representation for a explain prompt
|
|
30
|
+
type: object
|
|
31
|
+
properties:
|
|
32
|
+
entityName:
|
|
33
|
+
description: Entity Name from the formula builder
|
|
34
|
+
type: string
|
|
35
|
+
formula:
|
|
36
|
+
description: Formula for which description needs to be generated
|
|
37
|
+
type: string
|
|
38
|
+
formulaType:
|
|
39
|
+
description: Formula Type
|
|
40
|
+
type: string
|
|
41
|
+
enum:
|
|
42
|
+
- CustomField
|
|
43
|
+
- DefaultValue
|
|
44
|
+
- Validation
|
|
45
|
+
returnType:
|
|
46
|
+
description: Return type of the formula
|
|
47
|
+
type: string
|
|
48
|
+
enum:
|
|
49
|
+
- Boolean
|
|
50
|
+
- Currency
|
|
51
|
+
- Date
|
|
52
|
+
- DateTime
|
|
53
|
+
- Number
|
|
54
|
+
- Percent
|
|
55
|
+
- Text
|
|
56
|
+
- Time
|
|
57
|
+
FixFormulaInputRepresentation:
|
|
58
|
+
description: The input representation for fixing a formula
|
|
59
|
+
type: object
|
|
60
|
+
properties:
|
|
61
|
+
entityName:
|
|
62
|
+
description: Entity Name from the formula builder
|
|
63
|
+
type: string
|
|
64
|
+
fieldName:
|
|
65
|
+
description: Field name if the formula is already saved
|
|
66
|
+
type: string
|
|
67
|
+
required: false
|
|
68
|
+
formula:
|
|
69
|
+
description: Formula which needs to be fixed
|
|
70
|
+
type: string
|
|
71
|
+
formulaType:
|
|
72
|
+
description: Formula Type
|
|
73
|
+
type: string
|
|
74
|
+
enum:
|
|
75
|
+
- CustomField
|
|
76
|
+
- DefaultValue
|
|
77
|
+
- Validation
|
|
78
|
+
returnType:
|
|
79
|
+
description: Return type of the formula
|
|
80
|
+
type: string
|
|
81
|
+
enum:
|
|
82
|
+
- Boolean
|
|
83
|
+
- Currency
|
|
84
|
+
- Date
|
|
85
|
+
- DateTime
|
|
86
|
+
- Number
|
|
87
|
+
- Percent
|
|
88
|
+
- Text
|
|
89
|
+
- Time
|
|
90
|
+
FixFormulaRepresentation:
|
|
91
|
+
description: Fix Formula
|
|
92
|
+
type: object
|
|
93
|
+
properties:
|
|
94
|
+
generationId:
|
|
95
|
+
description: Einstein generationId. If formula is valid, this should be null/empty
|
|
96
|
+
type: string
|
|
97
|
+
response:
|
|
98
|
+
description: Fixed formula if the formula is invalid. If formula is valid,
|
|
99
|
+
returns error response
|
|
100
|
+
type: string
|
|
101
|
+
FormulaExplanationRepresentation:
|
|
102
|
+
description: Formula Explanation
|
|
103
|
+
type: object
|
|
104
|
+
properties:
|
|
105
|
+
explanation:
|
|
106
|
+
description: Explanation of a formula
|
|
107
|
+
type: string
|
|
108
|
+
generationId:
|
|
109
|
+
description: Generation ID of response from open ai
|
|
110
|
+
type: string
|
|
111
|
+
FormulaValidationInputRepresentation:
|
|
112
|
+
description: The input representation for validating a formula
|
|
113
|
+
type: object
|
|
114
|
+
properties:
|
|
115
|
+
entityName:
|
|
116
|
+
description: Entity Name from the formula builder
|
|
117
|
+
type: string
|
|
118
|
+
fieldName:
|
|
119
|
+
description: Field name if the formula is already saved
|
|
120
|
+
type: string
|
|
121
|
+
required: false
|
|
122
|
+
formula:
|
|
123
|
+
description: Formula which needs to be validated
|
|
124
|
+
type: string
|
|
125
|
+
formulaType:
|
|
126
|
+
description: Formula Type
|
|
127
|
+
type: string
|
|
128
|
+
enum:
|
|
129
|
+
- CustomField
|
|
130
|
+
- DefaultValue
|
|
131
|
+
- Validation
|
|
132
|
+
returnType:
|
|
133
|
+
description: Return type of the formula
|
|
134
|
+
type: string
|
|
135
|
+
enum:
|
|
136
|
+
- Boolean
|
|
137
|
+
- Currency
|
|
138
|
+
- Date
|
|
139
|
+
- DateTime
|
|
140
|
+
- Number
|
|
141
|
+
- Percent
|
|
142
|
+
- Text
|
|
143
|
+
- Time
|
|
144
|
+
FormulaValidationRepresentation:
|
|
145
|
+
description: Formula Validation
|
|
146
|
+
type: object
|
|
147
|
+
properties:
|
|
148
|
+
isFormulaValid:
|
|
149
|
+
description: Returns if the formula is valid
|
|
150
|
+
type: boolean
|
|
151
|
+
message:
|
|
152
|
+
description: Failure message if validation was unsuccessful. If validation
|
|
153
|
+
passes, this should be null/empty
|
|
154
|
+
type: string | nil
|
|
155
|
+
required: false
|
|
156
|
+
/connect/formula:
|
|
157
|
+
/einstein:
|
|
158
|
+
/explain:
|
|
159
|
+
post:
|
|
160
|
+
displayName: postFormulaExplanation
|
|
161
|
+
description: Gets explanation for a salesforce formula
|
|
162
|
+
responses:
|
|
163
|
+
'200':
|
|
164
|
+
description: Success
|
|
165
|
+
body:
|
|
166
|
+
application/json:
|
|
167
|
+
type: FormulaExplanationRepresentation
|
|
168
|
+
body:
|
|
169
|
+
application/json:
|
|
170
|
+
type: ExplainPromptInputRepresentation
|
|
171
|
+
(oas-body-name): formulaExplainInput
|
|
172
|
+
/fix:
|
|
173
|
+
post:
|
|
174
|
+
displayName: postFormulaFix
|
|
175
|
+
description: Fixes a Salesforce formula
|
|
176
|
+
responses:
|
|
177
|
+
'200':
|
|
178
|
+
description: Success
|
|
179
|
+
body:
|
|
180
|
+
application/json:
|
|
181
|
+
type: FixFormulaRepresentation
|
|
182
|
+
body:
|
|
183
|
+
application/json:
|
|
184
|
+
type: FixFormulaInputRepresentation
|
|
185
|
+
(oas-body-name): formulaFixInput
|
|
186
|
+
/validate:
|
|
187
|
+
post:
|
|
188
|
+
displayName: postFormulaValidation
|
|
189
|
+
description: Validates a Salesforce formula
|
|
190
|
+
responses:
|
|
191
|
+
'200':
|
|
192
|
+
description: Success
|
|
193
|
+
body:
|
|
194
|
+
application/json:
|
|
195
|
+
type: FormulaValidationRepresentation
|
|
196
|
+
body:
|
|
197
|
+
application/json:
|
|
198
|
+
type: FormulaValidationInputRepresentation
|
|
199
|
+
(oas-body-name): formulaValidateInput
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#%RAML 1.0 Overlay
|
|
2
|
+
extends: ./api.raml
|
|
3
|
+
|
|
4
|
+
uses:
|
|
5
|
+
luvio: luvio://annotations.raml
|
|
6
|
+
|
|
7
|
+
(luvio.keyPrefix): 'Formula'
|
|
8
|
+
|
|
9
|
+
# almost no-cache
|
|
10
|
+
types:
|
|
11
|
+
FormulaExplanationRepresentation:
|
|
12
|
+
(luvio.ttl): 100
|
|
13
|
+
(luvio.key):
|
|
14
|
+
generationId: generationId
|
|
15
|
+
FormulaValidationRepresentation:
|
|
16
|
+
(luvio.ttl): 100
|
|
17
|
+
(luvio.key):
|
|
18
|
+
isFormulaValid: isFormulaValid
|
|
19
|
+
FixFormulaRepresentation:
|
|
20
|
+
(luvio.ttl): 100
|
|
21
|
+
(luvio.key):
|
|
22
|
+
generationId: generationId
|
|
23
|
+
|
|
24
|
+
/connect/formula:
|
|
25
|
+
/einstein:
|
|
26
|
+
/explain:
|
|
27
|
+
post:
|
|
28
|
+
(luvio.adapter):
|
|
29
|
+
name: getExplanation
|
|
30
|
+
/fix:
|
|
31
|
+
post:
|
|
32
|
+
(luvio.adapter):
|
|
33
|
+
name: fixFormula
|
|
34
|
+
/validate:
|
|
35
|
+
post:
|
|
36
|
+
(luvio.adapter):
|
|
37
|
+
name: validateFormula
|