@insignia-education/api-sdk-js 0.15.120 → 0.15.122

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.120",
3
+ "version": "0.15.122",
4
4
  "description": "JavaScript SDK for the Insignia Education API",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -0,0 +1,9 @@
1
+ export default class ContactTypes {
2
+ #client;
3
+
4
+ constructor(client) {
5
+ this.#client = client;
6
+ }
7
+
8
+ get() { return this.#client.get('/contact-types'); }
9
+ }
@@ -55,6 +55,12 @@ export default class Users {
55
55
  * reloaded UserCourse (with certificate_url set), same shape as rebuildInvoice().
56
56
  */
57
57
  rebuildCertificate: (courseId) => client.post(`${base}/${courseId}/certificate/rebuild`),
58
+ /**
59
+ * Employee-only: point the certificate at a file already picked from the general
60
+ * File Manager (MediaPickerModal), instead of an auto-rendered PDF. Pass url: null
61
+ * to clear the override. Returns the reloaded UserCourse, same shape as rebuildCertificate().
62
+ */
63
+ setCustomCertificate: (courseId, url) => client.post(`${base}/${courseId}/certificate/custom`, { url }),
58
64
  };
59
65
  }
60
66
 
@@ -66,6 +72,9 @@ export default class Users {
66
72
 
67
73
  courseNotes(userId) { return this.#nested(userId, 'course-notes'); }
68
74
 
75
+ /** Additional social/contact links (Facebook, WhatsApp, YouTube, etc.) — each row's contact_id points at a ContactTypes.get() entry. */
76
+ contacts(userId) { return this.#nested(userId, 'contacts'); }
77
+
69
78
  /** get() accepts optional { courseId, withTrashed } filters — withTrashed also returns soft-deleted attempts. */
70
79
  quizzes(userId) {
71
80
  const base = `/users/${userId}/quizzes`;
@@ -6,6 +6,7 @@ import Certificates from './Certificates.js';
6
6
  import Changelogs from './Changelogs.js';
7
7
  import CompanySettings from './CompanySettings.js';
8
8
  import ContactForms from './ContactForms.js';
9
+ import ContactTypes from './ContactTypes.js';
9
10
  import ConversationalTopics from './ConversationalTopics.js';
10
11
  import Countries from './Countries.js';
11
12
  import Coupons from './Coupons.js';
@@ -62,6 +63,7 @@ export default class InsigniaApiV1 extends InsigniaApi {
62
63
  this.changelogs = new Changelogs(this);
63
64
  this.companySettings = new CompanySettings(this);
64
65
  this.contactForms = new ContactForms(this);
66
+ this.contactTypes = new ContactTypes(this);
65
67
  this.conversationalTopics = new ConversationalTopics(this);
66
68
  this.countries = new Countries(this);
67
69
  this.coupons = new Coupons(this);