@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.
Files changed (67) hide show
  1. package/README.md +1 -1
  2. package/dist/index.cjs.js +2461 -2124
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.es.js +2450 -2109
  5. package/dist/index.es.js.map +1 -1
  6. package/dist/src/StreamCall.d.ts +1 -1
  7. package/dist/src/StreamChannel.d.ts +7 -9
  8. package/dist/src/StreamChatClient.d.ts +2 -5
  9. package/dist/src/StreamClient.d.ts +15 -26
  10. package/dist/src/gen/chat/apis/ProductchatApi.d.ts +1750 -0
  11. package/dist/src/gen/chat/apis/index.d.ts +1 -27
  12. package/dist/src/gen/chat/models/index.d.ts +5101 -5891
  13. package/dist/src/gen/chat/runtime.d.ts +2 -2
  14. package/dist/src/gen/video/apis/ProductvideoApi.d.ts +1 -1
  15. package/dist/src/gen/video/models/index.d.ts +189 -35
  16. package/dist/src/gen/video/runtime.d.ts +1 -1
  17. package/package.json +8 -1
  18. package/src/StreamCall.ts +7 -7
  19. package/src/StreamChannel.ts +44 -49
  20. package/src/StreamChatClient.ts +23 -35
  21. package/src/StreamClient.ts +71 -232
  22. package/src/gen/chat/.openapi-generator/FILES +1 -19
  23. package/src/gen/chat/apis/ProductchatApi.ts +7007 -0
  24. package/src/gen/chat/apis/index.ts +1 -27
  25. package/src/gen/chat/models/index.ts +5758 -6564
  26. package/src/gen/chat/runtime.ts +3 -3
  27. package/src/gen/video/apis/ProductvideoApi.ts +1 -1
  28. package/src/gen/video/models/index.ts +184 -36
  29. package/src/gen/video/runtime.ts +1 -1
  30. package/dist/src/gen/chat/apis/ChannelTypesApi.d.ts +0 -81
  31. package/dist/src/gen/chat/apis/ChannelsApi.d.ts +0 -280
  32. package/dist/src/gen/chat/apis/CustomCommandsApi.d.ts +0 -81
  33. package/dist/src/gen/chat/apis/DefaultApi.d.ts +0 -60
  34. package/dist/src/gen/chat/apis/DevicesApi.d.ts +0 -58
  35. package/dist/src/gen/chat/apis/EventsApi.d.ts +0 -47
  36. package/dist/src/gen/chat/apis/FilesApi.d.ts +0 -85
  37. package/dist/src/gen/chat/apis/GDPRApi.d.ts +0 -114
  38. package/dist/src/gen/chat/apis/ImportsApi.d.ts +0 -67
  39. package/dist/src/gen/chat/apis/MessagesApi.d.ts +0 -374
  40. package/dist/src/gen/chat/apis/ModerationApi.d.ts +0 -271
  41. package/dist/src/gen/chat/apis/PermissionsV2Api.d.ts +0 -77
  42. package/dist/src/gen/chat/apis/PushApi.d.ts +0 -65
  43. package/dist/src/gen/chat/apis/ReactionsApi.d.ts +0 -62
  44. package/dist/src/gen/chat/apis/ServerSideApi.d.ts +0 -31
  45. package/dist/src/gen/chat/apis/SettingsApi.d.ts +0 -257
  46. package/dist/src/gen/chat/apis/TasksApi.d.ts +0 -31
  47. package/dist/src/gen/chat/apis/TestingApi.d.ts +0 -57
  48. package/dist/src/gen/chat/apis/UsersApi.d.ts +0 -313
  49. package/src/gen/chat/apis/ChannelTypesApi.ts +0 -275
  50. package/src/gen/chat/apis/ChannelsApi.ts +0 -1096
  51. package/src/gen/chat/apis/CustomCommandsApi.ts +0 -276
  52. package/src/gen/chat/apis/DefaultApi.ts +0 -196
  53. package/src/gen/chat/apis/DevicesApi.ts +0 -180
  54. package/src/gen/chat/apis/EventsApi.ts +0 -147
  55. package/src/gen/chat/apis/FilesApi.ts +0 -312
  56. package/src/gen/chat/apis/GDPRApi.ts +0 -418
  57. package/src/gen/chat/apis/ImportsApi.ts +0 -222
  58. package/src/gen/chat/apis/MessagesApi.ts +0 -1475
  59. package/src/gen/chat/apis/ModerationApi.ts +0 -1038
  60. package/src/gen/chat/apis/PermissionsV2Api.ts +0 -259
  61. package/src/gen/chat/apis/PushApi.ts +0 -183
  62. package/src/gen/chat/apis/ReactionsApi.ts +0 -202
  63. package/src/gen/chat/apis/ServerSideApi.ts +0 -79
  64. package/src/gen/chat/apis/SettingsApi.ts +0 -948
  65. package/src/gen/chat/apis/TasksApi.ts +0 -75
  66. package/src/gen/chat/apis/TestingApi.ts +0 -185
  67. package/src/gen/chat/apis/UsersApi.ts +0 -1203
