@salesforce/lds-adapters-industries-nlpservice 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 (38) hide show
  1. package/LICENSE.txt +82 -0
  2. package/dist/es/es2018/industries-nlpservice.js +888 -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/createAINaturalLangProcessResult.d.ts +16 -0
  5. package/dist/es/es2018/types/src/generated/adapters/getAINaturalLangProcessResultsByReferenceRecordId.d.ts +28 -0
  6. package/dist/es/es2018/types/src/generated/adapters/getAINaturalLangProcessResultsBySourceId.d.ts +28 -0
  7. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +3 -0
  8. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +6 -0
  9. package/dist/es/es2018/types/src/generated/resources/getConnectNlpServiceAiNaturalLangProcessResultsReferenceRecordsByReferenceRecordId.d.ts +18 -0
  10. package/dist/es/es2018/types/src/generated/resources/getConnectNlpServiceAiNaturalLangProcessResultsSourceRecordsBySourceRecordId.d.ts +18 -0
  11. package/dist/es/es2018/types/src/generated/resources/postConnectNlpServiceAiNaturalLangProcessResults.d.ts +13 -0
  12. package/dist/es/es2018/types/src/generated/types/AINaturalLangProcessResultCollectionRepresentation.d.ts +30 -0
  13. package/dist/es/es2018/types/src/generated/types/AINaturalLangProcessResultInputRepresentation.d.ts +38 -0
  14. package/dist/es/es2018/types/src/generated/types/AINaturalLangProcessResultInputWrapperRepresentation.d.ts +28 -0
  15. package/dist/es/es2018/types/src/generated/types/AINaturalLangProcessResultRepresentation.d.ts +60 -0
  16. package/dist/es/es2018/types/src/generated/types/AWSEntityRepresentation.d.ts +32 -0
  17. package/dist/es/es2018/types/src/generated/types/AWSEntityStructRepresentation.d.ts +40 -0
  18. package/dist/es/es2018/types/src/generated/types/AWSKeyPhraseRepresentation.d.ts +32 -0
  19. package/dist/es/es2018/types/src/generated/types/AWSKeyPhraseStructRepresentation.d.ts +37 -0
  20. package/dist/es/es2018/types/src/generated/types/AdditionalInformationRepresentation.d.ts +31 -0
  21. package/dist/es/es2018/types/src/generated/types/AdditionalParametersInputMap.d.ts +28 -0
  22. package/dist/es/es2018/types/src/generated/types/ClauseStructRepresentation.d.ts +31 -0
  23. package/dist/es/es2018/types/src/generated/types/ComplianceClauseStructRepresentation.d.ts +31 -0
  24. package/dist/es/es2018/types/src/generated/types/EntityStructRepresentation.d.ts +31 -0
  25. package/dist/es/es2018/types/src/generated/types/ErrorRepresentation.d.ts +31 -0
  26. package/dist/es/es2018/types/src/generated/types/NullableAdditionalParametersInputMap.d.ts +27 -0
  27. package/dist/es/es2018/types/src/generated/types/OpenAIClauseRepresentation.d.ts +32 -0
  28. package/dist/es/es2018/types/src/generated/types/OpenAIComplianceClauseRepresentation.d.ts +32 -0
  29. package/dist/es/es2018/types/src/generated/types/OpenAIEntityRepresentation.d.ts +32 -0
  30. package/dist/es/es2018/types/src/generated/types/OpenAISurveyGenerationRepresentation.d.ts +32 -0
  31. package/dist/es/es2018/types/src/generated/types/OpenAITranslationGenerationRepresentation.d.ts +32 -0
  32. package/dist/es/es2018/types/src/generated/types/SurveyStructRepresentation.d.ts +40 -0
  33. package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
  34. package/package.json +74 -0
  35. package/sfdc/index.d.ts +1 -0
  36. package/sfdc/index.js +944 -0
  37. package/src/raml/api.raml +404 -0
  38. package/src/raml/luvio.raml +33 -0
