@insignia-education/api-sdk-js 0.15.122 → 0.15.123
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 +10 -0
package/package.json
CHANGED
package/src/api/v1/Admin.js
CHANGED
|
@@ -20,6 +20,16 @@ export default class Admin {
|
|
|
20
20
|
return this.#client.get('/admin/statistics/claude-usage', { from_date: fromDate, to_date: toDate });
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
/** Both rotating PayPal accounts' real available balance, keyed "1"/"2". Each resolves `{ available: false }` (not an error) if that account's "Transaction Search" feature isn't enabled in PayPal's dashboard yet. */
|
|
24
|
+
statisticsPaypalBalance({ currency } = {}) {
|
|
25
|
+
return this.#client.get('/admin/statistics/paypal-balance', { currency });
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** Raw PayPal transaction list for a date range (max 31 days) against one account slot (1 or 2, default 1). Resolves `{ available: false }` the same way statisticsPaypalBalance() does when it can't be read. */
|
|
29
|
+
statisticsPaypalTransactions({ fromDate, toDate, slot } = {}) {
|
|
30
|
+
return this.#client.get('/admin/statistics/paypal-transactions', { from_date: fromDate, to_date: toDate, slot });
|
|
31
|
+
}
|
|
32
|
+
|
|
23
33
|
/** Paginated sales-report rows for a date range, with optional course/seller/payment-method/currency filters. */
|
|
24
34
|
reportsSales({ fromDate, toDate, courseId, sellerId, paymentMethodId, currencyId, page, perPage } = {}) {
|
|
25
35
|
return this.#client.get('/admin/reports/sales', {
|