@stream-io/node-sdk 0.1.9 → 0.1.11

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/dist/index.es.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { v4 } from 'uuid';
2
2
  import jwt from 'jsonwebtoken';
3
+ import crypto from 'crypto';
3
4
 
4
5
  /**
5
6
  * @export
@@ -4049,7 +4050,7 @@ let ServerSideApi$1 = class ServerSideApi extends BaseAPI$1 {
4049
4050
  /**
4050
4051
  *
4051
4052
  */
4052
- class SettingsApi extends BaseAPI$1 {
4053
+ let SettingsApi$1 = class SettingsApi extends BaseAPI$1 {
4053
4054
  /**
4054
4055
  * Sends a test message via push, this is a test endpoint to verify your push settings
4055
4056
  * Check push
@@ -4777,7 +4778,7 @@ class SettingsApi extends BaseAPI$1 {
4777
4778
  return yield response.value();
4778
4779
  });
4779
4780
  }
4780
- }
4781
+ };
4781
4782
 
4782
4783
  /* tslint:disable */
4783
4784
  /* eslint-disable */
@@ -6028,11 +6029,11 @@ class StreamChannel {
6028
6029
  return this.eventsApi.sendEvent(Object.assign(Object.assign({}, this.baseRequest), { sendEventRequest: { event } }));
6029
6030
  };
6030
6031
  const configuration = this.streamClient.getConfiguration();
6031
- // @ts-expect-error typing problem
6032
+ /** @ts-expect-error */
6032
6033
  this.channelsApi = new ChannelsApi(configuration);
6033
- // @ts-expect-error typing problem
6034
+ /** @ts-expect-error */
6034
6035
  this.messagesApi = new MessagesApi(configuration);
6035
- // @ts-expect-error typing problem
6036
+ /** @ts-expect-error */
6036
6037
  this.eventsApi = new EventsApi(configuration);
6037
6038
  }
6038
6039
  get cid() {
@@ -6120,13 +6121,13 @@ class StreamChatClient {
6120
6121
  return this.commandsApi.deleteCommand(request);
6121
6122
  };
6122
6123
  const configuration = this.streamClient.getConfiguration();
6123
- // @ts-expect-error typing problem
6124
- this.settingsApi = new SettingsApi(configuration);
6125
- // @ts-expect-error typing problem
6124
+ /** @ts-expect-error */
6125
+ this.settingsApi = new SettingsApi$1(configuration);
6126
+ /** @ts-expect-error */
6126
6127
  this.channelTypesApi = new ChannelTypesApi(configuration);
6127
- // @ts-expect-error typing problem
6128
+ /** @ts-expect-error */
6128
6129
  this.channelsApi = new ChannelsApi(configuration);
6129
- // @ts-expect-error typing problem
6130
+ /** @ts-expect-error */
6130
6131
  this.commandsApi = new CustomCommandsApi(configuration);
6131
6132
  }
6132
6133
  }
