@wildix/xbees-conversations-utils 1.0.16 → 1.0.17

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.
@@ -12,6 +12,7 @@ function normalizeStreamUser(streamUser) {
12
12
  locale: streamUser.locale || undefined,
13
13
  timeZone: streamUser.timeZone || undefined,
14
14
  company: streamUser.company || undefined,
15
+ bot: streamUser.bot || false,
15
16
  pbxDomain: streamUser.pbxDomain || undefined,
16
17
  pbxPort: streamUser.pbxPort || undefined,
17
18
  pbxExtension: streamUser.pbxExtension || undefined,
@@ -63,6 +64,8 @@ function normalizeStreamMessage(streamMessage, channelId) {
63
64
  edit,
64
65
  sms: streamMessage.sms,
65
66
  smsStatus: streamMessage.sms_status,
67
+ whatsapp: streamMessage.whatsapp,
68
+ whatsappStatus: streamMessage.whatsapp_status,
66
69
  silent,
67
70
  event,
68
71
  };
@@ -137,6 +140,8 @@ function normalizeStreamChannel(channel) {
137
140
  telephony: data.telephony,
138
141
  sms: data.sms,
139
142
  mms: data.mms,
143
+ whatsapp: data.whatsapp,
144
+ whatsappStatus: data.whatsapp_status,
140
145
  broadcast: data.broadcast || data.is_broadcast,
141
146
  external: data.external,
142
147
  createdAt: data.created_at,
@@ -9,6 +9,7 @@ export function normalizeStreamUser(streamUser) {
9
9
  locale: streamUser.locale || undefined,
10
10
  timeZone: streamUser.timeZone || undefined,
11
11
  company: streamUser.company || undefined,
12
+ bot: streamUser.bot || false,
12
13
  pbxDomain: streamUser.pbxDomain || undefined,
13
14
  pbxPort: streamUser.pbxPort || undefined,
14
15
  pbxExtension: streamUser.pbxExtension || undefined,
@@ -57,6 +58,8 @@ export function normalizeStreamMessage(streamMessage, channelId) {
57
58
  edit,
58
59
  sms: streamMessage.sms,
59
60
  smsStatus: streamMessage.sms_status,
61
+ whatsapp: streamMessage.whatsapp,
62
+ whatsappStatus: streamMessage.whatsapp_status,
60
63
  silent,
61
64
  event,
62
65
  };
@@ -129,6 +132,8 @@ export function normalizeStreamChannel(channel) {
129
132
  telephony: data.telephony,
130
133
  sms: data.sms,
131
134
  mms: data.mms,
135
+ whatsapp: data.whatsapp,
136
+ whatsappStatus: data.whatsapp_status,
132
137
  broadcast: data.broadcast || data.is_broadcast,
133
138
  external: data.external,
134
139
  createdAt: data.created_at,
@@ -1,5 +1,5 @@
1
1
  import { Channel, ChannelData, ChannelFilters, ChannelMembership, ChannelMemberResponse, ChannelSort, ChannelResponse, Event, ExtendableGenerics, LiteralStringForUnion, Message, MessageResponse, ReactionResponse, UR, UserResponse, ChannelAPIResponse, User, Reaction, PartialMessageUpdate, UpdatedMessage, PartialUpdateChannel } from 'stream-chat';
2
- import { Message as MessageNormalized, MessageForward, MessageAttachment, MessageGiphy, User as NormalizedUser, ChannelAccess, MessageSmsStatus } from "@wildix/xbees-conversations-client";
2
+ import { Message as MessageNormalized, MessageForward, MessageAttachment, MessageGiphy, User as NormalizedUser, ChannelAccess, MessageSmsStatus, MessageWhatsAppStatus, ChannelWhatsAppStatus } from "@wildix/xbees-conversations-client";
3
3
  export interface StreamChannelFields extends UR {
4
4
  subject?: string;
5
5
  description?: string;
@@ -21,6 +21,8 @@ export interface StreamChannelFields extends UR {
21
21
  telephony?: boolean;
22
22
  sms?: boolean;
23
23
  mms?: boolean;
24
+ whatsapp?: boolean;
25
+ whatsapp_status?: ChannelWhatsAppStatus | string;
24
26
  broadcast?: boolean;
25
27
  is_broadcast?: boolean;
26
28
  external?: boolean;
@@ -47,6 +49,8 @@ export interface StreamMessageFields extends UR {
47
49
  attachments?: MessageAttachment[];
48
50
  sms?: boolean;
49
51
  sms_status?: MessageSmsStatus | string;
52
+ whatsapp?: boolean;
53
+ whatsapp_status?: MessageWhatsAppStatus | string;
50
54
  created_at: string;
51
55
  updated_at: string;
52
56
  }
@@ -67,6 +71,7 @@ export interface StreamUserFields extends UR {
67
71
  online: boolean;
68
72
  banned: boolean;
69
73
  company: string;
74
+ bot?: boolean;
70
75
  pbxSerial: string;
71
76
  pbxPort: string;
72
77
  pbxDomain: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wildix/xbees-conversations-utils",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "license": "Apache-2.0",
22
22
  "dependencies": {
23
- "@wildix/xbees-conversations-client": "1.0.43",
23
+ "@wildix/xbees-conversations-client": "1.0.44",
24
24
  "stream-chat": "8.12.1",
25
25
  "tslib": "^2.5.0"
26
26
  },