@salesforce/lds-adapters-sales-saleseinsteincoach 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.
Files changed (30) hide show
  1. package/LICENSE.txt +82 -0
  2. package/dist/es/es2018/sales-saleseinsteincoach.js +1051 -0
  3. package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +62 -0
  4. package/dist/es/es2018/types/src/generated/adapters/deleteRolePlaySession.d.ts +14 -0
  5. package/dist/es/es2018/types/src/generated/adapters/getSalesEinsteinCoachConfiguration.d.ts +27 -0
  6. package/dist/es/es2018/types/src/generated/adapters/startRolePlaySession.d.ts +16 -0
  7. package/dist/es/es2018/types/src/generated/adapters/submitForFeedback.d.ts +19 -0
  8. package/dist/es/es2018/types/src/generated/adapters/submitForRolePlay.d.ts +19 -0
  9. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +5 -0
  10. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +7 -0
  11. package/dist/es/es2018/types/src/generated/resources/deleteSalesEinsteinCoachPracticeRoleplay.d.ts +12 -0
  12. package/dist/es/es2018/types/src/generated/resources/getSalesEinsteinCoachPracticeConfiguration.d.ts +15 -0
  13. package/dist/es/es2018/types/src/generated/resources/getSalesEinsteinCoachPracticeRoleplay.d.ts +15 -0
  14. package/dist/es/es2018/types/src/generated/resources/postSalesEinsteinCoachPracticeFeedback.d.ts +16 -0
  15. package/dist/es/es2018/types/src/generated/resources/postSalesEinsteinCoachPracticeRoleplay.d.ts +18 -0
  16. package/dist/es/es2018/types/src/generated/resources/postSalesEinsteinCoachPracticeRoleplayStart.d.ts +13 -0
  17. package/dist/es/es2018/types/src/generated/types/EtsConfigRepresentation.d.ts +34 -0
  18. package/dist/es/es2018/types/src/generated/types/SalesEinsteinCoachConfigurationOutputRepresentation.d.ts +36 -0
  19. package/dist/es/es2018/types/src/generated/types/SalesEinsteinCoachFeedbackInputRepresentation.d.ts +38 -0
  20. package/dist/es/es2018/types/src/generated/types/SalesEinsteinCoachFeedbackOutputRepresentation.d.ts +41 -0
  21. package/dist/es/es2018/types/src/generated/types/SalesEinsteinCoachRolePlayInputRepresentation.d.ts +37 -0
  22. package/dist/es/es2018/types/src/generated/types/SalesEinsteinCoachRolePlayOutputRepresentation.d.ts +47 -0
  23. package/dist/es/es2018/types/src/generated/types/SalesEinsteinCoachRolePlaySessionInputRepresentation.d.ts +31 -0
  24. package/dist/es/es2018/types/src/generated/types/SalesEinsteinCoachRolePlaySessionOutputRepresentation.d.ts +38 -0
  25. package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
  26. package/package.json +67 -0
  27. package/sfdc/index.d.ts +1 -0
  28. package/sfdc/index.js +1104 -0
  29. package/src/raml/api.raml +247 -0
  30. package/src/raml/luvio.raml +50 -0
