@salesforce/lds-adapters-platform-named-credential 1.100.2

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 (33) hide show
  1. package/LICENSE.txt +82 -0
  2. package/dist/es/es2018/platform-named-credential.js +1029 -0
  3. package/dist/types/src/generated/adapters/adapter-utils.d.ts +66 -0
  4. package/dist/types/src/generated/adapters/deleteCredential.d.ts +15 -0
  5. package/dist/types/src/generated/adapters/getExternalCredentials.d.ts +25 -0
  6. package/dist/types/src/generated/adapters/getOAuthCredentialAuthUrl.d.ts +15 -0
  7. package/dist/types/src/generated/artifacts/main.d.ts +3 -0
  8. package/dist/types/src/generated/artifacts/sfdc.d.ts +5 -0
  9. package/dist/types/src/generated/resources/deleteNamedCredentialsCredential.d.ts +14 -0
  10. package/dist/types/src/generated/resources/getNamedCredentialsCredential.d.ts +17 -0
  11. package/dist/types/src/generated/resources/getNamedCredentialsExternalCredentials.d.ts +12 -0
  12. package/dist/types/src/generated/resources/getNamedCredentialsExternalCredentialsByDeveloperName.d.ts +15 -0
  13. package/dist/types/src/generated/resources/postNamedCredentialsCredential.d.ts +18 -0
  14. package/dist/types/src/generated/resources/postNamedCredentialsCredentialAuthUrlOAuth.d.ts +13 -0
  15. package/dist/types/src/generated/resources/putNamedCredentialsCredential.d.ts +18 -0
  16. package/dist/types/src/generated/types/CredentialInputRepresentation.d.ts +45 -0
  17. package/dist/types/src/generated/types/CredentialMapRepresentation.d.ts +33 -0
  18. package/dist/types/src/generated/types/CredentialRepresentation.d.ts +63 -0
  19. package/dist/types/src/generated/types/ExternalCredentialListRepresentation.d.ts +39 -0
  20. package/dist/types/src/generated/types/ExternalCredentialPrincipalRepresentation.d.ts +35 -0
  21. package/dist/types/src/generated/types/ExternalCredentialRepresentation.d.ts +55 -0
  22. package/dist/types/src/generated/types/NamedCredentialRepresentation.d.ts +32 -0
  23. package/dist/types/src/generated/types/OAuthCredentialAuthUrlInputRepresentation.d.ts +38 -0
  24. package/dist/types/src/generated/types/OAuthCredentialAuthUrlInputRepresentationWrapper.d.ts +30 -0
  25. package/dist/types/src/generated/types/OAuthCredentialAuthUrlRepresentation.d.ts +47 -0
  26. package/dist/types/src/generated/types/type-utils.d.ts +39 -0
  27. package/dist/umd/es2018/platform-named-credential.js +1039 -0
  28. package/dist/umd/es5/platform-named-credential.js +1045 -0
  29. package/package.json +70 -0
  30. package/sfdc/index.d.ts +1 -0
  31. package/sfdc/index.js +1070 -0
  32. package/src/raml/api.raml +330 -0
  33. package/src/raml/luvio.raml +38 -0
