@insignia-education/api-sdk-js 0.15.68 → 0.15.69

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.
@@ -23,30 +23,30 @@
23
23
  <div class='clearfix'>
24
24
 
25
25
  <div class='fl pad1y space-right2'>
26
- <span class="strong">37.88% </span>
26
+ <span class="strong">44.97% </span>
27
27
  <span class="quiet">Statements</span>
28
- <span class='fraction'>86/227</span>
28
+ <span class='fraction'>103/229</span>
29
29
  </div>
30
30
 
31
31
 
32
32
  <div class='fl pad1y space-right2'>
33
33
  <span class="strong">100% </span>
34
34
  <span class="quiet">Branches</span>
35
- <span class='fraction'>3/3</span>
35
+ <span class='fraction'>4/4</span>
36
36
  </div>
37
37
 
38
38
 
39
39
  <div class='fl pad1y space-right2'>
40
- <span class="strong">8.1% </span>
40
+ <span class="strong">8.69% </span>
41
41
  <span class="quiet">Functions</span>
42
- <span class='fraction'>3/37</span>
42
+ <span class='fraction'>4/46</span>
43
43
  </div>
44
44
 
45
45
 
46
46
  <div class='fl pad1y space-right2'>
47
- <span class="strong">37.88% </span>
47
+ <span class="strong">44.97% </span>
48
48
  <span class="quiet">Lines</span>
49
- <span class='fraction'>86/227</span>
49
+ <span class='fraction'>103/229</span>
50
50
  </div>
51
51
 
52
52
 
@@ -290,12 +290,14 @@
290
290
  <a name='L225'></a><a href='#L225'>225</a>
291
291
  <a name='L226'></a><a href='#L226'>226</a>
292
292
  <a name='L227'></a><a href='#L227'>227</a>
293
- <a name='L228'></a><a href='#L228'>228</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
293
+ <a name='L228'></a><a href='#L228'>228</a>
294
+ <a name='L229'></a><a href='#L229'>229</a>
295
+ <a name='L230'></a><a href='#L230'>230</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
296
+ <span class="cline-any cline-yes">1x</span>
297
+ <span class="cline-any cline-yes">1x</span>
294
298
  <span class="cline-any cline-yes">1x</span>
295
299
  <span class="cline-any cline-yes">1x</span>
296
300
  <span class="cline-any cline-yes">1x</span>
297
- <span class="cline-any cline-yes">32x</span>
298
- <span class="cline-any cline-yes">32x</span>
299
301
  <span class="cline-any cline-yes">1x</span>
300
302
  <span class="cline-any cline-yes">1x</span>
301
303
  <span class="cline-any cline-yes">1x</span>
@@ -387,21 +389,23 @@
387
389
  <span class="cline-any cline-yes">1x</span>
388
390
  <span class="cline-any cline-yes">1x</span>
389
391
  <span class="cline-any cline-yes">1x</span>
390
- <span class="cline-any cline-no">&nbsp;</span>
391
- <span class="cline-any cline-no">&nbsp;</span>
392
- <span class="cline-any cline-no">&nbsp;</span>
393
- <span class="cline-any cline-no">&nbsp;</span>
394
- <span class="cline-any cline-no">&nbsp;</span>
395
- <span class="cline-any cline-no">&nbsp;</span>
396
- <span class="cline-any cline-no">&nbsp;</span>
397
- <span class="cline-any cline-no">&nbsp;</span>
398
- <span class="cline-any cline-no">&nbsp;</span>
399
- <span class="cline-any cline-no">&nbsp;</span>
400
- <span class="cline-any cline-no">&nbsp;</span>
401
- <span class="cline-any cline-no">&nbsp;</span>
402
- <span class="cline-any cline-no">&nbsp;</span>
403
- <span class="cline-any cline-no">&nbsp;</span>
404
- <span class="cline-any cline-no">&nbsp;</span>
392
+ <span class="cline-any cline-yes">1x</span>
393
+ <span class="cline-any cline-yes">1x</span>
394
+ <span class="cline-any cline-yes">1x</span>
395
+ <span class="cline-any cline-yes">1x</span>
396
+ <span class="cline-any cline-yes">1x</span>
397
+ <span class="cline-any cline-yes">1x</span>
398
+ <span class="cline-any cline-yes">1x</span>
399
+ <span class="cline-any cline-yes">1x</span>
400
+ <span class="cline-any cline-yes">1x</span>
401
+ <span class="cline-any cline-yes">1x</span>
402
+ <span class="cline-any cline-yes">1x</span>
403
+ <span class="cline-any cline-yes">1x</span>
404
+ <span class="cline-any cline-yes">1x</span>
405
+ <span class="cline-any cline-yes">1x</span>
406
+ <span class="cline-any cline-yes">1x</span>
407
+ <span class="cline-any cline-yes">1x</span>
408
+ <span class="cline-any cline-yes">1x</span>
405
409
  <span class="cline-any cline-yes">1x</span>
406
410
  <span class="cline-any cline-yes">1x</span>
407
411
  <span class="cline-any cline-yes">1x</span>
