@twilio/mcs-client 0.6.5 → 0.6.6-rc.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.
package/builds/lib.d.ts CHANGED
@@ -104,6 +104,17 @@ declare class Network {
104
104
  post(url: string, category: MediaCategory | null, media: string | Buffer | Blob | FormData | Record<string, unknown>, contentType?: string, filename?: string): CancellablePromise<any>;
105
105
  }
106
106
  type MediaCategory = "media" | "body" | "history";
107
+ /**
108
+ * @internal
109
+ * A subset of MediaRecord for Conversation-specific purposes.
110
+ */
111
+ interface MediaState {
112
+ sid: string;
113
+ category: MediaCategory;
114
+ filename: string | null;
115
+ contentType: string;
116
+ size: number;
117
+ }
107
118
  interface Links {
108
119
  content: string;
109
120
  content_direct_temporary?: string;
@@ -161,6 +172,11 @@ declare class Media {
161
172
  */
162
173
  getContentUrl(): CancellablePromise<string | null>;
163
174
  private _update;
175
+ /**
176
+ * @internal
177
+ * This payload is compatible with Conversations' media object _state().
178
+ */
179
+ _state(): MediaState;
164
180
  }
165
181
  interface Options$0 {
166
182
  region?: string;
@@ -230,4 +246,4 @@ declare class Client {
230
246
  */
231
247
  mediaSetGetContentUrls(mediaSids: string[]): CancellablePromise<Map<string, string>>;
232
248
  }
233
- export { CancellablePromise, Client, Client as McsClient, Client as default, Media, Media as McsMedia, MediaCategory, MediaCategory as McsMediaCategory };
249
+ export { CancellablePromise, Client, Client as McsClient, Client as default, Media, Media as McsMedia, MediaCategory, MediaCategory as McsMediaCategory, MediaState, MediaState as McsMediaState };
package/builds/lib.js CHANGED
@@ -680,6 +680,24 @@ var Media = /*#__PURE__*/function () {
680
680
  isMultipartUpstream: (_data$is_multipart_up = data.is_multipart_upstream) !== null && _data$is_multipart_up !== void 0 ? _data$is_multipart_up : false
681
681
  };
682
682
  }
683
+ /**
684
+ * @internal
685
+ * This payload is compatible with Conversations' media object _state().
686
+ */
687
+
688
+ }, {
689
+ key: "_state",
690
+ value: function _state() {
691
+ var _this$state$filename;
692
+
693
+ return {
694
+ sid: this.state.sid,
695
+ category: this.state.category,
696
+ filename: (_this$state$filename = this.state.filename) !== null && _this$state$filename !== void 0 ? _this$state$filename : null,
697
+ contentType: this.state.contentType,
698
+ size: this.state.size
699
+ };
700
+ }
683
701
  }]);
684
702
 
685
703
  return Media;
@@ -1086,7 +1104,7 @@ var Network = /*#__PURE__*/function () {
1086
1104
  return Network;
1087
1105
  }();
1088
1106
 
1089
- var version = "0.6.5";
1107
+ var version = "0.6.6-rc.1";
1090
1108
 
1091
1109
  var _class;
1092
1110
  var log = Logger.scope("");