@salesforce/lds-adapters-commerce-catalog 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.
- package/LICENSE.txt +82 -0
- package/dist/es/es2018/commerce-catalog.js +800 -0
- package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +62 -0
- package/dist/es/es2018/types/src/generated/adapters/getProduct.d.ts +35 -0
- package/dist/es/es2018/types/src/generated/adapters/getProductCategoryPath.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +5 -0
- package/dist/es/es2018/types/src/generated/resources/getCommerceWebstoresProductCategoriesByProductCategoryIdAndWebstoreId.d.ts +23 -0
- package/dist/es/es2018/types/src/generated/resources/getCommerceWebstoresProductCategoryPathProductCategoriesByProductCategoryIdAndWebstoreId.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/resources/getCommerceWebstoresProductsByProductIdAndWebstoreId.d.ts +25 -0
- package/dist/es/es2018/types/src/generated/types/ProductCategoryDetailRepresentation.d.ts +44 -0
- package/dist/es/es2018/types/src/generated/types/ProductCategoryMediaGroupRepresentation.d.ts +41 -0
- package/dist/es/es2018/types/src/generated/types/ProductCategoryMediaRepresentation.d.ts +46 -0
- package/dist/es/es2018/types/src/generated/types/ProductCategoryPathRepresentation.d.ts +29 -0
- package/dist/es/es2018/types/src/generated/types/ProductCategoryRepresentation.d.ts +34 -0
- package/dist/es/es2018/types/src/generated/types/ProductDetailRepresentation.d.ts +49 -0
- package/dist/es/es2018/types/src/generated/types/ProductEntitlementRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/ProductMediaContentDocumentRepresentation.d.ts +40 -0
- package/dist/es/es2018/types/src/generated/types/ProductMediaGroupRepresentation.d.ts +41 -0
- package/dist/es/es2018/types/src/generated/types/ProductMediaRepresentation.d.ts +46 -0
- package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
- package/package.json +60 -0
- package/sfdc/index.d.ts +1 -0
- package/sfdc/index.js +842 -0
- package/src/raml/api.raml +338 -0
- package/src/raml/luvio.raml +23 -0
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
#%RAML 1.0
|
|
2
|
+
securedBy:
|
|
3
|
+
- OAuth2
|
|
4
|
+
title: Salesforce Connect API
|
|
5
|
+
version: '51.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
|
+
ProductCategoryDetailRepresentation:
|
|
29
|
+
description: Wrapper containing the detail for a category.
|
|
30
|
+
type: object
|
|
31
|
+
properties:
|
|
32
|
+
bannerImage:
|
|
33
|
+
description: Representation of the banner image of the product category
|
|
34
|
+
type: ProductCategoryMediaRepresentation
|
|
35
|
+
fields:
|
|
36
|
+
description: List of fields belonging to the product category
|
|
37
|
+
type: object
|
|
38
|
+
properties:
|
|
39
|
+
//:
|
|
40
|
+
type: string
|
|
41
|
+
id:
|
|
42
|
+
description: ID of the product category
|
|
43
|
+
type: string
|
|
44
|
+
mediaGroups:
|
|
45
|
+
description: List of media groups of the product category
|
|
46
|
+
type: array
|
|
47
|
+
items:
|
|
48
|
+
type: ProductCategoryMediaGroupRepresentation
|
|
49
|
+
tileImage:
|
|
50
|
+
description: Representation of the tile image of the product category
|
|
51
|
+
type: ProductCategoryMediaRepresentation
|
|
52
|
+
ProductCategoryMediaGroupRepresentation:
|
|
53
|
+
description: Representation of a media group associated with a product category
|
|
54
|
+
type: object
|
|
55
|
+
properties:
|
|
56
|
+
developerName:
|
|
57
|
+
description: API name of the product category media group
|
|
58
|
+
type: string
|
|
59
|
+
id:
|
|
60
|
+
description: ID of the product category media group
|
|
61
|
+
type: string
|
|
62
|
+
mediaItems:
|
|
63
|
+
description: List of media objects inside a product category media group
|
|
64
|
+
type: array
|
|
65
|
+
items:
|
|
66
|
+
type: ProductCategoryMediaRepresentation
|
|
67
|
+
name:
|
|
68
|
+
description: Name of the product category media group
|
|
69
|
+
type: string
|
|
70
|
+
usageType:
|
|
71
|
+
description: Usage type of media items inside a product category media group
|
|
72
|
+
type: string
|
|
73
|
+
enum:
|
|
74
|
+
- Attachment
|
|
75
|
+
- Banner
|
|
76
|
+
- Listing
|
|
77
|
+
- Standard
|
|
78
|
+
- Thumbnail
|
|
79
|
+
- Tile
|
|
80
|
+
ProductCategoryMediaRepresentation:
|
|
81
|
+
description: Representation of a media associated with a product category
|
|
82
|
+
type: object
|
|
83
|
+
properties:
|
|
84
|
+
alternateText:
|
|
85
|
+
description: Alternative text for the product category media
|
|
86
|
+
type: string | nil # TODO W-7380839 (226): "nil" union hand rolled
|
|
87
|
+
contentVersionId:
|
|
88
|
+
description: Content document that represents the product category media
|
|
89
|
+
type: string | nil # TODO W-7380839 (226): "nil" union hand rolled
|
|
90
|
+
id:
|
|
91
|
+
description: ID of the product category image
|
|
92
|
+
type: string | nil # TODO W-7380839 (226): "nil" union hand rolled
|
|
93
|
+
mediaType:
|
|
94
|
+
description: Type of the product category media
|
|
95
|
+
type: string
|
|
96
|
+
enum:
|
|
97
|
+
- Document
|
|
98
|
+
- Image
|
|
99
|
+
- Video
|
|
100
|
+
sortOrder:
|
|
101
|
+
description: Sort oder of a media item inside a media group
|
|
102
|
+
type: integer
|
|
103
|
+
title:
|
|
104
|
+
description: Title of the product category media
|
|
105
|
+
type: string
|
|
106
|
+
url:
|
|
107
|
+
description: URL of the product category media
|
|
108
|
+
type: string
|
|
109
|
+
ProductCategoryPathRepresentation:
|
|
110
|
+
description: Wrapper containing the path for a category.
|
|
111
|
+
type: object
|
|
112
|
+
properties:
|
|
113
|
+
path:
|
|
114
|
+
description: List of categories.
|
|
115
|
+
type: array
|
|
116
|
+
items:
|
|
117
|
+
type: ProductCategoryRepresentation
|
|
118
|
+
ProductCategoryRepresentation:
|
|
119
|
+
description: Representation for basic category data.
|
|
120
|
+
type: object
|
|
121
|
+
properties:
|
|
122
|
+
description:
|
|
123
|
+
description: Description of the category
|
|
124
|
+
type: string | nil # TODO "nil" union type hand rolled
|
|
125
|
+
id:
|
|
126
|
+
description: ID of the category
|
|
127
|
+
type: string | nil # TODO W-7380839 (226): "nil" union hand rolled
|
|
128
|
+
name:
|
|
129
|
+
description: Name of the category
|
|
130
|
+
type: string
|
|
131
|
+
ProductDetailRepresentation:
|
|
132
|
+
description: Representation for the details of a single product
|
|
133
|
+
type: object
|
|
134
|
+
properties:
|
|
135
|
+
defaultImage:
|
|
136
|
+
description: Representation of the default image of the product
|
|
137
|
+
type: ProductMediaRepresentation
|
|
138
|
+
entitlement:
|
|
139
|
+
description: Entitlement info for the product
|
|
140
|
+
type: ProductEntitlementRepresentation
|
|
141
|
+
fields:
|
|
142
|
+
description: List of fields belonging to the product
|
|
143
|
+
type: object
|
|
144
|
+
properties:
|
|
145
|
+
//:
|
|
146
|
+
type: string | nil # TODO W-7380839 (226): "nil" union hand rolled
|
|
147
|
+
id:
|
|
148
|
+
description: ID of the product
|
|
149
|
+
type: string
|
|
150
|
+
mediaGroups:
|
|
151
|
+
description: List of media groups of the product
|
|
152
|
+
type: array
|
|
153
|
+
items:
|
|
154
|
+
type: ProductMediaGroupRepresentation
|
|
155
|
+
primaryProductCategoryPath:
|
|
156
|
+
description: Primary category path of the product
|
|
157
|
+
type: ProductCategoryPathRepresentation
|
|
158
|
+
ProductEntitlementRepresentation:
|
|
159
|
+
description: Representation of a media group associated with a product
|
|
160
|
+
type: object
|
|
161
|
+
properties:
|
|
162
|
+
canViewPrice:
|
|
163
|
+
description: true if the product's price can be viewed, false otherwise
|
|
164
|
+
type: boolean | nil # TODO hand rolled nil union
|
|
165
|
+
ProductMediaContentDocumentRepresentation:
|
|
166
|
+
description: Representation of a product media as content document
|
|
167
|
+
type: object
|
|
168
|
+
properties:
|
|
169
|
+
id:
|
|
170
|
+
description: ID of the ContentDocument as media
|
|
171
|
+
type: string
|
|
172
|
+
largeUrl:
|
|
173
|
+
description: URL of the large size product image
|
|
174
|
+
type: string
|
|
175
|
+
mediumUrl:
|
|
176
|
+
description: URL of the medium size product image
|
|
177
|
+
type: string
|
|
178
|
+
originalUrl:
|
|
179
|
+
description: URL of the original size product image as uploaded
|
|
180
|
+
type: string
|
|
181
|
+
smallUrl:
|
|
182
|
+
description: URL of the small size product image
|
|
183
|
+
type: string
|
|
184
|
+
ProductMediaGroupRepresentation:
|
|
185
|
+
description: Representation of a media group associated with a product
|
|
186
|
+
type: object
|
|
187
|
+
properties:
|
|
188
|
+
developerName:
|
|
189
|
+
description: API name of the produc media group
|
|
190
|
+
type: string
|
|
191
|
+
id:
|
|
192
|
+
description: ID of the product media group
|
|
193
|
+
type: string
|
|
194
|
+
mediaItems:
|
|
195
|
+
description: List of media objects inside a product media group
|
|
196
|
+
type: array
|
|
197
|
+
items:
|
|
198
|
+
type: ProductMediaRepresentation
|
|
199
|
+
name:
|
|
200
|
+
description: Name of the produc media group
|
|
201
|
+
type: string
|
|
202
|
+
usageType:
|
|
203
|
+
description: Usage type of media items inside a product media group
|
|
204
|
+
type: string
|
|
205
|
+
enum:
|
|
206
|
+
- Attachment
|
|
207
|
+
- Banner
|
|
208
|
+
- Listing
|
|
209
|
+
- Standard
|
|
210
|
+
- Thumbnail
|
|
211
|
+
- Tile
|
|
212
|
+
ProductMediaRepresentation:
|
|
213
|
+
description: Representation of a media associated with a product
|
|
214
|
+
type: object
|
|
215
|
+
properties:
|
|
216
|
+
alternateText:
|
|
217
|
+
description: Alternative text for the product media
|
|
218
|
+
type: string | nil # TODO W-7380839 (226): "nil" union hand rolled
|
|
219
|
+
contentVersionId:
|
|
220
|
+
description: The ContentVersionId of the latest published ContentVersion if the media is stored as a ContentDocument. If the image is a customer-provided external URL, the value will be null.
|
|
221
|
+
type: string | nil # TODO W-7380839 (226): "nil" union hand rolled
|
|
222
|
+
id:
|
|
223
|
+
description: ID of the product image
|
|
224
|
+
type: string | nil # TODO W-7380839 (226): "nil" union hand rolled
|
|
225
|
+
mediaType:
|
|
226
|
+
description: Type of the product media
|
|
227
|
+
type: string
|
|
228
|
+
enum:
|
|
229
|
+
- Document
|
|
230
|
+
- Image
|
|
231
|
+
- Video
|
|
232
|
+
sortOrder:
|
|
233
|
+
description: Sort order of a media item inside a media group
|
|
234
|
+
type: integer
|
|
235
|
+
title:
|
|
236
|
+
description: Title of the product media
|
|
237
|
+
type: string
|
|
238
|
+
url:
|
|
239
|
+
description: URL of the product media
|
|
240
|
+
type: string
|
|
241
|
+
/commerce/webstores/{webstoreId}:
|
|
242
|
+
/product-categories/{productCategoryId}:
|
|
243
|
+
get:
|
|
244
|
+
description: Fetch standard field data, custom field data, and enrichment data for a single category.
|
|
245
|
+
responses:
|
|
246
|
+
'200':
|
|
247
|
+
description: Success
|
|
248
|
+
body:
|
|
249
|
+
application/json:
|
|
250
|
+
type: ProductCategoryDetailRepresentation
|
|
251
|
+
queryParameters:
|
|
252
|
+
effectiveAccountId:
|
|
253
|
+
type: string
|
|
254
|
+
required: false
|
|
255
|
+
excludeFields:
|
|
256
|
+
type: boolean
|
|
257
|
+
required: false
|
|
258
|
+
excludeMedia:
|
|
259
|
+
type: boolean
|
|
260
|
+
required: false
|
|
261
|
+
fields:
|
|
262
|
+
type: array
|
|
263
|
+
required: false
|
|
264
|
+
items:
|
|
265
|
+
type: string
|
|
266
|
+
(oas-collectionFormat): csv
|
|
267
|
+
mediaGroups:
|
|
268
|
+
type: array
|
|
269
|
+
required: false
|
|
270
|
+
items:
|
|
271
|
+
type: string
|
|
272
|
+
(oas-collectionFormat): csv
|
|
273
|
+
uriParameters:
|
|
274
|
+
productCategoryId:
|
|
275
|
+
type: string
|
|
276
|
+
required: true
|
|
277
|
+
webstoreId:
|
|
278
|
+
type: string
|
|
279
|
+
required: true
|
|
280
|
+
/product-category-path/product-categories/{productCategoryId}:
|
|
281
|
+
get:
|
|
282
|
+
description: Fetch standard field data, custom field data, and enrichment data for a single Product
|
|
283
|
+
responses:
|
|
284
|
+
'200':
|
|
285
|
+
description: Success
|
|
286
|
+
body:
|
|
287
|
+
application/json:
|
|
288
|
+
type: ProductCategoryPathRepresentation
|
|
289
|
+
uriParameters:
|
|
290
|
+
productCategoryId:
|
|
291
|
+
type: string
|
|
292
|
+
required: true
|
|
293
|
+
webstoreId:
|
|
294
|
+
type: string
|
|
295
|
+
required: true
|
|
296
|
+
/products/{productId}:
|
|
297
|
+
get:
|
|
298
|
+
description: Fetch standard field data, custom field data, and enrichment data for a single Product
|
|
299
|
+
responses:
|
|
300
|
+
'200':
|
|
301
|
+
description: Success
|
|
302
|
+
body:
|
|
303
|
+
application/json:
|
|
304
|
+
type: ProductDetailRepresentation
|
|
305
|
+
queryParameters:
|
|
306
|
+
effectiveAccountId:
|
|
307
|
+
type: string
|
|
308
|
+
required: false
|
|
309
|
+
excludeEntitlement:
|
|
310
|
+
type: boolean
|
|
311
|
+
required: false
|
|
312
|
+
excludeFields:
|
|
313
|
+
type: boolean
|
|
314
|
+
required: false
|
|
315
|
+
excludeMedia:
|
|
316
|
+
type: boolean
|
|
317
|
+
required: false
|
|
318
|
+
excludePrimaryProductCategory:
|
|
319
|
+
type: boolean
|
|
320
|
+
required: false
|
|
321
|
+
fields:
|
|
322
|
+
type: array
|
|
323
|
+
required: false
|
|
324
|
+
items:
|
|
325
|
+
type: string
|
|
326
|
+
(oas-collectionFormat): csv
|
|
327
|
+
mediaGroups:
|
|
328
|
+
type: array
|
|
329
|
+
required: false
|
|
330
|
+
items:
|
|
331
|
+
type: string
|
|
332
|
+
(oas-collectionFormat): csv
|
|
333
|
+
uriParameters:
|
|
334
|
+
productId:
|
|
335
|
+
type: string
|
|
336
|
+
required: true
|
|
337
|
+
webstoreId:
|
|
338
|
+
type: string
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#%RAML 1.0 Overlay
|
|
2
|
+
extends: ./api.raml
|
|
3
|
+
|
|
4
|
+
uses:
|
|
5
|
+
luvio: luvio://annotations.raml
|
|
6
|
+
|
|
7
|
+
(luvio.keyPrefix): 'Commerce'
|
|
8
|
+
(luvio.ttl): 2592000000
|
|
9
|
+
|
|
10
|
+
types:
|
|
11
|
+
ProductDetailRepresentation:
|
|
12
|
+
(luvio.opaque): true
|
|
13
|
+
ProductCategoryPathRepresentation:
|
|
14
|
+
(luvio.opaque): true
|
|
15
|
+
|
|
16
|
+
/commerce/webstores/{webstoreId}/products/{productId}:
|
|
17
|
+
get:
|
|
18
|
+
(luvio.adapter):
|
|
19
|
+
name: getProduct
|
|
20
|
+
/commerce/webstores/{webstoreId}/product-category-path/product-categories/{productCategoryId}:
|
|
21
|
+
get:
|
|
22
|
+
(luvio.adapter):
|
|
23
|
+
name: getProductCategoryPath
|