@insignia-education/api-sdk-js 0.15.110 → 0.15.112
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/Courses.js +4 -0
- package/src/api/v1/Users.js +2 -0
package/package.json
CHANGED
package/src/api/v1/Courses.js
CHANGED
|
@@ -56,6 +56,10 @@ export default class Courses {
|
|
|
56
56
|
create: (data) => this.#client.put(base, data),
|
|
57
57
|
edit: (id, data) => this.#client.patch(`${base}/${id}`, data),
|
|
58
58
|
delete: (id) => this.#client.del(`${base}/${id}`),
|
|
59
|
+
/** Soft-deleted dates for this course, most recently deleted first — the "Deleted" tab, for undoing a mistaken delete(). */
|
|
60
|
+
trashed: () => this.#client.get(`${base}/trashed`),
|
|
61
|
+
/** Undoes delete() — brings a soft-deleted date back into the normal list. */
|
|
62
|
+
restore: (id) => this.#client.post(`${base}/${id}/restore`),
|
|
59
63
|
/** Create (or reuse) a Telegram group for this date. */
|
|
60
64
|
createTelegramGroup: (id) => this.#client.post(`${base}/${id}/telegram-group`),
|
|
61
65
|
/** Re-copy this date's telegram_link/telegram_id onto every UserCourse assigned to it. */
|
package/src/api/v1/Users.js
CHANGED
|
@@ -23,6 +23,8 @@ export default class Users {
|
|
|
23
23
|
}
|
|
24
24
|
/** Employee-only: users eligible to own/reassign an organization (organization-and-above). */
|
|
25
25
|
organizationOwners() { return this.#client.get('/users/organization-owners'); }
|
|
26
|
+
/** Sales-and-above: create an account on someone else's behalf. `type_id` is only honored for employees-and-above (see api's canAssignUserType()) — a sales actor gets a plain customer account regardless of what's sent. */
|
|
27
|
+
create(data) { return this.#client.put('/users', data); }
|
|
26
28
|
edit(id, data) { return this.#client.patch(`/users/${id}`, data); }
|
|
27
29
|
|
|
28
30
|
#nested(userId, path) {
|