stream-chat 6.4.0 → 6.6.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/dist/browser.es.js +137 -41
- package/dist/browser.es.js.map +1 -1
- package/dist/browser.full-bundle.min.js +1 -1
- package/dist/browser.full-bundle.min.js.map +1 -1
- package/dist/browser.js +142 -40
- package/dist/browser.js.map +1 -1
- package/dist/index.es.js +137 -41
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +142 -40
- package/dist/index.js.map +1 -1
- package/dist/types/client.d.ts +38 -35
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/errors.d.ts +3 -0
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/events.d.ts +1 -0
- package/dist/types/events.d.ts.map +1 -1
- package/dist/types/types.d.ts +30 -2
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +3 -1
- package/src/client.ts +50 -38
- package/src/errors.ts +7 -0
- package/src/events.ts +1 -0
- package/src/types.ts +71 -4
package/src/types.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AxiosRequestConfig } from 'axios';
|
|
1
|
+
import { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
2
2
|
import { EVENT_MAP } from './events';
|
|
3
3
|
import { Role } from './permissions';
|
|
4
4
|
|
|
@@ -119,6 +119,7 @@ export type AppSettingsAPIResponse<StreamChatGenerics extends ExtendableGenerics
|
|
|
119
119
|
permission_version?: string;
|
|
120
120
|
policies?: Record<string, Policy[]>;
|
|
121
121
|
push_notifications?: {
|
|
122
|
+
offline_only: boolean;
|
|
122
123
|
version: string;
|
|
123
124
|
apn?: APNConfig;
|
|
124
125
|
firebase?: FirebaseConfig;
|
|
@@ -1454,6 +1455,7 @@ export type AppSettings = {
|
|
|
1454
1455
|
// all possible file mime types are https://www.iana.org/assignments/media-types/media-types.xhtml
|
|
1455
1456
|
file_upload_config?: FileUploadConfig;
|
|
1456
1457
|
firebase_config?: {
|
|
1458
|
+
apn_template?: string;
|
|
1457
1459
|
credentials_json?: string;
|
|
1458
1460
|
data_template?: string;
|
|
1459
1461
|
notification_template?: string;
|
|
@@ -1466,8 +1468,11 @@ export type AppSettings = {
|
|
|
1466
1468
|
};
|
|
1467
1469
|
image_moderation_enabled?: boolean;
|
|
1468
1470
|
image_upload_config?: FileUploadConfig;
|
|
1471
|
+
migrate_permissions_to_v2?: boolean;
|
|
1469
1472
|
multi_tenant_enabled?: boolean;
|
|
1473
|
+
permission_version?: 'v1' | 'v2';
|
|
1470
1474
|
push_config?: {
|
|
1475
|
+
offline_only?: boolean;
|
|
1471
1476
|
version?: string;
|
|
1472
1477
|
};
|
|
1473
1478
|
reminders_interval?: number;
|
|
@@ -1654,6 +1659,7 @@ export type PushProviderAPN = {
|
|
|
1654
1659
|
};
|
|
1655
1660
|
|
|
1656
1661
|
export type PushProviderFirebase = {
|
|
1662
|
+
firebase_apn_template?: string;
|
|
1657
1663
|
firebase_credentials?: string;
|
|
1658
1664
|
firebase_data_template?: string;
|
|
1659
1665
|
firebase_notification_template?: string;
|
|
@@ -1718,16 +1724,19 @@ export type DeviceFields = BaseDeviceFields & {
|
|
|
1718
1724
|
|
|
1719
1725
|
export type EndpointName =
|
|
1720
1726
|
| 'Connect'
|
|
1727
|
+
| 'LongPoll'
|
|
1721
1728
|
| 'DeleteFile'
|
|
1722
1729
|
| 'DeleteImage'
|
|
1723
1730
|
| 'DeleteMessage'
|
|
1724
1731
|
| 'DeleteUser'
|
|
1732
|
+
| 'DeleteUsers'
|
|
1725
1733
|
| 'DeactivateUser'
|
|
1726
1734
|
| 'ExportUser'
|
|
1727
1735
|
| 'DeleteReaction'
|
|
1728
1736
|
| 'UpdateChannel'
|
|
1729
1737
|
| 'UpdateChannelPartial'
|
|
1730
1738
|
| 'UpdateMessage'
|
|
1739
|
+
| 'UpdateMessagePartial'
|
|
1731
1740
|
| 'GetMessage'
|
|
1732
1741
|
| 'GetManyMessages'
|
|
1733
1742
|
| 'UpdateUsers'
|
|
@@ -1740,18 +1749,22 @@ export type EndpointName =
|
|
|
1740
1749
|
| 'QueryUsers'
|
|
1741
1750
|
| 'QueryMembers'
|
|
1742
1751
|
| 'QueryBannedUsers'
|
|
1752
|
+
| 'QueryFlags'
|
|
1753
|
+
| 'QueryMessageFlags'
|
|
1743
1754
|
| 'GetReactions'
|
|
1744
1755
|
| 'GetReplies'
|
|
1756
|
+
| 'GetPinnedMessages'
|
|
1745
1757
|
| 'Ban'
|
|
1746
1758
|
| 'Unban'
|
|
1747
|
-
| '
|
|
1759
|
+
| 'MuteUser'
|
|
1748
1760
|
| 'MuteChannel'
|
|
1749
1761
|
| 'UnmuteChannel'
|
|
1750
1762
|
| 'UnmuteUser'
|
|
1751
1763
|
| 'RunMessageAction'
|
|
1752
1764
|
| 'SendEvent'
|
|
1765
|
+
| 'SendUserCustomEvent'
|
|
1753
1766
|
| 'MarkRead'
|
|
1754
|
-
| '
|
|
1767
|
+
| 'MarkChannelsRead'
|
|
1755
1768
|
| 'SendMessage'
|
|
1756
1769
|
| 'ImportChannelMessages'
|
|
1757
1770
|
| 'UploadFile'
|
|
@@ -1763,8 +1776,12 @@ export type EndpointName =
|
|
|
1763
1776
|
| 'SendReaction'
|
|
1764
1777
|
| 'Flag'
|
|
1765
1778
|
| 'Unflag'
|
|
1779
|
+
| 'Unblock'
|
|
1780
|
+
| 'QueryFlagReports'
|
|
1781
|
+
| 'FlagReportReview'
|
|
1766
1782
|
| 'CreateChannelType'
|
|
1767
1783
|
| 'DeleteChannel'
|
|
1784
|
+
| 'DeleteChannels'
|
|
1768
1785
|
| 'DeleteChannelType'
|
|
1769
1786
|
| 'GetChannelType'
|
|
1770
1787
|
| 'ListChannelTypes'
|
|
@@ -1784,6 +1801,7 @@ export type EndpointName =
|
|
|
1784
1801
|
| 'CreateRole'
|
|
1785
1802
|
| 'DeleteRole'
|
|
1786
1803
|
| 'ListRoles'
|
|
1804
|
+
| 'ListCustomRoles'
|
|
1787
1805
|
| 'Sync'
|
|
1788
1806
|
| 'TranslateMessage'
|
|
1789
1807
|
| 'CreateCommand'
|
|
@@ -1800,7 +1818,30 @@ export type EndpointName =
|
|
|
1800
1818
|
| 'GetExportChannelsStatus'
|
|
1801
1819
|
| 'CheckSQS'
|
|
1802
1820
|
| 'GetRateLimits'
|
|
1803
|
-
| '
|
|
1821
|
+
| 'CreateSegment'
|
|
1822
|
+
| 'GetSegment'
|
|
1823
|
+
| 'ListSegments'
|
|
1824
|
+
| 'UpdateSegment'
|
|
1825
|
+
| 'DeleteSegment'
|
|
1826
|
+
| 'CreateCampaign'
|
|
1827
|
+
| 'GetCampaign'
|
|
1828
|
+
| 'ListCampaigns'
|
|
1829
|
+
| 'UpdateCampaign'
|
|
1830
|
+
| 'DeleteCampaign'
|
|
1831
|
+
| 'ScheduleCampaign'
|
|
1832
|
+
| 'StopCampaign'
|
|
1833
|
+
| 'ResumeCampaign'
|
|
1834
|
+
| 'TestCampaign'
|
|
1835
|
+
| 'GetOG'
|
|
1836
|
+
| 'GetTask'
|
|
1837
|
+
| 'ExportUsers'
|
|
1838
|
+
| 'CreateImport'
|
|
1839
|
+
| 'CreateImportURL'
|
|
1840
|
+
| 'GetImport'
|
|
1841
|
+
| 'ListImports'
|
|
1842
|
+
| 'UpsertPushProvider'
|
|
1843
|
+
| 'DeletePushProvider'
|
|
1844
|
+
| 'ListPushProviders';
|
|
1804
1845
|
|
|
1805
1846
|
export type ExportChannelRequest = {
|
|
1806
1847
|
id: string;
|
|
@@ -1835,6 +1876,7 @@ export type FileUploadConfig = {
|
|
|
1835
1876
|
};
|
|
1836
1877
|
|
|
1837
1878
|
export type FirebaseConfig = {
|
|
1879
|
+
apn_template?: string;
|
|
1838
1880
|
credentials_json?: string;
|
|
1839
1881
|
data_template?: string;
|
|
1840
1882
|
enabled?: boolean;
|
|
@@ -2201,6 +2243,11 @@ export type Campaign = {
|
|
|
2201
2243
|
} & CampaignData &
|
|
2202
2244
|
CampaignStatus;
|
|
2203
2245
|
|
|
2246
|
+
export type TestCampaignResponse = {
|
|
2247
|
+
campaign?: Campaign;
|
|
2248
|
+
invalid_users?: Record<string, string>;
|
|
2249
|
+
};
|
|
2250
|
+
|
|
2204
2251
|
export type TaskStatus = {
|
|
2205
2252
|
created_at: string;
|
|
2206
2253
|
status: string;
|
|
@@ -2274,3 +2321,23 @@ export type PushProviderUpsertResponse = {
|
|
|
2274
2321
|
export type PushProviderListResponse = {
|
|
2275
2322
|
push_providers: PushProvider[];
|
|
2276
2323
|
};
|
|
2324
|
+
|
|
2325
|
+
type ErrorResponseDetails = {
|
|
2326
|
+
code: number;
|
|
2327
|
+
messages: string[];
|
|
2328
|
+
};
|
|
2329
|
+
|
|
2330
|
+
export type APIErrorResponse = {
|
|
2331
|
+
code: number;
|
|
2332
|
+
duration: string;
|
|
2333
|
+
message: string;
|
|
2334
|
+
more_info: string;
|
|
2335
|
+
StatusCode: number;
|
|
2336
|
+
details?: ErrorResponseDetails;
|
|
2337
|
+
};
|
|
2338
|
+
|
|
2339
|
+
export class ErrorFromResponse<T> extends Error {
|
|
2340
|
+
code?: number;
|
|
2341
|
+
response?: AxiosResponse<T>;
|
|
2342
|
+
status?: number;
|
|
2343
|
+
}
|