@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.
- package/README.md +8 -2
- package/dist/index.cjs.js +170 -515
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.es.js +170 -515
- package/dist/index.es.js.map +1 -1
- package/dist/src/StreamCall.d.ts +7 -10
- package/dist/src/StreamChannel.d.ts +4 -4
- package/dist/src/StreamChatClient.d.ts +8 -8
- package/dist/src/StreamClient.d.ts +11 -11
- package/dist/src/StreamVideoClient.d.ts +4 -4
- package/dist/src/gen/chat/apis/ChannelTypesApi.d.ts +1 -1
- package/dist/src/gen/chat/apis/ChannelsApi.d.ts +12 -40
- package/dist/src/gen/chat/apis/CustomCommandsApi.d.ts +1 -1
- package/dist/src/gen/chat/apis/DefaultApi.d.ts +1 -1
- package/dist/src/gen/chat/apis/DevicesApi.d.ts +1 -1
- package/dist/src/gen/chat/apis/EventsApi.d.ts +2 -19
- package/dist/src/gen/chat/apis/FilesApi.d.ts +1 -1
- package/dist/src/gen/chat/apis/GDPRApi.d.ts +1 -1
- package/dist/src/gen/chat/apis/ImportsApi.d.ts +1 -1
- package/dist/src/gen/chat/apis/MessagesApi.d.ts +2 -2
- package/dist/src/gen/chat/apis/ModerationApi.d.ts +1 -1
- package/dist/src/gen/chat/apis/PermissionsV2Api.d.ts +1 -1
- package/dist/src/gen/chat/apis/PushApi.d.ts +1 -1
- package/dist/src/gen/chat/apis/ReactionsApi.d.ts +1 -1
- package/dist/src/gen/chat/apis/ServerSideApi.d.ts +1 -1
- package/dist/src/gen/chat/apis/SettingsApi.d.ts +1 -1
- package/dist/src/gen/chat/apis/TasksApi.d.ts +1 -1
- package/dist/src/gen/chat/apis/TestingApi.d.ts +1 -1
- package/dist/src/gen/chat/apis/UsersApi.d.ts +1 -1
- package/dist/src/gen/chat/models/index.d.ts +141 -160
- package/dist/src/gen/chat/runtime.d.ts +1 -1
- package/dist/src/gen/video/apis/DefaultApi.d.ts +2 -76
- package/dist/src/gen/video/apis/ServerSideApi.d.ts +1 -1
- package/dist/src/gen/video/models/index.d.ts +0 -271
- package/dist/src/gen/video/runtime.d.ts +1 -1
- package/dist/src/utils/create-token.d.ts +1 -1
- package/index.ts +6 -6
- package/package.json +26 -6
- package/src/StreamCall.ts +15 -19
- package/src/StreamChannel.ts +177 -75
- package/src/StreamChatClient.ts +82 -45
- package/src/StreamClient.ts +78 -75
- package/src/StreamVideoClient.ts +8 -8
- package/src/gen/chat/apis/ChannelTypesApi.ts +1 -1
- package/src/gen/chat/apis/ChannelsApi.ts +35 -160
- package/src/gen/chat/apis/CustomCommandsApi.ts +1 -1
- package/src/gen/chat/apis/DefaultApi.ts +1 -1
- package/src/gen/chat/apis/DevicesApi.ts +1 -1
- package/src/gen/chat/apis/EventsApi.ts +1 -74
- package/src/gen/chat/apis/FilesApi.ts +13 -13
- package/src/gen/chat/apis/GDPRApi.ts +1 -1
- package/src/gen/chat/apis/ImportsApi.ts +1 -1
- package/src/gen/chat/apis/MessagesApi.ts +56 -56
- package/src/gen/chat/apis/ModerationApi.ts +1 -1
- package/src/gen/chat/apis/PermissionsV2Api.ts +1 -1
- package/src/gen/chat/apis/PushApi.ts +1 -1
- package/src/gen/chat/apis/ReactionsApi.ts +1 -1
- package/src/gen/chat/apis/ServerSideApi.ts +1 -1
- package/src/gen/chat/apis/SettingsApi.ts +1 -1
- package/src/gen/chat/apis/TasksApi.ts +1 -1
- package/src/gen/chat/apis/TestingApi.ts +1 -1
- package/src/gen/chat/apis/UsersApi.ts +1 -1
- package/src/gen/chat/apis/index.ts +8 -9
- package/src/gen/chat/models/index.ts +141 -160
- package/src/gen/chat/runtime.ts +1 -1
- package/src/gen/video/apis/DefaultApi.ts +1 -303
- package/src/gen/video/apis/ServerSideApi.ts +1 -1
- package/src/gen/video/models/index.ts +0 -269
- package/src/gen/video/runtime.ts +1 -1
- package/src/types.ts +1 -1
- package/src/utils/create-token.ts +1 -1
- package/dist/__tests__/block-lists.test.d.ts +0 -1
- package/dist/__tests__/call-members.test.d.ts +0 -1
- package/dist/__tests__/call-types.test.d.ts +0 -1
- package/dist/__tests__/call.test.d.ts +0 -1
- package/dist/__tests__/channel-types.test.d.ts +0 -1
- package/dist/__tests__/channel.test.d.ts +0 -1
- package/dist/__tests__/command.test.d.ts +0 -1
- package/dist/__tests__/create-test-client.d.ts +0 -3
- package/dist/__tests__/create-token.test.d.ts +0 -1
- package/dist/__tests__/devices-push.test.d.ts +0 -1
- package/dist/__tests__/messages.test.d.ts +0 -1
- package/dist/__tests__/permissions-app-settings.test.d.ts +0 -1
- package/dist/__tests__/user-compat.test.d.ts +0 -1
- package/dist/__tests__/users.test.d.ts +0 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Stream Chat API
|
|
5
5
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document:
|
|
7
|
+
* The version of the OpenAPI document: v92.5.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -18,7 +18,6 @@ import type {
|
|
|
18
18
|
APIError,
|
|
19
19
|
ChannelGetOrCreateRequest,
|
|
20
20
|
ChannelStateResponse,
|
|
21
|
-
ChannelStopWatchingRequest,
|
|
22
21
|
ChannelsResponse,
|
|
23
22
|
DeleteChannelResponse,
|
|
24
23
|
DeleteChannelsRequest,
|
|
@@ -42,13 +41,11 @@ import type {
|
|
|
42
41
|
SearchResponse,
|
|
43
42
|
ShowChannelRequest,
|
|
44
43
|
ShowChannelResponse,
|
|
45
|
-
StopWatchingResponse,
|
|
46
|
-
SyncRequest,
|
|
47
|
-
SyncResponse,
|
|
48
44
|
TruncateChannelRequest,
|
|
49
45
|
TruncateChannelResponse,
|
|
50
46
|
UnmuteChannelRequest,
|
|
51
47
|
UnmuteResponse,
|
|
48
|
+
UnreadCountsResponse,
|
|
52
49
|
UpdateChannelPartialRequest,
|
|
53
50
|
UpdateChannelPartialResponse,
|
|
54
51
|
UpdateChannelRequest,
|
|
@@ -77,8 +74,6 @@ export interface GetOrCreateChannelRequest {
|
|
|
77
74
|
type: string;
|
|
78
75
|
id: string;
|
|
79
76
|
channelGetOrCreateRequest: ChannelGetOrCreateRequest | null;
|
|
80
|
-
clientId?: string;
|
|
81
|
-
connectionId?: string;
|
|
82
77
|
}
|
|
83
78
|
|
|
84
79
|
export interface HideChannelOperationRequest {
|
|
@@ -109,8 +104,6 @@ export interface MuteChannelOperationRequest {
|
|
|
109
104
|
|
|
110
105
|
export interface QueryChannelsOperationRequest {
|
|
111
106
|
queryChannelsRequest: QueryChannelsRequest | null;
|
|
112
|
-
clientId?: string;
|
|
113
|
-
connectionId?: string;
|
|
114
107
|
}
|
|
115
108
|
|
|
116
109
|
export interface QueryMembersOperationRequest {
|
|
@@ -127,22 +120,6 @@ export interface ShowChannelOperationRequest {
|
|
|
127
120
|
showChannelRequest: ShowChannelRequest | null;
|
|
128
121
|
}
|
|
129
122
|
|
|
130
|
-
export interface StopWatchingChannelRequest {
|
|
131
|
-
type: string;
|
|
132
|
-
id: string;
|
|
133
|
-
channelStopWatchingRequest: ChannelStopWatchingRequest | null;
|
|
134
|
-
clientId?: string;
|
|
135
|
-
connectionId?: string;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
export interface SyncOperationRequest {
|
|
139
|
-
syncRequest: SyncRequest | null;
|
|
140
|
-
withInaccessibleCids?: boolean;
|
|
141
|
-
watch?: boolean;
|
|
142
|
-
clientId?: string;
|
|
143
|
-
connectionId?: string;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
123
|
export interface TruncateChannelOperationRequest {
|
|
147
124
|
type: string;
|
|
148
125
|
id: string;
|
|
@@ -379,14 +356,6 @@ export class ChannelsApi extends runtime.BaseAPI {
|
|
|
379
356
|
|
|
380
357
|
const queryParameters: any = {};
|
|
381
358
|
|
|
382
|
-
if (requestParameters.clientId !== undefined) {
|
|
383
|
-
queryParameters['client_id'] = requestParameters.clientId;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
if (requestParameters.connectionId !== undefined) {
|
|
387
|
-
queryParameters['connection_id'] = requestParameters.connectionId;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
359
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
391
360
|
|
|
392
361
|
headerParameters['Content-Type'] = 'application/json';
|
|
@@ -693,14 +662,6 @@ export class ChannelsApi extends runtime.BaseAPI {
|
|
|
693
662
|
|
|
694
663
|
const queryParameters: any = {};
|
|
695
664
|
|
|
696
|
-
if (requestParameters.clientId !== undefined) {
|
|
697
|
-
queryParameters['client_id'] = requestParameters.clientId;
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
if (requestParameters.connectionId !== undefined) {
|
|
701
|
-
queryParameters['connection_id'] = requestParameters.connectionId;
|
|
702
|
-
}
|
|
703
|
-
|
|
704
665
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
705
666
|
|
|
706
667
|
headerParameters['Content-Type'] = 'application/json';
|
|
@@ -881,95 +842,24 @@ export class ChannelsApi extends runtime.BaseAPI {
|
|
|
881
842
|
}
|
|
882
843
|
|
|
883
844
|
/**
|
|
884
|
-
*
|
|
885
|
-
*
|
|
845
|
+
* Truncates channel Sends events: - channel.truncated Required permissions: - DeleteChannel - TruncateChannel
|
|
846
|
+
* Truncate channel
|
|
886
847
|
*/
|
|
887
|
-
async
|
|
848
|
+
async truncateChannelRaw(requestParameters: TruncateChannelOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TruncateChannelResponse>> {
|
|
888
849
|
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
889
|
-
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling
|
|
850
|
+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling truncateChannel.');
|
|
890
851
|
}
|
|
891
852
|
|
|
892
853
|
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
893
|
-
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
if (requestParameters.channelStopWatchingRequest === null || requestParameters.channelStopWatchingRequest === undefined) {
|
|
897
|
-
throw new runtime.RequiredError('channelStopWatchingRequest','Required parameter requestParameters.channelStopWatchingRequest was null or undefined when calling stopWatchingChannel.');
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
const queryParameters: any = {};
|
|
901
|
-
|
|
902
|
-
if (requestParameters.clientId !== undefined) {
|
|
903
|
-
queryParameters['client_id'] = requestParameters.clientId;
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
if (requestParameters.connectionId !== undefined) {
|
|
907
|
-
queryParameters['connection_id'] = requestParameters.connectionId;
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
911
|
-
|
|
912
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
913
|
-
|
|
914
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
915
|
-
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
916
|
-
}
|
|
917
|
-
|
|
918
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
919
|
-
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
920
|
-
}
|
|
921
|
-
|
|
922
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
923
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
854
|
+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling truncateChannel.');
|
|
924
855
|
}
|
|
925
856
|
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
method: 'POST',
|
|
929
|
-
headers: headerParameters,
|
|
930
|
-
query: queryParameters,
|
|
931
|
-
body: requestParameters.channelStopWatchingRequest,
|
|
932
|
-
}, initOverrides);
|
|
933
|
-
|
|
934
|
-
return new runtime.JSONApiResponse(response);
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
/**
|
|
938
|
-
* Call this method to stop receiving channel events Sends events: - user.watching.stop
|
|
939
|
-
* Stop watching channel
|
|
940
|
-
*/
|
|
941
|
-
async stopWatchingChannel(requestParameters: StopWatchingChannelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StopWatchingResponse> {
|
|
942
|
-
const response = await this.stopWatchingChannelRaw(requestParameters, initOverrides);
|
|
943
|
-
return await response.value();
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
/**
|
|
947
|
-
* Returns all events happened since client disconnect in specified channels Required permissions: - ReadChannel
|
|
948
|
-
* Sync
|
|
949
|
-
*/
|
|
950
|
-
async syncRaw(requestParameters: SyncOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SyncResponse>> {
|
|
951
|
-
if (requestParameters.syncRequest === null || requestParameters.syncRequest === undefined) {
|
|
952
|
-
throw new runtime.RequiredError('syncRequest','Required parameter requestParameters.syncRequest was null or undefined when calling sync.');
|
|
857
|
+
if (requestParameters.truncateChannelRequest === null || requestParameters.truncateChannelRequest === undefined) {
|
|
858
|
+
throw new runtime.RequiredError('truncateChannelRequest','Required parameter requestParameters.truncateChannelRequest was null or undefined when calling truncateChannel.');
|
|
953
859
|
}
|
|
954
860
|
|
|
955
861
|
const queryParameters: any = {};
|
|
956
862
|
|
|
957
|
-
if (requestParameters.withInaccessibleCids !== undefined) {
|
|
958
|
-
queryParameters['with_inaccessible_cids'] = requestParameters.withInaccessibleCids;
|
|
959
|
-
}
|
|
960
|
-
|
|
961
|
-
if (requestParameters.watch !== undefined) {
|
|
962
|
-
queryParameters['watch'] = requestParameters.watch;
|
|
963
|
-
}
|
|
964
|
-
|
|
965
|
-
if (requestParameters.clientId !== undefined) {
|
|
966
|
-
queryParameters['client_id'] = requestParameters.clientId;
|
|
967
|
-
}
|
|
968
|
-
|
|
969
|
-
if (requestParameters.connectionId !== undefined) {
|
|
970
|
-
queryParameters['connection_id'] = requestParameters.connectionId;
|
|
971
|
-
}
|
|
972
|
-
|
|
973
863
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
974
864
|
|
|
975
865
|
headerParameters['Content-Type'] = 'application/json';
|
|
@@ -987,40 +877,32 @@ export class ChannelsApi extends runtime.BaseAPI {
|
|
|
987
877
|
}
|
|
988
878
|
|
|
989
879
|
const response = await this.request({
|
|
990
|
-
path: `/
|
|
880
|
+
path: `/channels/{type}/{id}/truncate`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
991
881
|
method: 'POST',
|
|
992
882
|
headers: headerParameters,
|
|
993
883
|
query: queryParameters,
|
|
994
|
-
body: requestParameters.
|
|
884
|
+
body: requestParameters.truncateChannelRequest,
|
|
995
885
|
}, initOverrides);
|
|
996
886
|
|
|
997
887
|
return new runtime.JSONApiResponse(response);
|
|
998
888
|
}
|
|
999
889
|
|
|
1000
890
|
/**
|
|
1001
|
-
*
|
|
1002
|
-
*
|
|
891
|
+
* Truncates channel Sends events: - channel.truncated Required permissions: - DeleteChannel - TruncateChannel
|
|
892
|
+
* Truncate channel
|
|
1003
893
|
*/
|
|
1004
|
-
async
|
|
1005
|
-
const response = await this.
|
|
894
|
+
async truncateChannel(requestParameters: TruncateChannelOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TruncateChannelResponse> {
|
|
895
|
+
const response = await this.truncateChannelRaw(requestParameters, initOverrides);
|
|
1006
896
|
return await response.value();
|
|
1007
897
|
}
|
|
1008
898
|
|
|
1009
899
|
/**
|
|
1010
|
-
*
|
|
1011
|
-
*
|
|
900
|
+
* Unmutes channel for user Sends events: - channel.unmuted Required permissions: - MuteChannel
|
|
901
|
+
* Unmute channel
|
|
1012
902
|
*/
|
|
1013
|
-
async
|
|
1014
|
-
if (requestParameters.
|
|
1015
|
-
throw new runtime.RequiredError('
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
|
-
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
1019
|
-
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling truncateChannel.');
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
if (requestParameters.truncateChannelRequest === null || requestParameters.truncateChannelRequest === undefined) {
|
|
1023
|
-
throw new runtime.RequiredError('truncateChannelRequest','Required parameter requestParameters.truncateChannelRequest was null or undefined when calling truncateChannel.');
|
|
903
|
+
async unmuteChannelRaw(requestParameters: UnmuteChannelOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UnmuteResponse>> {
|
|
904
|
+
if (requestParameters.unmuteChannelRequest === null || requestParameters.unmuteChannelRequest === undefined) {
|
|
905
|
+
throw new runtime.RequiredError('unmuteChannelRequest','Required parameter requestParameters.unmuteChannelRequest was null or undefined when calling unmuteChannel.');
|
|
1024
906
|
}
|
|
1025
907
|
|
|
1026
908
|
const queryParameters: any = {};
|
|
@@ -1042,40 +924,34 @@ export class ChannelsApi extends runtime.BaseAPI {
|
|
|
1042
924
|
}
|
|
1043
925
|
|
|
1044
926
|
const response = await this.request({
|
|
1045
|
-
path: `/
|
|
927
|
+
path: `/moderation/unmute/channel`,
|
|
1046
928
|
method: 'POST',
|
|
1047
929
|
headers: headerParameters,
|
|
1048
930
|
query: queryParameters,
|
|
1049
|
-
body: requestParameters.
|
|
931
|
+
body: requestParameters.unmuteChannelRequest,
|
|
1050
932
|
}, initOverrides);
|
|
1051
933
|
|
|
1052
934
|
return new runtime.JSONApiResponse(response);
|
|
1053
935
|
}
|
|
1054
936
|
|
|
1055
937
|
/**
|
|
1056
|
-
*
|
|
1057
|
-
*
|
|
938
|
+
* Unmutes channel for user Sends events: - channel.unmuted Required permissions: - MuteChannel
|
|
939
|
+
* Unmute channel
|
|
1058
940
|
*/
|
|
1059
|
-
async
|
|
1060
|
-
const response = await this.
|
|
941
|
+
async unmuteChannel(requestParameters: UnmuteChannelOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UnmuteResponse> {
|
|
942
|
+
const response = await this.unmuteChannelRaw(requestParameters, initOverrides);
|
|
1061
943
|
return await response.value();
|
|
1062
944
|
}
|
|
1063
945
|
|
|
1064
946
|
/**
|
|
1065
|
-
*
|
|
1066
|
-
*
|
|
947
|
+
* UnreadCount counts
|
|
948
|
+
* UnreadCount counts
|
|
1067
949
|
*/
|
|
1068
|
-
async
|
|
1069
|
-
if (requestParameters.unmuteChannelRequest === null || requestParameters.unmuteChannelRequest === undefined) {
|
|
1070
|
-
throw new runtime.RequiredError('unmuteChannelRequest','Required parameter requestParameters.unmuteChannelRequest was null or undefined when calling unmuteChannel.');
|
|
1071
|
-
}
|
|
1072
|
-
|
|
950
|
+
async unreadCountsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UnreadCountsResponse>> {
|
|
1073
951
|
const queryParameters: any = {};
|
|
1074
952
|
|
|
1075
953
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
1076
954
|
|
|
1077
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
1078
|
-
|
|
1079
955
|
if (this.configuration && this.configuration.apiKey) {
|
|
1080
956
|
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
1081
957
|
}
|
|
@@ -1089,22 +965,21 @@ export class ChannelsApi extends runtime.BaseAPI {
|
|
|
1089
965
|
}
|
|
1090
966
|
|
|
1091
967
|
const response = await this.request({
|
|
1092
|
-
path: `/
|
|
1093
|
-
method: '
|
|
968
|
+
path: `/unread`,
|
|
969
|
+
method: 'GET',
|
|
1094
970
|
headers: headerParameters,
|
|
1095
971
|
query: queryParameters,
|
|
1096
|
-
body: requestParameters.unmuteChannelRequest,
|
|
1097
972
|
}, initOverrides);
|
|
1098
973
|
|
|
1099
974
|
return new runtime.JSONApiResponse(response);
|
|
1100
975
|
}
|
|
1101
976
|
|
|
1102
977
|
/**
|
|
1103
|
-
*
|
|
1104
|
-
*
|
|
978
|
+
* UnreadCount counts
|
|
979
|
+
* UnreadCount counts
|
|
1105
980
|
*/
|
|
1106
|
-
async
|
|
1107
|
-
const response = await this.
|
|
981
|
+
async unreadCounts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UnreadCountsResponse> {
|
|
982
|
+
const response = await this.unreadCountsRaw(initOverrides);
|
|
1108
983
|
return await response.value();
|
|
1109
984
|
}
|
|
1110
985
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Stream Chat API
|
|
5
5
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document:
|
|
7
|
+
* The version of the OpenAPI document: v92.5.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Stream Chat API
|
|
5
5
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document:
|
|
7
|
+
* The version of the OpenAPI document: v92.5.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Stream Chat API
|
|
5
5
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document:
|
|
7
|
+
* The version of the OpenAPI document: v92.5.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Stream Chat API
|
|
5
5
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document:
|
|
7
|
+
* The version of the OpenAPI document: v92.5.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -20,8 +20,6 @@ import type {
|
|
|
20
20
|
Response,
|
|
21
21
|
SendEventRequest,
|
|
22
22
|
SendUserCustomEventRequest,
|
|
23
|
-
SyncRequest,
|
|
24
|
-
SyncResponse,
|
|
25
23
|
} from '../models';
|
|
26
24
|
|
|
27
25
|
export interface SendEventOperationRequest {
|
|
@@ -35,14 +33,6 @@ export interface SendUserCustomEventOperationRequest {
|
|
|
35
33
|
sendUserCustomEventRequest: SendUserCustomEventRequest | null;
|
|
36
34
|
}
|
|
37
35
|
|
|
38
|
-
export interface SyncOperationRequest {
|
|
39
|
-
syncRequest: SyncRequest | null;
|
|
40
|
-
withInaccessibleCids?: boolean;
|
|
41
|
-
watch?: boolean;
|
|
42
|
-
clientId?: string;
|
|
43
|
-
connectionId?: string;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
36
|
/**
|
|
47
37
|
*
|
|
48
38
|
*/
|
|
@@ -154,67 +144,4 @@ export class EventsApi extends runtime.BaseAPI {
|
|
|
154
144
|
return await response.value();
|
|
155
145
|
}
|
|
156
146
|
|
|
157
|
-
/**
|
|
158
|
-
* Returns all events happened since client disconnect in specified channels Required permissions: - ReadChannel
|
|
159
|
-
* Sync
|
|
160
|
-
*/
|
|
161
|
-
async syncRaw(requestParameters: SyncOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SyncResponse>> {
|
|
162
|
-
if (requestParameters.syncRequest === null || requestParameters.syncRequest === undefined) {
|
|
163
|
-
throw new runtime.RequiredError('syncRequest','Required parameter requestParameters.syncRequest was null or undefined when calling sync.');
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
const queryParameters: any = {};
|
|
167
|
-
|
|
168
|
-
if (requestParameters.withInaccessibleCids !== undefined) {
|
|
169
|
-
queryParameters['with_inaccessible_cids'] = requestParameters.withInaccessibleCids;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
if (requestParameters.watch !== undefined) {
|
|
173
|
-
queryParameters['watch'] = requestParameters.watch;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
if (requestParameters.clientId !== undefined) {
|
|
177
|
-
queryParameters['client_id'] = requestParameters.clientId;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
if (requestParameters.connectionId !== undefined) {
|
|
181
|
-
queryParameters['connection_id'] = requestParameters.connectionId;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
185
|
-
|
|
186
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
187
|
-
|
|
188
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
189
|
-
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
193
|
-
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
197
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
const response = await this.request({
|
|
201
|
-
path: `/sync`,
|
|
202
|
-
method: 'POST',
|
|
203
|
-
headers: headerParameters,
|
|
204
|
-
query: queryParameters,
|
|
205
|
-
body: requestParameters.syncRequest,
|
|
206
|
-
}, initOverrides);
|
|
207
|
-
|
|
208
|
-
return new runtime.JSONApiResponse(response);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* Returns all events happened since client disconnect in specified channels Required permissions: - ReadChannel
|
|
213
|
-
* Sync
|
|
214
|
-
*/
|
|
215
|
-
async sync(requestParameters: SyncOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SyncResponse> {
|
|
216
|
-
const response = await this.syncRaw(requestParameters, initOverrides);
|
|
217
|
-
return await response.value();
|
|
218
|
-
}
|
|
219
|
-
|
|
220
147
|
}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Stream Chat API
|
|
5
5
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document:
|
|
8
|
-
*
|
|
7
|
+
* The version of the OpenAPI document: v92.5.0
|
|
8
|
+
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
11
|
* https://openapi-generator.tech
|
|
@@ -18,10 +18,10 @@ import type {
|
|
|
18
18
|
APIError,
|
|
19
19
|
FileDeleteResponse,
|
|
20
20
|
FileUploadResponse,
|
|
21
|
-
|
|
21
|
+
//@ts-expect-error
|
|
22
22
|
ImageSizeRequest,
|
|
23
23
|
ImageUploadResponse,
|
|
24
|
-
|
|
24
|
+
//@ts-expect-error
|
|
25
25
|
OnlyUserIDRequest,
|
|
26
26
|
} from '../models';
|
|
27
27
|
|
|
@@ -53,12 +53,12 @@ export interface UploadImageRequest {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
*
|
|
57
57
|
*/
|
|
58
58
|
export class FilesApi extends runtime.BaseAPI {
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
|
-
* Deletes previously uploaded file Required permissions: - DeleteAttachment
|
|
61
|
+
* Deletes previously uploaded file Required permissions: - DeleteAttachment
|
|
62
62
|
* Delete file
|
|
63
63
|
*/
|
|
64
64
|
async deleteFileRaw(requestParameters: DeleteFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileDeleteResponse>> {
|
|
@@ -101,7 +101,7 @@ export class FilesApi extends runtime.BaseAPI {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
|
-
* Deletes previously uploaded file Required permissions: - DeleteAttachment
|
|
104
|
+
* Deletes previously uploaded file Required permissions: - DeleteAttachment
|
|
105
105
|
* Delete file
|
|
106
106
|
*/
|
|
107
107
|
async deleteFile(requestParameters: DeleteFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileDeleteResponse> {
|
|
@@ -110,7 +110,7 @@ export class FilesApi extends runtime.BaseAPI {
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
/**
|
|
113
|
-
* Deletes previously uploaded image Required permissions: - DeleteAttachment
|
|
113
|
+
* Deletes previously uploaded image Required permissions: - DeleteAttachment
|
|
114
114
|
* Delete image
|
|
115
115
|
*/
|
|
116
116
|
async deleteImageRaw(requestParameters: DeleteImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileDeleteResponse>> {
|
|
@@ -153,7 +153,7 @@ export class FilesApi extends runtime.BaseAPI {
|
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
/**
|
|
156
|
-
* Deletes previously uploaded image Required permissions: - DeleteAttachment
|
|
156
|
+
* Deletes previously uploaded image Required permissions: - DeleteAttachment
|
|
157
157
|
* Delete image
|
|
158
158
|
*/
|
|
159
159
|
async deleteImage(requestParameters: DeleteImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileDeleteResponse> {
|
|
@@ -162,7 +162,7 @@ export class FilesApi extends runtime.BaseAPI {
|
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
/**
|
|
165
|
-
* Uploads file Required permissions: - UploadAttachment
|
|
165
|
+
* Uploads file Required permissions: - UploadAttachment
|
|
166
166
|
* Upload file
|
|
167
167
|
*/
|
|
168
168
|
async uploadFileRaw(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileUploadResponse>> {
|
|
@@ -225,7 +225,7 @@ export class FilesApi extends runtime.BaseAPI {
|
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
/**
|
|
228
|
-
* Uploads file Required permissions: - UploadAttachment
|
|
228
|
+
* Uploads file Required permissions: - UploadAttachment
|
|
229
229
|
* Upload file
|
|
230
230
|
*/
|
|
231
231
|
async uploadFile(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileUploadResponse> {
|
|
@@ -234,7 +234,7 @@ export class FilesApi extends runtime.BaseAPI {
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
/**
|
|
237
|
-
* Uploads image Required permissions: - UploadAttachment
|
|
237
|
+
* Uploads image Required permissions: - UploadAttachment
|
|
238
238
|
* Upload image
|
|
239
239
|
*/
|
|
240
240
|
async uploadImageRaw(requestParameters: UploadImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ImageUploadResponse>> {
|
|
@@ -301,7 +301,7 @@ export class FilesApi extends runtime.BaseAPI {
|
|
|
301
301
|
}
|
|
302
302
|
|
|
303
303
|
/**
|
|
304
|
-
* Uploads image Required permissions: - UploadAttachment
|
|
304
|
+
* Uploads image Required permissions: - UploadAttachment
|
|
305
305
|
* Upload image
|
|
306
306
|
*/
|
|
307
307
|
async uploadImage(requestParameters: UploadImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ImageUploadResponse> {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Stream Chat API
|
|
5
5
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document:
|
|
7
|
+
* The version of the OpenAPI document: v92.5.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Stream Chat API
|
|
5
5
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document:
|
|
7
|
+
* The version of the OpenAPI document: v92.5.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|