@rocket.chat/core-typings 6.4.4 → 6.5.0-rc.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.
Files changed (76) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/IBanner.d.ts +2 -2
  3. package/dist/ICloud.d.ts +0 -1
  4. package/dist/IInquiry.d.ts +1 -1
  5. package/dist/IIntegrationHistory.d.ts +2 -1
  6. package/dist/ILivechatVisitor.d.ts +3 -1
  7. package/dist/ILivechatVisitor.js.map +1 -1
  8. package/dist/INps.d.ts +1 -1
  9. package/dist/IOembed.d.ts +1 -7
  10. package/dist/IOembed.js.map +1 -1
  11. package/dist/IRoom.d.ts +1 -1
  12. package/dist/IRoom.js.map +1 -1
  13. package/dist/ISetting.d.ts +1 -1
  14. package/dist/IStats.d.ts +21 -1
  15. package/dist/IWorkspaceInfo.d.ts +12 -0
  16. package/dist/IWorkspaceInfo.js +3 -0
  17. package/dist/IWorkspaceInfo.js.map +1 -0
  18. package/dist/Serialized.d.ts +13 -2
  19. package/dist/Serialized.js +1 -0
  20. package/dist/Serialized.js.map +1 -1
  21. package/dist/cloud/Announcement.d.ts +23 -0
  22. package/dist/cloud/Announcement.js +4 -0
  23. package/dist/cloud/Announcement.js.map +1 -0
  24. package/dist/cloud/NpsSurveyAnnouncement.d.ts +5 -0
  25. package/dist/cloud/NpsSurveyAnnouncement.js +4 -0
  26. package/dist/cloud/NpsSurveyAnnouncement.js.map +1 -0
  27. package/dist/cloud/WorkspaceLicensePayload.d.ts +8 -0
  28. package/dist/cloud/WorkspaceLicensePayload.js +4 -0
  29. package/dist/cloud/WorkspaceLicensePayload.js.map +1 -0
  30. package/dist/cloud/WorkspaceSyncPayload.d.ts +57 -0
  31. package/dist/cloud/WorkspaceSyncPayload.js +4 -0
  32. package/dist/cloud/WorkspaceSyncPayload.js.map +1 -0
  33. package/dist/cloud/index.d.ts +4 -0
  34. package/dist/{ee/ILicense/ILicense.js → cloud/index.js} +1 -1
  35. package/dist/cloud/index.js.map +1 -0
  36. package/dist/index.d.ts +3 -2
  37. package/dist/index.js +16 -2
  38. package/dist/index.js.map +1 -1
  39. package/dist/omnichannel/index.d.ts +1 -0
  40. package/dist/omnichannel/index.js +1 -0
  41. package/dist/omnichannel/index.js.map +1 -1
  42. package/dist/omnichannel/mac.d.ts +9 -0
  43. package/dist/{ee/ILicense/ILicenseTag.js → omnichannel/mac.js} +1 -1
  44. package/dist/omnichannel/mac.js.map +1 -0
  45. package/dist/omnichannel/queue.d.ts +1 -0
  46. package/dist/omnichannel/routing.d.ts +2 -2
  47. package/dist/uikit/BannerView.d.ts +14 -0
  48. package/dist/uikit/BannerView.js +3 -0
  49. package/dist/uikit/BannerView.js.map +1 -0
  50. package/dist/uikit/ContextualBarView.d.ts +12 -0
  51. package/dist/uikit/ContextualBarView.js +3 -0
  52. package/dist/uikit/ContextualBarView.js.map +1 -0
  53. package/dist/uikit/ModalView.d.ts +13 -0
  54. package/dist/uikit/ModalView.js +3 -0
  55. package/dist/uikit/ModalView.js.map +1 -0
  56. package/dist/uikit/ServerInteraction.d.ts +66 -0
  57. package/dist/uikit/ServerInteraction.js +3 -0
  58. package/dist/uikit/ServerInteraction.js.map +1 -0
  59. package/dist/uikit/UserInteraction.d.ts +113 -0
  60. package/dist/uikit/UserInteraction.js +3 -0
  61. package/dist/uikit/UserInteraction.js.map +1 -0
  62. package/dist/uikit/View.d.ts +8 -0
  63. package/dist/uikit/View.js +3 -0
  64. package/dist/uikit/View.js.map +1 -0
  65. package/dist/uikit/index.d.ts +7 -0
  66. package/dist/uikit/index.js +18 -0
  67. package/dist/uikit/index.js.map +1 -0
  68. package/dist/utils.d.ts +1 -0
  69. package/package.json +3 -2
  70. package/dist/UIKit.d.ts +0 -53
  71. package/dist/UIKit.js +0 -17
  72. package/dist/UIKit.js.map +0 -1
  73. package/dist/ee/ILicense/ILicense.d.ts +0 -19
  74. package/dist/ee/ILicense/ILicense.js.map +0 -1
  75. package/dist/ee/ILicense/ILicenseTag.d.ts +0 -4
  76. package/dist/ee/ILicense/ILicenseTag.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # @rocket.chat/core-typings
2
2
 
3
+ ## 6.5.0-rc.0
4
+
5
+ ### Minor Changes
6
+
7
+ - c0ef13a0bf: Added `push` statistic, containing three bits. Each bit represents a boolean:
8
+ ```
9
+ 1 1 1
10
+ | | |
11
+ | | +- push enabled = 0b1 = 1
12
+ | +--- push gateway enabled = 0b10 = 2
13
+ +----- push gateway changed = 0b100 = 4
14
+ ```
15
+ - 92613680b7: Added option to select between two script engine options for the integrations
16
+ - ec1b2b9846: Create a deployment fingerprint to identify possible deployment changes caused by database cloning. A question to the admin will confirm if it's a regular deployment change or an intent of a new deployment and correct identification values as needed.
17
+ The fingerprint is composed by `${siteUrl}${dbConnectionString}` and hashed via `sha256` in `base64`.
18
+ An environment variable named `AUTO_ACCEPT_FINGERPRINT`, when set to `true`, can be used to auto-accept an expected fingerprint change as a regular deployment update.
19
+ - 5f81a0f3cb: Implemented the License library, it is used to handle the functionality like expiration date, modules, limits, etc.
20
+ Also added a version v3 of the license, which contains an extended list of features.
21
+ v2 is still supported, since we convert it to v3 on the fly.
22
+
23
+ ### Patch Changes
24
+
25
+ - dea1fe9191: chore: Calculate & Store MAC stats
26
+ Added new info to the stats: `omnichannelContactsBySource`, `uniqueContactsOfLastMonth`, `uniqueContactsOfLastWeek`, `uniqueContactsOfYesterday`
27
+ - 5b9d6883bf: feat: Improve UI when MAC limits are reached
28
+ feat: Limit endpoints on MAC limit reached
29
+ - dea1fe9191: feat: Disable and annonimize visitors instead of removing
30
+
31
+ ## 6.4.5
32
+
3
33
  ## 6.4.4