@@ -1,275 +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
- CreateChannelTypeRequest,
20
- CreateChannelTypeResponse,
21
- ListChannelTypesResponse,
22
- Response,
23
- UpdateChannelTypeRequest,
24
- UpdateChannelTypeResponse,
25
- } from '../models';
26
-
27
- export interface CreateChannelTypeOperationRequest {
28
- createChannelTypeRequest: CreateChannelTypeRequest | null;
29
- }
30
-
31
- export interface DeleteChannelTypeRequest {
32
- name: string;
33
- }
34
-
35
- export interface GetChannelTypeRequest {
36
- name: string;
37
- }
38
-
39
- export interface UpdateChannelTypeOperationRequest {
40
- name: string;
41
- updateChannelTypeRequest: UpdateChannelTypeRequest | null;
42
- }
43
-
44
- /**
45
- *
46
- */
47
- export class ChannelTypesApi extends runtime.BaseAPI {
48
-
49
- /**
50
- * Creates new channel type
51
- * Create channel type
52
- */
53
- async createChannelTypeRaw(requestParameters: CreateChannelTypeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateChannelTypeResponse>> {
54
- if (requestParameters.createChannelTypeRequest === null || requestParameters.createChannelTypeRequest === undefined) {
55
- throw new runtime.RequiredError('createChannelTypeRequest','Required parameter requestParameters.createChannelTypeRequest was null or undefined when calling createChannelType.');
56
- }
57
-
58
- const queryParameters: any = {};
59
-
60
- const headerParameters: runtime.HTTPHeaders = {};
61
-
62
- headerParameters['Content-Type'] = 'application/json';
63
-
64
- if (this.configuration && this.configuration.apiKey) {
65
- headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
66
- }
67
-
68
- if (this.configuration && this.configuration.apiKey) {
69
- queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
70
- }
71
-
72
- if (this.configuration && this.configuration.apiKey) {
73
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
74
- }
75
-
76
- const response = await this.request({
77
- path: `/channeltypes`,
78
- method: 'POST',
79
- headers: headerParameters,
80
- query: queryParameters,
81
- body: requestParameters.createChannelTypeRequest,
82
- }, initOverrides);
83
-
84
- return new runtime.JSONApiResponse(response);
85
- }
86
-
87
- /**
88
- * Creates new channel type
89
- * Create channel type
90
- */
91
- async createChannelType(requestParameters: CreateChannelTypeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateChannelTypeResponse> {
92
- const response = await this.createChannelTypeRaw(requestParameters, initOverrides);
93
- return await response.value();
94
- }
95
-
96
- /**
97
- * Deletes channel type
98
- * Delete channel type
99
- */
100
- async deleteChannelTypeRaw(requestParameters: DeleteChannelTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Response>> {
101
- if (requestParameters.name === null || requestParameters.name === undefined) {
102
- throw new runtime.RequiredError('name','Required parameter requestParameters.name was null or undefined when calling deleteChannelType.');
103
- }
104
-
105
- const queryParameters: any = {};
106
-
107
- const headerParameters: runtime.HTTPHeaders = {};
108
-
109
- if (this.configuration && this.configuration.apiKey) {
110
- headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
111
- }
112
-
113
- if (this.configuration && this.configuration.apiKey) {
114
- queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
115
- }
116
-
117
- if (this.configuration && this.configuration.apiKey) {
118
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
119
- }
120
-
121
- const response = await this.request({
122
- path: `/channeltypes/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
123
- method: 'DELETE',
124
- headers: headerParameters,
125
- query: queryParameters,
126
- }, initOverrides);
127
-
128
- return new runtime.JSONApiResponse(response);
129
- }
130
-
131
- /**
132
- * Deletes channel type
133
- * Delete channel type
134
- */
135
- async deleteChannelType(requestParameters: DeleteChannelTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Response> {
136
- const response = await this.deleteChannelTypeRaw(requestParameters, initOverrides);
137
- return await response.value();
138
- }
139
-
140
- /**
141
- * Gets channel type
142
- * Get channel type
143
- */
144
- async getChannelTypeRaw(requestParameters: GetChannelTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Response>> {
145
- if (requestParameters.name === null || requestParameters.name === undefined) {
146
- throw new runtime.RequiredError('name','Required parameter requestParameters.name was null or undefined when calling getChannelType.');
147
- }
148
-
149
- const queryParameters: any = {};
150
-
151
- const headerParameters: runtime.HTTPHeaders = {};
152
-
153
- if (this.configuration && this.configuration.apiKey) {
154
- headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
155
- }
156
-
157
- if (this.configuration && this.configuration.apiKey) {
158
- queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
159
- }
160
-
161
- if (this.configuration && this.configuration.apiKey) {
162
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
163
- }
164
-
165
- const response = await this.request({
166
- path: `/channeltypes/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
167
- method: 'GET',
168
- headers: headerParameters,
169
- query: queryParameters,
170
- }, initOverrides);
171
-
172
- return new runtime.JSONApiResponse(response);
173
- }
174
-
175
- /**
176
- * Gets channel type
177
- * Get channel type
178
- */
179
- async getChannelType(requestParameters: GetChannelTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Response> {
180
- const response = await this.getChannelTypeRaw(requestParameters, initOverrides);
181
- return await response.value();
182
- }
183
-
184
- /**
185
- * Lists all available channel types
186
- * List channel types
187
- */
188
- async listChannelTypesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListChannelTypesResponse>> {
189
- const queryParameters: any = {};
190
-
191
- const headerParameters: runtime.HTTPHeaders = {};
192
-
193
- if (this.configuration && this.configuration.apiKey) {
194
- headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
195
- }
196
-
197
- if (this.configuration && this.configuration.apiKey) {
198
- queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
199
- }
200
-
201
- if (this.configuration && this.configuration.apiKey) {
202
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
203
- }
204
-
205
- const response = await this.request({
206
- path: `/channeltypes`,
207
- method: 'GET',
208
- headers: headerParameters,
209
- query: queryParameters,
210
- }, initOverrides);
211
-
212
- return new runtime.JSONApiResponse(response);
213
- }
214
-
215
- /**
216
- * Lists all available channel types
217
- * List channel types
218
- */
219
- async listChannelTypes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListChannelTypesResponse> {
220
- const response = await this.listChannelTypesRaw(initOverrides);
221
- return await response.value();
222
- }
223
-
224
- /**
225
- * Updates channel type
226
- * Update channel type
227
- */
228
- async updateChannelTypeRaw(requestParameters: UpdateChannelTypeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdateChannelTypeResponse>> {
229
- if (requestParameters.name === null || requestParameters.name === undefined) {
230
- throw new runtime.RequiredError('name','Required parameter requestParameters.name was null or undefined when calling updateChannelType.');
231
- }
232
-
233
- if (requestParameters.updateChannelTypeRequest === null || requestParameters.updateChannelTypeRequest === undefined) {
234
- throw new runtime.RequiredError('updateChannelTypeRequest','Required parameter requestParameters.updateChannelTypeRequest was null or undefined when calling updateChannelType.');
235
- }
236
-
237
- const queryParameters: any = {};
238
-
239
- const headerParameters: runtime.HTTPHeaders = {};
240
-
241
- headerParameters['Content-Type'] = 'application/json';
242
-
243
- if (this.configuration && this.configuration.apiKey) {
244
- headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
245
- }
246
-
247
- if (this.configuration && this.configuration.apiKey) {
248
- queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
249
- }
250
-
251
- if (this.configuration && this.configuration.apiKey) {
252
- headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
253
- }
254
-
255
- const response = await this.request({
256
- path: `/channeltypes/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
257
- method: 'PUT',
258
- headers: headerParameters,
259
- query: queryParameters,
260
- body: requestParameters.updateChannelTypeRequest,
261
- }, initOverrides);
262
-
263
- return new runtime.JSONApiResponse(response);
264
- }
265
-
266
- /**
267
- * Updates channel type
268
- * Update channel type
269
- */
270
- async updateChannelType(requestParameters: UpdateChannelTypeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateChannelTypeResponse> {
271
- const response = await this.updateChannelTypeRaw(requestParameters, initOverrides);
272
- return await response.value();
273
- }
274
-
275
- }