@@ -0,0 +1,404 @@
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
+ AdditionalInformationRepresentation:
29
+ description: The output representation of the AdditionalInformation
30
+ type: object
31
+ properties:
32
+ generationsResponseIds:
33
+ description: The ids of the AINaturalLangProcessResult record
34
+ type: array
35
+ items:
36
+ type: string | nil
37
+ required: false
38
+ sessionId:
39
+ description: The session id for AINaturalLangProcessResult record processing
40
+ type: string | nil
41
+ required: false
42
+ AdditionalParametersInputMap:
43
+ description: Represents a map of additional parameters.
44
+ properties:
45
+ additionalParameters:
46
+ description: Additional context input parameters.
47
+ type: NullableAdditionalParametersInputMap
48
+ required: false
49
+ type: object
50
+ NullableAdditionalParametersInputMap:
51
+ description: Wrapper for Nullable Map Object.
52
+ type: object
53
+ properties:
54
+ //:
55
+ type: any
56
+ AINaturalLangProcessResultCollectionRepresentation:
57
+ description: The output representation of the list for AINaturalLangProcessResult
58
+ type: object
59
+ properties:
60
+ aiNaturalLangProcessResults:
61
+ description: Get a list of AINaturalLangProcessResult.
62
+ type: array
63
+ items:
64
+ type: AINaturalLangProcessResultRepresentation
65
+ AINaturalLangProcessResultInputWrapperRepresentation:
66
+ description: Wrapper for AINaturalLangProcessResultInputRepresentation.
67
+ type: object
68
+ properties:
69
+ aiNaturalLangProcessResultInputParam:
70
+ description: oas body name.
71
+ type: AINaturalLangProcessResultInputRepresentation
72
+ AINaturalLangProcessResultInputRepresentation:
73
+ description: Input representation for AINaturalLangProcessResult
74
+ type: object
75
+ properties:
76
+ additionalParameters:
77
+ description: Additional Parameters
78
+ type: AdditionalParametersInputMap
79
+ required: false # TODO Hand-rolled W-9314597
80
+ query:
81
+ description: Query
82
+ type: string
83
+ required: false # TODO Hand-rolled W-9314597
84
+ serviceType:
85
+ description: Service Type
86
+ type: string
87
+ enum:
88
+ - Amazon_Comprehend_Entity_Extraction
89
+ - Amazon_Comprehend_Keyphrase_Extraction
90
+ - Amazon_Comprehend_Targeted_Sentiment
91
+ - GenAI_Assessment_Questions_Extraction
92
+ - IndustriesFilebasedQuestionAnswer
93
+ - OpenAIClauseExtraction
94
+ - OpenAIClauseGeneration
95
+ - OpenAIComplianceClauseExtraction
96
+ - OpenAIEntityExtraction
97
+ - OpenAISurveyGeneration
98
+ - OpenAITranslation
99
+ required: false # TODO Hand-rolled W-9314597
100
+ configurationApiName:
101
+ description: Configuration Api Name
102
+ type: string
103
+ required: false # TODO Hand-rolled W-9314597
104
+ AINaturalLangProcessResultRepresentation:
105
+ description: The output representation of the AINaturalLangProcessResult
106
+ type: object
107
+ properties:
108
+ additionalInformation:
109
+ description: The reference record id on which the NLP operation was performed
110
+ type: AdditionalInformationRepresentation | nil
111
+ required: false
112
+ id:
113
+ description: The id of the AINaturalLangProcessResult record
114
+ type: string
115
+ referenceRecord:
116
+ description: The reference record id on which the NLP operation was performed
117
+ type: string | nil
118
+ requestText:
119
+ description: The Request Tex for the NLP operation
120
+ type: string | nil
121
+ response:
122
+ description: The Response of the NLP operation
123
+ type: object | string | nil
124
+ serviceType:
125
+ description: The type of NLP service and operation
126
+ type: string
127
+ sourceRecord:
128
+ description: The original source record id on which the NLP operation was
129
+ performed
130
+ type: string | nil
131
+ status:
132
+ description: The Status of the NLP operation
133
+ type: string
134
+ AWSEntityRepresentation:
135
+ description: Represents Entities fetched from AWS comprehend
136
+ type: object
137
+ properties:
138
+ detectedEntities:
139
+ description: Represents detected entities
140
+ type: array
141
+ items:
142
+ type: AWSEntityStructRepresentation
143
+ totalResults:
144
+ description: Represents total number of entities
145
+ type: integer
146
+ AWSEntityStructRepresentation:
147
+ description: Details of an Entity
148
+ type: object
149
+ properties:
150
+ beginOffset:
151
+ description: The zero-based offset from the beginning of the source text to
152
+ the first character in the entity
153
+ type: integer
154
+ endOffset:
155
+ description: The zero-based offset from the beginning of the source text to
156
+ the last character in the entity
157
+ type: integer
158
+ entityName:
159
+ description: Type of the entity
160
+ type: string
161
+ entityValue:
162
+ description: The text of the entity
163
+ type: string
164
+ score:
165
+ description: Level of confidence that Amazon Comprehend has in the accuracy
166
+ of the entity detection
167
+ format: double
168
+ type: number
169
+ AWSKeyPhraseRepresentation:
170
+ description: Represents Key phrases fetched from AWS comprehend
171
+ type: object
172
+ properties:
173
+ keyPhrases:
174
+ description: Represents a list of key phrases
175
+ type: array
176
+ items:
177
+ type: AWSKeyPhraseStructRepresentation
178
+ totalResults:
179
+ description: Represents total number of key phrases
180
+ type: integer
181
+ AWSKeyPhraseStructRepresentation:
182
+ description: Details of a Key Phrase
183
+ type: object
184
+ properties:
185
+ beginOffset:
186
+ description: The zero-based offset from the beginning of the source text to
187
+ the first character in the key phrase
188
+ type: integer
189
+ endOffset:
190
+ description: The zero-based offset from the beginning of the source text to
191
+ the last character in the key phrase
192
+ type: integer
193
+ keyPhrase:
194
+ description: The text of a key noun phrase
195
+ type: string
196
+ score:
197
+ description: Level of confidence that Amazon Comprehend has in the accuracy
198
+ of the key phrase detection
199
+ format: double
200
+ type: number
201
+ ClauseStructRepresentation:
202
+ description: Details of a Clause
203
+ type: object
204
+ properties:
205
+ clauseName:
206
+ description: The name of the Clause
207
+ type: string
208
+ clauseText:
209
+ description: The text in the Clause
210
+ type: string
211
+ ComplianceClauseStructRepresentation:
212
+ description: Details of a Clause
213
+ type: object
214
+ properties:
215
+ clauseName:
216
+ description: The name of the Clause
217
+ type: string
218
+ clauseText:
219
+ description: The text in the Clause
220
+ type: string
221
+ EntityStructRepresentation:
222
+ description: Details of an entity
223
+ type: object
224
+ properties:
225
+ entityName:
226
+ description: The name of the entity
227
+ type: string
228
+ entityValues:
229
+ description: The list of entities
230
+ type: array
231
+ items:
232
+ type: string
233
+ ErrorRepresentation:
234
+ description: Represents clause results fetched from OpenAI
235
+ properties:
236
+ errorCode:
237
+ description: Represents error code
238
+ type: integer
239
+ errorMessage:
240
+ description: Represents error message
241
+ type: string
242
+ type: object
243
+ OpenAIClauseRepresentation:
244
+ description: Represents clause results fetched from OpenAI
245
+ type: object
246
+ properties:
247
+ clauseResults:
248
+ description: Represents a list of clauses
249
+ type: array
250
+ items:
251
+ type: ClauseStructRepresentation
252
+ totalResults:
253
+ description: Represents total number of clauses
254
+ type: integer
255
+ OpenAIComplianceClauseRepresentation:
256
+ description: Represents clause results fetched from OpenAI
257
+ type: object
258
+ properties:
259
+ clauseResults:
260
+ description: Represents a list of clauses
261
+ type: array
262
+ items:
263
+ type: ComplianceClauseStructRepresentation
264
+ totalResults:
265
+ description: Represents total number of clauses
266
+ type: integer
267
+ OpenAISurveyGenerationRepresentation:
268
+ description: Represents survey generationr results from OpenAI
269
+ properties:
270
+ questionCount:
271
+ description: Represents the total count of survey questions
272
+ type: integer
273
+ questions:
274
+ description: Represents a list of survey questions
275
+ items:
276
+ type: SurveyStructRepresentation
277
+ type: array
278
+ type: object
279
+ SurveyStructRepresentation:
280
+ description: Contents within a survey question
281
+ properties:
282
+ questionChoices:
283
+ description: List of question choices
284
+ items:
285
+ type: string
286
+ type: array
287
+ questionDescription:
288
+ description: The question description
289
+ type: string
290
+ questionLabel:
291
+ description: The question label
292
+ type: string
293
+ questionType:
294
+ description: Generated question type
295
+ type: string
296
+ required:
297
+ description: Is question required
298
+ type: boolean
299
+ type: object
300
+ OpenAIEntityRepresentation:
301
+ description: Represents entity results fetched from OpenAI
302
+ type: object
303
+ properties:
304
+ entityResults:
305
+ description: Represents a list of entities
306
+ type: array
307
+ items:
308
+ type: EntityStructRepresentation
309
+ totalResults:
310
+ description: Represents total number of entities
311
+ type: integer
312
+ OpenAITranslationGenerationRepresentation:
313
+ description: Represents survey generation results from OpenAI
314
+ type: object
315
+ properties:
316
+ translatedContent:
317
+ description: Represents the output map of the translated content
318
+ type: object
319
+ properties:
320
+ //:
321
+ type: string
322
+ /connect/nlp-service/aiNaturalLangProcessResults:
323
+ post:
324
+ displayName: postAINaturalLangProcessResult
325
+ description: Creates a AINaturalLangProcessResults record
326
+ responses:
327
+ '200':
328
+ description: Success
329
+ body:
330
+ application/json:
331
+ type: AINaturalLangProcessResultRepresentation
332
+ body:
333
+ application/json:
334
+ # TODO Hand-rolled W-10128739. Original type: RecommendationInputRepresentation
335
+ type: AINaturalLangProcessResultInputWrapperRepresentation
336
+ (oas-body-name): aiNaturalLangProcessResultInputParam
337
+ /connect/nlp-service/aiNaturalLangProcessResults/referenceRecords/{referenceRecordId}:
338
+ get:
339
+ displayName: getAINaturalLangProcessResultCollection
340
+ description: Gives the AINaturalLangProcessResults for a Source Record (Content
341
+ Document) or Reference Record
342
+ responses:
343
+ '200':
344
+ description: Success
345
+ body:
346
+ application/json:
347
+ type: AINaturalLangProcessResultCollectionRepresentation
348
+ queryParameters:
349
+ serviceTypes:
350
+ type: array
351
+ required: false
352
+ items:
353
+ type: string
354
+ enum:
355
+ - Amazon_Comprehend_Entity_Extraction
356
+ - Amazon_Comprehend_Keyphrase_Extraction
357
+ - Amazon_Comprehend_Targeted_Sentiment
358
+ - GenAI_Assessment_Questions_Extraction
359
+ - IndustriesFilebasedQuestionAnswer
360
+ - OpenAIClauseExtraction
361
+ - OpenAIClauseGeneration
362
+ - OpenAIComplianceClauseExtraction
363
+ - OpenAIEntityExtraction
364
+ - OpenAISurveyGeneration
365
+ - OpenAITranslation
366
+ (oas-collectionFormat): csv
367
+ uriParameters:
368
+ referenceRecordId:
369
+ type: string
370
+ required: true
371
+ /connect/nlp-service/aiNaturalLangProcessResults/sourceRecords/{sourceRecordId}:
372
+ get:
373
+ displayName: getAINaturalLangProcessResultCollection
374
+ description: Gives the AINaturalLangProcessResults for a Source Record (Content
375
+ Document) or Reference Record
376
+ responses:
377
+ '200':
378
+ description: Success
379
+ body:
380
+ application/json:
381
+ type: AINaturalLangProcessResultCollectionRepresentation
382
+ queryParameters:
383
+ serviceTypes:
384
+ type: array
385
+ required: false
386
+ items:
387
+ type: string
388
+ enum:
389
+ - Amazon_Comprehend_Entity_Extraction
390
+ - Amazon_Comprehend_Keyphrase_Extraction
391
+ - Amazon_Comprehend_Targeted_Sentiment
392
+ - GenAI_Assessment_Questions_Extraction
393
+ - IndustriesFilebasedQuestionAnswer
394
+ - OpenAIClauseExtraction
395
+ - OpenAIClauseGeneration
396
+ - OpenAIComplianceClauseExtraction
397
+ - OpenAIEntityExtraction
398
+ - OpenAISurveyGeneration
399
+ - OpenAITranslation
400
+ (oas-collectionFormat): csv
401
+ uriParameters:
402
+ sourceRecordId:
403
+ type: string
404
+ required: true
@@ -0,0 +1,33 @@
1
+ #%RAML 1.0 Overlay
2
+ extends: ./api.raml
3
+
4
+ uses:
5
+ luvio: luvio://annotations.raml
6
+
7
+ (luvio.keyPrefix): 'NlpService'
8
+ (luvio.ttl): 2592000000
9
+
10
+ types:
11
+ AINaturalLangProcessResultCollectionRepresentation:
12
+ (luvio.opaque): true
13
+ (luvio.ttl): 1000
14
+ AINaturalLangProcessResultRepresentation:
15
+ (luvio.ttl): 1000
16
+ (luvio.opaque): true
17
+ (luvio.key):
18
+ serviceType: serviceType
19
+
20
+ /connect/nlp-service/aiNaturalLangProcessResults:
21
+ post:
22
+ (luvio.adapter):
23
+ name: createAINaturalLangProcessResult
24
+
25
+ /connect/nlp-service/aiNaturalLangProcessResults/referenceRecords/{referenceRecordId}:
26
+ get:
27
+ (luvio.adapter):
28
+ name: getAINaturalLangProcessResultsByReferenceRecordId
29
+
30
+ /connect/nlp-service/aiNaturalLangProcessResults/sourceRecords/{sourceRecordId}:
31
+ get:
32
+ (luvio.adapter):
33
+ name: getAINaturalLangProcessResultsBySourceId