@salesforce/lds-adapters-revenue-place-order 1.245.0 → 1.247.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-order.js +46 -16
- package/dist/es/es2018/types/src/generated/adapters/placeOrder.d.ts +2 -3
- package/dist/es/es2018/types/src/generated/resources/postCommerceSalesOrdersOrdersActionsPlace.d.ts +2 -3
- package/dist/es/es2018/types/src/generated/types/PlaceOrderInputRepresentation.d.ts +5 -5
- package/dist/es/es2018/types/src/generated/types/PlaceOrderInputWrapperRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/PlaceOrderOutputRepresentation.d.ts +5 -5
- package/package.json +7 -3
- package/sfdc/index.js +47 -17
- package/src/raml/api.raml +23 -13
- package/src/raml/luvio.raml +12 -6
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$1
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$1 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -72,6 +72,32 @@ function createLink(ref) {
|
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
function validate$2(obj, path = 'PlaceOrderInputRepresentation') {
|
|
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
|
+
const obj_graph = obj.graph;
|
|
81
|
+
const path_graph = path + '.graph';
|
|
82
|
+
if (typeof obj_graph !== 'object' || ArrayIsArray(obj_graph) || obj_graph === null) {
|
|
83
|
+
return new TypeError('Expected "object" but received "' + typeof obj_graph + '" (at "' + path_graph + '")');
|
|
84
|
+
}
|
|
85
|
+
const obj_pricingPref = obj.pricingPref;
|
|
86
|
+
const path_pricingPref = path + '.pricingPref';
|
|
87
|
+
if (typeof obj_pricingPref !== 'string') {
|
|
88
|
+
return new TypeError('Expected "string" but received "' + typeof obj_pricingPref + '" (at "' + path_pricingPref + '")');
|
|
89
|
+
}
|
|
90
|
+
if (obj.shouldSkipValidation !== undefined) {
|
|
91
|
+
const obj_shouldSkipValidation = obj.shouldSkipValidation;
|
|
92
|
+
const path_shouldSkipValidation = path + '.shouldSkipValidation';
|
|
93
|
+
if (typeof obj_shouldSkipValidation !== 'boolean') {
|
|
94
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_shouldSkipValidation + '" (at "' + path_shouldSkipValidation + '")');
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
})();
|
|
98
|
+
return v_error === undefined ? null : v_error;
|
|
99
|
+
}
|
|
100
|
+
|
|
75
101
|
function validate$1(obj, path = 'PlaceOrderErrorResponseRepresentation') {
|
|
76
102
|
const v_error = (() => {
|
|
77
103
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -97,7 +123,7 @@ function validate$1(obj, path = 'PlaceOrderErrorResponseRepresentation') {
|
|
|
97
123
|
}
|
|
98
124
|
|
|
99
125
|
const TTL = 1000;
|
|
100
|
-
const VERSION = "
|
|
126
|
+
const VERSION = "c091711201b7e247b20f49c526867ca7";
|
|
101
127
|
function validate(obj, path = 'PlaceOrderOutputRepresentation') {
|
|
102
128
|
const v_error = (() => {
|
|
103
129
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -123,15 +149,19 @@ function validate(obj, path = 'PlaceOrderOutputRepresentation') {
|
|
|
123
149
|
if (typeof obj_orderId !== 'string') {
|
|
124
150
|
return new TypeError('Expected "string" but received "' + typeof obj_orderId + '" (at "' + path_orderId + '")');
|
|
125
151
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
152
|
+
if (obj.requestId !== undefined) {
|
|
153
|
+
const obj_requestId = obj.requestId;
|
|
154
|
+
const path_requestId = path + '.requestId';
|
|
155
|
+
if (typeof obj_requestId !== 'string') {
|
|
156
|
+
return new TypeError('Expected "string" but received "' + typeof obj_requestId + '" (at "' + path_requestId + '")');
|
|
157
|
+
}
|
|
130
158
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
159
|
+
if (obj.statusURL !== undefined) {
|
|
160
|
+
const obj_statusURL = obj.statusURL;
|
|
161
|
+
const path_statusURL = path + '.statusURL';
|
|
162
|
+
if (typeof obj_statusURL !== 'string') {
|
|
163
|
+
return new TypeError('Expected "string" but received "' + typeof obj_statusURL + '" (at "' + path_statusURL + '")');
|
|
164
|
+
}
|
|
135
165
|
}
|
|
136
166
|
const obj_success = obj.success;
|
|
137
167
|
const path_success = path + '.success';
|
|
@@ -229,17 +259,17 @@ function createResourceRequest(config) {
|
|
|
229
259
|
|
|
230
260
|
const adapterName = 'placeOrder';
|
|
231
261
|
const placeOrder_ConfigPropertyMetadata = [
|
|
232
|
-
generateParamConfigMetadata('
|
|
233
|
-
generateParamConfigMetadata('pricingPref', true, 2 /* Body */, 0 /* String */),
|
|
234
|
-
generateParamConfigMetadata('shouldSkipValidation', true, 2 /* Body */, 1 /* Boolean */),
|
|
262
|
+
generateParamConfigMetadata('inputRequest', true, 2 /* Body */, 4 /* Unsupported */),
|
|
235
263
|
];
|
|
236
264
|
const placeOrder_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, placeOrder_ConfigPropertyMetadata);
|
|
237
265
|
const createResourceParams = /*#__PURE__*/ createResourceParams$1(placeOrder_ConfigPropertyMetadata);
|
|
238
266
|
function typeCheckConfig(untrustedConfig) {
|
|
239
267
|
const config = {};
|
|
240
|
-
|
|
241
|
-
const
|
|
242
|
-
|
|
268
|
+
const untrustedConfig_inputRequest = untrustedConfig.inputRequest;
|
|
269
|
+
const referencePlaceOrderInputRepresentationValidationError = validate$2(untrustedConfig_inputRequest);
|
|
270
|
+
if (referencePlaceOrderInputRepresentationValidationError === null) {
|
|
271
|
+
config.inputRequest = untrustedConfig_inputRequest;
|
|
272
|
+
}
|
|
243
273
|
return config;
|
|
244
274
|
}
|
|
245
275
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
|
|
2
2
|
import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
|
|
3
|
+
import { PlaceOrderInputRepresentation as types_PlaceOrderInputRepresentation_PlaceOrderInputRepresentation } from '../types/PlaceOrderInputRepresentation';
|
|
3
4
|
import { ResourceRequestConfig as resources_postCommerceSalesOrdersOrdersActionsPlace_ResourceRequestConfig } from '../resources/postCommerceSalesOrdersOrdersActionsPlace';
|
|
4
5
|
import { PlaceOrderOutputRepresentation as types_PlaceOrderOutputRepresentation_PlaceOrderOutputRepresentation } from '../types/PlaceOrderOutputRepresentation';
|
|
5
6
|
export declare const adapterName = "placeOrder";
|
|
6
7
|
export declare const placeOrder_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
7
8
|
export declare const placeOrder_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
8
9
|
export interface PlaceOrderConfig {
|
|
9
|
-
|
|
10
|
-
pricingPref: string;
|
|
11
|
-
shouldSkipValidation: boolean;
|
|
10
|
+
inputRequest: types_PlaceOrderInputRepresentation_PlaceOrderInputRepresentation;
|
|
12
11
|
}
|
|
13
12
|
export declare const createResourceParams: (config: PlaceOrderConfig) => resources_postCommerceSalesOrdersOrdersActionsPlace_ResourceRequestConfig;
|
|
14
13
|
export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<PlaceOrderConfig>): adapter$45$utils_Untrusted<PlaceOrderConfig>;
|
package/dist/es/es2018/types/src/generated/resources/postCommerceSalesOrdersOrdersActionsPlace.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
import { PlaceOrderInputRepresentation as types_PlaceOrderInputRepresentation_PlaceOrderInputRepresentation } from '../types/PlaceOrderInputRepresentation';
|
|
1
2
|
import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment, FetchResponse as $64$luvio_engine_FetchResponse, FulfilledSnapshot as $64$luvio_engine_FulfilledSnapshot, StaleSnapshot as $64$luvio_engine_StaleSnapshot, PendingSnapshot as $64$luvio_engine_PendingSnapshot, ResourceRequest as $64$luvio_engine_ResourceRequest } from '@luvio/engine';
|
|
2
3
|
import { PlaceOrderOutputRepresentation as types_PlaceOrderOutputRepresentation_PlaceOrderOutputRepresentation } from '../types/PlaceOrderOutputRepresentation';
|
|
3
4
|
export interface ResourceRequestConfig {
|
|
4
5
|
body: {
|
|
5
|
-
|
|
6
|
-
pricingPref: string;
|
|
7
|
-
shouldSkipValidation: boolean;
|
|
6
|
+
inputRequest: types_PlaceOrderInputRepresentation_PlaceOrderInputRepresentation;
|
|
8
7
|
};
|
|
9
8
|
}
|
|
10
9
|
export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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 = "
|
|
2
|
+
export declare const VERSION = "a7f99754f37072010a0c1e84c2602393";
|
|
3
3
|
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
4
4
|
export declare const RepresentationType: string;
|
|
5
5
|
export declare function normalize(input: PlaceOrderInputRepresentation, existing: PlaceOrderInputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): PlaceOrderInputRepresentationNormalized;
|
|
@@ -15,11 +15,11 @@ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableSto
|
|
|
15
15
|
*/
|
|
16
16
|
export interface PlaceOrderInputRepresentationNormalized {
|
|
17
17
|
/** The sobject graph representing the order payload to be ingested. */
|
|
18
|
-
graph:
|
|
18
|
+
graph: {};
|
|
19
19
|
/** Pricing Preference for this place order process. */
|
|
20
20
|
pricingPref: string;
|
|
21
21
|
/** Indicates whether to run business rule validations, such as configuration rules, product eligibility rules, asset rules, etc., after the ingestion is completed (true) or not (false). The default is false. */
|
|
22
|
-
shouldSkipValidation
|
|
22
|
+
shouldSkipValidation?: boolean;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Place Order API input representation
|
|
@@ -28,7 +28,7 @@ export interface PlaceOrderInputRepresentationNormalized {
|
|
|
28
28
|
* (none)
|
|
29
29
|
*/
|
|
30
30
|
export interface PlaceOrderInputRepresentation {
|
|
31
|
-
graph:
|
|
31
|
+
graph: {};
|
|
32
32
|
pricingPref: string;
|
|
33
|
-
shouldSkipValidation
|
|
33
|
+
shouldSkipValidation?: boolean;
|
|
34
34
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { PlaceOrderInputRepresentation as PlaceOrderInputRepresentation_PlaceOrderInputRepresentation } from './PlaceOrderInputRepresentation';
|
|
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';
|
|
3
|
+
export declare const VERSION = "815b3d66f04cfc6994715d053b786a7e";
|
|
4
|
+
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
5
|
+
export declare const RepresentationType: string;
|
|
6
|
+
export declare function normalize(input: PlaceOrderInputWrapperRepresentation, existing: PlaceOrderInputWrapperRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): PlaceOrderInputWrapperRepresentationNormalized;
|
|
7
|
+
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
8
|
+
export declare function equals(existing: PlaceOrderInputWrapperRepresentationNormalized, incoming: PlaceOrderInputWrapperRepresentationNormalized): boolean;
|
|
9
|
+
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
10
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: PlaceOrderInputWrapperRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
11
|
+
/**
|
|
12
|
+
* Wrapper for place order input representation
|
|
13
|
+
*
|
|
14
|
+
* Keys:
|
|
15
|
+
* (none)
|
|
16
|
+
*/
|
|
17
|
+
export interface PlaceOrderInputWrapperRepresentationNormalized {
|
|
18
|
+
inputRequest: PlaceOrderInputRepresentation_PlaceOrderInputRepresentation;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Wrapper for place order input representation
|
|
22
|
+
*
|
|
23
|
+
* Keys:
|
|
24
|
+
* (none)
|
|
25
|
+
*/
|
|
26
|
+
export interface PlaceOrderInputWrapperRepresentation {
|
|
27
|
+
inputRequest: PlaceOrderInputRepresentation_PlaceOrderInputRepresentation;
|
|
28
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PlaceOrderErrorResponseRepresentation as PlaceOrderErrorResponseRepresentation_PlaceOrderErrorResponseRepresentation } from './PlaceOrderErrorResponseRepresentation';
|
|
2
2
|
import { KeyMetadata as $64$luvio_engine_KeyMetadata, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Luvio as $64$luvio_engine_Luvio, IngestPath as $64$luvio_engine_IngestPath, Store as $64$luvio_engine_Store, BaseFragment as $64$luvio_engine_BaseFragment, ResourceIngest as $64$luvio_engine_ResourceIngest, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap } from '@luvio/engine';
|
|
3
3
|
export declare const TTL = 1000;
|
|
4
|
-
export declare const VERSION = "
|
|
4
|
+
export declare const VERSION = "c091711201b7e247b20f49c526867ca7";
|
|
5
5
|
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
6
6
|
export declare const RepresentationType: string;
|
|
7
7
|
export interface KeyParams extends $64$luvio_engine_KeyMetadata {
|
|
@@ -30,9 +30,9 @@ export interface PlaceOrderOutputRepresentationNormalized {
|
|
|
30
30
|
/** Order Id */
|
|
31
31
|
orderId: string;
|
|
32
32
|
/** The request id of the process that can be used to query async status. */
|
|
33
|
-
requestId
|
|
33
|
+
requestId?: string;
|
|
34
34
|
/** The async status URL, if available */
|
|
35
|
-
statusURL
|
|
35
|
+
statusURL?: string;
|
|
36
36
|
/** Whether or not the synchronous part of the processing is successful */
|
|
37
37
|
success: boolean;
|
|
38
38
|
}
|
|
@@ -45,7 +45,7 @@ export interface PlaceOrderOutputRepresentationNormalized {
|
|
|
45
45
|
export interface PlaceOrderOutputRepresentation {
|
|
46
46
|
errors: Array<PlaceOrderErrorResponseRepresentation_PlaceOrderErrorResponseRepresentation>;
|
|
47
47
|
orderId: string;
|
|
48
|
-
requestId
|
|
49
|
-
statusURL
|
|
48
|
+
requestId?: string;
|
|
49
|
+
statusURL?: string;
|
|
50
50
|
success: boolean;
|
|
51
51
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-revenue-place-order",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.247.0",
|
|
4
4
|
"description": "Place Order Connect API ",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "dist/es/es2018/revenue-place-order.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"s.vishwabharathi@salesforce.com"
|
|
33
33
|
],
|
|
34
34
|
"scripts": {
|
|
35
|
-
"build": "yarn build:
|
|
35
|
+
"build": "yarn build:services",
|
|
36
36
|
"build:raml": "luvio generate src/raml/luvio.raml src/generated -p '../lds-compiler-plugins'",
|
|
37
37
|
"build:services": "rollup --bundleConfigAsCjs --config rollup.config.js",
|
|
38
38
|
"clean": "rm -rf dist sfdc src/generated",
|
|
@@ -53,7 +53,11 @@
|
|
|
53
53
|
"build": {
|
|
54
54
|
"outputs": [
|
|
55
55
|
"{projectRoot}/dist",
|
|
56
|
-
"{projectRoot}/sfdc"
|
|
56
|
+
"{projectRoot}/sfdc"
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"build:raml": {
|
|
60
|
+
"outputs": [
|
|
57
61
|
"{projectRoot}/src/generated"
|
|
58
62
|
]
|
|
59
63
|
}
|
package/sfdc/index.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
16
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$1
|
|
16
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$1 } from 'force/luvioEngine';
|
|
17
17
|
|
|
18
18
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
19
19
|
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
@@ -81,6 +81,32 @@ function createLink(ref) {
|
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
function validate$2(obj, path = 'PlaceOrderInputRepresentation') {
|
|
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
|
+
const obj_graph = obj.graph;
|
|
90
|
+
const path_graph = path + '.graph';
|
|
91
|
+
if (typeof obj_graph !== 'object' || ArrayIsArray(obj_graph) || obj_graph === null) {
|
|
92
|
+
return new TypeError('Expected "object" but received "' + typeof obj_graph + '" (at "' + path_graph + '")');
|
|
93
|
+
}
|
|
94
|
+
const obj_pricingPref = obj.pricingPref;
|
|
95
|
+
const path_pricingPref = path + '.pricingPref';
|
|
96
|
+
if (typeof obj_pricingPref !== 'string') {
|
|
97
|
+
return new TypeError('Expected "string" but received "' + typeof obj_pricingPref + '" (at "' + path_pricingPref + '")');
|
|
98
|
+
}
|
|
99
|
+
if (obj.shouldSkipValidation !== undefined) {
|
|
100
|
+
const obj_shouldSkipValidation = obj.shouldSkipValidation;
|
|
101
|
+
const path_shouldSkipValidation = path + '.shouldSkipValidation';
|
|
102
|
+
if (typeof obj_shouldSkipValidation !== 'boolean') {
|
|
103
|
+
return new TypeError('Expected "boolean" but received "' + typeof obj_shouldSkipValidation + '" (at "' + path_shouldSkipValidation + '")');
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
})();
|
|
107
|
+
return v_error === undefined ? null : v_error;
|
|
108
|
+
}
|
|
109
|
+
|
|
84
110
|
function validate$1(obj, path = 'PlaceOrderErrorResponseRepresentation') {
|
|
85
111
|
const v_error = (() => {
|
|
86
112
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -106,7 +132,7 @@ function validate$1(obj, path = 'PlaceOrderErrorResponseRepresentation') {
|
|
|
106
132
|
}
|
|
107
133
|
|
|
108
134
|
const TTL = 1000;
|
|
109
|
-
const VERSION = "
|
|
135
|
+
const VERSION = "c091711201b7e247b20f49c526867ca7";
|
|
110
136
|
function validate(obj, path = 'PlaceOrderOutputRepresentation') {
|
|
111
137
|
const v_error = (() => {
|
|
112
138
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
@@ -132,15 +158,19 @@ function validate(obj, path = 'PlaceOrderOutputRepresentation') {
|
|
|
132
158
|
if (typeof obj_orderId !== 'string') {
|
|
133
159
|
return new TypeError('Expected "string" but received "' + typeof obj_orderId + '" (at "' + path_orderId + '")');
|
|
134
160
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
161
|
+
if (obj.requestId !== undefined) {
|
|
162
|
+
const obj_requestId = obj.requestId;
|
|
163
|
+
const path_requestId = path + '.requestId';
|
|
164
|
+
if (typeof obj_requestId !== 'string') {
|
|
165
|
+
return new TypeError('Expected "string" but received "' + typeof obj_requestId + '" (at "' + path_requestId + '")');
|
|
166
|
+
}
|
|
139
167
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
168
|
+
if (obj.statusURL !== undefined) {
|
|
169
|
+
const obj_statusURL = obj.statusURL;
|
|
170
|
+
const path_statusURL = path + '.statusURL';
|
|
171
|
+
if (typeof obj_statusURL !== 'string') {
|
|
172
|
+
return new TypeError('Expected "string" but received "' + typeof obj_statusURL + '" (at "' + path_statusURL + '")');
|
|
173
|
+
}
|
|
144
174
|
}
|
|
145
175
|
const obj_success = obj.success;
|
|
146
176
|
const path_success = path + '.success';
|
|
@@ -238,17 +268,17 @@ function createResourceRequest(config) {
|
|
|
238
268
|
|
|
239
269
|
const adapterName = 'placeOrder';
|
|
240
270
|
const placeOrder_ConfigPropertyMetadata = [
|
|
241
|
-
generateParamConfigMetadata('
|
|
242
|
-
generateParamConfigMetadata('pricingPref', true, 2 /* Body */, 0 /* String */),
|
|
243
|
-
generateParamConfigMetadata('shouldSkipValidation', true, 2 /* Body */, 1 /* Boolean */),
|
|
271
|
+
generateParamConfigMetadata('inputRequest', true, 2 /* Body */, 4 /* Unsupported */),
|
|
244
272
|
];
|
|
245
273
|
const placeOrder_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, placeOrder_ConfigPropertyMetadata);
|
|
246
274
|
const createResourceParams = /*#__PURE__*/ createResourceParams$1(placeOrder_ConfigPropertyMetadata);
|
|
247
275
|
function typeCheckConfig(untrustedConfig) {
|
|
248
276
|
const config = {};
|
|
249
|
-
|
|
250
|
-
const
|
|
251
|
-
|
|
277
|
+
const untrustedConfig_inputRequest = untrustedConfig.inputRequest;
|
|
278
|
+
const referencePlaceOrderInputRepresentationValidationError = validate$2(untrustedConfig_inputRequest);
|
|
279
|
+
if (referencePlaceOrderInputRepresentationValidationError === null) {
|
|
280
|
+
config.inputRequest = untrustedConfig_inputRequest;
|
|
281
|
+
}
|
|
252
282
|
return config;
|
|
253
283
|
}
|
|
254
284
|
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
@@ -311,4 +341,4 @@ withDefaultLuvio((luvio) => {
|
|
|
311
341
|
});
|
|
312
342
|
|
|
313
343
|
export { placeOrder };
|
|
314
|
-
// version: 1.
|
|
344
|
+
// version: 1.247.0-418b3895b
|
package/src/raml/api.raml
CHANGED
|
@@ -25,26 +25,20 @@ annotationTypes:
|
|
|
25
25
|
type: string
|
|
26
26
|
allowedTargets: TypeDeclaration
|
|
27
27
|
types:
|
|
28
|
-
|
|
29
|
-
description:
|
|
28
|
+
PlaceOrderInputWrapperRepresentation: # Hand-rolled W-8334626
|
|
29
|
+
description: Wrapper for place order input representation
|
|
30
30
|
type: object
|
|
31
31
|
properties:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
message:
|
|
36
|
-
description: Message stating the reason for error, if any
|
|
37
|
-
type: string
|
|
38
|
-
referenceId:
|
|
39
|
-
description: Reference ID
|
|
40
|
-
type: string
|
|
32
|
+
inputRequest:
|
|
33
|
+
type: PlaceOrderInputRepresentation
|
|
34
|
+
description: Place Order Input Representation
|
|
41
35
|
PlaceOrderInputRepresentation:
|
|
42
36
|
description: Place Order API input representation
|
|
43
37
|
type: object
|
|
44
38
|
properties:
|
|
45
39
|
graph:
|
|
46
40
|
description: The sobject graph representing the order payload to be ingested.
|
|
47
|
-
type:
|
|
41
|
+
type: object
|
|
48
42
|
pricingPref:
|
|
49
43
|
description: Pricing Preference for this place order process.
|
|
50
44
|
type: string
|
|
@@ -57,6 +51,20 @@ types:
|
|
|
57
51
|
rules, product eligibility rules, asset rules, etc., after the ingestion
|
|
58
52
|
is completed (true) or not (false). The default is false.
|
|
59
53
|
type: boolean
|
|
54
|
+
required: false #handrolled
|
|
55
|
+
PlaceOrderErrorResponseRepresentation:
|
|
56
|
+
description: Place Order Error response representation
|
|
57
|
+
type: object
|
|
58
|
+
properties:
|
|
59
|
+
errorCode:
|
|
60
|
+
description: Error Code
|
|
61
|
+
type: string
|
|
62
|
+
message:
|
|
63
|
+
description: Message stating the reason for error, if any
|
|
64
|
+
type: string
|
|
65
|
+
referenceId:
|
|
66
|
+
description: Reference ID
|
|
67
|
+
type: string
|
|
60
68
|
PlaceOrderOutputRepresentation:
|
|
61
69
|
description: Place Order API output representation
|
|
62
70
|
type: object
|
|
@@ -73,9 +81,11 @@ types:
|
|
|
73
81
|
description: The request id of the process that can be used to query async
|
|
74
82
|
status.
|
|
75
83
|
type: string
|
|
84
|
+
required: false #handrolled
|
|
76
85
|
statusURL:
|
|
77
86
|
description: The async status URL, if available
|
|
78
87
|
type: string
|
|
88
|
+
required: false #handrolled
|
|
79
89
|
success:
|
|
80
90
|
description: Whether or not the synchronous part of the processing is successful
|
|
81
91
|
type: boolean
|
|
@@ -93,5 +103,5 @@ types:
|
|
|
93
103
|
type: PlaceOrderOutputRepresentation
|
|
94
104
|
body:
|
|
95
105
|
application/json:
|
|
96
|
-
type:
|
|
106
|
+
type: PlaceOrderInputWrapperRepresentation
|
|
97
107
|
(oas-body-name): inputRequest
|
package/src/raml/luvio.raml
CHANGED
|
@@ -21,11 +21,13 @@ types:
|
|
|
21
21
|
validConfigs:
|
|
22
22
|
- |
|
|
23
23
|
{
|
|
24
|
-
"
|
|
25
|
-
"shouldSkipValidation": true,
|
|
26
|
-
"graph":
|
|
24
|
+
"inputRequest":
|
|
27
25
|
{
|
|
28
|
-
"
|
|
26
|
+
"pricingPref": "Force",
|
|
27
|
+
"shouldSkipValidation": true,
|
|
28
|
+
"graph":
|
|
29
|
+
{
|
|
30
|
+
"graphId": "placeOrder",
|
|
29
31
|
"records":
|
|
30
32
|
[
|
|
31
33
|
{
|
|
@@ -55,8 +57,10 @@ types:
|
|
|
55
57
|
}
|
|
56
58
|
}
|
|
57
59
|
]
|
|
60
|
+
}
|
|
58
61
|
}
|
|
59
62
|
}
|
|
63
|
+
|
|
60
64
|
invalidConfigs:
|
|
61
65
|
- |
|
|
62
66
|
{
|
|
@@ -67,13 +71,15 @@ types:
|
|
|
67
71
|
"graph": {}
|
|
68
72
|
}
|
|
69
73
|
- |
|
|
70
|
-
{
|
|
74
|
+
{
|
|
75
|
+
"inputRequest":
|
|
71
76
|
{
|
|
72
77
|
"graph": {}
|
|
73
78
|
}
|
|
74
79
|
}
|
|
75
80
|
- |
|
|
76
|
-
{
|
|
81
|
+
{
|
|
82
|
+
"inputRequest":
|
|
77
83
|
{
|
|
78
84
|
"pricingPref": "force"
|
|
79
85
|
}
|