@wildix/stream-client 0.0.9 → 0.0.10

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.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SystemMessage = exports.MessageUnsetFields = exports.MarkUnreadChannelsLimitReachedException = exports.MentionsFilter = exports.GroupChannelUnsetOptions = exports.FileNotFoundException = exports.FileCategory = exports.DownloadStrategy = exports.SectionNotFoundException = exports.MessageType = exports.MessageNotFoundException = exports.MemberNotFoundException = exports.SectionType = exports.TargetNotFoundException = exports.TargetNotEligibleException = exports.TargetNotEligibleReason = exports.MessageWhatsAppStatus = exports.MessageSmsStatus = exports.Element = exports.GroupChannelCreationEventType = exports.ChannelsFilter = exports.ChannelAlreadyExistException = exports.ChannelWhatsAppStatus = exports.ChannelContextSource = exports.ChannelContextEventAttendeeStatus = exports.ChannelType = exports.ChannelAccess = exports.AssignChannelVariant = exports.AssignChannelServiceRequest = exports.AssignChannelAssigneeRequest = exports.StreamServiceException = exports.MemberAlreadyExistException = exports.ChannelNotFoundException = exports.ChannelMemberRole = exports.ActionElement = exports.ButtonVariant = exports.ButtonHandler = exports.ValidationException = exports.UnauthorizedException = exports.RateLimitExceededException = exports.ForbiddenException = void 0;
3
+ exports.SystemMessage = exports.MessageUnsetFields = exports.MarkUnreadChannelsLimitReachedException = exports.MentionsFilter = exports.GroupChannelUnsetOptions = exports.FileNotFoundException = exports.FileCategory = exports.DownloadStrategy = exports.SectionNotFoundException = exports.MessageNotFoundException = exports.MemberNotFoundException = exports.SectionType = exports.TargetNotFoundException = exports.TargetNotEligibleException = exports.TargetNotEligibleReason = exports.MessageWhatsAppStatus = exports.MessageSmsStatus = exports.Element = exports.GroupChannelCreationEventType = exports.ChannelsFilter = exports.ChannelAlreadyExistException = exports.ChannelWhatsAppStatus = exports.MessageType = exports.ChannelContextSource = exports.ChannelContextEventAttendeeStatus = exports.ChannelType = exports.ChannelAccess = exports.AssignChannelVariant = exports.AssignChannelServiceRequest = exports.AssignChannelAssigneeRequest = exports.StreamServiceException = exports.MemberAlreadyExistException = exports.ChannelNotFoundException = exports.ChannelMemberRole = exports.ActionElement = exports.ButtonVariant = exports.ButtonHandler = exports.ValidationException = exports.UnauthorizedException = exports.RateLimitExceededException = exports.ForbiddenException = void 0;
4
4
  const StreamServiceServiceException_1 = require("./StreamServiceServiceException");
5
5
  class ForbiddenException extends StreamServiceServiceException_1.StreamServiceServiceException {
6
6
  name = "ForbiddenException";
@@ -170,6 +170,11 @@ exports.ChannelContextEventAttendeeStatus = {
170
170
  exports.ChannelContextSource = {
171
171
  KITE: "kite",
172
172
  };
173
+ exports.MessageType = {
174
+ DELETED: "deleted",
175
+ REGULAR: "regular",
176
+ SYSTEM: "system",
177
+ };
173
178
  exports.ChannelWhatsAppStatus = {
174
179
  CHANNEL_CLOSED: "24h_channel_closed",
175
180
  };
@@ -277,11 +282,6 @@ class MessageNotFoundException extends StreamServiceServiceException_1.StreamSer
277
282
  }
278
283
  }
279
284
  exports.MessageNotFoundException = MessageNotFoundException;
