@stream-io/node-sdk 0.1.7 → 0.1.8

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 (86) hide show
  1. package/README.md +8 -2
  2. package/dist/index.cjs.js +170 -515
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.d.ts +6 -6
  5. package/dist/index.es.js +170 -515
  6. package/dist/index.es.js.map +1 -1
  7. package/dist/src/StreamCall.d.ts +7 -10
  8. package/dist/src/StreamChannel.d.ts +4 -4
  9. package/dist/src/StreamChatClient.d.ts +8 -8
  10. package/dist/src/StreamClient.d.ts +11 -11
  11. package/dist/src/StreamVideoClient.d.ts +4 -4
  12. package/dist/src/gen/chat/apis/ChannelTypesApi.d.ts +1 -1
  13. package/dist/src/gen/chat/apis/ChannelsApi.d.ts +12 -40
  14. package/dist/src/gen/chat/apis/CustomCommandsApi.d.ts +1 -1
  15. package/dist/src/gen/chat/apis/DefaultApi.d.ts +1 -1
  16. package/dist/src/gen/chat/apis/DevicesApi.d.ts +1 -1
  17. package/dist/src/gen/chat/apis/EventsApi.d.ts +2 -19
  18. package/dist/src/gen/chat/apis/FilesApi.d.ts +1 -1
  19. package/dist/src/gen/chat/apis/GDPRApi.d.ts +1 -1
  20. package/dist/src/gen/chat/apis/ImportsApi.d.ts +1 -1
  21. package/dist/src/gen/chat/apis/MessagesApi.d.ts +2 -2
  22. package/dist/src/gen/chat/apis/ModerationApi.d.ts +1 -1
  23. package/dist/src/gen/chat/apis/PermissionsV2Api.d.ts +1 -1
  24. package/dist/src/gen/chat/apis/PushApi.d.ts +1 -1
  25. package/dist/src/gen/chat/apis/ReactionsApi.d.ts +1 -1
  26. package/dist/src/gen/chat/apis/ServerSideApi.d.ts +1 -1
  27. package/dist/src/gen/chat/apis/SettingsApi.d.ts +1 -1
  28. package/dist/src/gen/chat/apis/TasksApi.d.ts +1 -1
  29. package/dist/src/gen/chat/apis/TestingApi.d.ts +1 -1
  30. package/dist/src/gen/chat/apis/UsersApi.d.ts +1 -1
  31. package/dist/src/gen/chat/models/index.d.ts +141 -160
  32. package/dist/src/gen/chat/runtime.d.ts +1 -1
  33. package/dist/src/gen/video/apis/DefaultApi.d.ts +2 -76
  34. package/dist/src/gen/video/apis/ServerSideApi.d.ts +1 -1
  35. package/dist/src/gen/video/models/index.d.ts +0 -271
  36. package/dist/src/gen/video/runtime.d.ts +1 -1
  37. package/dist/src/utils/create-token.d.ts +1 -1
  38. package/index.ts +6 -6
  39. package/package.json +26 -6
  40. package/src/StreamCall.ts +15 -19
  41. package/src/StreamChannel.ts +177 -75
  42. package/src/StreamChatClient.ts +82 -45
  43. package/src/StreamClient.ts +78 -75
  44. package/src/StreamVideoClient.ts +8 -8
  45. package/src/gen/chat/apis/ChannelTypesApi.ts +1 -1
  46. package/src/gen/chat/apis/ChannelsApi.ts +35 -160
  47. package/src/gen/chat/apis/CustomCommandsApi.ts +1 -1
  48. package/src/gen/chat/apis/DefaultApi.ts +1 -1
  49. package/src/gen/chat/apis/DevicesApi.ts +1 -1
  50. package/src/gen/chat/apis/EventsApi.ts +1 -74
  51. package/src/gen/chat/apis/FilesApi.ts +13 -13
  52. package/src/gen/chat/apis/GDPRApi.ts +1 -1
  53. package/src/gen/chat/apis/ImportsApi.ts +1 -1
  54. package/src/gen/chat/apis/MessagesApi.ts +56 -56
  55. package/src/gen/chat/apis/ModerationApi.ts +1 -1
  56. package/src/gen/chat/apis/PermissionsV2Api.ts +1 -1
  57. package/src/gen/chat/apis/PushApi.ts +1 -1
  58. package/src/gen/chat/apis/ReactionsApi.ts +1 -1
  59. package/src/gen/chat/apis/ServerSideApi.ts +1 -1
  60. package/src/gen/chat/apis/SettingsApi.ts +1 -1
  61. package/src/gen/chat/apis/TasksApi.ts +1 -1
  62. package/src/gen/chat/apis/TestingApi.ts +1 -1
  63. package/src/gen/chat/apis/UsersApi.ts +1 -1
  64. package/src/gen/chat/apis/index.ts +8 -9
  65. package/src/gen/chat/models/index.ts +141 -160
  66. package/src/gen/chat/runtime.ts +1 -1
  67. package/src/gen/video/apis/DefaultApi.ts +1 -303
  68. package/src/gen/video/apis/ServerSideApi.ts +1 -1
  69. package/src/gen/video/models/index.ts +0 -269
  70. package/src/gen/video/runtime.ts +1 -1
  71. package/src/types.ts +1 -1
  72. package/src/utils/create-token.ts +1 -1
  73. package/dist/__tests__/block-lists.test.d.ts +0 -1
  74. package/dist/__tests__/call-members.test.d.ts +0 -1
  75. package/dist/__tests__/call-types.test.d.ts +0 -1
  76. package/dist/__tests__/call.test.d.ts +0 -1
  77. package/dist/__tests__/channel-types.test.d.ts +0 -1
  78. package/dist/__tests__/channel.test.d.ts +0 -1
  79. package/dist/__tests__/command.test.d.ts +0 -1
  80. package/dist/__tests__/create-test-client.d.ts +0 -3
  81. package/dist/__tests__/create-token.test.d.ts +0 -1
  82. package/dist/__tests__/devices-push.test.d.ts +0 -1
  83. package/dist/__tests__/messages.test.d.ts +0 -1
  84. package/dist/__tests__/permissions-app-settings.test.d.ts +0 -1
  85. package/dist/__tests__/user-compat.test.d.ts +0 -1
  86. package/dist/__tests__/users.test.d.ts +0 -1
