@stream-io/node-sdk 0.1.10 → 0.1.12

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.cjs.js CHANGED
@@ -6031,11 +6031,11 @@ class StreamChannel {
6031
6031
  return this.eventsApi.sendEvent(Object.assign(Object.assign({}, this.baseRequest), { sendEventRequest: { event } }));
6032
6032
  };
6033
6033
  const configuration = this.streamClient.getConfiguration();
6034
- // @ts-expect-error typing problem
6034
+ /** @ts-expect-error */
6035
6035
  this.channelsApi = new ChannelsApi(configuration);
6036
- // @ts-expect-error typing problem
6036
+ /** @ts-expect-error */
6037
6037
  this.messagesApi = new MessagesApi(configuration);
6038
- // @ts-expect-error typing problem
6038
+ /** @ts-expect-error */
6039
6039
  this.eventsApi = new EventsApi(configuration);
6040
6040
  }
6041
6041
  get cid() {
@@ -6123,13 +6123,13 @@ class StreamChatClient {
6123
6123
  return this.commandsApi.deleteCommand(request);
6124
6124
  };
6125
6125
  const configuration = this.streamClient.getConfiguration();
6126
- // @ts-expect-error typing problem
6126
+ /** @ts-expect-error */
6127
6127
  this.settingsApi = new SettingsApi$1(configuration);
6128
- // @ts-expect-error typing problem
6128
+ /** @ts-expect-error */
6129
6129
  this.channelTypesApi = new ChannelTypesApi(configuration);
6130
- // @ts-expect-error typing problem
6130
+ /** @ts-expect-error */
6131
6131
  this.channelsApi = new ChannelsApi(configuration);
6132
- // @ts-expect-error typing problem
6132
+ /** @ts-expect-error */
6133
6133
  this.commandsApi = new CustomCommandsApi(configuration);
6134
6134
  }
6135
6135
  }
@@ -6140,7 +6140,7 @@ class StreamChatClient {
6140
6140
  * Stream API
6141
6141
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6142
6142
  *
6143
- * The version of the OpenAPI document: v98.0.2-ingress-test.3
6143
+ * The version of the OpenAPI document: v100.4.3
6144
6144
  *
6145
6145
  *
6146
6146
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -6410,7 +6410,7 @@ class VoidApiResponse {
6410
6410
  * Stream API
6411
6411
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6412
6412
  *
6413
- * The version of the OpenAPI document: v98.0.2-ingress-test.3
6413
+ * The version of the OpenAPI document: v100.4.3
6414
6414
  *
6415
6415
  *
6416
6416
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -6902,6 +6902,48 @@ class DefaultApi extends BaseAPI {
6902
6902
  return yield response.value();
6903
6903
  });
6904
6904
  }
6905
+ /**
6906
+ * Lists transcriptions Required permissions: - ListTranscriptions
6907
+ * List transcriptions
6908
+ */
6909
+ listTranscriptionsRaw(requestParameters, initOverrides) {
6910
+ return __awaiter(this, void 0, void 0, function* () {
6911
+ if (requestParameters.type === null || requestParameters.type === undefined) {
6912
+ throw new RequiredError('type', 'Required parameter requestParameters.type was null or undefined when calling listTranscriptions.');
6913
+ }
6914
+ if (requestParameters.id === null || requestParameters.id === undefined) {
6915
+ throw new RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling listTranscriptions.');
6916
+ }
6917
+ const queryParameters = {};
6918
+ const headerParameters = {};
6919
+ if (this.configuration && this.configuration.apiKey) {
6920
+ headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
6921
+ }
6922
+ if (this.configuration && this.configuration.apiKey) {
6923
+ queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
6924
+ }
6925
+ if (this.configuration && this.configuration.apiKey) {
6926
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
6927
+ }
6928
+ const response = yield this.request({
6929
+ path: `/video/call/{type}/{id}/transcriptions`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
6930
+ method: 'GET',
6931
+ headers: headerParameters,
6932
+ query: queryParameters,
6933
+ }, initOverrides);
6934
+ return new JSONApiResponse(response);
6935
+ });
6936
+ }
6937
+ /**
6938
+ * Lists transcriptions Required permissions: - ListTranscriptions
6939
+ * List transcriptions
6940
+ */
6941
+ listTranscriptions(requestParameters, initOverrides) {
6942
+ return __awaiter(this, void 0, void 0, function* () {
6943
+ const response = yield this.listTranscriptionsRaw(requestParameters, initOverrides);
6944
+ return yield response.value();
6945
+ });
6946
+ }
6905
6947
  /**
6906
6948
  * Mutes users in a call Required permissions: - MuteUsers
6907
6949
  * Mute users
@@ -7124,7 +7166,7 @@ class DefaultApi extends BaseAPI {
7124
7166
  });
7125
7167
  }
7126
7168
  /**
7127
- * Starts recording Sends events: - call.recording_started Required permissions: - StopRecording
7169
+ * Starts recording Sends events: - call.recording_started Required permissions: - StartRecording
7128
7170
  * Start recording
7129
7171
  */
