@insignia-education/api-sdk-js 0.15.113 → 0.15.115
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/MailBlacklist.js +5 -1
- package/src/api/v1/Users.js +10 -0
package/package.json
CHANGED
|
@@ -5,7 +5,11 @@ export default class MailBlacklist {
|
|
|
5
5
|
this.#client = client;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
get(
|
|
8
|
+
/** get() / get(id) / get({ email }) — the last looks up one entry by email (or null), without fetching the whole list. */
|
|
9
|
+
get(idOrParams = null) {
|
|
10
|
+
if (idOrParams && typeof idOrParams === 'object') return this.#client.get('/mail-blacklist', idOrParams);
|
|
11
|
+
return idOrParams ? this.#client.get(`/mail-blacklist/${idOrParams}`) : this.#client.get('/mail-blacklist');
|
|
12
|
+
}
|
|
9
13
|
create(data) { return this.#client.put('/mail-blacklist', data); }
|
|
10
14
|
delete(id) { return this.#client.del(`/mail-blacklist/${id}`); }
|
|
11
15
|
}
|
package/src/api/v1/Users.js
CHANGED
|
@@ -264,6 +264,16 @@ export default class Users {
|
|
|
264
264
|
};
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
+
/** Manual email verification for this user (no token/link). Sellers-and-above only. */
|
|
268
|
+
emails(userId) {
|
|
269
|
+
const base = `/users/${userId}/emails`;
|
|
270
|
+
const client = this.#client;
|
|
271
|
+
return {
|
|
272
|
+
/** field: 'email' | 'contact_mail' | 'public_mail' | 'legal_guardian_mail'. */
|
|
273
|
+
verify: (field) => client.post(`${base}/${field}/verify`),
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
|
|
267
277
|
/** Verified Telegram account linking for this user. Owner or staff only. */
|
|
268
278
|
telegram(userId) {
|
|
269
279
|
const base = `/users/${userId}/telegram`;
|