@salesforce/lds-adapters-revenue-place-quote 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/revenue-place-quote.js +367 -0
- package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +62 -0
- package/dist/es/es2018/types/src/generated/adapters/updateQuote.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/resources/postCommerceQuotesActionsPlace.d.ts +13 -0
- package/dist/es/es2018/types/src/generated/types/ConfiguratorOptionsInputRepresentation.d.ts +37 -0
- package/dist/es/es2018/types/src/generated/types/PlaceQuoteErrorResponseRepresentation.d.ts +34 -0
- package/dist/es/es2018/types/src/generated/types/PlaceQuoteInputRepresentation.d.ts +40 -0
- package/dist/es/es2018/types/src/generated/types/PlaceQuoteInputWrapperRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/PlaceQuoteOutputRepresentation.d.ts +51 -0
- package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
- package/package.json +75 -0
- package/sfdc/index.d.ts +1 -0
- package/sfdc/index.js +395 -0
- package/src/raml/api.raml +135 -0
- package/src/raml/luvio.raml +89 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
#%RAML 1.0
|
|
2
|
+
securedBy:
|
|
3
|
+
- OAuth2
|
|
4
|
+
title: Salesforce Connect API
|
|
5
|
+
version: '58.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
|
+
PlaceQuoteInputWrapperRepresentation: # TODO Hand-rolled W-8334626
|
|
29
|
+
description: Wrapper for place quote input representation
|
|
30
|
+
type: object
|
|
31
|
+
properties:
|
|
32
|
+
PlaceQuoteInput:
|
|
33
|
+
type: PlaceQuoteInputRepresentation
|
|
34
|
+
description: Place Quote Input Representation
|
|
35
|
+
PlaceQuoteInputRepresentation:
|
|
36
|
+
description: Input representation for place quote.
|
|
37
|
+
type: object
|
|
38
|
+
properties:
|
|
39
|
+
graph:
|
|
40
|
+
description: SObject Graph representing the quote structure for place quote
|
|
41
|
+
type: object
|
|
42
|
+
pricingPref:
|
|
43
|
+
description: Pricing Preference for place quote
|
|
44
|
+
type: string
|
|
45
|
+
enum:
|
|
46
|
+
- Force
|
|
47
|
+
- Skip
|
|
48
|
+
- System
|
|
49
|
+
configurationInput:
|
|
50
|
+
description: Configuration input to control the call to config API
|
|
51
|
+
type: string
|
|
52
|
+
enum:
|
|
53
|
+
- Skip
|
|
54
|
+
- RunAndAllowErrors
|
|
55
|
+
- RunAndBlockErrors
|
|
56
|
+
required: false # TODO hand rolled. W-9275477
|
|
57
|
+
configurationOptions:
|
|
58
|
+
description: Configuration options to specify which config API functionality to opt in/out of
|
|
59
|
+
type: ConfiguratorOptionsInputRepresentation
|
|
60
|
+
required: false # TODO hand rolled. W-9275477
|
|
61
|
+
catalogRatesPref:
|
|
62
|
+
description: Catalog Rates Preference for place quote
|
|
63
|
+
type: string
|
|
64
|
+
enum:
|
|
65
|
+
- Fetch
|
|
66
|
+
- Skip
|
|
67
|
+
required: false # TODO hand rolled. W-9275477
|
|
68
|
+
PlaceQuoteOutputRepresentation:
|
|
69
|
+
description: Place Quote output representation
|
|
70
|
+
type: object
|
|
71
|
+
properties:
|
|
72
|
+
quoteId:
|
|
73
|
+
description: QUOTE ID
|
|
74
|
+
type: string
|
|
75
|
+
requestIdentifier:
|
|
76
|
+
description: Unique request identifier that can be used to poll async request
|
|
77
|
+
type: string
|
|
78
|
+
responseError:
|
|
79
|
+
description: response error
|
|
80
|
+
type: array
|
|
81
|
+
items:
|
|
82
|
+
type: PlaceQuoteErrorResponseRepresentation
|
|
83
|
+
statusURL:
|
|
84
|
+
description: a StatusURL for tracking this operation
|
|
85
|
+
type: string
|
|
86
|
+
success:
|
|
87
|
+
description: success
|
|
88
|
+
type: boolean
|
|
89
|
+
PlaceQuoteErrorResponseRepresentation:
|
|
90
|
+
description: Error response representation
|
|
91
|
+
type: object
|
|
92
|
+
properties:
|
|
93
|
+
errorCode:
|
|
94
|
+
description: Code for Error
|
|
95
|
+
type: string
|
|
96
|
+
referenceId:
|
|
97
|
+
description: The Id of where the error lies
|
|
98
|
+
type: string
|
|
99
|
+
message:
|
|
100
|
+
description: Message stating the reason for error, if any
|
|
101
|
+
type: string
|
|
102
|
+
ConfiguratorOptionsInputRepresentation:
|
|
103
|
+
description: Input Representation for the Configurator Options
|
|
104
|
+
type: object
|
|
105
|
+
properties:
|
|
106
|
+
addDefaultConfiguration:
|
|
107
|
+
description: Whether to add default configurations
|
|
108
|
+
type: boolean
|
|
109
|
+
required: false # TODO hand rolled. W-9275477
|
|
110
|
+
executeConfigurationRules:
|
|
111
|
+
description: Whether to execute Configuration Rules
|
|
112
|
+
type: boolean
|
|
113
|
+
required: false # TODO hand rolled. W-9275477
|
|
114
|
+
validateAmendRenewCancel:
|
|
115
|
+
description: Whether to run amend/renew/cancel related validations
|
|
116
|
+
type: boolean
|
|
117
|
+
required: false # TODO hand rolled. W-9275477
|
|
118
|
+
validateProductCatalog:
|
|
119
|
+
description: Whether to run validations against the Product Catalog
|
|
120
|
+
type: boolean
|
|
121
|
+
required: false # TODO hand rolled. W-9275477
|
|
122
|
+
/commerce/quotes/actions/place:
|
|
123
|
+
post:
|
|
124
|
+
description: place quote
|
|
125
|
+
responses:
|
|
126
|
+
'200':
|
|
127
|
+
description: Success
|
|
128
|
+
body:
|
|
129
|
+
application/json:
|
|
130
|
+
type: PlaceQuoteOutputRepresentation
|
|
131
|
+
body:
|
|
132
|
+
application/json:
|
|
133
|
+
type: PlaceQuoteInputWrapperRepresentation
|
|
134
|
+
#required: false # TODO handrolled W-9314597
|
|
135
|
+
(oas-body-name): PlaceQuoteInput
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
#%RAML 1.0 Overlay
|
|
2
|
+
extends: ./api.raml
|
|
3
|
+
|
|
4
|
+
uses:
|
|
5
|
+
luvio: luvio://annotations.raml
|
|
6
|
+
|
|
7
|
+
(luvio.keyPrefix): 'place-quote'
|
|
8
|
+
|
|
9
|
+
types:
|
|
10
|
+
PlaceQuoteOutputRepresentation:
|
|
11
|
+
(luvio.ttl): 1000
|
|
12
|
+
(luvio.opaque): true
|
|
13
|
+
(luvio.key):
|
|
14
|
+
quoteId: quoteId
|
|
15
|
+
|
|
16
|
+
/commerce/quotes/actions/place:
|
|
17
|
+
post:
|
|
18
|
+
(luvio.adapter):
|
|
19
|
+
name: updateQuote
|
|
20
|
+
tests:
|
|
21
|
+
validConfigs:
|
|
22
|
+
- |
|
|
23
|
+
{ "PlaceQuoteInput":
|
|
24
|
+
{
|
|
25
|
+
"pricingPref": "Force",
|
|
26
|
+
"catalogRatesPref": "Fetch",
|
|
27
|
+
"configurationInput": "RunAndAllowErrors",
|
|
28
|
+
"configuratorOptions":
|
|
29
|
+
{
|
|
30
|
+
"addDefaultConfiguration": true,
|
|
31
|
+
"executeConfigurationRules": true,
|
|
32
|
+
"validateAmendRenewCancel": true,
|
|
33
|
+
"validateProductCatalog": true
|
|
34
|
+
},
|
|
35
|
+
"graph": {
|
|
36
|
+
"graphId": "updateQuote",
|
|
37
|
+
"records": [{
|
|
38
|
+
"referenceId": "refQuote",
|
|
39
|
+
"record": {
|
|
40
|
+
"attributes": {
|
|
41
|
+
"type": "Quote",
|
|
42
|
+
"method": "PATCH",
|
|
43
|
+
"id": "0Q0RO00000033pc0AA"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"referenceId": "refQLIId",
|
|
49
|
+
"record": {
|
|
50
|
+
"attributes": {
|
|
51
|
+
"type": "QuoteLineItem",
|
|
52
|
+
"method": "PATCH",
|
|
53
|
+
"id": "0QLT30000000145OAA"
|
|
54
|
+
},
|
|
55
|
+
"Discount": 2
|
|
56
|
+
}
|
|
57
|
+
}]
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
invalidConfigs:
|
|
62
|
+
- |
|
|
63
|
+
{
|
|
64
|
+
"pricingPref": "Skip"
|
|
65
|
+
}
|
|
66
|
+
- |
|
|
67
|
+
{
|
|
68
|
+
"catalogRatesPref": "skip"
|
|
69
|
+
}
|
|
70
|
+
- |
|
|
71
|
+
{
|
|
72
|
+
"configurationInput": "Skip"
|
|
73
|
+
}
|
|
74
|
+
- |
|
|
75
|
+
{
|
|
76
|
+
"graph": {}
|
|
77
|
+
}
|
|
78
|
+
- |
|
|
79
|
+
{ "PlaceQuoteInput":
|
|
80
|
+
{
|
|
81
|
+
"graph": {}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
- |
|
|
85
|
+
{ "PlaceQuoteInput":
|
|
86
|
+
{
|
|
87
|
+
"pricingPref": "force"
|
|
88
|
+
}
|
|
89
|
+
}
|