@stream-io/node-sdk 0.1.6 → 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 +8 -11
- 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 -74
- 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
package/src/StreamClient.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { StreamChatClient } from
|
|
2
|
-
import { StreamVideoClient } from
|
|
1
|
+
import { StreamChatClient } from './StreamChatClient';
|
|
2
|
+
import { StreamVideoClient } from './StreamVideoClient';
|
|
3
3
|
import {
|
|
4
4
|
APIError,
|
|
5
5
|
BanRequest,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
UserObjectRequest,
|
|
46
46
|
UserResponse,
|
|
47
47
|
UsersApi,
|
|
48
|
-
} from
|
|
48
|
+
} from './gen/chat';
|
|
49
49
|
import {
|
|
50
50
|
Configuration,
|
|
51
51
|
ErrorContext,
|
|
@@ -54,14 +54,14 @@ import {
|
|
|
54
54
|
JSONApiResponse,
|
|
55
55
|
RequestContext,
|
|
56
56
|
ResponseContext,
|
|
57
|
-
} from
|
|
58
|
-
import { v4 as uuidv4 } from
|
|
59
|
-
import { JWTServerToken, JWTUserToken } from
|
|
57
|
+
} from './gen/video';
|
|
58
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
59
|
+
import { JWTServerToken, JWTUserToken } from './utils/create-token';
|
|
60
60
|
|
|
61
|
-
export
|
|
61
|
+
export interface StreamClientOptions {
|
|
62
62
|
timeout?: number;
|
|
63
63
|
basePath?: string;
|
|
64
|
-
}
|
|
64
|
+
}
|
|
65
65
|
|
|
66
66
|
export class StreamClient {
|
|
67
67
|
public readonly video: StreamVideoClient;
|
|
@@ -76,7 +76,7 @@ export class StreamClient {
|
|
|
76
76
|
private readonly settingsApi: SettingsApi;
|
|
77
77
|
private readonly eventsApi: EventsApi;
|
|
78
78
|
private readonly tasksApi: TasksApi;
|
|
79
|
-
private token: string;
|
|
79
|
+
private readonly token: string;
|
|
80
80
|
private static readonly DEFAULT_TIMEOUT = 3000;
|
|
81
81
|
|
|
82
82
|
/**
|
|
@@ -86,39 +86,39 @@ export class StreamClient {
|
|
|
86
86
|
* @param config can be a string, which will be interpreted as base path (deprecated), or a config object
|
|
87
87
|
*/
|
|
88
88
|
constructor(
|
|
89
|
-
private apiKey: string,
|
|
90
|
-
private secret: string,
|
|
91
|
-
readonly config?: string | StreamClientOptions
|
|
89
|
+
private readonly apiKey: string,
|
|
90
|
+
private readonly secret: string,
|
|
91
|
+
readonly config?: string | StreamClientOptions,
|
|
92
92
|
) {
|
|
93
93
|
this.token = JWTServerToken(this.secret);
|
|
94
94
|
this.video = new StreamVideoClient(this);
|
|
95
95
|
this.chat = new StreamChatClient(this);
|
|
96
96
|
|
|
97
|
-
if (typeof config ===
|
|
97
|
+
if (typeof config === 'string') {
|
|
98
98
|
this.options.basePath = config;
|
|
99
99
|
this.options.timeout = StreamClient.DEFAULT_TIMEOUT;
|
|
100
100
|
} else {
|
|
101
|
-
this.options.timeout = config?.timeout
|
|
101
|
+
this.options.timeout = config?.timeout ?? StreamClient.DEFAULT_TIMEOUT;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
const chatConfiguration = this.getConfiguration();
|
|
105
|
-
|
|
105
|
+
// @ts-expect-error typing problem
|
|
106
106
|
this.usersApi = new UsersApi(chatConfiguration);
|
|
107
|
-
|
|
107
|
+
// @ts-expect-error typing problem
|
|
108
108
|
this.devicesApi = new DevicesApi(chatConfiguration);
|
|
109
|
-
|
|
109
|
+
// @ts-expect-error typing problem
|
|
110
110
|
this.pushApi = new PushApi(chatConfiguration);
|
|
111
|
-
|
|
111
|
+
// @ts-expect-error typing problem
|
|
112
112
|
this.serversideApi = new ServerSideApi(chatConfiguration);
|
|
113
|
-
|
|
113
|
+
// @ts-expect-error typing problem
|
|
114
114
|
this.testingApi = new TestingApi(chatConfiguration);
|
|
115
|
-
|
|
115
|
+
// @ts-expect-error typing problem
|
|
116
116
|
this.permissionsApi = new PermissionsV2Api(chatConfiguration);
|
|
117
|
-
|
|
117
|
+
// @ts-expect-error typing problem
|
|
118
118
|
this.settingsApi = new SettingsApi(chatConfiguration);
|
|
119
|
-
|
|
119
|
+
// @ts-expect-error typing problem
|
|
120
120
|
this.eventsApi = new EventsApi(chatConfiguration);
|
|
121
|
-
|
|
121
|
+
// @ts-expect-error typing problem
|
|
122
122
|
this.tasksApi = new TasksApi(chatConfiguration);
|
|
123
123
|
}
|
|
124
124
|
|
|
@@ -134,7 +134,7 @@ export class StreamClient {
|
|
|
134
134
|
userID: string,
|
|
135
135
|
exp = Math.round(new Date().getTime() / 1000) + 60 * 60,
|
|
136
136
|
iat = Math.round(Date.now() / 1000),
|
|
137
|
-
call_cids?: string[]
|
|
137
|
+
call_cids?: string[],
|
|
138
138
|
) {
|
|
139
139
|
const extra: { exp?: number; iat?: number; call_cids?: string[] } = {};
|
|
140
140
|
|
|
@@ -148,7 +148,7 @@ export class StreamClient {
|
|
|
148
148
|
|
|
149
149
|
if (call_cids) {
|
|
150
150
|
console.warn(
|
|
151
|
-
`Use createCallToken method for creating call tokens, the "call_cids" param will be removed from the createToken method with version 0.2.0
|
|
151
|
+
`Use createCallToken method for creating call tokens, the "call_cids" param will be removed from the createToken method with version 0.2.0`,
|
|
152
152
|
);
|
|
153
153
|
extra.call_cids = call_cids;
|
|
154
154
|
}
|
|
@@ -168,7 +168,7 @@ export class StreamClient {
|
|
|
168
168
|
userID: string,
|
|
169
169
|
call_cids: string[],
|
|
170
170
|
exp = Math.round(new Date().getTime() / 1000) + 60 * 60,
|
|
171
|
-
iat = Math.round(Date.now() / 1000)
|
|
171
|
+
iat = Math.round(Date.now() / 1000),
|
|
172
172
|
) {
|
|
173
173
|
const extra: { exp?: number; iat?: number; call_cids?: string[] } = {};
|
|
174
174
|
|
|
@@ -188,9 +188,11 @@ export class StreamClient {
|
|
|
188
188
|
createDevice = (createDeviceRequest: CreateDeviceRequest) => {
|
|
189
189
|
return this.devicesApi.createDevice({ createDeviceRequest });
|
|
190
190
|
};
|
|
191
|
+
|
|
191
192
|
deleteDevice = (requestParameters: DeleteDeviceRequest) => {
|
|
192
193
|
return this.devicesApi.deleteDevice(requestParameters);
|
|
193
194
|
};
|
|
195
|
+
|
|
194
196
|
listDevices = (requestParameters: ListDevicesRequest) => {
|
|
195
197
|
return this.devicesApi.listDevices(requestParameters);
|
|
196
198
|
};
|
|
@@ -289,9 +291,9 @@ export class StreamClient {
|
|
|
289
291
|
queryUsers = async (payload: QueryUsersRequest) => {
|
|
290
292
|
payload.user = this.mapCustomDataBeforeSend(payload.user);
|
|
291
293
|
const response = await this.usersApi.queryUsers({ payload });
|
|
292
|
-
// @ts-expect-error
|
|
293
|
-
response.users = response.users.map(
|
|
294
|
-
|
|
294
|
+
// @ts-expect-error typing problem
|
|
295
|
+
response.users = response.users.map((u) =>
|
|
296
|
+
this.mapCustomDataAfterReceive(u),
|
|
295
297
|
);
|
|
296
298
|
|
|
297
299
|
return response;
|
|
@@ -329,13 +331,13 @@ export class StreamClient {
|
|
|
329
331
|
upsertUsers = async (updateUsersRequest: UpdateUsersRequest) => {
|
|
330
332
|
Object.keys(updateUsersRequest.users).forEach((key) => {
|
|
331
333
|
updateUsersRequest.users[key] = this.mapCustomDataBeforeSend(
|
|
332
|
-
updateUsersRequest.users[key]
|
|
334
|
+
updateUsersRequest.users[key],
|
|
333
335
|
);
|
|
334
336
|
});
|
|
335
337
|
const response = await this.usersApi.updateUsers({ updateUsersRequest });
|
|
336
338
|
Object.keys(response.users).forEach((key) => {
|
|
337
339
|
response.users[key] = this.mapCustomDataAfterReceive(
|
|
338
|
-
response.users[key]
|
|
340
|
+
response.users[key],
|
|
339
341
|
)!;
|
|
340
342
|
});
|
|
341
343
|
|
|
@@ -351,7 +353,7 @@ export class StreamClient {
|
|
|
351
353
|
});
|
|
352
354
|
Object.keys(response.users).forEach((key) => {
|
|
353
355
|
response.users[key] = this.mapCustomDataAfterReceive(
|
|
354
|
-
response.users[key]
|
|
356
|
+
response.users[key],
|
|
355
357
|
)!;
|
|
356
358
|
});
|
|
357
359
|
|
|
@@ -378,7 +380,7 @@ export class StreamClient {
|
|
|
378
380
|
|
|
379
381
|
unmuteUser = (unmuteUserRequest: UnmuteUserRequest) => {
|
|
380
382
|
unmuteUserRequest.user = this.mapCustomDataBeforeSend(
|
|
381
|
-
unmuteUserRequest.user
|
|
383
|
+
unmuteUserRequest.user,
|
|
382
384
|
);
|
|
383
385
|
return this.usersApi.unmuteUser({ unmuteUserRequest });
|
|
384
386
|
};
|
|
@@ -429,24 +431,25 @@ export class StreamClient {
|
|
|
429
431
|
getConfiguration = (options?: { basePath?: string }) => {
|
|
430
432
|
return new Configuration({
|
|
431
433
|
apiKey: (name: string) => {
|
|
432
|
-
const mapping:
|
|
433
|
-
|
|
434
|
+
const mapping: Record<string, string> = {
|
|
435
|
+
'Stream-Auth-Type': 'jwt',
|
|
434
436
|
api_key: this.apiKey,
|
|
435
437
|
Authorization: this.token,
|
|
436
438
|
};
|
|
437
439
|
|
|
438
440
|
return mapping[name];
|
|
439
441
|
},
|
|
440
|
-
basePath: options?.basePath
|
|
442
|
+
basePath: options?.basePath ?? this.options.basePath,
|
|
441
443
|
headers: {
|
|
442
|
-
|
|
444
|
+
'X-Stream-Client': 'stream-node-' + process.env.PKG_VERSION,
|
|
443
445
|
},
|
|
444
446
|
middleware: [
|
|
445
447
|
{
|
|
446
448
|
pre: (context: RequestContext) => {
|
|
447
449
|
context.init.headers = {
|
|
448
450
|
...context.init.headers,
|
|
449
|
-
|
|
451
|
+
'x-client-request-id': uuidv4(),
|
|
452
|
+
'Accept-Encoding': 'gzip',
|
|
450
453
|
};
|
|
451
454
|
|
|
452
455
|
return Promise.resolve(context);
|
|
@@ -463,7 +466,7 @@ export class StreamClient {
|
|
|
463
466
|
const response = new JSONApiResponse(context.response);
|
|
464
467
|
const value = (await response.value()) as APIError;
|
|
465
468
|
throw new Error(
|
|
466
|
-
`Stream error code ${value.code}: ${value.message}
|
|
469
|
+
`Stream error code ${value.code}: ${value.message}`,
|
|
467
470
|
);
|
|
468
471
|
}
|
|
469
472
|
},
|
|
@@ -476,10 +479,10 @@ export class StreamClient {
|
|
|
476
479
|
},
|
|
477
480
|
onError: (context: ErrorContext) => {
|
|
478
481
|
const error = context.error as DOMException;
|
|
479
|
-
if (error.name ===
|
|
482
|
+
if (error.name === 'AbortError' || error.name === 'TimeoutError') {
|
|
480
483
|
throw new FetchError(
|
|
481
484
|
error,
|
|
482
|
-
`The request was aborted due to to the ${this.options.timeout}ms timeout, you can set the timeout in the StreamClient constructor
|
|
485
|
+
`The request was aborted due to to the ${this.options.timeout}ms timeout, you can set the timeout in the StreamClient constructor`,
|
|
483
486
|
);
|
|
484
487
|
}
|
|
485
488
|
|
|
@@ -491,49 +494,50 @@ export class StreamClient {
|
|
|
491
494
|
queryParamsStringify: (params: HTTPQuery) => {
|
|
492
495
|
const newParams = [];
|
|
493
496
|
for (const k in params) {
|
|
494
|
-
if (Array.isArray(params[k]) || typeof params[k] ===
|
|
497
|
+
if (Array.isArray(params[k]) || typeof params[k] === 'object') {
|
|
495
498
|
newParams.push(
|
|
496
|
-
`${k}=${encodeURIComponent(JSON.stringify(params[k]))}
|
|
499
|
+
`${k}=${encodeURIComponent(JSON.stringify(params[k]))}`,
|
|
497
500
|
);
|
|
498
501
|
} else {
|
|
499
502
|
const value = params[k];
|
|
500
503
|
if (
|
|
501
|
-
typeof value ===
|
|
502
|
-
typeof value ===
|
|
503
|
-
typeof value ===
|
|
504
|
+
typeof value === 'string' ||
|
|
505
|
+
typeof value === 'number' ||
|
|
506
|
+
typeof value === 'boolean'
|
|
504
507
|
) {
|
|
505
508
|
newParams.push(`${k}=${encodeURIComponent(value)}`);
|
|
506
509
|
}
|
|
507
510
|
}
|
|
508
511
|
}
|
|
509
512
|
|
|
510
|
-
return newParams.join(
|
|
513
|
+
return newParams.join('&');
|
|
511
514
|
},
|
|
512
515
|
});
|
|
513
516
|
};
|
|
514
517
|
|
|
515
|
-
private reservedKeywords = [
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
518
|
+
private readonly reservedKeywords = [
|
|
519
|
+
'ban_expires',
|
|
520
|
+
'banned',
|
|
521
|
+
'id',
|
|
522
|
+
'invisible',
|
|
523
|
+
'language',
|
|
524
|
+
'push_notifications',
|
|
525
|
+
'revoke_tokens_issued_before',
|
|
526
|
+
'role',
|
|
527
|
+
'teams',
|
|
528
|
+
'created_at',
|
|
529
|
+
'deactivated_at',
|
|
530
|
+
'deleted_at',
|
|
531
|
+
'last_active',
|
|
532
|
+
'online',
|
|
533
|
+
'updated_at',
|
|
534
|
+
'shadow_banned',
|
|
535
|
+
'name',
|
|
536
|
+
'image',
|
|
534
537
|
];
|
|
535
|
-
|
|
536
|
-
|
|
538
|
+
|
|
539
|
+
private readonly mapCustomDataBeforeSend = (
|
|
540
|
+
user: UserObject | UserObjectRequest | UserResponse | undefined,
|
|
537
541
|
) => {
|
|
538
542
|
if (!user) {
|
|
539
543
|
return undefined;
|
|
@@ -543,14 +547,14 @@ export class StreamClient {
|
|
|
543
547
|
return { ...copy, ...user.custom };
|
|
544
548
|
};
|
|
545
549
|
|
|
546
|
-
private mapCustomDataAfterReceive = (
|
|
547
|
-
user:
|
|
548
|
-
)
|
|
550
|
+
private mapCustomDataAfterReceive<T = UserObject | UserResponse | undefined>(
|
|
551
|
+
user: T,
|
|
552
|
+
) {
|
|
549
553
|
if (!user) {
|
|
550
554
|
return undefined;
|
|
551
555
|
}
|
|
552
|
-
// @ts-expect-error
|
|
553
|
-
|
|
556
|
+
// @ts-expect-error typing problem
|
|
557
|
+
const result: UserObject | UserResponse = {};
|
|
554
558
|
Object.keys(user).forEach((key) => {
|
|
555
559
|
if (!this.reservedKeywords.includes(key)) {
|
|
556
560
|
if (!result.custom) {
|
|
@@ -563,5 +567,5 @@ export class StreamClient {
|
|
|
563
567
|
});
|
|
564
568
|
|
|
565
569
|
return result;
|
|
566
|
-
}
|
|
570
|
+
}
|
|
567
571
|
}
|
package/src/StreamVideoClient.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { StreamCall } from
|
|
2
|
-
import { StreamClient } from
|
|
1
|
+
import { StreamCall } from './StreamCall';
|
|
2
|
+
import { StreamClient } from './StreamClient';
|
|
3
3
|
import {
|
|
4
4
|
DefaultApi,
|
|
5
5
|
DeleteCallTypeRequest,
|
|
@@ -8,17 +8,17 @@ import {
|
|
|
8
8
|
VideoCreateCallTypeRequest,
|
|
9
9
|
VideoQueryCallsRequest,
|
|
10
10
|
VideoUpdateCallTypeRequest,
|
|
11
|
-
} from
|
|
11
|
+
} from './gen/video';
|
|
12
12
|
|
|
13
13
|
export class StreamVideoClient {
|
|
14
14
|
private readonly apiClient: DefaultApi;
|
|
15
15
|
private readonly videoServerSideApiClient: ServerSideApi;
|
|
16
16
|
|
|
17
|
-
constructor(private streamClient: StreamClient) {
|
|
17
|
+
constructor(private readonly streamClient: StreamClient) {
|
|
18
18
|
const configuration = this.streamClient.getConfiguration({
|
|
19
19
|
basePath:
|
|
20
|
-
this.streamClient.options.basePath
|
|
21
|
-
|
|
20
|
+
this.streamClient.options.basePath ??
|
|
21
|
+
'https://video.stream-io-api.com/video',
|
|
22
22
|
});
|
|
23
23
|
this.apiClient = new DefaultApi(configuration);
|
|
24
24
|
this.videoServerSideApiClient = new ServerSideApi(configuration);
|
|
@@ -30,7 +30,7 @@ export class StreamVideoClient {
|
|
|
30
30
|
|
|
31
31
|
queryCalls = (request?: VideoQueryCallsRequest) => {
|
|
32
32
|
return this.apiClient.queryCalls({
|
|
33
|
-
videoQueryCallsRequest: request
|
|
33
|
+
videoQueryCallsRequest: request ?? {},
|
|
34
34
|
});
|
|
35
35
|
};
|
|
36
36
|
|
|
@@ -54,7 +54,7 @@ export class StreamVideoClient {
|
|
|
54
54
|
|
|
55
55
|
updateCallType = (
|
|
56
56
|
name: string,
|
|
57
|
-
videoUpdateCallTypeRequest: VideoUpdateCallTypeRequest
|
|
57
|
+
videoUpdateCallTypeRequest: VideoUpdateCallTypeRequest,
|
|
58
58
|
) => {
|
|
59
59
|
return this.videoServerSideApiClient.updateCallType({
|
|
60
60
|
name,
|
|
@@ -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).
|