280
- exports.MessageType = {
281
- DELETED: "deleted",
282
- REGULAR: "regular",
283
- SYSTEM: "system",
284
- };
285
285
  class SectionNotFoundException extends StreamServiceServiceException_1.StreamServiceServiceException {
286
286
  name = "SectionNotFoundException";
287
287
  $fault = "client";
@@ -160,6 +160,11 @@ export const ChannelContextEventAttendeeStatus = {
160
160
  export const ChannelContextSource = {
161
161
  KITE: "kite",
162
162
  };
163
+ export const MessageType = {
164
+ DELETED: "deleted",
165
+ REGULAR: "regular",
166
+ SYSTEM: "system",
167
+ };
163
168
  export const ChannelWhatsAppStatus = {
164
169
  CHANNEL_CLOSED: "24h_channel_closed",
165
170
  };
@@ -262,11 +267,6 @@ export class MessageNotFoundException extends __BaseException {
262
267
  Object.setPrototypeOf(this, MessageNotFoundException.prototype);
263
268
  }
264
269
  }
265
- export const MessageType = {
266
- DELETED: "deleted",
267
- REGULAR: "regular",
268
- SYSTEM: "system",
269
- };
270
270
  export class SectionNotFoundException extends __BaseException {
271
271
  name = "SectionNotFoundException";
272
272
  $fault = "client";
@@ -105,6 +105,7 @@ declare const CreateGroupChannelCommand_base: {
105
105
  * // lastMessage: { // LastMessagePreview
106
106
  * // messageId: "STRING_VALUE", // required
107
107
  * // userId: "STRING_VALUE", // required
108
+ * // messageType: "regular" || "system" || "deleted", // required
108
109
  * // text: "STRING_VALUE",
109
110
  * // createdAt: "STRING_VALUE", // required
110
111
  * // },
@@ -193,6 +193,7 @@ declare const CreateKiteChannelCommand_base: {
193
193
  * // lastMessage: { // LastMessagePreview
194
194
  * // messageId: "STRING_VALUE", // required
195
195
  * // userId: "STRING_VALUE", // required
196
+ * // messageType: "regular" || "system" || "deleted", // required
196
197
  * // text: "STRING_VALUE",
197
198
  * // createdAt: "STRING_VALUE", // required
198
199
  * // },
@@ -54,6 +54,7 @@ declare const GetChannelCommand_base: {
54
54
  * // lastMessage: { // LastMessagePreview
55
55
  * // messageId: "STRING_VALUE", // required
56
56
  * // userId: "STRING_VALUE", // required
57
+ * // messageType: "regular" || "system" || "deleted", // required
57
58
  * // text: "STRING_VALUE",
58
59
  * // createdAt: "STRING_VALUE", // required
59
60
  * // },
@@ -54,6 +54,7 @@ declare const GetInboxCommand_base: {
54
54
  * // lastMessage: { // LastMessagePreview
55
55
  * // messageId: "STRING_VALUE", // required
56
56
  * // userId: "STRING_VALUE", // required
57
+ * // messageType: "regular" || "system" || "deleted", // required
57
58
  * // text: "STRING_VALUE",
58
59
  * // createdAt: "STRING_VALUE", // required
59
60
  * // },
@@ -60,6 +60,7 @@ declare const GetOrCreateDirectChannelCommand_base: {
60
60
  * // lastMessage: { // LastMessagePreview
61
61
  * // messageId: "STRING_VALUE", // required
62
62
  * // userId: "STRING_VALUE", // required
63
+ * // messageType: "regular" || "system" || "deleted", // required
63
64
  * // text: "STRING_VALUE",
64
65
  * // createdAt: "STRING_VALUE", // required
65
66
  * // },
@@ -57,6 +57,7 @@ declare const GetOrCreateSmsChannelCommand_base: {
57
57
  * // lastMessage: { // LastMessagePreview
58
58
  * // messageId: "STRING_VALUE", // required
59
59
  * // userId: "STRING_VALUE", // required
60
+ * // messageType: "regular" || "system" || "deleted", // required
60
61
  * // text: "STRING_VALUE",
61
62
  * // createdAt: "STRING_VALUE", // required
62
63
  * // },
@@ -56,6 +56,7 @@ declare const GetOrCreateTelephonyChannelCommand_base: {
56
56
  * // lastMessage: { // LastMessagePreview
57
57
  * // messageId: "STRING_VALUE", // required
58
58
  * // userId: "STRING_VALUE", // required
59
+ * // messageType: "regular" || "system" || "deleted", // required
59
60
  * // text: "STRING_VALUE",
60
61
  * // createdAt: "STRING_VALUE", // required
61
62
  * // },
@@ -57,6 +57,7 @@ declare const GetOrCreateWhatsAppChannelCommand_base: {
57
57
  * // lastMessage: { // LastMessagePreview
58
58
  * // messageId: "STRING_VALUE", // required
59
59
  * // userId: "STRING_VALUE", // required
60
+ * // messageType: "regular" || "system" || "deleted", // required
60
61
  * // text: "STRING_VALUE",
61
62
  * // createdAt: "STRING_VALUE", // required
62
63
  * // },
@@ -55,6 +55,7 @@ declare const JoinChannelCommand_base: {
55
55
  * // lastMessage: { // LastMessagePreview
56
56
  * // messageId: "STRING_VALUE", // required
57
57
  * // userId: "STRING_VALUE", // required
58
+ * // messageType: "regular" || "system" || "deleted", // required
58
59
  * // text: "STRING_VALUE",
59
60
  * // createdAt: "STRING_VALUE", // required
60
61
  * // },
@@ -57,6 +57,7 @@ declare const ListChannelsCommand_base: {
57
57
  * // lastMessage: { // LastMessagePreview
58
58
  * // messageId: "STRING_VALUE", // required
59
59
  * // userId: "STRING_VALUE", // required
60
+ * // messageType: "regular" || "system" || "deleted", // required
60
61
  * // text: "STRING_VALUE",
61
62
  * // createdAt: "STRING_VALUE", // required
62
63
  * // },
@@ -99,6 +99,7 @@ declare const PartialUpdateChannelCommand_base: {
99
99
  * // lastMessage: { // LastMessagePreview
100
100
  * // messageId: "STRING_VALUE", // required
101
101
  * // userId: "STRING_VALUE", // required
102
+ * // messageType: "regular" || "system" || "deleted", // required
102
103
  * // text: "STRING_VALUE",
103
104
  * // createdAt: "STRING_VALUE", // required
104
105
  * // },
@@ -59,6 +59,7 @@ declare const QueryChannelsCommand_base: {
59
59
  * // lastMessage: { // LastMessagePreview
60
60
  * // messageId: "STRING_VALUE", // required
61
61
  * // userId: "STRING_VALUE", // required
62
+ * // messageType: "regular" || "system" || "deleted", // required
62
63
  * // text: "STRING_VALUE",
63
64
  * // createdAt: "STRING_VALUE", // required
64
65
  * // },
@@ -94,6 +94,7 @@ declare const UpdateChannelCommand_base: {
94
94
  * // lastMessage: { // LastMessagePreview
95
95
  * // messageId: "STRING_VALUE", // required
96
96
  * // userId: "STRING_VALUE", // required
97
+ * // messageType: "regular" || "system" || "deleted", // required
97
98
  * // text: "STRING_VALUE",
98
99
  * // createdAt: "STRING_VALUE", // required
99
100
  * // },
@@ -528,6 +528,19 @@ export interface ChannelContext {
528
528
  events?: (ChannelContextEvent)[] | undefined;
529
529
  ptt?: ChannelContextPushToTalk | undefined;
530
530
  }
531
+ /**
532
+ * @public
533
+ * @enum
534
+ */
535
+ export declare const MessageType: {
536
+ readonly DELETED: "deleted";
537
+ readonly REGULAR: "regular";
538
+ readonly SYSTEM: "system";
539
+ };
540
+ /**
541
+ * @public
542
+ */
543
+ export type MessageType = typeof MessageType[keyof typeof MessageType];
531
544
  /**
532
545
  * Preview of the most recent visible message in a channel.
533
546
  * @public
@@ -539,6 +552,11 @@ export interface LastMessagePreview {
539
552
  * @public
540
553
  */
541
554
  userId: string;
555
+ /**
556
+ * Type of the message. 'deleted' indicates a tombstoned message; clients should render a placeholder instead of text.
557
+ * @public
558
+ */
559
+ messageType: MessageType;
542
560
  /**
543
561
  * Text body of the message. Absent for attachment-only or deleted messages.
544
562
  * @public
@@ -1501,19 +1519,6 @@ export interface Reaction {
1501
1519
  userId: string;
1502
1520
  messageId: string;
1503
1521
  }
1504
- /**
1505
- * @public
1506
- * @enum
1507
- */
1508
- export declare const MessageType: {
1509
- readonly DELETED: "deleted";
1510
- readonly REGULAR: "regular";
1511
- readonly SYSTEM: "system";
1512
- };
1513
- /**
1514
- * @public
1515
- */
1516
- export type MessageType = typeof MessageType[keyof typeof MessageType];
1517
1522
  /**
1518
1523
  * Reference to a quoted message.
1519
1524
  * @public
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wildix/stream-client",
3
3
  "description": "@wildix/stream-client client",
4
- "version": "0.0.9",
4
+ "version": "0.0.10",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",