@salesforce/lds-adapters-service-serviceplan 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/service-serviceplan.js +1647 -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/executeServicePlan.d.ts +16 -0
  5. package/dist/es/es2018/types/src/generated/adapters/generateServicePlan.d.ts +23 -0
  6. package/dist/es/es2018/types/src/generated/adapters/getGenerationRequest.d.ts +27 -0
  7. package/dist/es/es2018/types/src/generated/adapters/getServicePlan.d.ts +28 -0
  8. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +6 -0
  9. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +11 -0
  10. package/dist/es/es2018/types/src/generated/resources/getConnectServicePlanGenerationRequestsByRequestId.d.ts +15 -0
  11. package/dist/es/es2018/types/src/generated/resources/getConnectServicePlanServicePlanDetailsByRecordId.d.ts +16 -0
  12. package/dist/es/es2018/types/src/generated/resources/postConnectServicePlanGenerationRequests.d.ts +22 -0
  13. package/dist/es/es2018/types/src/generated/resources/putConnectServicePlanExecuteByPlanOrStepId.d.ts +15 -0
  14. package/dist/es/es2018/types/src/generated/types/ServicePlanDetailsOutputRepresentation.d.ts +60 -0
  15. package/dist/es/es2018/types/src/generated/types/ServicePlanDetailsRepresentation.d.ts +53 -0
  16. package/dist/es/es2018/types/src/generated/types/ServicePlanExecutionInputRepresentation.d.ts +28 -0
  17. package/dist/es/es2018/types/src/generated/types/ServicePlanExecutionOutputRepresentation.d.ts +50 -0
  18. package/dist/es/es2018/types/src/generated/types/ServicePlanGenerationInputMapRepresentation.d.ts +32 -0
  19. package/dist/es/es2018/types/src/generated/types/ServicePlanGenerationInputParamRepresentation.d.ts +38 -0
  20. package/dist/es/es2018/types/src/generated/types/ServicePlanGenerationOutputRepresentation.d.ts +57 -0
  21. package/dist/es/es2018/types/src/generated/types/ServicePlanReferenceDetailsRepresentation.d.ts +34 -0
  22. package/dist/es/es2018/types/src/generated/types/ServicePlanStepCitationSourceRepresentation.d.ts +34 -0
  23. package/dist/es/es2018/types/src/generated/types/ServicePlanStepDetailsRepresentation.d.ts +54 -0
  24. package/dist/es/es2018/types/src/generated/types/ServicePlanStepExecutionStatusRepresentation.d.ts +31 -0
  25. package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
  26. package/package.json +66 -0
  27. package/sfdc/index.d.ts +1 -0
  28. package/sfdc/index.js +1752 -0
  29. package/src/raml/api.raml +351 -0
  30. package/src/raml/luvio.raml +57 -0
