@salesforce/lds-adapters-cdp-document-processing 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 (46) hide show
  1. package/LICENSE.txt +82 -0
  2. package/dist/es/es2018/cdp-document-processing.js +2049 -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/createIdpConfiguration.d.ts +26 -0
  5. package/dist/es/es2018/types/src/generated/adapters/deleteIdpConfiguration.d.ts +14 -0
  6. package/dist/es/es2018/types/src/generated/adapters/extractDataUsingIdpConfiguration.d.ts +31 -0
  7. package/dist/es/es2018/types/src/generated/adapters/generateIdpConfigurationSchema.d.ts +17 -0
  8. package/dist/es/es2018/types/src/generated/adapters/getIdpConfiguration.d.ts +28 -0
  9. package/dist/es/es2018/types/src/generated/adapters/getIdpConfigurations.d.ts +31 -0
  10. package/dist/es/es2018/types/src/generated/adapters/getIdpGlobalConfig.d.ts +26 -0
  11. package/dist/es/es2018/types/src/generated/adapters/updateIdpConfiguration.d.ts +18 -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 +14 -0
  14. package/dist/es/es2018/types/src/generated/resources/deleteSsotDocumentProcessingConfigurationsByIdOrApiName.d.ts +12 -0
  15. package/dist/es/es2018/types/src/generated/resources/getSsotDocumentProcessingConfigurations.d.ts +19 -0
  16. package/dist/es/es2018/types/src/generated/resources/getSsotDocumentProcessingConfigurationsByIdOrApiName.d.ts +16 -0
  17. package/dist/es/es2018/types/src/generated/resources/getSsotDocumentProcessingGlobalConfig.d.ts +12 -0
  18. package/dist/es/es2018/types/src/generated/resources/patchSsotDocumentProcessingConfigurationsByIdOrApiName.d.ts +17 -0
  19. package/dist/es/es2018/types/src/generated/resources/postSsotDocumentProcessingActionsExtractData.d.ts +19 -0
  20. package/dist/es/es2018/types/src/generated/resources/postSsotDocumentProcessingActionsGenerateSchema.d.ts +14 -0
  21. package/dist/es/es2018/types/src/generated/resources/postSsotDocumentProcessingConfigurations.d.ts +23 -0
  22. package/dist/es/es2018/types/src/generated/types/CdpAssetBaseRepresentation.d.ts +49 -0
  23. package/dist/es/es2018/types/src/generated/types/CdpPaginatedResponseBaseRepresentation.d.ts +35 -0
  24. package/dist/es/es2018/types/src/generated/types/CdpUserRepresentation.d.ts +34 -0
  25. package/dist/es/es2018/types/src/generated/types/IdpConfigurationBaseRepresentation.d.ts +47 -0
  26. package/dist/es/es2018/types/src/generated/types/IdpConfigurationDetailsRepresentation.d.ts +68 -0
  27. package/dist/es/es2018/types/src/generated/types/IdpConfigurationInputRepresentation.d.ts +60 -0
  28. package/dist/es/es2018/types/src/generated/types/IdpConfigurationPatchInputRepresentation.d.ts +35 -0
  29. package/dist/es/es2018/types/src/generated/types/IdpConfigurationRepresentation.d.ts +26 -0
  30. package/dist/es/es2018/types/src/generated/types/IdpConfigurationsCollectionRepresentation.d.ts +31 -0
  31. package/dist/es/es2018/types/src/generated/types/IdpContentTypeRepresentation.d.ts +38 -0
  32. package/dist/es/es2018/types/src/generated/types/IdpExtractDataInputRepresentation.d.ts +40 -0
  33. package/dist/es/es2018/types/src/generated/types/IdpExtractedDataRepresentation.d.ts +39 -0
  34. package/dist/es/es2018/types/src/generated/types/IdpExtractedFileDataRepresenation.d.ts +31 -0
  35. package/dist/es/es2018/types/src/generated/types/IdpFileConfigRepresentation.d.ts +29 -0
  36. package/dist/es/es2018/types/src/generated/types/IdpGenerateSchemaFileInputRepresentation.d.ts +28 -0
  37. package/dist/es/es2018/types/src/generated/types/IdpGenerateSchemaInputRepresentation.d.ts +33 -0
  38. package/dist/es/es2018/types/src/generated/types/IdpGeneratedSchemaRepresentation.d.ts +41 -0
  39. package/dist/es/es2018/types/src/generated/types/IdpGlobalConfigRepresentation.d.ts +37 -0
  40. package/dist/es/es2018/types/src/generated/types/IdpSupportedModelRepresentation.d.ts +41 -0
  41. package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
  42. package/package.json +68 -0
  43. package/sfdc/index.d.ts +1 -0
  44. package/sfdc/index.js +2182 -0
  45. package/src/raml/api.raml +487 -0
  46. package/src/raml/luvio.raml +116 -0
