@insignia-education/api-sdk-js 0.15.115 → 0.15.117

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.115",
3
+ "version": "0.15.117",
4
4
  "description": "JavaScript SDK for the Insignia Education API",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -264,16 +264,36 @@ export default class Users {
264
264
  };
265
265
  }
266
266
 
267
- /** Manual email verification for this user (no token/link). Sellers-and-above only. */
267
+ /** Email verification for this user. verify/unverify/sendVerification: Sellers-and-above only. */
268
268
  emails(userId) {
269
269
  const base = `/users/${userId}/emails`;
270
270
  const client = this.#client;
271
271
  return {
272
272
  /** field: 'email' | 'contact_mail' | 'public_mail' | 'legal_guardian_mail'. */
273
273
  verify: (field) => client.post(`${base}/${field}/verify`),
274
+ /** Clears the field back to unverified. */
275
+ unverify: (field) => client.post(`${base}/${field}/unverify`),
276
+ /** Sends a real confirm-link email to whatever address is on file for field. */
277
+ sendVerification: (field) => client.post(`${base}/${field}/send-verification`),
274
278
  };
275
279
  }
276
280
 
281
+ /** Phone/WhatsApp verification for this user (manual only — no OTP/SMS flow). Sellers-and-above only. */
282
+ phones(userId) {
283
+ const base = `/users/${userId}/phones`;
284
+ const client = this.#client;
285
+ return {
286
+ /** field: 'phone' | 'whatsapp'. */
287
+ verify: (field) => client.post(`${base}/${field}/verify`),
288
+ unverify: (field) => client.post(`${base}/${field}/unverify`),
289
+ };
290
+ }
291
+
292
+ /** Public — confirms a contact/public/guardian email verify-link's hash. No auth. */
293
+ confirmEmailVerification(hash) {
294
+ return this.#client.post(`/users/emails/verify/${hash}`);
295
+ }
296
+
277
297
  /** Verified Telegram account linking for this user. Owner or staff only. */
278
298
  telegram(userId) {
279
299
  const base = `/users/${userId}/telegram`;