@salesforce/lds-adapters-service-serviceplan 1.308.0-dev1 → 1.308.0-dev3

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 (22) hide show
  1. package/dist/es/es2018/service-serviceplan.js +673 -286
  2. package/dist/es/es2018/types/src/generated/adapters/executeServicePlan.d.ts +4 -6
  3. package/dist/es/es2018/types/src/generated/adapters/generateSync.d.ts +3 -3
  4. package/dist/es/es2018/types/src/generated/resources/{getConnectServicePlanExecuteByGeneratedPlanId.d.ts → getConnectServicePlanExecuteByPlanOrStepId.d.ts} +1 -1
  5. package/dist/es/es2018/types/src/generated/resources/{postConnectServicePlanGenerateSyncByRecordId.d.ts → postConnectServicePlanGenerationRequests.d.ts} +2 -2
  6. package/dist/es/es2018/types/src/generated/resources/{putConnectServicePlanExecuteByGeneratedPlanId.d.ts → putConnectServicePlanExecuteByPlanOrStepId.d.ts} +2 -4
  7. package/dist/es/es2018/types/src/generated/types/ServicePlanDataInputRepresentation.d.ts +28 -0
  8. package/dist/es/es2018/types/src/generated/types/ServicePlanDataOutputRepresentation.d.ts +28 -0
  9. package/dist/es/es2018/types/src/generated/types/ServicePlanExecutionInputRepresentation.d.ts +4 -10
  10. package/dist/es/es2018/types/src/generated/types/ServicePlanExecutionOutputRepresentation.d.ts +11 -16
  11. package/dist/es/es2018/types/src/generated/types/ServicePlanExecutionSummaryRepresentation.d.ts +2 -11
  12. package/dist/es/es2018/types/src/generated/types/ServicePlanGenerationInputParamRepresentation.d.ts +2 -2
  13. package/dist/es/es2018/types/src/generated/types/ServicePlanGenerationSessionInformationOutputRepresentation.d.ts +13 -19
  14. package/dist/es/es2018/types/src/generated/types/ServicePlanGenerationSyncOutputRepresentation.d.ts +25 -7
  15. package/dist/es/es2018/types/src/generated/types/ServicePlanOutputRepresentation.d.ts +27 -20
  16. package/dist/es/es2018/types/src/generated/types/ServicePlanStepExecutionStatusRepresentation.d.ts +31 -0
  17. package/dist/es/es2018/types/src/generated/types/ServicePlanStepRepresentation.d.ts +14 -15
  18. package/package.json +3 -3
  19. package/sfdc/index.js +674 -287
  20. package/src/raml/api.raml +122 -90
  21. package/src/raml/luvio.raml +8 -4
  22. package/dist/es/es2018/types/src/generated/types/ServicePlanStepAttributeRepresentation.d.ts +0 -31
package/src/raml/api.raml CHANGED
@@ -25,43 +25,48 @@ annotationTypes:
25
25
  type: string
26
26
  allowedTargets: TypeDeclaration
27
27
  types:
28
+ ServicePlanDataInputRepresentation:
29
+ description: Represents the Input for gathering the record details required to
30
+ generate the Service Plan
31
+ type: object
32
+ properties:
33
+ recordId:
34
+ description: Record ID
35
+ type: string
36
+ ServicePlanDataOutputRepresentation:
37
+ description: Represent the service plan data
38
+ type: object
39
+ properties:
40
+ recordDetails:
41
+ description: The Record details
42
+ type: string
28
43
  ServicePlanExecutionInputRepresentation:
29
44
  description: Represents a generated service plan input context required for service
30
45
  plan execution
31
46
  type: object
32
47
  properties:
33
- intent:
34
- description: Intent
35
- type: string
36
- planId:
37
- description: Copilot planId
38
- type: string
39
- sessionId:
40
- description: Copilot SessionId
48
+ action:
49
+ description: Action to be performed by the API
41
50
  type: string
51
+ enum:
52
+ - MarkCompleted
53
+ - MarkUncompleted
42
54
  ServicePlanExecutionOutputRepresentation:
