@salesforce/lds-adapters-cdp-byoc 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 (35) hide show
  1. package/LICENSE.txt +82 -0
  2. package/dist/es/es2018/cdp-byoc.js +2145 -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/createCustomCodeDeployment.d.ts +26 -0
  5. package/dist/es/es2018/types/src/generated/adapters/deleteCustomCodeDeployment.d.ts +14 -0
  6. package/dist/es/es2018/types/src/generated/adapters/getCustomCodeDeployment.d.ts +28 -0
  7. package/dist/es/es2018/types/src/generated/adapters/getCustomCodeDeployments.d.ts +32 -0
  8. package/dist/es/es2018/types/src/generated/adapters/getCustomCodeExecution.d.ts +28 -0
  9. package/dist/es/es2018/types/src/generated/adapters/getCustomCodeExecutionLogs.d.ts +28 -0
  10. package/dist/es/es2018/types/src/generated/adapters/getCustomCodeExecutions.d.ts +29 -0
  11. package/dist/es/es2018/types/src/generated/adapters/updateCustomCodeDeployment.d.ts +20 -0
  12. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +8 -0
  13. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +15 -0
  14. package/dist/es/es2018/types/src/generated/resources/deleteSsotDataCustomCodeByCustomCodeNameOrId.d.ts +12 -0
  15. package/dist/es/es2018/types/src/generated/resources/getSsotDataCustomCode.d.ts +20 -0
  16. package/dist/es/es2018/types/src/generated/resources/getSsotDataCustomCodeByCustomCodeNameOrId.d.ts +16 -0
  17. package/dist/es/es2018/types/src/generated/resources/getSsotDataCustomCodeExecutionsByCustomCodeExecutionIdAndCustomCodeNameOrId.d.ts +16 -0
  18. package/dist/es/es2018/types/src/generated/resources/getSsotDataCustomCodeExecutionsByCustomCodeNameOrId.d.ts +19 -0
  19. package/dist/es/es2018/types/src/generated/resources/getSsotDataCustomCodeExecutionsLogsByCustomCodeExecutionIdAndCustomCodeNameOrId.d.ts +16 -0
  20. package/dist/es/es2018/types/src/generated/resources/patchSsotDataCustomCodeByCustomCodeNameOrId.d.ts +19 -0
  21. package/dist/es/es2018/types/src/generated/resources/postSsotDataCustomCode.d.ts +23 -0
  22. package/dist/es/es2018/types/src/generated/types/CdpUserRepresentation.d.ts +34 -0
  23. package/dist/es/es2018/types/src/generated/types/CustomCodeDeploymentCollectionRepresentation.d.ts +47 -0
  24. package/dist/es/es2018/types/src/generated/types/CustomCodeDeploymentInputRepresentation.d.ts +68 -0
  25. package/dist/es/es2018/types/src/generated/types/CustomCodeDeploymentRepresentation.d.ts +99 -0
  26. package/dist/es/es2018/types/src/generated/types/CustomCodeExecutionBaseRepresentation.d.ts +55 -0
  27. package/dist/es/es2018/types/src/generated/types/CustomCodeExecutionCollectionRepresentation.d.ts +38 -0
  28. package/dist/es/es2018/types/src/generated/types/CustomCodeExecutionLogRepresentation.d.ts +28 -0
  29. package/dist/es/es2018/types/src/generated/types/CustomCodePatchInputRepresentation.d.ts +40 -0
  30. package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
  31. package/package.json +66 -0
  32. package/sfdc/index.d.ts +1 -0
  33. package/sfdc/index.js +2265 -0
  34. package/src/raml/api.raml +493 -0
  35. package/src/raml/luvio.raml +54 -0
