@salesforce/lds-adapters-cdp-personalization-service 1.335.0 → 1.337.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.
@@ -4298,16 +4298,18 @@ function equals$3(existing, incoming) {
4298
4298
  }
4299
4299
 
4300
4300
  const TTL$1 = 600;
4301
- const VERSION$2 = "c49a0f58a0e5e27bc65c198f7a6acf1c";
4301
+ const VERSION$2 = "2fab2250d4ed5adcbb1a5c19a64cd765";
4302
4302
  function validate$2(obj, path = 'PersonalizationRecommenderJobCollectionRepresentation') {
4303
4303
  const v_error = (() => {
4304
4304
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
4305
4305
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
4306
4306
  }
4307
- const obj_currentPageUrl = obj.currentPageUrl;
4308
- const path_currentPageUrl = path + '.currentPageUrl';
4309
- if (typeof obj_currentPageUrl !== 'string') {
4310
- return new TypeError('Expected "string" but received "' + typeof obj_currentPageUrl + '" (at "' + path_currentPageUrl + '")');
4307
+ if (obj.currentPageUrl !== undefined) {
4308
+ const obj_currentPageUrl = obj.currentPageUrl;
4309
+ const path_currentPageUrl = path + '.currentPageUrl';
4310
+ if (typeof obj_currentPageUrl !== 'string') {
4311
+ return new TypeError('Expected "string" but received "' + typeof obj_currentPageUrl + '" (at "' + path_currentPageUrl + '")');
4312
+ }
4311
4313
  }
4312
4314
  if (obj.jobs !== undefined) {
4313
4315
  const obj_jobs = obj.jobs;
@@ -4326,10 +4328,12 @@ function validate$2(obj, path = 'PersonalizationRecommenderJobCollectionRepresen
4326
4328
  }
4327
4329
  }
4328
4330
  }
4329
- const obj_nextPageUrl = obj.nextPageUrl;
4330
- const path_nextPageUrl = path + '.nextPageUrl';
4331
- if (typeof obj_nextPageUrl !== 'string') {
4332
- return new TypeError('Expected "string" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
4331
+ if (obj.nextPageUrl !== undefined) {
4332
+ const obj_nextPageUrl = obj.nextPageUrl;
4333
+ const path_nextPageUrl = path + '.nextPageUrl';
4334
+ if (typeof obj_nextPageUrl !== 'string') {
4335
+ return new TypeError('Expected "string" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
4336
+ }
4333
4337
  }
4334
4338
  })();
4335
4339
  return v_error === undefined ? null : v_error;
@@ -4347,7 +4351,8 @@ const select$4 = function PersonalizationRecommenderJobCollectionRepresentationS
4347
4351
  selections: [
4348
4352
  {
4349
4353
  name: 'currentPageUrl',
4350
- kind: 'Scalar'
4354
+ kind: 'Scalar',
4355
+ required: false
4351
4356
  },
4352
4357
  {
4353
4358
  name: 'jobs',
@@ -4358,7 +4363,8 @@ const select$4 = function PersonalizationRecommenderJobCollectionRepresentationS
4358
4363
  },
4359
4364
  {
4360
4365
  name: 'nextPageUrl',
4361
- kind: 'Scalar'
4366
+ kind: 'Scalar',
4367
+ required: false
4362
4368
  }
4363
4369
  ]
4364
4370
  };
@@ -4366,13 +4372,29 @@ const select$4 = function PersonalizationRecommenderJobCollectionRepresentationS
4366
4372
  function equals$2(existing, incoming) {
4367
4373
  const existing_currentPageUrl = existing.currentPageUrl;
4368
4374
  const incoming_currentPageUrl = incoming.currentPageUrl;
4369
- if (!(existing_currentPageUrl === incoming_currentPageUrl)) {
4370
- return false;
4375
+ // if at least one of these optionals is defined
4376
+ if (existing_currentPageUrl !== undefined || incoming_currentPageUrl !== undefined) {
4377
+ // if one of these is not defined we know the other is defined and therefore
4378
+ // not equal
4379
+ if (existing_currentPageUrl === undefined || incoming_currentPageUrl === undefined) {
4380
+ return false;
4381
+ }
4382
+ if (!(existing_currentPageUrl === incoming_currentPageUrl)) {
4383
+ return false;
4384
+ }
4371
4385
  }
4372
4386
  const existing_nextPageUrl = existing.nextPageUrl;
4373
4387
  const incoming_nextPageUrl = incoming.nextPageUrl;
4374
- if (!(existing_nextPageUrl === incoming_nextPageUrl)) {
4375
- return false;
4388
+ // if at least one of these optionals is defined
4389
+ if (existing_nextPageUrl !== undefined || incoming_nextPageUrl !== undefined) {
4390
+ // if one of these is not defined we know the other is defined and therefore
4391
+ // not equal
4392
+ if (existing_nextPageUrl === undefined || incoming_nextPageUrl === undefined) {
4393
+ return false;
4394
+ }
4395
+ if (!(existing_nextPageUrl === incoming_nextPageUrl)) {
4396
+ return false;
4397
+ }
4376
4398
  }
4377
4399
  const existing_jobs = existing.jobs;
4378
4400
  const incoming_jobs = incoming.jobs;
@@ -1,7 +1,7 @@
1
1
  import { PersonalizationRecommenderJobRepresentation as PersonalizationRecommenderJobRepresentation_PersonalizationRecommenderJobRepresentation } from './PersonalizationRecommenderJobRepresentation';
2
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
3
  export declare const TTL = 600;
4
- export declare const VERSION = "c49a0f58a0e5e27bc65c198f7a6acf1c";
4
+ export declare const VERSION = "2fab2250d4ed5adcbb1a5c19a64cd765";
5
5
  export declare function validate(obj: any, path?: string): TypeError | null;
6
6
  export declare const RepresentationType: string;
7
7
  export declare function normalize(input: PersonalizationRecommenderJobCollectionRepresentation, existing: PersonalizationRecommenderJobCollectionRepresentationNormalized, path: $64$luvio_engine_IngestPath, luvio: $64$luvio_engine_Luvio, store: $64$luvio_engine_Store, timestamp: number): PersonalizationRecommenderJobCollectionRepresentationNormalized;
@@ -17,11 +17,11 @@ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableSto
17
17
  */
18
18
  export interface PersonalizationRecommenderJobCollectionRepresentationNormalized {
19
19
  /** Url of the current page */
20
- currentPageUrl: string;
20
+ currentPageUrl?: string;
21
21
  /** List of training job results */
22
22
  jobs?: Array<PersonalizationRecommenderJobRepresentation_PersonalizationRecommenderJobRepresentation>;
23
23
  /** Url of the next page */
24
- nextPageUrl: string;
24
+ nextPageUrl?: string;
25
25
  }
26
26
  /**
27
27
  * Personalization Recommender Job Collection Representation
@@ -30,7 +30,7 @@ export interface PersonalizationRecommenderJobCollectionRepresentationNormalized
30
30
  * (none)
31
31
  */
32
32
  export interface PersonalizationRecommenderJobCollectionRepresentation {
33
- currentPageUrl: string;
33
+ currentPageUrl?: string;
34
34
  jobs?: Array<PersonalizationRecommenderJobRepresentation_PersonalizationRecommenderJobRepresentation>;
35
- nextPageUrl: string;
35
+ nextPageUrl?: string;
36
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-cdp-personalization-service",
3
- "version": "1.335.0",
3
+ "version": "1.337.0",
4
4
  "description": "wire adapters for personalization service connect api",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "dist/es/es2018/cdp-personalization-service.js",
@@ -42,10 +42,10 @@
42
42
  "test:unit:debug": "node --inspect-brk ../../node_modules/.bin/jest --runInBand"
43
43
  },
44
44
  "dependencies": {
45
- "@salesforce/lds-bindings": "^1.335.0"
45
+ "@salesforce/lds-bindings": "^1.337.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@salesforce/lds-compiler-plugins": "^1.335.0"
48
+ "@salesforce/lds-compiler-plugins": "^1.337.0"
49
49
  },
50
50
  "nx": {
51
51
  "targets": {
package/sfdc/index.js CHANGED
@@ -4468,16 +4468,18 @@ function equals$1(existing, incoming) {
4468
4468
  }
4469
4469
 
4470
4470
  const TTL = 600;
4471
- const VERSION = "c49a0f58a0e5e27bc65c198f7a6acf1c";
4471
+ const VERSION = "2fab2250d4ed5adcbb1a5c19a64cd765";
4472
4472
  function validate(obj, path = 'PersonalizationRecommenderJobCollectionRepresentation') {
4473
4473
  const v_error = (() => {
4474
4474
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
4475
4475
  return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
4476
4476
  }
4477
- const obj_currentPageUrl = obj.currentPageUrl;
4478
- const path_currentPageUrl = path + '.currentPageUrl';
4479
- if (typeof obj_currentPageUrl !== 'string') {
4480
- return new TypeError('Expected "string" but received "' + typeof obj_currentPageUrl + '" (at "' + path_currentPageUrl + '")');
4477
+ if (obj.currentPageUrl !== undefined) {
4478
+ const obj_currentPageUrl = obj.currentPageUrl;
4479
+ const path_currentPageUrl = path + '.currentPageUrl';
4480
+ if (typeof obj_currentPageUrl !== 'string') {
4481
+ return new TypeError('Expected "string" but received "' + typeof obj_currentPageUrl + '" (at "' + path_currentPageUrl + '")');
4482
+ }
4481
4483
  }
4482
4484
  if (obj.jobs !== undefined) {
4483
4485
  const obj_jobs = obj.jobs;
@@ -4496,10 +4498,12 @@ function validate(obj, path = 'PersonalizationRecommenderJobCollectionRepresenta
4496
4498
  }
4497
4499
  }
4498
4500
  }
4499
- const obj_nextPageUrl = obj.nextPageUrl;
4500
- const path_nextPageUrl = path + '.nextPageUrl';
4501
- if (typeof obj_nextPageUrl !== 'string') {
4502
- return new TypeError('Expected "string" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
4501
+ if (obj.nextPageUrl !== undefined) {
4502
+ const obj_nextPageUrl = obj.nextPageUrl;
4503
+ const path_nextPageUrl = path + '.nextPageUrl';
4504
+ if (typeof obj_nextPageUrl !== 'string') {
4505
+ return new TypeError('Expected "string" but received "' + typeof obj_nextPageUrl + '" (at "' + path_nextPageUrl + '")');
4506
+ }
4503
4507
  }
4504
4508
  })();
4505
4509
  return v_error === undefined ? null : v_error;
@@ -4517,7 +4521,8 @@ const select$2 = function PersonalizationRecommenderJobCollectionRepresentationS
4517
4521
  selections: [
4518
4522
  {
4519
4523
  name: 'currentPageUrl',
4520
- kind: 'Scalar'
4524
+ kind: 'Scalar',
4525
+ required: false
4521
4526
  },
4522
4527
  {
4523
4528
  name: 'jobs',
@@ -4528,7 +4533,8 @@ const select$2 = function PersonalizationRecommenderJobCollectionRepresentationS
4528
4533
  },
4529
4534
  {
4530
4535
  name: 'nextPageUrl',
4531
- kind: 'Scalar'
4536
+ kind: 'Scalar',
4537
+ required: false
4532
4538
  }
4533
4539
  ]
4534
4540
  };
@@ -4536,13 +4542,29 @@ const select$2 = function PersonalizationRecommenderJobCollectionRepresentationS
4536
4542
  function equals(existing, incoming) {
4537
4543
  const existing_currentPageUrl = existing.currentPageUrl;
4538
4544
  const incoming_currentPageUrl = incoming.currentPageUrl;
4539
- if (!(existing_currentPageUrl === incoming_currentPageUrl)) {
4540
- return false;
4545
+ // if at least one of these optionals is defined
4546
+ if (existing_currentPageUrl !== undefined || incoming_currentPageUrl !== undefined) {
4547
+ // if one of these is not defined we know the other is defined and therefore
4548
+ // not equal
4549
+ if (existing_currentPageUrl === undefined || incoming_currentPageUrl === undefined) {
4550
+ return false;
4551
+ }
4552
+ if (!(existing_currentPageUrl === incoming_currentPageUrl)) {
4553
+ return false;
4554
+ }
4541
4555
  }
4542
4556
  const existing_nextPageUrl = existing.nextPageUrl;
4543
4557
  const incoming_nextPageUrl = incoming.nextPageUrl;
4544
- if (!(existing_nextPageUrl === incoming_nextPageUrl)) {
4545
- return false;
4558
+ // if at least one of these optionals is defined
4559
+ if (existing_nextPageUrl !== undefined || incoming_nextPageUrl !== undefined) {
4560
+ // if one of these is not defined we know the other is defined and therefore
4561
+ // not equal
4562
+ if (existing_nextPageUrl === undefined || incoming_nextPageUrl === undefined) {
4563
+ return false;
4564
+ }
4565
+ if (!(existing_nextPageUrl === incoming_nextPageUrl)) {
4566
+ return false;
4567
+ }
4546
4568
  }
4547
4569
  const existing_jobs = existing.jobs;
4548
4570
  const incoming_jobs = incoming.jobs;
@@ -5004,4 +5026,4 @@ withDefaultLuvio((luvio) => {
5004
5026
  });
5005
5027
 
5006
5028
  export { createPersonalizationPoint, createPersonalizationSchema, deletePersonalizationPoint, deletePersonalizationSchema, getPersonalizationEsModelMapping, getPersonalizationEsModelMapping_imperative, getPersonalizationPoint, getPersonalizationPoint_imperative, getPersonalizationSchema, getPersonalizationSchemaNotifyChange, getPersonalizationSchema_imperative, getTrainingHistory, getTrainingHistory_imperative, updatePersonalizationPoint };
5007
- // version: 1.335.0-22a7c4d20b
5029
+ // version: 1.337.0-d4cf32d77b
package/src/raml/api.raml CHANGED
@@ -742,9 +742,11 @@ types:
742
742
  currentPageUrl:
743
743
  description: Url of the current page
744
744
  type: string
745
+ required: false
745
746
  nextPageUrl:
746
747
  description: Url of the next page
747
748
  type: string
749
+ required: false
748
750
  jobs:
749
751
  description: List of training job results
750
752
  type: array