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