@@ -0,0 +1,493 @@
1
+ #%RAML 1.0
2
+ securedBy:
3
+ - OAuth2
4
+ title: Salesforce Connect API
5
+ version: '63.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
+ CdpUserRepresentation:
29
+ description: Represents a user
30
+ type: object
31
+ properties:
32
+ id:
33
+ description: The 18 character user ID
34
+ type: string
35
+ name:
36
+ description: The name of the user
37
+ type: string
38
+ profilePhotoUrl:
39
+ description: The Chatter profile photo of the user
40
+ type: string
41
+ CustomCodeDeploymentInputRepresentation:
42
+ description: Input representation for creating a Custom Code Deployment
43
+ # Hand-rolled: Combines this object with the original
44
+ # base object (CdpAssetBaseInputRepresentation) as Luvio
45
+ # does not like multiple levels of inheritance in objects
46
+ type: object
47
+ properties:
48
+ # Hand-rolled: Our Connect API does not require a value be passed in here
49
+ codeType?:
50
+ description: Custom code type
51
+ type: string
52
+ enum:
53
+ - Function
54
+ - Script
55
+ functionInvokeOptions?:
56
+ description: List of function invoke options
57
+ type: array
58
+ items:
59
+ type: string
60
+ enum:
61
+ - UnstructuredChunking
62
+ computeType:
63
+ description: Compute type for executions of the custom code
64
+ type: string
65
+ enum:
66
+ - Cpu_l
67
+ - Cpu_m
68
+ - Cpu_s
69
+ - Cpu_xs
70
+ - High_cpu_l
71
+ - High_cpu_m
72
+ - High_cpu_s
73
+ - High_cpu_xs
74
+ - High_memory_cpu_l
75
+ - High_memory_cpu_m
76
+ - High_memory_cpu_s
77
+ - High_memory_cpu_xs
78
+ # Hand-rolled: Our Connect API does not require a value be passed in here
79
+ description?:
80
+ description: Description of the custom code deployment
81
+ type: string
82
+ # Hand-rolled: Our Connect API does not require an ID for all endpoints
83
+ id?:
84
+ description: Id
85
+ type: string
86
+ label:
87
+ description: Label of the custom code deployment
88
+ type: string
89
+ name:
90
+ description: Name
91
+ type: string
92
+ # Hand-rolled: Our Connect API does not use the namespace field currently
93
+ namespace?:
94
+ description: Namespace
95
+ type: string
96
+ # Hand-rolled: Our Connect API does not require a value be passed in here
97
+ parameters?:
98
+ description: Parameters of the custom code deployment
99
+ type: object
100
+ properties:
101
+ //:
102
+ type: string
103
+ version:
104
+ description: Version of the custom code
105
+ type: string
106
+ CustomCodeDeploymentRepresentation:
107
+ description: A custom code deployment.
108
+ # Hand-rolled: Combines this object with the original
109
+ # base object (CdpAssetBaseRepresentation) as Luvio
110
+ # does not like multiple levels of inheritance in objects
111
+ type: object
112
+ properties:
113
+ # Hand-rolled: Our Connect API does not always return a value here
114
+ codeType:
115
+ description: Custom code type
116
+ type: string
117
+ enum:
118
+ - Function
119
+ - Script
120
+ functionInvokeOptions?:
121
+ description: List of function invoke options
122
+ type: array
123
+ items:
124
+ type: string
125
+ enum:
126
+ - UnstructuredChunking
127
+ computeType:
128
+ description: Compute type for executions of the custom code
129
+ type: string
130
+ enum:
131
+ - Cpu_l
132
+ - Cpu_m
133
+ - Cpu_s
134
+ - Cpu_xs
135
+ - High_cpu_l
136
+ - High_cpu_m
137
+ - High_cpu_s
138
+ - High_cpu_xs
139
+ - High_memory_cpu_l
140
+ - High_memory_cpu_m
141
+ - High_memory_cpu_s
142
+ - High_memory_cpu_xs
143
+ createdBy:
144
+ description: Created by
145
+ type: CdpUserRepresentation
146
+ createdDate:
147
+ description: Created date
148
+ type: string
149
+ # Hand-rolled: Connect API does not return this value when null
150
+ deploymentFailureCode?:
151
+ description: Failure code for the custom code deployment
152
+ type: integer
153
+ # Hand-rolled: Connect API does not return this value when null
154
+ deploymentFailureReason?:
155
+ description: Failure reason for the custom code deployment
156
+ type: string
157
+ deploymentStatus:
158
+ description: Deployment status of the custom code
159
+ type: string
160
+ enum:
161
+ - Deployed
162
+ - Error
163
+ - Initializing
164
+ - Scanning
165
+ # Hand-rolled: Connect API does not return this value when not provided on input
166
+ description?:
167
+ description: Description of the custom code deployment
168
+ type: string
169
+ fileUploadUrl:
170
+ description: URL to use for custom code file upload
171
+ type: string
172
+ id:
173
+ description: The 18 character ID of the asset
174
+ type: string
175
+ label:
176
+ description: Label of the asset
177
+ type: string
178
+ lastModifiedBy:
179
+ description: Last modified by
180
+ type: CdpUserRepresentation
181
+ lastModifiedDate:
182
+ description: Last modified date
183
+ type: string
184
+ name:
185
+ description: Name of the asset
186
+ type: string
187
+ # Hand-rolled: namespace is not returned by our Connect API implementation
188
+ namespace?:
189
+ description: Namespace of the asset
190
+ type: string
191
+ parameters:
192
+ description: Parameters of custom code deployment
193
+ type: object
194
+ properties:
195
+ //:
196
+ # Hand rolled as we are using the Object type in Java which can refer to any data class
197
+ type: any
198
+ status:
199
+ description: Sync status of the custom code deployment
200
+ type: string
201
+ enum:
202
+ - Active
203
+ - Deleting
204
+ - Error
205
+ - Processing
206
+ url:
207
+ description: Url
208
+ type: string
209
+ version:
210
+ description: Version of the custom code
211
+ type: string
212
+ CustomCodeDeploymentCollectionRepresentation:
213
+ description: Custom Code Deployment collection
214
+ # Hand-rolled: Combines this object with the original
215
+ # base object (CdpPaginatedResponseBaseRepresentation) as Luvio
216
+ # does not like multiple levels of inheritance in objects
217
+ type: object
218
+ properties:
219
+ customCodeDeployments:
220
+ description: The custom code deployments.
221
+ type: array
222
+ items:
223
+ type: CustomCodeDeploymentRepresentation
224
+ currentPageUrl:
225
+ description: Current page url
226
+ type: string
227
+ nextPageUrl?:
228
+ description: Next page url if it exists
229
+ type: string
230
+ totalSize:
231
+ description: Total size of collection
232
+ type: integer
233
+ CustomCodeExecutionBaseRepresentation:
234
+ description: BYOC Custom Code Executions
235
+ type: object
236
+ properties:
237
+ durationInSeconds:
238
+ description: duration of code execution in seconds
239
+ type: integer
240
+ endTime:
241
+ description: end time of code execution
242
+ type: string
243
+ errorCode?:
244
+ description: error code
245
+ type: integer
246
+ errorMessage?:
247
+ description: detailed error message
248
+ type: string
249
+ id:
250
+ description: BYOC Custom Code Execution Id
251
+ type: string
252
+ rowsRead:
253
+ description: number of objects read
254
+ # Hand-rolled: The current API spec defines this are int64 but Luvio
255
+ # only supports a max of int32. The actual service producing the value
256
+ # casts this as a standard Java int which allows us to use the default
257
+ # of int32
258
+ # format: int64
259
+ type: integer
260
+ rowsWritten:
261
+ description: number of objects written
262
+ # Hand-rolled: The current API spec defines this are int64 but Luvio
263
+ # only supports a max of int32. The actual service producing the value
264
+ # casts this as a standard Java int which allows us to use the default
265
+ # of int32
266
+ # format: int64
267
+ type: integer
268
+ startTime:
269
+ description: start time of code execution
270
+ type: string
271
+ status:
272
+ description: BYOC Custom Code Execution Status
273
+ type: string
274
+ enum:
275
+ - Cancelled
276
+ - Failure
277
+ - Running
278
+ - Success
279
+ submittedTime:
280
+ description: time when execution was submitted
281
+ type: string
282
+ CustomCodeExecutionCollectionRepresentation:
283
+ description: BYOC Custom Code Execution Collection
284
+ # Hand-rolled: Combines this object with the original
285
+ # base object (CdpPaginatedResponseBaseRepresentation) as Luvio
286
+ # does not like multiple levels of inheritance in objects
287
+ type: object
288
+ properties:
289
+ currentPageUrl?:
290
+ description: Current page url
291
+ type: string
292
+ executions:
293
+ description: BYOC Custom Code Collection of Executions
294
+ type: array
295
+ items:
296
+ type: CustomCodeExecutionBaseRepresentation
297
+ nextPageUrl?:
298
+ description: Next page url if it exists
299
+ type: string
300
+ totalSize?:
301
+ description: Total size of collection
302
+ type: integer
303
+ CustomCodeExecutionLogRepresentation:
304
+ description: BYOC Custom Code Execution Log
305
+ type: object
306
+ properties:
307
+ downloadUrl:
308
+ description: BYOC Custom Code Execution Log
309
+ type: string
310
+ CustomCodePatchInputRepresentation:
311
+ description: Input representation for updating a Custom Code Deployment
312
+ type: object
313
+ properties:
314
+ # Hand-rolled: None of these props are required
315
+ computeType?:
316
+ description: Compute type for executions of the custom code
317
+ type: string
318
+ enum:
319
+ - Cpu_l
320
+ - Cpu_m
321
+ - Cpu_s
322
+ - Cpu_xs
323
+ - High_cpu_l
324
+ - High_cpu_m
325
+ - High_cpu_s
326
+ - High_cpu_xs
327
+ - High_memory_cpu_l
328
+ - High_memory_cpu_m
329
+ - High_memory_cpu_s
330
+ - High_memory_cpu_xs
331
+ functionInvokeOptions?:
332
+ description: List of function invoke options
333
+ type: array
334
+ items:
335
+ type: string
336
+ enum:
337
+ - UnstructuredChunking
338
+ description?:
339
+ description: Description of the custom code deployment
340
+ type: string
341
+ label?:
342
+ description: Label of the custom code deployment
343
+ type: string
344
+ version?:
345
+ description: Version of the custom code
346
+ type: string
347
+ /ssot:
348
+ /data-custom-code:
349
+ post:
350
+ displayName: postCdpCustomCodeDeploymentCollection
351
+ description: Create a new custom code deployment
352
+ responses:
353
+ '200':
354
+ description: Success
355
+ body:
356
+ application/json:
357
+ type: CustomCodeDeploymentRepresentation
358
+ body:
359
+ application/json:
360
+ type: CustomCodeDeploymentInputRepresentation
361
+ # TODO Hand-rolled W-9271732
362
+ # required: false
363
+ (oas-body-name): customCodeDeployment
364
+ get:
365
+ displayName: getCdpCustomCodeDeploymentCollection
366
+ description: Get a list of custom code deployments
367
+ responses:
368
+ '200':
369
+ description: Success
370
+ body:
371
+ application/json:
372
+ type: CustomCodeDeploymentCollectionRepresentation
373
+ queryParameters:
374
+ codeType:
375
+ type: string
376
+ required: false
377
+ enum:
378
+ - Function
379
+ - Script
380
+ deploymentStatus:
381
+ type: string
382
+ required: false
383
+ enum:
384
+ - Deployed
385
+ - Error
386
+ - Initializing
387
+ - Pending
388
+ - Scanning
389
+ label:
390
+ type: string
391
+ required: false
392
+ limit:
393
+ type: integer
394
+ required: false
395
+ offset:
396
+ type: integer
397
+ required: false
398
+ orderBy:
399
+ type: string
400
+ required: false
401
+ enum:
402
+ - NameDesc
403
+ - VersionDesc
404
+ /data-custom-code/{customCodeNameOrId}:
405
+ delete:
406
+ displayName: deleteCdpCustomCodeDeployment
407
+ description: Delete a data custom code
408
+ responses:
409
+ '200':
410
+ description: Success
411
+ get:
412
+ displayName: getCdpCustomCodeDeployment
413
+ description: Get a data custom code
414
+ responses:
415
+ '200':
416
+ description: Success
417
+ body:
418
+ application/json:
419
+ type: CustomCodeDeploymentRepresentation
420
+ patch:
421
+ displayName: patchCdpCustomCodeDeployment
422
+ description: Patch a data custom code
423
+ responses:
424
+ '200':
425
+ description: Success
426
+ body:
427
+ application/json:
428
+ type: CustomCodeDeploymentRepresentation
429
+ body:
430
+ application/json:
431
+ type: CustomCodePatchInputRepresentation
432
+ # TODO Hand-rolled W-9271732
433
+ # required: false
434
+ (oas-body-name): customCodeDeployment
435
+ uriParameters:
436
+ customCodeNameOrId:
437
+ type: string
438
+ required: true
439
+ /data-custom-code/{customCodeNameOrId}/executions:
440
+ get:
441
+ displayName: getCdpCustomCodeExecution
442
+ description: BYOC Custom Code Executions
443
+ responses:
444
+ '200':
445
+ description: Success
446
+ body:
447
+ application/json:
448
+ type: CustomCodeExecutionCollectionRepresentation
449
+ queryParameters:
450
+ limit:
451
+ type: integer
452
+ required: false
453
+ offset:
454
+ type: integer
455
+ required: false
456
+ uriParameters:
457
+ customCodeNameOrId:
458
+ type: string
459
+ required: true
460
+ /data-custom-code/{customCodeNameOrId}/executions/{customCodeExecutionId}:
461
+ get:
462
+ displayName: getCdpCustomCodeExecutionSingle
463
+ description: BYOC Custom Code Execution
464
+ responses:
465
+ '200':
466
+ description: Success
467
+ body:
468
+ application/json:
469
+ type: CustomCodeExecutionBaseRepresentation
470
+ uriParameters:
471
+ customCodeExecutionId:
472
+ type: string
473
+ required: true
474
+ customCodeNameOrId:
475
+ type: string
476
+ required: true
477
+ /data-custom-code/{customCodeNameOrId}/executions/{customCodeExecutionId}/logs:
478
+ get:
479
+ displayName: getCdpCustomCodeExecutionLog
480
+ description: BYOC Custom Code logs for an Execution
481
+ responses:
482
+ '200':
483
+ description: Success
484
+ body:
485
+ application/json:
486
+ type: CustomCodeExecutionLogRepresentation
487
+ uriParameters:
488
+ customCodeExecutionId:
489
+ type: string
490
+ required: true
491
+ customCodeNameOrId:
492
+ type: string
493
+ required: true
@@ -0,0 +1,54 @@
1
+ #%RAML 1.0 Overlay
2
+ extends: ./api.raml
3
+
4
+ uses:
5
+ luvio: luvio://annotations.raml
6
+
7
+ (luvio.keyPrefix): 'byoc'
8
+ (luvio.ttl): 60000
9
+
10
+ types:
11
+ CdpAssetBaseRepresentation:
12
+ (luvio.key):
13
+ id: id
14
+ CustomCodeDeploymentInputRepresentation:
15
+ (luvio.key):
16
+ name: name
17
+ CustomCodeDeploymentRepresentation:
18
+ (luvio.key):
19
+ id: id
20
+
21
+ /ssot:
22
+ /data-custom-code:
23
+ get:
24
+ (luvio.adapter):
25
+ name: getCustomCodeDeployments
26
+ post:
27
+ (luvio.adapter):
28
+ name: createCustomCodeDeployment
29
+ /{customCodeNameOrId}:
30
+ get:
31
+ (luvio.adapter):
32
+ name: getCustomCodeDeployment
33
+ (luvio.key):
34
+ id: urlParams.customCodeNameOrId
35
+ patch:
36
+ (luvio.adapter):
37
+ name: updateCustomCodeDeployment
38
+ delete:
39
+ (luvio.adapter):
40
+ name: deleteCustomCodeDeployment
41
+ (luvio.key):
42
+ id: urlParams.customCodeNameOrId
43
+ /executions:
44
+ get:
45
+ (luvio.adapter):
46
+ name: getCustomCodeExecutions
47
+ /{customCodeExecutionId}:
48
+ get:
49
+ (luvio.adapter):
50
+ name: getCustomCodeExecution
51
+ /logs:
52
+ get:
53
+ (luvio.adapter):
54
+ name: getCustomCodeExecutionLogs