@@ -0,0 +1,487 @@
1
+ #%RAML 1.0
2
+ securedBy:
3
+ - OAuth2
4
+ title: Salesforce Connect API
5
+ version: '64.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
+ CdpAssetBaseRepresentation:
42
+ description: Represents a base Asset
43
+ type: object
44
+ discriminator: id
45
+ properties:
46
+ createdBy:
47
+ description: Created by
48
+ type: any
49
+ createdDate:
50
+ description: Created date
51
+ type: string
52
+ id:
53
+ description: The 18 character ID of the asset
54
+ type: string
55
+ label:
56
+ description: Label of the asset
57
+ type: string
58
+ lastModifiedBy:
59
+ description: Last modified by
60
+ type: any
61
+ lastModifiedDate:
62
+ description: Last modified date
63
+ type: string
64
+ name:
65
+ description: Name of the asset
66
+ type: string
67
+ url:
68
+ description: Url
69
+ type: any
70
+ CdpPaginatedResponseBaseRepresentation:
71
+ description: Base paginated response representation
72
+ type: object
73
+ discriminator: totalSize
74
+ properties:
75
+ currentPageUrl:
76
+ description: Current page url
77
+ type: string | nil
78
+ nextPageUrl:
79
+ description: Next page url if it exists
80
+ type: string | nil
81
+ totalSize:
82
+ description: Total size of collection
83
+ type: integer
84
+ IdpConfigurationBaseRepresentation:
85
+ description: Idp Configuration Base Representation
86
+ type: CdpAssetBaseRepresentation
87
+ discriminator: version
88
+ properties:
89
+ activationStatus:
90
+ description: IDP Configuration Activation Status (Activated - Deactivated)
91
+ type: string
92
+ enum:
93
+ - Activated
94
+ - Deactivated
95
+ dataspace:
96
+ description: IDP Configuration Data Space
97
+ type: any
98
+ description:
99
+ description: IDP Configuration Description
100
+ type: string | nil
101
+ mlModel:
102
+ description: The ML model used to extract the unstructured data
103
+ type: string
104
+ runtimeStatus:
105
+ description: 'What is the status of the last off-core unstructured data-extraction
106
+ job run. Possible values: Success - Failed - InProgress - Aborted - NotStarted
107
+ - Pending - Submitted - Ready'
108
+ type: string
109
+ enum:
110
+ - Aborted
111
+ - Failed
112
+ - InProgress
113
+ - NotStarted
114
+ - Pending
115
+ - Ready
116
+ - Submitted
117
+ - Success
118
+ status:
119
+ description: 'Whether the latest version of this IDP configuration has been
120
+ synced to off-core. Possible values: Syncing - Synced - NotSynced - Error'
121
+ type: string
122
+ enum:
123
+ - Error
124
+ - NotSynced
125
+ - Synced
126
+ - Syncing
127
+ version:
128
+ description: The current version of the IDP configuration, this is incremented
129
+ automatically with every edit
130
+ type: string
131
+ IdpConfigurationDetailsRepresentation:
132
+ description: Idp Configuration Details Representation
133
+ type: object
134
+ properties:
135
+ schemaConfig:
136
+ description: The schema of the data to be extracted
137
+ type: string
138
+ createdBy:
139
+ description: Created by
140
+ type: any
141
+ createdDate:
142
+ description: Created date
143
+ type: string
144
+ id:
145
+ description: The 18 character ID of the asset
146
+ type: string
147
+ label:
148
+ description: Label of the asset
149
+ type: string
150
+ lastModifiedBy:
151
+ description: Last modified by
152
+ type: any
153
+ lastModifiedDate:
154
+ description: Last modified date
155
+ type: string
156
+ name:
157
+ description: Name of the asset
158
+ type: string
159
+ description:
160
+ description: description of config
161
+ type: any
162
+ mlModel:
163
+ description: fileConfig
164
+ type: string | nil
165
+ runtimeStatus:
166
+ description: fileConfig
167
+ type: string | nil
168
+ IdpConfigurationInputRepresentation:
169
+ description: The input representation for Idp Configuration
170
+ type: object
171
+ properties:
172
+ activationStatus:
173
+ description: Activated/Deactivated
174
+ type: string
175
+ enum:
176
+ - Activated
177
+ - Deactivated
178
+ description:
179
+ description: The description of the IDP configuration to be created
180
+ type: string
181
+ fileConfig:
182
+ description: The specs for the file types supported by the IDP process to
183
+ be created
184
+ type: object
185
+ properties:
186
+ fileTypes:
187
+ description: List of file formats that are supported by the IDP process to be created
188
+ type: array
189
+ items:
190
+ type: string
191
+ label:
192
+ description: The label of the IDP configuration to be created
193
+ type: string
194
+ mlModel:
195
+ description: The ML model used to extract the unstructured data
196
+ type: string
197
+ name:
198
+ description: The API name of the IDP configuration to be created
199
+ type: string
200
+ configMetadata:
201
+ description: A map of custom key-value pairs serialized as JSON
202
+ type: object
203
+ properties:
204
+ builderType:
205
+ description: Source of idp config creation
206
+ type: string
207
+ schemaConfig:
208
+ description: The schema of the data to be extracted
209
+ type: string
210
+ IdpConfigurationPatchInputRepresentation:
211
+ description: The update input representation for Idp Configuration
212
+ type: object
213
+ properties:
214
+ activationStatus:
215
+ description: The updated activation status - Activated/Deactivated
216
+ type: string
217
+ enum:
218
+ - Activated
219
+ - Deactivated
220
+ required: false
221
+ description:
222
+ description: The updated description of the IDP configuration to be created
223
+ type: string
224
+ required: false
225
+ label:
226
+ description: The updated label of the IDP configuration to be created
227
+ type: string
228
+ required: false
229
+ IdpConfigurationRepresentation:
230
+ description: Idp Configuration Representation
231
+ type: IdpConfigurationBaseRepresentation
232
+ properties: {}
233
+ IdpConfigurationsCollectionRepresentation:
234
+ description: Idp Configuration Collection Representation
235
+ type: CdpPaginatedResponseBaseRepresentation
236
+ properties:
237
+ configurations:
238
+ description: The IDP configuration records in the current page
239
+ type: array
240
+ items:
241
+ type: IdpConfigurationRepresentation
242
+ IdpContentTypeRepresentation:
243
+ description: Idp Content Type Representation
244
+ type: object
245
+ properties:
246
+ isDefault:
247
+ description: If this value by default
248
+ type: boolean
249
+ label:
250
+ description: The display name of the file type
251
+ type: string
252
+ maxFileSizeInMB:
253
+ description: Max size of the file in mega bytes
254
+ type: integer
255
+ type:
256
+ description: The file type
257
+ type: string
258
+ IdpFileConfigRepresentation:
259
+ description: The representation of the specs for the file types supported by the
260
+ IDP process
261
+ type: object
262
+ properties:
263
+ fileTypes:
264
+ description: List of file formats that are supported by the IDP process to
265
+ be created
266
+ type: array
267
+ items:
268
+ type: string
269
+ IdpGlobalConfigRepresentation:
270
+ description: Idp Global Config Representation
271
+ type: object
272
+ properties:
273
+ supportedContentTypes:
274
+ description: All content types currently supported for unstructured data extraction
275
+ type: array
276
+ items:
277
+ type: IdpContentTypeRepresentation
278
+ supportedModels:
279
+ description: Models currently supported for unstructured data extraction
280
+ type: array
281
+ items:
282
+ type: IdpSupportedModelRepresentation
283
+ version:
284
+ description: The version of the config schema
285
+ type: string
286
+ IdpSupportedModelRepresentation:
287
+ description: Idp Supported Model Representation
288
+ type: object
289
+ properties:
290
+ id:
291
+ description: The ID of the model
292
+ type: string
293
+ isDefault:
294
+ description: If it is default
295
+ type: boolean
296
+ label:
297
+ description: The display name of the model
298
+ type: string
299
+ provider:
300
+ description: E.g. Open AI
301
+ type: string
302
+ status:
303
+ description: E.g. ENABLED, DISABLED
304
+ type: string
305
+ IdpGenerateSchemaFileInputRepresentation:
306
+ description: The generate schema file input representation for Idp Configuration
307
+ type: object
308
+ properties:
309
+ fileId:
310
+ description: Either a Salesforce file Id or a URI to SF Drive
311
+ type: string
312
+ IdpGenerateSchemaInputRepresentation:
313
+ description: The generate schema input representation for Idp Configuration
314
+ type: object
315
+ properties:
316
+ files:
317
+ description: The list of unstructured source files to extract the schema from
318
+ type: array
319
+ items:
320
+ type: IdpGenerateSchemaFileInputRepresentation
321
+ mlModel:
322
+ description: The ID of the ML model to use for schema extraction
323
+ type: string
324
+ IdpGeneratedSchemaRepresentation:
325
+ description: Idp Generated Schema Representation
326
+ type: object
327
+ properties:
328
+ error:
329
+ description: Error message if schema generation fails
330
+ type: string | nil
331
+ schema:
332
+ description: The generated schema in JSON format
333
+ type: string
334
+ IdpExtractDataInputRepresentation:
335
+ description: The extract data input representation for Idp Configuration
336
+ type: object
337
+ properties:
338
+ files:
339
+ description: The list of unstructured source files to extract the schema from
340
+ type: array
341
+ items:
342
+ type: object
343
+ properties:
344
+ fileId:
345
+ description: documentVersionId of the selected file
346
+ type: string
347
+ mlModel:
348
+ description: The ID of the ML model to use for schema extraction
349
+ type: string
350
+ schemaConfig:
351
+ description: The schema of the data to be extracted
352
+ type: string
353
+ IdpExtractedDataRepresentation:
354
+ description: Idp Extracted Data Representation
355
+ type: object
356
+ properties:
357
+ data:
358
+ description: 'List of extraction result for every file '
359
+ type: array
360
+ items:
361
+ type: IdpExtractedFileDataRepresenation
362
+ IdpExtractedFileDataRepresenation:
363
+ description: Idp Extracted Data Representation for a specific file
364
+ type: object
365
+ properties:
366
+ data:
367
+ description: Extracted JSON data
368
+ type: string
369
+ error:
370
+ description: Error message if data extraction fails
371
+ type: string | nil
372
+ /ssot/document-processing:
373
+ /configurations:
374
+ get:
375
+ displayName: getIdpConfigurations
376
+ description: Get all intelligent document processing configurations
377
+ responses:
378
+ '200':
379
+ description: Success
380
+ body:
381
+ application/json:
382
+ type: IdpConfigurationsCollectionRepresentation
383
+ queryParameters:
384
+ activationStatus:
385
+ type: string
386
+ required: false
387
+ enum:
388
+ - Activated
389
+ - Deactivated
390
+ limit:
391
+ type: integer
392
+ required: false
393
+ offset:
394
+ type: integer
395
+ required: false
396
+ orderBy:
397
+ description: eg. Label DESC
398
+ type: string
399
+ required: false
400
+ search:
401
+ type: string
402
+ required: false
403
+ post:
404
+ displayName: createIdpConfiguration
405
+ description: Create idp configuration
406
+ responses:
407
+ '200':
408
+ description: Success
409
+ body:
410
+ application/json:
411
+ type: IdpConfigurationDetailsRepresentation
412
+ body:
413
+ application/json:
414
+ type: IdpConfigurationInputRepresentation
415
+ (oas-body-name): createIdpConfigurationRecord
416
+ /configurations/{idOrApiName}:
417
+ delete:
418
+ displayName: deleteIdpConfiguration
419
+ description: delete an idp configuration record
420
+ responses:
421
+ '200':
422
+ description: Success
423
+ get:
424
+ displayName: getIdpConfiguration
425
+ description: get the details of a specific idp configuration record
426
+ responses:
427
+ '200':
428
+ description: Success
429
+ body:
430
+ application/json:
431
+ type: IdpConfigurationDetailsRepresentation
432
+ patch:
433
+ displayName: updateIdpConfiguration
434
+ description: updates the details of a specific idp configuration record
435
+ responses:
436
+ '200':
437
+ description: Success
438
+ body:
439
+ application/json:
440
+ type: IdpConfigurationDetailsRepresentation
441
+ body:
442
+ application/json:
443
+ type: IdpConfigurationPatchInputRepresentation
444
+ (oas-body-name): patchIdpConfigurationRecord
445
+ uriParameters:
446
+ idOrApiName:
447
+ description: Document processing Config ID
448
+ type: string
449
+ required: true
450
+ /global-config:
451
+ get:
452
+ displayName: getIdpGlobalConfig
453
+ description: get the details of idp global config
454
+ responses:
455
+ '200':
456
+ description: Success
457
+ body:
458
+ application/json:
459
+ type: IdpGlobalConfigRepresentation
460
+ /actions/generate-schema:
461
+ post:
462
+ displayName: generateIdpConfigurationSchema
463
+ description: generate schema for idp configuration
464
+ responses:
465
+ '200':
466
+ description: Success
467
+ body:
468
+ application/json:
469
+ type: IdpGeneratedSchemaRepresentation
470
+ body:
471
+ application/json:
472
+ type: IdpGenerateSchemaInputRepresentation
473
+ (oas-body-name): generateIdpConfigurationSchema
474
+ /actions/extract-data:
475
+ post:
476
+ displayName: extractDataUsingIdpConfiguration
477
+ description: extract data from idp configuration
478
+ responses:
479
+ '200':
480
+ description: Success
481
+ body:
482
+ application/json:
483
+ type: IdpExtractedDataRepresentation
484
+ body:
485
+ application/json:
486
+ type: IdpExtractDataInputRepresentation
487
+ (oas-body-name): extractDataUsingIdpConfiguration
@@ -0,0 +1,116 @@
1
+ #%RAML 1.0 Overlay
2
+ extends: ./api.raml
3
+
4
+ uses:
5
+ luvio: luvio://annotations.raml
6
+
7
+ (luvio.keyPrefix): 'document-processing'
8
+
9
+ types:
10
+ IdpSupportedModelRepresentation:
11
+ (luvio.ttl): 500
12
+ (luvio.opaque): true
13
+
14
+ IdpConfigurationRepresentation:
15
+ (luvio.opaque): true
16
+
17
+ IdpConfigurationBaseRepresentation:
18
+ (luvio.opaque): true
19
+
20
+ IdpFileConfigRepresentation:
21
+ (luvio.ttl): 500
22
+ (luvio.opaque): true
23
+
24
+ IdpContentTypeRepresentation:
25
+ (luvio.ttl): 500
26
+ (luvio.opaque): true
27
+
28
+ IdpGlobalConfigRepresentation:
29
+ (luvio.ttl): 500
30
+ (luvio.opaque): true
31
+
32
+ CdpPaginatedResponseBaseRepresentation:
33
+ (luvio.ttl): 500
34
+ (luvio.opaque): true
35
+
36
+ IdpConfigurationsCollectionRepresentation:
37
+ (luvio.opaque): true
38
+
39
+ IdpConfigurationInputRepresentation:
40
+ (luvio.ttl): 500
41
+ (luvio.opaque): true
42
+
43
+ IdpConfigurationDetailsRepresentation:
44
+ (luvio.ttl): 500
45
+ (luvio.opaque): true
46
+ (luvio.key):
47
+ id: id
48
+
49
+ IdpConfigurationPatchInputRepresentation:
50
+ (luvio.ttl): 500
51
+ (luvio.opaque): true
52
+
53
+ IdpGenerateSchemaFileInputRepresentation:
54
+ (luvio.opaque): true
55
+
56
+ IdpGenerateSchemaInputRepresentation:
57
+ (luvio.ttl): 500
58
+ (luvio.opaque): true
59
+
60
+ IdpGeneratedSchemaRepresentation:
61
+ (luvio.ttl): 1200000
62
+ (luvio.key):
63
+ schema: schema
64
+
65
+ IdpExtractDataInputRepresentation:
66
+ (luvio.ttl): 500
67
+ (luvio.opaque): true
68
+
69
+ IdpExtractedDataRepresentation:
70
+ (luvio.ttl): 1200000
71
+
72
+ IdpExtractedFileDataRepresenation:
73
+ (luvio.opaque): true
74
+
75
+ /ssot/document-processing:
76
+ /configurations:
77
+ get:
78
+ (luvio.adapter):
79
+ name: getIdpConfigurations
80
+
81
+ post:
82
+ (luvio.adapter):
83
+ name: createIdpConfiguration
84
+
85
+ /configurations/{idOrApiName}:
86
+ delete:
87
+ (luvio.adapter):
88
+ name: deleteIdpConfiguration
89
+ (luvio.key):
90
+ id: urlParams.idOrApiName
91
+
92
+ get:
93
+ (luvio.adapter):
94
+ name: getIdpConfiguration
95
+ (luvio.key):
96
+ id: urlParams.idOrApiName
97
+
98
+ patch:
99
+ (luvio.adapter):
100
+ name: updateIdpConfiguration
101
+
102
+ /global-config:
103
+ get:
104
+ (luvio.adapter):
105
+ name: getIdpGlobalConfig
106
+
107
+ /actions/generate-schema:
108
+ post:
109
+ (luvio.adapter):
110
+ name: generateIdpConfigurationSchema
111
+
112
+ /actions/extract-data:
113
+ post:
114
+ (luvio.adapter):
115
+ name: extractDataUsingIdpConfiguration
116
+ (luvio.method): get