@@ -0,0 +1,330 @@
1
+ #%RAML 1.0
2
+ securedBy:
3
+ - OAuth2
4
+ title: Salesforce Connect API
5
+ version: '56.0'
6
+ mediaType: application/json
7
+ protocols:
8
+ - https
9
+ baseUri: /services/data/v58.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
+ CredentialInputRepresentation:
29
+ description: Credential input representation
30
+ type: object
31
+ properties:
32
+ authenticationProtocol:
33
+ description: Authentication protocol of the external credential
34
+ type: string
35
+ enum:
36
+ - AwsSv4
37
+ - OAuth
38
+ credentials:
39
+ description: Protocol specific credentials
40
+ type: object
41
+ properties:
42
+ //:
43
+ type: string
44
+ externalCredential:
45
+ description: External Credential DeveloperName
46
+ type: string
47
+ principalName:
48
+ description: Principal Name of principals
49
+ type: string
50
+ principalType:
51
+ description: Principal Type of principals. Allowed values are NamedPrincipal
52
+ or PerUserPrincipal
53
+ type: string
54
+ enum:
55
+ - NamedPrincipal
56
+ - PerUserPrincipal
57
+ CredentialMapRepresentation:
58
+ description: credentials map wrapper used in CredentialInputRepresentation
59
+ type: object
60
+ properties:
61
+ map:
62
+ description: wrapped credentials map
63
+ type: object
64
+ properties:
65
+ //:
66
+ type: string
67
+ CredentialRepresentation:
68
+ description: Output representation for Credential
69
+ type: object
70
+ properties:
71
+ authenticationProtocol:
72
+ description: Authentication protocol of the external credential
73
+ type: string
74
+ enum:
75
+ - AwsSv4
76
+ - OAuth
77
+ authenticationStatus:
78
+ description: Authentication Status. It's authenticated if external credential
79
+ has all required credentials for this principal
80
+ type: string
81
+ enum:
82
+ - Authenticated
83
+ - NotAuthenticated
84
+ credentials:
85
+ description: Protocol specific credentials
86
+ type: object
87
+ properties:
88
+ //:
89
+ type: string
90
+ externalCredential:
91
+ description: External credential developer name
92
+ type: string
93
+ principalName:
94
+ description: Principal parameter name associated with these credentials
95
+ type: string | nil
96
+ principalType:
97
+ description: Principal Type. It's either NamedPrincipal or PerUserPrincipal
98
+ type: string
99
+ enum:
100
+ - NamedPrincipal
101
+ - PerUserPrincipal
102
+ ExternalCredentialListRepresentation:
103
+ description: Output representation for External Credential List
104
+ type: object
105
+ properties:
106
+ externalCredentials:
107
+ description: List of external credentials
108
+ type: array
109
+ items:
110
+ type: ExternalCredentialRepresentation
111
+ ExternalCredentialPrincipalRepresentation:
112
+ description: Output representation for an External Credential principal
113
+ type: object
114
+ properties:
115
+ authenticationStatus:
116
+ description: Authentication Status for credentials
117
+ type: string
118
+ enum:
119
+ - Authenticated
120
+ - NotAuthenticated
121
+ principalName:
122
+ description: Principal name
123
+ type: string
124
+ principalType:
125
+ description: Principal Type. It's either NamedPrincipal or PerUser
126
+ type: string
127
+ enum:
128
+ - NamedPrincipal
129
+ - PerUserPrincipal
130
+ ExternalCredentialRepresentation:
131
+ description: Output representation for External Credential
132
+ type: object
133
+ properties:
134
+ authenticationProtocol:
135
+ description: Authentication protocol of the external credential
136
+ type: string
137
+ enum:
138
+ - AwsSv4
139
+ - OAuth
140
+ authenticationStatus:
141
+ description: Authentication Status. It's authenticated if external credential
142
+ has all required credentials for at least one principal
143
+ type: string
144
+ enum:
145
+ - Authenticated
146
+ - NotAuthenticated
147
+ developerName:
148
+ description: External Credential developer name
149
+ type: string
150
+ masterLabel:
151
+ description: External Credential master label
152
+ type: string
153
+ principals:
154
+ description: List of principals the credential has
155
+ type: array
156
+ items:
157
+ type: ExternalCredentialPrincipalRepresentation
158
+ relatedNamedCredentials:
159
+ description: List of named credentials associated to the external credential
160
+ type: array
161
+ items:
162
+ type: NamedCredentialRepresentation
163
+ NamedCredentialRepresentation:
164
+ description: Output representation for a named credential associated to an external
165
+ credential
166
+ type: object
167
+ properties:
168
+ developerName:
169
+ description: NamedCredential developer name
170
+ type: string
171
+ masterLabel:
172
+ description: NamedCredential master label
173
+ type: string
174
+ OAuthCredentialAuthUrlInputRepresentation:
175
+ description: OAuth authentication flow input representation
176
+ type: object
177
+ properties:
178
+ externalCredential:
179
+ description: External Credential DeveloperName
180
+ type: string
181
+ principalName:
182
+ description: Principal Name of principals
183
+ type: string
184
+ principalType:
185
+ description: Principal Type of principals. Allowed values are NamedPrincipal
186
+ or PerUser
187
+ type: string
188
+ enum:
189
+ - NamedPrincipal
190
+ - PerUserPrincipal
191
+ returnUrl:
192
+ description: optional return url to be applied to the authentication url
193
+ type: string
194
+ OAuthCredentialAuthUrlRepresentation:
195
+ description: Output representation for OAuth authentication url for a User's Credential
196
+ type: object
197
+ properties:
198
+ authenticationUrl:
199
+ description: OAuth authentication url for a User's Credential
200
+ type: string
201
+ externalCredential:
202
+ description: External Credential DeveloperName
203
+ type: string
204
+ principalName:
205
+ description: Credential principal name
206
+ type: string
207
+ principalType:
208
+ description: Credential principal type. It's either NamedPrincipal or PerUserPrincipal
209
+ type: string
210
+ enum:
211
+ - NamedPrincipal
212
+ - PerUserPrincipal
213
+ # TODO Hand-Rolled due to issue #28 in Generated RAML Gaps (https://salesforce.quip.com/NxVhAkxL6RTW#dGQACAMmFgP)
214
+ OAuthCredentialAuthUrlInputRepresentationWrapper:
215
+ description: Wrapper for OAuthCredentialAuthUrlInputRepresentation
216
+ type: object
217
+ properties:
218
+ requestBody:
219
+ type: OAuthCredentialAuthUrlInputRepresentation
220
+ description: Input representation to generate auth url
221
+ /named-credentials:
222
+ /credential:
223
+ delete:
224
+ description: DELETE method to delete a Credential
225
+ responses:
226
+ '200':
227
+ description: Success
228
+ queryParameters:
229
+ externalCredential:
230
+ type: string
231
+ required: false
232
+ principalName:
233
+ type: string
234
+ required: false
235
+ principalType:
236
+ type: string
237
+ required: false
238
+ enum:
239
+ - NamedPrincipal
240
+ - PerUserPrincipal
241
+ get:
242
+ description: GET method to get Credential records visible to the user
243
+ responses:
244
+ '200':
245
+ description: Success
246
+ body:
247
+ application/json:
248
+ type: CredentialRepresentation
249
+ queryParameters:
250
+ externalCredential:
251
+ type: string
252
+ required: false
253
+ principalName:
254
+ type: string
255
+ required: false
256
+ principalType:
257
+ type: string
258
+ required: false
259
+ enum:
260
+ - NamedPrincipal
261
+ - PerUserPrincipal
262
+ post:
263
+ description: POST method to create a Credential
264
+ responses:
265
+ '200':
266
+ description: Success
267
+ body:
268
+ application/json:
269
+ type: CredentialRepresentation
270
+ body:
271
+ application/json:
272
+ type: CredentialInputRepresentation
273
+ # TODO: Hand-rolled W-8334626 due to issue #22 in Generated RAML Gaps (https://salesforce.quip.com/NxVhAkxL6RTW#dGQACAxyxIv)
274
+ # required: false
275
+ (oas-body-name): requestBody
276
+ put:
277
+ description: PUT method to replace a Credential
278
+ responses:
279
+ '200':
280
+ description: Success
281
+ body:
282
+ application/json:
283
+ type: CredentialRepresentation
284
+ body:
285
+ application/json:
286
+ type: CredentialInputRepresentation
287
+ # TODO: Hand-rolled W-8334626 due to issue #22 in Generated RAML Gaps (https://salesforce.quip.com/NxVhAkxL6RTW#dGQACAxyxIv)
288
+ # required: false
289
+ (oas-body-name): requestBody
290
+ /credential/auth-url/o-auth:
291
+ post:
292
+ description: POST method to get the OAuth authentication url for a User External
293
+ Credential
294
+ responses:
295
+ '200':
296
+ description: Success
297
+ body:
298
+ application/json:
299
+ type: OAuthCredentialAuthUrlRepresentation
300
+ body:
301
+ application/json:
302
+ type: OAuthCredentialAuthUrlInputRepresentationWrapper
303
+ # TODO Hand-Rolled due to issue #28 in Generated RAML Gaps (https://salesforce.quip.com/NxVhAkxL6RTW#dGQACAMmFgP)
304
+ # TODO: Hand-rolled W-8334626 due to issue #22 in Generated RAML Gaps (https://salesforce.quip.com/NxVhAkxL6RTW#dGQACAxyxIv)
305
+ # required: false
306
+ (oas-body-name): requestBody
307
+ /external-credentials:
308
+ get:
309
+ description: GET method to get a list of External Credential records the user
310
+ can authenticate to
311
+ responses:
312
+ '200':
313
+ description: Success
314
+ body:
315
+ application/json:
316
+ type: ExternalCredentialListRepresentation
317
+ /external-credentials/{developerName}:
318
+ get:
319
+ description: GET method to get basic information about External Credential
320
+ records the user can authenticate to
321
+ responses:
322
+ '200':
323
+ description: Success
324
+ body:
325
+ application/json:
326
+ type: ExternalCredentialRepresentation
327
+ uriParameters:
328
+ developerName:
329
+ type: string
330
+ required: true
@@ -0,0 +1,38 @@
1
+ #%RAML 1.0 Overlay
2
+ extends: ./api.raml
3
+
4
+ uses:
5
+ luvio: luvio://annotations.raml
6
+
7
+ (luvio.keyPrefix): 'named-credential'
8
+ (luvio.ttl): 300000
9
+
10
+ types:
11
+ ExternalCredentialRepresentation:
12
+ (luvio.key):
13
+ developerName: developerName
14
+ OAuthCredentialAuthUrlRepresentation:
15
+ (luvio.key):
16
+ authenticationUrl: authenticationUrl
17
+ CredentialRepresentation:
18
+ (luvio.key):
19
+ externalCredential: externalCredential
20
+ principalType: principalType
21
+ principalName: principalName
22
+
23
+ /named-credentials/credential:
24
+ delete:
25
+ (luvio.adapter):
26
+ name: deleteCredential
27
+ (luvio.key):
28
+ externalCredential: queryParams.externalCredential || ''
29
+ principalType: queryParams.principalType || ''
30
+ principalName: queryParams.principalName || ''
31
+ /named-credentials/credential/auth-url/o-auth:
32
+ post:
33
+ (luvio.adapter):
34
+ name: getOAuthCredentialAuthUrl
35
+ /named-credentials/external-credentials:
36
+ get:
37
+ (luvio.adapter):
38
+ name: getExternalCredentials