@@ -0,0 +1,351 @@
1
+ #%RAML 1.0
2
+ securedBy:
3
+ - OAuth2
4
+ title: Salesforce Connect API
5
+ version: '65.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
+ ServicePlanDetailsOutputRepresentation:
29
+ description: Represent the service plan details
30
+ type: object
31
+ properties:
32
+ plan:
33
+ description: The Service Plan Details
34
+ type: ServicePlanDetailsRepresentation
35
+ planRequestId:
36
+ description: The record ID of plan request passed to this Connect API
37
+ type: string
38
+ reason:
39
+ description: The reason of the Service Plan Details
40
+ type: string
41
+ enum:
42
+ - CannotGetPlanDetails
43
+ - None
44
+ reasonDetails:
45
+ description: The reason details of the Service Plan Details
46
+ type: string | nil #handRolled
47
+ status:
48
+ description: The status of the Service Plan Details
49
+ type: string
50
+ enum:
51
+ - Error
52
+ - Success
53
+ ServicePlanDetailsRepresentation:
54
+ description: Service Plan representation
55
+ type: object
56
+ properties:
57
+ clientFeatureId:
58
+ description: ClientFeature ID
59
+ type: string | nil #handRolled
60
+ createdDate:
61
+ description: Created Date
62
+ type: string | nil #handRolled
63
+ executionStatus:
64
+ description: Execution Status
65
+ type: string | nil #handRolled
66
+ enum:
67
+ - Completed
68
+ - Failed
69
+ - InProgress
70
+ - New
71
+ feedbackId:
72
+ description: Feedback ID
73
+ type: string | nil #handRolled
74
+ hasContextChanged:
75
+ description: Has Context Changed
76
+ type: boolean
77
+ planHeader:
78
+ description: PlanHeader
79
+ type: string | nil #handRolled
80
+ planId:
81
+ description: Plan ID
82
+ type: string | nil #handRolled
83
+ servicePlanSteps:
84
+ description: Service Plan Steps
85
+ type: array
86
+ items:
87
+ type: ServicePlanStepDetailsRepresentation
88
+ topic:
89
+ description: Topic
90
+ type: string | nil #handRolled
91
+ ServicePlanExecutionInputRepresentation:
92
+ description: Represents a generated service plan input context required for service plan execution
93
+ type: object
94
+ properties:
95
+ action:
96
+ description: Action to be performed by the API
97
+ type: string
98
+ enum:
99
+ - MarkCompleted
100
+ - MarkUncompleted
101
+ ServicePlanExecutionOutputRepresentation:
102
+ description: Represent the service plan execution result
103
+ type: object
104
+ properties:
105
+ executionStatus:
106
+ description: The Status of the service plan execution request job
107
+ type: string
108
+ enum:
109
+ - Completed
110
+ - Failed
111
+ - InProgress
112
+ - New
113
+ planSteps:
114
+ description: All the step status
115
+ type: array
116
+ items:
117
+ type: ServicePlanStepExecutionStatusRepresentation
118
+ ServicePlanGenerationInputMapRepresentation:
119
+ description: Represents a request for generating a service plan
120
+ type: object
121
+ properties:
122
+ map:
123
+ description: Additional context for the plan generation request
124
+ type: object
125
+ properties:
126
+ //:
127
+ type: string
128
+ ServicePlanGenerationInputParamRepresentation:
129
+ description: Represents a request for generating a service plan
130
+ type: object
131
+ properties:
132
+ additionalContext:
133
+ description: Additional context for the plan generation request
134
+ type: object
135
+ properties:
136
+ //:
137
+ type: string
138
+ generationMode:
139
+ description: Plan generation mode
140
+ type: string
141
+ enum:
142
+ - NoSave
143
+ - Save
144
+ source:
145
+ description: Origin for the plan generation request
146
+ type: string
147
+ ServicePlanGenerationOutputRepresentation:
148
+ description: Represent the service plan generation result
149
+ type: object
150
+ properties:
151
+ errorCode:
152
+ description: Error code to identify the error
153
+ type: string | nil #handRolled: success have no error code
154
+ errorMessage:
155
+ description: Details related to the Error Reason, if any
156
+ type: string | nil #handRolled
157
+ id:
158
+ description: The generated request ID
159
+ type: string | nil #handRolled: NoSave Mode have no id
160
+ reason:
161
+ description: The reason of the service plan creation request job failure
162
+ type: string
163
+ enum:
164
+ - CannotGeneratePlan
165
+ - NoEligibilityConfig
166
+ - NoPlanGenerated
167
+ - None
168
+ - PlanAlreadyExists
169
+ - PlanEmpty
170
+ - PlanEmptyInsufficientData
171
+ - ThresholdError
172
+ - ThresholdNotMet
173
+ recordId:
174
+ description: The record this plan generation was requested for
175
+ type: string
176
+ status:
177
+ description: The Status of the service plan creation request job
178
+ type: string
179
+ enum:
180
+ - Error
181
+ - InProgress
182
+ - Incomplete
183
+ - Success
184
+ type:
185
+ description: Service Plan generation request type
186
+ type: string
187
+ enum:
188
+ - Generation
189
+ - GenerationPreview
190
+ - Summary
191
+ ServicePlanReferenceDetailsRepresentation:
192
+ description: Service Plan reference representation
193
+ type: object
194
+ properties:
195
+ id:
196
+ description: Reference ID
197
+ type: string
198
+ label:
199
+ description: Reference name
200
+ type: string
201
+ type:
202
+ description: Reference type
203
+ type: string
204
+ ServicePlanStepCitationSourceRepresentation:
205
+ description: Service Plan citations representation
206
+ type: object
207
+ properties:
208
+ recordId:
209
+ description: Citation RecordId, if any
210
+ type: string | nil #handRolled
211
+ sourceObjectName:
212
+ description: Citation source type
213
+ type: string | nil #handRolled
214
+ url:
215
+ description: Citation URL
216
+ type: string | nil #handRolled
217
+ ServicePlanStepDetailsRepresentation:
218
+ description: Service Plan step representation
219
+ type: object
220
+ properties:
221
+ citations:
222
+ description: Step citations
223
+ type: array
224
+ items:
225
+ type: ServicePlanStepCitationSourceRepresentation
226
+ required: false # Hand-Rolled W-18566464
227
+ executionStatus:
228
+ description: Step execution state
229
+ type: string
230
+ enum:
231
+ - Completed
232
+ - Failed
233
+ - InProgress
234
+ - New
235
+ groupName:
236
+ description: Group Name
237
+ type: string | nil #handRolled
238
+ isSuggested:
239
+ description: Suggested step
240
+ type: boolean
241
+ order:
242
+ description: Step order
243
+ type: integer
244
+ references:
245
+ description: Step references
246
+ type: array
247
+ items:
248
+ type: ServicePlanReferenceDetailsRepresentation
249
+ required: false # Hand-Rolled W-18566464
250
+ stepId:
251
+ description: Step ID
252
+ type: string
253
+ stepName:
254
+ description: Step name
255
+ type: string
256
+ stepSummary:
257
+ description: Step summary
258
+ type: string
259
+ ServicePlanStepExecutionStatusRepresentation:
260
+ description: Represents the execution status of a Service Plan Step
261
+ type: object
262
+ properties:
263
+ executionStatus:
264
+ description: executionStatus
265
+ type: string
266
+ enum:
267
+ - Completed
268
+ - Failed
269
+ - InProgress
270
+ - New
271
+ stepId:
272
+ description: stepId
273
+ type: string | nil #handRolled
274
+ /connect/service-plan:
275
+ /execute/{planOrStepId}:
276
+ put:
277
+ displayName: putServicePlanExecution
278
+ description: Executes a service plan or a step
279
+ responses:
280
+ '200':
281
+ description: Success
282
+ body:
283
+ application/json:
284
+ type: ServicePlanExecutionOutputRepresentation
285
+ body:
286
+ application/json:
287
+ type: ServicePlanExecutionInputRepresentation
288
+ (oas-body-name): servicePlanExecutionInputRepresentation
289
+ uriParameters:
290
+ planOrStepId:
291
+ type: string
292
+ required: true
293
+ /generationRequests:
294
+ post:
295
+ displayName: postServicePlanGenerationPostable
296
+ description: Trigger the generation of a service plan for a case
297
+ responses:
298
+ '200':
299
+ description: Success
300
+ body:
301
+ application/json:
302
+ type: ServicePlanGenerationOutputRepresentation
303
+ queryParameters:
304
+ processingMode:
305
+ type: string
306
+ required: false
307
+ enum:
308
+ - Async
309
+ - Sync
310
+ recordId:
311
+ type: string
312
+ required: false
313
+ regenerate:
314
+ type: boolean
315
+ required: false
316
+ default: false
317
+ useCase:
318
+ type: string
319
+ required: false
320
+ body:
321
+ application/json:
322
+ type: ServicePlanGenerationInputParamRepresentation
323
+ (oas-body-name): servicePlanGenerationRequest
324
+ /generationRequests/{requestId}:
325
+ get:
326
+ displayName: getServicePlanGenerationGettable
327
+ description: Retrieve the status of a service plan generation request
328
+ responses:
329
+ '200':
330
+ description: Success
331
+ body:
332
+ application/json:
333
+ type: ServicePlanGenerationOutputRepresentation
334
+ uriParameters:
335
+ requestId:
336
+ type: string
337
+ required: true
338
+ /servicePlanDetails/{recordId}:
339
+ get:
340
+ displayName: getServicePlanDetails
341
+ description: Returns Service Plan details
342
+ responses:
343
+ '200':
344
+ description: Success
345
+ body:
346
+ application/json:
347
+ type: ServicePlanDetailsOutputRepresentation
348
+ uriParameters:
349
+ recordId:
350
+ type: string
351
+ required: true
@@ -0,0 +1,57 @@
1
+ #%RAML 1.0 Overlay
2
+ extends: ./api.raml
3
+
4
+ uses:
5
+ luvio: luvio://annotations.raml
6
+
7
+ (luvio.keyPrefix): 'ServicePlan'
8
+ (luvio.ttl): 500
9
+
10
+ types:
11
+ ServicePlanGenerationOutputRepresentation:
12
+ (luvio.key):
13
+ id: id
14
+ (luvio.ttl): 1000
15
+ (luvio.updateAvailable):
16
+ name: notifyServicePlanGenerationUpdateAvailable
17
+ parameters:
18
+ id: id
19
+ ServicePlanStepExecutionStatusRepresentation:
20
+ (luvio.opaque): true
21
+ ServicePlanExecutionOutputRepresentation:
22
+ (luvio.key):
23
+ id: executionStatus
24
+ ServicePlanDetailsRepresentation:
25
+ (luvio.opaque): true
26
+ ServicePlanStepDetailsRepresentation:
27
+ (luvio.opaque): true
28
+ ServicePlanDetailsOutputRepresentation:
29
+ (luvio.key):
30
+ id: planRequestId
31
+ (luvio.ttl): 1000
32
+ (luvio.updateAvailable):
33
+ name: notifyServicePlanDetailsUpdateAvailable
34
+ parameters:
35
+ id: id
36
+
37
+ /connect/service-plan:
38
+ /execute/{planOrStepId}:
39
+ put:
40
+ (luvio.adapter):
41
+ name: executeServicePlan
42
+ /generationRequests:
43
+ post:
44
+ (luvio.adapter):
45
+ name: generateServicePlan
46
+ /generationRequests/{requestId}:
47
+ get:
48
+ (luvio.adapter):
49
+ name: getGenerationRequest
50
+ (luvio.key):
51
+ id: urlParams.requestId
52
+ /servicePlanDetails/{recordId}:
53
+ get:
54
+ (luvio.adapter):
55
+ name: getServicePlan
56
+ (luvio.key):
57
+ id: urlParams.recordId