@rocket.chat/core-typings 6.12.1 → 6.13.0-rc.1

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @rocket.chat/core-typings
2
2
 
3
+ ## 6.13.0-rc.1
4
+
5
+ ## 6.13.0-rc.0
6
+
7
+ ### Minor Changes
8
+
9
+ - ([#32693](https://github.com/RocketChat/Rocket.Chat/pull/32693)) Introduced "create contacts" endpoint to omnichannel
10
+
11
+ - ([#33225](https://github.com/RocketChat/Rocket.Chat/pull/33225)) Implemented new feature preview for Sidepanel
12
+
13
+ ### Patch Changes
14
+
15
+ - ([#32510](https://github.com/RocketChat/Rocket.Chat/pull/32510)) Added a new setting to enable mentions in end to end encrypted channels
16
+
17
+ - <details><summary>Updated dependencies [79c16d315a]:</summary>
18
+
19
+ - @rocket.chat/message-parser@0.31.30-rc.0
20
+ </details>
21
+
3
22
  ## 6.12.1
4
23
 
5
24
  ### Patch Changes
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { IncomingMessage } from 'http';
3
2
  export interface IIncomingMessage extends IncomingMessage {
4
3
  query: Record<string, any>;
@@ -0,0 +1,22 @@
1
+ import type { IRocketChatRecord } from './IRocketChatRecord';
2
+ export interface ILivechatContactChannel {
3
+ name: string;
4
+ verified: boolean;
5
+ visitorId: string;
6
+ }
7
+ export interface ILivechatContactConflictingField {
8
+ field: string;
9
+ oldValue: string;
10
+ newValue: string;
11
+ }
12
+ export interface ILivechatContact extends IRocketChatRecord {
13
+ name: string;
14
+ phones?: string[];
15
+ emails?: string[];
16
+ contactManager?: string;
17
+ unknown?: boolean;
18
+ hasConflict?: boolean;
19
+ conflictingFields?: ILivechatContactConflictingField[];
20
+ customFields?: Record<string, string | unknown>;
21
+ channels?: ILivechatContactChannel[];
22
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ILivechatContact.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ILivechatContact.js","sourceRoot":"","sources":["../src/ILivechatContact.ts"],"names":[],"mappings":""}
@@ -16,6 +16,7 @@ export interface ILivechatDepartment {
16
16
  archived?: boolean;
17
17
  departmentsAllowedToForward?: string[];
18
18
  maxNumberSimultaneousChat?: number;
19
+ parentId?: string;
19
20
  ancestors?: string[];
20
21
  allowReceiveForwardOffline?: boolean;
21
22
  [k: string]: any;
@@ -43,6 +43,7 @@ export interface ILivechatVisitor extends IRocketChatRecord {
43
43
  };
44
44
  activity?: string[];
45
45
  disabled?: boolean;
46
+ contactId?: string;
46
47
  }
47
48
  export interface ILivechatVisitorDTO {
48
49
  id?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ILivechatVisitor.js","sourceRoot":"","sources":["../src/ILivechatVisitor.ts"],"names":[],"mappings":";;;AAuEO,MAAM,kBAAkB,GAAG,CAAC,CAAM,EAAyB,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,KAAK,QAAQ,CAAC;AAArF,QAAA,kBAAkB,sBAAmE"}
1
+ {"version":3,"file":"ILivechatVisitor.js","sourceRoot":"","sources":["../src/ILivechatVisitor.ts"],"names":[],"mappings":";;;AAwEO,MAAM,kBAAkB,GAAG,CAAC,CAAM,EAAyB,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,KAAK,QAAQ,CAAC;AAArF,QAAA,kBAAkB,sBAAmE"}
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { UrlWithStringQuery } from 'url';
3
2
  import type Icons from '@rocket.chat/icons';
4
3
  import type { Root } from '@rocket.chat/message-parser';
@@ -80,6 +79,10 @@ export interface IMessage extends IRocketChatRecord {
80
79
  tcount?: number;
81
80
  t?: MessageTypesValues;
82
81
  e2e?: 'pending' | 'done';
82
+ e2eMentions?: {
83
+ e2eUserMentions?: string[];
84
+ e2eChannelMentions?: string[];
85
+ };
83
86
  otrAck?: string;
84
87
  urls?: MessageUrl[];
85
88
  /** @deprecated Deprecated */
@@ -1 +1 @@
1
- {"version":3,"file":"IMessage.js","sourceRoot":"","sources":["../../src/IMessage/IMessage.ts"],"names":[],"mappings":";;;AAwBA,MAAM,sBAAsB,GAAG;IAC9B,mBAAmB;IACnB,oBAAoB;IACpB,mBAAmB;IACnB,kBAAkB;IAClB,iBAAiB;IACjB,oBAAoB;IACpB,kBAAkB;IAClB,8BAA8B;CACrB,CAAC;AAEX,MAAM,sBAAsB,GAAG;IAC9B,wBAAwB;IACxB,oBAAoB;IACpB,KAAK;IACL,wBAAwB;IACxB,2BAA2B;IAC3B,6BAA6B;IAC7B,6BAA6B;IAC7B,yBAAyB;IACzB,KAAK;CACI,CAAC;AAEX,MAAM,0BAA0B,GAAG;IAClC,6BAA6B;IAC7B,2BAA2B;IAC3B,6BAA6B;IAC7B,qBAAqB;IACrB,oCAAoC;IACpC,gBAAgB;IAChB,4BAA4B;IAC5B,kBAAkB;IAClB,qCAAqC;IACrC,gCAAgC;IAChC,iCAAiC;IACjC,kCAAkC;CACzB,CAAC;AAEX,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,SAAS,CAAU,CAAC;AAEzD,MAAM,uBAAuB,GAAG,CAAC,iBAAiB,EAAE,gCAAgC,EAAE,iCAAiC,CAAU,CAAC;AAGlI,MAAM,YAAY,GAAG;IACpB,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,aAAa;IACb,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,yBAAyB;IACzB,2BAA2B;IAC3B,eAAe;IACf,iBAAiB;IACjB,sBAAsB;IACtB,0BAA0B;IAC1B,2BAA2B;IAC3B,qBAAqB;IACrB,oBAAoB;IACpB,kBAAkB;IAClB,mBAAmB;IACnB,YAAY;IACZ,cAAc;IACd,wBAAwB;IACxB,oBAAoB;IACpB,uBAAuB;IACvB,0BAA0B;IAC1B,SAAS;IACT,WAAW;IACX,gBAAgB;IAChB,oBAAoB;IACpB,eAAe;IACf,mBAAmB;IAC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,OAAiB,EAAiC,EAAE,CAAC,OAAO,CAAC,CAAC,KAAK,oBAAoB,CAAC;AAA/G,QAAA,mBAAmB,uBAA4F;AACrH,MAAM,YAAY,GAAG,CAAC,OAAiB,EAA0B,EAAE,CAAC,OAAO,CAAC,CAAC,KAAK,KAAK,CAAC;AAAlF,QAAA,YAAY,gBAAsE;AACxF,MAAM,eAAe,GAAG,CAAC,OAAiB,EAA6B,EAAE,CAAC,OAAO,CAAC,CAAC,KAAK,SAAS,CAAC;AAA5F,QAAA,eAAe,mBAA6E;AAClG,MAAM,kBAAkB,GAAG,CAAC,OAAiB,EAAgC,EAAE,CAAC,OAAO,CAAC,CAAC,KAAK,WAAW,CAAC;AAApG,QAAA,kBAAkB,sBAAkF;AAoB1G,MAAM,oBAAoB,GAAG,CAAC,OAAiB,EAAkC,EAAE,CAAC,OAAO,IAAI,OAAO,CAAC;AAAjG,QAAA,oBAAoB,wBAA6E"}
@@ -7,11 +7,6 @@ export type AudioAttachmentProps = {
7
7
  audio_size?: number;
8
8
  file?: FileProp;
9
9
  } & MessageAttachmentBase;
10
- export declare const isFileAudioAttachment: (attachment: FileAttachmentProps) => attachment is {
11
- audio_url: string;
12
- audio_type: string;
13
- audio_size?: number | undefined;
14
- file?: FileProp | undefined;
15
- } & MessageAttachmentBase & {
16
- type: 'file';
10
+ export declare const isFileAudioAttachment: (attachment: FileAttachmentProps) => attachment is AudioAttachmentProps & {
11
+ type: "file";
17
12
  };
@@ -10,13 +10,6 @@ export type ImageAttachmentProps = {
10
10
  image_size?: number;
11
11
  file?: FileProp;
12
12
  } & MessageAttachmentBase;
13
- export declare const isFileImageAttachment: (attachment: FileAttachmentProps) => attachment is {
14
- image_dimensions?: Dimensions | undefined;
15
- image_preview?: string | undefined;
16
- image_url: string;
17
- image_type?: string | undefined;
18
- image_size?: number | undefined;
19
- file?: FileProp | undefined;
20
- } & MessageAttachmentBase & {
21
- type: 'file';
13
+ export declare const isFileImageAttachment: (attachment: FileAttachmentProps) => attachment is ImageAttachmentProps & {
14
+ type: "file";
22
15
  };
@@ -7,11 +7,6 @@ export type VideoAttachmentProps = {
7
7
  video_size: number;
8
8
  file?: FileProp;
9
9
  } & MessageAttachmentBase;
10
- export declare const isFileVideoAttachment: (attachment: FileAttachmentProps) => attachment is {
11
- video_url: string;
12
- video_type: string;
13
- video_size: number;
14
- file?: FileProp | undefined;
15
- } & MessageAttachmentBase & {
16
- type: 'file';
10
+ export declare const isFileVideoAttachment: (attachment: FileAttachmentProps) => attachment is VideoAttachmentProps & {
11
+ type: "file";
17
12
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  export interface IRocketChatAssetConstraint {
3
2
  type: string;
4
3
  extensions: string[];
package/dist/IRoom.d.ts CHANGED
@@ -44,14 +44,6 @@ export interface IRoom extends IRocketChatRecord {
44
44
  servedBy?: {
45
45
  _id: string;
46
46
  };
47
- streamingOptions?: {
48
- id?: string;
49
- type?: string;
50
- url?: string;
51
- thumbnail?: string;
52
- isAudioOnly?: boolean;
53
- message?: string;
54
- };
55
47
  prid?: string;
56
48
  avatarETag?: string;
57
49
  teamMain?: boolean;
@@ -85,8 +77,8 @@ export interface IRoom extends IRocketChatRecord {
85
77
  items: [SidepanelItem, SidepanelItem?];
86
78
  };
87
79
  }
88
- export declare const isSidepanelItem: (item: any) => item is "channels" | "discussions";
89
- export declare const isValidSidepanel: (sidepanel: IRoom['sidepanel']) => boolean;
80
+ export declare const isSidepanelItem: (item: any) => item is SidepanelItem;
81
+ export declare const isValidSidepanel: (sidepanel: IRoom["sidepanel"]) => boolean;
90
82
  export declare const isRoomWithJoinCode: (room: Partial<IRoom>) => room is IRoomWithJoinCode;
91
83
  export interface IRoomWithJoinCode extends IRoom {
92
84
  joinCodeRequired: true;
@@ -127,6 +119,22 @@ export declare enum OmnichannelSourceType {
127
119
  API = "api",
128
120
  OTHER = "other"
129
121
  }
122
+ export interface IOmnichannelSource {
123
+ type: OmnichannelSourceType;
124
+ id?: string;
125
+ alias?: string;
126
+ label?: string;
127
+ sidebarIcon?: string;
128
+ defaultIcon?: string;
129
+ }
130
+ export interface IOmnichannelSourceFromApp extends IOmnichannelSource {
131
+ type: OmnichannelSourceType.APP;
132
+ id: string;
133
+ label: string;
134
+ sidebarIcon?: string;
135
+ defaultIcon?: string;
136
+ alias?: string;
137
+ }
130
138
  export interface IOmnichannelGenericRoom extends Omit<IRoom, 'default' | 'featured' | 'broadcast'> {
131
139
  t: 'l' | 'v';
132
140
  v: Pick<ILivechatVisitor, '_id' | 'username' | 'status' | 'name' | 'token' | 'activity'> & {
@@ -139,14 +147,7 @@ export interface IOmnichannelGenericRoom extends Omit<IRoom, 'default' | 'featur
139
147
  replyTo: string;
140
148
  subject: string;
141
149
  };
142
- source: {
143
- type: OmnichannelSourceType;
144
- id?: string;
145
- alias?: string;
146
- label?: string;
147
- sidebarIcon?: string;
148
- defaultIcon?: string;
149
- };
150
+ source: IOmnichannelSource;
150
151
  transcriptRequest?: IRequestTranscript;
151
152
  servedBy?: {
152
153
  _id: string;
@@ -239,13 +240,7 @@ export interface IVoipRoom extends IOmnichannelGenericRoom {
239
240
  direction: 'inbound' | 'outbound';
240
241
  }
241
242
  export interface IOmnichannelRoomFromAppSource extends IOmnichannelRoom {
242
- source: {
243
- type: OmnichannelSourceType.APP;
244
- id: string;
245
- alias?: string;
246
- sidebarIcon?: string;
247
- defaultIcon?: string;
248
- };
243
+ source: IOmnichannelSourceFromApp;
249
244
  }
250
245
  export type IVoipRoomClosingInfo = Pick<IOmnichannelGenericRoom, 'closer' | 'closedBy' | 'closedAt' | 'tags'> & Pick<IVoipRoom, 'callDuration' | 'callTotalHoldTime'> & {
251
246
  serviceTimeDuration?: number;
@@ -254,9 +249,9 @@ export type IOmnichannelRoomClosingInfo = Pick<IOmnichannelGenericRoom, 'closer'
254
249
  serviceTimeDuration?: number;
255
250
  chatDuration: number;
256
251
  };
257
- export declare const isOmnichannelRoom: (room: Pick<IRoom, 't'>) => room is IOmnichannelRoom & IRoom;
252
+ export declare const isOmnichannelRoom: (room: Pick<IRoom, "t">) => room is IOmnichannelRoom & IRoom;
258
253
  export declare const isVoipRoom: (room: IRoom) => room is IVoipRoom & IRoom;
259
- export declare const isOmnichannelRoomFromAppSource: (room: IOmnichannelRoom) => room is IOmnichannelRoomFromAppSource;
254
+ export declare const isOmnichannelSourceFromApp: (source: IOmnichannelSource) => source is IOmnichannelSourceFromApp;
260
255
  export type RoomAdminFieldsType = '_id' | 'prid' | 'fname' | 'name' | 't' | 'cl' | 'u' | 'usernames' | 'ts' | 'usersCount' | 'muted' | 'unmuted' | 'ro' | 'default' | 'favorite' | 'featured' | 'reactWhenReadOnly' | 'topic' | 'msgs' | 'archived' | 'teamId' | 'teamMain' | 'announcement' | 'description' | 'broadcast' | 'uids' | 'avatarETag';
261
256
  export interface IRoomWithRetentionPolicy extends IRoom {
262
257
  retention: {
package/dist/IRoom.js CHANGED
@@ -1,12 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isOmnichannelRoomFromAppSource = exports.isVoipRoom = exports.isOmnichannelRoom = exports.OmnichannelSourceType = exports.isMultipleDirectMessageRoom = exports.isDirectMessageRoom = exports.isPrivateRoom = exports.isPublicRoom = exports.isPublicDiscussion = exports.isPrivateDiscussion = exports.isDiscussion = exports.isPublicTeamRoom = exports.isPrivateTeamRoom = exports.isTeamRoom = exports.isRoomFederated = exports.isRoomWithJoinCode = exports.isValidSidepanel = exports.isSidepanelItem = void 0;
3
+ exports.isOmnichannelSourceFromApp = exports.isVoipRoom = exports.isOmnichannelRoom = exports.OmnichannelSourceType = exports.isMultipleDirectMessageRoom = exports.isDirectMessageRoom = exports.isPrivateRoom = exports.isPublicRoom = exports.isPublicDiscussion = exports.isPrivateDiscussion = exports.isDiscussion = exports.isPublicTeamRoom = exports.isPrivateTeamRoom = exports.isTeamRoom = exports.isRoomFederated = exports.isRoomWithJoinCode = exports.isValidSidepanel = exports.isSidepanelItem = void 0;
4
4
  const sidepanelItemValues = ['channels', 'discussions'];
5
5
  const isSidepanelItem = (item) => {
6
6
  return sidepanelItemValues.includes(item);
7
7
  };
8
8
  exports.isSidepanelItem = isSidepanelItem;
9
9
  const isValidSidepanel = (sidepanel) => {
10
+ if (sidepanel === null) {
11
+ return true;
12
+ }
10
13
  if (!sidepanel?.items) {
11
14
  return false;
12
15
  }
@@ -53,11 +56,8 @@ const isOmnichannelRoom = (room) => room.t === 'l';
53
56
  exports.isOmnichannelRoom = isOmnichannelRoom;
54
57
  const isVoipRoom = (room) => room.t === 'v';
55
58
  exports.isVoipRoom = isVoipRoom;
56
- const isOmnichannelRoomFromAppSource = (room) => {
57
- if (!(0, exports.isOmnichannelRoom)(room)) {
58
- return false;
59
- }
60
- return room.source?.type === OmnichannelSourceType.APP;
59
+ const isOmnichannelSourceFromApp = (source) => {
60
+ return source?.type === OmnichannelSourceType.APP;
61
61
  };
62
- exports.isOmnichannelRoomFromAppSource = isOmnichannelRoomFromAppSource;
62
+ exports.isOmnichannelSourceFromApp = isOmnichannelSourceFromApp;
63
63
  //# sourceMappingURL=IRoom.js.map
package/dist/IRoom.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"IRoom.js","sourceRoot":"","sources":["../src/IRoom.ts"],"names":[],"mappings":";;;AASA,MAAM,mBAAmB,GAAG,CAAC,UAAU,EAAE,aAAa,CAAU,CAAC;AAgG1D,MAAM,eAAe,GAAG,CAAC,IAAS,EAAyB,EAAE;IACnE,OAAO,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC3C,CAAC,CAAC;AAFW,QAAA,eAAe,mBAE1B;AAEK,MAAM,gBAAgB,GAAG,CAAC,SAA6B,EAAE,EAAE;IACjE,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC;QACvB,OAAO,KAAK,CAAC;IACd,CAAC;IACD,OAAO,CACN,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC;QAC9B,SAAS,CAAC,KA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Q9E,MAAM,mBAAmB,GAAG,CAAC,IAAyC,EAA8B,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC;AAAhH,QAAA,mBAAmB,uBAA6F;AACtH,MAAM,2BAA2B,GAAG,CAAC,IAAgC,EAA8B,EAAE,CAC3G,IAAA,2BAAmB,EAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;AADtC,QAAA,2BAA2B,+BACW;AAEnD,IAAY,qBAOX;AAPD,WAAY,qBAAqB;IAChC,0CAAiB,CAAA;IACjB,wCAAe,CAAA;IACf,oCAAW,CAAA;IACX,oCAAW,CAAA;IACX,oCAAW,CAAA;IACX,wCAAe,CAAA;AAChB,CAAC,EAPW,qBAAqB,qCAArB,qBAAqB,QAOhC;AA2LM,MAAM,iBAAiB,GAAG,CAAC,IAAsB,EAAoC,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC;AAAjG,QAAA,iBAAiB,qBAAgF;AAEvG,MAAM,UAAU,GAAG,CAAC,IAAW,EAA6B,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC;AAAxE,QAAA,UAAU,cAA8D;AAE9E,MAAM,0BAA0B,GAAG,CAAC,MAA0B,EAAuC,EAAE;IAC7G,OAAO,MAAM,EAAE,IAAI,KAAK,qBAAqB,CAAC,GAAG,CAAC;AACnD,CAAC,CAAC;AAFW,QAAA,0BAA0B,8BAErC"}
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import type { IncomingHttpHeaders } from 'http';
3
2
  export interface ISocketConnection {
4
3
  id: string;
package/dist/IStats.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import type { CpuInfo } from 'os';
4
2
  import type { IMatrixFederationStatistics } from './IMatrixFederationStatistics';
5
3
  import type { DeviceSessionAggregationResult, OSSessionAggregationResult, UserSessionAggregationResult } from './ISession';
@@ -181,7 +179,6 @@ export interface IStats {
181
179
  dashboardCount: number;
182
180
  joinJitsiButton: number;
183
181
  totalBroadcastRooms: number;
184
- totalRoomsWithActiveLivestream: number;
185
182
  totalTriggeredEmails: number;
186
183
  totalRoomsWithStarred: number;
187
184
  totalRoomsWithPinned: number;
package/dist/IUser.d.ts CHANGED
@@ -35,7 +35,34 @@ export type ILoginUsername = {
35
35
  email: string;
36
36
  };
37
37
  export type LoginUsername = string | ILoginUsername;
38
- export interface IUserServices {
38
+ export interface IOAuthUserServices {
39
+ google?: any;
40
+ facebook?: any;
41
+ github?: any;
42
+ linkedin?: any;
43
+ twitter?: any;
44
+ gitlab?: any;
45
+ saml?: {
46
+ inResponseTo?: string;
47
+ provider?: string;
48
+ idp?: string;
49
+ idpSession?: string;
50
+ nameID?: string;
51
+ };
52
+ ldap?: {
53
+ id: string;
54
+ idAttribute?: string;
55
+ };
56
+ nextcloud?: {
57
+ accessToken: string;
58
+ refreshToken: string;
59
+ serverURL: string;
60
+ };
61
+ dolphin?: {
62
+ NickName?: string;
63
+ };
64
+ }
65
+ export interface IUserServices extends IOAuthUserServices {
39
66
  password?: {
40
67
  exists?: boolean;
41
68
  bcrypt?: string;
@@ -52,12 +79,6 @@ export interface IUserServices {
52
79
  refreshToken: string;
53
80
  expiresAt: Date;
54
81
  };
55
- google?: any;
56
- facebook?: any;
57
- github?: any;
58
- linkedin?: any;
59
- twitter?: any;
60
- gitlab?: any;
61
82
  totp?: {
62
83
  enabled: boolean;
63
84
  hashedBackup: string[];
@@ -69,26 +90,12 @@ export interface IUserServices {
69
90
  changedAt: Date;
70
91
  };
71
92
  emailCode?: IUserEmailCode;
72
- saml?: {
73
- inResponseTo?: string;
74
- provider?: string;
75
- idp?: string;
76
- idpSession?: string;
77
- nameID?: string;
78
- };
79
- ldap?: {
80
- id: string;
81
- idAttribute?: string;
82
- };
83
- nextcloud?: {
84
- accessToken: string;
85
- refreshToken: string;
86
- serverURL: string;
87
- };
88
- dolphin?: {
89
- NickName?: string;
90
- };
91
93
  }
94
+ type IUserService = keyof IUserServices;
95
+ export declare const isUserServiceKey: (key: string) => key is IUserService;
96
+ export declare const isDefaultOAuthUser: (user: IUser) => boolean;
97
+ export declare const isCustomOAuthUser: (user: IUser) => boolean;
98
+ export declare const isOAuthUser: (user: IUser) => boolean;
92
99
  export interface IUserEmail {
93
100
  address: string;
94
101
  verified?: boolean;
@@ -168,6 +175,7 @@ export interface IUser extends IRocketChatRecord {
168
175
  _pendingAvatarUrl?: string;
169
176
  requirePasswordChange?: boolean;
170
177
  requirePasswordChangeReason?: string;
178
+ isOAuthUser?: boolean;
171
179
  }
172
180
  export interface IRegisterUser extends IUser {
173
181
  username: string;
package/dist/IUser.js CHANGED
@@ -1,6 +1,28 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isUserFederated = exports.isRegisterUser = void 0;
3
+ exports.isUserFederated = exports.isRegisterUser = exports.isOAuthUser = exports.isCustomOAuthUser = exports.isDefaultOAuthUser = exports.isUserServiceKey = void 0;
4
+ const defaultOAuthKeys = [
5
+ 'google',
6
+ 'dolphin',
7
+ 'facebook',
8
+ 'github',
9
+ 'gitlab',
10
+ 'google',
11
+ 'ldap',
12
+ 'linkedin',
13
+ 'nextcloud',
14
+ 'saml',
15
+ 'twitter',
16
+ ];
17
+ const userServiceKeys = ['emailCode', 'email2fa', 'totp', 'resume', 'password', 'passwordHistory', 'cloud', 'email'];
18
+ const isUserServiceKey = (key) => userServiceKeys.includes(key) || defaultOAuthKeys.includes(key);
19
+ exports.isUserServiceKey = isUserServiceKey;
20
+ const isDefaultOAuthUser = (user) => !!user.services && Object.keys(user.services).some((key) => defaultOAuthKeys.includes(key));
21
+ exports.isDefaultOAuthUser = isDefaultOAuthUser;
22
+ const isCustomOAuthUser = (user) => !!user.services && Object.keys(user.services).some((key) => !(0, exports.isUserServiceKey)(key));
23
+ exports.isCustomOAuthUser = isCustomOAuthUser;
24
+ const isOAuthUser = (user) => (0, exports.isDefaultOAuthUser)(user) || (0, exports.isCustomOAuthUser)(user);
25
+ exports.isOAuthUser = isOAuthUser;
4
26
  const isRegisterUser = (user) => user.username !== undefined && user.name !== undefined;
5
27
  exports.isRegisterUser = isRegisterUser;
6
28
  const isUserFederated = (user) => 'federated' in user && user.federated === true;
package/dist/IUser.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"IUser.js","sourceRoot":"","sources":["../src/IUser.ts"],"names":[],"mappings":";;;AAgMO,MAAM,cAAc,GAAG,CAAC,IAAW,EAAyB,EAAE,CAAC,IAAI,CAAC,QAAQ,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC;AAAhH,QAAA,cAAc,kBAAkG;AACtH,MAAM,eAAe,GAAG,CAAC,IAAiD,EAAE,EAAE,CAAC,WAAW,IAAI,IAAI,IAAI,IAAI,CAAC,SAAS,KAAK,IAAI,CAAC;AAAxH,QAAA,eAAe,mBAAyG"}
1
+ {"version":3,"file":"IUser.js","sourceRoot":"","sources":["../src/IUser.ts"],"names":[],"mappings":";;;AA4GA,MAAM,gBAAgB,GAAG;IACxB,QAAQ;IACR,SAAS;IACT,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,UAAU;IACV,WAAW;IACX,MAAM;IACN,SAAS;CACU,CAAC;AACrB,MAAM,eAAe,GAAG,CAAC,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,iBAAiB,EAAE,OAAO,EAAE,OAAO,CAAmB,CAAC;AAEhI,MAAM,gBAAgB,GAAG,CAAC,GAAW,EAAuB,EAAE,CACpE,eAAe,CAAC,QAAQ,CAAC,GAAmB,CAAC,IAAI,gBAAgB,CAAC,QAAQ,CAAC,GAAoB,CAAC,CAAC;AADrF,QAAA,gBAAgB,oBACqE;AAE3F,MAAM,kBAAkB,GAAG,CAAC,IAAW,EAAW,EAAE,CAC1D,CAAC,CAAC,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,GAAoB,CAAC,CAAC,CAAC;AADjG,QAAA,kBAAkB,sBAC+E;AAEvG,MAAM,iBAAiB,GAAG,CAAC,IAAW,EAAW,EAAE,CACzD,CAAC,CAAC,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,IAAA,wBAAgB,EAAC,GAAG,CAAC,CAAC,CAAC;AADxE,QAAA,iBAAiB,qBACuD;AAE9E,MAAM,WAAW,GAAG,CAAC,IAAW,EAAW,EAAE,CAAC,IAAA,0BAAkB,EAAC,IAAI,CAAC,IAAI,IAAA,yBAAiB,EAAC,IAAI,CAAC,CAAC;AAA5F,QAAA,WAAW,eAAiF;AA6FlG,MAAM,cAAc,GAAG,CAAC,IAAW,EAAyB,EAAE,CAAC,IAAI,CAAC,QAAQ,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC;AAAhH,QAAA,cAAc,kBAAkG;AACtH,MAAM,eAAe,GAAG,CAAC,IAAiD,EAAE,EAAE,CAAC,WAAW,IAAI,IAAI,IAAI,IAAI,CAAC,SAAS,KAAK,IAAI,CAAC;AAAxH,QAAA,eAAe,mBAAyG"}
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  export type IUserAction = {
3
2
  _id: string;
4
3
  username?: string;
package/dist/index.d.ts CHANGED
@@ -83,6 +83,7 @@ export * from './ILivechatCustomField';
83
83
  export * from './IOmnichannel';
84
84
  export * from './ILivechatAgentActivity';
85
85
  export * from './ILivechatBusinessHour';
86
+ export * from './ILivechatContact';
86
87
  export * from './ILivechatVisitor';
87
88
  export * from './ILivechatDepartmentAgents';
88
89
  export * from './ILivechatAgent';
package/dist/index.js CHANGED
@@ -115,6 +115,7 @@ __exportStar(require("./ILivechatCustomField"), exports);
115
115
  __exportStar(require("./IOmnichannel"), exports);
116
116
  __exportStar(require("./ILivechatAgentActivity"), exports);
117
117
  __exportStar(require("./ILivechatBusinessHour"), exports);
118
+ __exportStar(require("./ILivechatContact"), exports);
118
119
  __exportStar(require("./ILivechatVisitor"), exports);
119
120
  __exportStar(require("./ILivechatDepartmentAgents"), exports);
120
121
  __exportStar(require("./ILivechatAgent"), exports);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,gDAA8B;AAC9B,iDAA+B;AAC/B,gDAA8B;AAC9B,oDAAkC;AAClC,0CAAwB;AACxB,6CAA2B;AAC3B,+CAA6B;AAC7B,+CAA6B;AAC7B,6CAA2B;AAC3B,kDAAgC;AAChC,0CAAwB;AACxB,6CAA2B;AAC3B,4CAA0B;AAC1B,sDAAoC;AACpC,+CAA6B;AAC7B,gDAA8B;AAC9B,4CAA0B;AAC1B,2CAAyB;AACzB,gEAA8C;AAC9C,gDAA8B;AAC9B,mDAAiC;AACjC,oDAAkC;AAClC,mDAAiC;AACjC,gDAA8B;AAC9B,0CAAwB;AACxB,0CAAwB;AACxB,iDAA+B;AAC/B,wDAAsC;AACtC,iDAA+B;AAC/B,2CAAyB;AACzB,iDAA+B;AAC/B,sDAAoC;AACpC,+CAA6B;AAC7B,4DAA0C;AAC1C,kDAAgC;AAChC,4CAA0B;AAE1B,kDAAgC;AAChC,iDAA+B;AAC/B,gDAA8B;AAC9B,0CAAwB;AAExB,iDAA+B;AAE/B,2CAAyB;AACzB,qDAAmC;AACnC,qDAAmC;AACnC,kDAAgC;AAChC,yCAAuB;AAEvB,6CAA2B;AAC3B,2CAAyB;AACzB,iDAA+B;AAC/B,2DAAyC;AACzC,8CAA4B;AAC5B,qDAAmC;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,yDAAuC;AACvC,iDAA+B;AAC/B,2DAAyC;AACzC,0DAAwC;AACxC,qDAAmC;AACnC,qDAAmC;AACnC,8DAA4C;AAC5C,mDAAiC;AACjC,8DAA4C;AAC5C,+DAA6C;AAC7C,2DAAyC;AACzC,wDAAsC;AACtC,sDAAoC;AACpC,4DAA0C;AAC1C,mDAAiC;AACjC,yCAAuB;AACvB,8CAA4B;AAC5B,yDAAuC;AACvC,sDAAoC;AACpC,kEAAgD;AAChD,kEAAgD;AAChD,6CAA2B;AAC3B,sDAAoC;AACpC,0CAAwB;AACxB,uEAAqD;AAErD,mDAAiC;AACjC,qDAAmC;AACnC,gEAA8C;AAC9C,2DAAyC;AAEzC,kDAAgC;AAChC,mDAAiC;AAEjC,2CAAyB;AACzB,gDAA8B;AAC9B,+CAA6B;AAC7B,yDAAuC;AACvC,qDAAmC;AAEnC,wDAAsC;AACtC,uDAAqC;AAErC,sDAAoC;AACpC,wDAAsC;AAEtC,kDAAgC;AAEhC,iDAAiC;AACjC,2CAAyB"}
@@ -45,7 +45,7 @@ export type VoipEventDataSignature = {
45
45
  };
46
46
  };
47
47
  export declare const isVoipEventAgentCalled: (data: VoipEventDataSignature) => data is {
48
- event: 'agent-called';
48
+ event: "agent-called";
49
49
  data: {
50
50
  callerId: {
51
51
  id: string;
@@ -55,7 +55,7 @@ export declare const isVoipEventAgentCalled: (data: VoipEventDataSignature) => d
55
55
  };
56
56
  };
57
57
  export declare const isVoipEventAgentConnected: (data: VoipEventDataSignature) => data is {
58
- event: 'agent-connected';
58
+ event: "agent-connected";
59
59
  data: {
60
60
  queue: string;
61
61
  queuedCalls: string;
@@ -63,7 +63,7 @@ export declare const isVoipEventAgentConnected: (data: VoipEventDataSignature) =
63
63
  };
64
64
  };
65
65
  export declare const isVoipEventCallerJoined: (data: VoipEventDataSignature) => data is {
66
- event: 'caller-joined';
66
+ event: "caller-joined";
67
67
  data: {
68
68
  callerId: {
69
69
  id: string;
@@ -74,21 +74,21 @@ export declare const isVoipEventCallerJoined: (data: VoipEventDataSignature) =>
74
74
  };
75
75
  };
76
76
  export declare const isVoipEventQueueMemberAdded: (data: VoipEventDataSignature) => data is {
77
- event: 'queue-member-added';
77
+ event: "queue-member-added";
78
78
  data: {
79
79
  queue: string;
80
80
  queuedCalls: string;
81
81
  };
82
82
  };
83
83
  export declare const isVoipEventQueueMemberRemoved: (data: VoipEventDataSignature) => data is {
84
- event: 'queue-member-removed';
84
+ event: "queue-member-removed";
85
85
  data: {
86
86
  queue: string;
87
87
  queuedCalls: string;
88
88
  };
89
89
  };
90
90
  export declare const isVoipEventCallAbandoned: (data: VoipEventDataSignature) => data is {
91
- event: 'call-abandoned';
91
+ event: "call-abandoned";
92
92
  data: {
93
93
  queuedCallAfterAbandon: string;
94
94
  queue: string;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@rocket.chat/core-typings",
4
- "version": "6.12.1",
4
+ "version": "6.13.0-rc.1",
5
5
  "devDependencies": {
6
6
  "@rocket.chat/eslint-config": "^0.7.0",
7
7
  "eslint": "~8.45.0",
8
8
  "mongodb": "^4.17.2",
9
9
  "prettier": "~2.8.8",
10
- "typescript": "~5.3.3"
10
+ "typescript": "~5.5.4"
11
11
  },
12
12
  "scripts": {
13
13
  "lint": "eslint --ext .js,.jsx,.ts,.tsx .",
@@ -22,9 +22,9 @@
22
22
  "/dist"
23
23
  ],
24
24
  "dependencies": {
25
- "@rocket.chat/apps-engine": "1.45.0-alpha.866",
25
+ "@rocket.chat/apps-engine": "1.45.0-alpha.868",
26
26
  "@rocket.chat/icons": "~0.38.0",
27
- "@rocket.chat/message-parser": "^0.31.30",
27
+ "@rocket.chat/message-parser": "^0.31.31-rc.0",
28
28
  "@rocket.chat/ui-kit": "~0.36.1",
29
29
  "@types/express": "^4.17.21"
30
30
  },