@insignia-education/api-sdk-js 0.14.0 → 0.15.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.
Files changed (45) hide show
  1. package/coverage/clover.xml +985 -126
  2. package/coverage/coverage-final.json +33 -1
  3. package/coverage/lcov-report/Client.js.html +1 -1
  4. package/coverage/lcov-report/index.html +65 -20
  5. package/coverage/lcov-report/src/Client.js.html +31 -31
  6. package/coverage/lcov-report/src/api/index.html +1 -1
  7. package/coverage/lcov-report/src/api/index.js.html +1 -1
  8. package/coverage/lcov-report/src/api/v1/Accounts.js.html +1 -1
  9. package/coverage/lcov-report/src/api/v1/Auth.js.html +1 -1
  10. package/coverage/lcov-report/src/api/v1/Categories.js.html +1 -1
  11. package/coverage/lcov-report/src/api/v1/Changelogs.js.html +1 -1
  12. package/coverage/lcov-report/src/api/v1/Configs.js.html +1 -1
  13. package/coverage/lcov-report/src/api/v1/ContactForms.js.html +1 -1
  14. package/coverage/lcov-report/src/api/v1/ConversationalTopics.js.html +1 -1
  15. package/coverage/lcov-report/src/api/v1/Countries.js.html +1 -1
  16. package/coverage/lcov-report/src/api/v1/Coupons.js.html +1 -1
  17. package/coverage/lcov-report/src/api/v1/Courses.js.html +1 -1
  18. package/coverage/lcov-report/src/api/v1/Currencies.js.html +1 -1
  19. package/coverage/lcov-report/src/api/v1/Files.js.html +1 -1
  20. package/coverage/lcov-report/src/api/v1/Forums.js.html +1 -1
  21. package/coverage/lcov-report/src/api/v1/Hashes.js.html +1 -1
  22. package/coverage/lcov-report/src/api/v1/Insignias.js.html +1 -1
  23. package/coverage/lcov-report/src/api/v1/Languages.js.html +1 -1
  24. package/coverage/lcov-report/src/api/v1/MailBlacklist.js.html +1 -1
  25. package/coverage/lcov-report/src/api/v1/Organizations.js.html +1 -1
  26. package/coverage/lcov-report/src/api/v1/PaymentMethods.js.html +1 -1
  27. package/coverage/lcov-report/src/api/v1/Payments.js.html +1 -1
  28. package/coverage/lcov-report/src/api/v1/Quizzes.js.html +1 -1
  29. package/coverage/lcov-report/src/api/v1/ShortLinks.js.html +1 -1
  30. package/coverage/lcov-report/src/api/v1/Surveys.js.html +1 -1
  31. package/coverage/lcov-report/src/api/v1/Taxes.js.html +1 -1
  32. package/coverage/lcov-report/src/api/v1/Teacher.js.html +20 -8
  33. package/coverage/lcov-report/src/api/v1/UserTypes.js.html +1 -1
  34. package/coverage/lcov-report/src/api/v1/Users.js.html +1 -1
  35. package/coverage/lcov-report/src/api/v1/Zoom.js.html +1 -1
  36. package/coverage/lcov-report/src/api/v1/index.html +12 -12
  37. package/coverage/lcov-report/src/api/v1/index.js.html +1 -1
  38. package/coverage/lcov-report/src/index.html +5 -5
  39. package/coverage/lcov-report/src/index.js.html +1 -1
  40. package/coverage/lcov-report/tests/helpers.js.html +1 -1
  41. package/coverage/lcov-report/tests/index.html +1 -1
  42. package/coverage/lcov.info +1740 -125
  43. package/coverage/test-report.html +606 -1
  44. package/package.json +1 -1
  45. package/src/api/v1/Teacher.js +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insignia-education/api-sdk-js",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "JavaScript SDK for the Insignia Education API",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -32,7 +32,11 @@ export default class Teacher {
32
32
  configs() {
33
33
  const base = '/teacher/configs';
34
34
  return {
35
- get: (id = null) => id ? this.#client.get(`${base}/${id}`) : this.#client.get(base),
35
+ /** get() / get(id) / get({ config_set_id }) the last filters the list to one config set. */
36
+ get: (idOrParams = null) => {
37
+ if (idOrParams && typeof idOrParams === 'object') return this.#client.get(base, idOrParams);
38
+ return idOrParams ? this.#client.get(`${base}/${idOrParams}`) : this.#client.get(base);
39
+ },
36
40
  create: (data) => this.#client.put(base, data),
37
41
  edit: (id, data) => this.#client.patch(`${base}/${id}`, data),
38
42
  delete: (id) => this.#client.del(`${base}/${id}`),