@insignia-education/api-sdk-js 0.15.124 → 0.15.126
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 +20 -0
package/package.json
CHANGED
package/src/api/v1/Admin.js
CHANGED
|
@@ -30,6 +30,26 @@ export default class Admin {
|
|
|
30
30
|
return this.#client.get('/admin/statistics/paypal-transactions', { from_date: fromDate, to_date: toDate, slot });
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
/** Our wallet's live on-chain balance for every crypto asset/chain we accept payment in — [{ asset, chain, balance }]. Read straight from the chain, not a sum of recorded payments. */
|
|
34
|
+
statisticsCryptoBalances() {
|
|
35
|
+
return this.#client.get('/admin/statistics/crypto-balances');
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** Our Stripe account's current available/pending balance, broken down per currency. Resolves `{ available: false }` (not an error) if the account can't be read. */
|
|
39
|
+
statisticsStripeBalance() {
|
|
40
|
+
return this.#client.get('/admin/statistics/stripe-balance');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** Raw Stripe balance-transaction list (charges, refunds, fees, payouts) for a date range. Resolves `{ available: false }` the same way statisticsStripeBalance() does. */
|
|
44
|
+
statisticsStripeTransactions({ fromDate, toDate } = {}) {
|
|
45
|
+
return this.#client.get('/admin/statistics/stripe-transactions', { from_date: fromDate, to_date: toDate });
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** Our Binance Spot account's real exchange balance (every non-zero asset) — distinct from statisticsCryptoBalances()' on-chain wallet balance. Resolves `{ available: false }` if the API key isn't configured or the request fails. */
|
|
49
|
+
statisticsBinanceBalances() {
|
|
50
|
+
return this.#client.get('/admin/statistics/binance-balances');
|
|
51
|
+
}
|
|
52
|
+
|
|
33
53
|
/** Paginated sales-report rows for a date range, with optional course/seller/payment-method/currency filters. */
|
|
34
54
|
reportsSales({ fromDate, toDate, courseId, sellerId, paymentMethodId, currencyId, page, perPage } = {}) {
|
|
35
55
|
return this.#client.get('/admin/reports/sales', {
|