7130
7172
  startRecordingRaw(requestParameters, initOverrides) {
@@ -7161,7 +7203,7 @@ class DefaultApi extends BaseAPI {
7161
7203
  });
7162
7204
  }
7163
7205
  /**
7164
- * Starts recording Sends events: - call.recording_started Required permissions: - StopRecording
7206
+ * Starts recording Sends events: - call.recording_started Required permissions: - StartRecording
7165
7207
  * Start recording
7166
7208
  */
7167
7209
  startRecording(requestParameters, initOverrides) {
@@ -7182,8 +7224,12 @@ class DefaultApi extends BaseAPI {
7182
7224
  if (requestParameters.id === null || requestParameters.id === undefined) {
7183
7225
  throw new RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling startTranscription.');
7184
7226
  }
7227
+ if (requestParameters.videoStartTranscriptionRequest === null || requestParameters.videoStartTranscriptionRequest === undefined) {
7228
+ throw new RequiredError('videoStartTranscriptionRequest', 'Required parameter requestParameters.videoStartTranscriptionRequest was null or undefined when calling startTranscription.');
7229
+ }
7185
7230
  const queryParameters = {};
7186
7231
  const headerParameters = {};
7232
+ headerParameters['Content-Type'] = 'application/json';
7187
7233
  if (this.configuration && this.configuration.apiKey) {
7188
7234
  headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
7189
7235
  }
@@ -7198,6 +7244,7 @@ class DefaultApi extends BaseAPI {
7198
7244
  method: 'POST',
7199
7245
  headers: headerParameters,
7200
7246
  query: queryParameters,
7247
+ body: requestParameters.videoStartTranscriptionRequest,
7201
7248
  }, initOverrides);
7202
7249
  return new JSONApiResponse(response);
7203
7250
  });
@@ -7339,7 +7386,7 @@ class DefaultApi extends BaseAPI {
7339
7386
  });
7340
7387
  }
7341
7388
  /**
7342
- * Stops transcription Required permissions: - StopTranscription
7389
+ * Stops transcription Sends events: - call.transcription_stopped Required permissions: - StopTranscription
7343
7390
  * Stop transcription
7344
7391
  */
7345
7392
  stopTranscriptionRaw(requestParameters, initOverrides) {
@@ -7371,7 +7418,7 @@ class DefaultApi extends BaseAPI {
7371
7418
  });
7372
7419
  }
7373
7420
  /**
7374
- * Stops transcription Required permissions: - StopTranscription
7421
+ * Stops transcription Sends events: - call.transcription_stopped Required permissions: - StopTranscription
7375
7422
  * Stop transcription
7376
7423
  */