package/dist/index.es.js CHANGED
@@ -706,7 +706,7 @@ function __awaiter(thisArg, _arguments, P, generator) {
706
706
  * Stream Chat API
707
707
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
708
708
  *
709
- * The version of the OpenAPI document: v89.9.2
709
+ * The version of the OpenAPI document: v92.5.0
710
710
  *
711
711
  *
712
712
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -990,7 +990,7 @@ let VoidApiResponse$1 = class VoidApiResponse {
990
990
  * Stream Chat API
991
991
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
992
992
  *
993
- * The version of the OpenAPI document: v89.9.2
993
+ * The version of the OpenAPI document: v92.5.0
994
994
  *
995
995
  *
996
996
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -1208,7 +1208,7 @@ class ChannelTypesApi extends BaseAPI$1 {
1208
1208
  * Stream Chat API
1209
1209
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
1210
1210
  *
1211
- * The version of the OpenAPI document: v89.9.2
1211
+ * The version of the OpenAPI document: v92.5.0
1212
1212
  *
1213
1213
  *
1214
1214
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -1401,12 +1401,6 @@ class ChannelsApi extends BaseAPI$1 {
1401
1401
  throw new RequiredError$1('channelGetOrCreateRequest', 'Required parameter requestParameters.channelGetOrCreateRequest was null or undefined when calling getOrCreateChannel.');
1402
1402
  }
1403
1403
  const queryParameters = {};
1404
- if (requestParameters.clientId !== undefined) {
1405
- queryParameters['client_id'] = requestParameters.clientId;
1406
- }
1407
- if (requestParameters.connectionId !== undefined) {
1408
- queryParameters['connection_id'] = requestParameters.connectionId;
1409
- }
1410
1404
  const headerParameters = {};
1411
1405
  headerParameters['Content-Type'] = 'application/json';
1412
1406
  if (this.configuration && this.configuration.apiKey) {
@@ -1671,12 +1665,6 @@ class ChannelsApi extends BaseAPI$1 {
1671
1665
  throw new RequiredError$1('queryChannelsRequest', 'Required parameter requestParameters.queryChannelsRequest was null or undefined when calling queryChannels.');
1672
1666
  }
1673
1667
  const queryParameters = {};
1674
- if (requestParameters.clientId !== undefined) {
1675
- queryParameters['client_id'] = requestParameters.clientId;
1676
- }
1677
- if (requestParameters.connectionId !== undefined) {
1678
- queryParameters['connection_id'] = requestParameters.connectionId;
1679
- }
1680
1668
  const headerParameters = {};
1681
1669
  headerParameters['Content-Type'] = 'application/json';
1682
1670
  if (this.configuration && this.configuration.apiKey) {
@@ -1834,80 +1822,21 @@ class ChannelsApi extends BaseAPI$1 {
1834
1822
  });
1835
1823
  }
1836
1824
  /**
1837
- * Call this method to stop receiving channel events Sends events: - user.watching.stop
1838
- * Stop watching channel
1825
+ * Truncates channel Sends events: - channel.truncated Required permissions: - DeleteChannel - TruncateChannel
1826
+ * Truncate channel
1839
1827
  */
1840
- stopWatchingChannelRaw(requestParameters, initOverrides) {
1828
+ truncateChannelRaw(requestParameters, initOverrides) {
1841
1829
  return __awaiter(this, void 0, void 0, function* () {
1842
1830
  if (requestParameters.type === null || requestParameters.type === undefined) {
1843
- throw new RequiredError$1('type', 'Required parameter requestParameters.type was null or undefined when calling stopWatchingChannel.');
1831
+ throw new RequiredError$1('type', 'Required parameter requestParameters.type was null or undefined when calling truncateChannel.');
1844
1832
  }
1845
1833
  if (requestParameters.id === null || requestParameters.id === undefined) {
1846
- throw new RequiredError$1('id', 'Required parameter requestParameters.id was null or undefined when calling stopWatchingChannel.');
1847
- }
1848
- if (requestParameters.channelStopWatchingRequest === null || requestParameters.channelStopWatchingRequest === undefined) {
1849
- throw new RequiredError$1('channelStopWatchingRequest', 'Required parameter requestParameters.channelStopWatchingRequest was null or undefined when calling stopWatchingChannel.');
1850
- }
1851
- const queryParameters = {};
1852
- if (requestParameters.clientId !== undefined) {
1853
- queryParameters['client_id'] = requestParameters.clientId;
1854
- }
1855
- if (requestParameters.connectionId !== undefined) {
1856
- queryParameters['connection_id'] = requestParameters.connectionId;
1857
- }
1858
- const headerParameters = {};
1859
- headerParameters['Content-Type'] = 'application/json';
1860
- if (this.configuration && this.configuration.apiKey) {
1861
- headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
1862
- }
1863
- if (this.configuration && this.configuration.apiKey) {
1864
- queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
1865
- }
1866
- if (this.configuration && this.configuration.apiKey) {
1867
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
1834
+ throw new RequiredError$1('id', 'Required parameter requestParameters.id was null or undefined when calling truncateChannel.');
1868
1835
  }
1869
- const response = yield this.request({
1870
- path: `/channels/{type}/{id}/stop-watching`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
1871
- method: 'POST',
1872
- headers: headerParameters,
1873
- query: queryParameters,
1874
- body: requestParameters.channelStopWatchingRequest,
1875
- }, initOverrides);
1876
- return new JSONApiResponse$1(response);
1877
- });
1878
- }
1879
- /**
1880
- * Call this method to stop receiving channel events Sends events: - user.watching.stop
1881
- * Stop watching channel
1882
- */
1883
- stopWatchingChannel(requestParameters, initOverrides) {
1884
- return __awaiter(this, void 0, void 0, function* () {
1885
- const response = yield this.stopWatchingChannelRaw(requestParameters, initOverrides);
1886
- return yield response.value();
1887
- });
1888
- }
1889
- /**
1890
- * Returns all events happened since client disconnect in specified channels Required permissions: - ReadChannel
1891
- * Sync
1892
- */
1893
- syncRaw(requestParameters, initOverrides) {
1894
- return __awaiter(this, void 0, void 0, function* () {
1895
- if (requestParameters.syncRequest === null || requestParameters.syncRequest === undefined) {
1896
- throw new RequiredError$1('syncRequest', 'Required parameter requestParameters.syncRequest was null or undefined when calling sync.');
1836
+ if (requestParameters.truncateChannelRequest === null || requestParameters.truncateChannelRequest === undefined) {
1837
+ throw new RequiredError$1('truncateChannelRequest', 'Required parameter requestParameters.truncateChannelRequest was null or undefined when calling truncateChannel.');
1897
1838
  }
1898
1839
  const queryParameters = {};
1899
- if (requestParameters.withInaccessibleCids !== undefined) {
1900
- queryParameters['with_inaccessible_cids'] = requestParameters.withInaccessibleCids;
1901
- }
1902
- if (requestParameters.watch !== undefined) {
1903
- queryParameters['watch'] = requestParameters.watch;
1904
- }
1905
- if (requestParameters.clientId !== undefined) {
1906
- queryParameters['client_id'] = requestParameters.clientId;
1907
- }
1908
- if (requestParameters.connectionId !== undefined) {
1909
- queryParameters['connection_id'] = requestParameters.connectionId;
1910
- }
1911
1840
  const headerParameters = {};
1912
1841
  headerParameters['Content-Type'] = 'application/json';
1913
1842
  if (this.configuration && this.configuration.apiKey) {
@@ -1920,39 +1849,33 @@ class ChannelsApi extends BaseAPI$1 {
1920
1849
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
1921
1850
  }
1922
1851
  const response = yield this.request({
1923
- path: `/sync`,
1852
+ path: `/channels/{type}/{id}/truncate`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
1924
1853
  method: 'POST',
1925
1854
  headers: headerParameters,
1926
1855
  query: queryParameters,
1927
- body: requestParameters.syncRequest,
1856
+ body: requestParameters.truncateChannelRequest,
1928
1857
  }, initOverrides);
1929
1858
  return new JSONApiResponse$1(response);
1930
1859
  });
1931
1860
  }
1932
1861
  /**
1933
- * Returns all events happened since client disconnect in specified channels Required permissions: - ReadChannel
1934
- * Sync
1862
+ * Truncates channel Sends events: - channel.truncated Required permissions: - DeleteChannel - TruncateChannel
1863
+ * Truncate channel
1935
1864
  */
1936
- sync(requestParameters, initOverrides) {
1865
+ truncateChannel(requestParameters, initOverrides) {
1937
1866
  return __awaiter(this, void 0, void 0, function* () {
1938
- const response = yield this.syncRaw(requestParameters, initOverrides);
1867
+ const response = yield this.truncateChannelRaw(requestParameters, initOverrides);
1939
1868
  return yield response.value();
1940
1869
  });
1941
1870
  }
1942
1871
  /**
1943
- * Truncates channel Sends events: - channel.truncated Required permissions: - DeleteChannel - TruncateChannel
1944
- * Truncate channel
1872
+ * Unmutes channel for user Sends events: - channel.unmuted Required permissions: - MuteChannel
1873
+ * Unmute channel
1945
1874
  */
1946
- truncateChannelRaw(requestParameters, initOverrides) {
1875
+ unmuteChannelRaw(requestParameters, initOverrides) {
1947
1876
  return __awaiter(this, void 0, void 0, function* () {
1948
- if (requestParameters.type === null || requestParameters.type === undefined) {
1949
- throw new RequiredError$1('type', 'Required parameter requestParameters.type was null or undefined when calling truncateChannel.');
1950
- }
1951
- if (requestParameters.id === null || requestParameters.id === undefined) {
1952
- throw new RequiredError$1('id', 'Required parameter requestParameters.id was null or undefined when calling truncateChannel.');
1953
- }
1954
- if (requestParameters.truncateChannelRequest === null || requestParameters.truncateChannelRequest === undefined) {
1955
- throw new RequiredError$1('truncateChannelRequest', 'Required parameter requestParameters.truncateChannelRequest was null or undefined when calling truncateChannel.');
1877
+ if (requestParameters.unmuteChannelRequest === null || requestParameters.unmuteChannelRequest === undefined) {
1878
+ throw new RequiredError$1('unmuteChannelRequest', 'Required parameter requestParameters.unmuteChannelRequest was null or undefined when calling unmuteChannel.');
1956
1879
  }
1957
1880
  const queryParameters = {};
1958
1881
  const headerParameters = {};
@@ -1967,37 +1890,33 @@ class ChannelsApi extends BaseAPI$1 {
1967
1890
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
1968
1891
  }
1969
1892
  const response = yield this.request({
1970
- path: `/channels/{type}/{id}/truncate`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
1893
+ path: `/moderation/unmute/channel`,
1971
1894
  method: 'POST',
1972
1895
  headers: headerParameters,
1973
1896
  query: queryParameters,
1974
- body: requestParameters.truncateChannelRequest,
1897
+ body: requestParameters.unmuteChannelRequest,
1975
1898
  }, initOverrides);
1976
1899
  return new JSONApiResponse$1(response);
1977
1900
  });
1978
1901
  }
1979
1902
  /**
1980
- * Truncates channel Sends events: - channel.truncated Required permissions: - DeleteChannel - TruncateChannel
1981
- * Truncate channel
1903
+ * Unmutes channel for user Sends events: - channel.unmuted Required permissions: - MuteChannel
1904
+ * Unmute channel
1982
1905
  */
1983
- truncateChannel(requestParameters, initOverrides) {
1906
+ unmuteChannel(requestParameters, initOverrides) {
1984
1907
  return __awaiter(this, void 0, void 0, function* () {
1985
- const response = yield this.truncateChannelRaw(requestParameters, initOverrides);
1908
+ const response = yield this.unmuteChannelRaw(requestParameters, initOverrides);
1986
1909
  return yield response.value();
1987
1910
  });
1988
1911
  }
1989
1912
  /**
1990
- * Unmutes channel for user Sends events: - channel.unmuted Required permissions: - MuteChannel
1991
- * Unmute channel
1913
+ * UnreadCount counts
1914
+ * UnreadCount counts
1992
1915
  */
1993
- unmuteChannelRaw(requestParameters, initOverrides) {
1916
+ unreadCountsRaw(initOverrides) {
1994
1917
  return __awaiter(this, void 0, void 0, function* () {
1995
- if (requestParameters.unmuteChannelRequest === null || requestParameters.unmuteChannelRequest === undefined) {
1996
- throw new RequiredError$1('unmuteChannelRequest', 'Required parameter requestParameters.unmuteChannelRequest was null or undefined when calling unmuteChannel.');
1997
- }
1998
1918
  const queryParameters = {};
1999
1919
  const headerParameters = {};
2000
- headerParameters['Content-Type'] = 'application/json';
2001
1920
  if (this.configuration && this.configuration.apiKey) {
2002
1921
  headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
2003
1922
  }
@@ -2008,22 +1927,21 @@ class ChannelsApi extends BaseAPI$1 {
2008
1927
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
2009
1928
  }
2010
1929
  const response = yield this.request({
2011
- path: `/moderation/unmute/channel`,
2012
- method: 'POST',
1930
+ path: `/unread`,
1931
+ method: 'GET',
2013
1932
  headers: headerParameters,
2014
1933
  query: queryParameters,
2015
- body: requestParameters.unmuteChannelRequest,
2016
1934
  }, initOverrides);
2017
1935
  return new JSONApiResponse$1(response);
2018
1936
  });
2019
1937
  }
2020
1938
  /**
2021
- * Unmutes channel for user Sends events: - channel.unmuted Required permissions: - MuteChannel
2022
- * Unmute channel
1939
+ * UnreadCount counts
1940
+ * UnreadCount counts
2023
1941
  */
2024
- unmuteChannel(requestParameters, initOverrides) {
1942
+ unreadCounts(initOverrides) {
2025
1943
  return __awaiter(this, void 0, void 0, function* () {
2026
- const response = yield this.unmuteChannelRaw(requestParameters, initOverrides);
1944
+ const response = yield this.unreadCountsRaw(initOverrides);
2027
1945
  return yield response.value();
2028
1946
  });
2029
1947
  }
@@ -2129,7 +2047,7 @@ class ChannelsApi extends BaseAPI$1 {
2129
2047
  * Stream Chat API
2130
2048
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2131
2049
  *
2132
- * The version of the OpenAPI document: v89.9.2
2050
+ * The version of the OpenAPI document: v92.5.0
2133
2051
  *
2134
2052
  *
2135
2053
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2347,7 +2265,7 @@ class CustomCommandsApi extends BaseAPI$1 {
2347
2265
  * Stream Chat API
2348
2266
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2349
2267
  *
2350
- * The version of the OpenAPI document: v89.9.2
2268
+ * The version of the OpenAPI document: v92.5.0
2351
2269
  *
2352
2270
  *
2353
2271
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2487,7 +2405,7 @@ class DevicesApi extends BaseAPI$1 {
2487
2405
  * Stream Chat API
2488
2406
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2489
2407
  *
2490
- * The version of the OpenAPI document: v89.9.2
2408
+ * The version of the OpenAPI document: v92.5.0
2491
2409
  *
2492
2410
  *
2493
2411
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2589,59 +2507,6 @@ class EventsApi extends BaseAPI$1 {
2589
2507
  return yield response.value();
2590
2508
  });
2591
2509
  }
2592
- /**
2593
- * Returns all events happened since client disconnect in specified channels Required permissions: - ReadChannel
2594
- * Sync
2595
- */
2596
- syncRaw(requestParameters, initOverrides) {
2597
- return __awaiter(this, void 0, void 0, function* () {
2598
- if (requestParameters.syncRequest === null || requestParameters.syncRequest === undefined) {
2599
- throw new RequiredError$1('syncRequest', 'Required parameter requestParameters.syncRequest was null or undefined when calling sync.');
2600
- }
2601
- const queryParameters = {};
2602
- if (requestParameters.withInaccessibleCids !== undefined) {
2603
- queryParameters['with_inaccessible_cids'] = requestParameters.withInaccessibleCids;
2604
- }
2605
- if (requestParameters.watch !== undefined) {
2606
- queryParameters['watch'] = requestParameters.watch;
2607
- }
2608
- if (requestParameters.clientId !== undefined) {
2609
- queryParameters['client_id'] = requestParameters.clientId;
2610
- }
2611
- if (requestParameters.connectionId !== undefined) {
2612
- queryParameters['connection_id'] = requestParameters.connectionId;
2613
- }
2614
- const headerParameters = {};
2615
- headerParameters['Content-Type'] = 'application/json';
2616
- if (this.configuration && this.configuration.apiKey) {
2617
- headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
2618
- }
2619
- if (this.configuration && this.configuration.apiKey) {
2620
- queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
2621
- }
2622
- if (this.configuration && this.configuration.apiKey) {
2623
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
2624
- }
2625
- const response = yield this.request({
2626
- path: `/sync`,
2627
- method: 'POST',
2628
- headers: headerParameters,
2629
- query: queryParameters,
2630
- body: requestParameters.syncRequest,
2631
- }, initOverrides);
2632
- return new JSONApiResponse$1(response);
2633
- });
2634
- }
2635
- /**
2636
- * Returns all events happened since client disconnect in specified channels Required permissions: - ReadChannel
2637
- * Sync
2638
- */
2639
- sync(requestParameters, initOverrides) {
2640
- return __awaiter(this, void 0, void 0, function* () {
2641
- const response = yield this.syncRaw(requestParameters, initOverrides);
2642
- return yield response.value();
2643
- });
2644
- }
2645
2510
  }
2646
2511
 
2647
2512
  /* tslint:disable */
@@ -2650,7 +2515,7 @@ class EventsApi extends BaseAPI$1 {
2650
2515
  * Stream Chat API
2651
2516
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
2652
2517
  *
2653
- * The version of the OpenAPI document: v89.9.2
2518
+ * The version of the OpenAPI document: v92.5.0
2654
2519
  *
2655
2520
  *
2656
2521
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2764,8 +2629,8 @@ class MessagesApi extends BaseAPI$1 {
2764
2629
  if (requestParameters.hard !== undefined) {
2765
2630
  queryParameters['hard'] = requestParameters.hard;
2766
2631
  }
2767
- if (requestParameters.createdBy !== undefined) {
2768
- queryParameters['created_by'] = requestParameters.createdBy;
2632
+ if (requestParameters.deletedBy !== undefined) {
2633
+ queryParameters['deleted_by'] = requestParameters.deletedBy;
2769
2634
  }
2770
2635
  const headerParameters = {};
2771
2636
  if (this.configuration && this.configuration.apiKey) {
@@ -2896,7 +2761,7 @@ class MessagesApi extends BaseAPI$1 {
2896
2761
  }
2897
2762
  const queryParameters = {};
2898
2763
  if (requestParameters.ids) {
2899
- queryParameters['ids'] = requestParameters.ids.join(',');
2764
+ queryParameters['ids'] = requestParameters.ids;
2900
2765
  }
2901
2766
  const headerParameters = {};
2902
2767
  if (this.configuration && this.configuration.apiKey) {
@@ -3767,7 +3632,7 @@ class MessagesApi extends BaseAPI$1 {
3767
3632
  * Stream Chat API
3768
3633
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
3769
3634
  *
3770
- * The version of the OpenAPI document: v89.9.2
3635
+ * The version of the OpenAPI document: v92.5.0
3771
3636
  *
3772
3637
  *
3773
3638
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -3977,7 +3842,7 @@ class PermissionsV2Api extends BaseAPI$1 {
3977
3842
  * Stream Chat API
3978
3843
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
3979
3844
  *
3980
- * The version of the OpenAPI document: v89.9.2
3845
+ * The version of the OpenAPI document: v92.5.0
3981
3846
  *
3982
3847
  *
3983
3848
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4114,7 +3979,7 @@ class PushApi extends BaseAPI$1 {
4114
3979
  * Stream Chat API
4115
3980
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4116
3981
  *
4117
- * The version of the OpenAPI document: v89.9.2
3982
+ * The version of the OpenAPI document: v92.5.0
4118
3983
  *
4119
3984
  *
4120
3985
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4174,7 +4039,7 @@ let ServerSideApi$1 = class ServerSideApi extends BaseAPI$1 {
4174
4039
  * Stream Chat API
4175
4040
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4176
4041
  *
4177
- * The version of the OpenAPI document: v89.9.2
4042
+ * The version of the OpenAPI document: v92.5.0
4178
4043
  *
4179
4044
  *
4180
4045
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4920,7 +4785,7 @@ class SettingsApi extends BaseAPI$1 {
4920
4785
  * Stream Chat API
4921
4786
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4922
4787
  *
4923
- * The version of the OpenAPI document: v89.9.2
4788
+ * The version of the OpenAPI document: v92.5.0
4924
4789
  *
4925
4790
  *
4926
4791
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4978,7 +4843,7 @@ class TasksApi extends BaseAPI$1 {
4978
4843
  * Stream Chat API
4979
4844
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4980
4845
  *
4981
- * The version of the OpenAPI document: v89.9.2
4846
+ * The version of the OpenAPI document: v92.5.0
4982
4847
  *
4983
4848
  *
4984
4849
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -5120,7 +4985,7 @@ class TestingApi extends BaseAPI$1 {
5120
4985
  * Stream Chat API
5121
4986
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5122
4987
  *
5123
- * The version of the OpenAPI document: v89.9.2
4988
+ * The version of the OpenAPI document: v92.5.0
5124
4989
  *
5125
4990
  *
5126
4991
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -6052,7 +5917,7 @@ class StreamChannel {
6052
5917
  this.type = type;
6053
5918
  this.id = id;
6054
5919
  this.delete = (request) => {
6055
- return this.channelsApi.deleteChannel(Object.assign(Object.assign({}, this.baseRequest), (request || {})));
5920
+ return this.channelsApi.deleteChannel(Object.assign(Object.assign({}, this.baseRequest), (request !== null && request !== void 0 ? request : {})));
6056
5921
  };
6057
5922
  this.update = (updateChannelRequest) => {
6058
5923
  return this.channelsApi.updateChannel(Object.assign(Object.assign({}, this.baseRequest), { updateChannelRequest }));
@@ -6062,7 +5927,7 @@ class StreamChannel {
6062
5927
  };
6063
5928
  this.getOrCreate = (channelGetOrCreateRequest) => __awaiter(this, void 0, void 0, function* () {
6064
5929
  if (this.id) {
6065
- return this.channelsApi.getOrCreateChannel(Object.assign(Object.assign({}, this.baseRequest), { channelGetOrCreateRequest: channelGetOrCreateRequest || {} }));
5930
+ return yield this.channelsApi.getOrCreateChannel(Object.assign(Object.assign({}, this.baseRequest), { channelGetOrCreateRequest: channelGetOrCreateRequest !== null && channelGetOrCreateRequest !== void 0 ? channelGetOrCreateRequest : {} }));
6066
5931
  }
6067
5932
  else {
6068
5933
  throw new Error(`This operation isn't yet implemented`);
@@ -6090,13 +5955,19 @@ class StreamChannel {
6090
5955
  return this.channelsApi.truncateChannel(Object.assign(Object.assign({}, this.baseRequest), { truncateChannelRequest }));
6091
5956
  };
6092
5957
  this.queryMembers = (request) => {
6093
- return this.channelsApi.queryMembers({ payload: Object.assign(Object.assign({}, this.baseRequest), request) });
5958
+ return this.channelsApi.queryMembers({
5959
+ payload: Object.assign(Object.assign({}, this.baseRequest), request),
5960
+ });
6094
5961
  };
6095
5962
  this.mute = (muteChannelRequest) => {
6096
- return this.channelsApi.muteChannel({ muteChannelRequest: Object.assign(Object.assign({}, muteChannelRequest), { channel_cids: [this.cid] }) });
5963
+ return this.channelsApi.muteChannel({
5964
+ muteChannelRequest: Object.assign(Object.assign({}, muteChannelRequest), { channel_cids: [this.cid] }),
5965
+ });
6097
5966
  };
6098
5967
  this.unmute = (unmuteChannelRequest) => {
6099
- return this.channelsApi.unmuteChannel({ unmuteChannelRequest: Object.assign(Object.assign({}, unmuteChannelRequest), { channel_cid: this.cid, channel_cids: [] }) });
5968
+ return this.channelsApi.unmuteChannel({
5969
+ unmuteChannelRequest: Object.assign(Object.assign({}, unmuteChannelRequest), { channel_cid: this.cid, channel_cids: [] }),
5970
+ });
6100
5971
  };
6101
5972
  // TODO: there is probably an issue with the generated code here
6102
5973
  // uploadFile = (options: Omit<OmitTypeId<UploadFileRequest>, 'file'>, file: Buffer) => {
@@ -6121,7 +5992,10 @@ class StreamChannel {
6121
5992
  return this.messagesApi.updateMessage({ id, updateMessageRequest });
6122
5993
  };
6123
5994
  this.updateMessagePartial = (id, updateMessagePartialRequest) => {
6124
- return this.messagesApi.updateMessagePartial({ id, updateMessagePartialRequest });
5995
+ return this.messagesApi.updateMessagePartial({
5996
+ id,
5997
+ updateMessagePartialRequest,
5998
+ });
6125
5999
  };
6126
6000
  this.getMessage = (request) => {
6127
6001
  return this.messagesApi.getMessage(request);
@@ -6139,23 +6013,26 @@ class StreamChannel {
6139
6013
  return this.messagesApi.getOG(request);
6140
6014
  };
6141
6015
  this.sendMessageReaction = (messageId, sendReactionRequest) => {
6142
- return this.messagesApi.sendReaction({ id: messageId, sendReactionRequest });
6016
+ return this.messagesApi.sendReaction({
6017
+ id: messageId,
6018
+ sendReactionRequest,
6019
+ });
6143
6020
  };
6144
6021
  this.deleteMessageReaction = (messageId, request) => {
6145
6022
  return this.messagesApi.deleteReaction(Object.assign(Object.assign({}, request), { id: messageId }));
6146
6023
  };
6147
6024
  this.getMessageReactions = (messageId, request) => {
6148
- return this.messagesApi.getReactions(Object.assign(Object.assign({}, (request || {})), { id: messageId }));
6025
+ return this.messagesApi.getReactions(Object.assign(Object.assign({}, (request !== null && request !== void 0 ? request : {})), { id: messageId }));
6149
6026
  };
6150
6027
  this.sendCustomEvent = (event) => {
6151
6028
  return this.eventsApi.sendEvent(Object.assign(Object.assign({}, this.baseRequest), { sendEventRequest: { event } }));
6152
6029
  };
6153
6030
  const configuration = this.streamClient.getConfiguration();
6154
- //@ts-expect-error typing problem
6031
+ // @ts-expect-error typing problem
6155
6032
  this.channelsApi = new ChannelsApi(configuration);
6156
- //@ts-expect-error typing problem
6033
+ // @ts-expect-error typing problem
6157
6034
  this.messagesApi = new MessagesApi(configuration);
6158
- //@ts-expect-error typing problem
6035
+ // @ts-expect-error typing problem
6159
6036
  this.eventsApi = new EventsApi(configuration);
6160
6037
  }
6161
6038
  get cid() {
@@ -6167,7 +6044,7 @@ class StreamChannel {
6167
6044
  }
6168
6045
  return {
6169
6046
  id: this.id,
6170
- type: this.type
6047
+ type: this.type,
6171
6048
  };
6172
6049
  }
6173
6050
  }
@@ -6206,16 +6083,23 @@ class StreamChatClient {
6206
6083
  return this.channelTypesApi.listChannelTypes();
6207
6084
  };
6208
6085
  this.updateChannelType = (name, updateChannelTypeRequest) => {
6209
- return this.channelTypesApi.updateChannelType({ name, updateChannelTypeRequest });
6086
+ return this.channelTypesApi.updateChannelType({
6087
+ name,
6088
+ updateChannelTypeRequest,
6089
+ });
6210
6090
  };
6211
6091
  this.queryChannels = (queryChannelsRequest) => {
6212
- return this.channelsApi.queryChannels({ queryChannelsRequest: queryChannelsRequest || null });
6092
+ return this.channelsApi.queryChannels({
6093
+ queryChannelsRequest: queryChannelsRequest !== null && queryChannelsRequest !== void 0 ? queryChannelsRequest : null,
6094
+ });
6213
6095
  };
6214
6096
  this.searchMessages = (payload) => {
6215
- return this.channelsApi.search({ payload: payload });
6097
+ return this.channelsApi.search({ payload });
6216
6098
  };
6217
6099
  this.exportChannels = (exportChannelsRequest) => {
6218
- return this.channelsApi.exportChannels({ exportChannelsRequest: exportChannelsRequest || null });
6100
+ return this.channelsApi.exportChannels({
6101
+ exportChannelsRequest: exportChannelsRequest !== null && exportChannelsRequest !== void 0 ? exportChannelsRequest : null,
6102
+ });
6219
6103
  };
6220
6104
  this.getExportStatus = (request) => {
6221
6105
  return this.channelsApi.getExportChannelsStatus(request);
@@ -6236,13 +6120,13 @@ class StreamChatClient {
6236
6120
  return this.commandsApi.deleteCommand(request);
6237
6121
  };
6238
6122
  const configuration = this.streamClient.getConfiguration();
6239
- //@ts-expect-error typing problem
6123
+ // @ts-expect-error typing problem
6240
6124
  this.settingsApi = new SettingsApi(configuration);
6241
- //@ts-expect-error typing problem
6125
+ // @ts-expect-error typing problem
6242
6126
  this.channelTypesApi = new ChannelTypesApi(configuration);
6243
- //@ts-expect-error typing problem
6127
+ // @ts-expect-error typing problem
6244
6128
  this.channelsApi = new ChannelsApi(configuration);
6245
- //@ts-expect-error typing problem
6129
+ // @ts-expect-error typing problem
6246
6130
  this.commandsApi = new CustomCommandsApi(configuration);
6247
6131
  }
6248
6132
  }
@@ -6253,7 +6137,7 @@ class StreamChatClient {
6253
6137
  * Stream Video API
6254
6138
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6255
6139
  *
6256
- * The version of the OpenAPI document: v89.9.2
6140
+ * The version of the OpenAPI document: v92.5.0
6257
6141
  *
6258
6142
  *
6259
6143
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -6523,7 +6407,7 @@ class VoidApiResponse {
6523
6407
  * Stream Video API
6524
6408
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6525
6409
  *
6526
- * The version of the OpenAPI document: v89.9.2
6410
+ * The version of the OpenAPI document: v92.5.0
6527
6411
  *
6528
6412
  *
6529
6413
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -6534,48 +6418,6 @@ class VoidApiResponse {
6534
6418
  *
6535
6419
  */
6536
6420
  class DefaultApi extends BaseAPI {
6537
- /**
6538
- * Sends events: - call.accepted Required permissions: - JoinCall
6539
- * Accept Call
6540
- */
6541
- acceptCallRaw(requestParameters, initOverrides) {
6542
- return __awaiter(this, void 0, void 0, function* () {
6543
- if (requestParameters.type === null || requestParameters.type === undefined) {
6544
- throw new RequiredError('type', 'Required parameter requestParameters.type was null or undefined when calling acceptCall.');
6545
- }
6546
- if (requestParameters.id === null || requestParameters.id === undefined) {
6547
- throw new RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling acceptCall.');
6548
- }
6549
- const queryParameters = {};
6550
- const headerParameters = {};
6551
- if (this.configuration && this.configuration.apiKey) {
6552
- headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
6553
- }
6554
- if (this.configuration && this.configuration.apiKey) {
6555
- queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
6556
- }
6557
- if (this.configuration && this.configuration.apiKey) {
6558
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
6559
- }
6560
- const response = yield this.request({
6561
- path: `/call/{type}/{id}/accept`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
6562
- method: 'POST',
6563
- headers: headerParameters,
6564
- query: queryParameters,
6565
- }, initOverrides);
6566
- return new JSONApiResponse(response);
6567
- });
6568
- }
6569
- /**
6570
- * Sends events: - call.accepted Required permissions: - JoinCall
6571
- * Accept Call
6572
- */
6573
- acceptCall(requestParameters, initOverrides) {
6574
- return __awaiter(this, void 0, void 0, function* () {
6575
- const response = yield this.acceptCallRaw(requestParameters, initOverrides);
6576
- return yield response.value();
6577
- });
6578
- }
6579
6421
  /**
6580
6422
  * Block a user, preventing them from joining the call until they are unblocked. Sends events: - call.blocked_user Required permissions: - BlockUser
6581
6423
  * Block user on a call
@@ -6976,56 +6818,6 @@ class DefaultApi extends BaseAPI {
6976
6818
  return yield response.value();
6977
6819
  });
6978
6820
  }
6979
- /**
6980
- * Request to join a call Required permissions: - CreateCall - JoinCall
6981
- * Join call
6982
- */
6983
- joinCallRaw(requestParameters, initOverrides) {
6984
- return __awaiter(this, void 0, void 0, function* () {
6985
- if (requestParameters.type === null || requestParameters.type === undefined) {
6986
- throw new RequiredError('type', 'Required parameter requestParameters.type was null or undefined when calling joinCall.');
6987
- }
6988
- if (requestParameters.id === null || requestParameters.id === undefined) {
6989
- throw new RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling joinCall.');
6990
- }
6991
- if (requestParameters.videoJoinCallRequest === null || requestParameters.videoJoinCallRequest === undefined) {
6992
- throw new RequiredError('videoJoinCallRequest', 'Required parameter requestParameters.videoJoinCallRequest was null or undefined when calling joinCall.');
6993
- }
6994
- const queryParameters = {};
6995
- if (requestParameters.connectionId !== undefined) {
6996
- queryParameters['connection_id'] = requestParameters.connectionId;
6997
- }
6998
- const headerParameters = {};
6999
- headerParameters['Content-Type'] = 'application/json';
7000
- if (this.configuration && this.configuration.apiKey) {
7001
- headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
7002
- }
7003
- if (this.configuration && this.configuration.apiKey) {
7004
- queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
7005
- }
7006
- if (this.configuration && this.configuration.apiKey) {
7007
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
7008
- }
7009
- const response = yield this.request({
7010
- path: `/call/{type}/{id}/join`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7011
- method: 'POST',
7012
- headers: headerParameters,
7013
- query: queryParameters,
7014
- body: requestParameters.videoJoinCallRequest,
7015
- }, initOverrides);
7016
- return new JSONApiResponse(response);
7017
- });
7018
- }
7019
- /**
7020
- * Request to join a call Required permissions: - CreateCall - JoinCall
7021
- * Join call
7022
- */
7023
- joinCall(requestParameters, initOverrides) {
7024
- return __awaiter(this, void 0, void 0, function* () {
7025
- const response = yield this.joinCallRaw(requestParameters, initOverrides);
7026
- return yield response.value();
7027
- });
7028
- }
7029
6821
  /**
7030
6822
  * Returns all available devices
7031
6823
  * List devices
@@ -7239,95 +7031,6 @@ class DefaultApi extends BaseAPI {
7239
7031
  return yield response.value();
7240
7032
  });
7241
7033
  }
7242
- /**
7243
- * Sends events: - call.rejected Required permissions: - JoinCall
7244
- * Reject Call
7245
- */
7246
- rejectCallRaw(requestParameters, initOverrides) {
7247
- return __awaiter(this, void 0, void 0, function* () {
7248
- if (requestParameters.type === null || requestParameters.type === undefined) {
7249
- throw new RequiredError('type', 'Required parameter requestParameters.type was null or undefined when calling rejectCall.');
7250
- }
7251
- if (requestParameters.id === null || requestParameters.id === undefined) {
7252
- throw new RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling rejectCall.');
7253
- }
7254
- const queryParameters = {};
7255
- const headerParameters = {};
7256
- if (this.configuration && this.configuration.apiKey) {
7257
- headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
7258
- }
7259
- if (this.configuration && this.configuration.apiKey) {
7260
- queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
7261
- }
7262
- if (this.configuration && this.configuration.apiKey) {
7263
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
7264
- }
7265
- const response = yield this.request({
7266
- path: `/call/{type}/{id}/reject`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7267
- method: 'POST',
7268
- headers: headerParameters,
7269
- query: queryParameters,
7270
- }, initOverrides);
7271
- return new JSONApiResponse(response);
7272
- });
7273
- }
7274
- /**
7275
- * Sends events: - call.rejected Required permissions: - JoinCall
7276
- * Reject Call
7277
- */
7278
- rejectCall(requestParameters, initOverrides) {
7279
- return __awaiter(this, void 0, void 0, function* () {
7280
- const response = yield this.rejectCallRaw(requestParameters, initOverrides);
7281
- return yield response.value();
7282
- });
7283
- }
7284
- /**
7285
- * Request permission to perform an action Sends events: - call.permission_request
7286
- * Request permission
7287
- */
7288
- requestPermissionRaw(requestParameters, initOverrides) {
7289
- return __awaiter(this, void 0, void 0, function* () {
7290
- if (requestParameters.type === null || requestParameters.type === undefined) {
7291
- throw new RequiredError('type', 'Required parameter requestParameters.type was null or undefined when calling requestPermission.');
7292
- }
7293
- if (requestParameters.id === null || requestParameters.id === undefined) {
7294
- throw new RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling requestPermission.');
7295
- }
7296
- if (requestParameters.videoRequestPermissionRequest === null || requestParameters.videoRequestPermissionRequest === undefined) {
7297
- throw new RequiredError('videoRequestPermissionRequest', 'Required parameter requestParameters.videoRequestPermissionRequest was null or undefined when calling requestPermission.');
7298
- }
7299
- const queryParameters = {};
7300
- const headerParameters = {};
7301
- headerParameters['Content-Type'] = 'application/json';
7302
- if (this.configuration && this.configuration.apiKey) {
7303
- headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
7304
- }
7305
- if (this.configuration && this.configuration.apiKey) {
7306
- queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
7307
- }
7308
- if (this.configuration && this.configuration.apiKey) {
7309
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
7310
- }
7311
- const response = yield this.request({
7312
- path: `/call/{type}/{id}/request_permission`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7313
- method: 'POST',
7314
- headers: headerParameters,
7315
- query: queryParameters,
7316
- body: requestParameters.videoRequestPermissionRequest,
7317
- }, initOverrides);
7318
- return new JSONApiResponse(response);
7319
- });
7320
- }
7321
- /**
7322
- * Request permission to perform an action Sends events: - call.permission_request
7323
- * Request permission
7324
- */
7325
- requestPermission(requestParameters, initOverrides) {
7326
- return __awaiter(this, void 0, void 0, function* () {
7327
- const response = yield this.requestPermissionRaw(requestParameters, initOverrides);
7328
- return yield response.value();
7329
- });
7330
- }
7331
7034
  /**
7332
7035
  * Sends custom event to the call Sends events: - custom Required permissions: - SendEvent
7333
7036
  * Send custom event
@@ -7375,53 +7078,6 @@ class DefaultApi extends BaseAPI {
7375
7078
  return yield response.value();
7376
7079
  });
7377
7080
  }
7378
- /**
7379
- * Sends reaction to the call Sends events: - call.reaction_new Required permissions: - CreateCallReaction
7380
- * Send reaction to the call
7381
- */
7382
- sendVideoReactionRaw(requestParameters, initOverrides) {
7383
- return __awaiter(this, void 0, void 0, function* () {
7384
- if (requestParameters.type === null || requestParameters.type === undefined) {
7385
- throw new RequiredError('type', 'Required parameter requestParameters.type was null or undefined when calling sendVideoReaction.');
7386
- }
7387
- if (requestParameters.id === null || requestParameters.id === undefined) {
7388
- throw new RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling sendVideoReaction.');
7389
- }
7390
- if (requestParameters.videoSendReactionRequest === null || requestParameters.videoSendReactionRequest === undefined) {
7391
- throw new RequiredError('videoSendReactionRequest', 'Required parameter requestParameters.videoSendReactionRequest was null or undefined when calling sendVideoReaction.');
7392
- }
7393
- const queryParameters = {};
7394
- const headerParameters = {};
7395
- headerParameters['Content-Type'] = 'application/json';
7396
- if (this.configuration && this.configuration.apiKey) {
7397
- headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
7398
- }
7399
- if (this.configuration && this.configuration.apiKey) {
7400
- queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
7401
- }
7402
- if (this.configuration && this.configuration.apiKey) {
7403
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
7404
- }
7405
- const response = yield this.request({
7406
- path: `/call/{type}/{id}/reaction`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7407
- method: 'POST',
7408
- headers: headerParameters,
7409
- query: queryParameters,
7410
- body: requestParameters.videoSendReactionRequest,
7411
- }, initOverrides);
7412
- return new JSONApiResponse(response);
7413
- });
7414
- }
7415
- /**
7416
- * Sends reaction to the call Sends events: - call.reaction_new Required permissions: - CreateCallReaction
7417
- * Send reaction to the call
7418
- */
7419
- sendVideoReaction(requestParameters, initOverrides) {
7420
- return __awaiter(this, void 0, void 0, function* () {
7421
- const response = yield this.sendVideoReactionRaw(requestParameters, initOverrides);
7422
- return yield response.value();
7423
- });
7424
- }
7425
7081
  /**
7426
7082
  * Starts HLS broadcasting Required permissions: - StartBroadcasting
7427
7083
  * Start HLS broadcasting
@@ -8046,7 +7702,7 @@ class DefaultApi extends BaseAPI {
8046
7702
  * Stream Video API
8047
7703
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
8048
7704
  *
8049
- * The version of the OpenAPI document: v89.9.2
7705
+ * The version of the OpenAPI document: v92.5.0
8050
7706
  *
8051
7707
  *
8052
7708
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -8260,12 +7916,10 @@ class ServerSideApi extends BaseAPI {
8260
7916
 
8261
7917
  class StreamCall {
8262
7918
  constructor(streamClient, type, id) {
7919
+ var _a;
8263
7920
  this.streamClient = streamClient;
8264
7921
  this.type = type;
8265
7922
  this.id = id;
8266
- this.accept = () => {
8267
- return this.apiClient.acceptCall(this.baseRequest);
8268
- };
8269
7923
  this.blockUser = (videoBlockUserRequest) => {
8270
7924
  return this.apiClient.blockUser(Object.assign(Object.assign({}, this.baseRequest), { videoBlockUserRequest }));
8271
7925
  };
@@ -8273,16 +7927,16 @@ class StreamCall {
8273
7927
  return this.apiClient.endCall(Object.assign({}, this.baseRequest));
8274
7928
  };
8275
7929
  this.get = (request) => {
8276
- return this.apiClient.getCall(Object.assign(Object.assign({}, (request || {})), this.baseRequest));
7930
+ return this.apiClient.getCall(Object.assign(Object.assign({}, (request !== null && request !== void 0 ? request : {})), this.baseRequest));
8277
7931
  };
8278
7932
  this.getOrCreate = (videoGetOrCreateCallRequest) => {
8279
- return this.apiClient.getOrCreateCall(Object.assign(Object.assign({}, this.baseRequest), { videoGetOrCreateCallRequest: videoGetOrCreateCallRequest || {} }));
7933
+ return this.apiClient.getOrCreateCall(Object.assign(Object.assign({}, this.baseRequest), { videoGetOrCreateCallRequest: videoGetOrCreateCallRequest !== null && videoGetOrCreateCallRequest !== void 0 ? videoGetOrCreateCallRequest : {} }));
8280
7934
  };
8281
7935
  this.create = (getOrCreateCallRequest) => {
8282
7936
  return this.getOrCreate(getOrCreateCallRequest);
8283
7937
  };
8284
7938
  this.goLive = (videoGoLiveRequest) => {
8285
- return this.apiClient.goLive(Object.assign(Object.assign({}, this.baseRequest), { videoGoLiveRequest: videoGoLiveRequest || {} }));
7939
+ return this.apiClient.goLive(Object.assign(Object.assign({}, this.baseRequest), { videoGoLiveRequest: videoGoLiveRequest !== null && videoGoLiveRequest !== void 0 ? videoGoLiveRequest : {} }));
8286
7940
  };
8287
7941
  this.listRecordings = () => {
8288
7942
  return this.apiClient.listRecordings(Object.assign({}, this.baseRequest));
@@ -8292,7 +7946,7 @@ class StreamCall {
8292
7946
  };
8293
7947
  this.queryMembers = (request) => {
8294
7948
  return this.apiClient.queryMembers({
8295
- videoQueryMembersRequest: Object.assign(Object.assign({}, (request || {})), this.baseRequest),
7949
+ videoQueryMembersRequest: Object.assign(Object.assign({}, (request !== null && request !== void 0 ? request : {})), this.baseRequest),
8296
7950
  });
8297
7951
  };
8298
7952
  this.sendCustomEvent = (event) => {
@@ -8339,8 +7993,7 @@ class StreamCall {
8339
7993
  };
8340
7994
  this.baseRequest = { id: this.id, type: this.type };
8341
7995
  const configuration = this.streamClient.getConfiguration({
8342
- basePath: this.streamClient.options.basePath ||
8343
- "https://video.stream-io-api.com/video",
7996
+ basePath: (_a = this.streamClient.options.basePath) !== null && _a !== void 0 ? _a : 'https://video.stream-io-api.com/video',
8344
7997
  });
8345
7998
  this.apiClient = new DefaultApi(configuration);
8346
7999
  }
@@ -8348,13 +8001,14 @@ class StreamCall {
8348
8001
 
8349
8002
  class StreamVideoClient {
8350
8003
  constructor(streamClient) {
8004
+ var _a;
8351
8005
  this.streamClient = streamClient;
8352
8006
  this.call = (type, id) => {
8353
8007
  return new StreamCall(this.streamClient, type, id);
8354
8008
  };
8355
8009
  this.queryCalls = (request) => {
8356
8010
  return this.apiClient.queryCalls({
8357
- videoQueryCallsRequest: request || {},
8011
+ videoQueryCallsRequest: request !== null && request !== void 0 ? request : {},
8358
8012
  });
8359
8013
  };
8360
8014
  this.createCallType = (videoCreateCallTypeRequest) => {
@@ -8378,8 +8032,7 @@ class StreamVideoClient {
8378
8032
  });
8379
8033
  };
8380
8034
  const configuration = this.streamClient.getConfiguration({
8381
- basePath: this.streamClient.options.basePath ||
8382
- "https://video.stream-io-api.com/video",
8035
+ basePath: (_a = this.streamClient.options.basePath) !== null && _a !== void 0 ? _a : 'https://video.stream-io-api.com/video',
8383
8036
  });
8384
8037
  this.apiClient = new DefaultApi(configuration);
8385
8038
  this.videoServerSideApiClient = new ServerSideApi(configuration);
@@ -8417,6 +8070,7 @@ class StreamClient {
8417
8070
  * @param config can be a string, which will be interpreted as base path (deprecated), or a config object
8418
8071
  */
8419
8072
  constructor(apiKey, secret, config) {
8073
+ var _a;
8420
8074
  this.apiKey = apiKey;
8421
8075
  this.secret = secret;
8422
8076
  this.config = config;
@@ -8486,11 +8140,11 @@ class StreamClient {
8486
8140
  return this.usersApi.exportUsers({ exportUsersRequest });
8487
8141
  };
8488
8142
  this.flag = (flagRequest) => __awaiter(this, void 0, void 0, function* () {
8489
- var _a, _b;
8143
+ var _b, _c;
8490
8144
  flagRequest.user = this.mapCustomDataBeforeSend(flagRequest.user);
8491
8145
  const response = yield this.usersApi.flag({ flagRequest });
8492
- if ((_a = response.flag) === null || _a === void 0 ? void 0 : _a.user) {
8493
- response.flag.user = this.mapCustomDataAfterReceive((_b = response.flag) === null || _b === void 0 ? void 0 : _b.user);
8146
+ if ((_b = response.flag) === null || _b === void 0 ? void 0 : _b.user) {
8147
+ response.flag.user = this.mapCustomDataAfterReceive((_c = response.flag) === null || _c === void 0 ? void 0 : _c.user);
8494
8148
  }
8495
8149
  return response;
8496
8150
  });
@@ -8506,7 +8160,7 @@ class StreamClient {
8506
8160
  this.queryUsers = (payload) => __awaiter(this, void 0, void 0, function* () {
8507
8161
  payload.user = this.mapCustomDataBeforeSend(payload.user);
8508
8162
  const response = yield this.usersApi.queryUsers({ payload });
8509
- // @ts-expect-error
8163
+ // @ts-expect-error typing problem
8510
8164
  response.users = response.users.map((u) => this.mapCustomDataAfterReceive(u));
8511
8165
  return response;
8512
8166
  });
@@ -8527,9 +8181,9 @@ class StreamClient {
8527
8181
  return this.usersApi.unban(request);
8528
8182
  };
8529
8183
  this.unflag = (flagRequest) => __awaiter(this, void 0, void 0, function* () {
8530
- var _c;
8184
+ var _d;
8531
8185
  const response = yield this.usersApi.unflag({ flagRequest });
8532
- if ((_c = response.flag) === null || _c === void 0 ? void 0 : _c.user) {
8186
+ if ((_d = response.flag) === null || _d === void 0 ? void 0 : _d.user) {
8533
8187
  response.flag.user = this.mapCustomDataAfterReceive(response.flag.user);
8534
8188
  }
8535
8189
  return response;
@@ -8555,11 +8209,11 @@ class StreamClient {
8555
8209
  return response;
8556
8210
  });
8557
8211
  this.muteUser = (muteUserRequest) => __awaiter(this, void 0, void 0, function* () {
8558
- var _d, _e;
8212
+ var _e, _f;
8559
8213
  muteUserRequest.user = this.mapCustomDataBeforeSend(muteUserRequest.user);
8560
8214
  const response = yield this.usersApi.muteUser({ muteUserRequest });
8561
- if ((_d = response.mute) === null || _d === void 0 ? void 0 : _d.user) {
8562
- response.mute.user = this.mapCustomDataAfterReceive((_e = response.mute) === null || _e === void 0 ? void 0 : _e.user);
8215
+ if ((_e = response.mute) === null || _e === void 0 ? void 0 : _e.user) {
8216
+ response.mute.user = this.mapCustomDataAfterReceive((_f = response.mute) === null || _f === void 0 ? void 0 : _f.user);
8563
8217
  }
8564
8218
  if (response.mutes) {
8565
8219
  response.mutes = response.mutes.map((m) => {
@@ -8606,23 +8260,24 @@ class StreamClient {
8606
8260
  return this.tasksApi.getTask(request);
8607
8261
  };
8608
8262
  this.getConfiguration = (options) => {
8263
+ var _a;
8609
8264
  return new Configuration({
8610
8265
  apiKey: (name) => {
8611
8266
  const mapping = {
8612
- "Stream-Auth-Type": "jwt",
8267
+ 'Stream-Auth-Type': 'jwt',
8613
8268
  api_key: this.apiKey,
8614
8269
  Authorization: this.token,
8615
8270
  };
8616
8271
  return mapping[name];
8617
8272
  },
8618
- basePath: (options === null || options === void 0 ? void 0 : options.basePath) || this.options.basePath,
8273
+ basePath: (_a = options === null || options === void 0 ? void 0 : options.basePath) !== null && _a !== void 0 ? _a : this.options.basePath,
8619
8274
  headers: {
8620
- "X-Stream-Client": "stream-node-" + "0.1.6",
8275
+ 'X-Stream-Client': 'stream-node-' + "0.1.7",
8621
8276
  },
8622
8277
  middleware: [
8623
8278
  {
8624
8279
  pre: (context) => {
8625
- context.init.headers = Object.assign(Object.assign({}, context.init.headers), { "x-client-request-id": v4(), "Accept-Encoding": "gzip" });
8280
+ context.init.headers = Object.assign(Object.assign({}, context.init.headers), { 'x-client-request-id': v4(), 'Accept-Encoding': 'gzip' });
8626
8281
  return Promise.resolve(context);
8627
8282
  },
8628
8283
  },
@@ -8645,7 +8300,7 @@ class StreamClient {
8645
8300
  },
8646
8301
  onError: (context) => {
8647
8302
  const error = context.error;
8648
- if (error.name === "AbortError" || error.name === "TimeoutError") {
8303
+ if (error.name === 'AbortError' || error.name === 'TimeoutError') {
8649
8304
  throw new FetchError(error, `The request was aborted due to to the ${this.options.timeout}ms timeout, you can set the timeout in the StreamClient constructor`);
8650
8305
  }
8651
8306
  return Promise.resolve(context.response);
@@ -8656,41 +8311,41 @@ class StreamClient {
8656
8311
  queryParamsStringify: (params) => {
8657
8312
  const newParams = [];
8658
8313
  for (const k in params) {
8659
- if (Array.isArray(params[k]) || typeof params[k] === "object") {
8314
+ if (Array.isArray(params[k]) || typeof params[k] === 'object') {
8660
8315
  newParams.push(`${k}=${encodeURIComponent(JSON.stringify(params[k]))}`);
8661
8316
  }
8662
8317
  else {
8663
8318
  const value = params[k];
8664
- if (typeof value === "string" ||
8665
- typeof value === "number" ||
8666
- typeof value === "boolean") {
8319
+ if (typeof value === 'string' ||
8320
+ typeof value === 'number' ||
8321
+ typeof value === 'boolean') {
8667
8322
  newParams.push(`${k}=${encodeURIComponent(value)}`);
8668
8323
  }
8669
8324
  }
8670
8325
  }
8671
- return newParams.join("&");
8326
+ return newParams.join('&');
8672
8327
  },
8673
8328
  });
8674
8329
  };
8675
8330
  this.reservedKeywords = [
8676
- "ban_expires",
8677
- "banned",
8678
- "id",
8679
- "invisible",
8680
- "language",
8681
- "push_notifications",
8682
- "revoke_tokens_issued_before",
8683
- "role",
8684
- "teams",
8685
- "created_at",
8686
- "deactivated_at",
8687
- "deleted_at",
8688
- "last_active",
8689
- "online",
8690
- "updated_at",
8691
- "shadow_banned",
8692
- "name",
8693
- "image",
8331
+ 'ban_expires',
8332
+ 'banned',
8333
+ 'id',
8334
+ 'invisible',
8335
+ 'language',
8336
+ 'push_notifications',
8337
+ 'revoke_tokens_issued_before',
8338
+ 'role',
8339
+ 'teams',
8340
+ 'created_at',
8341
+ 'deactivated_at',
8342
+ 'deleted_at',
8343
+ 'last_active',
8344
+ 'online',
8345
+ 'updated_at',
8346
+ 'shadow_banned',
8347
+ 'name',
8348
+ 'image',
8694
8349
  ];
8695
8350
  this.mapCustomDataBeforeSend = (user) => {
8696
8351
  if (!user) {
@@ -8700,53 +8355,34 @@ class StreamClient {
8700
8355
  delete copy.custom;
8701
8356
  return Object.assign(Object.assign({}, copy), user.custom);
8702
8357
  };
8703
- this.mapCustomDataAfterReceive = (user) => {
8704
- if (!user) {
8705
- return undefined;
8706
- }
8707
- // @ts-expect-error
8708
- let result = {};
8709
- Object.keys(user).forEach((key) => {
8710
- if (!this.reservedKeywords.includes(key)) {
8711
- if (!result.custom) {
8712
- result.custom = {};
8713
- }
8714
- result.custom[key] = user[key];
8715
- }
8716
- else {
8717
- result[key] = user[key];
8718
- }
8719
- });
8720
- return result;
8721
- };
8722
8358
  this.token = JWTServerToken(this.secret);
8723
8359
  this.video = new StreamVideoClient(this);
8724
8360
  this.chat = new StreamChatClient(this);
8725
- if (typeof config === "string") {
8361
+ if (typeof config === 'string') {
8726
8362
  this.options.basePath = config;
8727
8363
  this.options.timeout = StreamClient.DEFAULT_TIMEOUT;
8728
8364
  }
8729
8365
  else {
8730
- this.options.timeout = (config === null || config === void 0 ? void 0 : config.timeout) || StreamClient.DEFAULT_TIMEOUT;
8366
+ this.options.timeout = (_a = config === null || config === void 0 ? void 0 : config.timeout) !== null && _a !== void 0 ? _a : StreamClient.DEFAULT_TIMEOUT;
8731
8367
  }
8732
8368
  const chatConfiguration = this.getConfiguration();
8733
- //@ts-expect-error typing problem
8369
+ // @ts-expect-error typing problem
8734
8370
  this.usersApi = new UsersApi(chatConfiguration);
8735
- //@ts-expect-error typing problem
8371
+ // @ts-expect-error typing problem
8736
8372
  this.devicesApi = new DevicesApi(chatConfiguration);
8737
- //@ts-expect-error typing problem
8373
+ // @ts-expect-error typing problem
8738
8374
  this.pushApi = new PushApi(chatConfiguration);
8739
- //@ts-expect-error typing problem
8375
+ // @ts-expect-error typing problem
8740
8376
  this.serversideApi = new ServerSideApi$1(chatConfiguration);
8741
- //@ts-expect-error typing problem
8377
+ // @ts-expect-error typing problem
8742
8378
  this.testingApi = new TestingApi(chatConfiguration);
8743
- //@ts-expect-error typing problem
8379
+ // @ts-expect-error typing problem
8744
8380
  this.permissionsApi = new PermissionsV2Api(chatConfiguration);
8745
- //@ts-expect-error typing problem
8381
+ // @ts-expect-error typing problem
8746
8382
  this.settingsApi = new SettingsApi(chatConfiguration);
8747
- //@ts-expect-error typing problem
8383
+ // @ts-expect-error typing problem
8748
8384
  this.eventsApi = new EventsApi(chatConfiguration);
8749
- //@ts-expect-error typing problem
8385
+ // @ts-expect-error typing problem
8750
8386
  this.tasksApi = new TasksApi(chatConfiguration);
8751
8387
  }
8752
8388
  /**
@@ -8790,6 +8426,25 @@ class StreamClient {
8790
8426
  extra.call_cids = call_cids;
8791
8427
  return JWTUserToken(this.secret, userID, extra);
8792
8428
  }
8429
+ mapCustomDataAfterReceive(user) {
8430
+ if (!user) {
8431
+ return undefined;
8432
+ }
8433
+ // @ts-expect-error typing problem
8434
+ const result = {};
8435
+ Object.keys(user).forEach((key) => {
8436
+ if (!this.reservedKeywords.includes(key)) {
8437
+ if (!result.custom) {
8438
+ result.custom = {};
8439
+ }
8440
+ result.custom[key] = user[key];
8441
+ }
8442
+ else {
8443
+ result[key] = user[key];
8444
+ }
8445
+ });
8446
+ return result;
8447
+ }
8793
8448
  }
8794
8449
  StreamClient.DEFAULT_TIMEOUT = 3000;
8795
8450