@@ -6134,17 +6135,17 @@ class StreamChatClient {
6134
6135
  /* tslint:disable */
6135
6136
  /* eslint-disable */
6136
6137
  /**
6137
- * Stream Video API
6138
+ * Stream API
6138
6139
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6139
6140
  *
6140
- * The version of the OpenAPI document: v92.7.0
6141
+ * The version of the OpenAPI document: v98.0.2-ingress-test.3
6141
6142
  *
6142
6143
  *
6143
6144
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
6144
6145
  * https://openapi-generator.tech
6145
6146
  * Do not edit the class manually.
6146
6147
  */
6147
- const BASE_PATH = "https://video.stream-io-api.com".replace(/\/+$/, "");
6148
+ const BASE_PATH = "https://stream-io-api.com".replace(/\/+$/, "");
6148
6149
  class Configuration {
6149
6150
  constructor(configuration = {}) {
6150
6151
  this.configuration = configuration;
@@ -6404,10 +6405,10 @@ class VoidApiResponse {
6404
6405
  /* tslint:disable */
6405
6406
  /* eslint-disable */
6406
6407
  /**
6407
- * Stream Video API
6408
+ * Stream API
6408
6409
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6409
6410
  *
6410
- * The version of the OpenAPI document: v92.7.0
6411
+ * The version of the OpenAPI document: v98.0.2-ingress-test.3
6411
6412
  *
6412
6413
  *
6413
6414
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -6446,7 +6447,7 @@ class DefaultApi extends BaseAPI {
6446
6447
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
6447
6448
  }
6448
6449
  const response = yield this.request({
6449
- path: `/call/{type}/{id}/block`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
6450
+ path: `/video/call/{type}/{id}/block`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
6450
6451
  method: 'POST',
6451
6452
  headers: headerParameters,
6452
6453
  query: queryParameters,
@@ -6487,7 +6488,7 @@ class DefaultApi extends BaseAPI {
6487
6488
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
6488
6489
  }
6489
6490
  const response = yield this.request({
6490
- path: `/devices`,
6491
+ path: `/video/devices`,
6491
6492
  method: 'POST',
6492
6493
  headers: headerParameters,
6493
6494
  query: queryParameters,
@@ -6528,7 +6529,7 @@ class DefaultApi extends BaseAPI {
6528
6529
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
6529
6530
  }
6530
6531
  const response = yield this.request({
6531
- path: `/guest`,
6532
+ path: `/video/guest`,
6532
6533
  method: 'POST',
6533
6534
  headers: headerParameters,
6534
6535
  query: queryParameters,
@@ -6571,7 +6572,7 @@ class DefaultApi extends BaseAPI {
6571
6572
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
6572
6573
  }
6573
6574
  const response = yield this.request({
6574
- path: `/devices`,
6575
+ path: `/video/devices`,
6575
6576
  method: 'DELETE',
6576
6577
  headers: headerParameters,
6577
6578
  query: queryParameters,
@@ -6613,7 +6614,7 @@ class DefaultApi extends BaseAPI {
6613
6614
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
6614
6615
  }
6615
6616
  const response = yield this.request({
6616
- path: `/call/{type}/{id}/mark_ended`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
6617
+ path: `/video/call/{type}/{id}/mark_ended`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
6617
6618
  method: 'POST',
6618
6619
  headers: headerParameters,
6619
6620
  query: queryParameters,
@@ -6667,7 +6668,7 @@ class DefaultApi extends BaseAPI {
6667
6668
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
6668
6669
  }
6669
6670
  const response = yield this.request({
6670
- path: `/call/{type}/{id}`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
6671
+ path: `/video/call/{type}/{id}`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
6671
6672
  method: 'GET',
6672
6673
  headers: headerParameters,
6673
6674
  query: queryParameters,
@@ -6703,7 +6704,7 @@ class DefaultApi extends BaseAPI {
6703
6704
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
6704
6705
  }
6705
6706
  const response = yield this.request({
6706
- path: `/edges`,
6707
+ path: `/video/edges`,
6707
6708
  method: 'GET',
6708
6709
  headers: headerParameters,
6709
6710
  query: queryParameters,
@@ -6752,7 +6753,7 @@ class DefaultApi extends BaseAPI {
6752
6753
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
6753
6754
  }
6754
6755
  const response = yield this.request({
6755
- path: `/call/{type}/{id}`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
6756
+ path: `/video/call/{type}/{id}`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
6756
6757
  method: 'POST',
6757
6758
  headers: headerParameters,
6758
6759
  query: queryParameters,
@@ -6799,7 +6800,7 @@ class DefaultApi extends BaseAPI {
6799
6800
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
6800
6801
  }
6801
6802
  const response = yield this.request({
6802
- path: `/call/{type}/{id}/go_live`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
6803
+ path: `/video/call/{type}/{id}/go_live`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
6803
6804
  method: 'POST',
6804
6805
  headers: headerParameters,
6805
6806
  query: queryParameters,
@@ -6839,7 +6840,7 @@ class DefaultApi extends BaseAPI {
6839
6840
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
6840
6841
  }
6841
6842
  const response = yield this.request({
6842
- path: `/devices`,
6843
+ path: `/video/devices`,
6843
6844
  method: 'GET',
6844
6845
  headers: headerParameters,
6845
6846
  query: queryParameters,
@@ -6881,7 +6882,7 @@ class DefaultApi extends BaseAPI {
6881
6882
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
6882
6883
  }
6883
6884
  const response = yield this.request({
6884
- path: `/call/{type}/{id}/recordings`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
6885
+ path: `/video/call/{type}/{id}/recordings`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
6885
6886
  method: 'GET',
6886
6887
  headers: headerParameters,
6887
6888
  query: queryParameters,
@@ -6927,7 +6928,7 @@ class DefaultApi extends BaseAPI {
6927
6928
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
6928
6929
  }
6929
6930
  const response = yield this.request({
6930
- path: `/call/{type}/{id}/mute_users`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
6931
+ path: `/video/call/{type}/{id}/mute_users`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
6931
6932
  method: 'POST',
6932
6933
  headers: headerParameters,
6933
6934
  query: queryParameters,
@@ -6971,7 +6972,7 @@ class DefaultApi extends BaseAPI {
6971
6972
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
6972
6973
  }
6973
6974
  const response = yield this.request({
6974
- path: `/calls`,
6975
+ path: `/video/calls`,
6975
6976
  method: 'POST',
6976
6977
  headers: headerParameters,
6977
6978
  query: queryParameters,
@@ -7012,7 +7013,7 @@ class DefaultApi extends BaseAPI {
7012
7013
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
7013
7014
  }
7014
7015
  const response = yield this.request({
7015
- path: `/call/members`,
7016
+ path: `/video/call/members`,
7016
7017
  method: 'POST',
7017
7018
  headers: headerParameters,
7018
7019
  query: queryParameters,
@@ -7059,7 +7060,7 @@ class DefaultApi extends BaseAPI {
7059
7060
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
7060
7061
  }
7061
7062
  const response = yield this.request({
7062
- path: `/call/{type}/{id}/event`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7063
+ path: `/video/call/{type}/{id}/event`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7063
7064
  method: 'POST',
7064
7065
  headers: headerParameters,
7065
7066
  query: queryParameters,
@@ -7102,7 +7103,7 @@ class DefaultApi extends BaseAPI {
7102
7103
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
7103
7104
  }
7104
7105
  const response = yield this.request({
7105
- path: `/call/{type}/{id}/start_broadcasting`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7106
+ path: `/video/call/{type}/{id}/start_broadcasting`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7106
7107
  method: 'POST',
7107
7108
  headers: headerParameters,
7108
7109
  query: queryParameters,
@@ -7132,8 +7133,12 @@ class DefaultApi extends BaseAPI {
7132
7133
  if (requestParameters.id === null || requestParameters.id === undefined) {
7133
7134
  throw new RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling startRecording.');
7134
7135
  }
7136
+ if (requestParameters.videoStartRecordingRequest === null || requestParameters.videoStartRecordingRequest === undefined) {
7137
+ throw new RequiredError('videoStartRecordingRequest', 'Required parameter requestParameters.videoStartRecordingRequest was null or undefined when calling startRecording.');
7138
+ }
7135
7139
  const queryParameters = {};
7136
7140
  const headerParameters = {};
7141
+ headerParameters['Content-Type'] = 'application/json';
7137
7142
  if (this.configuration && this.configuration.apiKey) {
7138
7143
  headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
7139
7144
  }
@@ -7144,10 +7149,11 @@ class DefaultApi extends BaseAPI {
7144
7149
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
7145
7150
  }
7146
7151
  const response = yield this.request({
7147
- path: `/call/{type}/{id}/start_recording`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7152
+ path: `/video/call/{type}/{id}/start_recording`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7148
7153
  method: 'POST',
7149
7154
  headers: headerParameters,
7150
7155
  query: queryParameters,
7156
+ body: requestParameters.videoStartRecordingRequest,
7151
7157
  }, initOverrides);
7152
7158
  return new JSONApiResponse(response);
7153
7159
  });
@@ -7186,7 +7192,7 @@ class DefaultApi extends BaseAPI {
7186
7192
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
7187
7193
  }
7188
7194
  const response = yield this.request({
7189
- path: `/call/{type}/{id}/start_transcription`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7195
+ path: `/video/call/{type}/{id}/start_transcription`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7190
7196
  method: 'POST',
7191
7197
  headers: headerParameters,
7192
7198
  query: queryParameters,
@@ -7228,7 +7234,7 @@ class DefaultApi extends BaseAPI {
7228
7234
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
7229
7235
  }
7230
7236
  const response = yield this.request({
7231
- path: `/call/{type}/{id}/stop_broadcasting`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7237
+ path: `/video/call/{type}/{id}/stop_broadcasting`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7232
7238
  method: 'POST',
7233
7239
  headers: headerParameters,
7234
7240
  query: queryParameters,
@@ -7270,7 +7276,7 @@ class DefaultApi extends BaseAPI {
7270
7276
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
7271
7277
  }
7272
7278
  const response = yield this.request({
7273
- path: `/call/{type}/{id}/stop_live`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7279
+ path: `/video/call/{type}/{id}/stop_live`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7274
7280
  method: 'POST',
7275
7281
  headers: headerParameters,
7276
7282
  query: queryParameters,
@@ -7312,7 +7318,7 @@ class DefaultApi extends BaseAPI {
7312
7318
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
7313
7319
  }
7314
7320
  const response = yield this.request({
7315
- path: `/call/{type}/{id}/stop_recording`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7321
+ path: `/video/call/{type}/{id}/stop_recording`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7316
7322
  method: 'POST',
7317
7323
  headers: headerParameters,
7318
7324
  query: queryParameters,
@@ -7354,7 +7360,7 @@ class DefaultApi extends BaseAPI {
7354
7360
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
7355
7361
  }
7356
7362
  const response = yield this.request({
7357
- path: `/call/{type}/{id}/stop_transcription`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7363
+ path: `/video/call/{type}/{id}/stop_transcription`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7358
7364
  method: 'POST',
7359
7365
  headers: headerParameters,
7360
7366
  query: queryParameters,
@@ -7400,7 +7406,7 @@ class DefaultApi extends BaseAPI {
7400
7406
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
7401
7407
  }
7402
7408
  const response = yield this.request({
7403
- path: `/call/{type}/{id}/unblock`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7409
+ path: `/video/call/{type}/{id}/unblock`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7404
7410
  method: 'POST',
7405
7411
  headers: headerParameters,
7406
7412
  query: queryParameters,
@@ -7447,7 +7453,7 @@ class DefaultApi extends BaseAPI {
7447
7453
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
7448
7454
  }
7449
7455
  const response = yield this.request({
7450
- path: `/call/{type}/{id}`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7456
+ path: `/video/call/{type}/{id}`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7451
7457
  method: 'PATCH',
7452
7458
  headers: headerParameters,
7453
7459
  query: queryParameters,
@@ -7494,7 +7500,7 @@ class DefaultApi extends BaseAPI {
7494
7500
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
7495
7501
  }
7496
7502
  const response = yield this.request({
7497
- path: `/call/{type}/{id}/members`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7503
+ path: `/video/call/{type}/{id}/members`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7498
7504
  method: 'POST',
7499
7505
  headers: headerParameters,
7500
7506
  query: queryParameters,
@@ -7541,7 +7547,7 @@ class DefaultApi extends BaseAPI {
7541
7547
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
7542
7548
  }
7543
7549
  const response = yield this.request({
7544
- path: `/call/{type}/{id}/user_permissions`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7550
+ path: `/video/call/{type}/{id}/user_permissions`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7545
7551
  method: 'POST',
7546
7552
  headers: headerParameters,
7547
7553
  query: queryParameters,
@@ -7628,7 +7634,7 @@ class DefaultApi extends BaseAPI {
7628
7634
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
7629
7635
  }
7630
7636
  const response = yield this.request({
7631
- path: `/call/{type}/{id}/pin`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7637
+ path: `/video/call/{type}/{id}/pin`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7632
7638
  method: 'POST',
7633
7639
  headers: headerParameters,
7634
7640
  query: queryParameters,
@@ -7675,7 +7681,7 @@ class DefaultApi extends BaseAPI {
7675
7681
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
7676
7682
  }
7677
7683
  const response = yield this.request({
7678
- path: `/call/{type}/{id}/unpin`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7684
+ path: `/video/call/{type}/{id}/unpin`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
7679
7685
  method: 'POST',
7680
7686
  headers: headerParameters,
7681
7687
  query: queryParameters,
@@ -7699,10 +7705,10 @@ class DefaultApi extends BaseAPI {
7699
7705
  /* tslint:disable */
7700
7706
  /* eslint-disable */
7701
7707
  /**
7702
- * Stream Video API
7708
+ * Stream API
7703
7709
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7704
7710
  *
7705
- * The version of the OpenAPI document: v92.7.0
7711
+ * The version of the OpenAPI document: v98.0.2-ingress-test.3
7706
7712
  *
7707
7713
  *
7708
7714
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -7713,6 +7719,45 @@ class DefaultApi extends BaseAPI {
7713
7719
  *
7714
7720
  */
7715
7721
  class ServerSideApi extends BaseAPI {
7722
+ /**
7723
+ *
7724
+ * Check External Storage
7725
+ */
7726
+ checkExternalStorageRaw(requestParameters, initOverrides) {
7727
+ return __awaiter(this, void 0, void 0, function* () {
7728
+ if (requestParameters.name === null || requestParameters.name === undefined) {
7729
+ throw new RequiredError('name', 'Required parameter requestParameters.name was null or undefined when calling checkExternalStorage.');
7730
+ }
7731
+ const queryParameters = {};
7732
+ const headerParameters = {};
7733
+ if (this.configuration && this.configuration.apiKey) {
7734
+ headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
7735
+ }
7736
+ if (this.configuration && this.configuration.apiKey) {
7737
+ queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
7738
+ }
7739
+ if (this.configuration && this.configuration.apiKey) {
7740
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
7741
+ }
7742
+ const response = yield this.request({
7743
+ path: `/video/external_storage/{name}/check`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
7744
+ method: 'GET',
7745
+ headers: headerParameters,
7746
+ query: queryParameters,
7747
+ }, initOverrides);
7748
+ return new JSONApiResponse(response);
7749
+ });
7750
+ }
7751
+ /**
7752
+ *
7753
+ * Check External Storage
7754
+ */
7755
+ checkExternalStorage(requestParameters, initOverrides) {
7756
+ return __awaiter(this, void 0, void 0, function* () {
7757
+ const response = yield this.checkExternalStorageRaw(requestParameters, initOverrides);
7758
+ return yield response.value();
7759
+ });
7760
+ }
7716
7761
  /**
7717
7762
  *
7718
7763
  * Create Call Type
@@ -7735,7 +7780,7 @@ class ServerSideApi extends BaseAPI {
7735
7780
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
7736
7781
  }
7737
7782
  const response = yield this.request({
7738
- path: `/calltypes`,
7783
+ path: `/video/calltypes`,
7739
7784
  method: 'POST',
7740
7785
  headers: headerParameters,
7741
7786
  query: queryParameters,
@@ -7775,7 +7820,7 @@ class ServerSideApi extends BaseAPI {
7775
7820
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
7776
7821
  }
7777
7822
  const response = yield this.request({
7778
- path: `/calltypes/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
7823
+ path: `/video/calltypes/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
7779
7824
  method: 'DELETE',
7780
7825
  headers: headerParameters,
7781
7826
  query: queryParameters,
@@ -7814,7 +7859,7 @@ class ServerSideApi extends BaseAPI {
7814
7859
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
7815
7860
  }
7816
7861
  const response = yield this.request({
7817
- path: `/calltypes/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
7862
+ path: `/video/calltypes/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
7818
7863
  method: 'GET',
7819
7864
  headers: headerParameters,
7820
7865
  query: queryParameters,
@@ -7850,7 +7895,7 @@ class ServerSideApi extends BaseAPI {
7850
7895
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
7851
7896
  }
7852
7897
  const response = yield this.request({
7853
- path: `/calltypes`,
7898
+ path: `/video/calltypes`,
7854
7899
  method: 'GET',
7855
7900
  headers: headerParameters,
7856
7901
  query: queryParameters,
@@ -7893,7 +7938,7 @@ class ServerSideApi extends BaseAPI {
7893
7938
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
7894
7939
  }
7895
7940
  const response = yield this.request({
7896
- path: `/calltypes/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
7941
+ path: `/video/calltypes/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
7897
7942
  method: 'PUT',
7898
7943
  headers: headerParameters,
7899
7944
  query: queryParameters,
@@ -7912,11 +7957,189 @@ class ServerSideApi extends BaseAPI {
7912
7957
  return yield response.value();
7913
7958
  });
7914
7959
  }
7960
+ /**
7961
+ *
7962
+ * Update External Storage
7963
+ */
7964
+ updateExternalStorageRaw(requestParameters, initOverrides) {
7965
+ return __awaiter(this, void 0, void 0, function* () {
7966
+ if (requestParameters.name === null || requestParameters.name === undefined) {
7967
+ throw new RequiredError('name', 'Required parameter requestParameters.name was null or undefined when calling updateExternalStorage.');
7968
+ }
7969
+ if (requestParameters.videoUpdateExternalStorageRequest === null || requestParameters.videoUpdateExternalStorageRequest === undefined) {
7970
+ throw new RequiredError('videoUpdateExternalStorageRequest', 'Required parameter requestParameters.videoUpdateExternalStorageRequest was null or undefined when calling updateExternalStorage.');
7971
+ }
7972
+ const queryParameters = {};
7973
+ const headerParameters = {};
7974
+ headerParameters['Content-Type'] = 'application/json';
7975
+ if (this.configuration && this.configuration.apiKey) {
7976
+ headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
7977
+ }
7978
+ if (this.configuration && this.configuration.apiKey) {
7979
+ queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
7980
+ }
7981
+ if (this.configuration && this.configuration.apiKey) {
7982
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
7983
+ }
7984
+ const response = yield this.request({
7985
+ path: `/video/external_storage/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
7986
+ method: 'PUT',
7987
+ headers: headerParameters,
7988
+ query: queryParameters,
7989
+ body: requestParameters.videoUpdateExternalStorageRequest,
7990
+ }, initOverrides);
7991
+ return new JSONApiResponse(response);
7992
+ });
7993
+ }
7994
+ /**
7995
+ *
7996
+ * Update External Storage
7997
+ */
7998
+ updateExternalStorage(requestParameters, initOverrides) {
7999
+ return __awaiter(this, void 0, void 0, function* () {
8000
+ const response = yield this.updateExternalStorageRaw(requestParameters, initOverrides);
8001
+ return yield response.value();
8002
+ });
8003
+ }
8004
+ }
8005
+
8006
+ /* tslint:disable */
8007
+ /* eslint-disable */
8008
+ /**
8009
+ * Stream API
8010
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
8011
+ *
8012
+ * The version of the OpenAPI document: v98.0.2-ingress-test.3
8013
+ *
8014
+ *
8015
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
8016
+ * https://openapi-generator.tech
8017
+ * Do not edit the class manually.
8018
+ */
8019
+ /**
8020
+ *
8021
+ */
8022
+ class SettingsApi extends BaseAPI {
8023
+ /**
8024
+ * Creates new external storage
8025
+ * Create external storage
8026
+ */
8027
+ createExternalStorageRaw(requestParameters, initOverrides) {
8028
+ return __awaiter(this, void 0, void 0, function* () {
8029
+ if (requestParameters.videoCreateExternalStorageRequest === null || requestParameters.videoCreateExternalStorageRequest === undefined) {
8030
+ throw new RequiredError('videoCreateExternalStorageRequest', 'Required parameter requestParameters.videoCreateExternalStorageRequest was null or undefined when calling createExternalStorage.');
8031
+ }
8032
+ const queryParameters = {};
8033
+ const headerParameters = {};
8034
+ headerParameters['Content-Type'] = 'application/json';
8035
+ if (this.configuration && this.configuration.apiKey) {
8036
+ headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
8037
+ }
8038
+ if (this.configuration && this.configuration.apiKey) {
8039
+ queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
8040
+ }
8041
+ if (this.configuration && this.configuration.apiKey) {
8042
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
8043
+ }
8044
+ const response = yield this.request({
8045
+ path: `/video/external_storage`,
8046
+ method: 'POST',
8047
+ headers: headerParameters,
8048
+ query: queryParameters,
8049
+ body: requestParameters.videoCreateExternalStorageRequest,
8050
+ }, initOverrides);
8051
+ return new JSONApiResponse(response);
8052
+ });
8053
+ }
8054
+ /**
8055
+ * Creates new external storage
8056
+ * Create external storage
8057
+ */
8058
+ createExternalStorage(requestParameters, initOverrides) {
8059
+ return __awaiter(this, void 0, void 0, function* () {
8060
+ const response = yield this.createExternalStorageRaw(requestParameters, initOverrides);
8061
+ return yield response.value();
8062
+ });
8063
+ }
8064
+ /**
8065
+ * Deletes external storage
8066
+ * Delete external storage
8067
+ */
8068
+ deleteExternalStorageRaw(requestParameters, initOverrides) {
8069
+ return __awaiter(this, void 0, void 0, function* () {
8070
+ if (requestParameters.name === null || requestParameters.name === undefined) {
8071
+ throw new RequiredError('name', 'Required parameter requestParameters.name was null or undefined when calling deleteExternalStorage.');
8072
+ }
8073
+ const queryParameters = {};
8074
+ const headerParameters = {};
8075
+ if (this.configuration && this.configuration.apiKey) {
8076
+ headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
8077
+ }
8078
+ if (this.configuration && this.configuration.apiKey) {
8079
+ queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
8080
+ }
8081
+ if (this.configuration && this.configuration.apiKey) {
8082
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
8083
+ }
8084
+ const response = yield this.request({
8085
+ path: `/video/external_storage/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))),
8086
+ method: 'DELETE',
8087
+ headers: headerParameters,
8088
+ query: queryParameters,
8089
+ }, initOverrides);
8090
+ return new JSONApiResponse(response);
8091
+ });
8092
+ }
8093
+ /**
8094
+ * Deletes external storage
8095
+ * Delete external storage
8096
+ */
8097
+ deleteExternalStorage(requestParameters, initOverrides) {
8098
+ return __awaiter(this, void 0, void 0, function* () {
8099
+ const response = yield this.deleteExternalStorageRaw(requestParameters, initOverrides);
8100
+ return yield response.value();
8101
+ });
8102
+ }
8103
+ /**
8104
+ * Lists external storage
8105
+ * List external storage
8106
+ */
8107
+ listExternalStorageRaw(initOverrides) {
8108
+ return __awaiter(this, void 0, void 0, function* () {
8109
+ const queryParameters = {};
8110
+ const headerParameters = {};
8111
+ if (this.configuration && this.configuration.apiKey) {
8112
+ headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
8113
+ }
8114
+ if (this.configuration && this.configuration.apiKey) {
8115
+ queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
8116
+ }
8117
+ if (this.configuration && this.configuration.apiKey) {
8118
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
8119
+ }
8120
+ const response = yield this.request({
8121
+ path: `/video/external_storage`,
8122
+ method: 'GET',
8123
+ headers: headerParameters,
8124
+ query: queryParameters,
8125
+ }, initOverrides);
8126
+ return new JSONApiResponse(response);
8127
+ });
8128
+ }
8129
+ /**
8130
+ * Lists external storage
8131
+ * List external storage
8132
+ */
8133
+ listExternalStorage(initOverrides) {
8134
+ return __awaiter(this, void 0, void 0, function* () {
8135
+ const response = yield this.listExternalStorageRaw(initOverrides);
8136
+ return yield response.value();
8137
+ });
8138
+ }
7915
8139
  }
7916
8140
 
7917
8141
  class StreamCall {
7918
8142
  constructor(streamClient, type, id) {
7919
- var _a;
7920
8143
  this.streamClient = streamClient;
7921
8144
  this.type = type;
7922
8145
  this.id = id;
@@ -7955,8 +8178,8 @@ class StreamCall {
7955
8178
  this.startHLSBroadcasting = () => {
7956
8179
  return this.apiClient.startHLSBroadcasting(Object.assign({}, this.baseRequest));
7957
8180
  };
7958
- this.startRecording = () => {
7959
- return this.apiClient.startRecording(Object.assign({}, this.baseRequest));
8181
+ this.startRecording = (request) => {
8182
+ return this.apiClient.startRecording(Object.assign(Object.assign({}, this.baseRequest), { videoStartRecordingRequest: request !== null && request !== void 0 ? request : {} }));
7960
8183
  };
7961
8184
  this.startTranscription = () => {
7962
8185
  return this.apiClient.startTranscription(Object.assign({}, this.baseRequest));
@@ -7992,16 +8215,13 @@ class StreamCall {
7992
8215
  return this.apiClient.videoUnpin(Object.assign({ videoUnpinRequest }, this.baseRequest));
7993
8216
  };
7994
8217
  this.baseRequest = { id: this.id, type: this.type };
7995
- const configuration = this.streamClient.getConfiguration({
7996
- basePath: (_a = this.streamClient.options.basePath) !== null && _a !== void 0 ? _a : 'https://video.stream-io-api.com/video',
7997
- });
8218
+ const configuration = this.streamClient.getConfiguration('video');
7998
8219
  this.apiClient = new DefaultApi(configuration);
7999
8220
  }
8000
8221
  }
8001
8222
 
8002
8223
  class StreamVideoClient {
8003
8224
  constructor(streamClient) {
8004
- var _a;
8005
8225
  this.streamClient = streamClient;
8006
8226
  this.call = (type, id) => {
8007
8227
  return new StreamCall(this.streamClient, type, id);
@@ -8031,10 +8251,29 @@ class StreamVideoClient {
8031
8251
  videoUpdateCallTypeRequest,
8032
8252
  });
8033
8253
  };
8034
- const configuration = this.streamClient.getConfiguration({
8035
- basePath: (_a = this.streamClient.options.basePath) !== null && _a !== void 0 ? _a : 'https://video.stream-io-api.com/video',
8036
- });
8254
+ this.listExternalStorages = () => {
8255
+ return this.settingsApi.listExternalStorage();
8256
+ };
8257
+ this.createExternalStorage = (videoCreateExternalStorageRequest) => {
8258
+ return this.settingsApi.createExternalStorage({
8259
+ videoCreateExternalStorageRequest,
8260
+ });
8261
+ };
8262
+ this.deleteExternalStorage = (request) => {
8263
+ return this.settingsApi.deleteExternalStorage(request);
8264
+ };
8265
+ this.updateExternalStorage = (name, videoUpdateExternalStorageRequest) => {
8266
+ return this.videoServerSideApiClient.updateExternalStorage({
8267
+ name,
8268
+ videoUpdateExternalStorageRequest,
8269
+ });
8270
+ };
8271
+ this.checkExternalStorage = (request) => {
8272
+ return this.videoServerSideApiClient.checkExternalStorage(request);
8273
+ };
8274
+ const configuration = this.streamClient.getConfiguration('video');
8037
8275
  this.apiClient = new DefaultApi(configuration);
8276
+ this.settingsApi = new SettingsApi(configuration);
8038
8277
  this.videoServerSideApiClient = new ServerSideApi(configuration);
8039
8278
  }
8040
8279
  }
@@ -8160,7 +8399,7 @@ class StreamClient {
8160
8399
  this.queryUsers = (payload) => __awaiter(this, void 0, void 0, function* () {
8161
8400
  payload.user = this.mapCustomDataBeforeSend(payload.user);
8162
8401
  const response = yield this.usersApi.queryUsers({ payload });
8163
- // @ts-expect-error typing problem
8402
+ /** @ts-expect-error */
8164
8403
  response.users = response.users.map((u) => this.mapCustomDataAfterReceive(u));
8165
8404
  return response;
8166
8405
  });
@@ -8200,7 +8439,7 @@ class StreamClient {
8200
8439
  });
8201
8440
  this.updateUsersPartial = (request) => __awaiter(this, void 0, void 0, function* () {
8202
8441
  const response = yield this.usersApi.updateUsersPartial({
8203
- // @ts-expect-error typing error
8442
+ /** @ts-expect-error */
8204
8443
  updateUserPartialRequest: request,
8205
8444
  });
8206
8445
  Object.keys(response.users).forEach((key) => {
@@ -8259,7 +8498,20 @@ class StreamClient {
8259
8498
  this.getTaskStatus = (request) => {
8260
8499
  return this.tasksApi.getTask(request);
8261
8500
  };
8262
- this.getConfiguration = (options) => {
8501
+ this.verifyWebhook = (requestBody, xSignature) => {
8502
+ const key = Buffer.from(this.secret, 'utf8');
8503
+ const hash = crypto
8504
+ .createHmac('sha256', key)
8505
+ .update(requestBody)
8506
+ .digest('hex');
8507
+ try {
8508
+ return crypto.timingSafeEqual(Buffer.from(hash), Buffer.from(xSignature));
8509
+ }
8510
+ catch (err) {
8511
+ return false;
8512
+ }
8513
+ };
8514
+ this.getConfiguration = (product = 'chat') => {
8263
8515
  var _a;
8264
8516
  return new Configuration({
8265
8517
  apiKey: (name) => {
@@ -8270,9 +8522,11 @@ class StreamClient {
8270
8522
  };
8271
8523
  return mapping[name];
8272
8524
  },
8273
- basePath: (_a = options === null || options === void 0 ? void 0 : options.basePath) !== null && _a !== void 0 ? _a : this.options.basePath,
8525
+ basePath: (_a = this.options.basePath) !== null && _a !== void 0 ? _a : (product === 'chat'
8526
+ ? 'https://chat.stream-io-api.com'
8527
+ : 'https://video.stream-io-api.com'),
8274
8528
  headers: {
8275
- 'X-Stream-Client': 'stream-node-' + "0.1.9",
8529
+ 'X-Stream-Client': 'stream-node-' + "0.1.11",
8276
8530
  },
8277
8531
  middleware: [
8278
8532
  {
@@ -8366,23 +8620,23 @@ class StreamClient {
8366
8620
  this.options.timeout = (_a = config === null || config === void 0 ? void 0 : config.timeout) !== null && _a !== void 0 ? _a : StreamClient.DEFAULT_TIMEOUT;
8367
8621
  }
8368
8622
  const chatConfiguration = this.getConfiguration();
8369
- // @ts-expect-error typing problem
8623
+ /** @ts-expect-error */
8370
8624
  this.usersApi = new UsersApi(chatConfiguration);
8371
- // @ts-expect-error typing problem
8625
+ /** @ts-expect-error */
8372
8626
  this.devicesApi = new DevicesApi(chatConfiguration);
8373
- // @ts-expect-error typing problem
8627
+ /** @ts-expect-error */
8374
8628
  this.pushApi = new PushApi(chatConfiguration);
8375
- // @ts-expect-error typing problem
8629
+ /** @ts-expect-error */
8376
8630
  this.serversideApi = new ServerSideApi$1(chatConfiguration);
8377
- // @ts-expect-error typing problem
8631
+ /** @ts-expect-error */
8378
8632
  this.testingApi = new TestingApi(chatConfiguration);
8379
- // @ts-expect-error typing problem
8633
+ /** @ts-expect-error */
8380
8634
  this.permissionsApi = new PermissionsV2Api(chatConfiguration);
8381
- // @ts-expect-error typing problem
8382
- this.settingsApi = new SettingsApi(chatConfiguration);
8383
- // @ts-expect-error typing problem
8635
+ /** @ts-expect-error */
8636
+ this.settingsApi = new SettingsApi$1(chatConfiguration);
8637
+ /** @ts-expect-error */
8384
8638
  this.eventsApi = new EventsApi(chatConfiguration);
8385
- // @ts-expect-error typing problem
8639
+ /** @ts-expect-error */
8386
8640
  this.tasksApi = new TasksApi(chatConfiguration);
8387
8641
  }
8388
8642
  /**
@@ -8430,7 +8684,7 @@ class StreamClient {
8430
8684
  if (!user) {
8431
8685
  return undefined;
8432
8686
  }
8433
- // @ts-expect-error typing problem
8687
+ /** @ts-expect-error */
8434
8688
  const result = {};
8435
8689
  Object.keys(user).forEach((key) => {
8436
8690
  if (!this.reservedKeywords.includes(key)) {