@salesforce/lds-adapters-revenue-place-order 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-order.js +371 -0
- package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +62 -0
- package/dist/es/es2018/types/src/generated/adapters/placeOrder.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/postCommerceSalesOrdersActionsPlace.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/PlaceOrderErrorResponseRepresentation.d.ts +34 -0
- package/dist/es/es2018/types/src/generated/types/PlaceOrderInputRepresentation.d.ts +40 -0
- package/dist/es/es2018/types/src/generated/types/PlaceOrderInputWrapperRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/PlaceOrderOutputRepresentation.d.ts +51 -0
- package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
- package/package.json +69 -0
- package/sfdc/index.d.ts +1 -0
- package/sfdc/index.js +399 -0
- package/src/raml/api.raml +138 -0
- package/src/raml/luvio.raml +102 -0
|
@@ -0,0 +1,138 @@
|
|
|
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
|
+
PlaceOrderInputWrapperRepresentation: # TODO hand rolled. W-8334626
|
|
29
|
+
description: Wrapper for place order input representation
|
|
30
|
+
type: object
|
|
31
|
+
properties:
|
|
32
|
+
inputRequest:
|
|
33
|
+
type: PlaceOrderInputRepresentation
|
|
34
|
+
description: Place Order Input Representation
|
|
35
|
+
PlaceOrderInputRepresentation:
|
|
36
|
+
description: Place Order API input representation
|
|
37
|
+
type: object
|
|
38
|
+
properties:
|
|
39
|
+
graph:
|
|
40
|
+
description: The sobject graph representing the order payload to be ingested.
|
|
41
|
+
type: object
|
|
42
|
+
pricingPref:
|
|
43
|
+
description: Pricing Preference for this place order process.
|
|
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 this place order process.
|
|
63
|
+
type: string
|
|
64
|
+
enum:
|
|
65
|
+
- Fetch
|
|
66
|
+
- Skip
|
|
67
|
+
required: false # TODO hand rolled. W-9275477
|
|
68
|
+
PlaceOrderErrorResponseRepresentation:
|
|
69
|
+
description: Place Order Error response representation
|
|
70
|
+
type: object
|
|
71
|
+
properties:
|
|
72
|
+
errorCode:
|
|
73
|
+
description: Error Code
|
|
74
|
+
type: string
|
|
75
|
+
message:
|
|
76
|
+
description: Message stating the reason for error, if any
|
|
77
|
+
type: string
|
|
78
|
+
referenceId:
|
|
79
|
+
description: Reference ID
|
|
80
|
+
type: string
|
|
81
|
+
PlaceOrderOutputRepresentation:
|
|
82
|
+
description: Place Order API output representation
|
|
83
|
+
type: object
|
|
84
|
+
properties:
|
|
85
|
+
errors:
|
|
86
|
+
description: List of errors encountered during the synchronous processing.
|
|
87
|
+
type: array
|
|
88
|
+
items:
|
|
89
|
+
type: PlaceOrderErrorResponseRepresentation
|
|
90
|
+
orderId:
|
|
91
|
+
description: Order Id
|
|
92
|
+
type: string
|
|
93
|
+
requestId:
|
|
94
|
+
description: The request id of the process that can be used to query async
|
|
95
|
+
status.
|
|
96
|
+
type: string
|
|
97
|
+
required: false # TODO hand rolled. W-9275477
|
|
98
|
+
statusURL:
|
|
99
|
+
description: The async status URL, if available
|
|
100
|
+
type: string
|
|
101
|
+
required: false # TODO hand rolled. W-9275477
|
|
102
|
+
success:
|
|
103
|
+
description: Whether or not the synchronous part of the processing is successful
|
|
104
|
+
type: boolean
|
|
105
|
+
ConfiguratorOptionsInputRepresentation:
|
|
106
|
+
description: Input Representation for the Configurator Options
|
|
107
|
+
type: object
|
|
108
|
+
properties:
|
|
109
|
+
addDefaultConfiguration:
|
|
110
|
+
description: Whether to add default configurations
|
|
111
|
+
type: boolean
|
|
112
|
+
required: false # TODO hand rolled. W-9275477
|
|
113
|
+
executeConfigurationRules:
|
|
114
|
+
description: Whether to execute Configuration Rules
|
|
115
|
+
type: boolean
|
|
116
|
+
required: false # TODO hand rolled. W-9275477
|
|
117
|
+
validateAmendRenewCancel:
|
|
118
|
+
description: Whether to run amend/renew/cancel related validations
|
|
119
|
+
type: boolean
|
|
120
|
+
required: false # TODO hand rolled. W-9275477
|
|
121
|
+
validateProductCatalog:
|
|
122
|
+
description: Whether to run validations against the Product Catalog
|
|
123
|
+
type: boolean
|
|
124
|
+
required: false # TODO hand rolled. W-9275477
|
|
125
|
+
/commerce/sales-orders/actions/place:
|
|
126
|
+
post:
|
|
127
|
+
displayName: postPlaceOrder
|
|
128
|
+
description: Place an Order
|
|
129
|
+
responses:
|
|
130
|
+
'200':
|
|
131
|
+
description: Success
|
|
132
|
+
body:
|
|
133
|
+
application/json:
|
|
134
|
+
type: PlaceOrderOutputRepresentation
|
|
135
|
+
body:
|
|
136
|
+
application/json:
|
|
137
|
+
type: PlaceOrderInputWrapperRepresentation
|
|
138
|
+
(oas-body-name): inputRequest
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
#%RAML 1.0 Overlay
|
|
2
|
+
extends: ./api.raml
|
|
3
|
+
|
|
4
|
+
uses:
|
|
5
|
+
luvio: 'luvio://annotations.raml'
|
|
6
|
+
|
|
7
|
+
(luvio.keyPrefix): 'place-order'
|
|
8
|
+
|
|
9
|
+
types:
|
|
10
|
+
PlaceOrderOutputRepresentation:
|
|
11
|
+
(luvio.ttl): 1000
|
|
12
|
+
(luvio.opaque): true
|
|
13
|
+
(luvio.key):
|
|
14
|
+
orderId: orderId
|
|
15
|
+
|
|
16
|
+
/commerce/sales-orders/actions/place:
|
|
17
|
+
post:
|
|
18
|
+
(luvio.adapter):
|
|
19
|
+
name: placeOrder
|
|
20
|
+
tests:
|
|
21
|
+
validConfigs:
|
|
22
|
+
- |
|
|
23
|
+
{
|
|
24
|
+
"inputRequest":
|
|
25
|
+
{
|
|
26
|
+
"pricingPref": "Force",
|
|
27
|
+
"catalogRatesPref": "Fetch",
|
|
28
|
+
"configurationInput": "RunAndAllowErrors",
|
|
29
|
+
"configuratorOptions":
|
|
30
|
+
{
|
|
31
|
+
"addDefaultConfiguration": true,
|
|
32
|
+
"executeConfigurationRules": true,
|
|
33
|
+
"validateAmendRenewCancel": true,
|
|
34
|
+
"validateProductCatalog": true
|
|
35
|
+
},
|
|
36
|
+
"graph":
|
|
37
|
+
{
|
|
38
|
+
"graphId": "placeOrder",
|
|
39
|
+
"records":
|
|
40
|
+
[
|
|
41
|
+
{
|
|
42
|
+
"referenceId": "refOrder",
|
|
43
|
+
"record":
|
|
44
|
+
{
|
|
45
|
+
"attributes":
|
|
46
|
+
{
|
|
47
|
+
"type": "Order",
|
|
48
|
+
"method": "PATCH",
|
|
49
|
+
"id": "8011Q00000NvSX6QAN"
|
|
50
|
+
},
|
|
51
|
+
"Description": "Update Order description"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"referenceId": "refOrderItem",
|
|
56
|
+
"record":
|
|
57
|
+
{
|
|
58
|
+
"attributes":
|
|
59
|
+
{
|
|
60
|
+
"type": "OrderItem",
|
|
61
|
+
"method": "PATCH",
|
|
62
|
+
"id": "8021Q00000d82aEQAQ"
|
|
63
|
+
},
|
|
64
|
+
"Quantity": 5.0
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
invalidConfigs:
|
|
73
|
+
- |
|
|
74
|
+
{
|
|
75
|
+
"pricingPref": "Skip"
|
|
76
|
+
}
|
|
77
|
+
- |
|
|
78
|
+
{
|
|
79
|
+
"catalogRatesPref": "skip"
|
|
80
|
+
}
|
|
81
|
+
- |
|
|
82
|
+
{
|
|
83
|
+
"configurationInput": "Skip"
|
|
84
|
+
}
|
|
85
|
+
- |
|
|
86
|
+
{
|
|
87
|
+
"graph": {}
|
|
88
|
+
}
|
|
89
|
+
- |
|
|
90
|
+
{
|
|
91
|
+
"inputRequest":
|
|
92
|
+
{
|
|
93
|
+
"graph": {}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
- |
|
|
97
|
+
{
|
|
98
|
+
"inputRequest":
|
|
99
|
+
{
|
|
100
|
+
"pricingPref": "force"
|
|
101
|
+
}
|
|
102
|
+
}
|