4
34
 
5
35
  ## 6.4.3
package/dist/IBanner.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { IRocketChatRecord } from './IRocketChatRecord';
2
2
  import type { IUser } from './IUser';
3
- import type { UiKitBannerPayload } from './UIKit';
3
+ import type * as UiKit from './uikit';
4
4
  export declare enum BannerPlatform {
5
5
  Web = "web",
6
6
  Mobile = "mobile"
@@ -12,7 +12,7 @@ export interface IBanner extends IRocketChatRecord {
12
12
  roles?: string[];
13
13
  createdBy: Pick<IUser, '_id' | 'username'>;
14
14
  createdAt: Date;
15
- view: UiKitBannerPayload;
15
+ view: UiKit.BannerView;
16
16
  active?: boolean;
17
17
  inactivedAt?: Date;
18
18
  snapshot?: string;
package/dist/ICloud.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  export type CloudRegistrationStatus = {
2
- connectToCloud: boolean;
3
2
  email: string;
4
3
  token: string;
5
4
  uniqueId: string;
@@ -30,7 +30,7 @@ export interface ILivechatInquiryRecord extends IRocketChatRecord {
30
30
  ts: Date;
31
31
  message: string;
32
32
  status: LivechatInquiryStatus;
33
- v: Pick<ILivechatVisitor, '_id' | 'username' | 'status' | 'name' | 'token' | 'phone'> & {
33
+ v: Pick<ILivechatVisitor, '_id' | 'username' | 'status' | 'name' | 'token' | 'phone' | 'activity'> & {
34
34
  lastMessageTs?: Date;
35
35
  };
36
36
  t: 'l';
@@ -1,3 +1,4 @@
1
+ import type { OutgoingIntegrationEvent } from './IIntegration';
1
2
  import type { IMessage } from './IMessage';
2
3
  import type { IRocketChatRecord } from './IRocketChatRecord';
3
4
  export interface IIntegrationHistory extends IRocketChatRecord {
@@ -6,7 +7,7 @@ export interface IIntegrationHistory extends IRocketChatRecord {
6
7
  integration: {
7
8
  _id: string;
8
9
  };
9
- event: string;
10
+ event: OutgoingIntegrationEvent;
10
11
  _createdAt: Date;
11
12
  _updatedAt: Date;
12
13
  data?: {
@@ -5,7 +5,7 @@ export interface IVisitorPhone {
5
5
  }
6
6
  export interface IVisitorLastChat {
7
7
  _id: string;
8
- ts: string;
8
+ ts: Date;
9
9
  }
10
10
  export interface ILivechatVisitorConnectionData {
11
11
  httpHeaders: {
@@ -41,6 +41,8 @@ export interface ILivechatVisitor extends IRocketChatRecord {
41
41
  contactManager?: {
42
42
  username: string;
43
43
  };
44
+ activity?: string[];
45
+ disabled?: boolean;
44
46
  }
45
47
  export interface ILivechatVisitorDTO {
46
48
  id?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ILivechatVisitor.js","sourceRoot":"","sources":["../src/ILivechatVisitor.ts"],"names":[],"mappings":";;;AAqEO,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":";;;AAuEO,MAAM,kBAAkB,GAAG,CAAC,CAAM,EAAyB,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,KAAK,QAAQ,CAAC;AAArF,QAAA,kBAAkB,sBAAmE"}
package/dist/INps.d.ts CHANGED
@@ -23,7 +23,7 @@ export interface INpsVote extends IRocketChatRecord {
23
23
  npsId: INps['_id'];
24
24
  ts: Date;
25
25
  identifier: string;
26
- roles: IUser['roles'];
26
+ roles?: IUser['roles'];
27
27
  score: number;
28
28
  comment: string;
29
29
  status: INpsVoteStatus;
package/dist/IOembed.d.ts CHANGED
@@ -1,7 +1,4 @@
1
- /// <reference types="node" />
2
- import type Url from 'url';
3
1
  import type { MessageAttachment } from './IMessage';
4
- export type ParsedUrl = Pick<Url.UrlWithParsedQuery, 'host' | 'hash' | 'pathname' | 'protocol' | 'port' | 'query' | 'search' | 'hostname'>;
5
2
  export type OEmbedMeta = {
6
3
  [key: string]: string;
7
4
  } & {
@@ -9,8 +6,7 @@ export type OEmbedMeta = {
9
6
  oembedUrl: string | string[];
10
7
  };
11
8
  export type OEmbedUrlContent = {
12
- urlObj: Url.UrlWithParsedQuery;
13
- parsedUrl: ParsedUrl;
9
+ urlObj: URL;
14
10
  headers: {
15
11
  [k: string]: string;
16
12
  };
@@ -26,7 +22,6 @@ export type OEmbedUrlContentResult = {
26
22
  [key: string]: string;
27
23
  };
28
24
  body: string;
29
- parsedUrl: Pick<Url.UrlWithStringQuery, 'host' | 'hash' | 'pathname' | 'protocol' | 'port' | 'query' | 'search' | 'hostname'>;
30
25
  statusCode: number;
31
26
  attachments?: MessageAttachment[];
32
27
  };
@@ -37,7 +32,6 @@ export type OEmbedUrlWithMetadata = {
37
32
  headers: {
38
33
  [k: string]: string;
39
34
  };
40
- parsedUrl: Pick<Url.UrlWithStringQuery, 'host' | 'hash' | 'pathname' | 'protocol' | 'port' | 'query' | 'search' | 'hostname'>;
41
35
  content: OEmbedUrlContent;
42
36
  };
43
37
  export declare const isOEmbedUrlWithMetadata: (value: any) => value is OEmbedUrlWithMetadata;
@@ -1 +1 @@
1
- {"version":3,"file":"IOembed.js","sourceRoot":"","sources":["../src/IOembed.ts"],"names":[],"mappings":";;;AAkCO,MAAM,wBAAwB,GAAG,CAAC,KAAU,EAAmC,EAAE,CAAC,aAAa,IAAI,KAAK,CAAC;AAAnG,QAAA,wBAAwB,4BAA2E;AAUzG,MAAM,uBAAuB,GAAG,CAAC,KAAU,EAAkC,EAAE,CAAC,MAAM,IAAI,KAAK,CAAC;AAA1F,QAAA,uBAAuB,2BAAmE"}
1
+ {"version":3,"file":"IOembed.js","sourceRoot":"","sources":["../src/IOembed.ts"],"names":[],"mappings":";;;AA4BO,MAAM,wBAAwB,GAAG,CAAC,KAAU,EAAmC,EAAE,CAAC,aAAa,IAAI,KAAK,CAAC;AAAnG,QAAA,wBAAwB,4BAA2E;AASzG,MAAM,uBAAuB,GAAG,CAAC,KAAU,EAAkC,EAAE,CAAC,MAAM,IAAI,KAAK,CAAC;AAA1F,QAAA,uBAAuB,2BAAmE"}
package/dist/IRoom.d.ts CHANGED
@@ -120,7 +120,7 @@ export declare enum OmnichannelSourceType {
120
120
  }
121
121
  export interface IOmnichannelGenericRoom extends Omit<IRoom, 'default' | 'featured' | 'broadcast' | ''> {
122
122
  t: 'l' | 'v';
123
- v: Pick<ILivechatVisitor, '_id' | 'username' | 'status' | 'name' | 'token'> & {
123
+ v: Pick<ILivechatVisitor, '_id' | 'username' | 'status' | 'name' | 'token' | 'activity'> & {
124
124
  lastMessageTs?: Date;
125
125
  phone?: string;
126
126
  };
package/dist/IRoom.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"IRoom.js","sourceRoot":"","sources":["../src/IRoom.ts"],"names":[],"mappings":";;;AAmGO,MAAM,kBAAkB,GAAG,CAAC,IAAoB,EAA6B,EAAE,CACrF,kBAAkB,IAAI,IAAI,IAAK,IAAY,CAAC,gBAAgB,KAAK,IAAI,CAAC;AAD1D,QAAA,kBAAkB,sBACwC;AAWhE,MAAM,eAAe,GAAG,CAAC,IAAoB,EAA0B,EAAE,CAAC,WAAW,IAAI,IAAI,IAAK,IAAY,CAAC,SAAS,KAAK,IAAI,CAAC;AAA5H,QAAA,eAAe,mBAA6G;AAWlI,MAAM,UAAU,GAAG,CAAC,IAAoB,EAAqB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;AAA1E,QAAA,UAAU,cAAgE;AAChF,MAAM,iBAAiB,GAAG,CAAC,IAAoB,EAAqB,EAAE,CAAC,IAAA,kBAAU,EAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC;AAApG,QAAA,iBAAiB,qBAAmF;AAC1G,MAAM,gBAAgB,GAAG,CAAC,IAAoB,EAAqB,EAAE,CAAC,IAAA,kBAAU,EAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC;AAAnG,QAAA,gBAAgB,oBAAmF;AAEzG,MAAM,YAAY,GAAG,CAAC,IAAoB,EAAiB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;AAApE,QAAA,YAAY,gBAAwD;AAC1E,MAAM,mBAAmB,GAAG,CAAC,IAAoB,EAAiB,EAAE,CAAC,IAAA,oBAAY,EAAC,IAAI,CAAC,IAAI,IAAI,CAAC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ACxD,CAAC,CAAC;AANW,QAAA,8BAA8B,kCAMzC"}
@@ -50,7 +50,7 @@ export interface ISettingBase {
50
50
  hidden?: boolean;
51
51
  modules?: Array<string>;
52
52
  invalidValue?: SettingValue;
53
- valueSource?: string;
53
+ valueSource?: 'packageValue' | 'processEnvValue';
54
54
  secret?: boolean;
55
55
  i18nDescription?: string;
56
56
  autocomplete?: boolean;
package/dist/IStats.d.ts CHANGED
@@ -4,10 +4,21 @@ import type { CpuInfo } from 'os';
4
4
  import type { DeviceSessionAggregationResult, OSSessionAggregationResult, UserSessionAggregationResult } from './ISession';
5
5
  import type { ISettingStatisticsObject } from './ISetting';
6
6
  import type { ITeamStats } from './ITeam';
7
+ import type { MACStats } from './omnichannel';
7
8
  export interface IStats {
8
9
  _id: string;
9
- wizard: Record<string, unknown>;
10
+ wizard: {
11
+ organizationType?: string;
12
+ industry?: string;
13
+ size?: string;
14
+ country?: string;
15
+ language?: string;
16
+ serverType?: string;
17
+ registerServer?: boolean;
18
+ };
10
19
  uniqueId: string;
20
+ deploymentFingerprintHash: string;
21
+ deploymentFingerprintVerified: boolean;
11
22
  installedAt?: string;
12
23
  version?: string;
13
24
  tag?: string;
@@ -40,6 +51,7 @@ export interface IStats {
40
51
  totalChannelMessages: number;
41
52
  totalPrivateGroupMessages: number;
42
53
  totalDirectMessages: number;
54
+ totalDiscussionsMessages: number;
43
55
  totalLivechatMessages: number;
44
56
  totalTriggers: number;
45
57
  totalMessages: number;
@@ -87,6 +99,10 @@ export interface IStats {
87
99
  omnichannelSources: {
88
100
  [key: string]: number | string;
89
101
  }[];
102
+ omnichannelContactsBySource: MACStats;
103
+ uniqueContactsOfLastMonth: MACStats;
104
+ uniqueContactsOfLastWeek: MACStats;
105
+ uniqueContactsOfYesterday: MACStats;
90
106
  departments: number;
91
107
  archivedDepartments: number;
92
108
  routingAlgorithm: string;
@@ -207,10 +223,14 @@ export interface IStats {
207
223
  totalCustomRoles: number;
208
224
  totalWebRTCCalls: number;
209
225
  uncaughtExceptionsCount: number;
226
+ push: number;
227
+ dailyPeakConnections: number;
228
+ maxMonthlyPeakConnections: number;
210
229
  matrixFederation: {
211
230
  enabled: boolean;
212
231
  };
213
232
  webRTCEnabled: boolean;
214
233
  webRTCEnabledForOmnichannel: boolean;
215
234
  omnichannelWebRTCCalls: number;
235
+ statsToken?: string;
216
236
  }
@@ -0,0 +1,12 @@
1
+ import type { IServerInfo } from './IServerInfo';
2
+ export type IWorkspaceInfo = {
3
+ info?: IServerInfo;
4
+ supportedVersions?: {
5
+ signed: string;
6
+ };
7
+ minimumClientVersions: {
8
+ desktop: string;
9
+ mobile: string;
10
+ };
11
+ version: string;
12
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IWorkspaceInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IWorkspaceInfo.js","sourceRoot":"","sources":["../src/IWorkspaceInfo.ts"],"names":[],"mappings":""}
@@ -1,3 +1,14 @@
1
- export type Serialized<T> = T extends Date ? Exclude<T, Date> | string : T extends boolean | number | string | null | undefined ? T : T extends {} ? {
1
+ type SerializablePrimitive = boolean | number | string | null;
2
+ type UnserializablePrimitive = Function | bigint | symbol | undefined;
3
+ type CustomSerializable<T> = {
4
+ toJSON(key: string): T;
5
+ };
6
+ /**
7
+ * The type of a value that was serialized via `JSON.stringify` and then deserialized via `JSON.parse`.
8
+ */
9
+ export type Serialized<T> = T extends CustomSerializable<infer U> ? Serialized<U> : T extends [any, ...any] ? {
10
+ [K in keyof T]: T extends UnserializablePrimitive ? null : Serialized<T[K]>;
11
+ } : T extends any[] ? Serialized<T[number]>[] : T extends object ? {
2
12
  [K in keyof T]: Serialized<T[K]>;
3
- } : null;
13
+ } : T extends SerializablePrimitive ? T : T extends UnserializablePrimitive ? undefined : null;
14
+ export {};
@@ -1,3 +1,4 @@
1
1
  "use strict";
2
+ /* eslint-disable @typescript-eslint/ban-types */
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
4
  //# sourceMappingURL=Serialized.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Serialized.js","sourceRoot":"","sources":["../src/Serialized.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"Serialized.js","sourceRoot":"","sources":["../src/Serialized.ts"],"names":[],"mappings":";AAAA,iDAAiD"}
@@ -0,0 +1,23 @@
1
+ import type { IRocketChatRecord } from '../IRocketChatRecord';
2
+ import type * as UiKit from '../uikit';
3
+ type TargetPlatform = 'web' | 'mobile';
4
+ type Dictionary = {
5
+ [lng: string]: {
6
+ [key: string]: string;
7
+ };
8
+ };
9
+ type Creator = 'cloud' | 'system';
10
+ export interface Announcement extends IRocketChatRecord {
11
+ selector?: {
12
+ roles?: string[];
13
+ };
14
+ platform: TargetPlatform[];
15
+ expireAt: Date;
16
+ startAt: Date;
17
+ createdBy: Creator;
18
+ createdAt: Date;
19
+ dictionary?: Dictionary;
20
+ view: UiKit.View;
21
+ surface: 'banner' | 'modal';
22
+ }
23
+ export {};
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ /* eslint-disable @typescript-eslint/naming-convention */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=Announcement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Announcement.js","sourceRoot":"","sources":["../../src/cloud/Announcement.ts"],"names":[],"mappings":";AAAA,yDAAyD"}
@@ -0,0 +1,5 @@
1
+ export interface NpsSurveyAnnouncement {
2
+ id: string;
3
+ startAt: Date;
4
+ expireAt: Date;
5
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ /* eslint-disable @typescript-eslint/naming-convention */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=NpsSurveyAnnouncement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NpsSurveyAnnouncement.js","sourceRoot":"","sources":["../../src/cloud/NpsSurveyAnnouncement.ts"],"names":[],"mappings":";AAAA,yDAAyD"}
@@ -0,0 +1,8 @@
1
+ export interface WorkspaceLicensePayload {
2
+ version: number;
3
+ address: string;
4
+ license: string;
5
+ updatedAt: Date;
6
+ modules: string;
7
+ expireAt: Date;
8
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ /* eslint-disable @typescript-eslint/naming-convention */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=WorkspaceLicensePayload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WorkspaceLicensePayload.js","sourceRoot":"","sources":["../../src/cloud/WorkspaceLicensePayload.ts"],"names":[],"mappings":";AAAA,yDAAyD"}
@@ -0,0 +1,57 @@
1
+ import type { IBanner } from '../IBanner';
2
+ import type { Announcement } from './Announcement';
3
+ import type { NpsSurveyAnnouncement } from './NpsSurveyAnnouncement';
4
+ export interface WorkspaceSyncPayload {
5
+ workspaceId: string;
6
+ publicKey?: string;
7
+ trial?: {
8
+ trialing: boolean;
9
+ trialID: string;
10
+ endDate: Date;
11
+ marketing: {
12
+ utmContent: string;
13
+ utmMedium: string;
14
+ utmSource: string;
15
+ utmCampaign: string;
16
+ };
17
+ DowngradesToPlan: {
18
+ id: string;
19
+ };
20
+ trialRequested: boolean;
21
+ };
22
+ /** @deprecated */
23
+ nps?: NpsSurveyAnnouncement;
24
+ /** @deprecated */
25
+ banners?: IBanner[];
26
+ }
27
+ export interface WorkspaceSyncRequestPayload {
28
+ uniqueId: string;
29
+ workspaceId: string;
30
+ seats: number;
31
+ MAC: number;
32
+ address: string;
33
+ siteName: string;
34
+ deploymentMethod: string;
35
+ deploymentPlatform: string;
36
+ version: string;
37
+ licenseVersion: number;
38
+ connectionDisable: boolean;
39
+ }
40
+ export interface WorkspaceSyncResponse {
41
+ workspaceId: string;
42
+ publicKey: string;
43
+ license: unknown;
44
+ }
45
+ export interface WorkspaceCommsRequestPayload {
46
+ npsEnabled: boolean;
47
+ deploymentMethod: string;
48
+ deploymentPlatform: string;
49
+ version: string;
50
+ }
51
+ export interface WorkspaceCommsResponsePayload {
52
+ nps?: NpsSurveyAnnouncement | null;
53
+ announcements?: {
54
+ create: Announcement[];
55
+ delete: Announcement['_id'][];
56
+ };
57
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ /* eslint-disable @typescript-eslint/naming-convention */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=WorkspaceSyncPayload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WorkspaceSyncPayload.js","sourceRoot":"","sources":["../../src/cloud/WorkspaceSyncPayload.ts"],"names":[],"mappings":";AAAA,yDAAyD"}
@@ -0,0 +1,4 @@
1
+ export { Announcement } from './Announcement';
2
+ export { NpsSurveyAnnouncement } from './NpsSurveyAnnouncement';
3
+ export { WorkspaceLicensePayload } from './WorkspaceLicensePayload';
4
+ export { WorkspaceSyncPayload, WorkspaceSyncRequestPayload, WorkspaceSyncResponse, WorkspaceCommsRequestPayload, WorkspaceCommsResponsePayload, } from './WorkspaceSyncPayload';
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=ILicense.js.map
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cloud/index.ts"],"names":[],"mappings":""}
package/dist/index.d.ts CHANGED
@@ -4,7 +4,6 @@ export * from './FeaturedApps';
4
4
  export * from './AppRequests';
5
5
  export * from './MarketplaceRest';
6
6
  export * from './IRoom';
7
- export * from './UIKit';
8
7
  export * from './IMessage';
9
8
  export * from './federation';
10
9
  export * from './Serialized';
@@ -19,6 +18,7 @@ export * from './IUserAction';
19
18
  export * from './IBanner';
20
19
  export * from './IStats';
21
20
  export * from './IServerInfo';
21
+ export * from './IWorkspaceInfo';
22
22
  export * from './IInstanceStatus';
23
23
  export * from './IWebdavAccount';
24
24
  export * from './IPermission';
@@ -37,7 +37,6 @@ export * from './IUserDataFile';
37
37
  export * from './IUserSession';
38
38
  export * from './IUserStatus';
39
39
  export * from './IUser';
40
- export * from './ee/ILicense/ILicense';
41
40
  export * from './ee/IAuditLog';
42
41
  export * from './import';
43
42
  export * from './IIncomingMessage';
@@ -117,3 +116,5 @@ export * from './migrations/IControl';
117
116
  export * from './ICustomOAuthConfig';
118
117
  export * from './IModerationReport';
119
118
  export * from './CustomFieldMetadata';
119
+ export * as Cloud from './cloud';
120
+ export * as UiKit from './uikit';
package/dist/index.js CHANGED
@@ -10,17 +10,29 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
10
10
  if (k2 === undefined) k2 = k;
11
11
  o[k2] = m[k];
12
12
  }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
13
18
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
19
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
20
  };
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
16
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.UiKit = exports.Cloud = void 0;
17
30
  __exportStar(require("./Apps"), exports);
18
31
  __exportStar(require("./AppOverview"), exports);
19
32
  __exportStar(require("./FeaturedApps"), exports);
20
33
  __exportStar(require("./AppRequests"), exports);
21
34
  __exportStar(require("./MarketplaceRest"), exports);
22
35
  __exportStar(require("./IRoom"), exports);
23
- __exportStar(require("./UIKit"), exports);
24
36
  __exportStar(require("./IMessage"), exports);
25
37
  __exportStar(require("./federation"), exports);
26
38
  __exportStar(require("./Serialized"), exports);
@@ -35,6 +47,7 @@ __exportStar(require("./IUserAction"), exports);
35
47
  __exportStar(require("./IBanner"), exports);
36
48
  __exportStar(require("./IStats"), exports);
37
49
  __exportStar(require("./IServerInfo"), exports);
50
+ __exportStar(require("./IWorkspaceInfo"), exports);
38
51
  __exportStar(require("./IInstanceStatus"), exports);
39
52
  __exportStar(require("./IWebdavAccount"), exports);
40
53
  __exportStar(require("./IPermission"), exports);
@@ -53,7 +66,6 @@ __exportStar(require("./IUserDataFile"), exports);
53
66
  __exportStar(require("./IUserSession"), exports);
54
67
  __exportStar(require("./IUserStatus"), exports);
55
68
  __exportStar(require("./IUser"), exports);
56
- __exportStar(require("./ee/ILicense/ILicense"), exports);
57
69
  __exportStar(require("./ee/IAuditLog"), exports);
58
70
  __exportStar(require("./import"), exports);
59
71
  __exportStar(require("./IIncomingMessage"), exports);
@@ -136,4 +148,6 @@ __exportStar(require("./migrations/IControl"), exports);
136
148
  __exportStar(require("./ICustomOAuthConfig"), exports);
137
149
  __exportStar(require("./IModerationReport"), exports);
138
150
  __exportStar(require("./CustomFieldMetadata"), exports);
151
+ exports.Cloud = __importStar(require("./cloud"));
152
+ exports.UiKit = __importStar(require("./uikit"));
139
153
  //# sourceMappingURL=index.js.map
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,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,gDAA8B;AAC9B,oDAAkC;AAClC,mDAAiC;AACjC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0B;AAC1B,wDAAwD;AAExD,gDAA8B;AAC9B,+DAA6C;AAC7C,sDAAoC;AACpC,oDAAkC;AAClC,8CAA4B;AAC5B,8CAA4B;AAC5B,+CAA6B;AAC7B,mDAAiC;AACjC,sDAAoC;AACpC,uDAAqC;AACrC,mDAAiC;AACjC,4CAA0B;AAE1B,uCAAuC;AAEvC,yCAAuB;AACvB,kCAAkC;AAElC,6DAA2C;AAC3C,4DAA0C;AAE1C,iDAA+B;AAC/B,8CAA4B;AAC5B,qDAAmC;AACnC,uDAAqC;AACrC,qDAAmC;AACnC,yDAAuC;AACvC,iDAA+B;AAC/B,2DAAyC;AACzC,0DAAwC;AACxC,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,iDAAiC;AAEjC,iDAAiC"}
@@ -2,3 +2,4 @@ export * from './sms';
2
2
  export * from './routing';
3
3
  export * from './queue';
4
4
  export * from './reports';
5
+ export * from './mac';
@@ -18,4 +18,5 @@ __exportStar(require("./sms"), exports);
18
18
  __exportStar(require("./routing"), exports);
19
19
  __exportStar(require("./queue"), exports);
20
20
  __exportStar(require("./reports"), exports);
21
+ __exportStar(require("./mac"), exports);
21
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/omnichannel/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,4CAA0B;AAC1B,0CAAwB;AACxB,4CAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/omnichannel/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB;AACtB,4CAA0B;AAC1B,0CAAwB;AACxB,4CAA0B;AAC1B,wCAAsB"}
@@ -0,0 +1,9 @@
1
+ export type MACStats = {
2
+ contactsCount: number;
3
+ conversationsCount: number;
4
+ sources: {
5
+ source: string;
6
+ contactsCount: number;
7
+ conversationsCount: number;
8
+ }[];
9
+ };
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=ILicenseTag.js.map
3
+ //# sourceMappingURL=mac.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mac.js","sourceRoot":"","sources":["../../src/omnichannel/mac.ts"],"names":[],"mappings":""}
@@ -2,4 +2,5 @@ export interface IOmnichannelQueue {
2
2
  start(): Promise<void>;
3
3
  shouldStart(): void;
4
4
  stop(): Promise<void>;
5
+ isRunning(): boolean;
5
6
  }
@@ -20,7 +20,7 @@ export interface IRoutingMethod {
20
20
  config?: RoutingMethodConfig;
21
21
  }
22
22
  export type TransferData = {
23
- userId: string;
23
+ userId?: string;
24
24
  departmentId?: string;
25
25
  department?: Pick<ILivechatDepartment, '_id' | 'name'>;
26
26
  transferredBy: {
@@ -32,7 +32,7 @@ export type TransferData = {
32
32
  name?: string;
33
33
  };
34
34
  clientAction?: boolean;
35
- scope: 'agent' | 'department' | 'queue' | 'autoTransferUnansweredChatsToAgent' | 'autoTransferUnansweredChatsToQueue';
35
+ scope?: 'agent' | 'department' | 'queue' | 'autoTransferUnansweredChatsToAgent' | 'autoTransferUnansweredChatsToQueue';
36
36
  comment?: string;
37
37
  };
38
38
  export type TransferByData = {
@@ -0,0 +1,14 @@
1
+ import type { Keys as IconName } from '@rocket.chat/icons';
2
+ import type { BannerSurfaceLayout } from '@rocket.chat/ui-kit';
3
+ import type { View } from './View';
4
+ /**
5
+ * A view that is displayed as a banner.
6
+ */
7
+ export type BannerView = View & {
8
+ viewId: string;
9
+ inline?: boolean;
10
+ variant?: 'neutral' | 'info' | 'success' | 'warning' | 'danger';
11
+ icon?: IconName;
12
+ title?: string;
13
+ blocks: BannerSurfaceLayout;
14
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=BannerView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerView.js","sourceRoot":"","sources":["../../src/uikit/BannerView.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ import type { ButtonElement, ContextualBarSurfaceLayout, TextObject } from '@rocket.chat/ui-kit';
2
+ import type { View } from './View';
3
+ /**
4
+ * A view that is displayed as a contextual bar.
5
+ */
6
+ export type ContextualBarView = View & {
7
+ id: string;
8
+ title: TextObject;
9
+ close?: ButtonElement;
10
+ submit?: ButtonElement;
11
+ blocks: ContextualBarSurfaceLayout;
12
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ContextualBarView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContextualBarView.js","sourceRoot":"","sources":["../../src/uikit/ContextualBarView.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ import type { ButtonElement, ModalSurfaceLayout, TextObject } from '@rocket.chat/ui-kit';
2
+ import type { View } from './View';
3
+ /**
4
+ * A view that is displayed as a modal dialog.
5
+ */
6
+ export type ModalView = View & {
7
+ id: string;
8
+ showIcon?: boolean;
9
+ title: TextObject;
10
+ close?: ButtonElement;
11
+ submit?: ButtonElement;
12
+ blocks: ModalSurfaceLayout;
13
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ModalView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModalView.js","sourceRoot":"","sources":["../../src/uikit/ModalView.ts"],"names":[],"mappings":""}
@@ -0,0 +1,66 @@
1
+ import type { BannerView } from './BannerView';
2
+ import type { ContextualBarView } from './ContextualBarView';
3
+ import type { ModalView } from './ModalView';
4
+ type OpenModalServerInteraction = {
5
+ type: 'modal.open';
6
+ triggerId: string;
7
+ appId: string;
8
+ view: ModalView;
9
+ };
10
+ type UpdateModalServerInteraction = {
11
+ type: 'modal.update';
12
+ triggerId: string;
13
+ appId: string;
14
+ view: ModalView;
15
+ };
16
+ type CloseModalServerInteraction = {
17
+ type: 'modal.close';
18
+ triggerId: string;
19
+ appId: string;
20
+ };
21
+ type OpenBannerServerInteraction = {
22
+ type: 'banner.open';
23
+ triggerId: string;
24
+ appId: string;
25
+ } & BannerView;
26
+ type UpdateBannerServerInteraction = {
27
+ type: 'banner.update';
28
+ triggerId: string;
29
+ appId: string;
30
+ view: BannerView;
31
+ };
32
+ type CloseBannerServerInteraction = {
33
+ type: 'banner.close';
34
+ triggerId: string;
35
+ appId: string;
36
+ viewId: BannerView['viewId'];
37
+ };
38
+ type OpenContextualBarServerInteraction = {
39
+ type: 'contextual_bar.open';
40
+ triggerId: string;
41
+ appId: string;
42
+ view: ContextualBarView;
43
+ };
44
+ type UpdateContextualBarServerInteraction = {
45
+ type: 'contextual_bar.update';
46
+ triggerId: string;
47
+ appId: string;
48
+ view: ContextualBarView;
49
+ };
50
+ type CloseContextualBarServerInteraction = {
51
+ type: 'contextual_bar.close';
52
+ triggerId: string;
53
+ appId: string;
54
+ view: ContextualBarView;
55
+ };
56
+ type ReportErrorsServerInteraction = {
57
+ type: 'errors';
58
+ triggerId: string;
59
+ appId: string;
60
+ viewId: ModalView['id'] | BannerView['viewId'] | ContextualBarView['id'];
61
+ errors: {
62
+ [field: string]: string;
63
+ }[];
64
+ };
65
+ export type ServerInteraction = OpenModalServerInteraction | UpdateModalServerInteraction | CloseModalServerInteraction | OpenBannerServerInteraction | UpdateBannerServerInteraction | CloseBannerServerInteraction | OpenContextualBarServerInteraction | UpdateContextualBarServerInteraction | CloseContextualBarServerInteraction | ReportErrorsServerInteraction;
66
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ServerInteraction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ServerInteraction.js","sourceRoot":"","sources":["../../src/uikit/ServerInteraction.ts"],"names":[],"mappings":""}
@@ -0,0 +1,113 @@
1
+ import type { IMessage } from '../IMessage';
2
+ import type { IRoom } from '../IRoom';
3
+ import type { View } from './View';
4
+ export type MessageBlockActionUserInteraction = {
5
+ type: 'blockAction';
6
+ actionId: string;
7
+ payload: {
8
+ blockId: string;
9
+ value: unknown;
10
+ };
11
+ container: {
12
+ type: 'message';
13
+ id: IMessage['_id'];
14
+ };
15
+ mid: IMessage['_id'];
16
+ tmid?: IMessage['_id'];
17
+ rid: IRoom['_id'];
18
+ triggerId: string;
19
+ };
20
+ export type ViewBlockActionUserInteraction = {
21
+ type: 'blockAction';
22
+ actionId: string;
23
+ payload: {
24
+ blockId: string;
25
+ value: unknown;
26
+ };
27
+ container: {
28
+ type: 'view';
29
+ id: string;
30
+ };
31
+ triggerId: string;
32
+ };
33
+ export type ViewClosedUserInteraction = {
34
+ type: 'viewClosed';
35
+ payload: {
36
+ viewId: string;
37
+ view: View & {
38
+ id: string;
39
+ state: {
40
+ [blockId: string]: {
41
+ [key: string]: unknown;
42
+ };
43
+ };
44
+ };
45
+ isCleared?: boolean;
46
+ };
47
+ triggerId: string;
48
+ };
49
+ export type ViewSubmitUserInteraction = {
50
+ type: 'viewSubmit';
51
+ actionId?: undefined;
52
+ payload: {
53
+ view: View & {
54
+ id: string;
55
+ state: {
56
+ [blockId: string]: {
57
+ [key: string]: unknown;
58
+ };
59
+ };
60
+ };
61
+ };
62
+ triggerId: string;
63
+ viewId: string;
64
+ };
65
+ export type MessageBoxActionButtonUserInteraction = {
66
+ type: 'actionButton';
67
+ actionId: string;
68
+ payload: {
69
+ context: 'messageBoxAction';
70
+ message: string;
71
+ };
72
+ mid?: undefined;
73
+ tmid?: IMessage['_id'];
74
+ rid: IRoom['_id'];
75
+ triggerId: string;
76
+ };
77
+ export type UserDropdownActionButtonUserInteraction = {
78
+ type: 'actionButton';
79
+ actionId: string;
80
+ payload: {
81
+ context: 'userDropdownAction';
82
+ message?: undefined;
83
+ };
84
+ mid?: undefined;
85
+ tmid?: undefined;
86
+ rid?: undefined;
87
+ triggerId: string;
88
+ };
89
+ export type MesssageActionButtonUserInteraction = {
90
+ type: 'actionButton';
91
+ actionId: string;
92
+ payload: {
93
+ context: 'messageAction';
94
+ message?: undefined;
95
+ };
96
+ mid: IMessage['_id'];
97
+ tmid?: IMessage['_id'];
98
+ rid: IRoom['_id'];
99
+ triggerId: string;
100
+ };
101
+ export type RoomActionButtonUserInteraction = {
102
+ type: 'actionButton';
103
+ actionId: string;
104
+ payload: {
105
+ context: 'roomAction';
106
+ message?: undefined;
107
+ };
108
+ mid?: undefined;
109
+ tmid?: undefined;
110
+ rid: IRoom['_id'];
111
+ triggerId: string;
112
+ };
113
+ export type UserInteraction = MessageBlockActionUserInteraction | ViewBlockActionUserInteraction | ViewClosedUserInteraction | ViewSubmitUserInteraction | MessageBoxActionButtonUserInteraction | UserDropdownActionButtonUserInteraction | MesssageActionButtonUserInteraction | RoomActionButtonUserInteraction;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=UserInteraction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserInteraction.js","sourceRoot":"","sources":["../../src/uikit/UserInteraction.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ import type { LayoutBlock } from '@rocket.chat/ui-kit';
2
+ /**
3
+ * An instance of a UiKit surface and its metadata.
4
+ */
5
+ export type View = {
6
+ appId: string;
7
+ blocks: LayoutBlock[];
8
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=View.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"View.js","sourceRoot":"","sources":["../../src/uikit/View.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export * from '@rocket.chat/ui-kit';
2
+ export type { UserInteraction, MessageBlockActionUserInteraction, ViewBlockActionUserInteraction, ViewClosedUserInteraction, ViewSubmitUserInteraction, MessageBoxActionButtonUserInteraction, UserDropdownActionButtonUserInteraction, MesssageActionButtonUserInteraction, RoomActionButtonUserInteraction, } from './UserInteraction';
3
+ export type { View } from './View';
4
+ export type { BannerView } from './BannerView';
5
+ export type { ContextualBarView } from './ContextualBarView';
6
+ export type { ModalView } from './ModalView';
7
+ export type { ServerInteraction } from './ServerInteraction';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("@rocket.chat/ui-kit"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/uikit/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC"}
package/dist/utils.d.ts CHANGED
@@ -12,3 +12,4 @@ export type RequiredField<T, K extends keyof T> = T & Required<Pick<T, K>>;
12
12
  export type DeepWritable<T> = T extends (...args: any) => any ? T : {
13
13
  -readonly [P in keyof T]: DeepWritable<T[P]>;
14
14
  };
15
+ export type DistributiveOmit<T, K extends keyof any> = T extends any ? Omit<T, K> : never;
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
+ "$schema": "https://json.schemastore.org/package",
2
3
  "name": "@rocket.chat/core-typings",
3
- "version": "6.4.4",
4
+ "version": "6.5.0-rc.0",
4
5
  "devDependencies": {
5
6
  "@rocket.chat/eslint-config": "^0.6.0",
6
7
  "eslint": "~8.45.0",
@@ -24,7 +25,7 @@
24
25
  "@rocket.chat/apps-engine": "1.41.0-alpha.290",
25
26
  "@rocket.chat/icons": "^0.32.0",
26
27
  "@rocket.chat/message-parser": "next",
27
- "@rocket.chat/ui-kit": "next"
28
+ "@rocket.chat/ui-kit": "^0.32.1"
28
29
  },
29
30
  "volta": {
30
31
  "extends": "../../package.json"
package/dist/UIKit.d.ts DELETED
@@ -1,53 +0,0 @@
1
- import { UIKitInteractionType as UIKitInteractionTypeApi } from '@rocket.chat/apps-engine/definition/uikit';
2
- import type { IDividerBlock, ISectionBlock, IActionsBlock, IContextBlock, IInputBlock } from '@rocket.chat/apps-engine/definition/uikit/blocks/Blocks';
3
- declare enum UIKitInteractionTypeExtended {
4
- BANNER_OPEN = "banner.open",
5
- BANNER_UPDATE = "banner.update",
6
- BANNER_CLOSE = "banner.close"
7
- }
8
- export type UIKitInteractionType = UIKitInteractionTypeApi | UIKitInteractionTypeExtended;
9
- export declare const UIKitInteractionTypes: {
10
- BANNER_OPEN: UIKitInteractionTypeExtended.BANNER_OPEN;
11
- BANNER_UPDATE: UIKitInteractionTypeExtended.BANNER_UPDATE;
12
- BANNER_CLOSE: UIKitInteractionTypeExtended.BANNER_CLOSE;
13
- MODAL_OPEN: UIKitInteractionTypeApi.MODAL_OPEN;
14
- MODAL_CLOSE: UIKitInteractionTypeApi.MODAL_CLOSE;
15
- MODAL_UPDATE: UIKitInteractionTypeApi.MODAL_UPDATE;
16
- CONTEXTUAL_BAR_OPEN: UIKitInteractionTypeApi.CONTEXTUAL_BAR_OPEN;
17
- CONTEXTUAL_BAR_CLOSE: UIKitInteractionTypeApi.CONTEXTUAL_BAR_CLOSE;
18
- CONTEXTUAL_BAR_UPDATE: UIKitInteractionTypeApi.CONTEXTUAL_BAR_UPDATE;
19
- ERRORS: UIKitInteractionTypeApi.ERRORS;
20
- };
21
- export type UiKitPayload = {
22
- viewId: string;
23
- appId: string;
24
- blocks: (IDividerBlock | ISectionBlock | IActionsBlock | IContextBlock | IInputBlock)[];
25
- };
26
- export type UiKitBannerPayload = UiKitPayload & {
27
- inline?: boolean;
28
- variant?: 'neutral' | 'info' | 'success' | 'warning' | 'danger';
29
- icon?: string;
30
- title?: string;
31
- };
32
- export type UIKitUserInteraction = {
33
- type: UIKitInteractionType;
34
- } & UiKitPayload;
35
- export type UiKitBannerProps = {
36
- payload: UiKitBannerPayload;
37
- };
38
- export type UIKitUserInteractionResult = UIKitUserInteractionResultError | UIKitUserInteraction;
39
- type UIKitUserInteractionResultError = UIKitUserInteraction & {
40
- type: UIKitInteractionTypeApi.ERRORS;
41
- errors?: Array<{
42
- [key: string]: string;
43
- }>;
44
- };
45
- export declare const isErrorType: (result: UIKitUserInteractionResult) => result is UIKitUserInteractionResultError;
46
- export type UIKitActionEvent = {
47
- blockId: string;
48
- value?: unknown;
49
- appId: string;
50
- actionId: string;
51
- viewId: string;
52
- };
53
- export {};
package/dist/UIKit.js DELETED
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isErrorType = exports.UIKitInteractionTypes = void 0;
4
- const uikit_1 = require("@rocket.chat/apps-engine/definition/uikit");
5
- var UIKitInteractionTypeExtended;
6
- (function (UIKitInteractionTypeExtended) {
7
- UIKitInteractionTypeExtended["BANNER_OPEN"] = "banner.open";
8
- UIKitInteractionTypeExtended["BANNER_UPDATE"] = "banner.update";
9
- UIKitInteractionTypeExtended["BANNER_CLOSE"] = "banner.close";
10
- })(UIKitInteractionTypeExtended || (UIKitInteractionTypeExtended = {}));
11
- exports.UIKitInteractionTypes = {
12
- ...uikit_1.UIKitInteractionType,
13
- ...UIKitInteractionTypeExtended,
14
- };
15
- const isErrorType = (result) => result.type === uikit_1.UIKitInteractionType.ERRORS;
16
- exports.isErrorType = isErrorType;
17
- //# sourceMappingURL=UIKit.js.map
package/dist/UIKit.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"UIKit.js","sourceRoot":"","sources":["../src/UIKit.ts"],"names":[],"mappings":";;;AAAA,qEAA4G;AAS5G,IAAK,4BAIJ;AAJD,WAAK,4BAA4B;IAChC,2DAA2B,CAAA;IAC3B,+DAA+B,CAAA;IAC/B,6DAA6B,CAAA;AAC9B,CAAC,EAJI,4BAA4B,KAA5B,4BAA4B,QAIhC;AAIY,QAAA,qBAAqB,GAAG;IACpC,GAAG,4BAAuB;IAC1B,GAAG,4BAA4B;CAC/B,CAAC;AA8BK,MAAM,WAAW,GAAG,CAAC,MAAkC,EAA6C,EAAE,CAC5G,MAAM,CAAC,IAAI,KAAK,4BAAuB,CAAC,MAAM,CAAC;AADnC,QAAA,WAAW,eACwB"}
@@ -1,19 +0,0 @@
1
- import type { ILicenseTag } from './ILicenseTag';
2
- export interface ILicense {
3
- url: string;
4
- expiry: string;
5
- maxActiveUsers: number;
6
- modules: string[];
7
- maxGuestUsers: number;
8
- maxRoomsPerGuest: number;
9
- tag?: ILicenseTag;
10
- meta?: {
11
- trial: boolean;
12
- trialEnd: string;
13
- workspaceId: string;
14
- };
15
- apps?: {
16
- maxPrivateApps: number;
17
- maxMarketplaceApps: number;
18
- };
19
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"ILicense.js","sourceRoot":"","sources":["../../../src/ee/ILicense/ILicense.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- export interface ILicenseTag {
2
- name: string;
3
- color: string;
4
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"ILicenseTag.js","sourceRoot":"","sources":["../../../src/ee/ILicense/ILicenseTag.ts"],"names":[],"mappings":""}