@@ -527,7 +531,7 @@
527
531
  <span class="fstat-no" title="function not covered" > get(id = null) { return id ? this.#client.get(`/users/${id}`) : this.#client.get('/users'); }</span>
528
532
  <span class="fstat-no" title="function not covered" > getByUsername(username) { return this.#client.get(`/users/username/${username}`); }</span>
529
533
  <span class="fstat-no" title="function not covered" > findByUsername(username) { return this.#client.get(`/users/find/${username}`); }</span>
530
- cashReceivers() { return this.#client.get('/users/cash-receivers'); }
534
+ <span class="fstat-no" title="function not covered" > cashReceivers() { return this.#client.get('/users/cash-receivers'); }</span>
531
535
  /** Seller-type users, for the payment forms' Seller picker (checkout + admin payment create/edit). */
532
536
  <span class="fstat-no" title="function not covered" > sellers() { return this.#client.get('/users/sellers'); }</span>
533
537
  /** Employee-only: users assignable as a course owner (super-admins, education centers, organizations). */
@@ -613,22 +617,24 @@
613
617
  <span class="fstat-no" title="function not covered" > surveys(userId) { return this.#nested(userId, 'surveys'); }</span>
614
618
  <span class="fstat-no" title="function not covered" > cart(userId) { return this.#nested(userId, 'cart'); }</span>
615
619
  &nbsp;
616
- <span class="fstat-no" title="function not covered" > payments(userId) {</span>
617
- <span class="cstat-no" title="statement not covered" > const base = `/users/${userId}/payments`;</span>
618
- <span class="cstat-no" title="statement not covered" > const client = this.#client;</span>
619
- <span class="cstat-no" title="statement not covered" > return {</span>
620
- <span class="cstat-no" title="statement not covered" > get: (id = null) =&gt; id ? client.get(`${base}/${id}`) : client.get(base),</span>
621
- <span class="cstat-no" title="statement not covered" > create: (data) =&gt; client.put(base, data),</span>
622
- <span class="cstat-no" title="statement not covered" > edit: (id, data) =&gt; client.patch(`${base}/${id}`, data),</span>
623
- <span class="cstat-no" title="statement not covered" > delete: (id) =&gt; client.del(`${base}/${id}`),</span>
624
- <span class="cstat-no" title="statement not covered" > verify: (id, data) =&gt; client.post(`${base}/${id}/verify`, data),</span>
625
- <span class="cstat-no" title="statement not covered" > reject: (id, data) =&gt; client.post(`${base}/${id}/reject`, data),</span>
626
- <span class="cstat-no" title="statement not covered" > /** Preview pricing (with any auto-applied Offer) for a prospective cart, without creating a payment. */</span>
627
- <span class="cstat-no" title="statement not covered" > quote: (data) =&gt; client.post(`${base}/quote`, data),</span>
628
- <span class="cstat-no" title="statement not covered" > /** Creates a Stripe PaymentIntent for this cart; returns { client_secret, publishable_key, amount } to mount Stripe Elements with. */</span>
629
- <span class="cstat-no" title="statement not covered" > stripeIntent: (data) =&gt; client.post(`${base}/stripe/intent`, data),</span>
630
- <span class="cstat-no" title="statement not covered" > };</span>
631
- <span class="cstat-no" title="statement not covered" > }</span>
620
+ payments(userId) {
621
+ const base = `/users/${userId}/payments`;
622
+ const client = this.#client;
623
+ return {
624
+ get: <span class="fstat-no" title="function not covered" >(id = null) =&gt; id ? client.get(`${base}/${id}`) : client.get(base),</span>
625
+ create: (<span class="fstat-no" title="function not covered" >data) =&gt; client.put(base, data),</span>
626
+ edit: <span class="fstat-no" title="function not covered" >(id, data) =&gt; client.patch(`${base}/${id}`, data),</span>
627
+ delete: (<span class="fstat-no" title="function not covered" >id) =&gt; client.del(`${base}/${id}`),</span>
628
+ verify: <span class="fstat-no" title="function not covered" >(id, data) =&gt; client.post(`${base}/${id}/verify`, data),</span>
629
+ reject: <span class="fstat-no" title="function not covered" >(id, data) =&gt; client.post(`${base}/${id}/reject`, data),</span>
630
+ /** Preview pricing (with any auto-applied Offer) for a prospective cart, without creating a payment. */
631
+ quote: (<span class="fstat-no" title="function not covered" >data) =&gt; client.post(`${base}/quote`, data),</span>
632
+ /** Creates a Stripe PaymentIntent for this cart; returns { client_secret, publishable_key, amount } to mount Stripe Elements with. */
633
+ stripeIntent: (<span class="fstat-no" title="function not covered" >data) =&gt; client.post(`${base}/stripe/intent`, data),</span>
634
+ /** Direct link to the invoice PDF (application/pdf, inline) — not a fetch: open/href this URL directly, same as support_file. Auth is via the ambient JWT cookie. */
635
+ invoiceUrl: (id) =&gt; `${client.baseUrl}${base}/${id}/invoice`,
636
+ };
637
+ }
632
638
  &nbsp;
633
639
  /** Read-only: points are granted/revoked by internal jobs, not over the API. */
634
640
  <span class="fstat-no" title="function not covered" > points(userId) {</span>
@@ -751,7 +757,7 @@
751
757
  <div class='footer quiet pad2 space-top1 center small'>
752
758
  Code coverage generated by
753
759
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
754
- at 2026-08-11T19:46:48.865Z
760
+ at 2026-08-12T00:21:43.076Z
755
761
  </div>
756
762
  <script src="../../../prettify.js"></script>
757
763
  <script>