@twilio/mcs-client 0.6.0-canary.18 → 0.6.0-rc.3
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/CHANGELOG.md
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
## [0.6.0-rc.3](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/mcs-client@0.6.0-rc.2...@twilio/mcs-client@0.6.0-rc.3) (2022-05-02)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @twilio/mcs-client
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.6.0-rc.2](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/mcs-client@0.6.0-rc.1...@twilio/mcs-client@0.6.0-rc.2) (2022-05-02)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* Fix faulty type definitions by upgrading tooling ([b6d25ce](https://github.com/twilio/rtd-sdk-monorepo-js/commit/b6d25cecb08ab4e0d369430b90a786e1b275af91))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## [0.6.0-rc.1](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/mcs-client@0.6.0-rc.0...@twilio/mcs-client@0.6.0-rc.1) (2022-03-16)
|
|
24
|
+
|
|
25
|
+
**Note:** Version bump only for package @twilio/mcs-client
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### [0.5.3](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/mcs-client@0.5.3-rc.0...@twilio/mcs-client@0.5.3) (2022-03-03)
|
|
32
|
+
|
|
33
|
+
**Note:** Version bump only for package @twilio/mcs-client
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### [0.5.3-rc.0](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/mcs-client@0.5.2...@twilio/mcs-client@0.5.3-rc.0) (2022-01-28)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Bug Fixes
|
|
43
|
+
|
|
44
|
+
* Fix media SID attachment ([e260ea7](https://github.com/twilio/rtd-sdk-monorepo-js/commit/e260ea7963328450043cbd4ade76cb9f230e1240))
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### [0.5.2](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/mcs-client@0.5.2-rc.4...@twilio/mcs-client@0.5.2) (2021-11-25)
|
|
49
|
+
|
|
50
|
+
**Note:** Version bump only for package @twilio/mcs-client
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### [0.5.2-rc.4](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/mcs-client@0.5.2-rc.3...@twilio/mcs-client@0.5.2-rc.4) (2021-11-12)
|
|
57
|
+
|
|
58
|
+
**Note:** Version bump only for package @twilio/mcs-client
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
### [0.5.2-rc.3](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/mcs-client@0.5.2-rc.2...@twilio/mcs-client@0.5.2-rc.3) (2021-11-11)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
### Bug Fixes
|
|
68
|
+
|
|
69
|
+
* Remove the post-install script in favour of the "react-native" option ([0fe352d](https://github.com/twilio/rtd-sdk-monorepo-js/commit/0fe352d45e50cec78e880affee589009055d5338))
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
### [0.5.2-rc.2](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/mcs-client@0.5.2-rc.1...@twilio/mcs-client@0.5.2-rc.2) (2021-11-10)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
### Bug Fixes
|
|
77
|
+
|
|
78
|
+
* Fix the post-install script (yet again) ([c8cb1ee](https://github.com/twilio/rtd-sdk-monorepo-js/commit/c8cb1ee501d1c793497985592d2c1ae97162a219))
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
### [0.5.2-rc.1](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/mcs-client@0.5.2-rc.0...@twilio/mcs-client@0.5.2-rc.1) (2021-11-09)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### Bug Fixes
|
|
86
|
+
|
|
87
|
+
* Fix the post-install script to be runnable cross-platform ([a16eede](https://github.com/twilio/rtd-sdk-monorepo-js/commit/a16eede598dd3dbdda1997fbd2033fa2254f113f))
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
### [0.5.2-rc.0](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/mcs-client@0.5.1...@twilio/mcs-client@0.5.2-rc.0) (2021-10-26)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
### Bug Fixes
|
|
95
|
+
|
|
96
|
+
* Bump Node required version to current LTS (14) ([ee272b3](https://github.com/twilio/rtd-sdk-monorepo-js/commit/ee272b350f4556a454a18a8aa192c37b54aaaeeb))
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
### [0.5.1](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/mcs-client@0.5.1-rc.12...@twilio/mcs-client@0.5.1) (2021-10-19)
|
|
101
|
+
|
|
102
|
+
**Note:** Version bump only for package @twilio/mcs-client
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
### [0.5.1-rc.12](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/mcs-client@0.5.1-rc.11...@twilio/mcs-client@0.5.1-rc.12) (2021-09-23)
|
|
109
|
+
|
|
110
|
+
**Note:** Version bump only for package @twilio/mcs-client
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
### [0.5.1-rc.11](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/mcs-client@0.5.1-rc.10...@twilio/mcs-client@0.5.1-rc.11) (2021-09-12)
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
### Bug Fixes
|
|
120
|
+
|
|
121
|
+
* Fix the removal of node-js libs from React Native bundles ([317a19a](https://github.com/twilio/rtd-sdk-monorepo-js/commit/317a19a013e3fe51b67864efab75459dafb312a8))
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
### [0.5.1-rc.10](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/mcs-client@0.5.1-rc.9...@twilio/mcs-client@0.5.1-rc.10) (2021-09-12)
|
|
126
|
+
|
|
127
|
+
**Note:** Version bump only for package @twilio/mcs-client
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
### [0.5.1-rc.9](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/mcs-client@0.5.1-rc.8...@twilio/mcs-client@0.5.1-rc.9) (2021-09-12)
|
|
134
|
+
|
|
135
|
+
**Note:** Version bump only for package @twilio/mcs-client
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
### [0.5.1-rc.8](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/mcs-client@0.5.1-rc.7...@twilio/mcs-client@0.5.1-rc.8) (2021-09-12)
|
|
142
|
+
|
|
143
|
+
**Note:** Version bump only for package @twilio/mcs-client
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
### [0.5.1-rc.7](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/mcs-client@0.5.1-rc.6...@twilio/mcs-client@0.5.1-rc.7) (2021-09-12)
|
|
150
|
+
|
|
151
|
+
**Note:** Version bump only for package @twilio/mcs-client
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
### [0.5.1-rc.6](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/mcs-client@0.5.1-rc.4...@twilio/mcs-client@0.5.1-rc.6) (2021-09-12)
|
|
158
|
+
|
|
159
|
+
**Note:** Version bump only for package @twilio/mcs-client
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
### [0.5.1-rc.5](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/mcs-client@0.5.1-rc.4...@twilio/mcs-client@0.5.1-rc.5) (2021-09-12)
|
|
166
|
+
|
|
167
|
+
**Note:** Version bump only for package @twilio/mcs-client
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
### [0.5.1-rc.4](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/mcs-client@0.5.1-rc.3...@twilio/mcs-client@0.5.1-rc.4) (2021-09-10)
|
|
174
|
+
|
|
175
|
+
**Note:** Version bump only for package @twilio/mcs-client
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
### [0.5.1-rc.3](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/mcs-client@0.5.1-rc.2...@twilio/mcs-client@0.5.1-rc.3) (2021-09-10)
|
|
182
|
+
|
|
183
|
+
**Note:** Version bump only for package @twilio/mcs-client
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
### [0.5.1-rc.2](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/mcs-client@0.5.1-rc.1...@twilio/mcs-client@0.5.1-rc.2) (2021-09-09)
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
### Bug Fixes
|
|
193
|
+
|
|
194
|
+
* Remove require('xmlhttprequest') from browser bundles ([0399152](https://github.com/twilio/rtd-sdk-monorepo-js/commit/03991522ec0abc8b2e456673aa4256a96af0f6b7))
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
### [0.5.1-rc.1](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/mcs-client@0.5.1-rc.0...@twilio/mcs-client@0.5.1-rc.1) (2021-09-09)
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
### Bug Fixes
|
|
202
|
+
|
|
203
|
+
* Add a browser shim for Node's global ([0de6b0e](https://github.com/twilio/rtd-sdk-monorepo-js/commit/0de6b0e5bab1270f894ba2c5cd00476f61dab498))
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
### [0.5.1-rc.0](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/mcs-client@0.5.0...@twilio/mcs-client@0.5.1-rc.0) (2021-09-07)
|
|
208
|
+
|
|
209
|
+
**Note:** Version bump only for package @twilio/mcs-client
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
## [0.5.0](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/mcs-client@0.5.0-rc.1...@twilio/mcs-client@0.5.0) (2021-08-04)
|
|
216
|
+
|
|
217
|
+
**Note:** Version bump only for package @twilio/mcs-client
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
## 0.5.0-rc.1 (2021-08-03)
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
### Bug Fixes
|
|
227
|
+
|
|
228
|
+
* Fix rollup config paths ([ec3f6f3](https://github.com/twilio/rtd-sdk-monorepo-js/commit/ec3f6f362d85eedb94d2ad8330ce66d14175d8e4))
|
|
229
|
+
* Update packages versions ([812ec45](https://github.com/twilio/rtd-sdk-monorepo-js/commit/812ec45459d680ca1d0bdccdbae0bfaf4b6639cc))
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
## 0.5.0-rc.0 (2021-07-30)
|
|
234
|
+
|
|
235
|
+
**Note:** Version bump only for package @twilio/mcs-client
|
package/builds/browser.js
CHANGED
package/builds/lib.js
CHANGED
|
@@ -45,4 +45,4 @@ this.Twilio=this.Twilio||{},this.Twilio.McsClient=function(t){"use strict";var e
|
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
*/
|
|
48
|
-
Object.defineProperty(ly,"__esModule",{value:!0});var Rb=hm.exports,Ib=Cm.exports,Pb=gv.exports,Db=yv.exports,Cb=bv.exports,Mb=xv.exports,Nb=kv.exports;function Ub(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var Fb=Ub(Sv.exports),Bb=Ub(Rb),qb=Ub(Ib),Gb=Ub(Pb),Wb=Ub(Db),zb=Ub(Cb),$b=Ub(Mb),Vb=Ub(Nb),Hb=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return{checks:e}};function Yb(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return Jb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Jb(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Jb(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Kb=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Hb((function(t){var r,n=!1,o=[],i=Yb(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;"string"!=typeof a?(n=n||t instanceof a,o.push("an instance of ".concat(a.name))):(n=n||Fb.default(t)===a,o.push("of type ".concat(a)))}}catch(t){i.e(t)}finally{i.f()}return[n,o]}))};function Xb(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return Zb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Zb(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Zb(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Qb(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Vb.default(t);if(e){var o=Vb.default(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return $b.default(this,r)}}function tw(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return ew(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ew(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function ew(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var rw=function(t,e){if(e.length>t.length)throw new Error("Expected at most ".concat(t.length," argument(s), but got ").concat(e.length));for(;e.length<t.length;)e.push(void 0);var r,n=tw(e.entries());try{for(n.s();!(r=n.n()).done;){var o=Bb.default(r.value,2),i=o[0],a=o[1],u=aw(t[i],a),c=Bb.default(u,4),s=c[0],f=c[1],l=c[2],p=c[3];if(!s)throw new Error("Argument ".concat(i+1," is expected to be ").concat(l).concat(p," but got ").concat(f))}}catch(t){n.e(t)}finally{n.f()}},nw=function(t){var e,r,n;(["undefined","boolean","number","bigint","string"].includes(Fb.default(t))&&(r="string"==typeof t?'"'.concat(t,'"'):"".concat(t)),"object"===Fb.default(t)&&"Object"!==(null==t||null===(e=t.constructor)||void 0===e?void 0:e.name))&&(r=null===t?"null":"instance of ".concat(null==t||null===(n=t.constructor)||void 0===n?void 0:n.name));return r||(r=Fb.default(t)),r},ow=function(t){var e,r=[],n=tw(t);try{for(n.s();!(e=n.n()).done;){var o=e.value;r.push(iw(o))}}catch(t){n.e(t)}finally{n.f()}return r},iw=function(t){var e,r=[],n=tw(Array.isArray(t)?t:[t]);try{for(n.s();!(e=n.n()).done;){var o=e.value;"string"!=typeof o&&"function"!=typeof o?r.push(o):r.push(Kb(o))}}catch(t){n.e(t)}finally{n.f()}return r},aw=function(t,e){var r,n,o=[],i=!1,a=tw(t);try{for(a.s();!(n=a.n()).done;){var u,c=tw(n.value.checks);try{for(c.s();!(u=c.n()).done;){var s=(0,u.value)(e),f=Bb.default(s,3),l=f[0],p=f[1],h=f[2];i=i||l,!r&&h&&(r=h),p&&(o=[].concat(qb.default(o),"string"==typeof p?[p]:qb.default(p)))}}catch(t){c.e(t)}finally{c.f()}}}catch(t){a.e(t)}finally{a.f()}if(i)return[!0];var d=r||nw(e),v=o.length-1;return[!1,d,v>0?"".concat(o.slice(0,v).join(", ")," or ").concat(o[v]):o.join(", "),v>1?";":","]};function uw(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return cw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return cw(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function cw(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var sw=Hb((function(t){return["string"==typeof t&&t.length>0,"a non-empty string"]})),fw=Hb((function(t){return["number"==typeof t&&Number.isInteger(t)&&t>=0,"a non-negative integer"]})),lw=Hb((function(t){return["object"===Fb.default(t)&&null!==t&&!Array.isArray(t),"a pure object (non-null and non-array)"]}));function pw(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return hw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hw(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function hw(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}ly.array=function(t,e){return Hb((function(r){if(!Array.isArray(r))return[!1,"an array of ".concat(t)];var n,o=pw(r.entries());try{for(o.s();!(n=o.n()).done;){var i=Bb.default(n.value,2),a=i[0],u=i[1],c=aw(iw(e),u),s=Bb.default(c,3),f=s[0],l=s[1],p=s[2];if(!f)return[!1,"a valid array of ".concat(t," (index ").concat(a," should be ").concat(p,")"),"malformed array of ".concat(t," (index ").concat(a," is ").concat(l,")")]}}catch(t){o.e(t)}finally{o.f()}return[!0]}))},ly.custom=Hb;var dw=ly.literal=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Hb((function(t){var r,n=!1,o=[],i=Xb(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;n=n||t===a,o.push("string"==typeof a?'"'.concat(a,'"'):"".concat(a))}}catch(t){i.e(t)}finally{i.f()}return[n,o]}))};ly.nonEmptyArray=function(t,e){return Hb((function(r){if(!Array.isArray(r)||r.length<1)return[!1,"a non-empty array of ".concat(t)];var n,o=uw(r.entries());try{for(o.s();!(n=o.n()).done;){var i=Bb.default(n.value,2),a=i[0],u=i[1],c=aw(iw(e),u),s=Bb.default(c,3),f=s[0],l=s[1],p=s[2];if(!f)return[!1,"a valid non-empty array of ".concat(t," (index ").concat(a," should be ").concat(p,")"),"malformed array of ".concat(t," (index ").concat(a," is ").concat(l,")")]}}catch(t){o.e(t)}finally{o.f()}return[!0]}))};var vw=ly.nonEmptyString=sw;ly.nonNegativeInteger=fw,ly.objectSchema=function(t,e){return Hb((function(r){if("object"!==Fb.default(r)||null===r||Array.isArray(r))return[!1,"valid ".concat(t," (should be a pure object)")];for(var n=0,o=Object.entries(e);n<o.length;n++){var i=Bb.default(o[n],2),a=i[0],u=i[1],c=aw(iw(u),r[a]),s=Bb.default(c,3),f=s[0],l=s[1],p=s[2];if(!f)return[!1,"valid ".concat(t,' (key "').concat(a,'" should be ').concat(p,")"),"malformed ".concat(t,' (key "').concat(a,'" is ').concat(l,")")]}return[!0]}))};var yw=ly.pureObject=lw;ly.runtimeTypeValidation=rw,ly.stringifyReceivedType=nw,ly.type=Kb;var gw,mw=ly.validateConstructorTypes=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=ow(e);return function(t){return function(t){zb.default(r,t);var e=Qb(r);function r(){Wb.default(this,r);for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return rw(n,o),e.call.apply(e,[this].concat(o))}return Gb.default(r)}(t)}},bw=ly.validateTypes=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=ow(e);return function(t,e,r){if("function"!=typeof r.value)throw new Error("The validateTypes decorator can only be applied to methods");var o=r.value;r.value=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return rw(n,e),o.apply(this,e)}}},ww=ly.validateTypesAsync=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=ow(e);return function(t,e,r){if("function"!=typeof r.value)throw new Error("The validateTypesAsync decorator can only be applied to methods");var o=r.value;r.value=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];try{rw(n,e)}catch(t){return Promise.reject(t)}return o.apply(this,e)}}},xw=Ys.scope("");return t.default=(Yi(gw=class{constructor(t,e,r){var n,o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.options=i,this.options.logLevel=null!==(n=this.options.logLevel)&&void 0!==n?n:"silent",this.config=new yf(t,e,r,this.options),xw.setLevel(this.options.logLevel),this.options.transport=null!==(o=this.options.transport)&&void 0!==o?o:new Fl,this.transport=this.options.transport,this.network=new fy(this.config,this.transport)}updateToken(t){xw.info("updateToken"),this.config.updateToken(t)}get(t){var e=this;return new $i(function(){var r=Hi(Es.mark((function r(n,o,i){var a,u;return Es.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=e.network.get("".concat(e.config.mediaUrl,"/").concat(t)),i((()=>a.cancel())),r.prev=2,r.next=5,a;case 5:u=r.sent,n(new gf(e.config,e.network,u.body)),r.next=12;break;case 9:r.prev=9,r.t0=r.catch(2),o(r.t0);case 12:case"end":return r.stop()}}),r,null,[[2,9]])})));return function(t,e,n){return r.apply(this,arguments)}}())}post(t,e,r,n){var o=this;return new $i(function(){var i=Hi(Es.mark((function i(a,u,c){var s,f;return Es.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return s=o.network.post(o.config.mediaUrl,null!=r?r:"media",e,t,n),c((()=>s.cancel())),i.prev=2,i.next=5,s;case 5:f=i.sent,a(new gf(o.config,o.network,f.body)),i.next=12;break;case 9:i.prev=9,i.t0=i.catch(2),u(i.t0);case 12:case"end":return i.stop()}}),i,null,[[2,9]])})));return function(t,e,r){return i.apply(this,arguments)}}())}postFormData(t,e){var r=this;return new $i(function(){var n=Hi(Es.mark((function n(o,i,a){var u,c;return Es.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u=r.network.post(r.config.mediaUrl,null!=e?e:"media",t),a((()=>u.cancel())),n.prev=2,n.next=5,u;case 5:c=n.sent,o(new gf(r.config,r.network,c.body)),n.next=12;break;case 9:n.prev=9,n.t0=n.catch(2),i(n.t0);case 12:case"end":return n.stop()}}),n,null,[[2,9]])})));return function(t,e,r){return n.apply(this,arguments)}}())}mediaSetGet(t){var e=this;return new $i(function(){var r=Hi(Es.mark((function r(n,o,i){var a,u,c,s;return Es.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a={command:"get",list:t.map((t=>({media_sid:t})))},u=e.network.post("".concat(e.config.mediaSetUrl),null,a,"application/json"),i((()=>u.cancel())),r.prev=3,r.next=6,u;case 6:c=r.sent,s=c.body.map((t=>{if(200===t.code)return new gf(e.config,e.network,t.media_record);o("Failed to obtain detailed information about Media items (failed SID ".concat(t.media_record.sid,")"))})),n(s),r.next=14;break;case 11:r.prev=11,r.t0=r.catch(3),o(r.t0);case 14:case"end":return r.stop()}}),r,null,[[3,11]])})));return function(t,e,n){return r.apply(this,arguments)}}())}mediaSetGetContentUrls(t){var e=this;return new $i(function(){var r=Hi(Es.mark((function r(n,o,i){var a,u,c,s;return Es.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a={command:"get",list:t.map((t=>({media_sid:t})))},u=e.network.post("".concat(e.config.mediaSetUrl),null,a,"application/json"),i((()=>u.cancel())),r.prev=3,r.next=6,u;case 6:c=r.sent,s=new Map,c.body.forEach((t=>{200===t.code?s.set(t.media_record.sid,t.media_record.links.content_direct_temporary):o("Failed to obtain detailed information about Media items (failed SID ".concat(t.media_record.sid,")"))})),n(s),r.next=15;break;case 12:r.prev=12,r.t0=r.catch(3),o(r.t0);case 15:case"end":return r.stop()}}),r,null,[[3,12]])})));return function(t,e,n){return r.apply(this,arguments)}}())}},"version","0.6.0-rc.1"),gw),As([bw(vw),Os("design:type",Function),Os("design:paramtypes",[String]),Os("design:returntype",void 0)],t.default.prototype,"updateToken",null),As([ww(vw),Os("design:type",Function),Os("design:paramtypes",[String]),Os("design:returntype",$i)],t.default.prototype,"get",null),t.default=As([mw(vw,vw,[vw,dw(null)],[yw,"undefined"]),Os("design:paramtypes",[String,String,Object,Object])],t.default),t.CancellablePromise=$i,t.Client=t.default,t.McsClient=t.default,t.McsMedia=gf,t.Media=gf,Object.defineProperty(t,"__esModule",{value:!0}),t}({});
|
|
48
|
+
Object.defineProperty(ly,"__esModule",{value:!0});var Rb=hm.exports,Ib=Cm.exports,Pb=gv.exports,Db=yv.exports,Cb=bv.exports,Mb=xv.exports,Nb=kv.exports;function Ub(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var Fb=Ub(Sv.exports),Bb=Ub(Rb),qb=Ub(Ib),Gb=Ub(Pb),Wb=Ub(Db),zb=Ub(Cb),$b=Ub(Mb),Vb=Ub(Nb),Hb=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return{checks:e}};function Yb(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return Jb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Jb(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Jb(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Kb=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Hb((function(t){var r,n=!1,o=[],i=Yb(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;"string"!=typeof a?(n=n||t instanceof a,o.push("an instance of ".concat(a.name))):(n=n||Fb.default(t)===a,o.push("of type ".concat(a)))}}catch(t){i.e(t)}finally{i.f()}return[n,o]}))};function Xb(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return Zb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Zb(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Zb(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Qb(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Vb.default(t);if(e){var o=Vb.default(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return $b.default(this,r)}}function tw(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return ew(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ew(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function ew(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var rw=function(t,e){if(e.length>t.length)throw new Error("Expected at most ".concat(t.length," argument(s), but got ").concat(e.length));for(;e.length<t.length;)e.push(void 0);var r,n=tw(e.entries());try{for(n.s();!(r=n.n()).done;){var o=Bb.default(r.value,2),i=o[0],a=o[1],u=aw(t[i],a),c=Bb.default(u,4),s=c[0],f=c[1],l=c[2],p=c[3];if(!s)throw new Error("Argument ".concat(i+1," is expected to be ").concat(l).concat(p," but got ").concat(f))}}catch(t){n.e(t)}finally{n.f()}},nw=function(t){var e,r,n;(["undefined","boolean","number","bigint","string"].includes(Fb.default(t))&&(r="string"==typeof t?'"'.concat(t,'"'):"".concat(t)),"object"===Fb.default(t)&&"Object"!==(null==t||null===(e=t.constructor)||void 0===e?void 0:e.name))&&(r=null===t?"null":"instance of ".concat(null==t||null===(n=t.constructor)||void 0===n?void 0:n.name));return r||(r=Fb.default(t)),r},ow=function(t){var e,r=[],n=tw(t);try{for(n.s();!(e=n.n()).done;){var o=e.value;r.push(iw(o))}}catch(t){n.e(t)}finally{n.f()}return r},iw=function(t){var e,r=[],n=tw(Array.isArray(t)?t:[t]);try{for(n.s();!(e=n.n()).done;){var o=e.value;"string"!=typeof o&&"function"!=typeof o?r.push(o):r.push(Kb(o))}}catch(t){n.e(t)}finally{n.f()}return r},aw=function(t,e){var r,n,o=[],i=!1,a=tw(t);try{for(a.s();!(n=a.n()).done;){var u,c=tw(n.value.checks);try{for(c.s();!(u=c.n()).done;){var s=(0,u.value)(e),f=Bb.default(s,3),l=f[0],p=f[1],h=f[2];i=i||l,!r&&h&&(r=h),p&&(o=[].concat(qb.default(o),"string"==typeof p?[p]:qb.default(p)))}}catch(t){c.e(t)}finally{c.f()}}}catch(t){a.e(t)}finally{a.f()}if(i)return[!0];var d=r||nw(e),v=o.length-1;return[!1,d,v>0?"".concat(o.slice(0,v).join(", ")," or ").concat(o[v]):o.join(", "),v>1?";":","]};function uw(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return cw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return cw(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function cw(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var sw=Hb((function(t){return["string"==typeof t&&t.length>0,"a non-empty string"]})),fw=Hb((function(t){return["number"==typeof t&&Number.isInteger(t)&&t>=0,"a non-negative integer"]})),lw=Hb((function(t){return["object"===Fb.default(t)&&null!==t&&!Array.isArray(t),"a pure object (non-null and non-array)"]}));function pw(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return hw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hw(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function hw(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}ly.array=function(t,e){return Hb((function(r){if(!Array.isArray(r))return[!1,"an array of ".concat(t)];var n,o=pw(r.entries());try{for(o.s();!(n=o.n()).done;){var i=Bb.default(n.value,2),a=i[0],u=i[1],c=aw(iw(e),u),s=Bb.default(c,3),f=s[0],l=s[1],p=s[2];if(!f)return[!1,"a valid array of ".concat(t," (index ").concat(a," should be ").concat(p,")"),"malformed array of ".concat(t," (index ").concat(a," is ").concat(l,")")]}}catch(t){o.e(t)}finally{o.f()}return[!0]}))},ly.custom=Hb;var dw=ly.literal=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Hb((function(t){var r,n=!1,o=[],i=Xb(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;n=n||t===a,o.push("string"==typeof a?'"'.concat(a,'"'):"".concat(a))}}catch(t){i.e(t)}finally{i.f()}return[n,o]}))};ly.nonEmptyArray=function(t,e){return Hb((function(r){if(!Array.isArray(r)||r.length<1)return[!1,"a non-empty array of ".concat(t)];var n,o=uw(r.entries());try{for(o.s();!(n=o.n()).done;){var i=Bb.default(n.value,2),a=i[0],u=i[1],c=aw(iw(e),u),s=Bb.default(c,3),f=s[0],l=s[1],p=s[2];if(!f)return[!1,"a valid non-empty array of ".concat(t," (index ").concat(a," should be ").concat(p,")"),"malformed array of ".concat(t," (index ").concat(a," is ").concat(l,")")]}}catch(t){o.e(t)}finally{o.f()}return[!0]}))};var vw=ly.nonEmptyString=sw;ly.nonNegativeInteger=fw,ly.objectSchema=function(t,e){return Hb((function(r){if("object"!==Fb.default(r)||null===r||Array.isArray(r))return[!1,"valid ".concat(t," (should be a pure object)")];for(var n=0,o=Object.entries(e);n<o.length;n++){var i=Bb.default(o[n],2),a=i[0],u=i[1],c=aw(iw(u),r[a]),s=Bb.default(c,3),f=s[0],l=s[1],p=s[2];if(!f)return[!1,"valid ".concat(t,' (key "').concat(a,'" should be ').concat(p,")"),"malformed ".concat(t,' (key "').concat(a,'" is ').concat(l,")")]}return[!0]}))};var yw=ly.pureObject=lw;ly.runtimeTypeValidation=rw,ly.stringifyReceivedType=nw,ly.type=Kb;var gw,mw=ly.validateConstructorTypes=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=ow(e);return function(t){return function(t){zb.default(r,t);var e=Qb(r);function r(){Wb.default(this,r);for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return rw(n,o),e.call.apply(e,[this].concat(o))}return Gb.default(r)}(t)}},bw=ly.validateTypes=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=ow(e);return function(t,e,r){if("function"!=typeof r.value)throw new Error("The validateTypes decorator can only be applied to methods");var o=r.value;r.value=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return rw(n,e),o.apply(this,e)}}},ww=ly.validateTypesAsync=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=ow(e);return function(t,e,r){if("function"!=typeof r.value)throw new Error("The validateTypesAsync decorator can only be applied to methods");var o=r.value;r.value=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];try{rw(n,e)}catch(t){return Promise.reject(t)}return o.apply(this,e)}}},xw=Ys.scope("");return t.default=(Yi(gw=class{constructor(t,e,r){var n,o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.options=i,this.options.logLevel=null!==(n=this.options.logLevel)&&void 0!==n?n:"silent",this.config=new yf(t,e,r,this.options),xw.setLevel(this.options.logLevel),this.options.transport=null!==(o=this.options.transport)&&void 0!==o?o:new Fl,this.transport=this.options.transport,this.network=new fy(this.config,this.transport)}updateToken(t){xw.info("updateToken"),this.config.updateToken(t)}get(t){var e=this;return new $i(function(){var r=Hi(Es.mark((function r(n,o,i){var a,u;return Es.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=e.network.get("".concat(e.config.mediaUrl,"/").concat(t)),i((()=>a.cancel())),r.prev=2,r.next=5,a;case 5:u=r.sent,n(new gf(e.config,e.network,u.body)),r.next=12;break;case 9:r.prev=9,r.t0=r.catch(2),o(r.t0);case 12:case"end":return r.stop()}}),r,null,[[2,9]])})));return function(t,e,n){return r.apply(this,arguments)}}())}post(t,e,r,n){var o=this;return new $i(function(){var i=Hi(Es.mark((function i(a,u,c){var s,f;return Es.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return s=o.network.post(o.config.mediaUrl,null!=r?r:"media",e,t,n),c((()=>s.cancel())),i.prev=2,i.next=5,s;case 5:f=i.sent,a(new gf(o.config,o.network,f.body)),i.next=12;break;case 9:i.prev=9,i.t0=i.catch(2),u(i.t0);case 12:case"end":return i.stop()}}),i,null,[[2,9]])})));return function(t,e,r){return i.apply(this,arguments)}}())}postFormData(t,e){var r=this;return new $i(function(){var n=Hi(Es.mark((function n(o,i,a){var u,c;return Es.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u=r.network.post(r.config.mediaUrl,null!=e?e:"media",t),a((()=>u.cancel())),n.prev=2,n.next=5,u;case 5:c=n.sent,o(new gf(r.config,r.network,c.body)),n.next=12;break;case 9:n.prev=9,n.t0=n.catch(2),i(n.t0);case 12:case"end":return n.stop()}}),n,null,[[2,9]])})));return function(t,e,r){return n.apply(this,arguments)}}())}mediaSetGet(t){var e=this;return new $i(function(){var r=Hi(Es.mark((function r(n,o,i){var a,u,c,s;return Es.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a={command:"get",list:t.map((t=>({media_sid:t})))},u=e.network.post("".concat(e.config.mediaSetUrl),null,a,"application/json"),i((()=>u.cancel())),r.prev=3,r.next=6,u;case 6:c=r.sent,s=c.body.map((t=>{if(200===t.code)return new gf(e.config,e.network,t.media_record);o("Failed to obtain detailed information about Media items (failed SID ".concat(t.media_record.sid,")"))})),n(s),r.next=14;break;case 11:r.prev=11,r.t0=r.catch(3),o(r.t0);case 14:case"end":return r.stop()}}),r,null,[[3,11]])})));return function(t,e,n){return r.apply(this,arguments)}}())}mediaSetGetContentUrls(t){var e=this;return new $i(function(){var r=Hi(Es.mark((function r(n,o,i){var a,u,c,s;return Es.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a={command:"get",list:t.map((t=>({media_sid:t})))},u=e.network.post("".concat(e.config.mediaSetUrl),null,a,"application/json"),i((()=>u.cancel())),r.prev=3,r.next=6,u;case 6:c=r.sent,s=new Map,c.body.forEach((t=>{200===t.code?s.set(t.media_record.sid,t.media_record.links.content_direct_temporary):o("Failed to obtain detailed information about Media items (failed SID ".concat(t.media_record.sid,")"))})),n(s),r.next=15;break;case 12:r.prev=12,r.t0=r.catch(3),o(r.t0);case 15:case"end":return r.stop()}}),r,null,[[3,12]])})));return function(t,e,n){return r.apply(this,arguments)}}())}},"version","0.6.0-rc.3"),gw),As([bw(vw),Os("design:type",Function),Os("design:paramtypes",[String]),Os("design:returntype",void 0)],t.default.prototype,"updateToken",null),As([ww(vw),Os("design:type",Function),Os("design:paramtypes",[String]),Os("design:returntype",$i)],t.default.prototype,"get",null),t.default=As([mw(vw,vw,[vw,dw(null)],[yw,"undefined"]),Os("design:paramtypes",[String,String,Object,Object])],t.default),t.CancellablePromise=$i,t.Client=t.default,t.McsClient=t.default,t.McsMedia=gf,t.Media=gf,Object.defineProperty(t,"__esModule",{value:!0}),t}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twilio/mcs-client",
|
|
3
|
-
"version": "0.6.0-
|
|
3
|
+
"version": "0.6.0-rc.3",
|
|
4
4
|
"description": "Twilio Media Content Service client library",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Twilio",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@babel/runtime": "^7.17.0",
|
|
37
|
-
"@twilio/declarative-type-validator": "^0.
|
|
38
|
-
"@twilio/operation-retrier": "^4.0.8-
|
|
37
|
+
"@twilio/declarative-type-validator": "^0.2.0-rc.0",
|
|
38
|
+
"@twilio/operation-retrier": "^4.0.8-rc.1",
|
|
39
39
|
"core-js": "^3.17.3",
|
|
40
40
|
"loglevel": "^1.7.1",
|
|
41
41
|
"xmlhttprequest": "^1.8.0"
|
|
@@ -82,6 +82,5 @@
|
|
|
82
82
|
},
|
|
83
83
|
"engines": {
|
|
84
84
|
"node": ">=14"
|
|
85
|
-
}
|
|
86
|
-
"gitHead": "b6d25cecb08ab4e0d369430b90a786e1b275af91"
|
|
85
|
+
}
|
|
87
86
|
}
|