@salesforce/lds-adapters-platform-slack-bridge 1.332.0-dev24 → 1.332.0-dev25

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.
@@ -495,7 +495,7 @@ function getTypeCacheKeys$h(rootKeySet, luvio, input, fullPathFactory) {
495
495
  }
496
496
 
497
497
  const TTL$1 = 600000;
498
- const VERSION$k = "bd9de08bc9e9454d5ef4be7f3ab2611e";
498
+ const VERSION$k = "90811622b2f6ba9d9a4525dd179a478a";
499
499
  function validate$k(obj, path = 'SlackBridgeUserInfoOutputRepresentation') {
500
500
  const v_error = (() => {
501
501
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -867,8 +867,29 @@ function validate$k(obj, path = 'SlackBridgeUserInfoOutputRepresentation') {
867
867
  }
868
868
  const obj_teamId = obj.teamId;
869
869
  const path_teamId = path + '.teamId';
870
- if (typeof obj_teamId !== 'string') {
871
- return new TypeError('Expected "string" but received "' + typeof obj_teamId + '" (at "' + path_teamId + '")');
870
+ let obj_teamId_union0 = null;
871
+ const obj_teamId_union0_error = (() => {
872
+ if (typeof obj_teamId !== 'string') {
873
+ return new TypeError('Expected "string" but received "' + typeof obj_teamId + '" (at "' + path_teamId + '")');
874
+ }
875
+ })();
876
+ if (obj_teamId_union0_error != null) {
877
+ obj_teamId_union0 = obj_teamId_union0_error.message;
878
+ }
879
+ let obj_teamId_union1 = null;
880
+ const obj_teamId_union1_error = (() => {
881
+ if (obj_teamId !== null) {
882
+ return new TypeError('Expected "null" but received "' + typeof obj_teamId + '" (at "' + path_teamId + '")');
883
+ }
884
+ })();
885
+ if (obj_teamId_union1_error != null) {
886
+ obj_teamId_union1 = obj_teamId_union1_error.message;
887
+ }
888
+ if (obj_teamId_union0 && obj_teamId_union1) {
889
+ let message = 'Object doesn\'t match union (at "' + path_teamId + '")';
890
+ message += '\n' + obj_teamId_union0.split('\n').map((line) => '\t' + line).join('\n');
891
+ message += '\n' + obj_teamId_union1.split('\n').map((line) => '\t' + line).join('\n');
892
+ return new TypeError(message);
872
893
  }
873
894
  const obj_title = obj.title;
874
895
  const path_title = path + '.title';
@@ -985,11 +1006,10 @@ function validate$k(obj, path = 'SlackBridgeUserInfoOutputRepresentation') {
985
1006
  }
986
1007
  const RepresentationType$g = 'SlackBridgeUserInfoOutputRepresentation';
987
1008
  function keyBuilder$A(luvio, config) {
988
- return keyPrefix + '::' + RepresentationType$g + ':' + config.teamId + ':' + config.slackUserId;
1009
+ return keyPrefix + '::' + RepresentationType$g + ':' + config.slackUserId;
989
1010
  }
990
1011
  function keyBuilderFromType$9(luvio, object) {
991
1012
  const keyParams = {
992
- teamId: object.teamId,
993
1013
  slackUserId: object.slackUserId
994
1014
  };
995
1015
  return keyBuilder$A(luvio, keyParams);
@@ -1145,11 +1165,6 @@ function equals$k(existing, incoming) {
1145
1165
  if (!(existing_slackUserId === incoming_slackUserId)) {
1146
1166
  return false;
1147
1167
  }
1148
- const existing_teamId = existing.teamId;
1149
- const incoming_teamId = incoming.teamId;
1150
- if (!(existing_teamId === incoming_teamId)) {
1151
- return false;
1152
- }
1153
1168
  const existing_displayName = existing.displayName;
1154
1169
  const incoming_displayName = incoming.displayName;
1155
1170
  if (!(existing_displayName === incoming_displayName)) {
@@ -1236,6 +1251,11 @@ function equals$k(existing, incoming) {
1236
1251
  if (!(existing_statusMessage === incoming_statusMessage)) {
1237
1252
  return false;
1238
1253
  }
1254
+ const existing_teamId = existing.teamId;
1255
+ const incoming_teamId = incoming.teamId;
1256
+ if (!(existing_teamId === incoming_teamId)) {
1257
+ return false;
1258
+ }
1239
1259
  const existing_title = existing.title;
1240
1260
  const incoming_title = incoming.title;
1241
1261
  if (!(existing_title === incoming_title)) {
@@ -7443,8 +7463,7 @@ function select(luvio, params) {
7443
7463
  }
7444
7464
  function keyBuilder$1(luvio, params) {
7445
7465
  return keyBuilder$A(luvio, {
7446
- slackUserId: params.urlParams.slackUserId,
7447
- teamId: params.urlParams.teamId
7466
+ slackUserId: params.urlParams.slackUserId
7448
7467
  });
7449
7468
  }
7450
7469
  function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
@@ -1,11 +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, 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 { SlackBridgeEmojiOutputRepresentation as SlackBridgeEmojiOutputRepresentation_SlackBridgeEmojiOutputRepresentation } from './SlackBridgeEmojiOutputRepresentation';
3
3
  export declare const TTL = 600000;
4
- export declare const VERSION = "bd9de08bc9e9454d5ef4be7f3ab2611e";
4
+ export declare const VERSION = "90811622b2f6ba9d9a4525dd179a478a";
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
- teamId: string;
9
8
  slackUserId: string;
10
9
  }
11
10
  export type SlackBridgeUserInfoOutputRepresentationNormalizedKeyMetadata = KeyParams & $64$luvio_engine_NormalizedKeyMetadata;
@@ -32,7 +31,6 @@ export declare function dynamicIngest(ingestParams: DynamicIngestParams): $64$lu
32
31
  * Contains the details of Slack User
33
32
  *
34
33
  * Keys:
35
- * teamId (string): teamId
36
34
  * slackUserId (string): slackUserId
37
35
  */
38
36
  export interface SlackBridgeUserInfoOutputRepresentationNormalized {
@@ -71,7 +69,7 @@ export interface SlackBridgeUserInfoOutputRepresentationNormalized {
71
69
  /** Status message of the Slack User */
72
70
  statusMessage: string | null;
73
71
  /** Slack Workspace Id */
74
- teamId: string;
72
+ teamId: string | null;
75
73
  /** Title of the Slack User */
76
74
  title: string | null;
77
75
  /** Time zone of the Slack user, ie. America/New_York */
@@ -85,7 +83,6 @@ export interface SlackBridgeUserInfoOutputRepresentationNormalized {
85
83
  * Contains the details of Slack User
86
84
  *
87
85
  * Keys:
88
- * teamId (string): teamId
89
86
  * slackUserId (string): slackUserId
90
87
  */
91
88
  export interface SlackBridgeUserInfoOutputRepresentation {
@@ -106,7 +103,7 @@ export interface SlackBridgeUserInfoOutputRepresentation {
106
103
  slackUserId: string;
107
104
  statusEmoji: SlackBridgeEmojiOutputRepresentation_SlackBridgeEmojiOutputRepresentation | null;
108
105
  statusMessage: string | null;
109
- teamId: string;
106
+ teamId: string | null;
110
107
  title: string | null;
111
108
  tz?: string | null;
112
109
  tzLabel?: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-adapters-platform-slack-bridge",
3
- "version": "1.332.0-dev24",
3
+ "version": "1.332.0-dev25",
4
4
  "description": "API for bridging over to Slack from Salesforce Core",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "dist/es/es2018/platform-slack-bridge.js",
@@ -40,10 +40,10 @@
40
40
  "test:unit": "jest"
41
41
  },
42
42
  "dependencies": {
43
- "@salesforce/lds-bindings": "^1.332.0-dev24"
43
+ "@salesforce/lds-bindings": "^1.332.0-dev25"
44
44
  },
45
45
  "devDependencies": {
46
- "@salesforce/lds-compiler-plugins": "^1.332.0-dev24"
46
+ "@salesforce/lds-compiler-plugins": "^1.332.0-dev25"
47
47
  },
48
48
  "nx": {
49
49
  "targets": {
package/sfdc/index.js CHANGED
@@ -3323,7 +3323,7 @@ function getTypeCacheKeys$a(rootKeySet, luvio, input, fullPathFactory) {
3323
3323
  }
3324
3324
 
3325
3325
  const TTL = 600000;
3326
- const VERSION$9 = "bd9de08bc9e9454d5ef4be7f3ab2611e";
3326
+ const VERSION$9 = "90811622b2f6ba9d9a4525dd179a478a";
3327
3327
  function validate$9(obj, path = 'SlackBridgeUserInfoOutputRepresentation') {
3328
3328
  const v_error = (() => {
3329
3329
  if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
@@ -3695,8 +3695,29 @@ function validate$9(obj, path = 'SlackBridgeUserInfoOutputRepresentation') {
3695
3695
  }
3696
3696
  const obj_teamId = obj.teamId;
3697
3697
  const path_teamId = path + '.teamId';
3698
- if (typeof obj_teamId !== 'string') {
3699
- return new TypeError('Expected "string" but received "' + typeof obj_teamId + '" (at "' + path_teamId + '")');
3698
+ let obj_teamId_union0 = null;
3699
+ const obj_teamId_union0_error = (() => {
3700
+ if (typeof obj_teamId !== 'string') {
3701
+ return new TypeError('Expected "string" but received "' + typeof obj_teamId + '" (at "' + path_teamId + '")');
3702
+ }
3703
+ })();
3704
+ if (obj_teamId_union0_error != null) {
3705
+ obj_teamId_union0 = obj_teamId_union0_error.message;
3706
+ }
3707
+ let obj_teamId_union1 = null;
3708
+ const obj_teamId_union1_error = (() => {
3709
+ if (obj_teamId !== null) {
3710
+ return new TypeError('Expected "null" but received "' + typeof obj_teamId + '" (at "' + path_teamId + '")');
3711
+ }
3712
+ })();
3713
+ if (obj_teamId_union1_error != null) {
3714
+ obj_teamId_union1 = obj_teamId_union1_error.message;
3715
+ }
3716
+ if (obj_teamId_union0 && obj_teamId_union1) {
3717
+ let message = 'Object doesn\'t match union (at "' + path_teamId + '")';
3718
+ message += '\n' + obj_teamId_union0.split('\n').map((line) => '\t' + line).join('\n');
3719
+ message += '\n' + obj_teamId_union1.split('\n').map((line) => '\t' + line).join('\n');
3720
+ return new TypeError(message);
3700
3721
  }
3701
3722
  const obj_title = obj.title;
3702
3723
  const path_title = path + '.title';
@@ -3813,11 +3834,10 @@ function validate$9(obj, path = 'SlackBridgeUserInfoOutputRepresentation') {
3813
3834
  }
3814
3835
  const RepresentationType$9 = 'SlackBridgeUserInfoOutputRepresentation';
3815
3836
  function keyBuilder$q(luvio, config) {
3816
- return keyPrefix + '::' + RepresentationType$9 + ':' + config.teamId + ':' + config.slackUserId;
3837
+ return keyPrefix + '::' + RepresentationType$9 + ':' + config.slackUserId;
3817
3838
  }
3818
3839
  function keyBuilderFromType$4(luvio, object) {
3819
3840
  const keyParams = {
3820
- teamId: object.teamId,
3821
3841
  slackUserId: object.slackUserId
3822
3842
  };
3823
3843
  return keyBuilder$q(luvio, keyParams);
@@ -3973,11 +3993,6 @@ function equals$9(existing, incoming) {
3973
3993
  if (!(existing_slackUserId === incoming_slackUserId)) {
3974
3994
  return false;
3975
3995
  }
3976
- const existing_teamId = existing.teamId;
3977
- const incoming_teamId = incoming.teamId;
3978
- if (!(existing_teamId === incoming_teamId)) {
3979
- return false;
3980
- }
3981
3996
  const existing_displayName = existing.displayName;
3982
3997
  const incoming_displayName = incoming.displayName;
3983
3998
  if (!(existing_displayName === incoming_displayName)) {
@@ -4064,6 +4079,11 @@ function equals$9(existing, incoming) {
4064
4079
  if (!(existing_statusMessage === incoming_statusMessage)) {
4065
4080
  return false;
4066
4081
  }
4082
+ const existing_teamId = existing.teamId;
4083
+ const incoming_teamId = incoming.teamId;
4084
+ if (!(existing_teamId === incoming_teamId)) {
4085
+ return false;
4086
+ }
4067
4087
  const existing_title = existing.title;
4068
4088
  const incoming_title = incoming.title;
4069
4089
  if (!(existing_title === incoming_title)) {
@@ -6778,8 +6798,7 @@ function select$9(luvio, params) {
6778
6798
  }
6779
6799
  function keyBuilder$3(luvio, params) {
6780
6800
  return keyBuilder$q(luvio, {
6781
- slackUserId: params.urlParams.slackUserId,
6782
- teamId: params.urlParams.teamId
6801
+ slackUserId: params.urlParams.slackUserId
6783
6802
  });
6784
6803
  }
6785
6804
  function getResponseCacheKeys$7(storeKeyMap, luvio, resourceParams, response) {
@@ -6832,7 +6851,6 @@ function createResourceRequestFromRepresentation(representation) {
6832
6851
  urlParams: {},
6833
6852
  };
6834
6853
  config.urlParams.slackUserId = representation.slackUserId;
6835
- config.urlParams.teamId = representation.teamId;
6836
6854
  return createResourceRequest$7(config);
6837
6855
  }
6838
6856
 
@@ -7992,4 +8010,4 @@ withDefaultLuvio((luvio) => {
7992
8010
  });
7993
8011
 
7994
8012
  export { deleteSlackConversationMember, deleteSlackMessage, deleteSlackMessageReactions, getRelatedThreads, getRelatedThreads_imperative, getSlackConversation, getSlackConversationMember, getSlackConversationMemberNotifyChange, getSlackConversationMember_imperative, getSlackConversationMembers, getSlackConversationMembersNotifyChange, getSlackConversationMembers_imperative, getSlackConversation_imperative, getSlackEmoji, getSlackEmojiNotifyChange, getSlackEmoji_imperative, getSlackEmojis, getSlackEmojis_imperative, getSlackMessage, getSlackMessageNotifyChange, getSlackMessage_imperative, getSlackRecordChannelInfo, getSlackRecordChannelInfoNotifyChange, getSlackRecordChannelInfo_imperative, getSlackSearchConversation, getSlackSearchConversation_imperative, getSlackSearchEmoji, getSlackSearchEmoji_imperative, getSlackSearchUser, getSlackSearchUser_imperative, getSlackUser, getSlackUserNotifyChange, getSlackUser_imperative, patchSlackMessage, postSlackConversation, postSlackConversationMark, postSlackConversationMembers, postSlackFile, postSlackMessageReactions, postSlackRecordChannelInfos };
7995
- // version: 1.332.0-dev24-53f8301ac1
8013
+ // version: 1.332.0-dev25-cf098333d5
package/src/raml/api.raml CHANGED
@@ -649,7 +649,7 @@ types:
649
649
  type: string | nil
650
650
  teamId:
651
651
  description: Slack Workspace Id
652
- type: string
652
+ type: string | nil
653
653
  title:
654
654
  description: Title of the Slack User
655
655
  type: string | nil
@@ -14,7 +14,6 @@ types:
14
14
  SlackBridgeUserInfoOutputRepresentation:
15
15
  (luvio.ttl): 600000
16
16
  (luvio.key):
17
- teamId: teamId
18
17
  slackUserId: slackUserId
19
18
  SlackBridgePostMessageOutputRepresentation:
20
19
  (luvio.key):
@@ -157,7 +156,6 @@ types:
157
156
  name: getSlackUser
158
157
  (luvio.key):
159
158
  slackUserId: urlParams.slackUserId
160
- teamId: urlParams.teamId
161
159
  /related_threads/entity/{entityId}:
162
160
  get:
163
161
  (luvio.adapter):