43
55
  description: Represent the service plan execution result
44
56
  type: object
45
57
  properties:
46
- reason:
47
- description: The reason of the service plan execution request job failure
48
- type: string
49
- enum:
50
- - CannotExecutePlan
51
- - None
52
- reasonDetails:
53
- description: The details of the service plan execution request job failure
54
- type: string
55
- servicePlan:
56
- description: The generated service plan
57
- type: ServicePlanExecutionSummaryRepresentation
58
- status:
58
+ executionStatus:
59
59
  description: The Status of the service plan execution request job
60
60
  type: string
61
61
  enum:
62
- - Error
62
+ - Completed
63
+ - Failed
63
64
  - InProgress
64
- - Success
65
+ planSteps:
66
+ description: All the step status
67
+ type: array
68
+ items:
69
+ type: ServicePlanStepExecutionStatusRepresentation
65
70
  ServicePlanExecutionSummaryRepresentation:
66
71
  description: Represents the execution summary of a Service Plan
67
72
  type: object # TODO Hand-rolled W-15545227
@@ -110,28 +115,37 @@ types:
110
115
  description: Represent the session information of a Service Plan Generation
111
116
  type: object
112
117
  properties:
113
- botId:
114
- description: Bot id used for invoking the planner service
115
- type: string
116
- botVersionId:
117
- description: Bot id used for invoking the planner service
118
- type: string
119
- clientFeatureId:
120
- description: Client Feature Id used for feedback on the plan generation
121
- type: string
122
- generationsId:
123
- description: Generations Id used for feedback on the plan generation
124
- type: string
125
- planId:
126
- description: Plan id used for plan execution or plan modification
127
- type: string
128
- sessionId:
129
- description: Session id used for plan execution or plan modification
130
- type: string
118
+ clientFeatureKey:
119
+ description: Client Feature Key used for feedback on the plan generation
120
+ type: string | nil
121
+ feedbackKey:
122
+ description: Feedback Key used for feedback on the plan generation
123
+ type: string | nil
124
+ planKey:
125
+ description: Plan Key used for plan execution or plan modification
126
+ type: string | nil
127
+ sessionKey:
128
+ description: Session Key used to communicate with LLM
129
+ type: string | nil
131
130
  ServicePlanGenerationSyncOutputRepresentation:
132
131
  description: Represent the service plan generation result
133
132
  type: object
134
133
  properties:
134
+ copilotId:
135
+ description: The Copilot used for this service plan generation request
136
+ type: string | nil
137
+ copilotName:
138
+ description: Name of the Copilot used for this service plan generation request
139
+ type: string | nil
140
+ errorMessage:
141
+ description: Details related to the Error Reason, if any
142
+ type: string | nil
143
+ id:
144
+ description: The generated request ID
145
+ type: string | nil
146
+ plan:
147
+ description: The generated service plan
148
+ type: ServicePlanOutputRepresentation
135
149
  reason:
136
150
  description: The reason of the service plan creation request job failure
137
151
  type: string
@@ -143,10 +157,10 @@ types:
143
157
  - ThresholdNotMet
144
158
  reasonDetails:
145
159
  description: The details of the service plan creation request job failure
160
+ type: string | nil
161
+ recordId:
162
+ description: The record this plan generation was requested for
146
163
  type: string
147
- servicePlan:
148
- description: The generated service plan
149
- type: ServicePlanOutputRepresentation
150
164
  status:
151
165
  description: The Status of the service plan creation request job
152
166
  type: string
@@ -154,38 +168,53 @@ types:
154
168
  - Error
155
169
  - InProgress
156
170
  - Success
171
+ type:
172
+ description: Service Plan generation request type
173
+ type: string
174
+ enum:
175
+ - Generation
176
+ - Summary
157
177
  ServicePlanOutputRepresentation:
158
178
  description: Represent the generated Service Plan
159
179
  type: object
160
180
  properties:
161
- copilot:
162
- description: The copilot used to generate the service plan
163
- type: string
181
+ copilotSessionInfo:
182
+ description: The session information related to the copilot generating the
183
+ plan
184
+ type: ServicePlanGenerationSessionInformationOutputRepresentation | nil
164
185
  createdDate:
