@insignia-education/api-sdk-js 0.22.0 → 0.23.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 +1 -1
- package/src/api/v1/Admin.js +7 -0
package/package.json
CHANGED
package/src/api/v1/Admin.js
CHANGED
|
@@ -163,6 +163,13 @@ export default class Admin {
|
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
+
/** Organization-wide OpenAI completion usage, model breakdown and spend for a date range. Resolves `{ available: false }` when the API server has no valid OpenAI Admin API key. */
|
|
167
|
+
reportsOpenAiUsage({ fromDate, toDate } = {}) {
|
|
168
|
+
return this.#client.get('/admin/reports/openai-usage', {
|
|
169
|
+
from_date: fromDate, to_date: toDate,
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
|
|
166
173
|
/** Direct link to a repo's CI-generated test-coverage HTML report ('api' | 'front' | 'api-sdk-js') — open with <a href>/<iframe src>, cookie-authenticated, not fetch. */
|
|
167
174
|
coverageUrl(repo) {
|
|
168
175
|
return `${this.#client.baseUrl}/admin/coverage/${repo}/`;
|