@salesforce/lds-adapters-commerce-extensions 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 (41) hide show
  1. package/LICENSE.txt +82 -0
  2. package/dist/es/es2018/commerce-extensions.js +1978 -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/createMapping.d.ts +18 -0
  5. package/dist/es/es2018/types/src/generated/adapters/deleteMapping.d.ts +14 -0
  6. package/dist/es/es2018/types/src/generated/adapters/getExtensions.d.ts +26 -0
  7. package/dist/es/es2018/types/src/generated/adapters/getMapping.d.ts +28 -0
  8. package/dist/es/es2018/types/src/generated/adapters/getMappings.d.ts +28 -0
  9. package/dist/es/es2018/types/src/generated/adapters/getProvider.d.ts +28 -0
  10. package/dist/es/es2018/types/src/generated/adapters/getProviders.d.ts +28 -0
  11. package/dist/es/es2018/types/src/generated/adapters/updateMapping.d.ts +19 -0
  12. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +9 -0
  13. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +18 -0
  14. package/dist/es/es2018/types/src/generated/resources/deleteCommerceExtensionMappingsByMappingId.d.ts +12 -0
  15. package/dist/es/es2018/types/src/generated/resources/deleteCommerceExtensionProvidersByProviderId.d.ts +11 -0
  16. package/dist/es/es2018/types/src/generated/resources/getCommerceExtensionExtensions.d.ts +12 -0
  17. package/dist/es/es2018/types/src/generated/resources/getCommerceExtensionMappings.d.ts +16 -0
  18. package/dist/es/es2018/types/src/generated/resources/getCommerceExtensionMappingsByMappingId.d.ts +16 -0
  19. package/dist/es/es2018/types/src/generated/resources/getCommerceExtensionProviders.d.ts +16 -0
  20. package/dist/es/es2018/types/src/generated/resources/getCommerceExtensionProvidersByProviderId.d.ts +16 -0
  21. package/dist/es/es2018/types/src/generated/resources/patchCommerceExtensionProvidersByProviderId.d.ts +22 -0
  22. package/dist/es/es2018/types/src/generated/resources/postCommerceExtensionMappings.d.ts +15 -0
  23. package/dist/es/es2018/types/src/generated/resources/postCommerceExtensionProviders.d.ts +19 -0
  24. package/dist/es/es2018/types/src/generated/resources/putCommerceExtensionMappingsByMappingId.d.ts +18 -0
  25. package/dist/es/es2018/types/src/generated/types/ApexClassInputRepresentation.d.ts +31 -0
  26. package/dist/es/es2018/types/src/generated/types/ApexClassOutputRepresentation.d.ts +37 -0
  27. package/dist/es/es2018/types/src/generated/types/EffectiveMappingRepresentation.d.ts +28 -0
  28. package/dist/es/es2018/types/src/generated/types/ExtensionOutputCollectionRepresentation.d.ts +42 -0
  29. package/dist/es/es2018/types/src/generated/types/ExtensionOutputRepresentation.d.ts +50 -0
  30. package/dist/es/es2018/types/src/generated/types/MappingInputRepresentation.d.ts +38 -0
  31. package/dist/es/es2018/types/src/generated/types/MappingOutputCollectionRepresentation.d.ts +42 -0
  32. package/dist/es/es2018/types/src/generated/types/MappingOutputRepresentation.d.ts +48 -0
  33. package/dist/es/es2018/types/src/generated/types/ProviderInputRepresentation.d.ts +49 -0
  34. package/dist/es/es2018/types/src/generated/types/ProviderOutputCollectionRepresentation.d.ts +42 -0
  35. package/dist/es/es2018/types/src/generated/types/ProviderOutputRepresentation.d.ts +67 -0
  36. package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
  37. package/package.json +75 -0
  38. package/sfdc/index.d.ts +1 -0
  39. package/sfdc/index.js +2147 -0
  40. package/src/raml/api.raml +351 -0
  41. package/src/raml/luvio.raml +71 -0
