@insignia-education/api-sdk-js 0.20.0 → 0.22.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@insignia-education/api-sdk-js",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "JavaScript SDK for the Insignia Education API",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@babel/preset-env": "^7.29.7",
|
|
37
37
|
"babel-jest": "^30.3.0",
|
|
38
|
-
"@eslint/js": "^
|
|
38
|
+
"@eslint/js": "^10.0.1",
|
|
39
39
|
"eslint": "^10.10.0",
|
|
40
40
|
"globals": "^17.12.0",
|
|
41
41
|
"jest": "^30.3.0",
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export default class AiGradingSettings {
|
|
2
|
+
#client;
|
|
3
|
+
|
|
4
|
+
constructor(client) {
|
|
5
|
+
this.#client = client;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/** Admin-only: which AI provider/model quizzes:auto-grade-ai uses for open-text and audio grading. */
|
|
9
|
+
get() { return this.#client.get('/ai-grading-settings'); }
|
|
10
|
+
|
|
11
|
+
/** Admin-only: update the provider/model choices. */
|
|
12
|
+
edit(data) { return this.#client.patch('/ai-grading-settings', data); }
|
|
13
|
+
|
|
14
|
+
/** Admin-only: live model choices (each provider's own catalog, cached) plus pricing, for the settings page's dropdowns. */
|
|
15
|
+
models() { return this.#client.get('/ai-grading-settings/models'); }
|
|
16
|
+
}
|
package/src/api/v1/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import InsigniaApi from '../index.js';
|
|
2
|
+
import AiGradingSettings from './AiGradingSettings.js';
|
|
2
3
|
import Admin from './Admin.js';
|
|
3
4
|
import Auth from './Auth.js';
|
|
4
5
|
import Accounts from './Accounts.js';
|
|
@@ -57,6 +58,7 @@ export default class InsigniaApiV1 extends InsigniaApi {
|
|
|
57
58
|
let url = InsigniaApiV1._resolve(baseUrl);
|
|
58
59
|
super(url);
|
|
59
60
|
|
|
61
|
+
this.aiGradingSettings = new AiGradingSettings(this);
|
|
60
62
|
this.admin = new Admin(this);
|
|
61
63
|
this.auth = new Auth(this);
|
|
62
64
|
this.accounts = new Accounts(this);
|