@salesforce/lds-adapters-industries-cpq 1.284.0 → 1.286.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.
@@ -6861,8 +6861,8 @@ const configureAdapterFactory = (luvio) => {
6861
6861
  };
6862
6862
  };
6863
6863
 
6864
- const TTL = 60000;
6865
- const VERSION = "1b6e8c43e2eaa07857f36e97a84314b7";
6864
+ const TTL = 1000;
6865
+ const VERSION = "8e3c9e65f1fddd951abbd11521a4b723";
6866
6866
  function validate(obj, path = 'ConfiguratorRuleOutputRepresentation') {
6867
6867
  const v_error = (() => {
6868
6868
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -6882,49 +6882,49 @@ function validate(obj, path = 'ConfiguratorRuleOutputRepresentation') {
6882
6882
  }
6883
6883
  }
6884
6884
  }
6885
- const obj_productConfigurationRuleId = obj.productConfigurationRuleId;
6886
- const path_productConfigurationRuleId = path + '.productConfigurationRuleId';
6887
- let obj_productConfigurationRuleId_union0 = null;
6888
- const obj_productConfigurationRuleId_union0_error = (() => {
6889
- if (typeof obj_productConfigurationRuleId !== 'string') {
6890
- return new TypeError('Expected "string" but received "' + typeof obj_productConfigurationRuleId + '" (at "' + path_productConfigurationRuleId + '")');
6885
+ if (obj.productConfigurationRuleId !== undefined) {
6886
+ const obj_productConfigurationRuleId = obj.productConfigurationRuleId;
6887
+ const path_productConfigurationRuleId = path + '.productConfigurationRuleId';
6888
+ let obj_productConfigurationRuleId_union0 = null;
6889
+ const obj_productConfigurationRuleId_union0_error = (() => {
6890
+ if (typeof obj_productConfigurationRuleId !== 'string') {
6891
+ return new TypeError('Expected "string" but received "' + typeof obj_productConfigurationRuleId + '" (at "' + path_productConfigurationRuleId + '")');
6892
+ }
6893
+ })();
6894
+ if (obj_productConfigurationRuleId_union0_error != null) {
6895
+ obj_productConfigurationRuleId_union0 = obj_productConfigurationRuleId_union0_error.message;
6891
6896
  }
6892
- })();
6893
- if (obj_productConfigurationRuleId_union0_error != null) {
6894
- obj_productConfigurationRuleId_union0 = obj_productConfigurationRuleId_union0_error.message;
6895
- }
6896
- let obj_productConfigurationRuleId_union1 = null;
6897
- const obj_productConfigurationRuleId_union1_error = (() => {
6898
- if (obj_productConfigurationRuleId !== null) {
6899
- return new TypeError('Expected "null" but received "' + typeof obj_productConfigurationRuleId + '" (at "' + path_productConfigurationRuleId + '")');
6897
+ let obj_productConfigurationRuleId_union1 = null;
6898
+ const obj_productConfigurationRuleId_union1_error = (() => {
6899
+ if (obj_productConfigurationRuleId !== null) {
6900
+ return new TypeError('Expected "null" but received "' + typeof obj_productConfigurationRuleId + '" (at "' + path_productConfigurationRuleId + '")');
6901
+ }
6902
+ })();
6903
+ if (obj_productConfigurationRuleId_union1_error != null) {
6904
+ obj_productConfigurationRuleId_union1 = obj_productConfigurationRuleId_union1_error.message;
6900
6905
  }
6901
- })();
6902
- if (obj_productConfigurationRuleId_union1_error != null) {
6903
- obj_productConfigurationRuleId_union1 = obj_productConfigurationRuleId_union1_error.message;
6904
- }
6905
- if (obj_productConfigurationRuleId_union0 && obj_productConfigurationRuleId_union1) {
6906
- let message = 'Object doesn\'t match union (at "' + path_productConfigurationRuleId + '")';
6907
- message += '\n' + obj_productConfigurationRuleId_union0.split('\n').map((line) => '\t' + line).join('\n');
6908
- message += '\n' + obj_productConfigurationRuleId_union1.split('\n').map((line) => '\t' + line).join('\n');
6909
- return new TypeError(message);
6910
- }
6911
- if (obj.success !== undefined) {
6912
- const obj_success = obj.success;
6913
- const path_success = path + '.success';
6914
- if (typeof obj_success !== 'boolean') {
6915
- return new TypeError('Expected "boolean" but received "' + typeof obj_success + '" (at "' + path_success + '")');
6906
+ if (obj_productConfigurationRuleId_union0 && obj_productConfigurationRuleId_union1) {
6907
+ let message = 'Object doesn\'t match union (at "' + path_productConfigurationRuleId + '")';
6908
+ message += '\n' + obj_productConfigurationRuleId_union0.split('\n').map((line) => '\t' + line).join('\n');
6909
+ message += '\n' + obj_productConfigurationRuleId_union1.split('\n').map((line) => '\t' + line).join('\n');
6910
+ return new TypeError(message);
6916
6911
  }
6917
6912
  }
6913
+ const obj_success = obj.success;
6914
+ const path_success = path + '.success';
6915
+ if (typeof obj_success !== 'boolean') {
6916
+ return new TypeError('Expected "boolean" but received "' + typeof obj_success + '" (at "' + path_success + '")');
6917
+ }
6918
6918
  })();
6919
6919
  return v_error === undefined ? null : v_error;
6920
6920
  }
6921
6921
  const RepresentationType = 'ConfiguratorRuleOutputRepresentation';
6922
6922
  function keyBuilder(luvio, config) {
6923
- return keyPrefix + '::' + RepresentationType + ':' + (config.productConfigurationRuleId === null ? '' : config.productConfigurationRuleId);
6923
+ return keyPrefix + '::' + RepresentationType + ':' + config.success;
6924
6924
  }
6925
6925
  function keyBuilderFromType(luvio, object) {
6926
6926
  const keyParams = {
6927
- productConfigurationRuleId: object.productConfigurationRuleId
6927
+ success: object.success
6928
6928
  };
6929
6929
  return keyBuilder(luvio, keyParams);
6930
6930
  }
@@ -1,10 +1,10 @@
1
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 = 60000;
3
- export declare const VERSION = "1b6e8c43e2eaa07857f36e97a84314b7";
2
+ export declare const TTL = 1000;
3
+ export declare const VERSION = "8e3c9e65f1fddd951abbd11521a4b723";
4
4
  export declare function validate(obj: any, path?: string): TypeError | null;
5
5
  export declare const RepresentationType: string;
6
6
  export interface KeyParams extends $64$luvio_engine_KeyMetadata {
7
- productConfigurationRuleId: string | null;
7
+ success: boolean;
8
8
  }
9
9
  export type ConfiguratorRuleOutputRepresentationNormalizedKeyMetadata = KeyParams & $64$luvio_engine_NormalizedKeyMetadata;
10
10
  export type PartialConfiguratorRuleOutputRepresentationNormalizedKeyMetadata = Partial<KeyParams> & $64$luvio_engine_NormalizedKeyMetadata;
@@ -21,24 +21,24 @@ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableSto
21
21
  * Output Representation for Config Rules
22
22
  *
23
23
  * Keys:
24
- * productConfigurationRuleId (string | null): productConfigurationRuleId
24
+ * success (boolean): success
25
25
  */
26
26
  export interface ConfiguratorRuleOutputRepresentationNormalized {
27
27
  /** List of Errors */
28
28
  errors?: Array<{}>;
29
29
  /** Product Configuration Rule entity id */
30
- productConfigurationRuleId: string | null;
30
+ productConfigurationRuleId?: string | null;
31
31
  /** Rule creation Success / Failure */
32
- success?: boolean;
32
+ success: boolean;
33
33
  }
34
34
  /**
35
35
  * Output Representation for Config Rules
36
36
  *
37
37
  * Keys:
38
- * productConfigurationRuleId (string | null): productConfigurationRuleId
38
+ * success (boolean): success
39
39
  */
40
40
  export interface ConfiguratorRuleOutputRepresentation {
41
41
  errors?: Array<{}>;
42
- productConfigurationRuleId: string | null;
43
- success?: boolean;
42
+ productConfigurationRuleId?: string | null;
43
+ success: boolean;
44
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-industries-cpq",
3
- "version": "1.284.0",
3
+ "version": "1.286.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "APIs for Industries CPQ Project",
6
6
  "main": "dist/es/es2018/industries-cpq.js",
@@ -44,11 +44,11 @@
44
44
  "test:unit:debug": "node --inspect-brk ../../node_modules/jest/bin/jest.js --config ./jest.config.js --runInBand"
45
45
  },
46
46
  "dependencies": {
47
- "@salesforce/lds-bindings": "^1.284.0"
47
+ "@salesforce/lds-bindings": "^1.286.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@salesforce/lds-compiler-plugins": "^1.284.0",
51
- "@salesforce/lds-karma": "^1.284.0"
50
+ "@salesforce/lds-compiler-plugins": "^1.286.0",
51
+ "@salesforce/lds-karma": "^1.286.0"
52
52
  },
53
53
  "nx": {
54
54
  "targets": {
package/sfdc/index.js CHANGED
@@ -3183,8 +3183,8 @@ const createCartItemsAdapterFactory = (luvio) => {
3183
3183
  };
3184
3184
  };
3185
3185
 
3186
- const TTL$3 = 60000;
3187
- const VERSION$b = "1b6e8c43e2eaa07857f36e97a84314b7";
3186
+ const TTL$3 = 1000;
3187
+ const VERSION$b = "8e3c9e65f1fddd951abbd11521a4b723";
3188
3188
  function validate$k(obj, path = 'ConfiguratorRuleOutputRepresentation') {
3189
3189
  const v_error = (() => {
3190
3190
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -3204,49 +3204,49 @@ function validate$k(obj, path = 'ConfiguratorRuleOutputRepresentation') {
3204
3204
  }
3205
3205
  }
3206
3206
  }
3207
- const obj_productConfigurationRuleId = obj.productConfigurationRuleId;
3208
- const path_productConfigurationRuleId = path + '.productConfigurationRuleId';
3209
- let obj_productConfigurationRuleId_union0 = null;
3210
- const obj_productConfigurationRuleId_union0_error = (() => {
3211
- if (typeof obj_productConfigurationRuleId !== 'string') {
3212
- return new TypeError('Expected "string" but received "' + typeof obj_productConfigurationRuleId + '" (at "' + path_productConfigurationRuleId + '")');
3207
+ if (obj.productConfigurationRuleId !== undefined) {
3208
+ const obj_productConfigurationRuleId = obj.productConfigurationRuleId;
3209
+ const path_productConfigurationRuleId = path + '.productConfigurationRuleId';
3210
+ let obj_productConfigurationRuleId_union0 = null;
3211
+ const obj_productConfigurationRuleId_union0_error = (() => {
3212
+ if (typeof obj_productConfigurationRuleId !== 'string') {
3213
+ return new TypeError('Expected "string" but received "' + typeof obj_productConfigurationRuleId + '" (at "' + path_productConfigurationRuleId + '")');
3214
+ }
3215
+ })();
3216
+ if (obj_productConfigurationRuleId_union0_error != null) {
3217
+ obj_productConfigurationRuleId_union0 = obj_productConfigurationRuleId_union0_error.message;
3213
3218
  }
3214
- })();
3215
- if (obj_productConfigurationRuleId_union0_error != null) {
3216
- obj_productConfigurationRuleId_union0 = obj_productConfigurationRuleId_union0_error.message;
3217
- }
3218
- let obj_productConfigurationRuleId_union1 = null;
3219
- const obj_productConfigurationRuleId_union1_error = (() => {
3220
- if (obj_productConfigurationRuleId !== null) {
3221
- return new TypeError('Expected "null" but received "' + typeof obj_productConfigurationRuleId + '" (at "' + path_productConfigurationRuleId + '")');
3219
+ let obj_productConfigurationRuleId_union1 = null;
3220
+ const obj_productConfigurationRuleId_union1_error = (() => {
3221
+ if (obj_productConfigurationRuleId !== null) {
3222
+ return new TypeError('Expected "null" but received "' + typeof obj_productConfigurationRuleId + '" (at "' + path_productConfigurationRuleId + '")');
3223
+ }
3224
+ })();
3225
+ if (obj_productConfigurationRuleId_union1_error != null) {
3226
+ obj_productConfigurationRuleId_union1 = obj_productConfigurationRuleId_union1_error.message;
3222
3227
  }
3223
- })();
3224
- if (obj_productConfigurationRuleId_union1_error != null) {
3225
- obj_productConfigurationRuleId_union1 = obj_productConfigurationRuleId_union1_error.message;
3226
- }
3227
- if (obj_productConfigurationRuleId_union0 && obj_productConfigurationRuleId_union1) {
3228
- let message = 'Object doesn\'t match union (at "' + path_productConfigurationRuleId + '")';
3229
- message += '\n' + obj_productConfigurationRuleId_union0.split('\n').map((line) => '\t' + line).join('\n');
3230
- message += '\n' + obj_productConfigurationRuleId_union1.split('\n').map((line) => '\t' + line).join('\n');
3231
- return new TypeError(message);
3232
- }
3233
- if (obj.success !== undefined) {
3234
- const obj_success = obj.success;
3235
- const path_success = path + '.success';
3236
- if (typeof obj_success !== 'boolean') {
3237
- return new TypeError('Expected "boolean" but received "' + typeof obj_success + '" (at "' + path_success + '")');
3228
+ if (obj_productConfigurationRuleId_union0 && obj_productConfigurationRuleId_union1) {
3229
+ let message = 'Object doesn\'t match union (at "' + path_productConfigurationRuleId + '")';
3230
+ message += '\n' + obj_productConfigurationRuleId_union0.split('\n').map((line) => '\t' + line).join('\n');
3231
+ message += '\n' + obj_productConfigurationRuleId_union1.split('\n').map((line) => '\t' + line).join('\n');
3232
+ return new TypeError(message);
3238
3233
  }
3239
3234
  }
3235
+ const obj_success = obj.success;
3236
+ const path_success = path + '.success';
3237
+ if (typeof obj_success !== 'boolean') {
3238
+ return new TypeError('Expected "boolean" but received "' + typeof obj_success + '" (at "' + path_success + '")');
3239
+ }
3240
3240
  })();
3241
3241
  return v_error === undefined ? null : v_error;
3242
3242
  }
3243
3243
  const RepresentationType$4 = 'ConfiguratorRuleOutputRepresentation';
3244
3244
  function keyBuilder$5(luvio, config) {
3245
- return keyPrefix + '::' + RepresentationType$4 + ':' + (config.productConfigurationRuleId === null ? '' : config.productConfigurationRuleId);
3245
+ return keyPrefix + '::' + RepresentationType$4 + ':' + config.success;
3246
3246
  }
3247
3247
  function keyBuilderFromType$3(luvio, object) {
3248
3248
  const keyParams = {
3249
- productConfigurationRuleId: object.productConfigurationRuleId
3249
+ success: object.success
3250
3250
  };
3251
3251
  return keyBuilder$5(luvio, keyParams);
3252
3252
  }
@@ -7331,4 +7331,4 @@ withDefaultLuvio((luvio) => {
7331
7331
  });
7332
7332
 
7333
7333
  export { bulkProductDetails, categoryDetails, categoryList, configure, createCart, createCartItems, createRule, getCart, getCart_imperative, preview, priceCart, productDetails, productList, searchProductList, updateCart, updateCartItems, updateRule };
7334
- // version: 1.284.0-8b78b708e
7334
+ // version: 1.286.0-27bef7c46
package/src/raml/api.raml CHANGED
@@ -1152,10 +1152,10 @@ types:
1152
1152
  productConfigurationRuleId:
1153
1153
  description: Product Configuration Rule entity id
1154
1154
  type: string | nil # TODO Hand-Rolled due to issue #1 in Generated RAML Gaps (https://salesforce.quip.com/NxVhAkxL6RTW#dGQACAMmFgP)
1155
+ required: false # TODO hand rolled. W-9275477
1155
1156
  success:
1156
1157
  description: Rule creation Success / Failure
1157
1158
  type: boolean
1158
- required: false # TODO hand rolled. W-9275477
1159
1159
  ConfiguratorUpdatedNodeInputRepresentation:
1160
1160
  description: Input Representation for Updated Nodes to the Configurator
1161
1161
  type: object
@@ -54,10 +54,10 @@ types:
54
54
  (luvio.key):
55
55
  message: apiStatus.statusCode
56
56
  ConfiguratorRuleOutputRepresentation:
57
- (luvio.ttl): 60000
57
+ (luvio.ttl): 1000
58
58
  (luvio.opaque): true
59
59
  (luvio.key):
60
- productConfigurationRuleId: productConfigurationRuleId
60
+ success: success
61
61
  /connect/cpq:
62
62
  /preview:
63
63
  post: