@insignia-education/api-sdk-js 0.9.12
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/.github/hooks/pre-commit +13 -0
- package/.github/workflows/npm-publish-github-packages.yml +30 -0
- package/Cart.js +40 -0
- package/LICENSE +21 -0
- package/README.md +444 -0
- package/babel.config.cjs +1 -0
- package/coverage/clover.xml +703 -0
- package/coverage/coverage-final.json +30 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +131 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -0
- package/coverage/lcov-report/src/Client.js.html +202 -0
- package/coverage/lcov-report/src/api/v1/Accounts.js.html +151 -0
- package/coverage/lcov-report/src/api/v1/Auth.js.html +130 -0
- package/coverage/lcov-report/src/api/v1/Categories.js.html +121 -0
- package/coverage/lcov-report/src/api/v1/Changelogs.js.html +118 -0
- package/coverage/lcov-report/src/api/v1/Configs.js.html +121 -0
- package/coverage/lcov-report/src/api/v1/ContactForms.js.html +121 -0
- package/coverage/lcov-report/src/api/v1/ConversationalTopics.js.html +121 -0
- package/coverage/lcov-report/src/api/v1/Countries.js.html +112 -0
- package/coverage/lcov-report/src/api/v1/Coupons.js.html +121 -0
- package/coverage/lcov-report/src/api/v1/Courses.js.html +328 -0
- package/coverage/lcov-report/src/api/v1/Currencies.js.html +115 -0
- package/coverage/lcov-report/src/api/v1/Files.js.html +115 -0
- package/coverage/lcov-report/src/api/v1/Forums.js.html +157 -0
- package/coverage/lcov-report/src/api/v1/Hashes.js.html +118 -0
- package/coverage/lcov-report/src/api/v1/Insignias.js.html +121 -0
- package/coverage/lcov-report/src/api/v1/Languages.js.html +121 -0
- package/coverage/lcov-report/src/api/v1/MailBlacklist.js.html +118 -0
- package/coverage/lcov-report/src/api/v1/Organizations.js.html +118 -0
- package/coverage/lcov-report/src/api/v1/Quizzes.js.html +181 -0
- package/coverage/lcov-report/src/api/v1/ShortLinks.js.html +121 -0
- package/coverage/lcov-report/src/api/v1/Surveys.js.html +181 -0
- package/coverage/lcov-report/src/api/v1/Tags.js.html +121 -0
- package/coverage/lcov-report/src/api/v1/Taxes.js.html +121 -0
- package/coverage/lcov-report/src/api/v1/Teacher.js.html +196 -0
- package/coverage/lcov-report/src/api/v1/Translations.js.html +121 -0
- package/coverage/lcov-report/src/api/v1/UserTypes.js.html +121 -0
- package/coverage/lcov-report/src/api/v1/Users.js.html +331 -0
- package/coverage/lcov-report/src/api/v1/Zoom.js.html +154 -0
- package/coverage/lcov-report/src/api/v1/index.html +521 -0
- package/coverage/lcov-report/src/index.html +116 -0
- package/coverage/lcov.info +1822 -0
- package/index.js +4 -0
- package/jest.config.mjs +201 -0
- package/package.json +36 -0
- package/scss/Services/_notification.scss +0 -0
- package/scss/index.scss +2 -0
- package/src/Client.js +39 -0
- package/src/api/index.js +20 -0
- package/src/api/v1/Accounts.js +22 -0
- package/src/api/v1/Auth.js +15 -0
- package/src/api/v1/Categories.js +12 -0
- package/src/api/v1/Changelogs.js +11 -0
- package/src/api/v1/Configs.js +12 -0
- package/src/api/v1/ContactForms.js +12 -0
- package/src/api/v1/ConversationalTopics.js +12 -0
- package/src/api/v1/Countries.js +9 -0
- package/src/api/v1/Coupons.js +12 -0
- package/src/api/v1/Courses.js +81 -0
- package/src/api/v1/Currencies.js +10 -0
- package/src/api/v1/Files.js +10 -0
- package/src/api/v1/Forums.js +24 -0
- package/src/api/v1/Hashes.js +11 -0
- package/src/api/v1/Insignias.js +12 -0
- package/src/api/v1/Languages.js +12 -0
- package/src/api/v1/MailBlacklist.js +11 -0
- package/src/api/v1/Organizations.js +11 -0
- package/src/api/v1/Quizzes.js +32 -0
- package/src/api/v1/ShortLinks.js +12 -0
- package/src/api/v1/Surveys.js +32 -0
- package/src/api/v1/Tags.js +12 -0
- package/src/api/v1/Taxes.js +12 -0
- package/src/api/v1/Teacher.js +37 -0
- package/src/api/v1/Translations.js +12 -0
- package/src/api/v1/UserTypes.js +12 -0
- package/src/api/v1/Users.js +82 -0
- package/src/api/v1/Zoom.js +23 -0
- package/src/api/v1/index.js +74 -0
- package/src/index.js +21 -0
- package/tests/api/v1.test.js +480 -0
- package/tests/client.test.js +214 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export default class Quizzes {
|
|
2
|
+
#client;
|
|
3
|
+
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.#client = client;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
get(id = null) { return id ? this.#client.get(`/quizzes/${id}`) : this.#client.get('/quizzes'); }
|
|
9
|
+
create(data) { return this.#client.put('/quizzes', data); }
|
|
10
|
+
edit(id, data) { return this.#client.patch(`/quizzes/${id}`, data); }
|
|
11
|
+
delete(id) { return this.#client.del(`/quizzes/${id}`); }
|
|
12
|
+
|
|
13
|
+
questions(quizId) {
|
|
14
|
+
const client = this.#client;
|
|
15
|
+
const base = `/quizzes/${quizId}/questions`;
|
|
16
|
+
return {
|
|
17
|
+
get: (id = null) => id ? client.get(`${base}/${id}`) : client.get(base),
|
|
18
|
+
create: (data) => client.put(base, data),
|
|
19
|
+
edit: (id, data) => client.patch(`${base}/${id}`, data),
|
|
20
|
+
delete: (id) => client.del(`${base}/${id}`),
|
|
21
|
+
answers: (questionId) => {
|
|
22
|
+
const aBase = `${base}/${questionId}/answers`;
|
|
23
|
+
return {
|
|
24
|
+
get: (id = null) => id ? client.get(`${aBase}/${id}`) : client.get(aBase),
|
|
25
|
+
create: (data) => client.put(aBase, data),
|
|
26
|
+
edit: (id, data) => client.patch(`${aBase}/${id}`, data),
|
|
27
|
+
delete: (id) => client.del(`${aBase}/${id}`),
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default class ShortLinks {
|
|
2
|
+
#client;
|
|
3
|
+
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.#client = client;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
get(id = null) { return id ? this.#client.get(`/short-links/${id}`) : this.#client.get('/short-links'); }
|
|
9
|
+
create(data) { return this.#client.put('/short-links', data); }
|
|
10
|
+
edit(id, data) { return this.#client.patch(`/short-links/${id}`, data); }
|
|
11
|
+
delete(id) { return this.#client.del(`/short-links/${id}`); }
|
|
12
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export default class Surveys {
|
|
2
|
+
#client;
|
|
3
|
+
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.#client = client;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
get(id = null) { return id ? this.#client.get(`/surveys/${id}`) : this.#client.get('/surveys'); }
|
|
9
|
+
create(data) { return this.#client.put('/surveys', data); }
|
|
10
|
+
edit(id, data) { return this.#client.patch(`/surveys/${id}`, data); }
|
|
11
|
+
delete(id) { return this.#client.del(`/surveys/${id}`); }
|
|
12
|
+
|
|
13
|
+
questions(surveyId) {
|
|
14
|
+
const client = this.#client;
|
|
15
|
+
const base = `/surveys/${surveyId}/questions`;
|
|
16
|
+
return {
|
|
17
|
+
get: (id = null) => id ? client.get(`${base}/${id}`) : client.get(base),
|
|
18
|
+
create: (data) => client.put(base, data),
|
|
19
|
+
edit: (id, data) => client.patch(`${base}/${id}`, data),
|
|
20
|
+
delete: (id) => client.del(`${base}/${id}`),
|
|
21
|
+
answers: (questionId) => {
|
|
22
|
+
const aBase = `${base}/${questionId}/answers`;
|
|
23
|
+
return {
|
|
24
|
+
get: (id = null) => id ? client.get(`${aBase}/${id}`) : client.get(aBase),
|
|
25
|
+
create: (data) => client.put(aBase, data),
|
|
26
|
+
edit: (id, data) => client.patch(`${aBase}/${id}`, data),
|
|
27
|
+
delete: (id) => client.del(`${aBase}/${id}`),
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default class Tags {
|
|
2
|
+
#client;
|
|
3
|
+
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.#client = client;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
get(id = null) { return id ? this.#client.get(`/tags/${id}`) : this.#client.get('/tags'); }
|
|
9
|
+
create(data) { return this.#client.put('/tags', data); }
|
|
10
|
+
edit(id, data) { return this.#client.patch(`/tags/${id}`, data); }
|
|
11
|
+
delete(id) { return this.#client.del(`/tags/${id}`); }
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default class Taxes {
|
|
2
|
+
#client;
|
|
3
|
+
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.#client = client;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
get(id = null) { return id ? this.#client.get(`/taxes/${id}`) : this.#client.get('/taxes'); }
|
|
9
|
+
create(data) { return this.#client.put('/taxes', data); }
|
|
10
|
+
edit(id, data) { return this.#client.patch(`/taxes/${id}`, data); }
|
|
11
|
+
delete(id) { return this.#client.del(`/taxes/${id}`); }
|
|
12
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export default class Teacher {
|
|
2
|
+
#client;
|
|
3
|
+
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.#client = client;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
absences() {
|
|
9
|
+
const base = '/teacher/absences';
|
|
10
|
+
return {
|
|
11
|
+
get: (id = null) => id ? this.#client.get(`${base}/${id}`) : this.#client.get(base),
|
|
12
|
+
create: (data) => this.#client.put(base, data),
|
|
13
|
+
edit: (id, data) => this.#client.patch(`${base}/${id}`, data),
|
|
14
|
+
delete: (id) => this.#client.del(`${base}/${id}`),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
configSets() {
|
|
19
|
+
const base = '/teacher/config-sets';
|
|
20
|
+
return {
|
|
21
|
+
get: (id = null) => id ? this.#client.get(`${base}/${id}`) : this.#client.get(base),
|
|
22
|
+
create: (data) => this.#client.put(base, data),
|
|
23
|
+
edit: (id, data) => this.#client.patch(`${base}/${id}`, data),
|
|
24
|
+
delete: (id) => this.#client.del(`${base}/${id}`),
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
configs() {
|
|
29
|
+
const base = '/teacher/configs';
|
|
30
|
+
return {
|
|
31
|
+
get: (id = null) => id ? this.#client.get(`${base}/${id}`) : this.#client.get(base),
|
|
32
|
+
create: (data) => this.#client.put(base, data),
|
|
33
|
+
edit: (id, data) => this.#client.patch(`${base}/${id}`, data),
|
|
34
|
+
delete: (id) => this.#client.del(`${base}/${id}`),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default class Translations {
|
|
2
|
+
#client;
|
|
3
|
+
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.#client = client;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
get(id = null) { return id ? this.#client.get(`/translations/${id}`) : this.#client.get('/translations'); }
|
|
9
|
+
create(data) { return this.#client.put('/translations', data); }
|
|
10
|
+
delete(id) { return this.#client.del(`/translations/${id}`); }
|
|
11
|
+
editText(id, data) { return this.#client.patch(`/translations/${id}/text`, data); }
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default class UserTypes {
|
|
2
|
+
#client;
|
|
3
|
+
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.#client = client;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
get(id = null) { return id ? this.#client.get(`/user-types/${id}`) : this.#client.get('/user-types'); }
|
|
9
|
+
create(data) { return this.#client.put('/user-types', data); }
|
|
10
|
+
edit(id, data) { return this.#client.patch(`/user-types/${id}`, data); }
|
|
11
|
+
delete(id) { return this.#client.del(`/user-types/${id}`); }
|
|
12
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export default class Users {
|
|
2
|
+
#client;
|
|
3
|
+
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.#client = client;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
get(id = null) { return id ? this.#client.get(`/users/${id}`) : this.#client.get('/users'); }
|
|
9
|
+
edit(id, data) { return this.#client.patch(`/users/${id}`, data); }
|
|
10
|
+
|
|
11
|
+
#nested(userId, path) {
|
|
12
|
+
const base = `/users/${userId}/${path}`;
|
|
13
|
+
const client = this.#client;
|
|
14
|
+
return {
|
|
15
|
+
get: (id = null) => id ? client.get(`${base}/${id}`) : client.get(base),
|
|
16
|
+
create: (data) => client.put(base, data),
|
|
17
|
+
edit: (id, data) => client.patch(`${base}/${id}`, data),
|
|
18
|
+
delete: (id) => client.del(`${base}/${id}`),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
courses(userId) { return this.#nested(userId, 'courses'); }
|
|
23
|
+
courseNotes(userId) { return this.#nested(userId, 'course-notes'); }
|
|
24
|
+
quizzes(userId) { return this.#nested(userId, 'quizzes'); }
|
|
25
|
+
sessions(userId) { return this.#nested(userId, 'sessions'); }
|
|
26
|
+
surveys(userId) { return this.#nested(userId, 'surveys'); }
|
|
27
|
+
cart(userId) { return this.#nested(userId, 'cart'); }
|
|
28
|
+
|
|
29
|
+
payments(userId) {
|
|
30
|
+
const base = `/users/${userId}/payments`;
|
|
31
|
+
const client = this.#client;
|
|
32
|
+
return {
|
|
33
|
+
get: (id = null) => id ? client.get(`${base}/${id}`) : client.get(base),
|
|
34
|
+
create: (data) => client.put(base, data),
|
|
35
|
+
edit: (id, data) => client.patch(`${base}/${id}`, data),
|
|
36
|
+
delete: (id) => client.del(`${base}/${id}`),
|
|
37
|
+
verify: (id) => client.post(`${base}/${id}/verify`),
|
|
38
|
+
reject: (id, data) => client.post(`${base}/${id}/reject`, data),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
points(userId) {
|
|
43
|
+
const base = `/users/${userId}/points`;
|
|
44
|
+
const client = this.#client;
|
|
45
|
+
return {
|
|
46
|
+
get: (id = null) => id ? client.get(`${base}/${id}`) : client.get(base),
|
|
47
|
+
create: (data) => client.put(base, data),
|
|
48
|
+
delete: (id) => client.del(`${base}/${id}`),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
moneyMoves(userId) {
|
|
53
|
+
const base = `/users/${userId}/money-moves`;
|
|
54
|
+
const client = this.#client;
|
|
55
|
+
return {
|
|
56
|
+
get: (id = null) => id ? client.get(`${base}/${id}`) : client.get(base),
|
|
57
|
+
create: (data) => client.put(base, data),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
statistics(userId) { return { get: () => this.#client.get(`/users/${userId}/statistics`) }; }
|
|
62
|
+
|
|
63
|
+
organizations(userId) {
|
|
64
|
+
const base = `/users/${userId}/organizations`;
|
|
65
|
+
const client = this.#client;
|
|
66
|
+
return {
|
|
67
|
+
get: (id = null) => id ? client.get(`${base}/${id}`) : client.get(base),
|
|
68
|
+
create: (data) => client.put(base, data),
|
|
69
|
+
delete: (id) => client.del(`${base}/${id}`),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
pushEndpoints(userId) {
|
|
74
|
+
const base = `/users/${userId}/push-endpoints`;
|
|
75
|
+
const client = this.#client;
|
|
76
|
+
return {
|
|
77
|
+
get: (id = null) => id ? client.get(`${base}/${id}`) : client.get(base),
|
|
78
|
+
create: (data) => client.put(base, data),
|
|
79
|
+
delete: (id) => client.del(`${base}/${id}`),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export default class Zoom {
|
|
2
|
+
#client;
|
|
3
|
+
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.#client = client;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
meetings() {
|
|
9
|
+
return {
|
|
10
|
+
get: (id = null) => id ? this.#client.get(`/zoom/meetings/${id}`) : this.#client.get('/zoom/meetings'),
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
tokens() {
|
|
15
|
+
const base = '/zoom/tokens';
|
|
16
|
+
return {
|
|
17
|
+
get: (id = null) => id ? this.#client.get(`${base}/${id}`) : this.#client.get(base),
|
|
18
|
+
create: (data) => this.#client.put(base, data),
|
|
19
|
+
edit: (id, data) => this.#client.patch(`${base}/${id}`, data),
|
|
20
|
+
delete: (id) => this.#client.del(`${base}/${id}`),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import InsigniaClient from '../../Client.js';
|
|
2
|
+
import Auth from './Auth.js';
|
|
3
|
+
import Accounts from './Accounts.js';
|
|
4
|
+
import Categories from './Categories.js';
|
|
5
|
+
import Changelogs from './Changelogs.js';
|
|
6
|
+
import Configs from './Configs.js';
|
|
7
|
+
import ContactForms from './ContactForms.js';
|
|
8
|
+
import ConversationalTopics from './ConversationalTopics.js';
|
|
9
|
+
import Countries from './Countries.js';
|
|
10
|
+
import Coupons from './Coupons.js';
|
|
11
|
+
import Courses from './Courses.js';
|
|
12
|
+
import Currencies from './Currencies.js';
|
|
13
|
+
import Files from './Files.js';
|
|
14
|
+
import Forums from './Forums.js';
|
|
15
|
+
import Hashes from './Hashes.js';
|
|
16
|
+
import Insignias from './Insignias.js';
|
|
17
|
+
import Languages from './Languages.js';
|
|
18
|
+
import MailBlacklist from './MailBlacklist.js';
|
|
19
|
+
import Organizations from './Organizations.js';
|
|
20
|
+
import Quizzes from './Quizzes.js';
|
|
21
|
+
import ShortLinks from './ShortLinks.js';
|
|
22
|
+
import Surveys from './Surveys.js';
|
|
23
|
+
import Tags from './Tags.js';
|
|
24
|
+
import Taxes from './Taxes.js';
|
|
25
|
+
import Teacher from './Teacher.js';
|
|
26
|
+
import Translations from './Translations.js';
|
|
27
|
+
import UserTypes from './UserTypes.js';
|
|
28
|
+
import Users from './Users.js';
|
|
29
|
+
import Zoom from './Zoom.js';
|
|
30
|
+
|
|
31
|
+
export default class InsigniaApiV1 {
|
|
32
|
+
#client;
|
|
33
|
+
|
|
34
|
+
constructor(baseUrl = null, token = null) {
|
|
35
|
+
this.#client = new InsigniaClient(baseUrl, token);
|
|
36
|
+
|
|
37
|
+
this.auth = new Auth(this.#client);
|
|
38
|
+
this.accounts = new Accounts(this.#client);
|
|
39
|
+
this.categories = new Categories(this.#client);
|
|
40
|
+
this.changelogs = new Changelogs(this.#client);
|
|
41
|
+
this.configs = new Configs(this.#client);
|
|
42
|
+
this.contactForms = new ContactForms(this.#client);
|
|
43
|
+
this.conversationalTopics = new ConversationalTopics(this.#client);
|
|
44
|
+
this.countries = new Countries(this.#client);
|
|
45
|
+
this.coupons = new Coupons(this.#client);
|
|
46
|
+
this.courses = new Courses(this.#client);
|
|
47
|
+
this.currencies = new Currencies(this.#client);
|
|
48
|
+
this.files = new Files(this.#client);
|
|
49
|
+
this.forums = new Forums(this.#client);
|
|
50
|
+
this.hashes = new Hashes(this.#client);
|
|
51
|
+
this.insignias = new Insignias(this.#client);
|
|
52
|
+
this.languages = new Languages(this.#client);
|
|
53
|
+
this.mailBlacklist = new MailBlacklist(this.#client);
|
|
54
|
+
this.organizations = new Organizations(this.#client);
|
|
55
|
+
this.quizzes = new Quizzes(this.#client);
|
|
56
|
+
this.shortLinks = new ShortLinks(this.#client);
|
|
57
|
+
this.surveys = new Surveys(this.#client);
|
|
58
|
+
this.tags = new Tags(this.#client);
|
|
59
|
+
this.taxes = new Taxes(this.#client);
|
|
60
|
+
this.teacher = new Teacher(this.#client);
|
|
61
|
+
this.translations = new Translations(this.#client);
|
|
62
|
+
this.userTypes = new UserTypes(this.#client);
|
|
63
|
+
this.users = new Users(this.#client);
|
|
64
|
+
this.zoom = new Zoom(this.#client);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
setToken(token) {
|
|
68
|
+
this.#client.setToken(token);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
getToken() {
|
|
72
|
+
return this.#client.getToken();
|
|
73
|
+
}
|
|
74
|
+
}
|
package/src/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import InsigniaClient from "./Client";
|
|
2
|
+
import InsigniaApi from "./api";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export default class Insignia {
|
|
6
|
+
#client;
|
|
7
|
+
|
|
8
|
+
constructor(baseUrl = null, token = null) {
|
|
9
|
+
this.#client = new InsigniaClient(baseUrl, token);
|
|
10
|
+
this.api = new InsigniaApi(baseUrl, token);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
setToken(token) {
|
|
14
|
+
this.#client.setToken(token);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
getToken() {
|
|
18
|
+
return this.#client.getToken();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|