@selfcommunity/api-services 0.1.2-alpha.0
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/LICENSE.md +21 -0
- package/README.md +12 -0
- package/lib/cjs/client/index.js +170 -0
- package/lib/cjs/constants/Endpoints.js +622 -0
- package/lib/cjs/index.d.js +2 -0
- package/lib/cjs/index.js +46 -0
- package/lib/cjs/services/category/index.js +64 -0
- package/lib/cjs/services/feature/index.js +42 -0
- package/lib/cjs/services/preference/index.js +100 -0
- package/lib/cjs/services/user/index.js +85 -0
- package/lib/cjs/utils/http.js +51 -0
- package/lib/cjs/utils/token.js +36 -0
- package/lib/esm/api-services/src/client/index.d.ts +115 -0
- package/lib/esm/api-services/src/client/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/constants/Endpoints.d.ts +10 -0
- package/lib/esm/api-services/src/constants/Endpoints.d.ts.map +1 -0
- package/lib/esm/api-services/src/index.d.ts +24 -0
- package/lib/esm/api-services/src/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/category/index.d.ts +13 -0
- package/lib/esm/api-services/src/services/category/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/feature/index.d.ts +10 -0
- package/lib/esm/api-services/src/services/feature/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/preference/index.d.ts +16 -0
- package/lib/esm/api-services/src/services/preference/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/user/index.d.ts +16 -0
- package/lib/esm/api-services/src/services/user/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/utils/http.d.ts +6 -0
- package/lib/esm/api-services/src/utils/http.d.ts.map +1 -0
- package/lib/esm/api-services/src/utils/token.d.ts +16 -0
- package/lib/esm/api-services/src/utils/token.d.ts.map +1 -0
- package/lib/esm/client/index.js +170 -0
- package/lib/esm/constants/Endpoints.js +622 -0
- package/lib/esm/index.d.js +2 -0
- package/lib/esm/index.js +46 -0
- package/lib/esm/services/category/index.js +64 -0
- package/lib/esm/services/feature/index.js +42 -0
- package/lib/esm/services/preference/index.js +100 -0
- package/lib/esm/services/user/index.js +85 -0
- package/lib/esm/utils/http.js +51 -0
- package/lib/esm/utils/src/index.d.ts +7 -0
- package/lib/esm/utils/src/index.d.ts.map +1 -0
- package/lib/esm/utils/src/utils/string.d.ts +21 -0
- package/lib/esm/utils/src/utils/string.d.ts.map +1 -0
- package/lib/esm/utils/src/utils/url.d.ts +22 -0
- package/lib/esm/utils/src/utils/url.d.ts.map +1 -0
- package/lib/esm/utils/token.js +36 -0
- package/lib/umd/api-services.js +3 -0
- package/lib/umd/api-services.js.LICENSE.txt +1 -0
- package/lib/umd/api-services.js.map +1 -0
- package/package.json +114 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = exports.CategoryApiClient = void 0;
|
|
5
|
+
|
|
6
|
+
var _client = _interopRequireDefault(require("../../client"));
|
|
7
|
+
|
|
8
|
+
var _Endpoints = _interopRequireDefault(require("../../constants/Endpoints"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
class CategoryApiClient {
|
|
13
|
+
static getAllCategories() {
|
|
14
|
+
return _client.default.request({
|
|
15
|
+
url: _Endpoints.default.Category.url({}),
|
|
16
|
+
method: _Endpoints.default.Category.method
|
|
17
|
+
}).then(res => {
|
|
18
|
+
if (res.status >= 300) {
|
|
19
|
+
console.log(`Unable to retrieve categories (Response code: ${res.status}).`);
|
|
20
|
+
return Promise.reject(res);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return Promise.resolve(res);
|
|
24
|
+
}).catch(error => {
|
|
25
|
+
console.log('Unable to retrieve categories.');
|
|
26
|
+
return Promise.reject(error);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
static getSpecificCategory(id) {
|
|
31
|
+
return _client.default.request({
|
|
32
|
+
url: _Endpoints.default.Category.url({
|
|
33
|
+
id
|
|
34
|
+
}),
|
|
35
|
+
method: _Endpoints.default.User.method
|
|
36
|
+
}).then(res => {
|
|
37
|
+
if (res.status >= 300) {
|
|
38
|
+
console.log(`Unable to retrieve category (Response code: ${res.status}).`);
|
|
39
|
+
return Promise.reject(res);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return Promise.resolve(res);
|
|
43
|
+
}).catch(error => {
|
|
44
|
+
console.log('Unable to retrieve category.');
|
|
45
|
+
return Promise.reject(error);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
exports.CategoryApiClient = CategoryApiClient;
|
|
52
|
+
|
|
53
|
+
class CategoryService {
|
|
54
|
+
static async getAllCategories() {
|
|
55
|
+
return CategoryApiClient.getAllCategories();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
static async getSpecificCategory(id) {
|
|
59
|
+
return CategoryApiClient.getSpecificCategory(id);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
exports.default = CategoryService;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = exports.FeatureApiClient = void 0;
|
|
5
|
+
|
|
6
|
+
var _client = _interopRequireDefault(require("../../client"));
|
|
7
|
+
|
|
8
|
+
var _Endpoints = _interopRequireDefault(require("../../constants/Endpoints"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
class FeatureApiClient {
|
|
13
|
+
static getAllFeatures() {
|
|
14
|
+
return _client.default.request({
|
|
15
|
+
url: _Endpoints.default.Feature.url({}),
|
|
16
|
+
method: _Endpoints.default.Feature.method
|
|
17
|
+
}).then(res => {
|
|
18
|
+
if (res.status >= 300) {
|
|
19
|
+
console.log(`Unable to retrieve community preferences (Response code: ${res.status}).`);
|
|
20
|
+
return Promise.reject(res);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const data = res.data['results'].map(f => f.name);
|
|
24
|
+
return Promise.resolve(data);
|
|
25
|
+
}).catch(error => {
|
|
26
|
+
console.log('Unable to retrieve features.');
|
|
27
|
+
return Promise.reject(error);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
exports.FeatureApiClient = FeatureApiClient;
|
|
34
|
+
|
|
35
|
+
class FeatureService {
|
|
36
|
+
static async getAllFeatures() {
|
|
37
|
+
return FeatureApiClient.getAllFeatures();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
exports.default = FeatureService;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = exports.PreferenceApiClient = void 0;
|
|
5
|
+
|
|
6
|
+
var _client = _interopRequireDefault(require("../../client"));
|
|
7
|
+
|
|
8
|
+
var _Endpoints = _interopRequireDefault(require("../../constants/Endpoints"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
class PreferenceApiClient {
|
|
13
|
+
static getAllPreferences() {
|
|
14
|
+
return _client.default.request({
|
|
15
|
+
url: _Endpoints.default.Preferences.url({}),
|
|
16
|
+
method: _Endpoints.default.Preferences.method
|
|
17
|
+
}).then(res => {
|
|
18
|
+
if (res.status >= 300) {
|
|
19
|
+
console.log(`Unable to retrieve community preferences (Response code: ${res.status}).`);
|
|
20
|
+
return Promise.reject(res);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const data = res.data['results'].reduce((obj, p) => Object.assign({}, obj, {
|
|
24
|
+
[`${p.section}.${p.name}`]: p
|
|
25
|
+
}), {});
|
|
26
|
+
return Promise.resolve(data);
|
|
27
|
+
}).catch(error => {
|
|
28
|
+
console.log('Unable to retrieve community preferences.');
|
|
29
|
+
return Promise.reject(error);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
static searchPreferences(search, section, keys, ordering) {
|
|
34
|
+
const params = new URLSearchParams(Object.assign({}, search && {
|
|
35
|
+
search: search
|
|
36
|
+
}, section && {
|
|
37
|
+
section: section
|
|
38
|
+
}, keys && {
|
|
39
|
+
keys: keys
|
|
40
|
+
}, ordering && {
|
|
41
|
+
ordering: ordering
|
|
42
|
+
}));
|
|
43
|
+
return _client.default.request({
|
|
44
|
+
url: `${_Endpoints.default.Preferences.url({})}?${params.toString()}`,
|
|
45
|
+
method: _Endpoints.default.Preferences.method
|
|
46
|
+
}).then(res => {
|
|
47
|
+
if (res.status >= 300) {
|
|
48
|
+
console.log(`Unable to retrieve community preferences (Response code: ${res.status}).`);
|
|
49
|
+
return Promise.reject(res);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const data = res.data['results'].reduce((obj, p) => Object.assign({}, obj, {
|
|
53
|
+
[`${p.section}.${p.name}`]: p
|
|
54
|
+
}), {});
|
|
55
|
+
return Promise.resolve(res);
|
|
56
|
+
}).catch(error => {
|
|
57
|
+
console.log('Unable to retrieve community preferences.');
|
|
58
|
+
return Promise.reject(error);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
static getSpecificPreference(id) {
|
|
63
|
+
return _client.default.request({
|
|
64
|
+
url: _Endpoints.default.Preferences.url({
|
|
65
|
+
id
|
|
66
|
+
}),
|
|
67
|
+
method: _Endpoints.default.Preferences.method
|
|
68
|
+
}).then(res => {
|
|
69
|
+
if (res.status >= 300) {
|
|
70
|
+
console.log(`Unable to retrieve community preference (Response code: ${res.status}).`);
|
|
71
|
+
return Promise.reject(res);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return Promise.resolve(res);
|
|
75
|
+
}).catch(error => {
|
|
76
|
+
console.log('Unable to retrieve community preference.');
|
|
77
|
+
return Promise.reject(error);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
exports.PreferenceApiClient = PreferenceApiClient;
|
|
84
|
+
|
|
85
|
+
class PreferenceService {
|
|
86
|
+
static async getAllPreferences() {
|
|
87
|
+
return PreferenceApiClient.getAllPreferences();
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
static async searchPreferences(search, section, keys, ordering) {
|
|
91
|
+
return PreferenceApiClient.searchPreferences(search, section, keys, ordering);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
static async getSpecificPreference(id) {
|
|
95
|
+
return PreferenceApiClient.getSpecificPreference(id);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
exports.default = PreferenceService;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = exports.UserApiClient = void 0;
|
|
5
|
+
|
|
6
|
+
var _client = _interopRequireDefault(require("../../client"));
|
|
7
|
+
|
|
8
|
+
var _Endpoints = _interopRequireDefault(require("../../constants/Endpoints"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
class UserApiClient {
|
|
13
|
+
static getAllUsers() {
|
|
14
|
+
return _client.default.request({
|
|
15
|
+
url: _Endpoints.default.User.url({}),
|
|
16
|
+
method: _Endpoints.default.User.method
|
|
17
|
+
}).then(res => {
|
|
18
|
+
if (res.status >= 300) {
|
|
19
|
+
console.log(`Unable to retrieve users (Response code: ${res.status}).`);
|
|
20
|
+
return Promise.reject(res);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return Promise.resolve(res);
|
|
24
|
+
}).catch(error => {
|
|
25
|
+
console.log('Unable to retrieve users.');
|
|
26
|
+
return Promise.reject(error);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
static getSpecificUser(id) {
|
|
31
|
+
return _client.default.request({
|
|
32
|
+
url: _Endpoints.default.User.url({
|
|
33
|
+
id
|
|
34
|
+
}),
|
|
35
|
+
method: _Endpoints.default.User.method
|
|
36
|
+
}).then(res => {
|
|
37
|
+
if (res.status >= 300) {
|
|
38
|
+
console.log(`Unable to retrieve user (Response code: ${res.status}).`);
|
|
39
|
+
return Promise.reject(res);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return Promise.resolve(res);
|
|
43
|
+
}).catch(error => {
|
|
44
|
+
console.log('Unable to retrieve user.');
|
|
45
|
+
return Promise.reject(error);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
static getCurrentUser() {
|
|
50
|
+
return _client.default.request({
|
|
51
|
+
url: _Endpoints.default.Me.url(),
|
|
52
|
+
method: _Endpoints.default.Me.method
|
|
53
|
+
}).then(res => {
|
|
54
|
+
if (res.status >= 300) {
|
|
55
|
+
console.log(`Unable to retrieve user (Response code: ${res.status}).`);
|
|
56
|
+
return Promise.reject(res);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return Promise.resolve(res.data);
|
|
60
|
+
}).catch(error => {
|
|
61
|
+
console.log('Unable to retrieve user profile.');
|
|
62
|
+
return Promise.reject(error);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
exports.UserApiClient = UserApiClient;
|
|
69
|
+
|
|
70
|
+
class UserService {
|
|
71
|
+
static async getAllUsers() {
|
|
72
|
+
return UserApiClient.getAllUsers();
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
static async getSpecificUser(id) {
|
|
76
|
+
return UserApiClient.getSpecificUser(id);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
static async getCurrentUser() {
|
|
80
|
+
return UserApiClient.getCurrentUser();
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
exports.default = UserService;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.defaultError = defaultError;
|
|
5
|
+
exports.formatHttpError = formatHttpError;
|
|
6
|
+
|
|
7
|
+
var _utils = require("@selfcommunity/utils");
|
|
8
|
+
|
|
9
|
+
function defaultError(error) {
|
|
10
|
+
if (error.request) {
|
|
11
|
+
// The request was made but no response was received
|
|
12
|
+
// `error.request` is an instance of XMLHttpRequest in the browser and an instance of
|
|
13
|
+
// http.ClientRequest in node.js
|
|
14
|
+
console.log(error.request);
|
|
15
|
+
} else {
|
|
16
|
+
// Something happened in setting up the request that triggered an Error
|
|
17
|
+
console.log('Error', error.message);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const formatError = error => {
|
|
22
|
+
const errors = {};
|
|
23
|
+
|
|
24
|
+
if (Array.isArray(error)) {
|
|
25
|
+
for (let i = 0; i < error.length; i++) {
|
|
26
|
+
const err = error[i];
|
|
27
|
+
|
|
28
|
+
if (err.field) {
|
|
29
|
+
errors[`${(0, _utils.camelCase)(err.field)}Error`] = Array.isArray(err.messages) ? formatError(err.messages) : err.messages;
|
|
30
|
+
} else {
|
|
31
|
+
errors.error = err.message;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
} else {
|
|
35
|
+
errors.error = error.errors;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return errors;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
function formatHttpError(error) {
|
|
42
|
+
let errors = {};
|
|
43
|
+
|
|
44
|
+
if (error.response && error.response.data && typeof error.response.data === 'object' && error.response.data.errors) {
|
|
45
|
+
errors = Object.assign({}, formatError(error.response.data.errors));
|
|
46
|
+
} else {
|
|
47
|
+
defaultError(error);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return errors;
|
|
51
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { capitalize, isString, stripHtml, camelCase } from './utils/string';
|
|
2
|
+
import { isValidUrl, isValidUrls, urlReplacer, getDomain } from './utils/url';
|
|
3
|
+
/**
|
|
4
|
+
* Export all utilities
|
|
5
|
+
*/
|
|
6
|
+
export { capitalize, isString, stripHtml, camelCase, isValidUrl, isValidUrls, urlReplacer, getDomain };
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../utils/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAC,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAC,MAAM,aAAa,CAAC;AAE5E;;GAEG;AACH,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check if v is a string
|
|
3
|
+
* @param v
|
|
4
|
+
*/
|
|
5
|
+
export declare function isString(v: any): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Capitalize a string
|
|
8
|
+
* @param str
|
|
9
|
+
*/
|
|
10
|
+
export declare function capitalize(str: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* CamelCase a string
|
|
13
|
+
* @param str
|
|
14
|
+
*/
|
|
15
|
+
export declare function camelCase(str: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Stripe html tags from a string
|
|
18
|
+
* @param str
|
|
19
|
+
*/
|
|
20
|
+
export declare function stripHtml(str: string): string;
|
|
21
|
+
//# sourceMappingURL=string.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../../../../../utils/src/utils/string.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,CAAC,KAAA,WAEzB;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAO9C;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAiB7C;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility Url Replacer
|
|
3
|
+
* @param path
|
|
4
|
+
*/
|
|
5
|
+
export declare const urlReplacer: (path: string) => (params: object) => any;
|
|
6
|
+
/**
|
|
7
|
+
* Get domain
|
|
8
|
+
* @param url
|
|
9
|
+
*/
|
|
10
|
+
export declare const getDomain: (url: string) => string;
|
|
11
|
+
/**
|
|
12
|
+
* Check a str is a valid url pattern
|
|
13
|
+
* @param url
|
|
14
|
+
*/
|
|
15
|
+
export declare const isValidUrl: (url: string) => boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Check a str is a valid list of urls separated by delimiter
|
|
18
|
+
* @param value
|
|
19
|
+
* @param delimiter
|
|
20
|
+
*/
|
|
21
|
+
export declare const isValidUrls: (value: string, delimiter: string) => boolean;
|
|
22
|
+
//# sourceMappingURL=url.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../../../../utils/src/utils/url.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,WAAW,SAAU,MAAM,cAWtB,MAAM,QACvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,QAAS,MAAM,KAAG,MAOvC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,QAAS,MAAM,KAAG,OAGxC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,UAAW,MAAM,aAAa,MAAM,KAAG,OAG9D,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.generateJWTToken = generateJWTToken;
|
|
5
|
+
|
|
6
|
+
var jose = _interopRequireWildcard(require("jose"));
|
|
7
|
+
|
|
8
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
9
|
+
|
|
10
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Generate a JWT
|
|
14
|
+
:::tipContext can be consumed as following:
|
|
15
|
+
```jsx
|
|
16
|
+
1. const token = await generateJWTToken(userId, secretKey, expirationTime);
|
|
17
|
+
```
|
|
18
|
+
```jsx
|
|
19
|
+
2. generateJWTToken(userId, secretKey, expirationTime).then(token => {...});
|
|
20
|
+
```
|
|
21
|
+
:::
|
|
22
|
+
* @param userId
|
|
23
|
+
* @param secretKey
|
|
24
|
+
* @param expirationTime
|
|
25
|
+
*/
|
|
26
|
+
async function generateJWTToken(userId, secretKey, expirationTime) {
|
|
27
|
+
let data = {
|
|
28
|
+
token_type: 'access',
|
|
29
|
+
userId: 7
|
|
30
|
+
};
|
|
31
|
+
const privateKey = new TextEncoder().encode(secretKey);
|
|
32
|
+
return await new jose.SignJWT(data).setProtectedHeader({
|
|
33
|
+
alg: 'HS256',
|
|
34
|
+
typ: 'JWT'
|
|
35
|
+
}).setIssuedAt().setExpirationTime(expirationTime ? expirationTime : '2h').sign(privateKey);
|
|
36
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see api-services.js.LICENSE.txt */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SelfCommunityApiServices=t():e.SelfCommunityApiServices=t()}(self,(()=>(()=>{var e={644:(e,t,r)=>{e.exports=r(308)},353:(e,t,r)=>{"use strict";var o=r(44),n=r(955),i=r(233),s=r(30),a=r(948),u=r(875),l=r(842),c=r(618),p=r(439),d=r(714);e.exports=function(e){return new Promise((function(t,r){var f,h=e.data,m=e.headers,v=e.responseType;function g(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}o.isFormData(h)&&delete m["Content-Type"];var y=new XMLHttpRequest;if(e.auth){var R=e.auth.username||"",T=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";m.Authorization="Basic "+btoa(R+":"+T)}var b=a(e.baseURL,e.url);function C(){if(y){var o="getAllResponseHeaders"in y?u(y.getAllResponseHeaders()):null,i={data:v&&"text"!==v&&"json"!==v?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:o,config:e,request:y};n((function(e){t(e),g()}),(function(e){r(e),g()}),i),y=null}}if(y.open(e.method.toUpperCase(),s(b,e.params,e.paramsSerializer),!0),y.timeout=e.timeout,"onloadend"in y?y.onloadend=C:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(C)},y.onabort=function(){y&&(r(c("Request aborted",e,"ECONNABORTED",y)),y=null)},y.onerror=function(){r(c("Network Error",e,null,y)),y=null},y.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",o=e.transitional||p.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(c(t,e,o.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",y)),y=null},o.isStandardBrowserEnv()){var E=(e.withCredentials||l(b))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;E&&(m[e.xsrfHeaderName]=E)}"setRequestHeader"in y&&o.forEach(m,(function(e,t){void 0===h&&"content-type"===t.toLowerCase()?delete m[t]:y.setRequestHeader(t,e)})),o.isUndefined(e.withCredentials)||(y.withCredentials=!!e.withCredentials),v&&"json"!==v&&(y.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&y.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&y.upload&&y.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(f=function(e){y&&(r(!e||e&&e.type?new d("canceled"):e),y.abort(),y=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f))),h||(h=null),y.send(h)}))}},308:(e,t,r)=>{"use strict";var o=r(44),n=r(95),i=r(215),s=r(937),a=function e(t){var r=new i(t),a=n(i.prototype.request,r);return o.extend(a,i.prototype,r),o.extend(a,r),a.create=function(r){return e(s(t,r))},a}(r(439));a.Axios=i,a.Cancel=r(714),a.CancelToken=r(89),a.isCancel=r(41),a.VERSION=r(241).version,a.all=function(e){return Promise.all(e)},a.spread=r(783),a.isAxiosError=r(587),e.exports=a,e.exports.default=a},714:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},89:(e,t,r)=>{"use strict";var o=r(714);function n(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,o=r._listeners.length;for(t=0;t<o;t++)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,o=new Promise((function(e){r.subscribe(e),t=e})).then(e);return o.cancel=function(){r.unsubscribe(t)},o},e((function(e){r.reason||(r.reason=new o(e),t(r.reason))}))}n.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},n.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},n.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},n.source=function(){var e;return{token:new n((function(t){e=t})),cancel:e}},e.exports=n},41:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},215:(e,t,r)=>{"use strict";var o=r(44),n=r(30),i=r(946),s=r(895),a=r(937),u=r(525),l=u.validators;function c(e){this.defaults=e,this.interceptors={request:new i,response:new i}}c.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=a(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&u.assertOptions(t,{silentJSONParsing:l.transitional(l.boolean),forcedJSONParsing:l.transitional(l.boolean),clarifyTimeoutError:l.transitional(l.boolean)},!1);var r=[],o=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(o=o&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var n,i=[];if(this.interceptors.response.forEach((function(e){i.push(e.fulfilled,e.rejected)})),!o){var c=[s,void 0];for(Array.prototype.unshift.apply(c,r),c=c.concat(i),n=Promise.resolve(e);c.length;)n=n.then(c.shift(),c.shift());return n}for(var p=e;r.length;){var d=r.shift(),f=r.shift();try{p=d(p)}catch(e){f(e);break}}try{n=s(p)}catch(e){return Promise.reject(e)}for(;i.length;)n=n.then(i.shift(),i.shift());return n},c.prototype.getUri=function(e){return e=a(this.defaults,e),n(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},o.forEach(["delete","get","head","options"],(function(e){c.prototype[e]=function(t,r){return this.request(a(r||{},{method:e,url:t,data:(r||{}).data}))}})),o.forEach(["post","put","patch"],(function(e){c.prototype[e]=function(t,r,o){return this.request(a(o||{},{method:e,url:t,data:r}))}})),e.exports=c},946:(e,t,r)=>{"use strict";var o=r(44);function n(){this.handlers=[]}n.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},n.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},n.prototype.forEach=function(e){o.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=n},948:(e,t,r)=>{"use strict";var o=r(192),n=r(762);e.exports=function(e,t){return e&&!o(t)?n(e,t):t}},618:(e,t,r)=>{"use strict";var o=r(935);e.exports=function(e,t,r,n,i){var s=new Error(e);return o(s,t,r,n,i)}},895:(e,t,r)=>{"use strict";var o=r(44),n=r(556),i=r(41),s=r(439),a=r(714);function u(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new a("canceled")}e.exports=function(e){return u(e),e.headers=e.headers||{},e.data=n.call(e,e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),o.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return u(e),t.data=n.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(u(e),t&&t.response&&(t.response.data=n.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},935:e=>{"use strict";e.exports=function(e,t,r,o,n){return e.config=t,r&&(e.code=r),e.request=o,e.response=n,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},937:(e,t,r)=>{"use strict";var o=r(44);e.exports=function(e,t){t=t||{};var r={};function n(e,t){return o.isPlainObject(e)&&o.isPlainObject(t)?o.merge(e,t):o.isPlainObject(t)?o.merge({},t):o.isArray(t)?t.slice():t}function i(r){return o.isUndefined(t[r])?o.isUndefined(e[r])?void 0:n(void 0,e[r]):n(e[r],t[r])}function s(e){if(!o.isUndefined(t[e]))return n(void 0,t[e])}function a(r){return o.isUndefined(t[r])?o.isUndefined(e[r])?void 0:n(void 0,e[r]):n(void 0,t[r])}function u(r){return r in t?n(e[r],t[r]):r in e?n(void 0,e[r]):void 0}var l={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u};return o.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=l[e]||i,n=t(e);o.isUndefined(n)&&t!==u||(r[e]=n)})),r}},955:(e,t,r)=>{"use strict";var o=r(618);e.exports=function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(o("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},556:(e,t,r)=>{"use strict";var o=r(44),n=r(439);e.exports=function(e,t,r){var i=this||n;return o.forEach(r,(function(r){e=r.call(i,e,t)})),e}},439:(e,t,r)=>{"use strict";var o=r(44),n=r(868),i=r(935),s={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!o.isUndefined(e)&&o.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,l={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(u=r(353)),u),transformRequest:[function(e,t){return n(t,"Accept"),n(t,"Content-Type"),o.isFormData(e)||o.isArrayBuffer(e)||o.isBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e)?e:o.isArrayBufferView(e)?e.buffer:o.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):o.isObject(e)||t&&"application/json"===t["Content-Type"]?(a(t,"application/json"),function(e,t,r){if(o.isString(e))try{return(0,JSON.parse)(e),o.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||l.transitional,r=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,s=!r&&"json"===this.responseType;if(s||n&&o.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw i(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};o.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),o.forEach(["post","put","patch"],(function(e){l.headers[e]=o.merge(s)})),e.exports=l},241:e=>{e.exports={version:"0.23.0"}},95:e=>{"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),o=0;o<r.length;o++)r[o]=arguments[o];return e.apply(t,r)}}},30:(e,t,r)=>{"use strict";var o=r(44);function n(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(o.isURLSearchParams(t))i=t.toString();else{var s=[];o.forEach(t,(function(e,t){null!=e&&(o.isArray(e)?t+="[]":e=[e],o.forEach(e,(function(e){o.isDate(e)?e=e.toISOString():o.isObject(e)&&(e=JSON.stringify(e)),s.push(n(t)+"="+n(e))})))})),i=s.join("&")}if(i){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},762:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},233:(e,t,r)=>{"use strict";var o=r(44);e.exports=o.isStandardBrowserEnv()?{write:function(e,t,r,n,i,s){var a=[];a.push(e+"="+encodeURIComponent(t)),o.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),o.isString(n)&&a.push("path="+n),o.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},192:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},587:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},842:(e,t,r)=>{"use strict";var o=r(44);e.exports=o.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var o=e;return t&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=o.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},868:(e,t,r)=>{"use strict";var o=r(44);e.exports=function(e,t){o.forEach(e,(function(r,o){o!==t&&o.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[o])}))}},875:(e,t,r)=>{"use strict";var o=r(44),n=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,i,s={};return e?(o.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=o.trim(e.substr(0,i)).toLowerCase(),r=o.trim(e.substr(i+1)),t){if(s[t]&&n.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([r]):s[t]?s[t]+", "+r:r}})),s):s}},783:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},525:(e,t,r)=>{"use strict";var o=r(241).version,n={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){n[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var i={};n.transitional=function(e,t,r){function n(e,t){return"[Axios v"+o+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,o,s){if(!1===e)throw new Error(n(o," has been removed"+(t?" in "+t:"")));return t&&!i[o]&&(i[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,s)}},e.exports={assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var o=Object.keys(e),n=o.length;n-- >0;){var i=o[n],s=t[i];if(s){var a=e[i],u=void 0===a||s(a,i,e);if(!0!==u)throw new TypeError("option "+i+" must be "+u)}else if(!0!==r)throw Error("Unknown option "+i)}},validators:n}},44:(e,t,r)=>{"use strict";var o=r(95),n=Object.prototype.toString;function i(e){return"[object Array]"===n.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==n.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function l(e){return"[object Function]"===n.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.call(null,e[n],n,e)}e.exports={isArray:i,isArrayBuffer:function(e){return"[object ArrayBuffer]"===n.call(e)},isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isPlainObject:u,isUndefined:s,isDate:function(e){return"[object Date]"===n.call(e)},isFile:function(e){return"[object File]"===n.call(e)},isBlob:function(e){return"[object Blob]"===n.call(e)},isFunction:l,isStream:function(e){return a(e)&&l(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:c,merge:function e(){var t={};function r(r,o){u(t[o])&&u(r)?t[o]=e(t[o],r):u(r)?t[o]=e({},r):i(r)?t[o]=r.slice():t[o]=r}for(var o=0,n=arguments.length;o<n;o++)c(arguments[o],r);return t},extend:function(e,t,r){return c(t,(function(t,n){e[n]=r&&"function"==typeof t?o(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},37:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.ApiClient=void 0;var o,n=(o=r(644))&&o.__esModule?o:{default:o};class i{createClient(e){return n.default.create(Object.assign({},e&&e.baseURL&&{baseURL:e.baseURL},{responseType:"json",headers:Object.assign({},e&&e.accessToken&&{Authorization:`Token ${e.accessToken}`}),timeout:i.DEFAULT_TIMEOUT}))}constructor(e){this.setDefaultHeader=({name:e,value:t,methods:r})=>{const o=this.client.defaults.headers;Array.isArray(r)?r.forEach((r=>{o[r]&&(o[r][e]=t)})):o.common[e]=t},this.client=this.createClient(e),this.setDefaultHeader({name:"Content-Type",value:"application/x-www-form-urlencoded",methods:["post"]})}getClientInstance(){return this.client}config(e){this.client(e)}setSupportWithCredentials(e){this.client.defaults.withCredentials=e}setBasePortal(e){this.client.defaults.baseURL=e}setAuthorizeToken(e){e&&this.setDefaultHeader({name:"Authorization",value:`Bearer ${e}`})}request(e){return this.client.request(e)}get(e){return this.client.get(e)}post(e,t,r){return r?this.client.post(e,t,r):this.client.post(e,t)}patch(e,t){return this.client.patch(e,t)}put(e,t){return this.client.put(e,t)}}t.ApiClient=i,i.DEFAULT_TIMEOUT=1e4;var s=new i;t.default=s},368:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=void 0;var o=r(990),n={OAuthToken:{url:(0,o.urlReplacer)("/oauth/token/"),method:"POST"},Preferences:{url:(0,o.urlReplacer)("/api/v2/dynamic_preference/"),method:"GET"},Feature:{url:(0,o.urlReplacer)("/api/v2/feature/"),method:"GET"},FeedObject:{url:(0,o.urlReplacer)("/api/v2/$(type)/$(id)/"),method:"GET"},DeleteFeedObject:{url:(0,o.urlReplacer)("/api/v2/$(type)/$(id)/"),method:"DELETE"},RestoreFeedObject:{url:(0,o.urlReplacer)("/api/v2/$(type)/$(id)/restore/"),method:"POST"},RelatedFeedObjects:{url:(0,o.urlReplacer)("/api/v2/$(type)/$(id)/related/"),method:"GET"},Comment:{url:(0,o.urlReplacer)("/api/v2/comment/$(id)/"),method:"GET"},NewComment:{url:(0,o.urlReplacer)("/api/v2/comment/"),method:"POST"},UpdateComment:{url:(0,o.urlReplacer)("/api/v2/comment/$(id)/"),method:"PUT"},DeleteComment:{url:(0,o.urlReplacer)("/api/v2/comment/$(id)/"),method:"DELETE"},RestoreComment:{url:(0,o.urlReplacer)("/api/v2/comment/$(id)/restore/"),method:"POST"},Comments:{url:(0,o.urlReplacer)("/api/v2/comment/"),method:"GET"},CommentVote:{url:(0,o.urlReplacer)("/api/v2/comment/$(id)/vote/"),method:"POST"},CommentRestore:{url:(0,o.urlReplacer)("/api/v2/comment/$(id)/restore"),method:"POST"},FlagStatus:{url:(0,o.urlReplacer)("/api/v2/$(type)/$(id)/flag/status/"),method:"GET"},Flag:{url:(0,o.urlReplacer)("/api/v2/$(type)/$(id)/flag/"),method:"POST"},CategoryList:{url:(0,o.urlReplacer)("/api/v2/category/"),method:"GET"},Category:{url:(0,o.urlReplacer)("/api/v2/category/$(id)/"),method:"GET"},CategoriesFollowed:{url:(0,o.urlReplacer)("/api/v2/category/followed/"),method:"GET"},CategoryFollowers:{url:(0,o.urlReplacer)("/api/v2/category/$(id)/followers/"),method:"GET"},CategoriesSuggestion:{url:(0,o.urlReplacer)("/api/v2/suggestion/category/"),method:"GET"},CategoryTrendingFeed:{url:(0,o.urlReplacer)("/api/v2/category/$(id)/feed/trending/"),method:"GET"},CategoryTrendingPeople:{url:(0,o.urlReplacer)("/api/v2/category/$(id)/followers/trending/"),method:"GET"},FollowCategory:{url:(0,o.urlReplacer)("/api/v2/category/$(id)/follow/"),method:"POST"},CheckCategoryIsFollowed:{url:(0,o.urlReplacer)("/api/v2/category/$(id)/is_followed/"),method:"GET"},PopularCategories:{url:(0,o.urlReplacer)("/api/v2/category/popular/"),method:"GET"},Tag:{url:(0,o.urlReplacer)("/api/v2/tag/$(id)/"),method:"GET"},UserSearch:{url:(0,o.urlReplacer)("/api/v2/user/search/"),method:"GET"},User:{url:(0,o.urlReplacer)("/api/v2/user/$(id)/"),method:"GET"},UserPatch:{url:(0,o.urlReplacer)("/api/v2/user/$(id)/"),method:"PATCH"},UserSettings:{url:(0,o.urlReplacer)("/api/v2/user/$(id)/settings/"),method:"GET"},UserSettingsPatch:{url:(0,o.urlReplacer)("/api/v2/user/$(id)/settings/"),method:"PATCH"},GetUserLoyaltyPoints:{url:(0,o.urlReplacer)("/api/v2/user/$(id)/loyalty/points/"),method:"GET"},UserFollowers:{url:(0,o.urlReplacer)("/api/v2/user/$(id)/followers/"),method:"GET"},UsersFollowed:{url:(0,o.urlReplacer)("/api/v2/user/$(id)/followings/"),method:"GET"},FollowUser:{url:(0,o.urlReplacer)("/api/v2/user/$(id)/follow/"),method:"POST"},CheckUserFollowed:{url:(0,o.urlReplacer)("/api/v2/user/$(id)/is_followed/"),method:"GET"},UserConnections:{url:(0,o.urlReplacer)("/api/v2/user/$(id)/connections/"),method:"GET"},UserCheckConnection:{url:(0,o.urlReplacer)("/api/v2/user/$(id)/is_connection/"),method:"GET"},UserConnectionStatuses:{url:(0,o.urlReplacer)("/api/v2/user/connection/statuses/"),method:"POST"},UserConnectionRequests:{url:(0,o.urlReplacer)("/api/v2/user/$(id)/connection/requests/"),method:"POST"},UserRequestConnections:{url:(0,o.urlReplacer)("/api/v2/user/$(id)/connection/requests_sent/"),method:"POST"},UserRequestConnection:{url:(0,o.urlReplacer)("/api/v2/user/$(id)/connection/request"),method:"POST"},UserCancelRequestConnection:{url:(0,o.urlReplacer)("/api/v2/user/$(id)/connection/cancel_request"),method:"POST"},UserAcceptRequestConnection:{url:(0,o.urlReplacer)("/api/v2/user/$(id)/connection/accept/"),method:"POST"},UserRejectConnectionRequest:{url:(0,o.urlReplacer)("/api/v2/user/$(id)/connection/reject"),method:"POST"},UserCancelRejectConnectionRequest:{url:(0,o.urlReplacer)("/api/v2/user/$(id)/connection/cancel_reject"),method:"POST"},UserRemoveConnection:{url:(0,o.urlReplacer)("/api/v2/user/$(id)/connection/remove"),method:"POST"},Me:{url:(0,o.urlReplacer)("/api/v2/user/me/"),method:"GET"},UpdateUser:{url:(0,o.urlReplacer)("/api/v2/user/$(id)/"),method:"PATCH"},FollowedCategories:{url:(0,o.urlReplacer)("/api/v2/user/$(id)/categories"),method:"GET"},GetAvatars:{url:(0,o.urlReplacer)("/api/v2/user/avatar/"),method:"GET"},SetPrimaryAvatar:{url:(0,o.urlReplacer)("/api/v2/user/avatar/"),method:"PATCH"},AddAvatar:{url:(0,o.urlReplacer)("/api/v2/user/avatar/"),method:"POST"},RemoveAvatar:{url:(0,o.urlReplacer)("/api/v2/user/avatar/"),method:"DELETE"},CheckEmailToken:{url:(0,o.urlReplacer)("/api/v2/user/check_email_token/"),method:"GET"},BroadcastMessagesList:{url:(0,o.urlReplacer)("/api/v2/notification/banner/"),method:"GET"},BroadcastMessagesMarkRead:{url:(0,o.urlReplacer)("/api/v2/notification/banner/read/"),method:"POST"},BroadcastMessagesDispose:{url:(0,o.urlReplacer)("/api/v2/notification/banner/dispose/"),method:"POST"},BroadcastMessagesUnseenCount:{url:(0,o.urlReplacer)("/api/v2/notification/banner/unseen/count/"),method:"GET"},UserNotificationList:{url:(0,o.urlReplacer)("/api/v2/notification/"),method:"GET"},UserMarkReadNotification:{url:(0,o.urlReplacer)("/api/v2/notification/read/"),method:"POST"},UserUnseenNotificationCount:{url:(0,o.urlReplacer)("/api/v2/notification/unseen/"),method:"GET"},UserSuspendContributionNotification:{url:(0,o.urlReplacer)("/api/v2/$(type)/$(id)/suspend/"),method:"POST"},UserCheckContributionNotificationSuspended:{url:(0,o.urlReplacer)("/api/v2/$(type)/$(id)/suspended/"),method:"GET"},UserListContributionNotificationSuspended:{url:(0,o.urlReplacer)("/api/v2/$(type)/suspended/"),method:"GET"},UserSuggestion:{url:(0,o.urlReplacer)("/api/v2/suggestion/user/"),method:"GET"},Platform:{url:(0,o.urlReplacer)("/api/v2/user/me/platform_url"),method:"GET"},PollSuggestion:{url:(0,o.urlReplacer)("/api/v2/suggestion/poll/"),method:"GET"},FollowContribution:{url:(0,o.urlReplacer)("/api/v2/$(type)/$(id)/follow/"),method:"POST"},Vote:{url:(0,o.urlReplacer)("/api/v2/$(type)/$(id)/vote/"),method:"POST"},VotesList:{url:(0,o.urlReplacer)("/api/v2/$(type)/$(id)/vote/"),method:"GET"},ShareUsersList:{url:(0,o.urlReplacer)("/api/v2/$(type)/$(id)/shares_users/"),method:"GET"},PollVote:{url:(0,o.urlReplacer)("/api/v2/$(type)/$(id)/poll/vote/"),method:"POST"},PollVotesList:{url:(0,o.urlReplacer)("/api/v2/$(type)/$(id)/poll/vote/"),method:"GET"},Contributors:{url:(0,o.urlReplacer)("/api/v2/$(type)/$(id)/contributors/"),method:"GET"},GetPrizes:{url:(0,o.urlReplacer)("/api/v2/loyalty/prize/"),method:"GET"},Composer:{url:(0,o.urlReplacer)("/api/v2/$(type)/"),method:"POST"},ComposerEdit:{url:(0,o.urlReplacer)("/api/v2/$(type)/$(id)/"),method:"PUT"},ComposerChunkUploadMedia:{url:(0,o.urlReplacer)("/api/v2/media/upload/chunk/"),method:"POST"},ComposerChunkUploadMediaComplete:{url:(0,o.urlReplacer)("/api/v2/media/upload/complete/"),method:"POST"},ComposerMediaCreate:{url:(0,o.urlReplacer)("/api/v2/media/"),method:"POST"},ComposerCategoryList:{url:(0,o.urlReplacer)("/api/v2/category/"),method:"GET"},ComposerAddressingTagList:{url:(0,o.urlReplacer)("/api/v2/user/tag/tags_to_address_a_contribution/"),method:"GET"},ComposerLocalitySearch:{url:(0,o.urlReplacer)("/api/v2/locality/search/"),method:"GET"},CustomAdvSearch:{url:(0,o.urlReplacer)("/api/v2/custom_adv/search/"),method:"GET"},MainFeed:{url:(0,o.urlReplacer)("/api/v2/feed/"),method:"GET"},MainFeedUnseenCount:{url:(0,o.urlReplacer)("/api/v2/feed/unseen/count/"),method:"GET"},FeedObjectMarkRead:{url:(0,o.urlReplacer)("/api/v2/feed/read/"),method:"POST"},ExploreFeed:{url:(0,o.urlReplacer)("/api/v2/feed/explore/"),method:"GET"},FeedLikeThese:{url:(0,o.urlReplacer)("/api/v2/feed/likethis/"),method:"POST"},CategoryFeed:{url:(0,o.urlReplacer)("/api/v2/category/$(id)/feed/"),method:"GET"},UserFeed:{url:(0,o.urlReplacer)("/api/v2/user/$(id)/feed/"),method:"GET"},EmbedFeed:{url:(0,o.urlReplacer)("/api/v2/embed/feed/"),method:"GET"},GetSnippets:{url:(0,o.urlReplacer)("/api/v2/pm/"),method:"GET"},GetASingleMessage:{url:(0,o.urlReplacer)("/api/v2/pm/$(id)/"),method:"GET"},SendMessage:{url:(0,o.urlReplacer)("/api/v2/pm/"),method:"POST"},GetAThread:{url:(0,o.urlReplacer)("/api/v2/pm/"),method:"GET"},PrivateMessageUploadMediaInChunks:{url:(0,o.urlReplacer)("/api/v2/pm/upload/"),method:"POST"},PrivateMessageChunkUploadDone:{url:(0,o.urlReplacer)("/api/v2/pm/upload/?done"),method:"POST"},DeleteASingleMessage:{url:(0,o.urlReplacer)("/api/v2/pm/$(id)/"),method:"DELETE"},DeleteAThread:{url:(0,o.urlReplacer)("/api/v2/pm/$(id)/?hide=1"),method:"DELETE"},Device:{url:(0,o.urlReplacer)("/api/v2/device/$(type)/$(id)/"),method:"GET"},NewDevice:{url:(0,o.urlReplacer)("/api/v2/device/$(type)/"),method:"POST"},DeleteDevice:{url:(0,o.urlReplacer)("/api/v2/device/$(type)/$(id)/"),method:"DELETE"},ModerateContribution:{url:(0,o.urlReplacer)("/api/v2/moderation/contribution/$(id)/"),method:"PATCH"},ModerateContributionStatus:{url:(0,o.urlReplacer)("/api/v2/moderation/contribution/$(id)/status/?contribution_type=$(contribution_type)"),method:"GET"},InsightBestContribution:{url:(0,o.urlReplacer)("/api/v2/insight/contribution/"),method:"GET"},InsightBestEmbed:{url:(0,o.urlReplacer)("/api/v2/insight/embed/"),method:"GET"},InsightBestUser:{url:(0,o.urlReplacer)("/api/v2/insight/user/"),method:"GET"},InsightContributionCounter:{url:(0,o.urlReplacer)("/api/v2/insight/contribution/counters/?contribution_id=$(id)"),method:"GET"},InsightEmbedCounter:{url:(0,o.urlReplacer)("/api/v2/insight/embed/counters/?embed_type=$(type)&embed_id=$(id)"),method:"GET"},InsightUserCounter:{url:(0,o.urlReplacer)("/api/v2/insight/user/counters/?user_id=$(id)"),method:"GET"},GetAllIncubators:{url:(0,o.urlReplacer)("/api/v2/incubator/"),method:"GET"},GetIncubatorSuggestion:{url:(0,o.urlReplacer)("/api/v2/suggestion/incubator/"),method:"GET"},GetASpecificIncubator:{url:(0,o.urlReplacer)("/api/v2/incubator/$(id)/"),method:"GET"},CheckIncubatorSubscription:{url:(0,o.urlReplacer)("/api/v2/incubator/$(id)/subscribed/"),method:"GET"},SubscribeToIncubator:{url:(0,o.urlReplacer)("/api/v2/incubator/$(id)/subscribe/"),method:"POST"},CreateAnIncubator:{url:(0,o.urlReplacer)("/api/v2/incubator/"),method:"POST"},GetIncubatorSubscribers:{url:(0,o.urlReplacer)("/api/v2/incubator/$(id)/subscribers/"),method:"GET"},GetCustomPages:{url:(0,o.urlReplacer)("/api/v2/custom_page/"),method:"GET"},GetLegalPages:{url:(0,o.urlReplacer)("/api/v2/legal_page/"),method:"GET"},MediaClickTracker:{url:(0,o.urlReplacer)("/api/v2/media/$(id)/click/"),method:"POST"}};t.default=n},707:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.CategoryApiClient=void 0;var o=i(r(37)),n=i(r(368));function i(e){return e&&e.__esModule?e:{default:e}}class s{static getAllCategories(){return o.default.request({url:n.default.Category.url({}),method:n.default.Category.method}).then((e=>e.status>=300?(console.log(`Unable to retrieve categories (Response code: ${e.status}).`),Promise.reject(e)):Promise.resolve(e))).catch((e=>(console.log("Unable to retrieve categories."),Promise.reject(e))))}static getSpecificCategory(e){return o.default.request({url:n.default.Category.url({id:e}),method:n.default.User.method}).then((e=>e.status>=300?(console.log(`Unable to retrieve category (Response code: ${e.status}).`),Promise.reject(e)):Promise.resolve(e))).catch((e=>(console.log("Unable to retrieve category."),Promise.reject(e))))}}t.CategoryApiClient=s,t.default=class{static async getAllCategories(){return s.getAllCategories()}static async getSpecificCategory(e){return s.getSpecificCategory(e)}}},334:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.FeatureApiClient=void 0;var o=i(r(37)),n=i(r(368));function i(e){return e&&e.__esModule?e:{default:e}}class s{static getAllFeatures(){return o.default.request({url:n.default.Feature.url({}),method:n.default.Feature.method}).then((e=>{if(e.status>=300)return console.log(`Unable to retrieve community preferences (Response code: ${e.status}).`),Promise.reject(e);const t=e.data.results.map((e=>e.name));return Promise.resolve(t)})).catch((e=>(console.log("Unable to retrieve features."),Promise.reject(e))))}}t.FeatureApiClient=s,t.default=class{static async getAllFeatures(){return s.getAllFeatures()}}},329:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.PreferenceApiClient=void 0;var o=i(r(37)),n=i(r(368));function i(e){return e&&e.__esModule?e:{default:e}}class s{static getAllPreferences(){return o.default.request({url:n.default.Preferences.url({}),method:n.default.Preferences.method}).then((e=>{if(e.status>=300)return console.log(`Unable to retrieve community preferences (Response code: ${e.status}).`),Promise.reject(e);const t=e.data.results.reduce(((e,t)=>Object.assign({},e,{[`${t.section}.${t.name}`]:t})),{});return Promise.resolve(t)})).catch((e=>(console.log("Unable to retrieve community preferences."),Promise.reject(e))))}static searchPreferences(e,t,r,i){const s=new URLSearchParams(Object.assign({},e&&{search:e},t&&{section:t},r&&{keys:r},i&&{ordering:i}));return o.default.request({url:`${n.default.Preferences.url({})}?${s.toString()}`,method:n.default.Preferences.method}).then((e=>e.status>=300?(console.log(`Unable to retrieve community preferences (Response code: ${e.status}).`),Promise.reject(e)):(e.data.results.reduce(((e,t)=>Object.assign({},e,{[`${t.section}.${t.name}`]:t})),{}),Promise.resolve(e)))).catch((e=>(console.log("Unable to retrieve community preferences."),Promise.reject(e))))}static getSpecificPreference(e){return o.default.request({url:n.default.Preferences.url({id:e}),method:n.default.Preferences.method}).then((e=>e.status>=300?(console.log(`Unable to retrieve community preference (Response code: ${e.status}).`),Promise.reject(e)):Promise.resolve(e))).catch((e=>(console.log("Unable to retrieve community preference."),Promise.reject(e))))}}t.PreferenceApiClient=s,t.default=class{static async getAllPreferences(){return s.getAllPreferences()}static async searchPreferences(e,t,r,o){return s.searchPreferences(e,t,r,o)}static async getSpecificPreference(e){return s.getSpecificPreference(e)}}},671:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=t.UserApiClient=void 0;var o=i(r(37)),n=i(r(368));function i(e){return e&&e.__esModule?e:{default:e}}class s{static getAllUsers(){return o.default.request({url:n.default.User.url({}),method:n.default.User.method}).then((e=>e.status>=300?(console.log(`Unable to retrieve users (Response code: ${e.status}).`),Promise.reject(e)):Promise.resolve(e))).catch((e=>(console.log("Unable to retrieve users."),Promise.reject(e))))}static getSpecificUser(e){return o.default.request({url:n.default.User.url({id:e}),method:n.default.User.method}).then((e=>e.status>=300?(console.log(`Unable to retrieve user (Response code: ${e.status}).`),Promise.reject(e)):Promise.resolve(e))).catch((e=>(console.log("Unable to retrieve user."),Promise.reject(e))))}static getCurrentUser(){return o.default.request({url:n.default.Me.url(),method:n.default.Me.method}).then((e=>e.status>=300?(console.log(`Unable to retrieve user (Response code: ${e.status}).`),Promise.reject(e)):Promise.resolve(e.data))).catch((e=>(console.log("Unable to retrieve user profile."),Promise.reject(e))))}}t.UserApiClient=s,t.default=class{static async getAllUsers(){return s.getAllUsers()}static async getSpecificUser(e){return s.getSpecificUser(e)}static async getCurrentUser(){return s.getCurrentUser()}}},21:(e,t,r)=>{"use strict";t.__esModule=!0,t.defaultError=n,t.formatHttpError=function(e){let t={};return e.response&&e.response.data&&"object"==typeof e.response.data&&e.response.data.errors?t=Object.assign({},i(e.response.data.errors)):n(e),t};var o=r(990);function n(e){e.request?console.log(e.request):console.log("Error",e.message)}const i=e=>{const t={};if(Array.isArray(e))for(let r=0;r<e.length;r++){const n=e[r];n.field?t[`${(0,o.camelCase)(n.field)}Error`]=Array.isArray(n.messages)?i(n.messages):n.messages:t.error=n.message}else t.error=e.errors;return t}},990:(e,t,r)=>{"use strict";t.__esModule=!0;var o=r(136);t.capitalize=o.capitalize,t.isString=o.isString,t.stripHtml=o.stripHtml,t.camelCase=o.camelCase;var n=r(234);t.isValidUrl=n.isValidUrl,t.isValidUrls=n.isValidUrls,t.urlReplacer=n.urlReplacer,t.getDomain=n.getDomain},136:(e,t)=>{"use strict";t.__esModule=!0,t.camelCase=function(e){return e.toLowerCase().replace(/[-_]+/g," ").replace(/[^\w\s]/g,"").replace(/ (.)/g,(e=>e.toUpperCase())).replace(/ /g,"")},t.capitalize=function(e){let t="",r=e.split(" ");for(let e=0;e<r.length;e++)t+=r[e].substring(0,1).toUpperCase()+r[e].substring(1,r[e].length);return t},t.isString=function(e){return"string"==typeof e||e instanceof String},t.stripHtml=function(e){return e.replace(/<[^>]*>?/gm,"").trim()}},234:(e,t)=>{"use strict";t.__esModule=!0,t.urlReplacer=t.isValidUrls=t.isValidUrl=t.getDomain=void 0,t.urlReplacer=e=>t=>function(e,t){const r=/\$\(([^)]+)?\)/g;let o=r.exec(e);for(;o;)e=e.replace(o[0],t[o[1]]),r.lastIndex=0,o=r.exec(e);return e}(e,t),t.getDomain=e=>{const t=e.match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i);return t&&t[1]?t[1]:""};const r=e=>/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-/]))?/.test(e);t.isValidUrl=r,t.isValidUrls=(e,t)=>e.trim().split(t).every(r)}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,r),i.exports}var o={};return(()=>{"use strict";var e=o;e.__esModule=!0;var t=p(r(37));e.http=t.default,e.HttpResponse=t.HttpResponse,e.HttpMethod=t.HttpMethod;var n=p(r(368));e.Endpoints=n.default,e.EndpointType=n.EndpointType;var i=r(21);e.formatHttpError=i.formatHttpError;var s=p(r(329));e.PreferenceService=s.default,e.PreferenceApiClient=s.PreferenceApiClient,e.PreferenceApiClientInterface=s.PreferenceApiClientInterface;var a=p(r(671));e.UserService=a.default,e.UserApiClient=a.UserApiClient,e.UserApiClientInterface=a.UserApiClientInterface;var u=p(r(334));e.FeatureService=u.default,e.FeatureApiClient=u.FeatureApiClient,e.FeatureApiClientInterface=u.FeatureApiClientInterface;var l=p(r(707));function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(c=function(e){return e?r:t})(e)}function p(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=c(t);if(r&&r.has(e))return r.get(e);var o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=n?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,r&&r.set(e,o),o}e.CategoryService=l.default,e.CategoryApiClient=l.CategoryApiClient,e.CategoryApiClientInterface=l.CategoryApiClientInterface})(),o})()));
|
|
3
|
+
//# sourceMappingURL=api-services.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! (c) 2022 - present: Quentral Srl | https://github.com/selfcommunity/community-js/blob/master/LICENSE.md */
|