@@ -0,0 +1,351 @@
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/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
+ ApexClassInputRepresentation:
29
+ description: Input representation of a provider's apex class.
30
+ type: object
31
+ properties:
32
+ classId:
33
+ description: Unique identifier for the apex class.
34
+ type: string
35
+ className:
36
+ description: Name of the class containing the entry methods.
37
+ type: string
38
+ ApexClassOutputRepresentation:
39
+ description: Output representation of a provider's apex class.
40
+ type: object
41
+ properties:
42
+ classId:
43
+ description: Unique identifier for the apex class.
44
+ type: string
45
+ className:
46
+ description: Name of the main class containing the entry methods.
47
+ type: string
48
+ namespace:
49
+ description: Unique identifier for the company supplying the provider
50
+ type: string
51
+ version:
52
+ description: The version of the apex class
53
+ type: string
54
+ EffectiveMappingRepresentation:
55
+ description: Output representation of a list of webstores that are effectivly
56
+ mapped to an Extension.
57
+ type: object
58
+ properties:
59
+ webstoreId:
60
+ description: The unique webstore identifier.
61
+ type: string
62
+ ExtensionOutputCollectionRepresentation:
63
+ description: Output representation of a list of extensions.
64
+ type: object
65
+ properties:
66
+ count:
67
+ description: Total count of extensions
68
+ type: integer
69
+ items:
70
+ description: List of extensions.
71
+ type: array
72
+ items:
73
+ type: ExtensionOutputRepresentation
74
+ ExtensionOutputRepresentation:
75
+ description: Output representation of one Extension.
76
+ type: object
77
+ properties:
78
+ domain:
79
+ description: The service domain the Extension belongs to.
80
+ type: string
81
+ epn:
82
+ description: Extension's unique identifier.
83
+ type: string
84
+ name:
85
+ description: The name of the extension.
86
+ type: string
87
+ product:
88
+ description: The Salesforce family the Extension belongs to.
89
+ type: string
90
+ type:
91
+ description: Allowable values are Domain and Endpoint.
92
+ type: string
93
+ MappingInputRepresentation:
94
+ description: Input representation for mapping.
95
+ type: object
96
+ properties:
97
+ epn:
98
+ description: The extension this provider corresponds to.
99
+ type: string
100
+ # handrolled: id needs to be optional
101
+ id?:
102
+ description: The unique mapping identifier
103
+ type: string
104
+ providerName:
105
+ description: Unique name of the extension provider.
106
+ type: string
107
+ webstoreId:
108
+ description: The Id of the webstore this mapping corresponds to.
109
+ type: string
110
+ MappingOutputCollectionRepresentation:
111
+ description: Output representation of a list of mapped extensions.
112
+ type: object
113
+ properties:
114
+ count:
115
+ description: Total count of extensions
116
+ type: integer
117
+ items:
118
+ description: List of mappings.
119
+ type: array
120
+ items:
121
+ type: MappingOutputRepresentation
122
+ MappingOutputRepresentation:
123
+ description: Output representation for mapping.
124
+ type: object
125
+ properties:
126
+ epn:
127
+ description: The extension this provider corresponds to.
128
+ type: string
129
+ id:
130
+ description: The unique mapping identifier
131
+ type: string
132
+ providerName:
133
+ description: Unique name of the extension provider.
134
+ type: string
135
+ webstoreId:
136
+ description: The Id of the webstore this mapping corresponds to.
137
+ type: string
138
+ ProviderInputRepresentation:
139
+ description: Input representation of a Provider
140
+ type: object
141
+ properties:
142
+ apexClass:
143
+ description: Description of the apex class.
144
+ type: object
145
+ configUrl:
146
+ description: The URL of the administrative application used to configure the
147
+ provider.
148
+ type: string
149
+ description:
150
+ description: Description of the provider.
151
+ type: string
152
+ epn:
153
+ description: The extension this provider corresponds to.
154
+ type: string
155
+ iconUri:
156
+ description: Representing the extension provider.
157
+ type: string
158
+ isApplication:
159
+ description: If the extension provider is contained within a managed package.
160
+ type: boolean
161
+ name:
162
+ description: Unique name of the extension provider.
163
+ type: string
164
+ type:
165
+ description: The type of extension.
166
+ type: string
167
+ ProviderOutputCollectionRepresentation:
168
+ description: Output representation of a list of extension providers.
169
+ type: object
170
+ properties:
171
+ count:
172
+ description: Total count of extensions
173
+ type: integer
174
+ items:
175
+ description: List of providers.
176
+ type: array
177
+ items:
178
+ type: ProviderOutputRepresentation
179
+ ProviderOutputRepresentation:
180
+ description: Output representation of a Provider
181
+ type: object
182
+ properties:
183
+ apexClass:
184
+ description: Information about the Apex class implementing this Provider
185
+ type: ApexClassOutputRepresentation
186
+ effectiveMappings:
187
+ description: List of mappings this provider is associated with.
188
+ type: array
189
+ items:
190
+ type: EffectiveMappingRepresentation
191
+ epn:
192
+ description: The extension this provider corresponds to.
193
+ type: string
194
+ name:
195
+ description: Unique name of the extension provider.
196
+ type: string
197
+ type:
198
+ description: The type of extension.
199
+ type: string
200
+ configUrl:
201
+ description: The URL of the administrative application used to configure the provider.
202
+ type: string
203
+ iconUri:
204
+ description: Representing the extension provider.
205
+ type: string
206
+ description:
207
+ description: Description of the provider.
208
+ type: string
209
+ isApplication:
210
+ description: If the extension provider is contained within a managed package.
211
+ type: boolean
212
+ id:
213
+ description: The unique provider identifier
214
+ type: string
215
+ /commerce/extension:
216
+ /extensions:
217
+ get:
218
+ displayName: getExtensionCollection
219
+ description: Get extensions.
220
+ responses:
221
+ '200':
222
+ description: Success
223
+ body:
224
+ application/json:
225
+ type: ExtensionOutputCollectionRepresentation
226
+ /mappings:
227
+ get:
228
+ displayName: getMappingCollection
229
+ description: Get Mapped Extension Providers.
230
+ responses:
231
+ '200':
232
+ description: Success
233
+ body:
234
+ application/json:
235
+ type: MappingOutputCollectionRepresentation
236
+ queryParameters:
237
+ epn:
238
+ type: string
239
+ required: false
240
+ webstoreId:
241
+ type: string
242
+ required: false
243
+ post:
244
+ displayName: postMappingCollection
245
+ description: Create a mapping between an extension provider and a webstore.
246
+ responses:
247
+ '200':
248
+ description: Success
249
+ body:
250
+ application/json:
251
+ type: MappingOutputRepresentation
252
+ body:
253
+ application/json:
254
+ type: MappingInputRepresentation
255
+ (oas-body-name): mappingInputRepresentation
256
+ /mappings/{mappingId}:
257
+ delete:
258
+ displayName: deleteMapping
259
+ description: Remove the mapping between an extension provider and a webstore
260
+ responses:
261
+ '200':
262
+ description: Success
263
+ get:
264
+ displayName: getMapping
265
+ description: Get a mapped extension provider.
266
+ responses:
267
+ '200':
268
+ description: Success
269
+ body:
270
+ application/json:
271
+ type: MappingOutputRepresentation
272
+ put:
273
+ displayName: putMapping
274
+ description: Alter an existing mapping between an extension provider and a webstore.
275
+ responses:
276
+ '200':
277
+ description: Success
278
+ body:
279
+ application/json:
280
+ type: MappingOutputRepresentation
281
+ body:
282
+ application/json:
283
+ type: MappingInputRepresentation
284
+ (oas-body-name): mappingInputRepresentation
285
+ uriParameters:
286
+ mappingId:
287
+ type: string
288
+ required: true
289
+ /providers:
290
+ get:
291
+ displayName: getGetExtensionProvidersCollection
292
+ description: Get Extension Providers.
293
+ responses:
294
+ '200':
295
+ description: Success
296
+ body:
297
+ application/json:
298
+ type: ProviderOutputCollectionRepresentation
299
+ queryParameters:
300
+ effectiveMappingsWebstoreId:
301
+ type: string
302
+ required: false
303
+ epn:
304
+ type: string
305
+ required: false
306
+ post:
307
+ displayName: postExtensionProvidersCollection
308
+ description: Register a provider
309
+ responses:
310
+ '200':
311
+ description: Success
312
+ body:
313
+ application/json:
314
+ type: ProviderOutputRepresentation
315
+ body:
316
+ application/json:
317
+ type: ProviderInputRepresentation
318
+ (oas-body-name): providerInputRepresentation
319
+ /providers/{providerId}:
320
+ delete:
321
+ displayName: deleteExtensionProvider
322
+ description: Remove a provider.
323
+ responses:
324
+ '200':
325
+ description: Success
326
+ get:
327
+ displayName: getProvider
328
+ description: Get an extension provider
329
+ responses:
330
+ '200':
331
+ description: Success
332
+ body:
333
+ application/json:
334
+ type: ProviderOutputRepresentation
335
+ patch:
336
+ displayName: patchExtensionProvider
337
+ description: Alter an existing extension provider.
338
+ responses:
339
+ '200':
340
+ description: Success
341
+ body:
342
+ application/json:
343
+ type: ProviderOutputRepresentation
344
+ body:
345
+ application/json:
346
+ type: ProviderInputRepresentation
347
+ (oas-body-name): providerInputRepresentation
348
+ uriParameters:
349
+ providerId:
350
+ type: string
351
+ required: true
@@ -0,0 +1,71 @@
1
+ #%RAML 1.0 Overlay
2
+ extends: ./api.raml
3
+
4
+ uses:
5
+ luvio: luvio://annotations.raml
6
+
7
+ (luvio.keyPrefix): 'extensions'
8
+
9
+ #global ttl will NOT cause error response caching to expire, so we need it at every type
10
+
11
+ types:
12
+ ExtensionOutputRepresentation:
13
+ (luvio.ttl): 60000
14
+ (luvio.key):
15
+ epn: epn
16
+ ExtensionOutputCollectionRepresentation:
17
+ (luvio.ttl): 60000
18
+ MappingInputRepresentation:
19
+ (luvio.ttl): 60000
20
+ MappingOutputRepresentation:
21
+ (luvio.ttl): 60000
22
+ (luvio.key):
23
+ id: id
24
+ (luvio.updateAvailable):
25
+ name: notifyMappingUpdateAvailable
26
+ parameters:
27
+ id: id
28
+ MappingOutputCollectionRepresentation:
29
+ (luvio.ttl): 60000
30
+ ProviderOutputRepresentation:
31
+ (luvio.ttl): 60000
32
+ (luvio.key):
33
+ id: id
34
+ ProviderOutputCollectionRepresentation:
35
+ (luvio.ttl): 60000
36
+
37
+ /commerce/extension/extensions:
38
+ get:
39
+ (luvio.adapter):
40
+ name: getExtensions
41
+ /commerce/extension/mappings:
42
+ get:
43
+ (luvio.adapter):
44
+ name: getMappings
45
+ post:
46
+ (luvio.adapter):
47
+ name: createMapping
48
+ /commerce/extension/mappings/{mappingId}:
49
+ get:
50
+ (luvio.adapter):
51
+ name: getMapping
52
+ (luvio.key):
53
+ id: urlParams.mappingId
54
+ put:
55
+ (luvio.adapter):
56
+ name: updateMapping
57
+ delete:
58
+ (luvio.adapter):
59
+ name: deleteMapping
60
+ (luvio.key):
61
+ id: urlParams.mappingId
62
+ /commerce/extension/providers:
63
+ get:
64
+ (luvio.adapter):
65
+ name: getProviders
66
+ /commerce/extension/providers/{providerId}:
67
+ get:
68
+ (luvio.adapter):
69
+ name: getProvider
70
+ (luvio.key):
71
+ id: urlParams.providerId