stream-chat 4.4.0-insights.0 → 4.4.3-dev.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.
package/src/types.ts CHANGED
@@ -69,6 +69,7 @@ export type AppSettingsAPIResponse<
69
69
  mutes?: boolean;
70
70
  name?: string;
71
71
  push_notifications?: boolean;
72
+ quotes?: boolean;
72
73
  reactions?: boolean;
73
74
  read_events?: boolean;
74
75
  replies?: boolean;
@@ -859,6 +860,7 @@ export type CreateChannelOptions<CommandType extends string = LiteralStringForUn
859
860
  name?: string;
860
861
  permissions?: PermissionObject[];
861
862
  push_notifications?: boolean;
863
+ quotes?: boolean;
862
864
  reactions?: boolean;
863
865
  read_events?: boolean;
864
866
  replies?: boolean;
@@ -1632,6 +1634,7 @@ export type ChannelConfigFields = {
1632
1634
  mutes?: boolean;
1633
1635
  name?: string;
1634
1636
  push_notifications?: boolean;
1637
+ quotes?: boolean;
1635
1638
  reactions?: boolean;
1636
1639
  read_events?: boolean;
1637
1640
  replies?: boolean;
package/src/utils.ts CHANGED
@@ -198,3 +198,16 @@ function getRandomBytes(length: number): Uint8Array {
198
198
  getRandomValues(bytes);
199
199
  return bytes;
200
200
  }
201
+
202
+ export function convertErrorToJson(err: unknown) {
203
+ const jsonObj = {} as Record<string, unknown>;
204
+
205
+ if (!err) return jsonObj;
206
+
207
+ Object.getOwnPropertyNames(err).forEach((key) => {
208
+ // @ts-ignore
209
+ jsonObj[key] = err[key];
210
+ });
211
+
212
+ return jsonObj;
213
+ }