@stream-io/node-sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.readme-assets/Github-Graphic-JS.jpg +0 -0
- package/LICENSE +219 -0
- package/README.md +29 -0
- package/dist/__tests__/block-lists.test.d.ts +1 -0
- package/dist/__tests__/call-members.test.d.ts +1 -0
- package/dist/__tests__/call-types.test.d.ts +1 -0
- package/dist/__tests__/call.test.d.ts +1 -0
- package/dist/__tests__/channel-types.test.d.ts +1 -0
- package/dist/__tests__/channel.test.d.ts +1 -0
- package/dist/__tests__/command.test.d.ts +1 -0
- package/dist/__tests__/create-token.test.d.ts +1 -0
- package/dist/__tests__/devices-push.test.d.ts +1 -0
- package/dist/__tests__/messages.test.d.ts +1 -0
- package/dist/__tests__/permissions-app-settings.test.d.ts +1 -0
- package/dist/__tests__/user-compat.test.d.ts +1 -0
- package/dist/__tests__/users.test.d.ts +1 -0
- package/dist/index.cjs.js +8789 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.es.js +8708 -0
- package/dist/index.es.js.map +1 -0
- package/dist/src/StreamCall.d.ts +37 -0
- package/dist/src/StreamChannel.d.ts +39 -0
- package/dist/src/StreamChatClient.d.ts +31 -0
- package/dist/src/StreamClient.d.ts +68 -0
- package/dist/src/StreamVideoClient.d.ts +16 -0
- package/dist/src/gen/chat/apis/ChannelTypesApi.d.ts +81 -0
- package/dist/src/gen/chat/apis/ChannelsApi.d.ts +308 -0
- package/dist/src/gen/chat/apis/CustomCommandsApi.d.ts +81 -0
- package/dist/src/gen/chat/apis/DefaultApi.d.ts +60 -0
- package/dist/src/gen/chat/apis/DevicesApi.d.ts +58 -0
- package/dist/src/gen/chat/apis/EventsApi.d.ts +64 -0
- package/dist/src/gen/chat/apis/FilesApi.d.ts +81 -0
- package/dist/src/gen/chat/apis/GDPRApi.d.ts +114 -0
- package/dist/src/gen/chat/apis/ImportsApi.d.ts +67 -0
- package/dist/src/gen/chat/apis/MessagesApi.d.ts +370 -0
- package/dist/src/gen/chat/apis/ModerationApi.d.ts +271 -0
- package/dist/src/gen/chat/apis/PermissionsV2Api.d.ts +77 -0
- package/dist/src/gen/chat/apis/PushApi.d.ts +65 -0
- package/dist/src/gen/chat/apis/ReactionsApi.d.ts +62 -0
- package/dist/src/gen/chat/apis/ServerSideApi.d.ts +31 -0
- package/dist/src/gen/chat/apis/SettingsApi.d.ts +257 -0
- package/dist/src/gen/chat/apis/TasksApi.d.ts +31 -0
- package/dist/src/gen/chat/apis/TestingApi.d.ts +57 -0
- package/dist/src/gen/chat/apis/UsersApi.d.ts +313 -0
- package/dist/src/gen/chat/apis/index.d.ts +19 -0
- package/dist/src/gen/chat/index.d.ts +3 -0
- package/dist/src/gen/chat/models/index.d.ts +15624 -0
- package/dist/src/gen/chat/runtime.d.ts +180 -0
- package/dist/src/gen/video/apis/DefaultApi.d.ts +505 -0
- package/dist/src/gen/video/apis/ServerSideApi.d.ts +81 -0
- package/dist/src/gen/video/apis/index.d.ts +2 -0
- package/dist/src/gen/video/index.d.ts +3 -0
- package/dist/src/gen/video/models/index.d.ts +4733 -0
- package/dist/src/gen/video/runtime.d.ts +180 -0
- package/dist/src/types.d.ts +1 -0
- package/dist/src/utils/create-token.d.ts +3 -0
- package/index.ts +7 -0
- package/package.json +47 -0
- package/src/StreamCall.ts +161 -0
- package/src/StreamChannel.ts +165 -0
- package/src/StreamChatClient.ts +102 -0
- package/src/StreamClient.ts +440 -0
- package/src/StreamVideoClient.ts +63 -0
- package/src/gen/chat/.openapi-generator/FILES +24 -0
- package/src/gen/chat/.openapi-generator/VERSION +1 -0
- package/src/gen/chat/.openapi-generator-ignore +23 -0
- package/src/gen/chat/apis/ChannelTypesApi.ts +275 -0
- package/src/gen/chat/apis/ChannelsApi.ts +1221 -0
- package/src/gen/chat/apis/CustomCommandsApi.ts +276 -0
- package/src/gen/chat/apis/DefaultApi.ts +196 -0
- package/src/gen/chat/apis/DevicesApi.ts +180 -0
- package/src/gen/chat/apis/EventsApi.ts +220 -0
- package/src/gen/chat/apis/FilesApi.ts +312 -0
- package/src/gen/chat/apis/GDPRApi.ts +418 -0
- package/src/gen/chat/apis/ImportsApi.ts +222 -0
- package/src/gen/chat/apis/MessagesApi.ts +1475 -0
- package/src/gen/chat/apis/ModerationApi.ts +1038 -0
- package/src/gen/chat/apis/PermissionsV2Api.ts +259 -0
- package/src/gen/chat/apis/PushApi.ts +183 -0
- package/src/gen/chat/apis/ReactionsApi.ts +202 -0
- package/src/gen/chat/apis/ServerSideApi.ts +79 -0
- package/src/gen/chat/apis/SettingsApi.ts +948 -0
- package/src/gen/chat/apis/TasksApi.ts +75 -0
- package/src/gen/chat/apis/TestingApi.ts +185 -0
- package/src/gen/chat/apis/UsersApi.ts +1203 -0
- package/src/gen/chat/apis/index.ts +30 -0
- package/src/gen/chat/index.ts +5 -0
- package/src/gen/chat/models/index.ts +15541 -0
- package/src/gen/chat/runtime.ts +415 -0
- package/src/gen/video/.openapi-generator/FILES +7 -0
- package/src/gen/video/.openapi-generator/VERSION +1 -0
- package/src/gen/video/.openapi-generator-ignore +23 -0
- package/src/gen/video/apis/DefaultApi.ts +1997 -0
- package/src/gen/video/apis/ServerSideApi.ts +276 -0
- package/src/gen/video/apis/index.ts +4 -0
- package/src/gen/video/index.ts +5 -0
- package/src/gen/video/models/index.ts +4642 -0
- package/src/gen/video/runtime.ts +415 -0
- package/src/types.ts +1 -0
- package/src/utils/create-token.ts +49 -0
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Stream Video API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: v89.9.2
|
|
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
|
+
VideoAPIError,
|
|
19
|
+
VideoCreateCallTypeRequest,
|
|
20
|
+
VideoCreateCallTypeResponse,
|
|
21
|
+
VideoGetCallTypeResponse,
|
|
22
|
+
VideoListCallTypeResponse,
|
|
23
|
+
VideoResponse,
|
|
24
|
+
VideoUpdateCallTypeRequest,
|
|
25
|
+
VideoUpdateCallTypeResponse,
|
|
26
|
+
} from '../models';
|
|
27
|
+
|
|
28
|
+
export interface CreateCallTypeRequest {
|
|
29
|
+
videoCreateCallTypeRequest: VideoCreateCallTypeRequest | null;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface DeleteCallTypeRequest {
|
|
33
|
+
name: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface GetCallTypeRequest {
|
|
37
|
+
name: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface UpdateCallTypeRequest {
|
|
41
|
+
name: string;
|
|
42
|
+
videoUpdateCallTypeRequest: VideoUpdateCallTypeRequest | null;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
*/
|
|
48
|
+
export class ServerSideApi extends runtime.BaseAPI {
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* Create Call Type
|
|
53
|
+
*/
|
|
54
|
+
async createCallTypeRaw(requestParameters: CreateCallTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoCreateCallTypeResponse>> {
|
|
55
|
+
if (requestParameters.videoCreateCallTypeRequest === null || requestParameters.videoCreateCallTypeRequest === undefined) {
|
|
56
|
+
throw new runtime.RequiredError('videoCreateCallTypeRequest','Required parameter requestParameters.videoCreateCallTypeRequest was null or undefined when calling createCallType.');
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const queryParameters: any = {};
|
|
60
|
+
|
|
61
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
62
|
+
|
|
63
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
64
|
+
|
|
65
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
66
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
70
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
74
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const response = await this.request({
|
|
78
|
+
path: `/calltypes`,
|
|
79
|
+
method: 'POST',
|
|
80
|
+
headers: headerParameters,
|
|
81
|
+
query: queryParameters,
|
|
82
|
+
body: requestParameters.videoCreateCallTypeRequest,
|
|
83
|
+
}, initOverrides);
|
|
84
|
+
|
|
85
|
+
return new runtime.JSONApiResponse(response);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* Create Call Type
|
|
91
|
+
*/
|
|
92
|
+
async createCallType(requestParameters: CreateCallTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoCreateCallTypeResponse> {
|
|
93
|
+
const response = await this.createCallTypeRaw(requestParameters, initOverrides);
|
|
94
|
+
return await response.value();
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
*
|
|
99
|
+
* Delete Call Type
|
|
100
|
+
*/
|
|
101
|
+
async deleteCallTypeRaw(requestParameters: DeleteCallTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoResponse>> {
|
|
102
|
+
if (requestParameters.name === null || requestParameters.name === undefined) {
|
|
103
|
+
throw new runtime.RequiredError('name','Required parameter requestParameters.name was null or undefined when calling deleteCallType.');
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const queryParameters: any = {};
|
|
107
|
+
|
|
108
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
109
|
+
|
|
110
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
111
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
115
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
119
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const response = await this.request({
|
|
123
|
+
path: `/calltypes/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
|
|
124
|
+
method: 'DELETE',
|
|
125
|
+
headers: headerParameters,
|
|
126
|
+
query: queryParameters,
|
|
127
|
+
}, initOverrides);
|
|
128
|
+
|
|
129
|
+
return new runtime.JSONApiResponse(response);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
*
|
|
134
|
+
* Delete Call Type
|
|
135
|
+
*/
|
|
136
|
+
async deleteCallType(requestParameters: DeleteCallTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoResponse> {
|
|
137
|
+
const response = await this.deleteCallTypeRaw(requestParameters, initOverrides);
|
|
138
|
+
return await response.value();
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
*
|
|
143
|
+
* Get Call Type
|
|
144
|
+
*/
|
|
145
|
+
async getCallTypeRaw(requestParameters: GetCallTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoGetCallTypeResponse>> {
|
|
146
|
+
if (requestParameters.name === null || requestParameters.name === undefined) {
|
|
147
|
+
throw new runtime.RequiredError('name','Required parameter requestParameters.name was null or undefined when calling getCallType.');
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
const queryParameters: any = {};
|
|
151
|
+
|
|
152
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
153
|
+
|
|
154
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
155
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
159
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
163
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const response = await this.request({
|
|
167
|
+
path: `/calltypes/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
|
|
168
|
+
method: 'GET',
|
|
169
|
+
headers: headerParameters,
|
|
170
|
+
query: queryParameters,
|
|
171
|
+
}, initOverrides);
|
|
172
|
+
|
|
173
|
+
return new runtime.JSONApiResponse(response);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
*
|
|
178
|
+
* Get Call Type
|
|
179
|
+
*/
|
|
180
|
+
async getCallType(requestParameters: GetCallTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoGetCallTypeResponse> {
|
|
181
|
+
const response = await this.getCallTypeRaw(requestParameters, initOverrides);
|
|
182
|
+
return await response.value();
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
*
|
|
187
|
+
* List Call Type
|
|
188
|
+
*/
|
|
189
|
+
async listCallTypesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoListCallTypeResponse>> {
|
|
190
|
+
const queryParameters: any = {};
|
|
191
|
+
|
|
192
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
193
|
+
|
|
194
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
195
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
199
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
203
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
const response = await this.request({
|
|
207
|
+
path: `/calltypes`,
|
|
208
|
+
method: 'GET',
|
|
209
|
+
headers: headerParameters,
|
|
210
|
+
query: queryParameters,
|
|
211
|
+
}, initOverrides);
|
|
212
|
+
|
|
213
|
+
return new runtime.JSONApiResponse(response);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
*
|
|
218
|
+
* List Call Type
|
|
219
|
+
*/
|
|
220
|
+
async listCallTypes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoListCallTypeResponse> {
|
|
221
|
+
const response = await this.listCallTypesRaw(initOverrides);
|
|
222
|
+
return await response.value();
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
*
|
|
227
|
+
* Update Call Type
|
|
228
|
+
*/
|
|
229
|
+
async updateCallTypeRaw(requestParameters: UpdateCallTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoUpdateCallTypeResponse>> {
|
|
230
|
+
if (requestParameters.name === null || requestParameters.name === undefined) {
|
|
231
|
+
throw new runtime.RequiredError('name','Required parameter requestParameters.name was null or undefined when calling updateCallType.');
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
if (requestParameters.videoUpdateCallTypeRequest === null || requestParameters.videoUpdateCallTypeRequest === undefined) {
|
|
235
|
+
throw new runtime.RequiredError('videoUpdateCallTypeRequest','Required parameter requestParameters.videoUpdateCallTypeRequest was null or undefined when calling updateCallType.');
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
const queryParameters: any = {};
|
|
239
|
+
|
|
240
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
241
|
+
|
|
242
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
243
|
+
|
|
244
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
245
|
+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
249
|
+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
253
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
const response = await this.request({
|
|
257
|
+
path: `/calltypes/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
|
|
258
|
+
method: 'PUT',
|
|
259
|
+
headers: headerParameters,
|
|
260
|
+
query: queryParameters,
|
|
261
|
+
body: requestParameters.videoUpdateCallTypeRequest,
|
|
262
|
+
}, initOverrides);
|
|
263
|
+
|
|
264
|
+
return new runtime.JSONApiResponse(response);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
*
|
|
269
|
+
* Update Call Type
|
|
270
|
+
*/
|
|
271
|
+
async updateCallType(requestParameters: UpdateCallTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoUpdateCallTypeResponse> {
|
|
272
|
+
const response = await this.updateCallTypeRaw(requestParameters, initOverrides);
|
|
273
|
+
return await response.value();
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
}
|