@salesforce/lds-adapters-revenue-place-quote 1.251.0 → 1.253.0
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/dist/es/es2018/revenue-place-quote.js +54 -0
- package/dist/es/es2018/types/src/generated/types/ConfiguratorOptionsInputRepresentation.d.ts +37 -0
- package/dist/es/es2018/types/src/generated/types/PlaceQuoteInputRepresentation.d.ts +7 -1
- package/package.json +1 -1
- package/sfdc/index.js +55 -1
- package/src/raml/api.raml +32 -0
- package/src/raml/luvio.raml +12 -0
|
@@ -72,11 +72,65 @@ function createLink(ref) {
|
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
function validate$3(obj, path = 'ConfiguratorOptionsInputRepresentation') {
|
|
76
|
+
const v_error = (() => {
|
|
77
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
78
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
79
|
+
}
|
|
80
|
+
if (obj.addDefaultConfiguration !== undefined) {
|
|
81
|
+
const obj_addDefaultConfiguration = obj.addDefaultConfiguration;
|
|
82
|
+
const path_addDefaultConfiguration = path + '.addDefaultConfiguration';
|
|
83
|
+
if (typeof obj_addDefaultConfiguration !== 'boolean') {
|
|
84
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_addDefaultConfiguration + '" (at "' + path_addDefaultConfiguration + '")');
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
if (obj.executeConfigurationRules !== undefined) {
|
|
88
|
+
const obj_executeConfigurationRules = obj.executeConfigurationRules;
|
|
89
|
+
const path_executeConfigurationRules = path + '.executeConfigurationRules';
|
|
90
|
+
if (typeof obj_executeConfigurationRules !== 'boolean') {
|
|
91
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_executeConfigurationRules + '" (at "' + path_executeConfigurationRules + '")');
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
if (obj.validateAmendRenewCancel !== undefined) {
|
|
95
|
+
const obj_validateAmendRenewCancel = obj.validateAmendRenewCancel;
|
|
96
|
+
const path_validateAmendRenewCancel = path + '.validateAmendRenewCancel';
|
|
97
|
+
if (typeof obj_validateAmendRenewCancel !== 'boolean') {
|
|
98
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_validateAmendRenewCancel + '" (at "' + path_validateAmendRenewCancel + '")');
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
if (obj.validateProductCatalog !== undefined) {
|
|
102
|
+
const obj_validateProductCatalog = obj.validateProductCatalog;
|
|
103
|
+
const path_validateProductCatalog = path + '.validateProductCatalog';
|
|
104
|
+
if (typeof obj_validateProductCatalog !== 'boolean') {
|
|
105
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_validateProductCatalog + '" (at "' + path_validateProductCatalog + '")');
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
})();
|
|
109
|
+
return v_error === undefined ? null : v_error;
|
|
110
|
+
}
|
|
111
|
+
|
|
75
112
|
function validate$2(obj, path = 'PlaceQuoteInputRepresentation') {
|
|
76
113
|
const v_error = (() => {
|
|
77
114
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
78
115
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
79
116
|
}
|
|
117
|
+
if (obj.configurationInput !== undefined) {
|
|
118
|
+
const obj_configurationInput = obj.configurationInput;
|
|
119
|
+
const path_configurationInput = path + '.configurationInput';
|
|
120
|
+
if (typeof obj_configurationInput !== 'string') {
|
|
121
|
+
return new TypeError('Expected "string" but received "' + typeof obj_configurationInput + '" (at "' + path_configurationInput + '")');
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
if (obj.configurationOptions !== undefined) {
|
|
125
|
+
const obj_configurationOptions = obj.configurationOptions;
|
|
126
|
+
const path_configurationOptions = path + '.configurationOptions';
|
|
127
|
+
const referencepath_configurationOptionsValidationError = validate$3(obj_configurationOptions, path_configurationOptions);
|
|
128
|
+
if (referencepath_configurationOptionsValidationError !== null) {
|
|
129
|
+
let message = 'Object doesn\'t match ConfiguratorOptionsInputRepresentation (at "' + path_configurationOptions + '")\n';
|
|
130
|
+
message += referencepath_configurationOptionsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
131
|
+
return new TypeError(message);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
80
134
|
const obj_graph = obj.graph;
|
|
81
135
|
const path_graph = path + '.graph';
|
|
82
136
|
if (typeof obj_graph !== 'object' || ArrayIsArray(obj_graph) || obj_graph === null) {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
|
|
2
|
+
export declare const VERSION = "e21b1d6113b662cbaf3514ea2c1eeaa4";
|
|
3
|
+
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
4
|
+
export declare const RepresentationType: string;
|
|
5
|
+
export declare function normalize(input: ConfiguratorOptionsInputRepresentation, existing: ConfiguratorOptionsInputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): ConfiguratorOptionsInputRepresentationNormalized;
|
|
6
|
+
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
7
|
+
export declare function equals(existing: ConfiguratorOptionsInputRepresentationNormalized, incoming: ConfiguratorOptionsInputRepresentationNormalized): boolean;
|
|
8
|
+
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
9
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: ConfiguratorOptionsInputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
10
|
+
/**
|
|
11
|
+
* Input Representation for the Configurator Options
|
|
12
|
+
*
|
|
13
|
+
* Keys:
|
|
14
|
+
* (none)
|
|
15
|
+
*/
|
|
16
|
+
export interface ConfiguratorOptionsInputRepresentationNormalized {
|
|
17
|
+
/** Whether to add default configurations */
|
|
18
|
+
addDefaultConfiguration?: boolean;
|
|
19
|
+
/** Whether to execute Configuration Rules */
|
|
20
|
+
executeConfigurationRules?: boolean;
|
|
21
|
+
/** Whether to run amend/renew/cancel related validations */
|
|
22
|
+
validateAmendRenewCancel?: boolean;
|
|
23
|
+
/** Whether to run validations against the Product Catalog */
|
|
24
|
+
validateProductCatalog?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Input Representation for the Configurator Options
|
|
28
|
+
*
|
|
29
|
+
* Keys:
|
|
30
|
+
* (none)
|
|
31
|
+
*/
|
|
32
|
+
export interface ConfiguratorOptionsInputRepresentation {
|
|
33
|
+
addDefaultConfiguration?: boolean;
|
|
34
|
+
executeConfigurationRules?: boolean;
|
|
35
|
+
validateAmendRenewCancel?: boolean;
|
|
36
|
+
validateProductCatalog?: boolean;
|
|
37
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { ConfiguratorOptionsInputRepresentation as ConfiguratorOptionsInputRepresentation_ConfiguratorOptionsInputRepresentation } from './ConfiguratorOptionsInputRepresentation';
|
|
1
2
|
import { IngestPath as $64$luvio_engine_IngestPath, Luvio as $64$luvio_engine_Luvio, Store as $64$luvio_engine_Store, FragmentSelection as $64$luvio_engine_FragmentSelection, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata } from '@luvio/engine';
|
|
2
|
-
export declare const VERSION = "
|
|
3
|
+
export declare const VERSION = "b31b3a3c81567850f08085d79d0a4e2e";
|
|
3
4
|
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
4
5
|
export declare const RepresentationType: string;
|
|
5
6
|
export declare function normalize(input: PlaceQuoteInputRepresentation, existing: PlaceQuoteInputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): PlaceQuoteInputRepresentationNormalized;
|
|
@@ -14,6 +15,9 @@ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableSto
|
|
|
14
15
|
* (none)
|
|
15
16
|
*/
|
|
16
17
|
export interface PlaceQuoteInputRepresentationNormalized {
|
|
18
|
+
/** Configuration input to control the call to config API */
|
|
19
|
+
configurationInput?: string;
|
|
20
|
+
configurationOptions?: ConfiguratorOptionsInputRepresentation_ConfiguratorOptionsInputRepresentation;
|
|
17
21
|
/** SObject Graph representing the quote structure for place quote */
|
|
18
22
|
graph: {};
|
|
19
23
|
/** Pricing Preference for place quote */
|
|
@@ -26,6 +30,8 @@ export interface PlaceQuoteInputRepresentationNormalized {
|
|
|
26
30
|
* (none)
|
|
27
31
|
*/
|
|
28
32
|
export interface PlaceQuoteInputRepresentation {
|
|
33
|
+
configurationInput?: string;
|
|
34
|
+
configurationOptions?: ConfiguratorOptionsInputRepresentation_ConfiguratorOptionsInputRepresentation;
|
|
29
35
|
graph: {};
|
|
30
36
|
pricingPref: string;
|
|
31
37
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-revenue-place-quote",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.253.0",
|
|
4
4
|
"description": "Place Quote API for partial items and price/taxation updates async",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "dist/es/es2018/revenue-place-quote.js",
|
package/sfdc/index.js
CHANGED
|
@@ -81,11 +81,65 @@ function createLink(ref) {
|
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
function validate$3(obj, path = 'ConfiguratorOptionsInputRepresentation') {
|
|
85
|
+
const v_error = (() => {
|
|
86
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
87
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
88
|
+
}
|
|
89
|
+
if (obj.addDefaultConfiguration !== undefined) {
|
|
90
|
+
const obj_addDefaultConfiguration = obj.addDefaultConfiguration;
|
|
91
|
+
const path_addDefaultConfiguration = path + '.addDefaultConfiguration';
|
|
92
|
+
if (typeof obj_addDefaultConfiguration !== 'boolean') {
|
|
93
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_addDefaultConfiguration + '" (at "' + path_addDefaultConfiguration + '")');
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
if (obj.executeConfigurationRules !== undefined) {
|
|
97
|
+
const obj_executeConfigurationRules = obj.executeConfigurationRules;
|
|
98
|
+
const path_executeConfigurationRules = path + '.executeConfigurationRules';
|
|
99
|
+
if (typeof obj_executeConfigurationRules !== 'boolean') {
|
|
100
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_executeConfigurationRules + '" (at "' + path_executeConfigurationRules + '")');
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (obj.validateAmendRenewCancel !== undefined) {
|
|
104
|
+
const obj_validateAmendRenewCancel = obj.validateAmendRenewCancel;
|
|
105
|
+
const path_validateAmendRenewCancel = path + '.validateAmendRenewCancel';
|
|
106
|
+
if (typeof obj_validateAmendRenewCancel !== 'boolean') {
|
|
107
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_validateAmendRenewCancel + '" (at "' + path_validateAmendRenewCancel + '")');
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
if (obj.validateProductCatalog !== undefined) {
|
|
111
|
+
const obj_validateProductCatalog = obj.validateProductCatalog;
|
|
112
|
+
const path_validateProductCatalog = path + '.validateProductCatalog';
|
|
113
|
+
if (typeof obj_validateProductCatalog !== 'boolean') {
|
|
114
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_validateProductCatalog + '" (at "' + path_validateProductCatalog + '")');
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
})();
|
|
118
|
+
return v_error === undefined ? null : v_error;
|
|
119
|
+
}
|
|
120
|
+
|
|
84
121
|
function validate$2(obj, path = 'PlaceQuoteInputRepresentation') {
|
|
85
122
|
const v_error = (() => {
|
|
86
123
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
87
124
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
88
125
|
}
|
|
126
|
+
if (obj.configurationInput !== undefined) {
|
|
127
|
+
const obj_configurationInput = obj.configurationInput;
|
|
128
|
+
const path_configurationInput = path + '.configurationInput';
|
|
129
|
+
if (typeof obj_configurationInput !== 'string') {
|
|
130
|
+
return new TypeError('Expected "string" but received "' + typeof obj_configurationInput + '" (at "' + path_configurationInput + '")');
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
if (obj.configurationOptions !== undefined) {
|
|
134
|
+
const obj_configurationOptions = obj.configurationOptions;
|
|
135
|
+
const path_configurationOptions = path + '.configurationOptions';
|
|
136
|
+
const referencepath_configurationOptionsValidationError = validate$3(obj_configurationOptions, path_configurationOptions);
|
|
137
|
+
if (referencepath_configurationOptionsValidationError !== null) {
|
|
138
|
+
let message = 'Object doesn\'t match ConfiguratorOptionsInputRepresentation (at "' + path_configurationOptions + '")\n';
|
|
139
|
+
message += referencepath_configurationOptionsValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
140
|
+
return new TypeError(message);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
89
143
|
const obj_graph = obj.graph;
|
|
90
144
|
const path_graph = path + '.graph';
|
|
91
145
|
if (typeof obj_graph !== 'object' || ArrayIsArray(obj_graph) || obj_graph === null) {
|
|
@@ -330,4 +384,4 @@ withDefaultLuvio((luvio) => {
|
|
|
330
384
|
});
|
|
331
385
|
|
|
332
386
|
export { updateQuote };
|
|
333
|
-
// version: 1.
|
|
387
|
+
// version: 1.253.0-15fc9805a
|
package/src/raml/api.raml
CHANGED
|
@@ -46,6 +46,18 @@ types:
|
|
|
46
46
|
- Force
|
|
47
47
|
- Skip
|
|
48
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
|
|
49
61
|
PlaceQuoteOutputRepresentation:
|
|
50
62
|
description: Place Quote output representation
|
|
51
63
|
type: object
|
|
@@ -80,6 +92,26 @@ types:
|
|
|
80
92
|
message:
|
|
81
93
|
description: Message stating the reason for error, if any
|
|
82
94
|
type: string
|
|
95
|
+
ConfiguratorOptionsInputRepresentation:
|
|
96
|
+
description: Input Representation for the Configurator Options
|
|
97
|
+
type: object
|
|
98
|
+
properties:
|
|
99
|
+
addDefaultConfiguration:
|
|
100
|
+
description: Whether to add default configurations
|
|
101
|
+
type: boolean
|
|
102
|
+
required: false # TODO hand rolled. W-9275477
|
|
103
|
+
executeConfigurationRules:
|
|
104
|
+
description: Whether to execute Configuration Rules
|
|
105
|
+
type: boolean
|
|
106
|
+
required: false # TODO hand rolled. W-9275477
|
|
107
|
+
validateAmendRenewCancel:
|
|
108
|
+
description: Whether to run amend/renew/cancel related validations
|
|
109
|
+
type: boolean
|
|
110
|
+
required: false # TODO hand rolled. W-9275477
|
|
111
|
+
validateProductCatalog:
|
|
112
|
+
description: Whether to run validations against the Product Catalog
|
|
113
|
+
type: boolean
|
|
114
|
+
required: false # TODO hand rolled. W-9275477
|
|
83
115
|
/commerce/quotes/actions/place:
|
|
84
116
|
post:
|
|
85
117
|
description: place quote
|
package/src/raml/luvio.raml
CHANGED
|
@@ -23,6 +23,14 @@ types:
|
|
|
23
23
|
{ "PlaceQuoteInput":
|
|
24
24
|
{
|
|
25
25
|
"pricingPref": "Force",
|
|
26
|
+
"configurationInput": "RunAndAllowErrors",
|
|
27
|
+
"configuratorOptions":
|
|
28
|
+
{
|
|
29
|
+
"addDefaultConfiguration": true,
|
|
30
|
+
"executeConfigurationRules": true,
|
|
31
|
+
"validateAmendRenewCancel": true,
|
|
32
|
+
"validateProductCatalog": true
|
|
33
|
+
},
|
|
26
34
|
"graph": {
|
|
27
35
|
"graphId": "updateQuote",
|
|
28
36
|
"records": [{
|
|
@@ -54,6 +62,10 @@ types:
|
|
|
54
62
|
{
|
|
55
63
|
"pricingPref": "Skip"
|
|
56
64
|
}
|
|
65
|
+
- |
|
|
66
|
+
{
|
|
67
|
+
"configurationInput": "Skip"
|
|
68
|
+
}
|
|
57
69
|
- |
|
|
58
70
|
{
|
|
59
71
|
"graph": {}
|