glitch-javascript-sdk 0.4.3 → 0.4.4
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/cjs/index.js +118 -109
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/routes/EventsRoute.ts +3 -3
package/dist/cjs/index.js
CHANGED
|
@@ -526,7 +526,7 @@ var isTypedArray = (function(TypedArray) {
|
|
|
526
526
|
};
|
|
527
527
|
})(typeof Uint8Array !== 'undefined' && Object.getPrototypeOf(Uint8Array));
|
|
528
528
|
|
|
529
|
-
var utils$
|
|
529
|
+
var utils$a = {
|
|
530
530
|
isArray: isArray,
|
|
531
531
|
isArrayBuffer: isArrayBuffer,
|
|
532
532
|
isBuffer: isBuffer,
|
|
@@ -559,7 +559,7 @@ var utils$b = {
|
|
|
559
559
|
isFileList: isFileList
|
|
560
560
|
};
|
|
561
561
|
|
|
562
|
-
var utils$
|
|
562
|
+
var utils$9 = utils$a;
|
|
563
563
|
|
|
564
564
|
function encode(val) {
|
|
565
565
|
return encodeURIComponent(val).
|
|
@@ -587,26 +587,26 @@ var buildURL$1 = function buildURL(url, params, paramsSerializer) {
|
|
|
587
587
|
var serializedParams;
|
|
588
588
|
if (paramsSerializer) {
|
|
589
589
|
serializedParams = paramsSerializer(params);
|
|
590
|
-
} else if (utils$
|
|
590
|
+
} else if (utils$9.isURLSearchParams(params)) {
|
|
591
591
|
serializedParams = params.toString();
|
|
592
592
|
} else {
|
|
593
593
|
var parts = [];
|
|
594
594
|
|
|
595
|
-
utils$
|
|
595
|
+
utils$9.forEach(params, function serialize(val, key) {
|
|
596
596
|
if (val === null || typeof val === 'undefined') {
|
|
597
597
|
return;
|
|
598
598
|
}
|
|
599
599
|
|
|
600
|
-
if (utils$
|
|
600
|
+
if (utils$9.isArray(val)) {
|
|
601
601
|
key = key + '[]';
|
|
602
602
|
} else {
|
|
603
603
|
val = [val];
|
|
604
604
|
}
|
|
605
605
|
|
|
606
|
-
utils$
|
|
607
|
-
if (utils$
|
|
606
|
+
utils$9.forEach(val, function parseValue(v) {
|
|
607
|
+
if (utils$9.isDate(v)) {
|
|
608
608
|
v = v.toISOString();
|
|
609
|
-
} else if (utils$
|
|
609
|
+
} else if (utils$9.isObject(v)) {
|
|
610
610
|
v = JSON.stringify(v);
|
|
611
611
|
}
|
|
612
612
|
parts.push(encode(key) + '=' + encode(v));
|
|
@@ -628,7 +628,7 @@ var buildURL$1 = function buildURL(url, params, paramsSerializer) {
|
|
|
628
628
|
return url;
|
|
629
629
|
};
|
|
630
630
|
|
|
631
|
-
var utils$
|
|
631
|
+
var utils$8 = utils$a;
|
|
632
632
|
|
|
633
633
|
function InterceptorManager$1() {
|
|
634
634
|
this.handlers = [];
|
|
@@ -672,7 +672,7 @@ InterceptorManager$1.prototype.eject = function eject(id) {
|
|
|
672
672
|
* @param {Function} fn The function to call for each interceptor
|
|
673
673
|
*/
|
|
674
674
|
InterceptorManager$1.prototype.forEach = function forEach(fn) {
|
|
675
|
-
utils$
|
|
675
|
+
utils$8.forEach(this.handlers, function forEachHandler(h) {
|
|
676
676
|
if (h !== null) {
|
|
677
677
|
fn(h);
|
|
678
678
|
}
|
|
@@ -681,10 +681,10 @@ InterceptorManager$1.prototype.forEach = function forEach(fn) {
|
|
|
681
681
|
|
|
682
682
|
var InterceptorManager_1 = InterceptorManager$1;
|
|
683
683
|
|
|
684
|
-
var utils$
|
|
684
|
+
var utils$7 = utils$a;
|
|
685
685
|
|
|
686
686
|
var normalizeHeaderName$1 = function normalizeHeaderName(headers, normalizedName) {
|
|
687
|
-
utils$
|
|
687
|
+
utils$7.forEach(headers, function processHeader(value, name) {
|
|
688
688
|
if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
|
|
689
689
|
headers[normalizedName] = value;
|
|
690
690
|
delete headers[name];
|
|
@@ -692,90 +692,99 @@ var normalizeHeaderName$1 = function normalizeHeaderName(headers, normalizedName
|
|
|
692
692
|
});
|
|
693
693
|
};
|
|
694
694
|
|
|
695
|
-
var
|
|
695
|
+
var AxiosError_1;
|
|
696
|
+
var hasRequiredAxiosError;
|
|
696
697
|
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
* @param {string} message The error message.
|
|
701
|
-
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
702
|
-
* @param {Object} [config] The config.
|
|
703
|
-
* @param {Object} [request] The request.
|
|
704
|
-
* @param {Object} [response] The response.
|
|
705
|
-
* @returns {Error} The created error.
|
|
706
|
-
*/
|
|
707
|
-
function AxiosError$2(message, code, config, request, response) {
|
|
708
|
-
Error.call(this);
|
|
709
|
-
this.message = message;
|
|
710
|
-
this.name = 'AxiosError';
|
|
711
|
-
code && (this.code = code);
|
|
712
|
-
config && (this.config = config);
|
|
713
|
-
request && (this.request = request);
|
|
714
|
-
response && (this.response = response);
|
|
715
|
-
}
|
|
698
|
+
function requireAxiosError () {
|
|
699
|
+
if (hasRequiredAxiosError) return AxiosError_1;
|
|
700
|
+
hasRequiredAxiosError = 1;
|
|
716
701
|
|
|
717
|
-
utils
|
|
718
|
-
toJSON: function toJSON() {
|
|
719
|
-
return {
|
|
720
|
-
// Standard
|
|
721
|
-
message: this.message,
|
|
722
|
-
name: this.name,
|
|
723
|
-
// Microsoft
|
|
724
|
-
description: this.description,
|
|
725
|
-
number: this.number,
|
|
726
|
-
// Mozilla
|
|
727
|
-
fileName: this.fileName,
|
|
728
|
-
lineNumber: this.lineNumber,
|
|
729
|
-
columnNumber: this.columnNumber,
|
|
730
|
-
stack: this.stack,
|
|
731
|
-
// Axios
|
|
732
|
-
config: this.config,
|
|
733
|
-
code: this.code,
|
|
734
|
-
status: this.response && this.response.status ? this.response.status : null
|
|
735
|
-
};
|
|
736
|
-
}
|
|
737
|
-
});
|
|
702
|
+
var utils = utils$a;
|
|
738
703
|
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
704
|
+
/**
|
|
705
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
706
|
+
*
|
|
707
|
+
* @param {string} message The error message.
|
|
708
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
709
|
+
* @param {Object} [config] The config.
|
|
710
|
+
* @param {Object} [request] The request.
|
|
711
|
+
* @param {Object} [response] The response.
|
|
712
|
+
* @returns {Error} The created error.
|
|
713
|
+
*/
|
|
714
|
+
function AxiosError(message, code, config, request, response) {
|
|
715
|
+
Error.call(this);
|
|
716
|
+
this.message = message;
|
|
717
|
+
this.name = 'AxiosError';
|
|
718
|
+
code && (this.code = code);
|
|
719
|
+
config && (this.config = config);
|
|
720
|
+
request && (this.request = request);
|
|
721
|
+
response && (this.response = response);
|
|
722
|
+
}
|
|
757
723
|
|
|
758
|
-
|
|
759
|
-
|
|
724
|
+
utils.inherits(AxiosError, Error, {
|
|
725
|
+
toJSON: function toJSON() {
|
|
726
|
+
return {
|
|
727
|
+
// Standard
|
|
728
|
+
message: this.message,
|
|
729
|
+
name: this.name,
|
|
730
|
+
// Microsoft
|
|
731
|
+
description: this.description,
|
|
732
|
+
number: this.number,
|
|
733
|
+
// Mozilla
|
|
734
|
+
fileName: this.fileName,
|
|
735
|
+
lineNumber: this.lineNumber,
|
|
736
|
+
columnNumber: this.columnNumber,
|
|
737
|
+
stack: this.stack,
|
|
738
|
+
// Axios
|
|
739
|
+
config: this.config,
|
|
740
|
+
code: this.code,
|
|
741
|
+
status: this.response && this.response.status ? this.response.status : null
|
|
742
|
+
};
|
|
743
|
+
}
|
|
744
|
+
});
|
|
760
745
|
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
var axiosError = Object.create(prototype);
|
|
746
|
+
var prototype = AxiosError.prototype;
|
|
747
|
+
var descriptors = {};
|
|
764
748
|
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
749
|
+
[
|
|
750
|
+
'ERR_BAD_OPTION_VALUE',
|
|
751
|
+
'ERR_BAD_OPTION',
|
|
752
|
+
'ECONNABORTED',
|
|
753
|
+
'ETIMEDOUT',
|
|
754
|
+
'ERR_NETWORK',
|
|
755
|
+
'ERR_FR_TOO_MANY_REDIRECTS',
|
|
756
|
+
'ERR_DEPRECATED',
|
|
757
|
+
'ERR_BAD_RESPONSE',
|
|
758
|
+
'ERR_BAD_REQUEST',
|
|
759
|
+
'ERR_CANCELED'
|
|
760
|
+
// eslint-disable-next-line func-names
|
|
761
|
+
].forEach(function(code) {
|
|
762
|
+
descriptors[code] = {value: code};
|
|
763
|
+
});
|
|
768
764
|
|
|
769
|
-
|
|
765
|
+
Object.defineProperties(AxiosError, descriptors);
|
|
766
|
+
Object.defineProperty(prototype, 'isAxiosError', {value: true});
|
|
770
767
|
|
|
771
|
-
|
|
768
|
+
// eslint-disable-next-line func-names
|
|
769
|
+
AxiosError.from = function(error, code, config, request, response, customProps) {
|
|
770
|
+
var axiosError = Object.create(prototype);
|
|
772
771
|
|
|
773
|
-
|
|
772
|
+
utils.toFlatObject(error, axiosError, function filter(obj) {
|
|
773
|
+
return obj !== Error.prototype;
|
|
774
|
+
});
|
|
774
775
|
|
|
775
|
-
|
|
776
|
-
|
|
776
|
+
AxiosError.call(axiosError, error.message, code, config, request, response);
|
|
777
|
+
|
|
778
|
+
axiosError.name = error.name;
|
|
779
|
+
|
|
780
|
+
customProps && Object.assign(axiosError, customProps);
|
|
777
781
|
|
|
778
|
-
|
|
782
|
+
return axiosError;
|
|
783
|
+
};
|
|
784
|
+
|
|
785
|
+
AxiosError_1 = AxiosError;
|
|
786
|
+
return AxiosError_1;
|
|
787
|
+
}
|
|
779
788
|
|
|
780
789
|
var transitional = {
|
|
781
790
|
silentJSONParsing: true,
|
|
@@ -783,7 +792,7 @@ var transitional = {
|
|
|
783
792
|
clarifyTimeoutError: false
|
|
784
793
|
};
|
|
785
794
|
|
|
786
|
-
var utils$6 = utils$
|
|
795
|
+
var utils$6 = utils$a;
|
|
787
796
|
|
|
788
797
|
/**
|
|
789
798
|
* Convert a data object to FormData
|
|
@@ -861,7 +870,7 @@ function requireSettle () {
|
|
|
861
870
|
if (hasRequiredSettle) return settle;
|
|
862
871
|
hasRequiredSettle = 1;
|
|
863
872
|
|
|
864
|
-
var AxiosError =
|
|
873
|
+
var AxiosError = requireAxiosError();
|
|
865
874
|
|
|
866
875
|
/**
|
|
867
876
|
* Resolve or reject a Promise based on response status.
|
|
@@ -894,7 +903,7 @@ function requireCookies () {
|
|
|
894
903
|
if (hasRequiredCookies) return cookies;
|
|
895
904
|
hasRequiredCookies = 1;
|
|
896
905
|
|
|
897
|
-
var utils = utils$
|
|
906
|
+
var utils = utils$a;
|
|
898
907
|
|
|
899
908
|
cookies = (
|
|
900
909
|
utils.isStandardBrowserEnv() ?
|
|
@@ -1000,7 +1009,7 @@ function requireParseHeaders () {
|
|
|
1000
1009
|
if (hasRequiredParseHeaders) return parseHeaders;
|
|
1001
1010
|
hasRequiredParseHeaders = 1;
|
|
1002
1011
|
|
|
1003
|
-
var utils = utils$
|
|
1012
|
+
var utils = utils$a;
|
|
1004
1013
|
|
|
1005
1014
|
// Headers whose duplicates are ignored by node
|
|
1006
1015
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
@@ -1061,7 +1070,7 @@ function requireIsURLSameOrigin () {
|
|
|
1061
1070
|
if (hasRequiredIsURLSameOrigin) return isURLSameOrigin;
|
|
1062
1071
|
hasRequiredIsURLSameOrigin = 1;
|
|
1063
1072
|
|
|
1064
|
-
var utils = utils$
|
|
1073
|
+
var utils = utils$a;
|
|
1065
1074
|
|
|
1066
1075
|
isURLSameOrigin = (
|
|
1067
1076
|
utils.isStandardBrowserEnv() ?
|
|
@@ -1137,8 +1146,8 @@ function requireCanceledError () {
|
|
|
1137
1146
|
if (hasRequiredCanceledError) return CanceledError_1;
|
|
1138
1147
|
hasRequiredCanceledError = 1;
|
|
1139
1148
|
|
|
1140
|
-
var AxiosError =
|
|
1141
|
-
var utils = utils$
|
|
1149
|
+
var AxiosError = requireAxiosError();
|
|
1150
|
+
var utils = utils$a;
|
|
1142
1151
|
|
|
1143
1152
|
/**
|
|
1144
1153
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
@@ -1181,7 +1190,7 @@ function requireXhr () {
|
|
|
1181
1190
|
if (hasRequiredXhr) return xhr;
|
|
1182
1191
|
hasRequiredXhr = 1;
|
|
1183
1192
|
|
|
1184
|
-
var utils = utils$
|
|
1193
|
+
var utils = utils$a;
|
|
1185
1194
|
var settle = requireSettle();
|
|
1186
1195
|
var cookies = requireCookies();
|
|
1187
1196
|
var buildURL = buildURL$1;
|
|
@@ -1189,7 +1198,7 @@ function requireXhr () {
|
|
|
1189
1198
|
var parseHeaders = requireParseHeaders();
|
|
1190
1199
|
var isURLSameOrigin = requireIsURLSameOrigin();
|
|
1191
1200
|
var transitionalDefaults = transitional;
|
|
1192
|
-
var AxiosError =
|
|
1201
|
+
var AxiosError = requireAxiosError();
|
|
1193
1202
|
var CanceledError = requireCanceledError();
|
|
1194
1203
|
var parseProtocol = requireParseProtocol();
|
|
1195
1204
|
|
|
@@ -2082,7 +2091,7 @@ function requireHttp () {
|
|
|
2082
2091
|
if (hasRequiredHttp) return http_1;
|
|
2083
2092
|
hasRequiredHttp = 1;
|
|
2084
2093
|
|
|
2085
|
-
var utils = utils$
|
|
2094
|
+
var utils = utils$a;
|
|
2086
2095
|
var settle = requireSettle();
|
|
2087
2096
|
var buildFullPath = buildFullPath$1;
|
|
2088
2097
|
var buildURL = buildURL$1;
|
|
@@ -2094,7 +2103,7 @@ function requireHttp () {
|
|
|
2094
2103
|
var zlib = require$$8;
|
|
2095
2104
|
var VERSION = requireData().version;
|
|
2096
2105
|
var transitionalDefaults = transitional;
|
|
2097
|
-
var AxiosError =
|
|
2106
|
+
var AxiosError = requireAxiosError();
|
|
2098
2107
|
var CanceledError = requireCanceledError();
|
|
2099
2108
|
|
|
2100
2109
|
var isHttps = /https:?/;
|
|
@@ -14781,9 +14790,9 @@ function requireFormData () {
|
|
|
14781
14790
|
return FormDataExports;
|
|
14782
14791
|
}
|
|
14783
14792
|
|
|
14784
|
-
var utils$5 = utils$
|
|
14793
|
+
var utils$5 = utils$a;
|
|
14785
14794
|
var normalizeHeaderName = normalizeHeaderName$1;
|
|
14786
|
-
var AxiosError$1 =
|
|
14795
|
+
var AxiosError$1 = requireAxiosError();
|
|
14787
14796
|
var transitionalDefaults = transitional;
|
|
14788
14797
|
var toFormData = toFormData_1;
|
|
14789
14798
|
|
|
@@ -14926,7 +14935,7 @@ utils$5.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method)
|
|
|
14926
14935
|
|
|
14927
14936
|
var defaults_1 = defaults$3;
|
|
14928
14937
|
|
|
14929
|
-
var utils$4 = utils$
|
|
14938
|
+
var utils$4 = utils$a;
|
|
14930
14939
|
var defaults$2 = defaults_1;
|
|
14931
14940
|
|
|
14932
14941
|
/**
|
|
@@ -14960,7 +14969,7 @@ function requireIsCancel () {
|
|
|
14960
14969
|
return isCancel$1;
|
|
14961
14970
|
}
|
|
14962
14971
|
|
|
14963
|
-
var utils$3 = utils$
|
|
14972
|
+
var utils$3 = utils$a;
|
|
14964
14973
|
var transformData = transformData$1;
|
|
14965
14974
|
var isCancel = requireIsCancel();
|
|
14966
14975
|
var defaults$1 = defaults_1;
|
|
@@ -15046,7 +15055,7 @@ var dispatchRequest$1 = function dispatchRequest(config) {
|
|
|
15046
15055
|
});
|
|
15047
15056
|
};
|
|
15048
15057
|
|
|
15049
|
-
var utils$2 = utils$
|
|
15058
|
+
var utils$2 = utils$a;
|
|
15050
15059
|
|
|
15051
15060
|
/**
|
|
15052
15061
|
* Config-specific merge-function which creates a new config-object
|
|
@@ -15146,7 +15155,7 @@ var mergeConfig$2 = function mergeConfig(config1, config2) {
|
|
|
15146
15155
|
};
|
|
15147
15156
|
|
|
15148
15157
|
var VERSION = requireData().version;
|
|
15149
|
-
var AxiosError =
|
|
15158
|
+
var AxiosError = requireAxiosError();
|
|
15150
15159
|
|
|
15151
15160
|
var validators$1 = {};
|
|
15152
15161
|
|
|
@@ -15230,7 +15239,7 @@ var validator$1 = {
|
|
|
15230
15239
|
validators: validators$1
|
|
15231
15240
|
};
|
|
15232
15241
|
|
|
15233
|
-
var utils$1 = utils$
|
|
15242
|
+
var utils$1 = utils$a;
|
|
15234
15243
|
var buildURL = buildURL$1;
|
|
15235
15244
|
var InterceptorManager = InterceptorManager_1;
|
|
15236
15245
|
var dispatchRequest = dispatchRequest$1;
|
|
@@ -15558,7 +15567,7 @@ function requireIsAxiosError () {
|
|
|
15558
15567
|
if (hasRequiredIsAxiosError) return isAxiosError;
|
|
15559
15568
|
hasRequiredIsAxiosError = 1;
|
|
15560
15569
|
|
|
15561
|
-
var utils = utils$
|
|
15570
|
+
var utils = utils$a;
|
|
15562
15571
|
|
|
15563
15572
|
/**
|
|
15564
15573
|
* Determines whether the payload is an error thrown by Axios
|
|
@@ -15572,7 +15581,7 @@ function requireIsAxiosError () {
|
|
|
15572
15581
|
return isAxiosError;
|
|
15573
15582
|
}
|
|
15574
15583
|
|
|
15575
|
-
var utils = utils$
|
|
15584
|
+
var utils = utils$a;
|
|
15576
15585
|
var bind = bind$2;
|
|
15577
15586
|
var Axios = Axios_1;
|
|
15578
15587
|
var mergeConfig = mergeConfig$2;
|
|
@@ -15616,7 +15625,7 @@ axios$1.VERSION = requireData().version;
|
|
|
15616
15625
|
axios$1.toFormData = toFormData_1;
|
|
15617
15626
|
|
|
15618
15627
|
// Expose AxiosError class
|
|
15619
|
-
axios$1.AxiosError =
|
|
15628
|
+
axios$1.AxiosError = requireAxiosError();
|
|
15620
15629
|
|
|
15621
15630
|
// alias for CanceledError for backward compatibility
|
|
15622
15631
|
axios$1.Cancel = axios$1.CanceledError;
|
|
@@ -17312,9 +17321,9 @@ var EventsRoutes = /** @class */ (function () {
|
|
|
17312
17321
|
addRTMPSource: { url: '/events/{event_id}/addRTMPSource', method: HTTP_METHODS.POST },
|
|
17313
17322
|
updateRTMPSource: { url: '/events/{event_id}/updateRTMPSource/{subid}', method: HTTP_METHODS.PUT },
|
|
17314
17323
|
removeRTMPSource: { url: '/events/{event_id}/removeRTMPSource/{subid}', method: HTTP_METHODS.DELETE },
|
|
17315
|
-
uploadMainImage: { url: '/events/{event_id}/
|
|
17324
|
+
uploadMainImage: { url: '/events/{event_id}/uploadMainImage', method: HTTP_METHODS.POST },
|
|
17316
17325
|
uploadBannerImage: { url: '/events/{event_id}/uploadBannerImage', method: HTTP_METHODS.POST },
|
|
17317
|
-
enableBroadcastMode: { url: '/events/{event_id}/
|
|
17326
|
+
enableBroadcastMode: { url: '/events/{event_id}/enableBroadcastMode', method: HTTP_METHODS.POST },
|
|
17318
17327
|
enableLivestreamMode: { url: '/events/{event_id}/enableLivestreamMode', method: HTTP_METHODS.POST },
|
|
17319
17328
|
sendOnScreenContent: { url: '/events/{event_id}/sendOnScreenContent', method: HTTP_METHODS.POST },
|
|
17320
17329
|
addOverlay: { url: '/events/{event_id}/addOverlay', method: HTTP_METHODS.POST },
|
|
@@ -17324,7 +17333,7 @@ var EventsRoutes = /** @class */ (function () {
|
|
|
17324
17333
|
enableDonations: { url: '/events/{event_id}/enableDonations', method: HTTP_METHODS.POST },
|
|
17325
17334
|
disableDonations: { url: '/events/{event_id}/disableDonations', method: HTTP_METHODS.POST },
|
|
17326
17335
|
sendInvite: { url: '/events/{event_id}/sendInvite', method: HTTP_METHODS.POST },
|
|
17327
|
-
acceptInvite: { url: '/events/{event_id}/
|
|
17336
|
+
acceptInvite: { url: '/events/{event_id}/acceptInvite', method: HTTP_METHODS.POST }
|
|
17328
17337
|
};
|
|
17329
17338
|
return EventsRoutes;
|
|
17330
17339
|
}());
|