165
186
  description: The created date of the service plan
166
- type: string
167
- generatedPlanId:
187
+ type: string | nil
188
+ id:
168
189
  description: The Id of the plan record
169
- type: string
170
- rawPlan:
190
+ type: string | nil
191
+ intent:
192
+ description: The intent detected for this Service Plan generation request
193
+ type: string | nil
194
+ plan:
171
195
  description: The raw plan generated by the copilot
172
- type: string
173
- sessionInformation:
174
- description: The session information related to the copilot generating the
175
- plan
176
- type: ServicePlanGenerationSessionInformationOutputRepresentation
196
+ type: string | nil
177
197
  steps:
178
198
  description: The steps of the service plan
179
199
  type: array
180
200
  items:
181
- type: object
182
- topic:
183
- description: The topic identified when generating the service plan
184
- type: string
201
+ type: ServicePlanStepRepresentation
185
202
  topicDescription:
186
203
  description: The description of topic identified when generating the service
187
204
  plan
188
- type: string
205
+ type: string | nil
206
+ topicId:
207
+ description: The topic identified when generating the service plan
208
+ type: string | nil
209
+ topicName:
210
+ description: Name of the topic identified when generating the service plan
211
+ type: string | nil
212
+ type:
213
+ description: Type of the Generated Plan
214
+ type: string | nil
215
+ enum:
216
+ - ExecutablePlan
217
+ - SummaryPlan
189
218
  ServicePlanRepresentation:
190
219
  description: Service Plan representation
191
220
  type: object
@@ -208,19 +237,24 @@ types:
208
237
  topicDescription:
209
238
  description: Topic Description
210
239
  type: string
211
- ServicePlanStepAttributeRepresentation:
212
- description: Represent an attribute in a step of a generated Service Plan
240
+ ServicePlanStepExecutionStatusRepresentation:
241
+ description: Represents the execution status of a Service Plan Step
213
242
  type: object
214
243
  properties:
215
- name:
216
- description: The name of the step attribute
217
- type: string
218
- value:
219
- description: The value of the step attribute
244
+ executionStatus:
245
+ description: executionStatus
220
246
  type: string
247
+ enum:
248
+ - Completed
249
+ - Failed
250
+ - InProgress
251
+ - New
252
+ stepId:
253
+ description: stepId
254
+ type: string | nil
221
255
  ServicePlanStepExecutionSummaryRepresentation:
222
256
  description: Represents the execution summary of a Service Plan Step
223
- type: object # TODO Hand-rolled W-15545227
257
+ type: object # TODO Hand-rolled W-16160721
224
258
  properties:
225
259
  message:
226
260
  description: Message
@@ -232,25 +266,23 @@ types:
232
266
  description: Represent a step of a generated Service Plan
233
267
  type: object
234
268
  properties:
235
- description:
236
- description: The description of the service plan step
237
- type: string
269
+ actionOrder:
270
+ description: Order in which this action will be executed
271
+ type: integer
238
272
  functionName:
239
273
  description: The name of the service plan step
240
274
  type: string
241
- inputs:
242
- description: The list of inputs of the service plan step
243
- type: array
244
- items:
245
- type: ServicePlanStepAttributeRepresentation
246
- outputCollection:
247
- description: The output collection of the service plan step
275
+ id:
276
+ description: Generated Plan Step ID
277
+ type: string
278
+ relatedActionId:
279
+ description: ID of the action related to this generated plan step
248
280
  type: string
249
- outputVariable:
250
- description: The output variable of the service plan step
281
+ summary:
282
+ description: The description of the service plan step
251
283
  type: string
252
284
  /connect/service-plan:
253
- /execute/{generatedPlanId}:
285
+ /execute/{planOrStepId}:
254
286
  get:
255
287
  displayName: getServicePlanExecution
256
288
  description: Returns Service Plan execution summary
@@ -262,7 +294,7 @@ types:
262
294
  type: ServicePlanExecutionOutputRepresentation
