glitch-javascript-sdk 0.5.3 → 0.5.5
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 +267 -163
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Events.d.ts +33 -0
- package/dist/esm/api/Users.d.ts +32 -0
- package/dist/esm/index.js +86 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +65 -0
- package/package.json +1 -1
- package/src/api/Events.ts +46 -0
- package/src/api/Users.ts +48 -0
- package/src/routes/EventsRoute.ts +3 -3
- package/src/routes/UserRoutes.ts +4 -0
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$9 = {
|
|
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$8 = utils$9;
|
|
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$8.isURLSearchParams(params)) {
|
|
591
591
|
serializedParams = params.toString();
|
|
592
592
|
} else {
|
|
593
593
|
var parts = [];
|
|
594
594
|
|
|
595
|
-
utils$
|
|
595
|
+
utils$8.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$8.isArray(val)) {
|
|
601
601
|
key = key + '[]';
|
|
602
602
|
} else {
|
|
603
603
|
val = [val];
|
|
604
604
|
}
|
|
605
605
|
|
|
606
|
-
utils$
|
|
607
|
-
if (utils$
|
|
606
|
+
utils$8.forEach(val, function parseValue(v) {
|
|
607
|
+
if (utils$8.isDate(v)) {
|
|
608
608
|
v = v.toISOString();
|
|
609
|
-
} else if (utils$
|
|
609
|
+
} else if (utils$8.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$7 = utils$9;
|
|
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$7.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$6 = utils$9;
|
|
685
685
|
|
|
686
686
|
var normalizeHeaderName$1 = function normalizeHeaderName(headers, normalizedName) {
|
|
687
|
-
utils$
|
|
687
|
+
utils$6.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$9;
|
|
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
|
+
}
|
|
723
|
+
|
|
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
|
+
});
|
|
757
745
|
|
|
758
|
-
|
|
759
|
-
|
|
746
|
+
var prototype = AxiosError.prototype;
|
|
747
|
+
var descriptors = {};
|
|
760
748
|
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
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
|
+
});
|
|
764
764
|
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
});
|
|
765
|
+
Object.defineProperties(AxiosError, descriptors);
|
|
766
|
+
Object.defineProperty(prototype, 'isAxiosError', {value: true});
|
|
768
767
|
|
|
769
|
-
|
|
768
|
+
// eslint-disable-next-line func-names
|
|
769
|
+
AxiosError.from = function(error, code, config, request, response, customProps) {
|
|
770
|
+
var axiosError = Object.create(prototype);
|
|
770
771
|
|
|
771
|
-
|
|
772
|
+
utils.toFlatObject(error, axiosError, function filter(obj) {
|
|
773
|
+
return obj !== Error.prototype;
|
|
774
|
+
});
|
|
772
775
|
|
|
773
|
-
|
|
776
|
+
AxiosError.call(axiosError, error.message, code, config, request, response);
|
|
774
777
|
|
|
775
|
-
|
|
776
|
-
};
|
|
778
|
+
axiosError.name = error.name;
|
|
777
779
|
|
|
778
|
-
|
|
780
|
+
customProps && Object.assign(axiosError, customProps);
|
|
781
|
+
|
|
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,76 +792,85 @@ var transitional = {
|
|
|
783
792
|
clarifyTimeoutError: false
|
|
784
793
|
};
|
|
785
794
|
|
|
786
|
-
var
|
|
795
|
+
var toFormData_1;
|
|
796
|
+
var hasRequiredToFormData;
|
|
787
797
|
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
* @param {?Object} [formData]
|
|
792
|
-
* @returns {Object}
|
|
793
|
-
**/
|
|
798
|
+
function requireToFormData () {
|
|
799
|
+
if (hasRequiredToFormData) return toFormData_1;
|
|
800
|
+
hasRequiredToFormData = 1;
|
|
794
801
|
|
|
795
|
-
|
|
796
|
-
// eslint-disable-next-line no-param-reassign
|
|
797
|
-
formData = formData || new FormData();
|
|
802
|
+
var utils = utils$9;
|
|
798
803
|
|
|
799
|
-
|
|
804
|
+
/**
|
|
805
|
+
* Convert a data object to FormData
|
|
806
|
+
* @param {Object} obj
|
|
807
|
+
* @param {?Object} [formData]
|
|
808
|
+
* @returns {Object}
|
|
809
|
+
**/
|
|
800
810
|
|
|
801
|
-
|
|
802
|
-
|
|
811
|
+
function toFormData(obj, formData) {
|
|
812
|
+
// eslint-disable-next-line no-param-reassign
|
|
813
|
+
formData = formData || new FormData();
|
|
803
814
|
|
|
804
|
-
|
|
805
|
-
return value.toISOString();
|
|
806
|
-
}
|
|
815
|
+
var stack = [];
|
|
807
816
|
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
}
|
|
817
|
+
function convertValue(value) {
|
|
818
|
+
if (value === null) return '';
|
|
811
819
|
|
|
812
|
-
|
|
813
|
-
|
|
820
|
+
if (utils.isDate(value)) {
|
|
821
|
+
return value.toISOString();
|
|
822
|
+
}
|
|
814
823
|
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
throw Error('Circular reference detected in ' + parentKey);
|
|
819
|
-
}
|
|
824
|
+
if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
|
|
825
|
+
return typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
|
|
826
|
+
}
|
|
820
827
|
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
utils$6.forEach(data, function each(value, key) {
|
|
824
|
-
if (utils$6.isUndefined(value)) return;
|
|
825
|
-
var fullKey = parentKey ? parentKey + '.' + key : key;
|
|
826
|
-
var arr;
|
|
827
|
-
|
|
828
|
-
if (value && !parentKey && typeof value === 'object') {
|
|
829
|
-
if (utils$6.endsWith(key, '{}')) {
|
|
830
|
-
// eslint-disable-next-line no-param-reassign
|
|
831
|
-
value = JSON.stringify(value);
|
|
832
|
-
} else if (utils$6.endsWith(key, '[]') && (arr = utils$6.toArray(value))) {
|
|
833
|
-
// eslint-disable-next-line func-names
|
|
834
|
-
arr.forEach(function(el) {
|
|
835
|
-
!utils$6.isUndefined(el) && formData.append(fullKey, convertValue(el));
|
|
836
|
-
});
|
|
837
|
-
return;
|
|
838
|
-
}
|
|
839
|
-
}
|
|
828
|
+
return value;
|
|
829
|
+
}
|
|
840
830
|
|
|
841
|
-
|
|
842
|
-
|
|
831
|
+
function build(data, parentKey) {
|
|
832
|
+
if (utils.isPlainObject(data) || utils.isArray(data)) {
|
|
833
|
+
if (stack.indexOf(data) !== -1) {
|
|
834
|
+
throw Error('Circular reference detected in ' + parentKey);
|
|
835
|
+
}
|
|
843
836
|
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
837
|
+
stack.push(data);
|
|
838
|
+
|
|
839
|
+
utils.forEach(data, function each(value, key) {
|
|
840
|
+
if (utils.isUndefined(value)) return;
|
|
841
|
+
var fullKey = parentKey ? parentKey + '.' + key : key;
|
|
842
|
+
var arr;
|
|
843
|
+
|
|
844
|
+
if (value && !parentKey && typeof value === 'object') {
|
|
845
|
+
if (utils.endsWith(key, '{}')) {
|
|
846
|
+
// eslint-disable-next-line no-param-reassign
|
|
847
|
+
value = JSON.stringify(value);
|
|
848
|
+
} else if (utils.endsWith(key, '[]') && (arr = utils.toArray(value))) {
|
|
849
|
+
// eslint-disable-next-line func-names
|
|
850
|
+
arr.forEach(function(el) {
|
|
851
|
+
!utils.isUndefined(el) && formData.append(fullKey, convertValue(el));
|
|
852
|
+
});
|
|
853
|
+
return;
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
build(value, fullKey);
|
|
858
|
+
});
|
|
849
859
|
|
|
850
|
-
|
|
860
|
+
stack.pop();
|
|
861
|
+
} else {
|
|
862
|
+
formData.append(parentKey, convertValue(data));
|
|
863
|
+
}
|
|
864
|
+
}
|
|
851
865
|
|
|
852
|
-
|
|
853
|
-
|
|
866
|
+
build(obj);
|
|
867
|
+
|
|
868
|
+
return formData;
|
|
869
|
+
}
|
|
854
870
|
|
|
855
|
-
|
|
871
|
+
toFormData_1 = toFormData;
|
|
872
|
+
return toFormData_1;
|
|
873
|
+
}
|
|
856
874
|
|
|
857
875
|
var settle;
|
|
858
876
|
var hasRequiredSettle;
|
|
@@ -861,7 +879,7 @@ function requireSettle () {
|
|
|
861
879
|
if (hasRequiredSettle) return settle;
|
|
862
880
|
hasRequiredSettle = 1;
|
|
863
881
|
|
|
864
|
-
var AxiosError =
|
|
882
|
+
var AxiosError = requireAxiosError();
|
|
865
883
|
|
|
866
884
|
/**
|
|
867
885
|
* Resolve or reject a Promise based on response status.
|
|
@@ -894,7 +912,7 @@ function requireCookies () {
|
|
|
894
912
|
if (hasRequiredCookies) return cookies;
|
|
895
913
|
hasRequiredCookies = 1;
|
|
896
914
|
|
|
897
|
-
var utils = utils$
|
|
915
|
+
var utils = utils$9;
|
|
898
916
|
|
|
899
917
|
cookies = (
|
|
900
918
|
utils.isStandardBrowserEnv() ?
|
|
@@ -1000,7 +1018,7 @@ function requireParseHeaders () {
|
|
|
1000
1018
|
if (hasRequiredParseHeaders) return parseHeaders;
|
|
1001
1019
|
hasRequiredParseHeaders = 1;
|
|
1002
1020
|
|
|
1003
|
-
var utils = utils$
|
|
1021
|
+
var utils = utils$9;
|
|
1004
1022
|
|
|
1005
1023
|
// Headers whose duplicates are ignored by node
|
|
1006
1024
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
@@ -1061,7 +1079,7 @@ function requireIsURLSameOrigin () {
|
|
|
1061
1079
|
if (hasRequiredIsURLSameOrigin) return isURLSameOrigin;
|
|
1062
1080
|
hasRequiredIsURLSameOrigin = 1;
|
|
1063
1081
|
|
|
1064
|
-
var utils = utils$
|
|
1082
|
+
var utils = utils$9;
|
|
1065
1083
|
|
|
1066
1084
|
isURLSameOrigin = (
|
|
1067
1085
|
utils.isStandardBrowserEnv() ?
|
|
@@ -1137,8 +1155,8 @@ function requireCanceledError () {
|
|
|
1137
1155
|
if (hasRequiredCanceledError) return CanceledError_1;
|
|
1138
1156
|
hasRequiredCanceledError = 1;
|
|
1139
1157
|
|
|
1140
|
-
var AxiosError =
|
|
1141
|
-
var utils = utils$
|
|
1158
|
+
var AxiosError = requireAxiosError();
|
|
1159
|
+
var utils = utils$9;
|
|
1142
1160
|
|
|
1143
1161
|
/**
|
|
1144
1162
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
@@ -1181,7 +1199,7 @@ function requireXhr () {
|
|
|
1181
1199
|
if (hasRequiredXhr) return xhr;
|
|
1182
1200
|
hasRequiredXhr = 1;
|
|
1183
1201
|
|
|
1184
|
-
var utils = utils$
|
|
1202
|
+
var utils = utils$9;
|
|
1185
1203
|
var settle = requireSettle();
|
|
1186
1204
|
var cookies = requireCookies();
|
|
1187
1205
|
var buildURL = buildURL$1;
|
|
@@ -1189,7 +1207,7 @@ function requireXhr () {
|
|
|
1189
1207
|
var parseHeaders = requireParseHeaders();
|
|
1190
1208
|
var isURLSameOrigin = requireIsURLSameOrigin();
|
|
1191
1209
|
var transitionalDefaults = transitional;
|
|
1192
|
-
var AxiosError =
|
|
1210
|
+
var AxiosError = requireAxiosError();
|
|
1193
1211
|
var CanceledError = requireCanceledError();
|
|
1194
1212
|
var parseProtocol = requireParseProtocol();
|
|
1195
1213
|
|
|
@@ -2082,7 +2100,7 @@ function requireHttp () {
|
|
|
2082
2100
|
if (hasRequiredHttp) return http_1;
|
|
2083
2101
|
hasRequiredHttp = 1;
|
|
2084
2102
|
|
|
2085
|
-
var utils = utils$
|
|
2103
|
+
var utils = utils$9;
|
|
2086
2104
|
var settle = requireSettle();
|
|
2087
2105
|
var buildFullPath = buildFullPath$1;
|
|
2088
2106
|
var buildURL = buildURL$1;
|
|
@@ -2094,7 +2112,7 @@ function requireHttp () {
|
|
|
2094
2112
|
var zlib = require$$8;
|
|
2095
2113
|
var VERSION = requireData().version;
|
|
2096
2114
|
var transitionalDefaults = transitional;
|
|
2097
|
-
var AxiosError =
|
|
2115
|
+
var AxiosError = requireAxiosError();
|
|
2098
2116
|
var CanceledError = requireCanceledError();
|
|
2099
2117
|
|
|
2100
2118
|
var isHttps = /https:?/;
|
|
@@ -14781,11 +14799,11 @@ function requireFormData () {
|
|
|
14781
14799
|
return FormDataExports;
|
|
14782
14800
|
}
|
|
14783
14801
|
|
|
14784
|
-
var utils$5 = utils$
|
|
14802
|
+
var utils$5 = utils$9;
|
|
14785
14803
|
var normalizeHeaderName = normalizeHeaderName$1;
|
|
14786
|
-
var AxiosError$1 =
|
|
14804
|
+
var AxiosError$1 = requireAxiosError();
|
|
14787
14805
|
var transitionalDefaults = transitional;
|
|
14788
|
-
var toFormData =
|
|
14806
|
+
var toFormData = requireToFormData();
|
|
14789
14807
|
|
|
14790
14808
|
var DEFAULT_CONTENT_TYPE = {
|
|
14791
14809
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
@@ -14926,7 +14944,7 @@ utils$5.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method)
|
|
|
14926
14944
|
|
|
14927
14945
|
var defaults_1 = defaults$3;
|
|
14928
14946
|
|
|
14929
|
-
var utils$4 = utils$
|
|
14947
|
+
var utils$4 = utils$9;
|
|
14930
14948
|
var defaults$2 = defaults_1;
|
|
14931
14949
|
|
|
14932
14950
|
/**
|
|
@@ -14960,7 +14978,7 @@ function requireIsCancel () {
|
|
|
14960
14978
|
return isCancel$1;
|
|
14961
14979
|
}
|
|
14962
14980
|
|
|
14963
|
-
var utils$3 = utils$
|
|
14981
|
+
var utils$3 = utils$9;
|
|
14964
14982
|
var transformData = transformData$1;
|
|
14965
14983
|
var isCancel = requireIsCancel();
|
|
14966
14984
|
var defaults$1 = defaults_1;
|
|
@@ -15046,7 +15064,7 @@ var dispatchRequest$1 = function dispatchRequest(config) {
|
|
|
15046
15064
|
});
|
|
15047
15065
|
};
|
|
15048
15066
|
|
|
15049
|
-
var utils$2 = utils$
|
|
15067
|
+
var utils$2 = utils$9;
|
|
15050
15068
|
|
|
15051
15069
|
/**
|
|
15052
15070
|
* Config-specific merge-function which creates a new config-object
|
|
@@ -15146,7 +15164,7 @@ var mergeConfig$2 = function mergeConfig(config1, config2) {
|
|
|
15146
15164
|
};
|
|
15147
15165
|
|
|
15148
15166
|
var VERSION = requireData().version;
|
|
15149
|
-
var AxiosError =
|
|
15167
|
+
var AxiosError = requireAxiosError();
|
|
15150
15168
|
|
|
15151
15169
|
var validators$1 = {};
|
|
15152
15170
|
|
|
@@ -15230,7 +15248,7 @@ var validator$1 = {
|
|
|
15230
15248
|
validators: validators$1
|
|
15231
15249
|
};
|
|
15232
15250
|
|
|
15233
|
-
var utils$1 = utils$
|
|
15251
|
+
var utils$1 = utils$9;
|
|
15234
15252
|
var buildURL = buildURL$1;
|
|
15235
15253
|
var InterceptorManager = InterceptorManager_1;
|
|
15236
15254
|
var dispatchRequest = dispatchRequest$1;
|
|
@@ -15558,7 +15576,7 @@ function requireIsAxiosError () {
|
|
|
15558
15576
|
if (hasRequiredIsAxiosError) return isAxiosError;
|
|
15559
15577
|
hasRequiredIsAxiosError = 1;
|
|
15560
15578
|
|
|
15561
|
-
var utils = utils$
|
|
15579
|
+
var utils = utils$9;
|
|
15562
15580
|
|
|
15563
15581
|
/**
|
|
15564
15582
|
* Determines whether the payload is an error thrown by Axios
|
|
@@ -15572,7 +15590,7 @@ function requireIsAxiosError () {
|
|
|
15572
15590
|
return isAxiosError;
|
|
15573
15591
|
}
|
|
15574
15592
|
|
|
15575
|
-
var utils = utils$
|
|
15593
|
+
var utils = utils$9;
|
|
15576
15594
|
var bind = bind$2;
|
|
15577
15595
|
var Axios = Axios_1;
|
|
15578
15596
|
var mergeConfig = mergeConfig$2;
|
|
@@ -15613,10 +15631,10 @@ axios$1.CanceledError = requireCanceledError();
|
|
|
15613
15631
|
axios$1.CancelToken = requireCancelToken();
|
|
15614
15632
|
axios$1.isCancel = requireIsCancel();
|
|
15615
15633
|
axios$1.VERSION = requireData().version;
|
|
15616
|
-
axios$1.toFormData =
|
|
15634
|
+
axios$1.toFormData = requireToFormData();
|
|
15617
15635
|
|
|
15618
15636
|
// Expose AxiosError class
|
|
15619
|
-
axios$1.AxiosError =
|
|
15637
|
+
axios$1.AxiosError = requireAxiosError();
|
|
15620
15638
|
|
|
15621
15639
|
// alias for CanceledError for backward compatibility
|
|
15622
15640
|
axios$1.Cancel = axios$1.CanceledError;
|
|
@@ -17120,6 +17138,10 @@ var UserRoutes = /** @class */ (function () {
|
|
|
17120
17138
|
clearStripeAuth: { url: '/users/clearStripeAuth', method: HTTP_METHODS.DELETE },
|
|
17121
17139
|
clearTikTokAuth: { url: '/users/clearTikTokAuth', method: HTTP_METHODS.DELETE },
|
|
17122
17140
|
clearYoutubeAuth: { url: '/users/clearYoutubeAuth', method: HTTP_METHODS.DELETE },
|
|
17141
|
+
getTipsReceivedForMonth: { url: '/users/getTipsReceivedForMonth', method: HTTP_METHODS.GET },
|
|
17142
|
+
getTipsGivenForMonth: { url: '/users/getTipsGivenForMonth', method: HTTP_METHODS.GET },
|
|
17143
|
+
aggregateMonthlyReceivedTips: { url: '/users/aggregateMonthlyReceivedTips', method: HTTP_METHODS.GET },
|
|
17144
|
+
aggregateMonthlyGivenTips: { url: '/users/aggregateMonthlyGivenTips', method: HTTP_METHODS.GET },
|
|
17123
17145
|
};
|
|
17124
17146
|
return UserRoutes;
|
|
17125
17147
|
}());
|
|
@@ -17319,6 +17341,46 @@ var Users = /** @class */ (function () {
|
|
|
17319
17341
|
Users.clearYoutubeAuth = function () {
|
|
17320
17342
|
return Requests.processRoute(UserRoutes.routes.clearYoutubeAuth, {});
|
|
17321
17343
|
};
|
|
17344
|
+
/**
|
|
17345
|
+
* Returns a list of tips received by the authenticated user for a given month and year
|
|
17346
|
+
*
|
|
17347
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
17348
|
+
*
|
|
17349
|
+
* @returns promise
|
|
17350
|
+
*/
|
|
17351
|
+
Users.getTipsReceivedForMonth = function (params) {
|
|
17352
|
+
return Requests.processRoute(UserRoutes.routes.getTipsReceivedForMonth, undefined, undefined, params);
|
|
17353
|
+
};
|
|
17354
|
+
/**
|
|
17355
|
+
* Returns a list of tips given by the authenticated user for a given month and year.
|
|
17356
|
+
*
|
|
17357
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
17358
|
+
*
|
|
17359
|
+
* @returns promise
|
|
17360
|
+
*/
|
|
17361
|
+
Users.getTipsGivenForMonth = function (params) {
|
|
17362
|
+
return Requests.processRoute(UserRoutes.routes.getTipsGivenForMonth, undefined, undefined, params);
|
|
17363
|
+
};
|
|
17364
|
+
/**
|
|
17365
|
+
* Returns the aggregated monthly tips received by the authenticated user over a certain number of months. Defaults to 12 months if not provided.
|
|
17366
|
+
*
|
|
17367
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
17368
|
+
*
|
|
17369
|
+
* @returns promise
|
|
17370
|
+
*/
|
|
17371
|
+
Users.aggregateMonthlyReceivedTips = function (params) {
|
|
17372
|
+
return Requests.processRoute(UserRoutes.routes.aggregateMonthlyReceivedTips, undefined, undefined, params);
|
|
17373
|
+
};
|
|
17374
|
+
/**
|
|
17375
|
+
* Returns the aggregated monthly tips given by the authenticated user over a certain number of months. Defaults to 12 months if not provided.
|
|
17376
|
+
*
|
|
17377
|
+
* @see https://api.glitch.fun/api/documentation#/Users%20Route/userCreateDonationPage
|
|
17378
|
+
*
|
|
17379
|
+
* @returns promise
|
|
17380
|
+
*/
|
|
17381
|
+
Users.aggregateMonthlyGivenTips = function (params) {
|
|
17382
|
+
return Requests.processRoute(UserRoutes.routes.aggregateMonthlyGivenTips, undefined, undefined, params);
|
|
17383
|
+
};
|
|
17322
17384
|
return Users;
|
|
17323
17385
|
}());
|
|
17324
17386
|
|
|
@@ -17352,6 +17414,9 @@ var EventsRoutes = /** @class */ (function () {
|
|
|
17352
17414
|
addTwitchMulticast: { url: '/events/{event_id}/addTwitchMulticast', method: HTTP_METHODS.POST },
|
|
17353
17415
|
addFacebookMulticast: { url: '/events/{event_id}/addFacebookMulticast', method: HTTP_METHODS.POST },
|
|
17354
17416
|
addYoutubeMulticast: { url: '/events/{event_id}/addYoutubeMulticast', method: HTTP_METHODS.POST },
|
|
17417
|
+
enableWidget: { url: '/events/{event_id}/enableWidget/{widget_id}', method: HTTP_METHODS.POST },
|
|
17418
|
+
disableWidget: { url: '/events/{event_id}/disableWidget/{widget_id}', method: HTTP_METHODS.DELETE },
|
|
17419
|
+
getTips: { url: '/events/{event_id}/tips', method: HTTP_METHODS.GET },
|
|
17355
17420
|
};
|
|
17356
17421
|
return EventsRoutes;
|
|
17357
17422
|
}());
|
|
@@ -17732,6 +17797,45 @@ var Events = /** @class */ (function () {
|
|
|
17732
17797
|
Events.updateRecording = function (event_id, recording_id, data, params) {
|
|
17733
17798
|
return Requests.processRoute(RecordingsRoute.routes.update, data, { event_id: event_id, recording_id: recording_id }, params);
|
|
17734
17799
|
};
|
|
17800
|
+
/**
|
|
17801
|
+
* Enable a widget for the current event.
|
|
17802
|
+
*
|
|
17803
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
|
|
17804
|
+
*
|
|
17805
|
+
* @param event_id The id of the event to update.
|
|
17806
|
+
* @param widget_id The id of the widget to enable.
|
|
17807
|
+
* @param data The data, which should contain the roles.
|
|
17808
|
+
*
|
|
17809
|
+
* @returns promise
|
|
17810
|
+
*/
|
|
17811
|
+
Events.enableWidget = function (event_id, widget_id, data, params) {
|
|
17812
|
+
return Requests.processRoute(EventsRoutes.routes.enableWidget, data, { event_id: event_id, widget_id: widget_id }, params);
|
|
17813
|
+
};
|
|
17814
|
+
/**
|
|
17815
|
+
* Disable a widget for the current event.
|
|
17816
|
+
*
|
|
17817
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
|
|
17818
|
+
*
|
|
17819
|
+
* @param event_id The id of the event to update.
|
|
17820
|
+
* @param widget_id The id of the widget to disable.
|
|
17821
|
+
*
|
|
17822
|
+
* @returns promise
|
|
17823
|
+
*/
|
|
17824
|
+
Events.disableWidget = function (event_id, widget_id, data, params) {
|
|
17825
|
+
return Requests.processRoute(EventsRoutes.routes.disableWidget, data, { event_id: event_id, widget_id: widget_id }, params);
|
|
17826
|
+
};
|
|
17827
|
+
/**
|
|
17828
|
+
* Get all the tips associated with the current event.
|
|
17829
|
+
*
|
|
17830
|
+
* @see https://api.glitch.fun/api/documentation#/Event%20Route/updateEventRecording
|
|
17831
|
+
*
|
|
17832
|
+
* @param event_id The id of the event to update.
|
|
17833
|
+
*
|
|
17834
|
+
* @returns promise
|
|
17835
|
+
*/
|
|
17836
|
+
Events.getTips = function (event_id, params) {
|
|
17837
|
+
return Requests.processRoute(EventsRoutes.routes.getTips, {}, { event_id: event_id }, params);
|
|
17838
|
+
};
|
|
17735
17839
|
return Events;
|
|
17736
17840
|
}());
|
|
17737
17841
|
|