@salesforce/lds-adapters-industries-dfo 1.341.0 → 1.342.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/industries-dfo.js +188 -4
- package/dist/es/es2018/types/src/generated/adapters/postDroDecompositionViewer.d.ts +18 -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 -1
- package/dist/es/es2018/types/src/generated/resources/postConnectDroDecompositionDataBySalesTransactionId.d.ts +17 -0
- package/dist/es/es2018/types/src/generated/types/DroDecompositionViewerGetOutputRepresentation.d.ts +45 -0
- package/dist/es/es2018/types/src/generated/types/DroDecompositionViewerInputRepresentation.d.ts +32 -0
- package/package.json +3 -3
- package/sfdc/index.js +246 -55
- package/src/raml/api.raml +42 -1
- package/src/raml/luvio.raml +9 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For full license text, see the LICENSE.txt file
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { serializeStructuredKey, ingestShape, deepFreeze,
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, createResourceParams as createResourceParams$3, typeCheckConfig as typeCheckConfig$3, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1 } from '@luvio/engine';
|
|
8
8
|
|
|
9
9
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
10
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -80,6 +80,190 @@ function createLink(ref) {
|
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
const TTL$2 = 1000;
|
|
84
|
+
const VERSION$2 = "07ece60a92b63ace8c767498695db517";
|
|
85
|
+
function validate$2(obj, path = 'DroDecompositionViewerGetOutputRepresentation') {
|
|
86
|
+
const v_error = (() => {
|
|
87
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
88
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
89
|
+
}
|
|
90
|
+
const obj_statusCode = obj.statusCode;
|
|
91
|
+
const path_statusCode = path + '.statusCode';
|
|
92
|
+
if (typeof obj_statusCode !== 'string') {
|
|
93
|
+
return new TypeError('Expected "string" but received "' + typeof obj_statusCode + '" (at "' + path_statusCode + '")');
|
|
94
|
+
}
|
|
95
|
+
const obj_values = obj.values;
|
|
96
|
+
const path_values = path + '.values';
|
|
97
|
+
if (typeof obj_values !== 'object' || ArrayIsArray(obj_values) || obj_values === null) {
|
|
98
|
+
return new TypeError('Expected "object" but received "' + typeof obj_values + '" (at "' + path_values + '")');
|
|
99
|
+
}
|
|
100
|
+
const obj_values_keys = ObjectKeys(obj_values);
|
|
101
|
+
for (let i = 0; i < obj_values_keys.length; i++) {
|
|
102
|
+
const key = obj_values_keys[i];
|
|
103
|
+
const obj_values_prop = obj_values[key];
|
|
104
|
+
const path_values_prop = path_values + '["' + key + '"]';
|
|
105
|
+
if (obj_values_prop === undefined) {
|
|
106
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_values_prop + '" (at "' + path_values_prop + '")');
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
})();
|
|
110
|
+
return v_error === undefined ? null : v_error;
|
|
111
|
+
}
|
|
112
|
+
const RepresentationType$2 = 'DroDecompositionViewerGetOutputRepresentation';
|
|
113
|
+
function keyBuilder$3(luvio, config) {
|
|
114
|
+
return keyPrefix + '::' + RepresentationType$2 + ':' + config.message;
|
|
115
|
+
}
|
|
116
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
117
|
+
const keyParams = {
|
|
118
|
+
message: object.statusCode
|
|
119
|
+
};
|
|
120
|
+
return keyBuilder$3(luvio, keyParams);
|
|
121
|
+
}
|
|
122
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
123
|
+
return input;
|
|
124
|
+
}
|
|
125
|
+
const select$5 = function DroDecompositionViewerGetOutputRepresentationSelect() {
|
|
126
|
+
return {
|
|
127
|
+
kind: 'Fragment',
|
|
128
|
+
version: VERSION$2,
|
|
129
|
+
private: [],
|
|
130
|
+
opaque: true
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
function equals$2(existing, incoming) {
|
|
134
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
return true;
|
|
138
|
+
}
|
|
139
|
+
const ingest$2 = function DroDecompositionViewerGetOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
140
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
141
|
+
const validateError = validate$2(input);
|
|
142
|
+
if (validateError !== null) {
|
|
143
|
+
throw validateError;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
147
|
+
const ttlToUse = TTL$2;
|
|
148
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "dfo", VERSION$2, RepresentationType$2, equals$2);
|
|
149
|
+
return createLink(key);
|
|
150
|
+
};
|
|
151
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
152
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
153
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
154
|
+
rootKeySet.set(rootKey, {
|
|
155
|
+
namespace: keyPrefix,
|
|
156
|
+
representationName: RepresentationType$2,
|
|
157
|
+
mergeable: false
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function select$4(luvio, params) {
|
|
162
|
+
return select$5();
|
|
163
|
+
}
|
|
164
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
165
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response);
|
|
166
|
+
}
|
|
167
|
+
function ingestSuccess$2(luvio, resourceParams, response) {
|
|
168
|
+
const { body } = response;
|
|
169
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
170
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
171
|
+
const snapshot = luvio.storeLookup({
|
|
172
|
+
recordId: key,
|
|
173
|
+
node: select$4(),
|
|
174
|
+
variables: {},
|
|
175
|
+
});
|
|
176
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
177
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
178
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
deepFreeze(snapshot.data);
|
|
182
|
+
return snapshot;
|
|
183
|
+
}
|
|
184
|
+
function createResourceRequest$2(config) {
|
|
185
|
+
const headers = {};
|
|
186
|
+
return {
|
|
187
|
+
baseUri: '/services/data/v64.0',
|
|
188
|
+
basePath: '/connect/dro/' + config.urlParams.salesTransactionId + '/decomposition-data',
|
|
189
|
+
method: 'post',
|
|
190
|
+
body: config.body,
|
|
191
|
+
urlParams: config.urlParams,
|
|
192
|
+
queryParams: {},
|
|
193
|
+
headers,
|
|
194
|
+
priority: 'normal',
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
const adapterName$2 = 'postDroDecompositionViewer';
|
|
199
|
+
const postDroDecompositionViewer_ConfigPropertyMetadata = [
|
|
200
|
+
generateParamConfigMetadata('salesTransactionId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
201
|
+
generateParamConfigMetadata('values', true, 2 /* Body */, 4 /* Unsupported */),
|
|
202
|
+
];
|
|
203
|
+
const postDroDecompositionViewer_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, postDroDecompositionViewer_ConfigPropertyMetadata);
|
|
204
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(postDroDecompositionViewer_ConfigPropertyMetadata);
|
|
205
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
206
|
+
const config = {};
|
|
207
|
+
typeCheckConfig$3(untrustedConfig, config, postDroDecompositionViewer_ConfigPropertyMetadata);
|
|
208
|
+
const untrustedConfig_values = untrustedConfig.values;
|
|
209
|
+
if (untrustedIsObject(untrustedConfig_values)) {
|
|
210
|
+
const untrustedConfig_values_object = {};
|
|
211
|
+
const untrustedConfig_values_keys = Object.keys(untrustedConfig_values);
|
|
212
|
+
for (let i = 0, arrayLength = untrustedConfig_values_keys.length; i < arrayLength; i++) {
|
|
213
|
+
const key = untrustedConfig_values_keys[i];
|
|
214
|
+
const untrustedConfig_values_prop = untrustedConfig_values[key];
|
|
215
|
+
if (untrustedConfig_values_object !== undefined) {
|
|
216
|
+
untrustedConfig_values_object[key] = untrustedConfig_values_prop;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
if (untrustedConfig_values_object !== undefined && Object.keys(untrustedConfig_values_object).length >= 0) {
|
|
220
|
+
config.values = untrustedConfig_values_object;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
return config;
|
|
224
|
+
}
|
|
225
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
226
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
227
|
+
return null;
|
|
228
|
+
}
|
|
229
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
230
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
231
|
+
}
|
|
232
|
+
const config = typeCheckConfig$2(untrustedConfig);
|
|
233
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
234
|
+
return null;
|
|
235
|
+
}
|
|
236
|
+
return config;
|
|
237
|
+
}
|
|
238
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
239
|
+
const resourceParams = createResourceParams$2(config);
|
|
240
|
+
const request = createResourceRequest$2(resourceParams);
|
|
241
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
242
|
+
.then((response) => {
|
|
243
|
+
return luvio.handleSuccessResponse(() => {
|
|
244
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response);
|
|
245
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
246
|
+
}, () => {
|
|
247
|
+
const cache = new StoreKeyMap();
|
|
248
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
249
|
+
return cache;
|
|
250
|
+
});
|
|
251
|
+
}, (response) => {
|
|
252
|
+
deepFreeze(response);
|
|
253
|
+
throw response;
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
const postDroDecompositionViewerAdapterFactory = (luvio) => {
|
|
257
|
+
return function postDroDecompositionViewer(untrustedConfig) {
|
|
258
|
+
const config = validateAdapterConfig$2(untrustedConfig, postDroDecompositionViewer_ConfigPropertyNames);
|
|
259
|
+
// Invalid or incomplete config
|
|
260
|
+
if (config === null) {
|
|
261
|
+
throw new Error('Invalid config for "postDroDecompositionViewer"');
|
|
262
|
+
}
|
|
263
|
+
return buildNetworkSnapshot$2(luvio, config);
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
|
|
83
267
|
const TTL$1 = 1000;
|
|
84
268
|
const VERSION$1 = "dd6647099b059db657ec754c75dfccc4";
|
|
85
269
|
function validate$1(obj, path = 'DfoConfigInfoGetOutputRepresentation') {
|
|
@@ -199,7 +383,7 @@ function createResourceRequest$1(config) {
|
|
|
199
383
|
const adapterName$1 = 'getDfoConfigInfo';
|
|
200
384
|
const getDfoConfigInfo_ConfigPropertyMetadata = [];
|
|
201
385
|
const getDfoConfigInfo_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getDfoConfigInfo_ConfigPropertyMetadata);
|
|
202
|
-
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$
|
|
386
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(getDfoConfigInfo_ConfigPropertyMetadata);
|
|
203
387
|
function keyBuilder$1(luvio, config) {
|
|
204
388
|
createResourceParams$1(config);
|
|
205
389
|
return keyBuilder$2();
|
|
@@ -385,7 +569,7 @@ const putDfoConfigInfo_ConfigPropertyMetadata = [
|
|
|
385
569
|
generateParamConfigMetadata('values', true, 2 /* Body */, 4 /* Unsupported */),
|
|
386
570
|
];
|
|
387
571
|
const putDfoConfigInfo_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, putDfoConfigInfo_ConfigPropertyMetadata);
|
|
388
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
572
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$3(putDfoConfigInfo_ConfigPropertyMetadata);
|
|
389
573
|
function typeCheckConfig(untrustedConfig) {
|
|
390
574
|
const config = {};
|
|
391
575
|
const untrustedConfig_values = untrustedConfig.values;
|
|
@@ -449,4 +633,4 @@ const putDfoConfigInfoAdapterFactory = (luvio) => {
|
|
|
449
633
|
};
|
|
450
634
|
};
|
|
451
635
|
|
|
452
|
-
export { getDfoConfigInfoAdapterFactory, putDfoConfigInfoAdapterFactory };
|
|
636
|
+
export { getDfoConfigInfoAdapterFactory, postDroDecompositionViewerAdapterFactory, putDfoConfigInfoAdapterFactory };
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
|
|
3
|
+
import { ResourceRequestConfig as resources_postConnectDroDecompositionDataBySalesTransactionId_ResourceRequestConfig } from '../resources/postConnectDroDecompositionDataBySalesTransactionId';
|
|
4
|
+
import { DroDecompositionViewerGetOutputRepresentation as types_DroDecompositionViewerGetOutputRepresentation_DroDecompositionViewerGetOutputRepresentation } from '../types/DroDecompositionViewerGetOutputRepresentation';
|
|
5
|
+
export declare const adapterName = "postDroDecompositionViewer";
|
|
6
|
+
export declare const postDroDecompositionViewer_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
7
|
+
export declare const postDroDecompositionViewer_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
8
|
+
export interface PostDroDecompositionViewerConfig {
|
|
9
|
+
salesTransactionId: string;
|
|
10
|
+
values: {
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export declare const createResourceParams: (config: PostDroDecompositionViewerConfig) => resources_postConnectDroDecompositionDataBySalesTransactionId_ResourceRequestConfig;
|
|
15
|
+
export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<PostDroDecompositionViewerConfig>): adapter$45$utils_Untrusted<PostDroDecompositionViewerConfig>;
|
|
16
|
+
export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): PostDroDecompositionViewerConfig | null;
|
|
17
|
+
export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: PostDroDecompositionViewerConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<import("@luvio/engine").FulfilledSnapshot<types_DroDecompositionViewerGetOutputRepresentation_DroDecompositionViewerGetOutputRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_DroDecompositionViewerGetOutputRepresentation_DroDecompositionViewerGetOutputRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_DroDecompositionViewerGetOutputRepresentation_DroDecompositionViewerGetOutputRepresentation, any>>;
|
|
18
|
+
export declare const postDroDecompositionViewerAdapterFactory: $64$luvio_engine_AdapterFactory<PostDroDecompositionViewerConfig, types_DroDecompositionViewerGetOutputRepresentation_DroDecompositionViewerGetOutputRepresentation>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
declare let getDfoConfigInfo: any;
|
|
2
|
+
declare let postDroDecompositionViewer: any;
|
|
2
3
|
declare let putDfoConfigInfo: any;
|
|
3
4
|
declare let getDfoConfigInfo_imperative: any;
|
|
4
|
-
export { getDfoConfigInfo, putDfoConfigInfo, getDfoConfigInfo_imperative };
|
|
5
|
+
export { getDfoConfigInfo, postDroDecompositionViewer, putDfoConfigInfo, getDfoConfigInfo_imperative, };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
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
|
+
import { DroDecompositionViewerGetOutputRepresentation as types_DroDecompositionViewerGetOutputRepresentation_DroDecompositionViewerGetOutputRepresentation } from '../types/DroDecompositionViewerGetOutputRepresentation';
|
|
3
|
+
export interface ResourceRequestConfig {
|
|
4
|
+
urlParams: {
|
|
5
|
+
salesTransactionId: string;
|
|
6
|
+
};
|
|
7
|
+
body: {
|
|
8
|
+
values: {
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
|
|
14
|
+
export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_DroDecompositionViewerGetOutputRepresentation_DroDecompositionViewerGetOutputRepresentation): void;
|
|
15
|
+
export declare function ingestSuccess(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_DroDecompositionViewerGetOutputRepresentation_DroDecompositionViewerGetOutputRepresentation>): $64$luvio_engine_FulfilledSnapshot<types_DroDecompositionViewerGetOutputRepresentation_DroDecompositionViewerGetOutputRepresentation, {}> | $64$luvio_engine_StaleSnapshot<types_DroDecompositionViewerGetOutputRepresentation_DroDecompositionViewerGetOutputRepresentation, {}> | $64$luvio_engine_PendingSnapshot<types_DroDecompositionViewerGetOutputRepresentation_DroDecompositionViewerGetOutputRepresentation, any>;
|
|
16
|
+
export declare function createResourceRequest(config: ResourceRequestConfig): $64$luvio_engine_ResourceRequest;
|
|
17
|
+
export default createResourceRequest;
|
package/dist/es/es2018/types/src/generated/types/DroDecompositionViewerGetOutputRepresentation.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
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';
|
|
2
|
+
export declare const TTL = 1000;
|
|
3
|
+
export declare const VERSION = "07ece60a92b63ace8c767498695db517";
|
|
4
|
+
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
5
|
+
export declare const RepresentationType: string;
|
|
6
|
+
export interface KeyParams extends $64$luvio_engine_KeyMetadata {
|
|
7
|
+
message: string;
|
|
8
|
+
}
|
|
9
|
+
export type DroDecompositionViewerGetOutputRepresentationNormalizedKeyMetadata = KeyParams & $64$luvio_engine_NormalizedKeyMetadata;
|
|
10
|
+
export type PartialDroDecompositionViewerGetOutputRepresentationNormalizedKeyMetadata = Partial<KeyParams> & $64$luvio_engine_NormalizedKeyMetadata;
|
|
11
|
+
export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: KeyParams): string;
|
|
12
|
+
export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, config: KeyParams): DroDecompositionViewerGetOutputRepresentationNormalizedKeyMetadata;
|
|
13
|
+
export declare function keyBuilderFromType(luvio: $64$luvio_engine_Luvio, object: DroDecompositionViewerGetOutputRepresentation): string;
|
|
14
|
+
export declare function keyBuilderFromType_StructuredKey(luvio: $64$luvio_engine_Luvio, object: DroDecompositionViewerGetOutputRepresentation): $64$luvio_engine_NormalizedKeyMetadata;
|
|
15
|
+
export declare function normalize(input: DroDecompositionViewerGetOutputRepresentation, existing: DroDecompositionViewerGetOutputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): DroDecompositionViewerGetOutputRepresentationNormalized;
|
|
16
|
+
export declare const select: () => $64$luvio_engine_BaseFragment;
|
|
17
|
+
export declare function equals(existing: DroDecompositionViewerGetOutputRepresentationNormalized, incoming: DroDecompositionViewerGetOutputRepresentationNormalized): boolean;
|
|
18
|
+
export declare const ingest: $64$luvio_engine_ResourceIngest;
|
|
19
|
+
export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableStoreKeyMetadataMap, luvio: $64$luvio_engine_Luvio, input: DroDecompositionViewerGetOutputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
20
|
+
/**
|
|
21
|
+
* DRO get decomposition viewer Output Representation
|
|
22
|
+
*
|
|
23
|
+
* Keys:
|
|
24
|
+
* message (string): statusCode
|
|
25
|
+
*/
|
|
26
|
+
export interface DroDecompositionViewerGetOutputRepresentationNormalized {
|
|
27
|
+
/** Decomposition Viewer Response Status Code */
|
|
28
|
+
statusCode: string;
|
|
29
|
+
/** Decomposition Viewer Response */
|
|
30
|
+
values: {
|
|
31
|
+
[key: string]: unknown;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* DRO get decomposition viewer Output Representation
|
|
36
|
+
*
|
|
37
|
+
* Keys:
|
|
38
|
+
* message (string): statusCode
|
|
39
|
+
*/
|
|
40
|
+
export interface DroDecompositionViewerGetOutputRepresentation {
|
|
41
|
+
statusCode: string;
|
|
42
|
+
values: {
|
|
43
|
+
[key: string]: unknown;
|
|
44
|
+
};
|
|
45
|
+
}
|
package/dist/es/es2018/types/src/generated/types/DroDecompositionViewerInputRepresentation.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
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 = "8f66b6335338da4d294121006cd794d2";
|
|
3
|
+
export declare function validate(obj: any, path?: string): TypeError | null;
|
|
4
|
+
export declare const RepresentationType: string;
|
|
5
|
+
export declare function normalize(input: DroDecompositionViewerInputRepresentation, existing: DroDecompositionViewerInputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): DroDecompositionViewerInputRepresentationNormalized;
|
|
6
|
+
export declare const select: () => $64$luvio_engine_FragmentSelection;
|
|
7
|
+
export declare function equals(existing: DroDecompositionViewerInputRepresentationNormalized, incoming: DroDecompositionViewerInputRepresentationNormalized): 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: DroDecompositionViewerInputRepresentation, fullPathFactory: () => string | $64$luvio_engine_NormalizedKeyMetadata): void;
|
|
10
|
+
/**
|
|
11
|
+
* DRO Decomposition Viewer Api Input Representation
|
|
12
|
+
*
|
|
13
|
+
* Keys:
|
|
14
|
+
* (none)
|
|
15
|
+
*/
|
|
16
|
+
export interface DroDecompositionViewerInputRepresentationNormalized {
|
|
17
|
+
/** decomposition viewer related data */
|
|
18
|
+
values: {
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* DRO Decomposition Viewer Api Input Representation
|
|
24
|
+
*
|
|
25
|
+
* Keys:
|
|
26
|
+
* (none)
|
|
27
|
+
*/
|
|
28
|
+
export interface DroDecompositionViewerInputRepresentation {
|
|
29
|
+
values: {
|
|
30
|
+
[key: string]: unknown;
|
|
31
|
+
};
|
|
32
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-industries-dfo",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.342.0",
|
|
4
4
|
"description": "Dynamic Fulfillment Orchestrator APIs",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "dist/es/es2018/industries-dfo.js",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"test:unit": "jest"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@salesforce/lds-bindings": "^1.
|
|
43
|
+
"@salesforce/lds-bindings": "^1.342.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@salesforce/lds-compiler-plugins": "^1.
|
|
46
|
+
"@salesforce/lds-compiler-plugins": "^1.342.0"
|
|
47
47
|
},
|
|
48
48
|
"nx": {
|
|
49
49
|
"targets": {
|
package/sfdc/index.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
|
|
16
16
|
import { withDefaultLuvio } from 'force/ldsEngine';
|
|
17
|
-
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1, StoreKeyMap, createResourceParams as createResourceParams$
|
|
17
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1, StoreKeyMap, createResourceParams as createResourceParams$3, typeCheckConfig as typeCheckConfig$3 } from 'force/luvioEngine';
|
|
18
18
|
|
|
19
19
|
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
20
20
|
const { keys: ObjectKeys$1, create: ObjectCreate$1 } = Object;
|
|
@@ -90,9 +90,9 @@ function createLink(ref) {
|
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
const TTL$
|
|
94
|
-
const VERSION$
|
|
95
|
-
function validate$
|
|
93
|
+
const TTL$2 = 1000;
|
|
94
|
+
const VERSION$2 = "dd6647099b059db657ec754c75dfccc4";
|
|
95
|
+
function validate$2(obj, path = 'DfoConfigInfoGetOutputRepresentation') {
|
|
96
96
|
const v_error = (() => {
|
|
97
97
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
98
98
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
@@ -114,62 +114,62 @@ function validate$1(obj, path = 'DfoConfigInfoGetOutputRepresentation') {
|
|
|
114
114
|
})();
|
|
115
115
|
return v_error === undefined ? null : v_error;
|
|
116
116
|
}
|
|
117
|
-
const RepresentationType$
|
|
118
|
-
function normalize$
|
|
117
|
+
const RepresentationType$2 = 'DfoConfigInfoGetOutputRepresentation';
|
|
118
|
+
function normalize$2(input, existing, path, luvio, store, timestamp) {
|
|
119
119
|
return input;
|
|
120
120
|
}
|
|
121
|
-
const select$
|
|
121
|
+
const select$5 = function DfoConfigInfoGetOutputRepresentationSelect() {
|
|
122
122
|
return {
|
|
123
123
|
kind: 'Fragment',
|
|
124
|
-
version: VERSION$
|
|
124
|
+
version: VERSION$2,
|
|
125
125
|
private: [],
|
|
126
126
|
opaque: true
|
|
127
127
|
};
|
|
128
128
|
};
|
|
129
|
-
function equals$
|
|
129
|
+
function equals$2(existing, incoming) {
|
|
130
130
|
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
131
131
|
return false;
|
|
132
132
|
}
|
|
133
133
|
return true;
|
|
134
134
|
}
|
|
135
|
-
const ingest$
|
|
135
|
+
const ingest$2 = function DfoConfigInfoGetOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
136
136
|
if (process.env.NODE_ENV !== 'production') {
|
|
137
|
-
const validateError = validate$
|
|
137
|
+
const validateError = validate$2(input);
|
|
138
138
|
if (validateError !== null) {
|
|
139
139
|
throw validateError;
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
const key = path.fullPath;
|
|
143
|
-
const ttlToUse = TTL$
|
|
144
|
-
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$
|
|
143
|
+
const ttlToUse = TTL$2;
|
|
144
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "dfo", VERSION$2, RepresentationType$2, equals$2);
|
|
145
145
|
return createLink(key);
|
|
146
146
|
};
|
|
147
|
-
function getTypeCacheKeys$
|
|
147
|
+
function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
|
|
148
148
|
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
149
149
|
const rootKey = fullPathFactory();
|
|
150
150
|
rootKeySet.set(rootKey, {
|
|
151
151
|
namespace: keyPrefix,
|
|
152
|
-
representationName: RepresentationType$
|
|
152
|
+
representationName: RepresentationType$2,
|
|
153
153
|
mergeable: false
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
function select$
|
|
158
|
-
return select$
|
|
157
|
+
function select$4(luvio, params) {
|
|
158
|
+
return select$5();
|
|
159
159
|
}
|
|
160
|
-
function keyBuilder$
|
|
160
|
+
function keyBuilder$3(luvio, params) {
|
|
161
161
|
return keyPrefix + '::DfoConfigInfoGetOutputRepresentation:(' + ')';
|
|
162
162
|
}
|
|
163
|
-
function getResponseCacheKeys$
|
|
164
|
-
getTypeCacheKeys$
|
|
163
|
+
function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
|
|
164
|
+
getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$3());
|
|
165
165
|
}
|
|
166
|
-
function ingestSuccess$
|
|
166
|
+
function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
|
|
167
167
|
const { body } = response;
|
|
168
|
-
const key = keyBuilder$
|
|
169
|
-
luvio.storeIngest(key, ingest$
|
|
168
|
+
const key = keyBuilder$3();
|
|
169
|
+
luvio.storeIngest(key, ingest$2, body);
|
|
170
170
|
const snapshot = luvio.storeLookup({
|
|
171
171
|
recordId: key,
|
|
172
|
-
node: select$
|
|
172
|
+
node: select$4(),
|
|
173
173
|
variables: {},
|
|
174
174
|
}, snapshotRefresh);
|
|
175
175
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -181,18 +181,18 @@ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
|
|
|
181
181
|
return snapshot;
|
|
182
182
|
}
|
|
183
183
|
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
184
|
-
const key = keyBuilder$
|
|
184
|
+
const key = keyBuilder$3();
|
|
185
185
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
186
186
|
const storeMetadataParams = {
|
|
187
|
-
ttl: TTL$
|
|
187
|
+
ttl: TTL$2,
|
|
188
188
|
namespace: keyPrefix,
|
|
189
|
-
version: VERSION$
|
|
190
|
-
representationName: RepresentationType$
|
|
189
|
+
version: VERSION$2,
|
|
190
|
+
representationName: RepresentationType$2
|
|
191
191
|
};
|
|
192
192
|
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
193
193
|
return errorSnapshot;
|
|
194
194
|
}
|
|
195
|
-
function createResourceRequest$
|
|
195
|
+
function createResourceRequest$2(config) {
|
|
196
196
|
const headers = {};
|
|
197
197
|
return {
|
|
198
198
|
baseUri: '/services/data/v64.0',
|
|
@@ -206,57 +206,57 @@ function createResourceRequest$1(config) {
|
|
|
206
206
|
};
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
const adapterName$
|
|
209
|
+
const adapterName$2 = 'getDfoConfigInfo';
|
|
210
210
|
const getDfoConfigInfo_ConfigPropertyMetadata = [];
|
|
211
|
-
const getDfoConfigInfo_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$
|
|
212
|
-
const createResourceParams$
|
|
213
|
-
function keyBuilder$
|
|
214
|
-
createResourceParams$
|
|
215
|
-
return keyBuilder$
|
|
211
|
+
const getDfoConfigInfo_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getDfoConfigInfo_ConfigPropertyMetadata);
|
|
212
|
+
const createResourceParams$2 = /*#__PURE__*/ createResourceParams$3(getDfoConfigInfo_ConfigPropertyMetadata);
|
|
213
|
+
function keyBuilder$2(luvio, config) {
|
|
214
|
+
createResourceParams$2(config);
|
|
215
|
+
return keyBuilder$3();
|
|
216
216
|
}
|
|
217
|
-
function typeCheckConfig$
|
|
217
|
+
function typeCheckConfig$2(untrustedConfig) {
|
|
218
218
|
const config = {};
|
|
219
219
|
return config;
|
|
220
220
|
}
|
|
221
|
-
function validateAdapterConfig$
|
|
221
|
+
function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
|
|
222
222
|
if (!untrustedIsObject(untrustedConfig)) {
|
|
223
223
|
return null;
|
|
224
224
|
}
|
|
225
225
|
if (process.env.NODE_ENV !== 'production') {
|
|
226
226
|
validateConfig(untrustedConfig, configPropertyNames);
|
|
227
227
|
}
|
|
228
|
-
const config = typeCheckConfig$
|
|
228
|
+
const config = typeCheckConfig$2();
|
|
229
229
|
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
230
230
|
return null;
|
|
231
231
|
}
|
|
232
232
|
return config;
|
|
233
233
|
}
|
|
234
234
|
function adapterFragment(luvio, config) {
|
|
235
|
-
createResourceParams$
|
|
236
|
-
return select$
|
|
235
|
+
createResourceParams$2(config);
|
|
236
|
+
return select$4();
|
|
237
237
|
}
|
|
238
238
|
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
239
|
-
const snapshot = ingestSuccess$
|
|
239
|
+
const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
|
|
240
240
|
config,
|
|
241
|
-
resolve: () => buildNetworkSnapshot$
|
|
241
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
242
242
|
});
|
|
243
243
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
244
244
|
}
|
|
245
245
|
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
246
246
|
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
247
247
|
config,
|
|
248
|
-
resolve: () => buildNetworkSnapshot$
|
|
248
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
249
249
|
});
|
|
250
250
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
251
251
|
}
|
|
252
|
-
function buildNetworkSnapshot$
|
|
253
|
-
const resourceParams = createResourceParams$
|
|
254
|
-
const request = createResourceRequest$
|
|
252
|
+
function buildNetworkSnapshot$2(luvio, config, options) {
|
|
253
|
+
const resourceParams = createResourceParams$2(config);
|
|
254
|
+
const request = createResourceRequest$2();
|
|
255
255
|
return luvio.dispatchResourceRequest(request, options)
|
|
256
256
|
.then((response) => {
|
|
257
257
|
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
258
258
|
const cache = new StoreKeyMap();
|
|
259
|
-
getResponseCacheKeys$
|
|
259
|
+
getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
|
|
260
260
|
return cache;
|
|
261
261
|
});
|
|
262
262
|
}, (response) => {
|
|
@@ -264,23 +264,23 @@ function buildNetworkSnapshot$1(luvio, config, options) {
|
|
|
264
264
|
});
|
|
265
265
|
}
|
|
266
266
|
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
267
|
-
return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot$
|
|
267
|
+
return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
|
|
268
268
|
}
|
|
269
269
|
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
270
270
|
const { luvio, config } = context;
|
|
271
271
|
const selector = {
|
|
272
|
-
recordId: keyBuilder$
|
|
272
|
+
recordId: keyBuilder$2(luvio, config),
|
|
273
273
|
node: adapterFragment(luvio, config),
|
|
274
274
|
variables: {},
|
|
275
275
|
};
|
|
276
276
|
const cacheSnapshot = storeLookup(selector, {
|
|
277
277
|
config,
|
|
278
|
-
resolve: () => buildNetworkSnapshot$
|
|
278
|
+
resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
|
|
279
279
|
});
|
|
280
280
|
return cacheSnapshot;
|
|
281
281
|
}
|
|
282
282
|
const getDfoConfigInfoAdapterFactory = (luvio) => function dfo__getDfoConfigInfo(untrustedConfig, requestContext) {
|
|
283
|
-
const config = validateAdapterConfig$
|
|
283
|
+
const config = validateAdapterConfig$2(untrustedConfig, getDfoConfigInfo_ConfigPropertyNames);
|
|
284
284
|
// Invalid or incomplete config
|
|
285
285
|
if (config === null) {
|
|
286
286
|
return null;
|
|
@@ -289,6 +289,190 @@ const getDfoConfigInfoAdapterFactory = (luvio) => function dfo__getDfoConfigInfo
|
|
|
289
289
|
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
290
290
|
};
|
|
291
291
|
|
|
292
|
+
const TTL$1 = 1000;
|
|
293
|
+
const VERSION$1 = "07ece60a92b63ace8c767498695db517";
|
|
294
|
+
function validate$1(obj, path = 'DroDecompositionViewerGetOutputRepresentation') {
|
|
295
|
+
const v_error = (() => {
|
|
296
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
297
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
298
|
+
}
|
|
299
|
+
const obj_statusCode = obj.statusCode;
|
|
300
|
+
const path_statusCode = path + '.statusCode';
|
|
301
|
+
if (typeof obj_statusCode !== 'string') {
|
|
302
|
+
return new TypeError('Expected "string" but received "' + typeof obj_statusCode + '" (at "' + path_statusCode + '")');
|
|
303
|
+
}
|
|
304
|
+
const obj_values = obj.values;
|
|
305
|
+
const path_values = path + '.values';
|
|
306
|
+
if (typeof obj_values !== 'object' || ArrayIsArray(obj_values) || obj_values === null) {
|
|
307
|
+
return new TypeError('Expected "object" but received "' + typeof obj_values + '" (at "' + path_values + '")');
|
|
308
|
+
}
|
|
309
|
+
const obj_values_keys = ObjectKeys(obj_values);
|
|
310
|
+
for (let i = 0; i < obj_values_keys.length; i++) {
|
|
311
|
+
const key = obj_values_keys[i];
|
|
312
|
+
const obj_values_prop = obj_values[key];
|
|
313
|
+
const path_values_prop = path_values + '["' + key + '"]';
|
|
314
|
+
if (obj_values_prop === undefined) {
|
|
315
|
+
return new TypeError('Expected "defined" but received "' + typeof obj_values_prop + '" (at "' + path_values_prop + '")');
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
})();
|
|
319
|
+
return v_error === undefined ? null : v_error;
|
|
320
|
+
}
|
|
321
|
+
const RepresentationType$1 = 'DroDecompositionViewerGetOutputRepresentation';
|
|
322
|
+
function keyBuilder$1(luvio, config) {
|
|
323
|
+
return keyPrefix + '::' + RepresentationType$1 + ':' + config.message;
|
|
324
|
+
}
|
|
325
|
+
function keyBuilderFromType$1(luvio, object) {
|
|
326
|
+
const keyParams = {
|
|
327
|
+
message: object.statusCode
|
|
328
|
+
};
|
|
329
|
+
return keyBuilder$1(luvio, keyParams);
|
|
330
|
+
}
|
|
331
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
332
|
+
return input;
|
|
333
|
+
}
|
|
334
|
+
const select$3 = function DroDecompositionViewerGetOutputRepresentationSelect() {
|
|
335
|
+
return {
|
|
336
|
+
kind: 'Fragment',
|
|
337
|
+
version: VERSION$1,
|
|
338
|
+
private: [],
|
|
339
|
+
opaque: true
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
function equals$1(existing, incoming) {
|
|
343
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
344
|
+
return false;
|
|
345
|
+
}
|
|
346
|
+
return true;
|
|
347
|
+
}
|
|
348
|
+
const ingest$1 = function DroDecompositionViewerGetOutputRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
349
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
350
|
+
const validateError = validate$1(input);
|
|
351
|
+
if (validateError !== null) {
|
|
352
|
+
throw validateError;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
const key = keyBuilderFromType$1(luvio, input);
|
|
356
|
+
const ttlToUse = TTL$1;
|
|
357
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "dfo", VERSION$1, RepresentationType$1, equals$1);
|
|
358
|
+
return createLink(key);
|
|
359
|
+
};
|
|
360
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
361
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
362
|
+
const rootKey = keyBuilderFromType$1(luvio, input);
|
|
363
|
+
rootKeySet.set(rootKey, {
|
|
364
|
+
namespace: keyPrefix,
|
|
365
|
+
representationName: RepresentationType$1,
|
|
366
|
+
mergeable: false
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
function select$2(luvio, params) {
|
|
371
|
+
return select$3();
|
|
372
|
+
}
|
|
373
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
374
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
375
|
+
}
|
|
376
|
+
function ingestSuccess$1(luvio, resourceParams, response) {
|
|
377
|
+
const { body } = response;
|
|
378
|
+
const key = keyBuilderFromType$1(luvio, body);
|
|
379
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
380
|
+
const snapshot = luvio.storeLookup({
|
|
381
|
+
recordId: key,
|
|
382
|
+
node: select$2(),
|
|
383
|
+
variables: {},
|
|
384
|
+
});
|
|
385
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
386
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
387
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
deepFreeze(snapshot.data);
|
|
391
|
+
return snapshot;
|
|
392
|
+
}
|
|
393
|
+
function createResourceRequest$1(config) {
|
|
394
|
+
const headers = {};
|
|
395
|
+
return {
|
|
396
|
+
baseUri: '/services/data/v64.0',
|
|
397
|
+
basePath: '/connect/dro/' + config.urlParams.salesTransactionId + '/decomposition-data',
|
|
398
|
+
method: 'post',
|
|
399
|
+
body: config.body,
|
|
400
|
+
urlParams: config.urlParams,
|
|
401
|
+
queryParams: {},
|
|
402
|
+
headers,
|
|
403
|
+
priority: 'normal',
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
const adapterName$1 = 'postDroDecompositionViewer';
|
|
408
|
+
const postDroDecompositionViewer_ConfigPropertyMetadata = [
|
|
409
|
+
generateParamConfigMetadata('salesTransactionId', true, 0 /* UrlParameter */, 0 /* String */),
|
|
410
|
+
generateParamConfigMetadata('values', true, 2 /* Body */, 4 /* Unsupported */),
|
|
411
|
+
];
|
|
412
|
+
const postDroDecompositionViewer_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, postDroDecompositionViewer_ConfigPropertyMetadata);
|
|
413
|
+
const createResourceParams$1 = /*#__PURE__*/ createResourceParams$3(postDroDecompositionViewer_ConfigPropertyMetadata);
|
|
414
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
415
|
+
const config = {};
|
|
416
|
+
typeCheckConfig$3(untrustedConfig, config, postDroDecompositionViewer_ConfigPropertyMetadata);
|
|
417
|
+
const untrustedConfig_values = untrustedConfig.values;
|
|
418
|
+
if (untrustedIsObject(untrustedConfig_values)) {
|
|
419
|
+
const untrustedConfig_values_object = {};
|
|
420
|
+
const untrustedConfig_values_keys = Object.keys(untrustedConfig_values);
|
|
421
|
+
for (let i = 0, arrayLength = untrustedConfig_values_keys.length; i < arrayLength; i++) {
|
|
422
|
+
const key = untrustedConfig_values_keys[i];
|
|
423
|
+
const untrustedConfig_values_prop = untrustedConfig_values[key];
|
|
424
|
+
if (untrustedConfig_values_object !== undefined) {
|
|
425
|
+
untrustedConfig_values_object[key] = untrustedConfig_values_prop;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
if (untrustedConfig_values_object !== undefined && Object.keys(untrustedConfig_values_object).length >= 0) {
|
|
429
|
+
config.values = untrustedConfig_values_object;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
return config;
|
|
433
|
+
}
|
|
434
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
435
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
436
|
+
return null;
|
|
437
|
+
}
|
|
438
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
439
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
440
|
+
}
|
|
441
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
442
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
443
|
+
return null;
|
|
444
|
+
}
|
|
445
|
+
return config;
|
|
446
|
+
}
|
|
447
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
448
|
+
const resourceParams = createResourceParams$1(config);
|
|
449
|
+
const request = createResourceRequest$1(resourceParams);
|
|
450
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
451
|
+
.then((response) => {
|
|
452
|
+
return luvio.handleSuccessResponse(() => {
|
|
453
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response);
|
|
454
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
455
|
+
}, () => {
|
|
456
|
+
const cache = new StoreKeyMap();
|
|
457
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
458
|
+
return cache;
|
|
459
|
+
});
|
|
460
|
+
}, (response) => {
|
|
461
|
+
deepFreeze(response);
|
|
462
|
+
throw response;
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
const postDroDecompositionViewerAdapterFactory = (luvio) => {
|
|
466
|
+
return function postDroDecompositionViewer(untrustedConfig) {
|
|
467
|
+
const config = validateAdapterConfig$1(untrustedConfig, postDroDecompositionViewer_ConfigPropertyNames);
|
|
468
|
+
// Invalid or incomplete config
|
|
469
|
+
if (config === null) {
|
|
470
|
+
throw new Error('Invalid config for "postDroDecompositionViewer"');
|
|
471
|
+
}
|
|
472
|
+
return buildNetworkSnapshot$1(luvio, config);
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
|
|
292
476
|
const TTL = 1000;
|
|
293
477
|
const VERSION = "9118841e4b6126264ec72c8a2ff0f35e";
|
|
294
478
|
function validate(obj, path = 'DfoConfigInfoUpdateOutputRepresentation') {
|
|
@@ -395,7 +579,7 @@ const putDfoConfigInfo_ConfigPropertyMetadata = [
|
|
|
395
579
|
generateParamConfigMetadata('values', true, 2 /* Body */, 4 /* Unsupported */),
|
|
396
580
|
];
|
|
397
581
|
const putDfoConfigInfo_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, putDfoConfigInfo_ConfigPropertyMetadata);
|
|
398
|
-
const createResourceParams = /*#__PURE__*/ createResourceParams$
|
|
582
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$3(putDfoConfigInfo_ConfigPropertyMetadata);
|
|
399
583
|
function typeCheckConfig(untrustedConfig) {
|
|
400
584
|
const config = {};
|
|
401
585
|
const untrustedConfig_values = untrustedConfig.values;
|
|
@@ -460,6 +644,7 @@ const putDfoConfigInfoAdapterFactory = (luvio) => {
|
|
|
460
644
|
};
|
|
461
645
|
|
|
462
646
|
let getDfoConfigInfo;
|
|
647
|
+
let postDroDecompositionViewer;
|
|
463
648
|
let putDfoConfigInfo;
|
|
464
649
|
// Imperative GET Adapters
|
|
465
650
|
let getDfoConfigInfo_imperative;
|
|
@@ -475,6 +660,7 @@ function bindExportsTo(luvio) {
|
|
|
475
660
|
}
|
|
476
661
|
return {
|
|
477
662
|
getDfoConfigInfo: createWireAdapterConstructor(luvio, getDfoConfigInfo_ldsAdapter, getDfoConfigInfoMetadata),
|
|
663
|
+
postDroDecompositionViewer: unwrapSnapshotData(postDroDecompositionViewerAdapterFactory),
|
|
478
664
|
putDfoConfigInfo: unwrapSnapshotData(putDfoConfigInfoAdapterFactory),
|
|
479
665
|
// Imperative GET Adapters
|
|
480
666
|
getDfoConfigInfo_imperative: createImperativeAdapter(luvio, getDfoConfigInfo_ldsAdapter, getDfoConfigInfoMetadata),
|
|
@@ -482,8 +668,13 @@ function bindExportsTo(luvio) {
|
|
|
482
668
|
};
|
|
483
669
|
}
|
|
484
670
|
withDefaultLuvio((luvio) => {
|
|
485
|
-
({
|
|
671
|
+
({
|
|
672
|
+
getDfoConfigInfo,
|
|
673
|
+
postDroDecompositionViewer,
|
|
674
|
+
putDfoConfigInfo,
|
|
675
|
+
getDfoConfigInfo_imperative,
|
|
676
|
+
} = bindExportsTo(luvio));
|
|
486
677
|
});
|
|
487
678
|
|
|
488
|
-
export { getDfoConfigInfo, getDfoConfigInfo_imperative, putDfoConfigInfo };
|
|
489
|
-
// version: 1.
|
|
679
|
+
export { getDfoConfigInfo, getDfoConfigInfo_imperative, postDroDecompositionViewer, putDfoConfigInfo };
|
|
680
|
+
// version: 1.342.0-f478af8b93
|
package/src/raml/api.raml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
securedBy:
|
|
3
3
|
- OAuth2
|
|
4
4
|
title: Salesforce Connect API
|
|
5
|
-
version: '
|
|
5
|
+
version: '64.0'
|
|
6
6
|
mediaType: application/json
|
|
7
7
|
protocols:
|
|
8
8
|
- https
|
|
@@ -55,7 +55,48 @@ types:
|
|
|
55
55
|
enum:
|
|
56
56
|
- Failure
|
|
57
57
|
- Success
|
|
58
|
+
DroDecompositionViewerGetOutputRepresentation:
|
|
59
|
+
description: DRO get decomposition viewer Output Representation
|
|
60
|
+
type: object
|
|
61
|
+
properties:
|
|
62
|
+
statusCode:
|
|
63
|
+
description: Decomposition Viewer Response Status Code
|
|
64
|
+
type: string
|
|
65
|
+
values:
|
|
66
|
+
description: Decomposition Viewer Response
|
|
67
|
+
type: object
|
|
68
|
+
properties:
|
|
69
|
+
//:
|
|
70
|
+
type: any
|
|
71
|
+
DroDecompositionViewerInputRepresentation:
|
|
72
|
+
description: DRO Decomposition Viewer Api Input Representation
|
|
73
|
+
type: object
|
|
74
|
+
properties:
|
|
75
|
+
values:
|
|
76
|
+
description: decomposition viewer related data
|
|
77
|
+
type: object
|
|
78
|
+
properties:
|
|
79
|
+
//:
|
|
80
|
+
type: any
|
|
58
81
|
/connect:
|
|
82
|
+
/dro/{salesTransactionId}/decomposition-data:
|
|
83
|
+
post:
|
|
84
|
+
displayName: postDroDecompositionViewer
|
|
85
|
+
description: API to get Decomposition Viewer Data
|
|
86
|
+
responses:
|
|
87
|
+
'200':
|
|
88
|
+
description: Success
|
|
89
|
+
body:
|
|
90
|
+
application/json:
|
|
91
|
+
type: DroDecompositionViewerGetOutputRepresentation
|
|
92
|
+
body:
|
|
93
|
+
application/json:
|
|
94
|
+
type: DroDecompositionViewerInputRepresentation
|
|
95
|
+
(oas-body-name): droDecompViewer
|
|
96
|
+
uriParameters:
|
|
97
|
+
salesTransactionId:
|
|
98
|
+
description: SalesTransaction Id
|
|
99
|
+
type: string
|
|
59
100
|
/revenue/dro/configurations:
|
|
60
101
|
get:
|
|
61
102
|
displayName: getDfoConfigInfo
|
package/src/raml/luvio.raml
CHANGED
|
@@ -16,6 +16,11 @@ types:
|
|
|
16
16
|
(luvio.opaque): true
|
|
17
17
|
(luvio.key):
|
|
18
18
|
message: status
|
|
19
|
+
DroDecompositionViewerGetOutputRepresentation:
|
|
20
|
+
(luvio.ttl): 1000
|
|
21
|
+
(luvio.opaque): true
|
|
22
|
+
(luvio.key):
|
|
23
|
+
message: statusCode
|
|
19
24
|
/connect:
|
|
20
25
|
/revenue/dro/configurations:
|
|
21
26
|
get:
|
|
@@ -24,3 +29,7 @@ types:
|
|
|
24
29
|
put:
|
|
25
30
|
(luvio.adapter):
|
|
26
31
|
name: putDfoConfigInfo
|
|
32
|
+
/dro/{salesTransactionId}/decomposition-data:
|
|
33
|
+
post:
|
|
34
|
+
(luvio.adapter):
|
|
35
|
+
name: postDroDecompositionViewer
|