@salesforce/lds-adapters-service-slack 1.301.0 → 1.303.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.
@@ -836,7 +836,7 @@ function equals$c(existing, incoming) {
836
836
  return true;
837
837
  }
838
838
 
839
- const VERSION$b = "22b3dd00435d58056084c9a7acae1535";
839
+ const VERSION$b = "bb76a06cd8248e2edce70bc4fb6e4626";
840
840
  function validate$b(obj, path = 'SlackFileOutputRepresentation') {
841
841
  const v_error = (() => {
842
842
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -893,8 +893,29 @@ function validate$b(obj, path = 'SlackFileOutputRepresentation') {
893
893
  }
894
894
  const obj_size = obj.size;
895
895
  const path_size = path + '.size';
896
- if (typeof obj_size !== 'number' || (typeof obj_size === 'number' && Math.floor(obj_size) !== obj_size)) {
897
- return new TypeError('Expected "integer" but received "' + typeof obj_size + '" (at "' + path_size + '")');
896
+ let obj_size_union0 = null;
897
+ const obj_size_union0_error = (() => {
898
+ if (typeof obj_size !== 'number' || (typeof obj_size === 'number' && Math.floor(obj_size) !== obj_size)) {
899
+ return new TypeError('Expected "integer" but received "' + typeof obj_size + '" (at "' + path_size + '")');
900
+ }
901
+ })();
902
+ if (obj_size_union0_error != null) {
903
+ obj_size_union0 = obj_size_union0_error.message;
904
+ }
905
+ let obj_size_union1 = null;
906
+ const obj_size_union1_error = (() => {
907
+ if (obj_size !== null) {
908
+ return new TypeError('Expected "null" but received "' + typeof obj_size + '" (at "' + path_size + '")');
909
+ }
910
+ })();
911
+ if (obj_size_union1_error != null) {
912
+ obj_size_union1 = obj_size_union1_error.message;
913
+ }
914
+ if (obj_size_union0 && obj_size_union1) {
915
+ let message = 'Object doesn\'t match union (at "' + path_size + '")';
916
+ message += '\n' + obj_size_union0.split('\n').map((line) => '\t' + line).join('\n');
917
+ message += '\n' + obj_size_union1.split('\n').map((line) => '\t' + line).join('\n');
918
+ return new TypeError(message);
898
919
  }
899
920
  const obj_slackPermalink = obj.slackPermalink;
900
921
  const path_slackPermalink = path + '.slackPermalink';
@@ -934,20 +955,62 @@ function validate$b(obj, path = 'SlackFileOutputRepresentation') {
934
955
  }
935
956
  const obj_uniqueKey = obj.uniqueKey;
936
957
  const path_uniqueKey = path + '.uniqueKey';
937
- if (typeof obj_uniqueKey !== 'string') {
938
- return new TypeError('Expected "string" but received "' + typeof obj_uniqueKey + '" (at "' + path_uniqueKey + '")');
958
+ let obj_uniqueKey_union0 = null;
959
+ const obj_uniqueKey_union0_error = (() => {
960
+ if (typeof obj_uniqueKey !== 'string') {
961
+ return new TypeError('Expected "string" but received "' + typeof obj_uniqueKey + '" (at "' + path_uniqueKey + '")');
962
+ }
963
+ })();
964
+ if (obj_uniqueKey_union0_error != null) {
965
+ obj_uniqueKey_union0 = obj_uniqueKey_union0_error.message;
966
+ }
967
+ let obj_uniqueKey_union1 = null;
968
+ const obj_uniqueKey_union1_error = (() => {
969
+ if (obj_uniqueKey !== null) {
970
+ return new TypeError('Expected "null" but received "' + typeof obj_uniqueKey + '" (at "' + path_uniqueKey + '")');
971
+ }
972
+ })();
973
+ if (obj_uniqueKey_union1_error != null) {
974
+ obj_uniqueKey_union1 = obj_uniqueKey_union1_error.message;
975
+ }
976
+ if (obj_uniqueKey_union0 && obj_uniqueKey_union1) {
977
+ let message = 'Object doesn\'t match union (at "' + path_uniqueKey + '")';
978
+ message += '\n' + obj_uniqueKey_union0.split('\n').map((line) => '\t' + line).join('\n');
979
+ message += '\n' + obj_uniqueKey_union1.split('\n').map((line) => '\t' + line).join('\n');
980
+ return new TypeError(message);
939
981
  }
940
982
  const obj_url = obj.url;
941
983
  const path_url = path + '.url';
942
- if (typeof obj_url !== 'string') {
943
- return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
984
+ let obj_url_union0 = null;
985
+ const obj_url_union0_error = (() => {
986
+ if (typeof obj_url !== 'string') {
987
+ return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
988
+ }
989
+ })();
990
+ if (obj_url_union0_error != null) {
991
+ obj_url_union0 = obj_url_union0_error.message;
992
+ }
993
+ let obj_url_union1 = null;
994
+ const obj_url_union1_error = (() => {
995
+ if (obj_url !== null) {
996
+ return new TypeError('Expected "null" but received "' + typeof obj_url + '" (at "' + path_url + '")');
997
+ }
998
+ })();
999
+ if (obj_url_union1_error != null) {
1000
+ obj_url_union1 = obj_url_union1_error.message;
1001
+ }
1002
+ if (obj_url_union0 && obj_url_union1) {
1003
+ let message = 'Object doesn\'t match union (at "' + path_url + '")';
1004
+ message += '\n' + obj_url_union0.split('\n').map((line) => '\t' + line).join('\n');
1005
+ message += '\n' + obj_url_union1.split('\n').map((line) => '\t' + line).join('\n');
1006
+ return new TypeError(message);
944
1007
  }
945
1008
  })();
946
1009
  return v_error === undefined ? null : v_error;
947
1010
  }
948
1011
  const RepresentationType$b = 'SlackFileOutputRepresentation';
949
1012
  function keyBuilder$m(luvio, config) {
950
- return keyPrefix + '::' + RepresentationType$b + ':' + config.uniqueKey;
1013
+ return keyPrefix + '::' + RepresentationType$b + ':' + (config.uniqueKey === null ? '' : config.uniqueKey);
951
1014
  }
952
1015
  function keyBuilderFromType$5(luvio, object) {
953
1016
  const keyParams = {
@@ -1015,11 +1078,6 @@ const select$m = function SlackFileOutputRepresentationSelect() {
1015
1078
  };
1016
1079
  };
1017
1080
  function equals$b(existing, incoming) {
1018
- const existing_size = existing.size;
1019
- const incoming_size = incoming.size;
1020
- if (!(existing_size === incoming_size)) {
1021
- return false;
1022
- }
1023
1081
  const existing_filetype = existing.filetype;
1024
1082
  const incoming_filetype = incoming.filetype;
1025
1083
  if (!(existing_filetype === incoming_filetype)) {
@@ -1050,16 +1108,6 @@ function equals$b(existing, incoming) {
1050
1108
  if (!(existing_title === incoming_title)) {
1051
1109
  return false;
1052
1110
  }
1053
- const existing_uniqueKey = existing.uniqueKey;
1054
- const incoming_uniqueKey = incoming.uniqueKey;
1055
- if (!(existing_uniqueKey === incoming_uniqueKey)) {
1056
- return false;
1057
- }
1058
- const existing_url = existing.url;
1059
- const incoming_url = incoming.url;
1060
- if (!(existing_url === incoming_url)) {
1061
- return false;
1062
- }
1063
1111
  const existing_contentDocument = existing.contentDocument;
1064
1112
  const incoming_contentDocument = incoming.contentDocument;
1065
1113
  if (!(existing_contentDocument === incoming_contentDocument
@@ -1068,11 +1116,26 @@ function equals$b(existing, incoming) {
1068
1116
  equals$c(existing_contentDocument, incoming_contentDocument)))) {
1069
1117
  return false;
1070
1118
  }
1119
+ const existing_size = existing.size;
1120
+ const incoming_size = incoming.size;
1121
+ if (!(existing_size === incoming_size)) {
1122
+ return false;
1123
+ }
1071
1124
  const existing_token = existing.token;
1072
1125
  const incoming_token = incoming.token;
1073
1126
  if (!(existing_token === incoming_token)) {
1074
1127
  return false;
1075
1128
  }
1129
+ const existing_uniqueKey = existing.uniqueKey;
1130
+ const incoming_uniqueKey = incoming.uniqueKey;
1131
+ if (!(existing_uniqueKey === incoming_uniqueKey)) {
1132
+ return false;
1133
+ }
1134
+ const existing_url = existing.url;
1135
+ const incoming_url = incoming.url;
1136
+ if (!(existing_url === incoming_url)) {
1137
+ return false;
1138
+ }
1076
1139
  return true;
1077
1140
  }
1078
1141
  const ingest$a = function SlackFileOutputRepresentationIngest(input, path, luvio, store, timestamp) {
@@ -1,10 +1,10 @@
1
1
  import { ContentDocumentOutputRepresentation as ContentDocumentOutputRepresentation_ContentDocumentOutputRepresentation } from './ContentDocumentOutputRepresentation';
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
- export declare const VERSION = "22b3dd00435d58056084c9a7acae1535";
3
+ export declare const VERSION = "bb76a06cd8248e2edce70bc4fb6e4626";
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
- uniqueKey: string;
7
+ uniqueKey: string | null;
8
8
  }
9
9
  export type SlackFileOutputRepresentationNormalizedKeyMetadata = KeyParams & $64$luvio_engine_NormalizedKeyMetadata;
10
10
  export type PartialSlackFileOutputRepresentationNormalizedKeyMetadata = Partial<KeyParams> & $64$luvio_engine_NormalizedKeyMetadata;
@@ -21,7 +21,7 @@ export declare function getTypeCacheKeys(rootKeySet: $64$luvio_engine_DurableSto
21
21
  * Contains the details of files attached to the Slack Message
22
22
  *
23
23
  * Keys:
24
- * uniqueKey (string): uniqueKey
24
+ * uniqueKey (string | null): uniqueKey
25
25
  */
26
26
  export interface SlackFileOutputRepresentationNormalized {
27
27
  /** Content Document data */
@@ -35,7 +35,7 @@ export interface SlackFileOutputRepresentationNormalized {
35
35
  /** Name of the File */
36
36
  name: string;
37
37
  /** Size of the File */
38
- size: number;
38
+ size: number | null;
39
39
  /** Slack Permalink for the File */
40
40
  slackPermalink: string;
41
41
  /** Title of the File */
@@ -43,15 +43,15 @@ export interface SlackFileOutputRepresentationNormalized {
43
43
  /** Token used for the File */
44
44
  token: string | null;
45
45
  /** Unique Key for the File */
46
- uniqueKey: string;
46
+ uniqueKey: string | null;
47
47
  /** Slack web URL for the File */
48
- url: string;
48
+ url: string | null;
49
49
  }
50
50
  /**
51
51
  * Contains the details of files attached to the Slack Message
52
52
  *
53
53
  * Keys:
54
- * uniqueKey (string): uniqueKey
54
+ * uniqueKey (string | null): uniqueKey
55
55
  */
56
56
  export interface SlackFileOutputRepresentation {
57
57
  contentDocument: ContentDocumentOutputRepresentation_ContentDocumentOutputRepresentation | null;
@@ -59,10 +59,10 @@ export interface SlackFileOutputRepresentation {
59
59
  id: string;
60
60
  mimetype: string;
61
61
  name: string;
62
- size: number;
62
+ size: number | null;
63
63
  slackPermalink: string;
64
64
  title: string;
65
65
  token: string | null;
66
- uniqueKey: string;
67
- url: string;
66
+ uniqueKey: string | null;
67
+ url: string | null;
68
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-service-slack",
3
- "version": "1.301.0",
3
+ "version": "1.303.0",
4
4
  "description": "APIs to connect with Slack Conversation",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "dist/es/es2018/service-slack.js",
@@ -40,10 +40,10 @@
40
40
  "test:unit": "jest"
41
41
  },
42
42
  "dependencies": {
43
- "@salesforce/lds-bindings": "^1.301.0"
43
+ "@salesforce/lds-bindings": "^1.303.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@salesforce/lds-compiler-plugins": "^1.301.0"
46
+ "@salesforce/lds-compiler-plugins": "^1.303.0"
47
47
  },
48
48
  "nx": {
49
49
  "targets": {
package/sfdc/index.js CHANGED
@@ -430,7 +430,7 @@ function equals$e(existing, incoming) {
430
430
  return true;
431
431
  }
432
432
 
433
- const VERSION$d = "22b3dd00435d58056084c9a7acae1535";
433
+ const VERSION$d = "bb76a06cd8248e2edce70bc4fb6e4626";
434
434
  function validate$d(obj, path = 'SlackFileOutputRepresentation') {
435
435
  const v_error = (() => {
436
436
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -487,8 +487,29 @@ function validate$d(obj, path = 'SlackFileOutputRepresentation') {
487
487
  }
488
488
  const obj_size = obj.size;
489
489
  const path_size = path + '.size';
490
- if (typeof obj_size !== 'number' || (typeof obj_size === 'number' && Math.floor(obj_size) !== obj_size)) {
491
- return new TypeError('Expected "integer" but received "' + typeof obj_size + '" (at "' + path_size + '")');
490
+ let obj_size_union0 = null;
491
+ const obj_size_union0_error = (() => {
492
+ if (typeof obj_size !== 'number' || (typeof obj_size === 'number' && Math.floor(obj_size) !== obj_size)) {
493
+ return new TypeError('Expected "integer" but received "' + typeof obj_size + '" (at "' + path_size + '")');
494
+ }
495
+ })();
496
+ if (obj_size_union0_error != null) {
497
+ obj_size_union0 = obj_size_union0_error.message;
498
+ }
499
+ let obj_size_union1 = null;
500
+ const obj_size_union1_error = (() => {
501
+ if (obj_size !== null) {
502
+ return new TypeError('Expected "null" but received "' + typeof obj_size + '" (at "' + path_size + '")');
503
+ }
504
+ })();
505
+ if (obj_size_union1_error != null) {
506
+ obj_size_union1 = obj_size_union1_error.message;
507
+ }
508
+ if (obj_size_union0 && obj_size_union1) {
509
+ let message = 'Object doesn\'t match union (at "' + path_size + '")';
510
+ message += '\n' + obj_size_union0.split('\n').map((line) => '\t' + line).join('\n');
511
+ message += '\n' + obj_size_union1.split('\n').map((line) => '\t' + line).join('\n');
512
+ return new TypeError(message);
492
513
  }
493
514
  const obj_slackPermalink = obj.slackPermalink;
494
515
  const path_slackPermalink = path + '.slackPermalink';
@@ -528,20 +549,62 @@ function validate$d(obj, path = 'SlackFileOutputRepresentation') {
528
549
  }
529
550
  const obj_uniqueKey = obj.uniqueKey;
530
551
  const path_uniqueKey = path + '.uniqueKey';
531
- if (typeof obj_uniqueKey !== 'string') {
532
- return new TypeError('Expected "string" but received "' + typeof obj_uniqueKey + '" (at "' + path_uniqueKey + '")');
552
+ let obj_uniqueKey_union0 = null;
553
+ const obj_uniqueKey_union0_error = (() => {
554
+ if (typeof obj_uniqueKey !== 'string') {
555
+ return new TypeError('Expected "string" but received "' + typeof obj_uniqueKey + '" (at "' + path_uniqueKey + '")');
556
+ }
557
+ })();
558
+ if (obj_uniqueKey_union0_error != null) {
559
+ obj_uniqueKey_union0 = obj_uniqueKey_union0_error.message;
560
+ }
561
+ let obj_uniqueKey_union1 = null;
562
+ const obj_uniqueKey_union1_error = (() => {
563
+ if (obj_uniqueKey !== null) {
564
+ return new TypeError('Expected "null" but received "' + typeof obj_uniqueKey + '" (at "' + path_uniqueKey + '")');
565
+ }
566
+ })();
567
+ if (obj_uniqueKey_union1_error != null) {
568
+ obj_uniqueKey_union1 = obj_uniqueKey_union1_error.message;
569
+ }
570
+ if (obj_uniqueKey_union0 && obj_uniqueKey_union1) {
571
+ let message = 'Object doesn\'t match union (at "' + path_uniqueKey + '")';
572
+ message += '\n' + obj_uniqueKey_union0.split('\n').map((line) => '\t' + line).join('\n');
573
+ message += '\n' + obj_uniqueKey_union1.split('\n').map((line) => '\t' + line).join('\n');
574
+ return new TypeError(message);
533
575
  }
534
576
  const obj_url = obj.url;
535
577
  const path_url = path + '.url';
536
- if (typeof obj_url !== 'string') {
537
- return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
578
+ let obj_url_union0 = null;
579
+ const obj_url_union0_error = (() => {
580
+ if (typeof obj_url !== 'string') {
581
+ return new TypeError('Expected "string" but received "' + typeof obj_url + '" (at "' + path_url + '")');
582
+ }
583
+ })();
584
+ if (obj_url_union0_error != null) {
585
+ obj_url_union0 = obj_url_union0_error.message;
586
+ }
587
+ let obj_url_union1 = null;
588
+ const obj_url_union1_error = (() => {
589
+ if (obj_url !== null) {
590
+ return new TypeError('Expected "null" but received "' + typeof obj_url + '" (at "' + path_url + '")');
591
+ }
592
+ })();
593
+ if (obj_url_union1_error != null) {
594
+ obj_url_union1 = obj_url_union1_error.message;
595
+ }
596
+ if (obj_url_union0 && obj_url_union1) {
597
+ let message = 'Object doesn\'t match union (at "' + path_url + '")';
598
+ message += '\n' + obj_url_union0.split('\n').map((line) => '\t' + line).join('\n');
599
+ message += '\n' + obj_url_union1.split('\n').map((line) => '\t' + line).join('\n');
600
+ return new TypeError(message);
538
601
  }
539
602
  })();
540
603
  return v_error === undefined ? null : v_error;
541
604
  }
542
605
  const RepresentationType$d = 'SlackFileOutputRepresentation';
543
606
  function keyBuilder$q(luvio, config) {
544
- return keyPrefix + '::' + RepresentationType$d + ':' + config.uniqueKey;
607
+ return keyPrefix + '::' + RepresentationType$d + ':' + (config.uniqueKey === null ? '' : config.uniqueKey);
545
608
  }
546
609
  function keyBuilderFromType$5(luvio, object) {
547
610
  const keyParams = {
@@ -609,11 +672,6 @@ const select$q = function SlackFileOutputRepresentationSelect() {
609
672
  };
610
673
  };
611
674
  function equals$d(existing, incoming) {
612
- const existing_size = existing.size;
613
- const incoming_size = incoming.size;
614
- if (!(existing_size === incoming_size)) {
615
- return false;
616
- }
617
675
  const existing_filetype = existing.filetype;
618
676
  const incoming_filetype = incoming.filetype;
619
677
  if (!(existing_filetype === incoming_filetype)) {
@@ -644,16 +702,6 @@ function equals$d(existing, incoming) {
644
702
  if (!(existing_title === incoming_title)) {
645
703
  return false;
646
704
  }
647
- const existing_uniqueKey = existing.uniqueKey;
648
- const incoming_uniqueKey = incoming.uniqueKey;
649
- if (!(existing_uniqueKey === incoming_uniqueKey)) {
650
- return false;
651
- }
652
- const existing_url = existing.url;
653
- const incoming_url = incoming.url;
654
- if (!(existing_url === incoming_url)) {
655
- return false;
656
- }
657
705
  const existing_contentDocument = existing.contentDocument;
658
706
  const incoming_contentDocument = incoming.contentDocument;
659
707
  if (!(existing_contentDocument === incoming_contentDocument
@@ -662,11 +710,26 @@ function equals$d(existing, incoming) {
662
710
  equals$e(existing_contentDocument, incoming_contentDocument)))) {
663
711
  return false;
664
712
  }
713
+ const existing_size = existing.size;
714
+ const incoming_size = incoming.size;
715
+ if (!(existing_size === incoming_size)) {
716
+ return false;
717
+ }
665
718
  const existing_token = existing.token;
666
719
  const incoming_token = incoming.token;
667
720
  if (!(existing_token === incoming_token)) {
668
721
  return false;
669
722
  }
723
+ const existing_uniqueKey = existing.uniqueKey;
724
+ const incoming_uniqueKey = incoming.uniqueKey;
725
+ if (!(existing_uniqueKey === incoming_uniqueKey)) {
726
+ return false;
727
+ }
728
+ const existing_url = existing.url;
729
+ const incoming_url = incoming.url;
730
+ if (!(existing_url === incoming_url)) {
731
+ return false;
732
+ }
670
733
  return true;
671
734
  }
672
735
  const ingest$c = function SlackFileOutputRepresentationIngest(input, path, luvio, store, timestamp) {
@@ -6106,4 +6169,4 @@ withDefaultLuvio((luvio) => {
6106
6169
  });
6107
6170
 
6108
6171
  export { deleteSlackMessage, deleteSlackMessageReactions, getSlackConversation, getSlackConversationInfo, getSlackConversationInfo_imperative, getSlackConversation_imperative, getSlackCustomEmoji, getSlackCustomEmoji_imperative, getSlackMessage, getSlackMessageNotifyChange, getSlackMessage_imperative, getSlackSalesforceAuth, getSlackSalesforceAuth_imperative, getSlackSearchConversation, getSlackSearchConversation_imperative, getSlackSearchEmoji, getSlackSearchEmoji_imperative, getSlackSearchUser, getSlackSearchUser_imperative, getSlackUser, getSlackUserNotifyChange, getSlackUser_imperative, patchSlackMessage, postSlackConversation, postSlackFile, postSlackMessageReactions };
6109
- // version: 1.301.0-4216dc9d10
6172
+ // version: 1.303.0-b6ed223d95
package/src/raml/api.raml CHANGED
@@ -268,7 +268,7 @@ types:
268
268
  type: string
269
269
  size:
270
270
  description: Size of the File
271
- type: integer
271
+ type: integer | nil
272
272
  slackPermalink:
273
273
  description: Slack Permalink for the File
274
274
  type: string
@@ -280,10 +280,10 @@ types:
280
280
  type: string | nil
281
281
  uniqueKey:
282
282
  description: Unique Key for the File
283
- type: string
283
+ type: string | nil
284
284
  url:
285
285
  description: Slack web URL for the File
286
- type: string
286
+ type: string | nil
287
287
  SlackMessageOutputRepresentation:
288
288
  description: Contains the details of Slack Message
289
289
  type: object