@insignia-education/api-sdk-js 0.15.116 → 0.15.118

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.116",
3
+ "version": "0.15.118",
4
4
  "description": "JavaScript SDK for the Insignia Education API",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -69,6 +69,11 @@ export default class Admin {
69
69
  });
70
70
  }
71
71
 
72
+ /** 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. */
73
+ coverageUrl(repo) {
74
+ return `${this.#client.baseUrl}/admin/coverage/${repo}/`;
75
+ }
76
+
72
77
  static #buildUrl(baseUrl, path, params) {
73
78
  const qs = new URLSearchParams(
74
79
  Object.entries(params).filter(([, v]) => v !== undefined && v !== null && v !== '')
@@ -278,6 +278,17 @@ export default class Users {
278
278
  };
279
279
  }
280
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
+
281
292
  /** Public — confirms a contact/public/guardian email verify-link's hash. No auth. */
282
293
  confirmEmailVerification(hash) {
283
294
  return this.#client.post(`/users/emails/verify/${hash}`);