@salesforce/lds-adapters-revenue-sales-transaction-contexts 1.304.0 → 1.306.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-sales-transaction-contexts.js +20 -6
- package/dist/es/es2018/types/src/generated/adapters/createRampDeal.d.ts +2 -2
- package/dist/es/es2018/types/src/generated/resources/postConnectRevenueManagementSalesTransactionContextsActionsRampDealCreateByResourceId.d.ts +2 -2
- package/dist/es/es2018/types/src/generated/types/CreateRampDealInputRepresentation.d.ts +5 -5
- package/dist/es/es2018/types/src/generated/types/RampDealServiceOutputRepresentation.d.ts +7 -4
- package/package.json +4 -4
- package/sfdc/index.js +22 -8
- package/src/raml/api.raml +5 -0
- package/src/raml/luvio.raml +2 -2
|
@@ -163,12 +163,17 @@ function equals$1(existing, incoming) {
|
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
const TTL = 1000;
|
|
166
|
-
const VERSION = "
|
|
166
|
+
const VERSION = "867de206d7a3c00d754202c075c69ae8";
|
|
167
167
|
function validate(obj, path = 'RampDealServiceOutputRepresentation') {
|
|
168
168
|
const v_error = (() => {
|
|
169
169
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
170
170
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
171
171
|
}
|
|
172
|
+
const obj_correlationId = obj.correlationId;
|
|
173
|
+
const path_correlationId = path + '.correlationId';
|
|
174
|
+
if (typeof obj_correlationId !== 'string') {
|
|
175
|
+
return new TypeError('Expected "string" but received "' + typeof obj_correlationId + '" (at "' + path_correlationId + '")');
|
|
176
|
+
}
|
|
172
177
|
const obj_errors = obj.errors;
|
|
173
178
|
const path_errors = path + '.errors';
|
|
174
179
|
if (!ArrayIsArray(obj_errors)) {
|
|
@@ -213,11 +218,11 @@ function validate(obj, path = 'RampDealServiceOutputRepresentation') {
|
|
|
213
218
|
}
|
|
214
219
|
const RepresentationType = 'RampDealServiceOutputRepresentation';
|
|
215
220
|
function keyBuilder$2(luvio, config) {
|
|
216
|
-
return keyPrefix + '::' + RepresentationType + ':' + config.
|
|
221
|
+
return keyPrefix + '::' + RepresentationType + ':' + config.correlationId;
|
|
217
222
|
}
|
|
218
223
|
function keyBuilderFromType(luvio, object) {
|
|
219
224
|
const keyParams = {
|
|
220
|
-
|
|
225
|
+
correlationId: object.correlationId
|
|
221
226
|
};
|
|
222
227
|
return keyBuilder$2(luvio, keyParams);
|
|
223
228
|
}
|
|
@@ -231,6 +236,10 @@ const select$4 = function RampDealServiceOutputRepresentationSelect() {
|
|
|
231
236
|
version: VERSION,
|
|
232
237
|
private: [],
|
|
233
238
|
selections: [
|
|
239
|
+
{
|
|
240
|
+
name: 'correlationId',
|
|
241
|
+
kind: 'Scalar'
|
|
242
|
+
},
|
|
234
243
|
{
|
|
235
244
|
name: 'errors',
|
|
236
245
|
kind: 'Object',
|
|
@@ -259,6 +268,11 @@ function equals(existing, incoming) {
|
|
|
259
268
|
if (!(existing_success === incoming_success)) {
|
|
260
269
|
return false;
|
|
261
270
|
}
|
|
271
|
+
const existing_correlationId = existing.correlationId;
|
|
272
|
+
const incoming_correlationId = incoming.correlationId;
|
|
273
|
+
if (!(existing_correlationId === incoming_correlationId)) {
|
|
274
|
+
return false;
|
|
275
|
+
}
|
|
262
276
|
const existing_transactionContextId = existing.transactionContextId;
|
|
263
277
|
const incoming_transactionContextId = incoming.transactionContextId;
|
|
264
278
|
if (!(existing_transactionContextId === incoming_transactionContextId)) {
|
|
@@ -354,8 +368,8 @@ const createRampDeal_ConfigPropertyMetadata = [
|
|
|
354
368
|
generateParamConfigMetadata('subscriptionTermUnit', true, 2 /* Body */, 0 /* String */),
|
|
355
369
|
generateParamConfigMetadata('transactionId', true, 2 /* Body */, 0 /* String */),
|
|
356
370
|
generateParamConfigMetadata('transactionLineId', true, 2 /* Body */, 0 /* String */),
|
|
357
|
-
generateParamConfigMetadata('trialTerm',
|
|
358
|
-
generateParamConfigMetadata('trialTermUnit',
|
|
371
|
+
generateParamConfigMetadata('trialTerm', false, 2 /* Body */, 3 /* Integer */),
|
|
372
|
+
generateParamConfigMetadata('trialTermUnit', false, 2 /* Body */, 0 /* String */),
|
|
359
373
|
];
|
|
360
374
|
const createRampDeal_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, createRampDeal_ConfigPropertyMetadata);
|
|
361
375
|
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$4(createRampDeal_ConfigPropertyMetadata);
|
|
@@ -627,7 +641,7 @@ function select(luvio, params) {
|
|
|
627
641
|
}
|
|
628
642
|
function keyBuilder$1(luvio, params) {
|
|
629
643
|
return keyBuilder$2(luvio, {
|
|
630
|
-
|
|
644
|
+
correlationId: params.urlParams.resourceId
|
|
631
645
|
});
|
|
632
646
|
}
|
|
633
647
|
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
@@ -13,8 +13,8 @@ export interface CreateRampDealConfig {
|
|
|
13
13
|
subscriptionTermUnit: string;
|
|
14
14
|
transactionId: string;
|
|
15
15
|
transactionLineId: string;
|
|
16
|
-
trialTerm
|
|
17
|
-
trialTermUnit
|
|
16
|
+
trialTerm?: number;
|
|
17
|
+
trialTermUnit?: string;
|
|
18
18
|
}
|
|
19
19
|
export declare const createResourceParams: (config: CreateRampDealConfig) => resources_postConnectRevenueManagementSalesTransactionContextsActionsRampDealCreateByResourceId_ResourceRequestConfig;
|
|
20
20
|
export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<CreateRampDealConfig>): adapter$45$utils_Untrusted<CreateRampDealConfig>;
|
|
@@ -11,8 +11,8 @@ export interface ResourceRequestConfig {
|
|
|
11
11
|
subscriptionTermUnit: string;
|
|
12
12
|
transactionId: string;
|
|
13
13
|
transactionLineId: string;
|
|
14
|
-
trialTerm
|
|
15
|
-
trialTermUnit
|
|
14
|
+
trialTerm?: number;
|
|
15
|
+
trialTermUnit?: string;
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
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 = "5a2133812e23d234a8a765ed3b5c9d8a";
|
|
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: CreateRampDealInputRepresentation, existing: CreateRampDealInputRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): CreateRampDealInputRepresentationNormalized;
|
|
@@ -27,9 +27,9 @@ export interface CreateRampDealInputRepresentationNormalized {
|
|
|
27
27
|
/** Transaction Line Id, quoteLineId or orderItemId */
|
|
28
28
|
transactionLineId: string;
|
|
29
29
|
/** Trial term period */
|
|
30
|
-
trialTerm
|
|
30
|
+
trialTerm?: number;
|
|
31
31
|
/** Trial term unit : Days */
|
|
32
|
-
trialTermUnit
|
|
32
|
+
trialTermUnit?: string;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
* Create ramp deal connect API input representation
|
|
@@ -44,6 +44,6 @@ export interface CreateRampDealInputRepresentation {
|
|
|
44
44
|
subscriptionTermUnit: string;
|
|
45
45
|
transactionId: string;
|
|
46
46
|
transactionLineId: string;
|
|
47
|
-
trialTerm
|
|
48
|
-
trialTermUnit
|
|
47
|
+
trialTerm?: number;
|
|
48
|
+
trialTermUnit?: string;
|
|
49
49
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { RampDealServiceErrorResponseRepresentation as RampDealServiceErrorResponseRepresentation_RampDealServiceErrorResponseRepresentation } from './RampDealServiceErrorResponseRepresentation';
|
|
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, FragmentSelection as $64$luvio_engine_FragmentSelection, 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 = "867de206d7a3c00d754202c075c69ae8";
|
|
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 {
|
|
8
|
-
|
|
8
|
+
correlationId: string;
|
|
9
9
|
}
|
|
10
10
|
export type RampDealServiceOutputRepresentationNormalizedKeyMetadata = KeyParams & $64$luvio_engine_NormalizedKeyMetadata;
|
|
11
11
|
export type PartialRampDealServiceOutputRepresentationNormalizedKeyMetadata = Partial<KeyParams> & $64$luvio_engine_NormalizedKeyMetadata;
|
|
@@ -22,9 +22,11 @@ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableSto
|
|
|
22
22
|
* Price Ramp APIs output representation
|
|
23
23
|
*
|
|
24
24
|
* Keys:
|
|
25
|
-
*
|
|
25
|
+
* correlationId (string): correlationId
|
|
26
26
|
*/
|
|
27
27
|
export interface RampDealServiceOutputRepresentationNormalized {
|
|
28
|
+
/** Resource Id to correlate the API request with the response. */
|
|
29
|
+
correlationId: string;
|
|
28
30
|
/** List of errors encountered during the API processing. */
|
|
29
31
|
errors: Array<RampDealServiceErrorResponseRepresentation_RampDealServiceErrorResponseRepresentation>;
|
|
30
32
|
/** SalesTransaction context object with updated price ramp information. */
|
|
@@ -40,9 +42,10 @@ export interface RampDealServiceOutputRepresentationNormalized {
|
|
|
40
42
|
* Price Ramp APIs output representation
|
|
41
43
|
*
|
|
42
44
|
* Keys:
|
|
43
|
-
*
|
|
45
|
+
* correlationId (string): correlationId
|
|
44
46
|
*/
|
|
45
47
|
export interface RampDealServiceOutputRepresentation {
|
|
48
|
+
correlationId: string;
|
|
46
49
|
errors: Array<RampDealServiceErrorResponseRepresentation_RampDealServiceErrorResponseRepresentation>;
|
|
47
50
|
salesTransactionContext: {
|
|
48
51
|
[key: string]: unknown;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-adapters-revenue-sales-transaction-contexts",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.306.0",
|
|
4
4
|
"description": "The API family provides set of APIs which will allow a sales rep to provide year over year deal to a customer and lock in long term revenue and customer.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "dist/es/es2018/revenue-sales-transaction-contexts.js",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"test:unit": "jest"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@salesforce/lds-bindings": "^1.
|
|
43
|
+
"@salesforce/lds-bindings": "^1.306.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@salesforce/lds-compiler-plugins": "^1.
|
|
47
|
-
"@salesforce/lds-karma": "^1.
|
|
46
|
+
"@salesforce/lds-compiler-plugins": "^1.306.0",
|
|
47
|
+
"@salesforce/lds-karma": "^1.306.0"
|
|
48
48
|
},
|
|
49
49
|
"nx": {
|
|
50
50
|
"targets": {
|
package/sfdc/index.js
CHANGED
|
@@ -173,12 +173,17 @@ function equals$1(existing, incoming) {
|
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
const TTL = 1000;
|
|
176
|
-
const VERSION = "
|
|
176
|
+
const VERSION = "867de206d7a3c00d754202c075c69ae8";
|
|
177
177
|
function validate(obj, path = 'RampDealServiceOutputRepresentation') {
|
|
178
178
|
const v_error = (() => {
|
|
179
179
|
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
180
180
|
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
181
181
|
}
|
|
182
|
+
const obj_correlationId = obj.correlationId;
|
|
183
|
+
const path_correlationId = path + '.correlationId';
|
|
184
|
+
if (typeof obj_correlationId !== 'string') {
|
|
185
|
+
return new TypeError('Expected "string" but received "' + typeof obj_correlationId + '" (at "' + path_correlationId + '")');
|
|
186
|
+
}
|
|
182
187
|
const obj_errors = obj.errors;
|
|
183
188
|
const path_errors = path + '.errors';
|
|
184
189
|
if (!ArrayIsArray(obj_errors)) {
|
|
@@ -223,11 +228,11 @@ function validate(obj, path = 'RampDealServiceOutputRepresentation') {
|
|
|
223
228
|
}
|
|
224
229
|
const RepresentationType = 'RampDealServiceOutputRepresentation';
|
|
225
230
|
function keyBuilder$2(luvio, config) {
|
|
226
|
-
return keyPrefix + '::' + RepresentationType + ':' + config.
|
|
231
|
+
return keyPrefix + '::' + RepresentationType + ':' + config.correlationId;
|
|
227
232
|
}
|
|
228
233
|
function keyBuilderFromType(luvio, object) {
|
|
229
234
|
const keyParams = {
|
|
230
|
-
|
|
235
|
+
correlationId: object.correlationId
|
|
231
236
|
};
|
|
232
237
|
return keyBuilder$2(luvio, keyParams);
|
|
233
238
|
}
|
|
@@ -241,6 +246,10 @@ const select$4 = function RampDealServiceOutputRepresentationSelect() {
|
|
|
241
246
|
version: VERSION,
|
|
242
247
|
private: [],
|
|
243
248
|
selections: [
|
|
249
|
+
{
|
|
250
|
+
name: 'correlationId',
|
|
251
|
+
kind: 'Scalar'
|
|
252
|
+
},
|
|
244
253
|
{
|
|
245
254
|
name: 'errors',
|
|
246
255
|
kind: 'Object',
|
|
@@ -269,6 +278,11 @@ function equals(existing, incoming) {
|
|
|
269
278
|
if (!(existing_success === incoming_success)) {
|
|
270
279
|
return false;
|
|
271
280
|
}
|
|
281
|
+
const existing_correlationId = existing.correlationId;
|
|
282
|
+
const incoming_correlationId = incoming.correlationId;
|
|
283
|
+
if (!(existing_correlationId === incoming_correlationId)) {
|
|
284
|
+
return false;
|
|
285
|
+
}
|
|
272
286
|
const existing_transactionContextId = existing.transactionContextId;
|
|
273
287
|
const incoming_transactionContextId = incoming.transactionContextId;
|
|
274
288
|
if (!(existing_transactionContextId === incoming_transactionContextId)) {
|
|
@@ -364,8 +378,8 @@ const createRampDeal_ConfigPropertyMetadata = [
|
|
|
364
378
|
generateParamConfigMetadata('subscriptionTermUnit', true, 2 /* Body */, 0 /* String */),
|
|
365
379
|
generateParamConfigMetadata('transactionId', true, 2 /* Body */, 0 /* String */),
|
|
366
380
|
generateParamConfigMetadata('transactionLineId', true, 2 /* Body */, 0 /* String */),
|
|
367
|
-
generateParamConfigMetadata('trialTerm',
|
|
368
|
-
generateParamConfigMetadata('trialTermUnit',
|
|
381
|
+
generateParamConfigMetadata('trialTerm', false, 2 /* Body */, 3 /* Integer */),
|
|
382
|
+
generateParamConfigMetadata('trialTermUnit', false, 2 /* Body */, 0 /* String */),
|
|
369
383
|
];
|
|
370
384
|
const createRampDeal_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, createRampDeal_ConfigPropertyMetadata);
|
|
371
385
|
const createResourceParams$3 = /*#__PURE__*/ createResourceParams$4(createRampDeal_ConfigPropertyMetadata);
|
|
@@ -637,7 +651,7 @@ function select(luvio, params) {
|
|
|
637
651
|
}
|
|
638
652
|
function keyBuilder$1(luvio, params) {
|
|
639
653
|
return keyBuilder$2(luvio, {
|
|
640
|
-
|
|
654
|
+
correlationId: params.urlParams.resourceId
|
|
641
655
|
});
|
|
642
656
|
}
|
|
643
657
|
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
@@ -690,7 +704,7 @@ function createResourceRequestFromRepresentation(representation) {
|
|
|
690
704
|
urlParams: {},
|
|
691
705
|
queryParams: {},
|
|
692
706
|
};
|
|
693
|
-
config.urlParams.resourceId = representation.
|
|
707
|
+
config.urlParams.resourceId = representation.correlationId;
|
|
694
708
|
return createResourceRequest(config);
|
|
695
709
|
}
|
|
696
710
|
|
|
@@ -859,4 +873,4 @@ withDefaultLuvio((luvio) => {
|
|
|
859
873
|
});
|
|
860
874
|
|
|
861
875
|
export { createRampDeal, deleteRampDeal, updateRampDeal, viewRampDeal, viewRampDealNotifyChange, viewRampDeal_imperative };
|
|
862
|
-
// version: 1.
|
|
876
|
+
// version: 1.306.0-c047984840
|
package/src/raml/api.raml
CHANGED
|
@@ -73,6 +73,7 @@ types:
|
|
|
73
73
|
trialTerm:
|
|
74
74
|
description: Trial term period
|
|
75
75
|
type: integer
|
|
76
|
+
required: false
|
|
76
77
|
trialTermUnit:
|
|
77
78
|
description: 'Trial term unit : Days'
|
|
78
79
|
type: string
|
|
@@ -80,6 +81,7 @@ types:
|
|
|
80
81
|
- Annual
|
|
81
82
|
- Days
|
|
82
83
|
- Months
|
|
84
|
+
required: false
|
|
83
85
|
DeleteRampDealInputRepresentation:
|
|
84
86
|
description: Delete ramp deal connect API input representation
|
|
85
87
|
type: object
|
|
@@ -113,6 +115,9 @@ types:
|
|
|
113
115
|
description: Price Ramp APIs output representation
|
|
114
116
|
type: object
|
|
115
117
|
properties:
|
|
118
|
+
correlationId:
|
|
119
|
+
description: Resource Id to correlate the API request with the response.
|
|
120
|
+
type: string
|
|
116
121
|
errors:
|
|
117
122
|
description: List of errors encountered during the API processing.
|
|
118
123
|
type: array
|
package/src/raml/luvio.raml
CHANGED
|
@@ -10,7 +10,7 @@ types:
|
|
|
10
10
|
RampDealServiceOutputRepresentation:
|
|
11
11
|
(luvio.ttl): 1000
|
|
12
12
|
(luvio.key):
|
|
13
|
-
|
|
13
|
+
correlationId: correlationId
|
|
14
14
|
|
|
15
15
|
/connect/revenue-management/sales-transaction-contexts/{resourceId}/actions:
|
|
16
16
|
/ramp-deal-create:
|
|
@@ -30,4 +30,4 @@ types:
|
|
|
30
30
|
(luvio.adapter):
|
|
31
31
|
name: viewRampDeal
|
|
32
32
|
(luvio.key):
|
|
33
|
-
|
|
33
|
+
correlationId: urlParams.resourceId
|