@salesforce/lds-adapters-commerce-configuration 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.
@@ -0,0 +1,152 @@
1
+ #%RAML 1.0
2
+ securedBy:
3
+ - OAuth2
4
+ title: Salesforce Connect API
5
+ version: '60.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
+ CommerceConfigurationAttributeInputRepresentation:
29
+ description: Input representation of a commerce configuration attribute.
30
+ type: object
31
+ properties:
32
+ booleanValue:
33
+ description: The boolean value of the commerce configuration attribute.
34
+ required: false # hand-rolled
35
+ type: boolean
36
+ integerValue:
37
+ description: The integer value of the commerce configuration attribute.
38
+ required: false # hand-rolled
39
+ type: integer
40
+ numberValue:
41
+ description: The number value of the commerce configuration attribute.
42
+ # format: double # hand-rolled
43
+ required: false # hand-rolled
44
+ type: number
45
+ stringValue:
46
+ description: The string value of the commerce configuration attribute.
47
+ required: false # hand-rolled
48
+ type: string
49
+ stringValues:
50
+ description: The list of string values of the commerce configuration attribute.
51
+ required: false # hand-rolled
52
+ type: array
53
+ items:
54
+ type: string
55
+ CommerceConfigurationAttributeOutputRepresentation:
56
+ description: Output representation of a configuration attribute.
57
+ type: object
58
+ properties:
59
+ booleanValue:
60
+ description: The boolean value of the commerce configuration attribute.
61
+ required: false # hand-rolled
62
+ type: boolean | nil
63
+ contextId:
64
+ description: The id of the context in scope of the context type.
65
+ type: string
66
+ contextType:
67
+ description: The type of context the configuration attribute applies for.
68
+ type: string
69
+ enum:
70
+ - CommerceChannel
71
+ - ExperienceNetwork
72
+ - Organization
73
+ - WebStore
74
+ id:
75
+ description: The id of the commerce configuration attribute.
76
+ type: string
77
+ integerValue:
78
+ description: The integer value of the commerce configuration attribute.
79
+ required: false # hand-rolled
80
+ type: integer | nil
81
+ numberValue:
82
+ description: The number value of the commerce configuration attribute.
83
+ # format: double # hand-rolled removed, causes errors with union type
84
+ required: false # hand-rolled
85
+ type: number | nil
86
+ stringValue:
87
+ description: The string value of the commerce configuration attribute.
88
+ required: false # hand-rolled
89
+ type: string | nil
90
+ stringValues:
91
+ description: The list of string values of the commerce configuration attribute.
92
+ required: false # hand-rolled
93
+ type: array
94
+ items:
95
+ type: string
96
+ /commerce/configuration/{attributeId}/{contextType}/{contextId}:
97
+ delete:
98
+ displayName: deleteCommerceConfigurationAttribute
99
+ description: Removes the value of the commerce configuration attribute within
100
+ the given context. Be aware that values might still exist for other contexts.
101
+ responses:
102
+ '200':
103
+ description: Success
104
+ get:
105
+ displayName: getCommerceConfigurationAttribute
106
+ description: Read the value of the commerce configuration attribute for the given
107
+ context. Optionally the context fallback chain is followed, if so it will start
108
+ with the provided context and stop once a value is found or the fallback chain
109
+ has been followed to its end. The fallback chain is reflected by the
110
+ eligible values as per ConfigurationContextType in order of appearance (top-down
111
+ / left-to-right).
112
+ responses:
113
+ '200':
114
+ description: Success
115
+ body:
116
+ application/json:
117
+ type: CommerceConfigurationAttributeOutputRepresentation
118
+ queryParameters:
119
+ fallback:
120
+ type: boolean
121
+ required: false
122
+ default: false
123
+ put:
124
+ displayName: putCommerceConfigurationAttribute
125
+ description: Create (if not existing yet) or replace (if already existing) the
126
+ value of the commerce configuration attribute within the given context.
127
+ responses:
128
+ '200':
129
+ description: Success
130
+ body:
131
+ application/json:
132
+ type: CommerceConfigurationAttributeOutputRepresentation
133
+ body:
134
+ application/json:
135
+ type: CommerceConfigurationAttributeInputRepresentation
136
+ # required: false
137
+ (oas-body-name): commerceConfigurationAttributeInputRepresentation
138
+ uriParameters:
139
+ attributeId:
140
+ type: string
141
+ required: true
142
+ contextId:
143
+ type: string
144
+ required: true
145
+ contextType:
146
+ type: string
147
+ required: true
148
+ enum:
149
+ - CommerceChannel
150
+ - ExperienceNetwork
151
+ - Organization
152
+ - WebStore
@@ -0,0 +1,36 @@
1
+ #%RAML 1.0 Overlay
2
+ extends: ./api.raml
3
+
4
+ uses:
5
+ luvio: luvio://annotations.raml
6
+
7
+ (luvio.keyPrefix): 'commerce-configuration'
8
+
9
+ (luvio.ttl): 1000
10
+
11
+ types:
12
+ CommerceConfigurationAttributeOutputRepresentation:
13
+ (luvio.ttl): 1000
14
+ (luvio.key):
15
+ id: id
16
+ contextId: contextId
17
+ contextType: contextType
18
+
19
+ /commerce/configuration/{attributeId}/{contextType}/{contextId}:
20
+ delete:
21
+ (luvio.adapter):
22
+ name: deleteCommerceConfigurationAttribute
23
+ (luvio.key):
24
+ id: urlParams.attributeId
25
+ contextId: urlParams.contextId
26
+ contextType: urlParams.contextType
27
+ get:
28
+ (luvio.adapter):
29
+ name: getCommerceConfigurationAttribute
30
+ (luvio.key):
31
+ id: urlParams.attributeId
32
+ contextId: urlParams.contextId
33
+ contextType: urlParams.contextType
34
+ put:
35
+ (luvio.adapter):
36
+ name: putCommerceConfigurationAttribute