7377
7424
  stopTranscription(requestParameters, initOverrides) {
@@ -7710,7 +7757,7 @@ class DefaultApi extends BaseAPI {
7710
7757
  * Stream API
7711
7758
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7712
7759
  *
7713
- * The version of the OpenAPI document: v98.0.2-ingress-test.3
7760
+ * The version of the OpenAPI document: v100.4.3
7714
7761
  *
7715
7762
  *
7716
7763
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -8011,7 +8058,7 @@ class ServerSideApi extends BaseAPI {
8011
8058
  * Stream API
8012
8059
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
8013
8060
  *
8014
- * The version of the OpenAPI document: v98.0.2-ingress-test.3
8061
+ * The version of the OpenAPI document: v100.4.3
8015
8062
  *
8016
8063
  *
8017
8064
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -8183,8 +8230,8 @@ class StreamCall {
8183
8230
  this.startRecording = (request) => {
8184
8231
  return this.apiClient.startRecording(Object.assign(Object.assign({}, this.baseRequest), { videoStartRecordingRequest: request !== null && request !== void 0 ? request : {} }));
8185
8232
  };
8186
- this.startTranscription = () => {
8187
- return this.apiClient.startTranscription(Object.assign({}, this.baseRequest));
8233
+ this.startTranscription = (videoStartTranscriptionRequest = {}) => {
8234
+ return this.apiClient.startTranscription(Object.assign(Object.assign({}, this.baseRequest), { videoStartTranscriptionRequest }));
8188
8235
  };
8189
8236
  this.stopHLSBroadcasting = () => {
8190
8237
  return this.apiClient.stopHLSBroadcasting(Object.assign({}, this.baseRequest));
@@ -8401,7 +8448,7 @@ class StreamClient {
8401
8448
  this.queryUsers = (payload) => __awaiter(this, void 0, void 0, function* () {
8402
8449
  payload.user = this.mapCustomDataBeforeSend(payload.user);
8403
8450
  const response = yield this.usersApi.queryUsers({ payload });
8404
- // @ts-expect-error typing problem
8451
+ /** @ts-expect-error */
8405
8452
  response.users = response.users.map((u) => this.mapCustomDataAfterReceive(u));
8406
8453
  return response;
8407
8454
  });
@@ -8441,7 +8488,7 @@ class StreamClient {
8441
8488
  });
8442
8489
  this.updateUsersPartial = (request) => __awaiter(this, void 0, void 0, function* () {
8443
8490
  const response = yield this.usersApi.updateUsersPartial({
8444
- // @ts-expect-error typing error
8491
+ /** @ts-expect-error */
8445
8492
  updateUserPartialRequest: request,
8446
8493
  });
8447
8494
  Object.keys(response.users).forEach((key) => {
@@ -8528,7 +8575,7 @@ class StreamClient {
8528
8575
  ? 'https://chat.stream-io-api.com'
8529
8576
  : 'https://video.stream-io-api.com'),
8530
8577
  headers: {
8531
- 'X-Stream-Client': 'stream-node-' + "0.1.10",
8578
+ 'X-Stream-Client': 'stream-node-' + "0.1.12",
8532
8579
  },
8533
8580
  middleware: [
8534
8581
  {
@@ -8612,33 +8659,36 @@ class StreamClient {
8612
8659
  return Object.assign(Object.assign({}, copy), user.custom);
8613
8660
  };
8614
8661
  this.token = JWTServerToken(this.secret);
8615
- this.video = new StreamVideoClient(this);
8616
- this.chat = new StreamChatClient(this);
8617
8662
  if (typeof config === 'string') {
8618
8663
  this.options.basePath = config;
8619
8664
  this.options.timeout = StreamClient.DEFAULT_TIMEOUT;
8620
8665
  }
8621
8666
  else {
8667
+ if (config) {
8668
+ this.options = config;
8669
+ }
8622
8670
  this.options.timeout = (_a = config === null || config === void 0 ? void 0 : config.timeout) !== null && _a !== void 0 ? _a : StreamClient.DEFAULT_TIMEOUT;
8623
8671
  }
8672
+ this.video = new StreamVideoClient(this);
8673
+ this.chat = new StreamChatClient(this);
8624
8674
  const chatConfiguration = this.getConfiguration();
8625
- // @ts-expect-error typing problem
8675
+ /** @ts-expect-error */
8626
8676
  this.usersApi = new UsersApi(chatConfiguration);
8627
- // @ts-expect-error typing problem
8677
+ /** @ts-expect-error */
8628
8678
  this.devicesApi = new DevicesApi(chatConfiguration);
8629
- // @ts-expect-error typing problem
8679
+ /** @ts-expect-error */
8630
8680
  this.pushApi = new PushApi(chatConfiguration);
8631
- // @ts-expect-error typing problem
8681
+ /** @ts-expect-error */
8632
8682
  this.serversideApi = new ServerSideApi$1(chatConfiguration);
8633
- // @ts-expect-error typing problem
8683
+ /** @ts-expect-error */
8634
8684
  this.testingApi = new TestingApi(chatConfiguration);
8635
- // @ts-expect-error typing problem
8685
+ /** @ts-expect-error */
8636
8686
  this.permissionsApi = new PermissionsV2Api(chatConfiguration);
8637
- // @ts-expect-error typing problem
8687
+ /** @ts-expect-error */
8638
8688
  this.settingsApi = new SettingsApi$1(chatConfiguration);
8639
- // @ts-expect-error typing problem
8689
+ /** @ts-expect-error */
8640
8690
  this.eventsApi = new EventsApi(chatConfiguration);
8641
- // @ts-expect-error typing problem
8691
+ /** @ts-expect-error */
8642
8692
  this.tasksApi = new TasksApi(chatConfiguration);
8643
8693
  }
8644
8694
  /**
@@ -8686,7 +8736,7 @@ class StreamClient {
8686
8736
  if (!user) {
8687
8737
  return undefined;
8688
8738
  }
8689
- // @ts-expect-error typing problem
8739
+ /** @ts-expect-error */
8690
8740
  const result = {};
8691
8741
  Object.keys(user).forEach((key) => {
8692
8742
  if (!this.reservedKeywords.includes(key)) {