@insignia-education/api-sdk-js 0.15.77 → 0.15.79

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insignia-education/api-sdk-js",
3
- "version": "0.15.77",
3
+ "version": "0.15.79",
4
4
  "description": "JavaScript SDK for the Insignia Education API",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -0,0 +1,13 @@
1
+ export default class CompanySettings {
2
+ #client;
3
+
4
+ constructor(client) {
5
+ this.#client = client;
6
+ }
7
+
8
+ /** Admin-only: company name/address shown in email footers. */
9
+ get() { return this.#client.get('/company-settings'); }
10
+
11
+ /** Admin-only: update company name/address. */
12
+ edit(data) { return this.#client.patch('/company-settings', data); }
13
+ }
@@ -68,6 +68,15 @@ export default class Users {
68
68
  delete: (id) => client.del(`${base}/${id}`),
69
69
  /** Puts a soft-deleted attempt back. */
70
70
  restore: (id) => client.post(`${base}/${id}/restore`),
71
+ /** Full attempt detail (quiz.questions.answers eager-loaded) — staff-only (any seller/employee/admin, not just this quiz's course teacher). */
72
+ detail: (id) => client.get(`${base}/${id}/detail`),
73
+ /**
74
+ * Staff counterpart of Teacher.dashboard().gradeQuiz() — same grading semantics
75
+ * (open_grades, score_audio, score_session_percentage, teacher_graded_at, the
76
+ * comments_ fields, course_selected — see that method's doc), but any seller/
77
+ * employee/admin can grade any user's attempt, not just that quiz's own course teacher.
78
+ */
79
+ grade: (id, data) => client.patch(`${base}/${id}/grade`, data),
71
80
  /**
72
81
  * Upload the file a student attaches as their answer to a
73
82
  * document_upload (PDF) or audio_answer (recording) question
@@ -3,6 +3,7 @@ import Admin from './Admin.js';
3
3
  import Auth from './Auth.js';
4
4
  import Accounts from './Accounts.js';
5
5
  import Changelogs from './Changelogs.js';
6
+ import CompanySettings from './CompanySettings.js';
6
7
  import ContactForms from './ContactForms.js';
7
8
  import ConversationalTopics from './ConversationalTopics.js';
8
9
  import Countries from './Countries.js';
@@ -56,6 +57,7 @@ export default class InsigniaApiV1 extends InsigniaApi {
56
57
  this.auth = new Auth(this);
57
58
  this.accounts = new Accounts(this);
58
59
  this.changelogs = new Changelogs(this);
60
+ this.companySettings = new CompanySettings(this);
59
61
  this.contactForms = new ContactForms(this);
60
62
  this.conversationalTopics = new ConversationalTopics(this);
61
63
  this.countries = new Countries(this);