@@ -0,0 +1,247 @@
1
+ #%RAML 1.0
2
+ securedBy:
3
+ - OAuth2
4
+ title: Salesforce Connect API
5
+ version: '62.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
+ EtsConfigRepresentation:
29
+ description: The ETS configuration required to connect to the transcription service
30
+ type: object
31
+ properties:
32
+ appContext:
33
+ description: The app context for the ETS Configuration
34
+ type: string
35
+ tenantId:
36
+ description: The tenant Id for the ETS Configuration
37
+ type: string
38
+ uri:
39
+ description: The URI of the ETS Configuration
40
+ type: string
41
+ SalesEinsteinCoachConfigurationOutputRepresentation:
42
+ description: Directs UI to show a particular type of coaching moment and gives
43
+ configuration to connect to ETS along with instructions for LLM
44
+ type: object
45
+ properties:
46
+ coachingMomentType:
47
+ description: Type of coaching moment to show to user (SimulatedConversation
48
+ or StandAndDeliver)
49
+ type: string
50
+ enum:
51
+ - SimulatedConversation
52
+ - StandAndDeliver
53
+ etsConfig:
54
+ description: The ets configuration required to connect to the transcription
55
+ service
56
+ type: EtsConfigRepresentation
57
+ instructions:
58
+ description: The instructions for the co-pilot
59
+ type: string
60
+ SalesEinsteinCoachFeedbackInputRepresentation:
61
+ description: Input representation for the UI to submit a transcript to get AI
62
+ feedback.
63
+ type: object
64
+ properties:
65
+ recordId:
66
+ description: Id of the record that the feedback is for
67
+ type: string
68
+ scenario:
69
+ description: Coaching moment scenario
70
+ type: string
71
+ enum:
72
+ - Discovery
73
+ - Negotiation
74
+ - Proposal
75
+ - Qualification
76
+ transcript:
77
+ description: Transcript of the call
78
+ type: array
79
+ items:
80
+ type: object
81
+ properties:
82
+ //:
83
+ type: any
84
+ SalesEinsteinCoachFeedbackOutputRepresentation:
85
+ description: Feedback given by AI on the transcript of a call
86
+ type: object
87
+ properties:
88
+ feedback:
89
+ description: The feedback from the LLM for the transcript of the call
90
+ type: string
91
+ generationId:
92
+ description: The generation ID for the feedback received from LLM
93
+ type: string
94
+ SalesEinsteinCoachRolePlayInputRepresentation:
95
+ description: Input representation to talk back and forth with an AI modal
96
+ type: object
97
+ properties:
98
+ replyId:
99
+ description: Reply Id of the previous response from LLM
100
+ type: string
101
+ sequenceId:
102
+ description: Sequence id required by co-pilot
103
+ type: string
104
+ transcript:
105
+ description: The transcript of the conversation up to this point in time
106
+ type: string
107
+ scenario:
108
+ description: The coaching moment scenario for the session
109
+ type: string
110
+ enum:
111
+ - Discovery
112
+ - Negotiation
113
+ - Proposal
114
+ - Qualification
115
+ SalesEinsteinCoachRolePlayOutputRepresentation:
116
+ description: Reply given by AI on a back and forth conversation with user
117
+ type: object
118
+ properties:
119
+ reply:
120
+ description: The reply from the co-pilot
121
+ type: string
122
+ replyAudio:
123
+ description: The audio string returned by speech synthesizer
124
+ type: string | nil
125
+ replyId:
126
+ description: The reply ID for the co-pilot interaction
127
+ type: string
128
+ sequenceId:
129
+ description: The sequence ID for the co-pilot interaction
130
+ type: string
131
+ SalesEinsteinCoachRolePlaySessionInputRepresentation:
132
+ description: Input representation to start a session with einstein copilot for
133
+ role play
134
+ type: object
135
+ properties:
136
+ recordId:
137
+ description: The id of the record the session is based on
138
+ type: string
139
+ scenario:
140
+ description: The coaching moment scenario for the session
141
+ type: string
142
+ enum:
143
+ - Discovery
144
+ - Negotiation
145
+ - Proposal
146
+ - Qualification
147
+ SalesEinsteinCoachRolePlaySessionOutputRepresentation:
148
+ description: This resource is used to create a new session with co-pilot for role
149
+ play
150
+ type: object
151
+ properties:
152
+ sessionId:
153
+ description: The id of the session created with co-pilot for role play
154
+ type: string
155
+ /sales-einstein-coach/practice:
156
+ /configuration:
157
+ get:
158
+ displayName: getSalesEinsteinCoachConfiguration
159
+ description: Returns the configuration for ETS and the instructions for LLM
160
+ responses:
161
+ '200':
162
+ description: Success
163
+ body:
164
+ application/json:
165
+ type: SalesEinsteinCoachConfigurationOutputRepresentation
166
+ queryParameters:
167
+ scenario:
168
+ type: string
169
+ required: true
170
+ enum:
171
+ - Discovery
172
+ - Negotiation
173
+ - Proposal
174
+ - Qualification
175
+ /feedback:
176
+ post:
177
+ displayName: postSalesEinsteinCoachFeedback
178
+ description: Return the AI feedback on the given transcript
179
+ responses:
180
+ '200':
181
+ description: Success
182
+ body:
183
+ application/json:
184
+ type: SalesEinsteinCoachFeedbackOutputRepresentation
185
+ body:
186
+ application/json:
187
+ type: SalesEinsteinCoachFeedbackInputRepresentation
188
+ #required: false
189
+ (oas-body-name): SalesEinsteinCoachFeedbackInputRepresentation
190
+ /roleplay:
191
+ delete:
192
+ displayName: deleteSalesEinsteinCoachRolePlay
193
+ description: Deletes the session created with co-pilot for conversation
194
+ responses:
195
+ '200':
196
+ description: Success
197
+ queryParameters:
198
+ sessionId:
199
+ type: string
200
+ required: false
201
+ get:
202
+ displayName: getSalesEinsteinCoachRolePlay
203
+ description: Return the sessionId of the session created with co-pilot for this
204
+ conversation
205
+ responses:
206
+ '200':
207
+ description: Success
208
+ body:
209
+ application/json:
210
+ type: SalesEinsteinCoachRolePlaySessionOutputRepresentation
211
+ queryParameters:
212
+ sessionId:
213
+ type: string
214
+ required: false
215
+ post:
216
+ displayName: postSalesEinsteinCoachRolePlay
217
+ description: Returns the response from co-pilot for the conversation
218
+ responses:
219
+ '200':
220
+ description: Success
221
+ body:
222
+ application/json:
223
+ type: SalesEinsteinCoachRolePlayOutputRepresentation
224
+ queryParameters:
225
+ sessionId:
226
+ type: string
227
+ required: false
228
+ body:
229
+ application/json:
230
+ type: SalesEinsteinCoachRolePlayInputRepresentation
231
+ #required: false
232
+ (oas-body-name): SalesEinsteinCoachRolePlayInputRepresentation
233
+ /roleplay/start:
234
+ post:
235
+ displayName: postSalesEinsteinCoachRolePlaySession
236
+ description: Return the id of the new session created with co-pilot
237
+ responses:
238
+ '200':
239
+ description: Success
240
+ body:
241
+ application/json:
242
+ type: SalesEinsteinCoachRolePlaySessionOutputRepresentation
243
+ body:
244
+ application/json:
245
+ type: SalesEinsteinCoachRolePlaySessionInputRepresentation
246
+ #required: false
247
+ (oas-body-name): SalesEinsteinCoachRolePlaySessionInputRepresentation
@@ -0,0 +1,50 @@
1
+ #%RAML 1.0 Overlay
2
+ extends: ./api.raml
3
+
4
+ uses:
5
+ luvio: luvio://annotations.raml
6
+
7
+ (luvio.keyPrefix): 'SalesEinsteinCoach'
8
+ (luvio.ttl): 15000
9
+
10
+ types:
11
+ SalesEinsteinCoachConfigurationOutputRepresentation:
12
+ (luvio.ttl): 600000 # 10 minutes
13
+ SalesEinsteinCoachFeedbackOutputRepresentation:
14
+ (luvio.ttl): 15000
15
+ (luvio.key):
16
+ generation_id: generationId
17
+ SalesEinsteinCoachRolePlayOutputRepresentation:
18
+ (luvio.ttl): 15000
19
+ (luvio.key):
20
+ reply_id: replyId
21
+ SalesEinsteinCoachRolePlaySessionOutputRepresentation:
22
+ (luvio.ttl): 15000
23
+ (luvio.key):
24
+ session_id: sessionId
25
+
26
+ /sales-einstein-coach/practice:
27
+ /configuration:
28
+ get:
29
+ (luvio.adapter):
30
+ name: getSalesEinsteinCoachConfiguration
31
+ /feedback:
32
+ post:
33
+ (luvio.adapter):
34
+ name: submitForFeedback
35
+ /roleplay:
36
+ delete:
37
+ (luvio.adapter):
38
+ name: deleteRolePlaySession
39
+ (luvio.key):
40
+ session_id: queryParams.sessionId || ''
41
+ get:
42
+ (luvio.key):
43
+ session_id: queryParams.sessionId || ''
44
+ post:
45
+ (luvio.adapter):
46
+ name: submitForRolePlay
47
+ /roleplay/start:
48
+ post:
49
+ (luvio.adapter):
50
+ name: startRolePlaySession