@insignia-education/api-sdk-js 0.25.5 → 0.25.7
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/Users.js +3 -1
package/package.json
CHANGED
package/src/api/v1/Users.js
CHANGED
|
@@ -387,7 +387,7 @@ export default class Users {
|
|
|
387
387
|
return this.#client.post(`/users/emails/verify/${hash}`);
|
|
388
388
|
}
|
|
389
389
|
|
|
390
|
-
/** Verified Telegram account linking for this user. Owner or staff only. */
|
|
390
|
+
/** Verified Telegram account linking for this user. Owner or staff only (purge: admins only). */
|
|
391
391
|
telegram(userId) {
|
|
392
392
|
const base = `/users/${userId}/telegram`;
|
|
393
393
|
const client = this.#client;
|
|
@@ -398,6 +398,8 @@ export default class Users {
|
|
|
398
398
|
connect: (data) => client.post(`${base}/connect`, data),
|
|
399
399
|
/** Undoes connect()/linkToken() — clears telegram/telegram_chat_id/telegram_verified_at, so the account reads as never-connected. */
|
|
400
400
|
disconnect: () => client.del(base),
|
|
401
|
+
/** Admin-only: removes this user from every Telegram group and deletes all their messages there. Runs in the background — resolves { queued: true } right away; 422 if Telegram isn't connected. */
|
|
402
|
+
purge: () => client.post(`${base}/purge`),
|
|
401
403
|
};
|
|
402
404
|
}
|
|
403
405
|
}
|