@salesforce/lds-adapters-industries-nlpservice 1.114.3

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.
package/LICENSE.txt ADDED
@@ -0,0 +1,82 @@
1
+ Terms of Use
2
+
3
+ Copyright 2022 Salesforce, Inc. All rights reserved.
4
+
5
+ These Terms of Use govern the download, installation, and/or use of this
6
+ software provided by Salesforce, Inc. ("Salesforce") (the "Software"), were
7
+ last updated on April 15, 2022, and constitute a legally binding
8
+ agreement between you and Salesforce. If you do not agree to these Terms of
9
+ Use, do not install or use the Software.
10
+
11
+ Salesforce grants you a worldwide, non-exclusive, no-charge, royalty-free
12
+ copyright license to reproduce, prepare derivative works of, publicly
13
+ display, publicly perform, sublicense, and distribute the Software and
14
+ derivative works subject to these Terms. These Terms shall be included in
15
+ all copies or substantial portions of the Software.
16
+
17
+ Subject to the limited rights expressly granted hereunder, Salesforce
18
+ reserves all rights, title, and interest in and to all intellectual
19
+ property subsisting in the Software. No rights are granted to you hereunder
20
+ other than as expressly set forth herein. Users residing in countries on
21
+ the United States Office of Foreign Assets Control sanction list, or which
22
+ are otherwise subject to a US export embargo, may not use the Software.
23
+
24
+ Implementation of the Software may require development work, for which you
25
+ are responsible. The Software may contain bugs, errors and
26
+ incompatibilities and is made available on an AS IS basis without support,
27
+ updates, or service level commitments.
28
+
29
+ Salesforce reserves the right at any time to modify, suspend, or
30
+ discontinue, the Software (or any part thereof) with or without notice. You
31
+ agree that Salesforce shall not be liable to you or to any third party for
32
+ any modification, suspension, or discontinuance.
33
+
34
+ You agree to defend Salesforce against any claim, demand, suit or
35
+ proceeding made or brought against Salesforce by a third party arising out
36
+ of or accruing from (a) your use of the Software, and (b) any application
37
+ you develop with the Software that infringes any copyright, trademark,
38
+ trade secret, trade dress, patent, or other intellectual property right of
39
+ any person or defames any person or violates their rights of publicity or
40
+ privacy (each a "Claim Against Salesforce"), and will indemnify Salesforce
41
+ from any damages, attorney fees, and costs finally awarded against
42
+ Salesforce as a result of, or for any amounts paid by Salesforce under a
43
+ settlement approved by you in writing of, a Claim Against Salesforce,
44
+ provided Salesforce (x) promptly gives you written notice of the Claim
45
+ Against Salesforce, (y) gives you sole control of the defense and
46
+ settlement of the Claim Against Salesforce (except that you may not settle
47
+ any Claim Against Salesforce unless it unconditionally releases Salesforce
48
+ of all liability), and (z) gives you all reasonable assistance, at your
49
+ expense.
50
+
51
+ WITHOUT LIMITING THE GENERALITY OF THE FOREGOING, THE SOFTWARE IS NOT
52
+ SUPPORTED AND IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
53
+ IMPLIED. IN NO EVENT SHALL SALESFORCE HAVE ANY LIABILITY FOR ANY DAMAGES,
54
+ INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, SPECIAL, INCIDENTAL,
55
+ PUNITIVE, OR CONSEQUENTIAL DAMAGES, OR DAMAGES BASED ON LOST PROFITS, DATA,
56
+ OR USE, IN CONNECTION WITH THE SOFTWARE, HOWEVER CAUSED AND WHETHER IN
57
+ CONTRACT, TORT, OR UNDER ANY OTHER THEORY OF LIABILITY, WHETHER OR NOT YOU
58
+ HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
59
+
60
+ These Terms of Use shall be governed exclusively by the internal laws of
61
+ the State of California, without regard to its conflicts of laws
62
+ rules. Each party hereby consents to the exclusive jurisdiction of the
63
+ state and federal courts located in San Francisco County, California to
64
+ adjudicate any dispute arising out of or relating to these Terms of Use and
65
+ the download, installation, and/or use of the Software. Except as expressly
66
+ stated herein, these Terms of Use constitute the entire agreement between
67
+ the parties, and supersede all prior and contemporaneous agreements,
68
+ proposals, or representations, written or oral, concerning their subject
69
+ matter. No modification, amendment, or waiver of any provision of these
70
+ Terms of Use shall be effective unless it is by an update to these Terms of
71
+ Use that Salesforce makes available, or is in writing and signed by the
72
+ party against whom the modification, amendment, or waiver is to be
73
+ asserted.
74
+
75
+ Data Privacy: Salesforce may collect, process, and store device,
76
+ system, and other information related to your use of the Software. This
77
+ information includes, but is not limited to, IP address, user metrics, and
78
+ other data ("Usage Data"). Salesforce may use Usage Data for analytics,
79
+ product development, and marketing purposes. You acknowledge that files
80
+ generated in conjunction with the Software may contain sensitive or
81
+ confidential data, and you are solely responsible for anonymizing and
82
+ protecting such data.
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "@salesforce/lds-adapters-industries-nlpservice",
3
+ "version": "1.114.3",
4
+ "description": "Ai Natural Language Processing Service",
5
+ "license": "SEE LICENSE IN LICENSE.txt",
6
+ "main": "dist/es/es2018/industries-nlpservice.js",
7
+ "module": "dist/es/es2018/industries-nlpservice.js",
8
+ "types": "dist/es/es2018/types/src/generated/artifacts/main.d.ts",
9
+ "files": [
10
+ "dist",
11
+ "sfdc",
12
+ "src/raml/*"
13
+ ],
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/es/es2018/types/src/generated/artifacts/main.d.ts",
17
+ "import": "./dist/es/es2018/industries-nlpservice.js",
18
+ "require": "./dist/es/es2018/industries-nlpservice.js"
19
+ },
20
+ "./sfdc": {
21
+ "types": "./sfdc/index.d.ts",
22
+ "import": "./sfdc/index.js",
23
+ "default": "./sfdc/index.js"
24
+ }
25
+ },
26
+ "sfdc": {
27
+ "namespace": "lightning",
28
+ "module": "industriesNlpserviceApi"
29
+ },
30
+ "contributors": [
31
+ "industries-einstein-hyd@salesforce.com"
32
+ ],
33
+ "scripts": {
34
+ "build": "yarn build:raml && yarn build:services && yarn build:karma",
35
+ "build:karma": "rollup --config rollup.config.karma.js",
36
+ "build:raml": "luvio generate src/raml/luvio.raml src/generated -p '../lds-compiler-plugins'",
37
+ "build:services": "rollup --config rollup.config.js",
38
+ "clean": "rm -rf dist sfdc src/generated karma/dist",
39
+ "release:core": "../../scripts/release/core.js --adapter=lds-adapters-industries-nlpservice",
40
+ "release:corejar": "yarn build && ../core-build/scripts/core.js --adapter=lds-adapters-industries-nlpservice",
41
+ "start": "karma start",
42
+ "test": "karma start --single-run",
43
+ "test:compat": "karma start --single-run --compat"
44
+ },
45
+ "dependencies": {
46
+ "@salesforce/lds-bindings": "*"
47
+ },
48
+ "devDependencies": {
49
+ "@salesforce/lds-karma": "*",
50
+ "@salesforce/lds-compiler-plugins": "*"
51
+ },
52
+ "nx": {
53
+ "targets": {
54
+ "build": {
55
+ "outputs": [
56
+ "packages/lds-adapters-industries-nlpservice/dist",
57
+ "packages/lds-adapters-industries-nlpservice/karma/dist",
58
+ "packages/lds-adapters-industries-nlpservice/sfdc",
59
+ "packages/lds-adapters-industries-nlpservice/src/generated"
60
+ ]
61
+ }
62
+ }
63
+ },
64
+ "volta": {
65
+ "extends": "../../package.json"
66
+ }
67
+ }
@@ -0,0 +1,169 @@
1
+ #%RAML 1.0
2
+ securedBy:
3
+ - OAuth2
4
+ title: Salesforce Connect API
5
+ version: '59.0'
6
+ mediaType: application/json
7
+ protocols:
8
+ - https
9
+ baseUri: /services/data/v59.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
+ AINaturalLangProcessResultCollectionRepresentation:
29
+ description: The output representation of the list for AINaturalLangProcessResult
30
+ type: object
31
+ properties:
32
+ aiNaturalLangProcessResults:
33
+ description: Get a list of AINaturalLangProcessResult.
34
+ type: array
35
+ items:
36
+ type: AINaturalLangProcessResultRepresentation
37
+ AINaturalLangProcessResultInputWrapperRepresentation:
38
+ description: Wrapper for AINaturalLangProcessResultInputRepresentation.
39
+ type: object
40
+ properties:
41
+ aiNaturalLangProcessResultInputParam:
42
+ description: oas body name.
43
+ type: AINaturalLangProcessResultInputRepresentation
44
+ AINaturalLangProcessResultInputRepresentation:
45
+ description: Input representation for AINaturalLangProcessResult
46
+ type: object
47
+ properties:
48
+ query:
49
+ description: Query
50
+ type: string
51
+ required: false # TODO Hand-rolled W-9314597
52
+ serviceType:
53
+ description: Service Type
54
+ type: string
55
+ enum:
56
+ - OpenAIClauseExtraction
57
+ - OpenAIClauseGeneration
58
+ - OpenAIEntityRecognition
59
+ required: false # TODO Hand-rolled W-9314597
60
+ AINaturalLangProcessResultRepresentation:
61
+ description: The output representation of the AINaturalLangProcessResult
62
+ type: object
63
+ properties:
64
+ id:
65
+ description: The id of the AINaturalLangProcessResult record
66
+ type: string
67
+ requestText:
68
+ description: The Request Tex for the NLP operation
69
+ type: string | nil
70
+ response:
71
+ description: The Response of the NLP operation
72
+ type: object
73
+ serviceType:
74
+ description: The type of NLP service and operation
75
+ type: string
76
+ sourceRecord:
77
+ description: The original source record id on which the NLP operation was
78
+ performed
79
+ type: string | nil
80
+ status:
81
+ description: The Status of the NLP operation
82
+ type: string
83
+ ClauseStructRepresentation:
84
+ description: Details of a Clause
85
+ type: object
86
+ properties:
87
+ clauseName:
88
+ description: The name of the Clause
89
+ type: string
90
+ clauseText:
91
+ description: The text in the Clause
92
+ type: string
93
+ EntityStructRepresentation:
94
+ description: Details of an entity
95
+ type: object
96
+ properties:
97
+ entityName:
98
+ description: The name of the entity
99
+ type: string
100
+ entityValues:
101
+ description: The list of entities
102
+ type: array
103
+ items:
104
+ type: string
105
+ OpenAIClauseRepresentation:
106
+ description: Represents clause results fetched from OpenAI
107
+ type: object
108
+ properties:
109
+ clauseResults:
110
+ description: Represents a list of clauses
111
+ type: array
112
+ items:
113
+ type: ClauseStructRepresentation
114
+ totalResults:
115
+ description: Represents total number of clauses
116
+ type: integer
117
+ OpenAIEntityRepresentation:
118
+ description: Represents entity results fetched from OpenAI
119
+ type: object
120
+ properties:
121
+ entityResults:
122
+ description: Represents a list of entities
123
+ type: array
124
+ items:
125
+ type: EntityStructRepresentation
126
+ totalResults:
127
+ description: Represents total number of entities
128
+ type: integer
129
+ /connect/nlp-service/aiNaturalLangProcessResults:
130
+ post:
131
+ displayName: postAINaturalLangProcessResult
132
+ description: Creates a AINaturalLangProcessResults record
133
+ responses:
134
+ '200':
135
+ description: Success
136
+ body:
137
+ application/json:
138
+ type: AINaturalLangProcessResultRepresentation
139
+ body:
140
+ application/json:
141
+ # TODO Hand-rolled W-10128739. Original type: RecommendationInputRepresentation
142
+ type: AINaturalLangProcessResultInputWrapperRepresentation
143
+ (oas-body-name): aiNaturalLangProcessResultInputParam
144
+ /connect/nlp-service/aiNaturalLangProcessResults/sourceRecords/{sourceRecordId}:
145
+ get:
146
+ displayName: getAINaturalLangProcessResultCollection
147
+ description: Gives the AINaturalLangProcessResults for a Source Record (Content
148
+ Document)
149
+ responses:
150
+ '200':
151
+ description: Success
152
+ body:
153
+ application/json:
154
+ type: AINaturalLangProcessResultCollectionRepresentation
155
+ queryParameters:
156
+ serviceTypes:
157
+ type: array
158
+ required: false
159
+ items:
160
+ type: string
161
+ enum:
162
+ - OpenAIClauseExtraction
163
+ - OpenAIClauseGeneration
164
+ - OpenAIEntityRecognition
165
+ (oas-collectionFormat): csv
166
+ uriParameters:
167
+ sourceRecordId:
168
+ type: string
169
+ required: true
@@ -0,0 +1,28 @@
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/sourceRecords/{sourceRecordId}:
26
+ get:
27
+ (luvio.adapter):
28
+ name: fetchAINaturalLangProcessResultsBySourceId