@stream-io/node-sdk 0.2.6 → 0.3.1
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 +1 -1
- package/dist/index.cjs.js +2461 -2124
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +2450 -2109
- package/dist/index.es.js.map +1 -1
- package/dist/src/StreamCall.d.ts +1 -1
- package/dist/src/StreamChannel.d.ts +7 -9
- package/dist/src/StreamChatClient.d.ts +2 -5
- package/dist/src/StreamClient.d.ts +15 -26
- package/dist/src/gen/chat/apis/ProductchatApi.d.ts +1750 -0
- package/dist/src/gen/chat/apis/index.d.ts +1 -27
- package/dist/src/gen/chat/models/index.d.ts +5101 -5891
- package/dist/src/gen/chat/runtime.d.ts +2 -2
- package/dist/src/gen/video/apis/ProductvideoApi.d.ts +1 -1
- package/dist/src/gen/video/models/index.d.ts +189 -35
- package/dist/src/gen/video/runtime.d.ts +1 -1
- package/package.json +8 -1
- package/src/StreamCall.ts +7 -7
- package/src/StreamChannel.ts +44 -49
- package/src/StreamChatClient.ts +23 -35
- package/src/StreamClient.ts +71 -232
- package/src/gen/chat/.openapi-generator/FILES +1 -19
- package/src/gen/chat/apis/ProductchatApi.ts +7007 -0
- package/src/gen/chat/apis/index.ts +1 -27
- package/src/gen/chat/models/index.ts +5758 -6564
- package/src/gen/chat/runtime.ts +3 -3
- package/src/gen/video/apis/ProductvideoApi.ts +1 -1
- package/src/gen/video/models/index.ts +184 -36
- package/src/gen/video/runtime.ts +1 -1
- package/dist/src/gen/chat/apis/ChannelTypesApi.d.ts +0 -81
- package/dist/src/gen/chat/apis/ChannelsApi.d.ts +0 -280
- package/dist/src/gen/chat/apis/CustomCommandsApi.d.ts +0 -81
- package/dist/src/gen/chat/apis/DefaultApi.d.ts +0 -60
- package/dist/src/gen/chat/apis/DevicesApi.d.ts +0 -58
- package/dist/src/gen/chat/apis/EventsApi.d.ts +0 -47
- package/dist/src/gen/chat/apis/FilesApi.d.ts +0 -85
- package/dist/src/gen/chat/apis/GDPRApi.d.ts +0 -114
- package/dist/src/gen/chat/apis/ImportsApi.d.ts +0 -67
- package/dist/src/gen/chat/apis/MessagesApi.d.ts +0 -374
- package/dist/src/gen/chat/apis/ModerationApi.d.ts +0 -271
- package/dist/src/gen/chat/apis/PermissionsV2Api.d.ts +0 -77
- package/dist/src/gen/chat/apis/PushApi.d.ts +0 -65
- package/dist/src/gen/chat/apis/ReactionsApi.d.ts +0 -62
- package/dist/src/gen/chat/apis/ServerSideApi.d.ts +0 -31
- package/dist/src/gen/chat/apis/SettingsApi.d.ts +0 -257
- package/dist/src/gen/chat/apis/TasksApi.d.ts +0 -31
- package/dist/src/gen/chat/apis/TestingApi.d.ts +0 -57
- package/dist/src/gen/chat/apis/UsersApi.d.ts +0 -313
- package/src/gen/chat/apis/ChannelTypesApi.ts +0 -275
- package/src/gen/chat/apis/ChannelsApi.ts +0 -1096
- package/src/gen/chat/apis/CustomCommandsApi.ts +0 -276
- package/src/gen/chat/apis/DefaultApi.ts +0 -196
- package/src/gen/chat/apis/DevicesApi.ts +0 -180
- package/src/gen/chat/apis/EventsApi.ts +0 -147
- package/src/gen/chat/apis/FilesApi.ts +0 -312
- package/src/gen/chat/apis/GDPRApi.ts +0 -418
- package/src/gen/chat/apis/ImportsApi.ts +0 -222
- package/src/gen/chat/apis/MessagesApi.ts +0 -1475
- package/src/gen/chat/apis/ModerationApi.ts +0 -1038
- package/src/gen/chat/apis/PermissionsV2Api.ts +0 -259
- package/src/gen/chat/apis/PushApi.ts +0 -183
- package/src/gen/chat/apis/ReactionsApi.ts +0 -202
- package/src/gen/chat/apis/ServerSideApi.ts +0 -79
- package/src/gen/chat/apis/SettingsApi.ts +0 -948
- package/src/gen/chat/apis/TasksApi.ts +0 -75
- package/src/gen/chat/apis/TestingApi.ts +0 -185
- package/src/gen/chat/apis/UsersApi.ts +0 -1203
|
@@ -1,259 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Stream Chat API
|
|
5
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: v92.7.0
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import * as runtime from '../runtime';
|
|
17
|
-
import type {
|
|
18
|
-
APIError,
|
|
19
|
-
CreateRoleRequest,
|
|
20
|
-
CreateRoleResponse,
|
|
21
|
-
GetCustomPermissionResponse,
|
|
22
|
-
ListPermissionsResponse,
|
|
23
|
-
ListRolesResponse,
|
|
24
|
-
Response,
|
|
25
|
-
} from '../models';
|
|
26
|
-
|
|
27
|
-
export interface CreateRoleOperationRequest {
|
|
28
|
-
createRoleRequest: CreateRoleRequest | null;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface DeleteRoleRequest {
|
|
32
|
-
name: string;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface GetPermissionRequest {
|
|
36
|
-
id: string;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
*
|
|
41
|
-
*/
|
|
42
|
-
export class PermissionsV2Api extends runtime.BaseAPI {
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Creates custom role
|
|
46
|
-
* Create role
|
|
47
|
-
*/
|
|
48
|
-
async createRoleRaw(requestParameters: CreateRoleOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateRoleResponse>> {
|
|
49
|
-
if (requestParameters.createRoleRequest === null || requestParameters.createRoleRequest === undefined) {
|
|
50
|
-
throw new runtime.RequiredError('createRoleRequest','Required parameter requestParameters.createRoleRequest was null or undefined when calling createRole.');
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const queryParameters: any = {};
|
|
54
|
-
|
|
55
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
56
|
-
|
|
57
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
58
|
-
|
|
59
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
60
|
-
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
64
|
-
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
68
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
const response = await this.request({
|
|
72
|
-
path: `/roles`,
|
|
73
|
-
method: 'POST',
|
|
74
|
-
headers: headerParameters,
|
|
75
|
-
query: queryParameters,
|
|
76
|
-
body: requestParameters.createRoleRequest,
|
|
77
|
-
}, initOverrides);
|
|
78
|
-
|
|
79
|
-
return new runtime.JSONApiResponse(response);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Creates custom role
|
|
84
|
-
* Create role
|
|
85
|
-
*/
|
|
86
|
-
async createRole(requestParameters: CreateRoleOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateRoleResponse> {
|
|
87
|
-
const response = await this.createRoleRaw(requestParameters, initOverrides);
|
|
88
|
-
return await response.value();
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Deletes custom role
|
|
93
|
-
* Delete role
|
|
94
|
-
*/
|
|
95
|
-
async deleteRoleRaw(requestParameters: DeleteRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Response>> {
|
|
96
|
-
if (requestParameters.name === null || requestParameters.name === undefined) {
|
|
97
|
-
throw new runtime.RequiredError('name','Required parameter requestParameters.name was null or undefined when calling deleteRole.');
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
const queryParameters: any = {};
|
|
101
|
-
|
|
102
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
103
|
-
|
|
104
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
105
|
-
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
109
|
-
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
113
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
const response = await this.request({
|
|
117
|
-
path: `/roles/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
|
|
118
|
-
method: 'DELETE',
|
|
119
|
-
headers: headerParameters,
|
|
120
|
-
query: queryParameters,
|
|
121
|
-
}, initOverrides);
|
|
122
|
-
|
|
123
|
-
return new runtime.JSONApiResponse(response);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Deletes custom role
|
|
128
|
-
* Delete role
|
|
129
|
-
*/
|
|
130
|
-
async deleteRole(requestParameters: DeleteRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Response> {
|
|
131
|
-
const response = await this.deleteRoleRaw(requestParameters, initOverrides);
|
|
132
|
-
return await response.value();
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Gets custom permission
|
|
137
|
-
* Get permission
|
|
138
|
-
*/
|
|
139
|
-
async getPermissionRaw(requestParameters: GetPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCustomPermissionResponse>> {
|
|
140
|
-
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
141
|
-
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getPermission.');
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
const queryParameters: any = {};
|
|
145
|
-
|
|
146
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
147
|
-
|
|
148
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
149
|
-
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
153
|
-
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
157
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
const response = await this.request({
|
|
161
|
-
path: `/permissions/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
162
|
-
method: 'GET',
|
|
163
|
-
headers: headerParameters,
|
|
164
|
-
query: queryParameters,
|
|
165
|
-
}, initOverrides);
|
|
166
|
-
|
|
167
|
-
return new runtime.JSONApiResponse(response);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* Gets custom permission
|
|
172
|
-
* Get permission
|
|
173
|
-
*/
|
|
174
|
-
async getPermission(requestParameters: GetPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCustomPermissionResponse> {
|
|
175
|
-
const response = await this.getPermissionRaw(requestParameters, initOverrides);
|
|
176
|
-
return await response.value();
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Lists all available permissions
|
|
181
|
-
* List permissions
|
|
182
|
-
*/
|
|
183
|
-
async listPermissionsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListPermissionsResponse>> {
|
|
184
|
-
const queryParameters: any = {};
|
|
185
|
-
|
|
186
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
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: `/permissions`,
|
|
202
|
-
method: 'GET',
|
|
203
|
-
headers: headerParameters,
|
|
204
|
-
query: queryParameters,
|
|
205
|
-
}, initOverrides);
|
|
206
|
-
|
|
207
|
-
return new runtime.JSONApiResponse(response);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Lists all available permissions
|
|
212
|
-
* List permissions
|
|
213
|
-
*/
|
|
214
|
-
async listPermissions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListPermissionsResponse> {
|
|
215
|
-
const response = await this.listPermissionsRaw(initOverrides);
|
|
216
|
-
return await response.value();
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* Lists all available roles
|
|
221
|
-
* List roles
|
|
222
|
-
*/
|
|
223
|
-
async listRolesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListRolesResponse>> {
|
|
224
|
-
const queryParameters: any = {};
|
|
225
|
-
|
|
226
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
227
|
-
|
|
228
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
229
|
-
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
233
|
-
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
237
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
const response = await this.request({
|
|
241
|
-
path: `/roles`,
|
|
242
|
-
method: 'GET',
|
|
243
|
-
headers: headerParameters,
|
|
244
|
-
query: queryParameters,
|
|
245
|
-
}, initOverrides);
|
|
246
|
-
|
|
247
|
-
return new runtime.JSONApiResponse(response);
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* Lists all available roles
|
|
252
|
-
* List roles
|
|
253
|
-
*/
|
|
254
|
-
async listRoles(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListRolesResponse> {
|
|
255
|
-
const response = await this.listRolesRaw(initOverrides);
|
|
256
|
-
return await response.value();
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
}
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Stream Chat API
|
|
5
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: v92.7.0
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import * as runtime from '../runtime';
|
|
17
|
-
import type {
|
|
18
|
-
APIError,
|
|
19
|
-
CreateDeviceRequest,
|
|
20
|
-
ListPushProvidersResponse,
|
|
21
|
-
Response,
|
|
22
|
-
} from '../models';
|
|
23
|
-
|
|
24
|
-
export interface CreateDeviceOperationRequest {
|
|
25
|
-
createDeviceRequest: CreateDeviceRequest | null;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface DeletePushProviderRequest {
|
|
29
|
-
type: DeletePushProviderTypeEnum;
|
|
30
|
-
name: string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
*
|
|
35
|
-
*/
|
|
36
|
-
export class PushApi extends runtime.BaseAPI {
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Adds a new device to a user, if the same device already exists the call will have no effect
|
|
40
|
-
* Create device
|
|
41
|
-
*/
|
|
42
|
-
async createDeviceRaw(requestParameters: CreateDeviceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
43
|
-
if (requestParameters.createDeviceRequest === null || requestParameters.createDeviceRequest === undefined) {
|
|
44
|
-
throw new runtime.RequiredError('createDeviceRequest','Required parameter requestParameters.createDeviceRequest was null or undefined when calling createDevice.');
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
const queryParameters: any = {};
|
|
48
|
-
|
|
49
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
50
|
-
|
|
51
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
52
|
-
|
|
53
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
54
|
-
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
58
|
-
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
62
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const response = await this.request({
|
|
66
|
-
path: `/devices`,
|
|
67
|
-
method: 'POST',
|
|
68
|
-
headers: headerParameters,
|
|
69
|
-
query: queryParameters,
|
|
70
|
-
body: requestParameters.createDeviceRequest,
|
|
71
|
-
}, initOverrides);
|
|
72
|
-
|
|
73
|
-
return new runtime.VoidApiResponse(response);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Adds a new device to a user, if the same device already exists the call will have no effect
|
|
78
|
-
* Create device
|
|
79
|
-
*/
|
|
80
|
-
async createDevice(requestParameters: CreateDeviceOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
81
|
-
await this.createDeviceRaw(requestParameters, initOverrides);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Delete a push provider from v2 with multi bundle/package support. v1 isn\'t supported in this endpoint
|
|
86
|
-
* Delete a push provider
|
|
87
|
-
*/
|
|
88
|
-
async deletePushProviderRaw(requestParameters: DeletePushProviderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Response>> {
|
|
89
|
-
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
90
|
-
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling deletePushProvider.');
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
if (requestParameters.name === null || requestParameters.name === undefined) {
|
|
94
|
-
throw new runtime.RequiredError('name','Required parameter requestParameters.name was null or undefined when calling deletePushProvider.');
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
const queryParameters: any = {};
|
|
98
|
-
|
|
99
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
100
|
-
|
|
101
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
102
|
-
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
106
|
-
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
110
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
const response = await this.request({
|
|
114
|
-
path: `/push_providers/{type}/{name}`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
|
|
115
|
-
method: 'DELETE',
|
|
116
|
-
headers: headerParameters,
|
|
117
|
-
query: queryParameters,
|
|
118
|
-
}, initOverrides);
|
|
119
|
-
|
|
120
|
-
return new runtime.JSONApiResponse(response);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Delete a push provider from v2 with multi bundle/package support. v1 isn\'t supported in this endpoint
|
|
125
|
-
* Delete a push provider
|
|
126
|
-
*/
|
|
127
|
-
async deletePushProvider(requestParameters: DeletePushProviderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Response> {
|
|
128
|
-
const response = await this.deletePushProviderRaw(requestParameters, initOverrides);
|
|
129
|
-
return await response.value();
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* List details of all push providers.
|
|
134
|
-
* List push providers
|
|
135
|
-
*/
|
|
136
|
-
async listPushProvidersRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListPushProvidersResponse>> {
|
|
137
|
-
const queryParameters: any = {};
|
|
138
|
-
|
|
139
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
140
|
-
|
|
141
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
142
|
-
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
146
|
-
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
150
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
const response = await this.request({
|
|
154
|
-
path: `/push_providers`,
|
|
155
|
-
method: 'GET',
|
|
156
|
-
headers: headerParameters,
|
|
157
|
-
query: queryParameters,
|
|
158
|
-
}, initOverrides);
|
|
159
|
-
|
|
160
|
-
return new runtime.JSONApiResponse(response);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* List details of all push providers.
|
|
165
|
-
* List push providers
|
|
166
|
-
*/
|
|
167
|
-
async listPushProviders(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListPushProvidersResponse> {
|
|
168
|
-
const response = await this.listPushProvidersRaw(initOverrides);
|
|
169
|
-
return await response.value();
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* @export
|
|
176
|
-
*/
|
|
177
|
-
export const DeletePushProviderTypeEnum = {
|
|
178
|
-
APN: 'apn',
|
|
179
|
-
FIREBASE: 'firebase',
|
|
180
|
-
HUAWEI: 'huawei',
|
|
181
|
-
XIAOMI: 'xiaomi'
|
|
182
|
-
} as const;
|
|
183
|
-
export type DeletePushProviderTypeEnum = typeof DeletePushProviderTypeEnum[keyof typeof DeletePushProviderTypeEnum];
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Stream Chat API
|
|
5
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: v92.7.0
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import * as runtime from '../runtime';
|
|
17
|
-
import type {
|
|
18
|
-
APIError,
|
|
19
|
-
GetReactionsResponse,
|
|
20
|
-
ReactionRemovalResponse,
|
|
21
|
-
ReactionResponse,
|
|
22
|
-
SendReactionRequest,
|
|
23
|
-
} from '../models';
|
|
24
|
-
|
|
25
|
-
export interface DeleteReactionRequest {
|
|
26
|
-
id: string;
|
|
27
|
-
type: string;
|
|
28
|
-
userId?: string;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface GetReactionsRequest {
|
|
32
|
-
id: string;
|
|
33
|
-
limit?: number;
|
|
34
|
-
offset?: number;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface SendReactionOperationRequest {
|
|
38
|
-
id: string;
|
|
39
|
-
sendReactionRequest: SendReactionRequest | null;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
*
|
|
44
|
-
*/
|
|
45
|
-
export class ReactionsApi extends runtime.BaseAPI {
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Removes user reaction from the message Sends events: - reaction.deleted Required permissions: - DeleteReaction
|
|
49
|
-
* Delete reaction
|
|
50
|
-
*/
|
|
51
|
-
async deleteReactionRaw(requestParameters: DeleteReactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ReactionRemovalResponse>> {
|
|
52
|
-
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
53
|
-
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling deleteReaction.');
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
if (requestParameters.type === null || requestParameters.type === undefined) {
|
|
57
|
-
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling deleteReaction.');
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
const queryParameters: any = {};
|
|
61
|
-
|
|
62
|
-
if (requestParameters.userId !== undefined) {
|
|
63
|
-
queryParameters['user_id'] = requestParameters.userId;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
67
|
-
|
|
68
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
69
|
-
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
73
|
-
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
77
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
const response = await this.request({
|
|
81
|
-
path: `/messages/{id}/reaction/{type}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))).replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))),
|
|
82
|
-
method: 'DELETE',
|
|
83
|
-
headers: headerParameters,
|
|
84
|
-
query: queryParameters,
|
|
85
|
-
}, initOverrides);
|
|
86
|
-
|
|
87
|
-
return new runtime.JSONApiResponse(response);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Removes user reaction from the message Sends events: - reaction.deleted Required permissions: - DeleteReaction
|
|
92
|
-
* Delete reaction
|
|
93
|
-
*/
|
|
94
|
-
async deleteReaction(requestParameters: DeleteReactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ReactionRemovalResponse> {
|
|
95
|
-
const response = await this.deleteReactionRaw(requestParameters, initOverrides);
|
|
96
|
-
return await response.value();
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Returns list of reactions of specific message Required permissions: - ReadChannel
|
|
101
|
-
* Get reactions
|
|
102
|
-
*/
|
|
103
|
-
async getReactionsRaw(requestParameters: GetReactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetReactionsResponse>> {
|
|
104
|
-
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
105
|
-
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling getReactions.');
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
const queryParameters: any = {};
|
|
109
|
-
|
|
110
|
-
if (requestParameters.limit !== undefined) {
|
|
111
|
-
queryParameters['limit'] = requestParameters.limit;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
if (requestParameters.offset !== undefined) {
|
|
115
|
-
queryParameters['offset'] = requestParameters.offset;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
119
|
-
|
|
120
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
121
|
-
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
125
|
-
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
129
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
const response = await this.request({
|
|
133
|
-
path: `/messages/{id}/reactions`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
134
|
-
method: 'GET',
|
|
135
|
-
headers: headerParameters,
|
|
136
|
-
query: queryParameters,
|
|
137
|
-
}, initOverrides);
|
|
138
|
-
|
|
139
|
-
return new runtime.JSONApiResponse(response);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Returns list of reactions of specific message Required permissions: - ReadChannel
|
|
144
|
-
* Get reactions
|
|
145
|
-
*/
|
|
146
|
-
async getReactions(requestParameters: GetReactionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetReactionsResponse> {
|
|
147
|
-
const response = await this.getReactionsRaw(requestParameters, initOverrides);
|
|
148
|
-
return await response.value();
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Sends reaction to specified message Sends events: - reaction.new - reaction.updated Required permissions: - CreateReaction - UseFrozenChannel
|
|
153
|
-
* Send reaction
|
|
154
|
-
*/
|
|
155
|
-
async sendReactionRaw(requestParameters: SendReactionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ReactionResponse>> {
|
|
156
|
-
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
157
|
-
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling sendReaction.');
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
if (requestParameters.sendReactionRequest === null || requestParameters.sendReactionRequest === undefined) {
|
|
161
|
-
throw new runtime.RequiredError('sendReactionRequest','Required parameter requestParameters.sendReactionRequest was null or undefined when calling sendReaction.');
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
const queryParameters: any = {};
|
|
165
|
-
|
|
166
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
167
|
-
|
|
168
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
169
|
-
|
|
170
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
171
|
-
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
175
|
-
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
179
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
const response = await this.request({
|
|
183
|
-
path: `/messages/{id}/reaction`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
184
|
-
method: 'POST',
|
|
185
|
-
headers: headerParameters,
|
|
186
|
-
query: queryParameters,
|
|
187
|
-
body: requestParameters.sendReactionRequest,
|
|
188
|
-
}, initOverrides);
|
|
189
|
-
|
|
190
|
-
return new runtime.JSONApiResponse(response);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* Sends reaction to specified message Sends events: - reaction.new - reaction.updated Required permissions: - CreateReaction - UseFrozenChannel
|
|
195
|
-
* Send reaction
|
|
196
|
-
*/
|
|
197
|
-
async sendReaction(requestParameters: SendReactionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ReactionResponse> {
|
|
198
|
-
const response = await this.sendReactionRaw(requestParameters, initOverrides);
|
|
199
|
-
return await response.value();
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
}
|