263
295
  put:
264
296
  displayName: putServicePlanExecution
265
- description: Executes a Service Plan
297
+ description: Executes a Service Plan or a step
266
298
  responses:
267
299
  '200':
268
300
  description: Success
@@ -272,12 +304,12 @@ types:
272
304
  body:
273
305
  application/json:
274
306
  type: ServicePlanExecutionInputRepresentation
275
- (oas-body-name): servicePlanInputRepresentation
307
+ (oas-body-name): servicePlanExecutionInputRepresentation
276
308
  uriParameters:
277
- generatedPlanId:
309
+ planOrStepId:
278
310
  type: string
279
311
  required: true
280
- /generateSync/{recordId}:
312
+ /generationRequests:
281
313
  post:
282
314
  displayName: postServicePlanGenerationSync
283
315
  description: Synchronously trigger the generation of a service plan for a case
@@ -287,11 +319,11 @@ types:
287
319
  body:
288
320
  application/json:
289
321
  type: ServicePlanGenerationSyncOutputRepresentation
322
+ queryParameters:
323
+ recordId:
324
+ type: string
325
+ required: false
290
326
  body:
291
327
  application/json:
292
328
  type: ServicePlanGenerationInputParamRepresentation
293
329
  (oas-body-name): servicePlanGenerationRequest
294
- uriParameters:
295
- recordId:
296
- type: string
297
- required: true
@@ -8,7 +8,9 @@ uses:
8
8
  (luvio.ttl): 500
9
9
 
10
10
  types:
11
- ServicePlanGenerationInputParamRepresentation:
11
+ ServicePlanDataOutputRepresentation:
12
+ (luvio.opaque): true
13
+ ServicePlanExecutionSummaryRepresentation:
12
14
  (luvio.opaque): true
13
15
  ServicePlanGenerationSessionInformationOutputRepresentation:
14
16
  (luvio.opaque): true
@@ -26,16 +28,18 @@ types:
26
28
  (luvio.opaque): true
27
29
  ServicePlanStepRepresentation:
28
30
  (luvio.opaque): true
31
+ ServicePlanStepExecutionStatusRepresentation:
32
+ (luvio.opaque): true
29
33
  ServicePlanExecutionOutputRepresentation:
30
34
  (luvio.key):
31
- id: reason
35
+ id: executionStatus
32
36
 
33
37
  /connect/service-plan:
34
- /execute/{generatedPlanId}:
38
+ /execute/{planOrStepId}:
35
39
  put:
36
40
  (luvio.adapter):
37
41
  name: executeServicePlan
38
- /generateSync/{recordId}:
42
+ /generationRequests:
39
43
  post:
40
44
  (luvio.adapter):
41
45
  name: generateSync
@@ -1,31 +0,0 @@
1
- import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, BaseFragment as $64$luvio_engine_BaseFragment, 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 = "99042f82adcd3c8da3dff5222960ee32";
3
- export declare function validate(obj: any, path?: string): TypeError | null;
4
- export declare const RepresentationType: string;
5
- export declare function normalize(input: ServicePlanStepAttributeRepresentation, existing: ServicePlanStepAttributeRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): ServicePlanStepAttributeRepresentationNormalized;
6
- export declare const select: () => $64$luvio_engine_BaseFragment;
7
- export declare function equals(existing: ServicePlanStepAttributeRepresentationNormalized, incoming: ServicePlanStepAttributeRepresentationNormalized): 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: ServicePlanStepAttributeRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
10
- /**
11
- * Represent an attribute in a step of a generated Service Plan
12
- *
13
- * Keys:
14
- * (none)
15
- */
16
- export interface ServicePlanStepAttributeRepresentationNormalized {
17
- /** The name of the step attribute */
18
- name: string;
19
- /** The value of the step attribute */
20
- value: string;
21
- }
22
- /**
23
- * Represent an attribute in a step of a generated Service Plan
24
- *
25
- * Keys:
26
- * (none)
27
- */
28
- export interface ServicePlanStepAttributeRepresentation {
29
- name: string;
30
- value: string;
31
- }