@salesforce/lds-adapters-sales-user-working-hours 1.112.2 → 1.114.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.
@@ -221,7 +221,7 @@ function getTypeCacheKeys$1(luvio, input, fullPathFactory) {
221
221
  return rootKeySet;
222
222
  }
223
223
 
224
- const VERSION = "3188b3f71c60ae4cc806f314366a515b";
224
+ const VERSION = "31f7cd8da38f07de7f040a661d50f857";
225
225
  function validate$2(obj, path = 'SalesUserWorkingHoursResponse') {
226
226
  const v_error = (() => {
227
227
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -241,8 +241,29 @@ function validate$2(obj, path = 'SalesUserWorkingHoursResponse') {
241
241
  }
242
242
  const obj_timeZone = obj.timeZone;
243
243
  const path_timeZone = path + '.timeZone';
244
- if (typeof obj_timeZone !== 'string') {
245
- return new TypeError('Expected "string" but received "' + typeof obj_timeZone + '" (at "' + path_timeZone + '")');
244
+ let obj_timeZone_union0 = null;
245
+ const obj_timeZone_union0_error = (() => {
246
+ if (typeof obj_timeZone !== 'string') {
247
+ return new TypeError('Expected "string" but received "' + typeof obj_timeZone + '" (at "' + path_timeZone + '")');
248
+ }
249
+ })();
250
+ if (obj_timeZone_union0_error != null) {
251
+ obj_timeZone_union0 = obj_timeZone_union0_error.message;
252
+ }
253
+ let obj_timeZone_union1 = null;
254
+ const obj_timeZone_union1_error = (() => {
255
+ if (obj_timeZone !== null) {
256
+ return new TypeError('Expected "null" but received "' + typeof obj_timeZone + '" (at "' + path_timeZone + '")');
257
+ }
258
+ })();
259
+ if (obj_timeZone_union1_error != null) {
260
+ obj_timeZone_union1 = obj_timeZone_union1_error.message;
261
+ }
262
+ if (obj_timeZone_union0 && obj_timeZone_union1) {
263
+ let message = 'Object doesn\'t match union (at "' + path_timeZone + '")';
264
+ message += '\n' + obj_timeZone_union0.split('\n').map((line) => '\t' + line).join('\n');
265
+ message += '\n' + obj_timeZone_union1.split('\n').map((line) => '\t' + line).join('\n');
266
+ return new TypeError(message);
246
267
  }
247
268
  const obj_userId = obj.userId;
248
269
  const path_userId = path + '.userId';
@@ -305,11 +326,6 @@ const select$3 = function SalesUserWorkingHoursResponseSelect() {
305
326
  };
306
327
  };
307
328
  function equals(existing, incoming) {
308
- const existing_timeZone = existing.timeZone;
309
- const incoming_timeZone = incoming.timeZone;
310
- if (!(existing_timeZone === incoming_timeZone)) {
311
- return false;
312
- }
313
329
  const existing_userId = existing.userId;
314
330
  const incoming_userId = incoming.userId;
315
331
  if (!(existing_userId === incoming_userId)) {
@@ -325,6 +341,11 @@ function equals(existing, incoming) {
325
341
  if (equals_timeSlots_items === false) {
326
342
  return false;
327
343
  }
344
+ const existing_timeZone = existing.timeZone;
345
+ const incoming_timeZone = incoming.timeZone;
346
+ if (!(existing_timeZone === incoming_timeZone)) {
347
+ return false;
348
+ }
328
349
  return true;
329
350
  }
330
351
  const ingest = function SalesUserWorkingHoursResponseIngest(input, path, luvio, store, timestamp) {
@@ -1,6 +1,6 @@
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, ResourceIngest as $64$luvio_engine_ResourceIngest, FragmentSelection as $64$luvio_engine_FragmentSelection, LinkSelection as $64$luvio_engine_LinkSelection, StoreLink as $64$luvio_engine_StoreLink, DurableStoreKeyMetadataMap as $64$luvio_engine_DurableStoreKeyMetadataMap } from '@luvio/engine';
2
2
  import { TimeSlotOutputRepresentation as TimeSlotOutputRepresentation_TimeSlotOutputRepresentation } from './TimeSlotOutputRepresentation';
3
- export declare const VERSION = "3188b3f71c60ae4cc806f314366a515b";
3
+ export declare const VERSION = "31f7cd8da38f07de7f040a661d50f857";
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 {
@@ -37,7 +37,7 @@ export interface SalesUserWorkingHoursResponseNormalized {
37
37
  /** Represents the timeslots */
38
38
  timeSlots: Array<$64$luvio_engine_StoreLink>;
39
39
  /** Represents the timezone */
40
- timeZone: string;
40
+ timeZone: string | null;
41
41
  /** Represents the related userId */
42
42
  userId: string;
43
43
  }
@@ -49,6 +49,6 @@ export interface SalesUserWorkingHoursResponseNormalized {
49
49
  */
50
50
  export interface SalesUserWorkingHoursResponse {
51
51
  timeSlots: Array<TimeSlotOutputRepresentation_TimeSlotOutputRepresentation>;
52
- timeZone: string;
52
+ timeZone: string | null;
53
53
  userId: string;
54
54
  }
@@ -225,7 +225,7 @@
225
225
  return rootKeySet;
226
226
  }
227
227
 
228
- const VERSION = "3188b3f71c60ae4cc806f314366a515b";
228
+ const VERSION = "31f7cd8da38f07de7f040a661d50f857";
229
229
  function validate$2(obj, path = 'SalesUserWorkingHoursResponse') {
230
230
  const v_error = (() => {
231
231
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -245,8 +245,29 @@
245
245
  }
246
246
  const obj_timeZone = obj.timeZone;
247
247
  const path_timeZone = path + '.timeZone';
248
- if (typeof obj_timeZone !== 'string') {
249
- return new TypeError('Expected "string" but received "' + typeof obj_timeZone + '" (at "' + path_timeZone + '")');
248
+ let obj_timeZone_union0 = null;
249
+ const obj_timeZone_union0_error = (() => {
250
+ if (typeof obj_timeZone !== 'string') {
251
+ return new TypeError('Expected "string" but received "' + typeof obj_timeZone + '" (at "' + path_timeZone + '")');
252
+ }
253
+ })();
254
+ if (obj_timeZone_union0_error != null) {
255
+ obj_timeZone_union0 = obj_timeZone_union0_error.message;
256
+ }
257
+ let obj_timeZone_union1 = null;
258
+ const obj_timeZone_union1_error = (() => {
259
+ if (obj_timeZone !== null) {
260
+ return new TypeError('Expected "null" but received "' + typeof obj_timeZone + '" (at "' + path_timeZone + '")');
261
+ }
262
+ })();
263
+ if (obj_timeZone_union1_error != null) {
264
+ obj_timeZone_union1 = obj_timeZone_union1_error.message;
265
+ }
266
+ if (obj_timeZone_union0 && obj_timeZone_union1) {
267
+ let message = 'Object doesn\'t match union (at "' + path_timeZone + '")';
268
+ message += '\n' + obj_timeZone_union0.split('\n').map((line) => '\t' + line).join('\n');
269
+ message += '\n' + obj_timeZone_union1.split('\n').map((line) => '\t' + line).join('\n');
270
+ return new TypeError(message);
250
271
  }
251
272
  const obj_userId = obj.userId;
252
273
  const path_userId = path + '.userId';
@@ -309,11 +330,6 @@
309
330
  };
310
331
  };
311
332
  function equals(existing, incoming) {
312
- const existing_timeZone = existing.timeZone;
313
- const incoming_timeZone = incoming.timeZone;
314
- if (!(existing_timeZone === incoming_timeZone)) {
315
- return false;
316
- }
317
333
  const existing_userId = existing.userId;
318
334
  const incoming_userId = incoming.userId;
319
335
  if (!(existing_userId === incoming_userId)) {
@@ -329,6 +345,11 @@
329
345
  if (equals_timeSlots_items === false) {
330
346
  return false;
331
347
  }
348
+ const existing_timeZone = existing.timeZone;
349
+ const incoming_timeZone = incoming.timeZone;
350
+ if (!(existing_timeZone === incoming_timeZone)) {
351
+ return false;
352
+ }
332
353
  return true;
333
354
  }
334
355
  const ingest = function SalesUserWorkingHoursResponseIngest(input, path, luvio, store, timestamp) {
@@ -226,7 +226,7 @@
226
226
  return rootKeySet;
227
227
  }
228
228
 
229
- var VERSION = "3188b3f71c60ae4cc806f314366a515b";
229
+ var VERSION = "31f7cd8da38f07de7f040a661d50f857";
230
230
  function validate$2(obj, path) {
231
231
  if (path === void 0) { path = 'SalesUserWorkingHoursResponse'; }
232
232
  var v_error = (function () {
@@ -247,8 +247,29 @@
247
247
  }
248
248
  var obj_timeZone = obj.timeZone;
249
249
  var path_timeZone = path + '.timeZone';
250
- if (typeof obj_timeZone !== 'string') {
251
- return new TypeError('Expected "string" but received "' + typeof obj_timeZone + '" (at "' + path_timeZone + '")');
250
+ var obj_timeZone_union0 = null;
251
+ var obj_timeZone_union0_error = (function () {
252
+ if (typeof obj_timeZone !== 'string') {
253
+ return new TypeError('Expected "string" but received "' + typeof obj_timeZone + '" (at "' + path_timeZone + '")');
254
+ }
255
+ })();
256
+ if (obj_timeZone_union0_error != null) {
257
+ obj_timeZone_union0 = obj_timeZone_union0_error.message;
258
+ }
259
+ var obj_timeZone_union1 = null;
260
+ var obj_timeZone_union1_error = (function () {
261
+ if (obj_timeZone !== null) {
262
+ return new TypeError('Expected "null" but received "' + typeof obj_timeZone + '" (at "' + path_timeZone + '")');
263
+ }
264
+ })();
265
+ if (obj_timeZone_union1_error != null) {
266
+ obj_timeZone_union1 = obj_timeZone_union1_error.message;
267
+ }
268
+ if (obj_timeZone_union0 && obj_timeZone_union1) {
269
+ var message = 'Object doesn\'t match union (at "' + path_timeZone + '")';
270
+ message += '\n' + obj_timeZone_union0.split('\n').map(function (line) { return '\t' + line; }).join('\n');
271
+ message += '\n' + obj_timeZone_union1.split('\n').map(function (line) { return '\t' + line; }).join('\n');
272
+ return new TypeError(message);
252
273
  }
253
274
  var obj_userId = obj.userId;
254
275
  var path_userId = path + '.userId';
@@ -311,11 +332,6 @@
311
332
  };
312
333
  };
313
334
  function equals(existing, incoming) {
314
- var existing_timeZone = existing.timeZone;
315
- var incoming_timeZone = incoming.timeZone;
316
- if (!(existing_timeZone === incoming_timeZone)) {
317
- return false;
318
- }
319
335
  var existing_userId = existing.userId;
320
336
  var incoming_userId = incoming.userId;
321
337
  if (!(existing_userId === incoming_userId)) {
@@ -331,6 +347,11 @@
331
347
  if (equals_timeSlots_items === false) {
332
348
  return false;
333
349
  }
350
+ var existing_timeZone = existing.timeZone;
351
+ var incoming_timeZone = incoming.timeZone;
352
+ if (!(existing_timeZone === incoming_timeZone)) {
353
+ return false;
354
+ }
334
355
  return true;
335
356
  }
336
357
  var ingest = function SalesUserWorkingHoursResponseIngest(input, path, luvio, store, timestamp) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-sales-user-working-hours",
3
- "version": "1.112.2",
3
+ "version": "1.114.0",
4
4
  "description": "API family to interact with Sales User Working Hours",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "dist/umd/es2018/sales-user-working-hours.js",
@@ -44,14 +44,14 @@
44
44
  "test:compat": "karma start --single-run --compat"
45
45
  },
46
46
  "dependencies": {
47
- "@salesforce/lds-bindings": "^1.112.2"
47
+ "@salesforce/lds-bindings": "^1.114.0"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@luvio/cli": "^0.137.1",
51
51
  "@luvio/compiler": "^0.137.1",
52
52
  "@luvio/engine": "^0.137.1",
53
53
  "@luvio/lwc-luvio": "^0.137.1",
54
- "@salesforce/lds-karma": "^1.112.2"
54
+ "@salesforce/lds-karma": "^1.114.0"
55
55
  },
56
56
  "nx": {
57
57
  "targets": {
package/sfdc/index.js CHANGED
@@ -297,7 +297,7 @@ function getTypeCacheKeys$1(luvio, input, fullPathFactory) {
297
297
  return rootKeySet;
298
298
  }
299
299
 
300
- const VERSION = "3188b3f71c60ae4cc806f314366a515b";
300
+ const VERSION = "31f7cd8da38f07de7f040a661d50f857";
301
301
  function validate(obj, path = 'SalesUserWorkingHoursResponse') {
302
302
  const v_error = (() => {
303
303
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -317,8 +317,29 @@ function validate(obj, path = 'SalesUserWorkingHoursResponse') {
317
317
  }
318
318
  const obj_timeZone = obj.timeZone;
319
319
  const path_timeZone = path + '.timeZone';
320
- if (typeof obj_timeZone !== 'string') {
321
- return new TypeError('Expected "string" but received "' + typeof obj_timeZone + '" (at "' + path_timeZone + '")');
320
+ let obj_timeZone_union0 = null;
321
+ const obj_timeZone_union0_error = (() => {
322
+ if (typeof obj_timeZone !== 'string') {
323
+ return new TypeError('Expected "string" but received "' + typeof obj_timeZone + '" (at "' + path_timeZone + '")');
324
+ }
325
+ })();
326
+ if (obj_timeZone_union0_error != null) {
327
+ obj_timeZone_union0 = obj_timeZone_union0_error.message;
328
+ }
329
+ let obj_timeZone_union1 = null;
330
+ const obj_timeZone_union1_error = (() => {
331
+ if (obj_timeZone !== null) {
332
+ return new TypeError('Expected "null" but received "' + typeof obj_timeZone + '" (at "' + path_timeZone + '")');
333
+ }
334
+ })();
335
+ if (obj_timeZone_union1_error != null) {
336
+ obj_timeZone_union1 = obj_timeZone_union1_error.message;
337
+ }
338
+ if (obj_timeZone_union0 && obj_timeZone_union1) {
339
+ let message = 'Object doesn\'t match union (at "' + path_timeZone + '")';
340
+ message += '\n' + obj_timeZone_union0.split('\n').map((line) => '\t' + line).join('\n');
341
+ message += '\n' + obj_timeZone_union1.split('\n').map((line) => '\t' + line).join('\n');
342
+ return new TypeError(message);
322
343
  }
323
344
  const obj_userId = obj.userId;
324
345
  const path_userId = path + '.userId';
@@ -381,11 +402,6 @@ const select$3 = function SalesUserWorkingHoursResponseSelect() {
381
402
  };
382
403
  };
383
404
  function equals(existing, incoming) {
384
- const existing_timeZone = existing.timeZone;
385
- const incoming_timeZone = incoming.timeZone;
386
- if (!(existing_timeZone === incoming_timeZone)) {
387
- return false;
388
- }
389
405
  const existing_userId = existing.userId;
390
406
  const incoming_userId = incoming.userId;
391
407
  if (!(existing_userId === incoming_userId)) {
@@ -401,6 +417,11 @@ function equals(existing, incoming) {
401
417
  if (equals_timeSlots_items === false) {
402
418
  return false;
403
419
  }
420
+ const existing_timeZone = existing.timeZone;
421
+ const incoming_timeZone = incoming.timeZone;
422
+ if (!(existing_timeZone === incoming_timeZone)) {
423
+ return false;
424
+ }
404
425
  return true;
405
426
  }
406
427
  const ingest = function SalesUserWorkingHoursResponseIngest(input, path, luvio, store, timestamp) {
@@ -968,4 +989,4 @@ withDefaultLuvio((luvio) => {
968
989
  });
969
990
 
970
991
  export { createSalesUserWorkingHours, deleteSalesUserWorkingHours, getSalesUserWorkingHours, getSalesUserWorkingHoursNotifyChange, getSalesUserWorkingHours_imperative, updateSalesUserWorkingHours };
971
- // version: 1.112.2-9a4fdc6da
992
+ // version: 1.114.0-6cadf0e
package/src/raml/api.raml CHANGED
@@ -275,7 +275,7 @@ types:
275
275
  type: TimeSlotOutputRepresentation
276
276
  timeZone:
277
277
  description: Represents the timezone
278
- type: string
278
+ type: string | nil # Handrolled to allow null timezone.
279
279
  userId:
280
280
  description: Represents the related userId
281
281
  type: string