@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 +1 -1
- package/src/api/v1/Admin.js +5 -0
- package/src/api/v1/Users.js +11 -0
package/package.json
CHANGED
package/src/api/v1/Admin.js
CHANGED
|
@@ -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 !== '')
|
package/src/api/v1/Users.js
CHANGED
|
@@ -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}`);
|