@insignia-education/api-sdk-js 0.15.111 → 0.15.113

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.111",
3
+ "version": "0.15.113",
4
4
  "description": "JavaScript SDK for the Insignia Education API",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -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) {
@@ -271,6 +273,8 @@ export default class Users {
271
273
  linkToken: () => client.post(`${base}/link-token`),
272
274
  /** Fallback flow: completes a link the bot proposed after an organic (no-payload) /start, given the { chat_id, username, expires_at, signature } it replied with. */
273
275
  connect: (data) => client.post(`${base}/connect`, data),
276
+ /** Undoes connect()/linkToken() — clears telegram/telegram_chat_id/telegram_verified_at, so the account reads as never-connected. */
277
+ disconnect: () => client.del(base),
274
278
  };
275
279
  }
276
280
  }