@cryptorobot.ai/client 0.0.18 → 0.0.25
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/lib/client.d.ts +38 -36
- package/lib/client.js +6 -12
- package/lib/configuration.d.ts +20 -1
- package/lib/firebase-push-notification.d.ts +1 -0
- package/lib/helpers/backtest.helper.d.ts +53 -4
- package/lib/helpers/ccxt.helper.d.ts +75 -0
- package/lib/helpers/deployments.helper.d.ts +72 -0
- package/lib/helpers/funnel.helper.d.ts +17 -0
- package/lib/helpers/hyperopt.helper.d.ts +14 -0
- package/lib/helpers/push-notification.helper.d.ts +7 -0
- package/lib/helpers/queue.helper.d.ts +8 -0
- package/lib/helpers/sqlite3.helper.d.ts +6 -0
- package/lib/helpers/sqs.helper.d.ts +7 -0
- package/lib/helpers/subscription.helper.d.ts +48 -0
- package/lib/helpers/telegram.helper.d.ts +26 -1
- package/lib/helpers/trader.helper.d.ts +26 -0
- package/lib/hooks/application/setup-config-preparation.d.ts +1 -1
- package/lib/hooks/application/setup-info.d.ts +1 -1
- package/lib/hooks/application/setup-load-indicators.d.ts +1 -1
- package/lib/hooks/application/setup-load-strategy-templates.d.ts +1 -1
- package/lib/hooks/aws-prepare-batch-job.d.ts +2 -0
- package/lib/hooks/backtest-copy-candles-from-user-data.d.ts +1 -1
- package/lib/hooks/{backtest-generate-and-start.d.ts → backtest-generate-and-queue.d.ts} +1 -1
- package/lib/hooks/backtest-generate-config.d.ts +6 -0
- package/lib/hooks/backtest-generate-exchange-config.d.ts +6 -0
- package/lib/hooks/backtest-get-results.d.ts +12 -0
- package/lib/hooks/file-generate-config-hyperopt.d.ts +2 -0
- package/lib/hooks/setup-ensure-image.d.ts +3 -0
- package/lib/hooks/setup-firebase.d.ts +2 -0
- package/lib/hooks/setup-homepage.d.ts +3 -0
- package/lib/hooks/setup-mautic.d.ts +3 -0
- package/lib/hooks/setup-mixpanel.d.ts +3 -0
- package/lib/hooks/setup-prepare-maildev-while-in-test-env.d.ts +1 -1
- package/lib/hooks/setup-queues.d.ts +1 -1
- package/lib/hooks/sqlite-reset-database.d.ts +2 -0
- package/lib/hooks/traders/pods-process-worker.d.ts +5 -0
- package/lib/sentry.d.ts +2 -0
- package/lib/services/exchanges/balance/balance.schema.d.ts +56 -56
- package/lib/services/exchanges/download/download.schema.d.ts +60 -60
- package/lib/services/exchanges/download/webhooks/webhooks.schema.d.ts +84 -84
- package/lib/services/exchanges/exchanges.schema.d.ts +198 -198
- package/lib/services/exchanges/ticker/ticker.schema.d.ts +110 -110
- package/lib/services/homepage/homepage.class.d.ts +15 -0
- package/lib/services/homepage/homepage.d.ts +10 -0
- package/lib/services/homepage/homepage.schema.d.ts +237 -0
- package/lib/services/homepage/homepage.shared.d.ts +4 -0
- package/lib/services/homepage/homepage.shared.js +6 -0
- package/lib/services/markets/markets.schema.d.ts +112 -112
- package/lib/services/messages/messages.schema.d.ts +136 -64
- package/lib/services/strategies/ai/ai.schema.d.ts +32 -32
- package/lib/services/strategies/backtest/backtest.schema.d.ts +394 -84
- package/lib/services/strategies/backtest/results/results.class.d.ts +1 -1
- package/lib/services/strategies/backtest/results/results.schema.d.ts +454 -156
- package/lib/services/strategies/hyperopt/hyperopt.class.d.ts +11 -0
- package/lib/services/strategies/hyperopt/hyperopt.d.ts +11 -0
- package/lib/services/strategies/hyperopt/hyperopt.schema.d.ts +375 -0
- package/lib/services/strategies/hyperopt/hyperopt.shared.d.ts +13 -0
- package/lib/services/strategies/hyperopt/hyperopt.shared.js +13 -0
- package/lib/services/strategies/indicators/indicators.schema.d.ts +40 -40
- package/lib/services/strategies/strategies.schema.d.ts +329 -247
- package/lib/services/strategies/templates/templates.schema.d.ts +41 -41
- package/lib/services/stripe/charges/charges.d.ts +1 -1
- package/lib/services/stripe/customers/customers.d.ts +1 -1
- package/lib/services/stripe/customers/paymentintent/paymentintent.d.ts +1 -1
- package/lib/services/stripe/customers/paymentmethods/paymentmethods.d.ts +1 -1
- package/lib/services/stripe/products/products.d.ts +1 -1
- package/lib/services/traders/pods/api/api.class.d.ts +1 -1
- package/lib/services/traders/pods/api/api.schema.d.ts +527 -519
- package/lib/services/traders/pods/events/events.schema.d.ts +375 -111
- package/lib/services/traders/pods/pods.schema.d.ts +384 -384
- package/lib/services/traders/pods/webhooks/webhooks.schema.d.ts +76 -76
- package/lib/services/traders/traders.class.d.ts +7 -1
- package/lib/services/traders/traders.d.ts +1 -0
- package/lib/services/traders/traders.schema.d.ts +852 -380
- package/lib/services/users/users.class.d.ts +1 -1
- package/lib/services/users/users.schema.d.ts +158 -52
- package/package.json +9 -2
- package/lib/hooks/bootstrap-user-telegram.d.ts +0 -2
package/lib/client.d.ts
CHANGED
|
@@ -1,71 +1,73 @@
|
|
|
1
|
-
import type { TransportConnection, Application } from '@feathersjs/feathers';
|
|
2
1
|
import type { AuthenticationClientOptions } from '@feathersjs/authentication-client';
|
|
2
|
+
export type { Config, ConfigData, ConfigPatch, ConfigQuery } from './services/config/config.shared';
|
|
3
|
+
export type { Custom, CustomData, CustomPatch, CustomQuery } from './services/custom/custom.shared';
|
|
4
|
+
export type { ExchangesBalance, ExchangesBalanceData, ExchangesBalancePatch, ExchangesBalanceQuery } from './services/exchanges/balance/balance.shared';
|
|
5
|
+
export type { ExchangesDownload, ExchangesDownloadData, ExchangesDownloadPatch, ExchangesDownloadQuery } from './services/exchanges/download/download.shared';
|
|
6
|
+
export type { ExchangesDownloadWebhooks, ExchangesDownloadWebhooksData, ExchangesDownloadWebhooksPatch, ExchangesDownloadWebhooksQuery } from './services/exchanges/download/webhooks/webhooks.shared';
|
|
7
|
+
export type { Exchanges, ExchangesData, ExchangesPatch, ExchangesQuery } from './services/exchanges/exchanges.shared';
|
|
8
|
+
export type { ExchangesTicker, ExchangesTickerData, ExchangesTickerPatch, ExchangesTickerQuery } from './services/exchanges/ticker/ticker.shared';
|
|
9
|
+
export type { HomepageService } from './services/homepage/homepage.class';
|
|
10
|
+
export type { Homepage, HomepageData, HomepagePatch, HomepageQuery } from './services/homepage/homepage.shared';
|
|
11
|
+
export type { Marketplaces, MarketplacesData, MarketplacesPatch, MarketplacesQuery } from './services/marketplaces/marketplaces.shared';
|
|
12
|
+
export type { Markets, MarketsData, MarketsPatch, MarketsQuery } from './services/markets/markets.shared';
|
|
13
|
+
export type { Messages, MessagesData, MessagesPatch, MessagesQuery } from './services/messages/messages.shared';
|
|
14
|
+
export type { StrategiesAi, StrategiesAiData, StrategiesAiPatch, StrategiesAiQuery } from './services/strategies/ai/ai.shared';
|
|
15
|
+
export type { StrategiesAiStream, StrategiesAiStreamData, StrategiesAiStreamPatch, StrategiesAiStreamQuery } from './services/strategies/ai/stream/stream.shared';
|
|
16
|
+
export type { StrategiesBacktest, StrategiesBacktestData, StrategiesBacktestPatch, StrategiesBacktestQuery } from './services/strategies/backtest/backtest.shared';
|
|
17
|
+
export type { StrategiesBlob, StrategiesBlobData, StrategiesBlobPatch, StrategiesBlobQuery } from './services/strategies/blob/blob.shared';
|
|
18
|
+
export type { StrategiesHyperopt, StrategiesHyperoptData, StrategiesHyperoptPatch, StrategiesHyperoptQuery } from './services/strategies/hyperopt/hyperopt.shared';
|
|
19
|
+
export type { StrategiesIndicators, StrategiesIndicatorsData, StrategiesIndicatorsPatch, StrategiesIndicatorsQuery } from './services/strategies/indicators/indicators.shared';
|
|
20
|
+
export type { Strategies, StrategiesData, StrategiesPatch, StrategiesQuery } from './services/strategies/strategies.shared';
|
|
21
|
+
export type { StrategiesTemplates, StrategiesTemplatesData, StrategiesTemplatesPatch, StrategiesTemplatesQuery } from './services/strategies/templates/templates.shared';
|
|
22
|
+
export type { StripeCharges, StripeChargesData, StripeChargesPatch, StripeChargesQuery } from './services/stripe/charges/charges.shared';
|
|
23
|
+
export type { StripeCustomersCards, StripeCustomersCardsData, StripeCustomersCardsPatch, StripeCustomersCardsQuery } from './services/stripe/customers/cards/cards.shared';
|
|
24
|
+
export type { StripeCustomers, StripeCustomersData, StripeCustomersPatch, StripeCustomersQuery } from './services/stripe/customers/customers.shared';
|
|
25
|
+
export type { StripeCustomersPaymentintent, StripeCustomersPaymentintentData, StripeCustomersPaymentintentPatch, StripeCustomersPaymentintentQuery } from './services/stripe/customers/paymentintent/paymentintent.shared';
|
|
26
|
+
export type { StripeCustomersPaymentmethods, StripeCustomersPaymentmethodsData, StripeCustomersPaymentmethodsPatch, StripeCustomersPaymentmethodsQuery } from './services/stripe/customers/paymentmethods/paymentmethods.shared';
|
|
27
|
+
export type { StripeCustomersSubscriptions, StripeCustomersSubscriptionsData, StripeCustomersSubscriptionsPatch, StripeCustomersSubscriptionsQuery } from './services/stripe/customers/subscriptions/subscriptions.shared';
|
|
28
|
+
export type { StripeProducts, StripeProductsData, StripeProductsPatch, StripeProductsQuery } from './services/stripe/products/products.shared';
|
|
29
|
+
export type { TradersPodsApi, TradersPodsApiData, TradersPodsApiPatch, TradersPodsApiQuery } from './services/traders/pods/api/api.shared';
|
|
30
|
+
export type { TradersPodsBlob, TradersPodsBlobData, TradersPodsBlobPatch, TradersPodsBlobQuery } from './services/traders/pods/blob/blob.shared';
|
|
31
|
+
export type { TradersPodsEvents, TradersPodsEventsData, TradersPodsEventsPatch, TradersPodsEventsQuery } from './services/traders/pods/events/events.shared';
|
|
32
|
+
export type { TradersPods, TradersPodsData, TradersPodsPatch, TradersPodsQuery } from './services/traders/pods/pods.shared';
|
|
33
|
+
export type { TradersPodsWebhooks, TradersPodsWebhooksData, TradersPodsWebhooksPatch, TradersPodsWebhooksQuery } from './services/traders/pods/webhooks/webhooks.shared';
|
|
34
|
+
export type { Traders, TradersData, TradersPatch, TradersQuery } from './services/traders/traders.shared';
|
|
35
|
+
export type { User, UserData, UserPatch, UserQuery } from './services/users/users.shared';
|
|
36
|
+
export type { Version, VersionData, VersionPatch, VersionQuery } from './services/version/version.shared';
|
|
37
|
+
import './services/strategies/hyperopt/hyperopt.shared';
|
|
38
|
+
import type { Application, TransportConnection } from '@feathersjs/feathers';
|
|
3
39
|
import './services/version/version.shared';
|
|
4
|
-
export type { Version, VersionData, VersionQuery, VersionPatch } from './services/version/version.shared';
|
|
5
40
|
import './services/stripe/customers/paymentmethods/paymentmethods.shared';
|
|
6
|
-
export type { StripeCustomersPaymentmethods, StripeCustomersPaymentmethodsData, StripeCustomersPaymentmethodsQuery, StripeCustomersPaymentmethodsPatch } from './services/stripe/customers/paymentmethods/paymentmethods.shared';
|
|
7
41
|
import './services/stripe/customers/subscriptions/subscriptions.shared';
|
|
8
|
-
export type { StripeCustomersSubscriptions, StripeCustomersSubscriptionsData, StripeCustomersSubscriptionsQuery, StripeCustomersSubscriptionsPatch } from './services/stripe/customers/subscriptions/subscriptions.shared';
|
|
9
42
|
import './services/stripe/products/products.shared';
|
|
10
|
-
export type { StripeProducts, StripeProductsData, StripeProductsQuery, StripeProductsPatch } from './services/stripe/products/products.shared';
|
|
11
43
|
import './services/stripe/customers/cards/cards.shared';
|
|
12
|
-
export type { StripeCustomersCards, StripeCustomersCardsData, StripeCustomersCardsQuery, StripeCustomersCardsPatch } from './services/stripe/customers/cards/cards.shared';
|
|
13
44
|
import './services/stripe/customers/paymentintent/paymentintent.shared';
|
|
14
|
-
export type { StripeCustomersPaymentintent, StripeCustomersPaymentintentData, StripeCustomersPaymentintentQuery, StripeCustomersPaymentintentPatch } from './services/stripe/customers/paymentintent/paymentintent.shared';
|
|
15
45
|
import './services/stripe/customers/customers.shared';
|
|
16
|
-
export type { StripeCustomers, StripeCustomersData, StripeCustomersQuery, StripeCustomersPatch } from './services/stripe/customers/customers.shared';
|
|
17
46
|
import './services/stripe/charges/charges.shared';
|
|
18
|
-
export type { StripeCharges, StripeChargesData, StripeChargesQuery, StripeChargesPatch } from './services/stripe/charges/charges.shared';
|
|
19
47
|
import './services/strategies/ai/stream/stream.shared';
|
|
20
|
-
export type { StrategiesAiStream, StrategiesAiStreamData, StrategiesAiStreamQuery, StrategiesAiStreamPatch } from './services/strategies/ai/stream/stream.shared';
|
|
21
48
|
import './services/strategies/ai/ai.shared';
|
|
22
|
-
export type { StrategiesAi, StrategiesAiData, StrategiesAiQuery, StrategiesAiPatch } from './services/strategies/ai/ai.shared';
|
|
23
|
-
import './services/strategies/backtest/results/results.shared';
|
|
24
|
-
export type { StrategiesBacktestResults, StrategiesBacktestResultsData, StrategiesBacktestResultsQuery, StrategiesBacktestResultsPatch } from './services/strategies/backtest/results/results.shared';
|
|
25
49
|
import './services/strategies/backtest/backtest.shared';
|
|
26
|
-
export type { StrategiesBacktest, StrategiesBacktestData, StrategiesBacktestQuery, StrategiesBacktestPatch } from './services/strategies/backtest/backtest.shared';
|
|
27
50
|
import './services/traders/pods/events/events.shared';
|
|
28
|
-
export type { TradersPodsEvents, TradersPodsEventsData, TradersPodsEventsQuery, TradersPodsEventsPatch } from './services/traders/pods/events/events.shared';
|
|
29
51
|
import './services/traders/pods/webhooks/webhooks.shared';
|
|
30
|
-
export type { TradersPodsWebhooks, TradersPodsWebhooksData, TradersPodsWebhooksQuery, TradersPodsWebhooksPatch } from './services/traders/pods/webhooks/webhooks.shared';
|
|
31
52
|
import './services/traders/pods/api/api.shared';
|
|
32
|
-
export type { TradersPodsApi, TradersPodsApiData, TradersPodsApiQuery, TradersPodsApiPatch } from './services/traders/pods/api/api.shared';
|
|
33
53
|
import './services/strategies/indicators/indicators.shared';
|
|
34
|
-
export type { StrategiesIndicators, StrategiesIndicatorsData, StrategiesIndicatorsQuery, StrategiesIndicatorsPatch } from './services/strategies/indicators/indicators.shared';
|
|
35
54
|
import './services/strategies/templates/templates.shared';
|
|
36
|
-
export type { StrategiesTemplates, StrategiesTemplatesData, StrategiesTemplatesQuery, StrategiesTemplatesPatch } from './services/strategies/templates/templates.shared';
|
|
37
55
|
import './services/strategies/blob/blob.shared';
|
|
38
|
-
export type { StrategiesBlob, StrategiesBlobData, StrategiesBlobQuery, StrategiesBlobPatch } from './services/strategies/blob/blob.shared';
|
|
39
56
|
import './services/strategies/strategies.shared';
|
|
40
|
-
export type { Strategies, StrategiesData, StrategiesQuery, StrategiesPatch } from './services/strategies/strategies.shared';
|
|
41
57
|
import './services/traders/pods/pods.shared';
|
|
42
|
-
export type { TradersPods, TradersPodsData, TradersPodsQuery, TradersPodsPatch } from './services/traders/pods/pods.shared';
|
|
43
58
|
import './services/traders/traders.shared';
|
|
44
|
-
export type { Traders, TradersData, TradersQuery, TradersPatch } from './services/traders/traders.shared';
|
|
45
59
|
import './services/exchanges/download/webhooks/webhooks.shared';
|
|
46
|
-
export type { ExchangesDownloadWebhooks, ExchangesDownloadWebhooksData, ExchangesDownloadWebhooksQuery, ExchangesDownloadWebhooksPatch } from './services/exchanges/download/webhooks/webhooks.shared';
|
|
47
60
|
import './services/traders/pods/blob/blob.shared';
|
|
48
|
-
export type { TradersPodsBlob, TradersPodsBlobData, TradersPodsBlobQuery, TradersPodsBlobPatch } from './services/traders/pods/blob/blob.shared';
|
|
49
61
|
import './services/exchanges/download/download.shared';
|
|
50
|
-
export type { ExchangesDownload, ExchangesDownloadData, ExchangesDownloadQuery, ExchangesDownloadPatch } from './services/exchanges/download/download.shared';
|
|
51
62
|
import './services/exchanges/balance/balance.shared';
|
|
52
|
-
export type { ExchangesBalance, ExchangesBalanceData, ExchangesBalanceQuery, ExchangesBalancePatch } from './services/exchanges/balance/balance.shared';
|
|
53
63
|
import './services/exchanges/ticker/ticker.shared';
|
|
54
|
-
export type { ExchangesTicker, ExchangesTickerData, ExchangesTickerQuery, ExchangesTickerPatch } from './services/exchanges/ticker/ticker.shared';
|
|
55
64
|
import './services/marketplaces/marketplaces.shared';
|
|
56
|
-
export type { Marketplaces, MarketplacesData, MarketplacesQuery, MarketplacesPatch } from './services/marketplaces/marketplaces.shared';
|
|
57
65
|
import './services/config/config.shared';
|
|
58
|
-
export type { Config, ConfigData, ConfigQuery, ConfigPatch } from './services/config/config.shared';
|
|
59
66
|
import './services/markets/markets.shared';
|
|
60
|
-
export type { Markets, MarketsData, MarketsQuery, MarketsPatch } from './services/markets/markets.shared';
|
|
61
67
|
import './services/exchanges/exchanges.shared';
|
|
62
|
-
export type { Exchanges, ExchangesData, ExchangesQuery, ExchangesPatch } from './services/exchanges/exchanges.shared';
|
|
63
68
|
import './services/custom/custom.shared';
|
|
64
|
-
export type { Custom, CustomData, CustomQuery, CustomPatch } from './services/custom/custom.shared';
|
|
65
69
|
import './services/messages/messages.shared';
|
|
66
|
-
export type { Messages, MessagesData, MessagesQuery, MessagesPatch } from './services/messages/messages.shared';
|
|
67
70
|
import './services/users/users.shared';
|
|
68
|
-
export type { User, UserData, UserQuery, UserPatch } from './services/users/users.shared';
|
|
69
71
|
export interface Configuration {
|
|
70
72
|
connection: TransportConnection<ServiceTypes>;
|
|
71
73
|
}
|
|
@@ -77,7 +79,7 @@ export type ClientApplication = Application<ServiceTypes, Configuration>;
|
|
|
77
79
|
*
|
|
78
80
|
* @param connection The REST or Socket.io Feathers client connection
|
|
79
81
|
* @param authenticationOptions Additional settings for the authentication client
|
|
80
|
-
* @see https://dove.feathersjs.com/api/client.html
|
|
81
82
|
* @returns The Feathers client application
|
|
83
|
+
* @see https://dove.feathersjs.com/api/client.html
|
|
82
84
|
*/
|
|
83
85
|
export declare const createClient: <Configuration_1 = any>(connection: TransportConnection<ServiceTypes>, authenticationOptions?: Partial<AuthenticationClientOptions>) => ClientApplication;
|
package/lib/client.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/* istanbul ignore file */
|
|
2
3
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
4
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
5
|
};
|
|
5
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
7
|
exports.createClient = void 0;
|
|
7
|
-
|
|
8
|
-
const feathers_1 = require("@feathersjs/feathers");
|
|
8
|
+
const hyperopt_shared_1 = require("./services/strategies/hyperopt/hyperopt.shared");
|
|
9
9
|
const authentication_client_1 = __importDefault(require("@feathersjs/authentication-client"));
|
|
10
|
+
const feathers_1 = require("@feathersjs/feathers");
|
|
10
11
|
const version_shared_1 = require("./services/version/version.shared");
|
|
11
12
|
const paymentmethods_shared_1 = require("./services/stripe/customers/paymentmethods/paymentmethods.shared");
|
|
12
13
|
const subscriptions_shared_1 = require("./services/stripe/customers/subscriptions/subscriptions.shared");
|
|
@@ -17,7 +18,6 @@ const customers_shared_1 = require("./services/stripe/customers/customers.shared
|
|
|
17
18
|
const charges_shared_1 = require("./services/stripe/charges/charges.shared");
|
|
18
19
|
const stream_shared_1 = require("./services/strategies/ai/stream/stream.shared");
|
|
19
20
|
const ai_shared_1 = require("./services/strategies/ai/ai.shared");
|
|
20
|
-
const results_shared_1 = require("./services/strategies/backtest/results/results.shared");
|
|
21
21
|
const backtest_shared_1 = require("./services/strategies/backtest/backtest.shared");
|
|
22
22
|
const events_shared_1 = require("./services/traders/pods/events/events.shared");
|
|
23
23
|
const webhooks_shared_1 = require("./services/traders/pods/webhooks/webhooks.shared");
|
|
@@ -31,13 +31,6 @@ const traders_shared_1 = require("./services/traders/traders.shared");
|
|
|
31
31
|
const webhooks_shared_2 = require("./services/exchanges/download/webhooks/webhooks.shared");
|
|
32
32
|
const blob_shared_2 = require("./services/traders/pods/blob/blob.shared");
|
|
33
33
|
const download_shared_1 = require("./services/exchanges/download/download.shared");
|
|
34
|
-
// import { exchangesDataClient } from './services/exchanges/data/data.shared'
|
|
35
|
-
// export type {
|
|
36
|
-
// ExchangesData,
|
|
37
|
-
// ExchangesDataData,
|
|
38
|
-
// ExchangesDataQuery,
|
|
39
|
-
// ExchangesDataPatch
|
|
40
|
-
// } from './services/exchanges/data/data.shared'
|
|
41
34
|
const balance_shared_1 = require("./services/exchanges/balance/balance.shared");
|
|
42
35
|
const ticker_shared_1 = require("./services/exchanges/ticker/ticker.shared");
|
|
43
36
|
const marketplaces_shared_1 = require("./services/marketplaces/marketplaces.shared");
|
|
@@ -52,8 +45,8 @@ const users_shared_1 = require("./services/users/users.shared");
|
|
|
52
45
|
*
|
|
53
46
|
* @param connection The REST or Socket.io Feathers client connection
|
|
54
47
|
* @param authenticationOptions Additional settings for the authentication client
|
|
55
|
-
* @see https://dove.feathersjs.com/api/client.html
|
|
56
48
|
* @returns The Feathers client application
|
|
49
|
+
* @see https://dove.feathersjs.com/api/client.html
|
|
57
50
|
*/
|
|
58
51
|
const createClient = (connection, authenticationOptions = {}) => {
|
|
59
52
|
const client = (0, feathers_1.feathers)();
|
|
@@ -84,7 +77,6 @@ const createClient = (connection, authenticationOptions = {}) => {
|
|
|
84
77
|
client.configure(webhooks_shared_2.exchangesDownloadWebhooksClient);
|
|
85
78
|
client.configure(events_shared_1.tradersPodsEventsClient);
|
|
86
79
|
client.configure(backtest_shared_1.strategiesBacktestClient);
|
|
87
|
-
client.configure(results_shared_1.strategiesBacktestResultsClient);
|
|
88
80
|
client.configure(ai_shared_1.strategiesAiClient);
|
|
89
81
|
client.configure(stream_shared_1.strategiesAiStreamClient);
|
|
90
82
|
client.configure(charges_shared_1.stripeChargesClient);
|
|
@@ -95,6 +87,8 @@ const createClient = (connection, authenticationOptions = {}) => {
|
|
|
95
87
|
client.configure(subscriptions_shared_1.stripeCustomersSubscriptionsClient);
|
|
96
88
|
client.configure(paymentmethods_shared_1.stripeCustomersPaymentmethodsClient);
|
|
97
89
|
client.configure(version_shared_1.versionClient);
|
|
90
|
+
client.configure(hyperopt_shared_1.strategiesHyperoptClient);
|
|
91
|
+
client.configure(hyperopt_shared_1.strategiesHyperoptClient);
|
|
98
92
|
return client;
|
|
99
93
|
};
|
|
100
94
|
exports.createClient = createClient;
|
package/lib/configuration.d.ts
CHANGED
|
@@ -146,8 +146,27 @@ export declare const configurationSchema: import("@feathersjs/typebox").TInterse
|
|
|
146
146
|
apiKey: import("@feathersjs/typebox").TString<string>;
|
|
147
147
|
}>;
|
|
148
148
|
testData: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TAny>;
|
|
149
|
-
mixpanel: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").
|
|
149
|
+
mixpanel: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TObject<{
|
|
150
|
+
enabled: import("@feathersjs/typebox").TBoolean;
|
|
151
|
+
debug: import("@feathersjs/typebox").TBoolean;
|
|
152
|
+
token: import("@feathersjs/typebox").TString<string>;
|
|
153
|
+
}>>;
|
|
154
|
+
mautic: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TObject<{
|
|
155
|
+
enabled: import("@feathersjs/typebox").TBoolean;
|
|
156
|
+
url: import("@feathersjs/typebox").TString<string>;
|
|
157
|
+
username: import("@feathersjs/typebox").TString<string>;
|
|
158
|
+
password: import("@feathersjs/typebox").TString<string>;
|
|
159
|
+
}>>;
|
|
160
|
+
mixpanelClient: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TAny>;
|
|
161
|
+
firebaseClient: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TAny>;
|
|
150
162
|
telegramClient: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TAny>;
|
|
163
|
+
brevoClient: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TAny>;
|
|
164
|
+
mauticClient: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TAny>;
|
|
165
|
+
brevo: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TObject<{
|
|
166
|
+
enabled: import("@feathersjs/typebox").TBoolean;
|
|
167
|
+
apiKey: import("@feathersjs/typebox").TString<string>;
|
|
168
|
+
}>>;
|
|
169
|
+
fileSystemId: import("@feathersjs/typebox").TString<string>;
|
|
151
170
|
awsClient: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TAny>;
|
|
152
171
|
telegram: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TObject<{
|
|
153
172
|
enabled: import("@feathersjs/typebox").TBoolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,12 +1,61 @@
|
|
|
1
1
|
import { HookContext } from '@feathersjs/feathers';
|
|
2
|
+
/** The `BacktestHelper` class provides utility methods for generating and managing backtest deployments. */
|
|
2
3
|
export declare class BacktestHelper {
|
|
4
|
+
context: HookContext;
|
|
3
5
|
client: any;
|
|
4
|
-
|
|
6
|
+
batch: any;
|
|
7
|
+
constructor(context: HookContext);
|
|
5
8
|
static getName(createdAt: any): string;
|
|
6
|
-
|
|
7
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Generates a container spec for backtesting.
|
|
11
|
+
*
|
|
12
|
+
* @param context - The HookContext object.
|
|
13
|
+
* @returns The generated container spec.
|
|
14
|
+
*/
|
|
15
|
+
static generate(context: HookContext, provider: string): object;
|
|
16
|
+
/**
|
|
17
|
+
* Promisifies a stream and resolves or rejects based on the stream events.
|
|
18
|
+
*
|
|
19
|
+
* @param stream - The stream object.
|
|
20
|
+
* @returns A promise that resolves to true when the stream ends successfully, or rejects with an Unprocessable error
|
|
21
|
+
* if the stream data includes 'WARNING - No history for'.
|
|
22
|
+
*/
|
|
23
|
+
static promisifyStream(container: any): Promise<any>;
|
|
24
|
+
/**
|
|
25
|
+
* Retrieves the results of a backtest.
|
|
26
|
+
*
|
|
27
|
+
* @param context - The HookContext object.
|
|
28
|
+
* @returns A Promise that resolves to the parsed results of the backtest.
|
|
29
|
+
* @throws Unprocessable error if no results are found.
|
|
30
|
+
*/
|
|
8
31
|
static getResults(context: HookContext): any;
|
|
32
|
+
/**
|
|
33
|
+
* Retrieves the elapsed time from the backtest results.
|
|
34
|
+
*
|
|
35
|
+
* @param {HookContext} context - The context object containing the necessary data.
|
|
36
|
+
* @returns {Promise<any>} - A promise that resolves to the parsed backtest results.
|
|
37
|
+
* @throws {Error} - If the backtest results path or meta file is not found.
|
|
38
|
+
*/
|
|
9
39
|
static getElapsedTime(context: HookContext): any;
|
|
10
|
-
static
|
|
40
|
+
static verifyCapacityAllocationForCPU(context: HookContext): Promise<any>;
|
|
41
|
+
/**
|
|
42
|
+
* Deploys a container for backtesting.
|
|
43
|
+
*
|
|
44
|
+
* @param context - The HookContext object.
|
|
45
|
+
* @param deployment - The deployment object.
|
|
46
|
+
* @returns A Promise that resolves to the result of the backtest.
|
|
47
|
+
* @throws If there is an error during the backtest.
|
|
48
|
+
*/
|
|
49
|
+
static deploy(context: HookContext, deployment: any, provider: string): Promise<any>;
|
|
50
|
+
/**
|
|
51
|
+
* Retrieves the trader data path based on the provided context.
|
|
52
|
+
*
|
|
53
|
+
* @param {HookContext} context - The context object containing the necessary data.
|
|
54
|
+
* @returns {string} - The path to the trader data.
|
|
55
|
+
*/
|
|
11
56
|
static getTraderData(context: HookContext): string;
|
|
57
|
+
updateJobStatus(message: any): Promise<void>;
|
|
58
|
+
submitJob(command?: string[]): Promise<any>;
|
|
59
|
+
jobDefinitionExists(name: string): Promise<boolean>;
|
|
60
|
+
registerJobDefinition(definition: any): Promise<any>;
|
|
12
61
|
}
|
|
@@ -1,15 +1,90 @@
|
|
|
1
1
|
import { HookContext } from '@feathersjs/feathers';
|
|
2
|
+
/**
|
|
3
|
+
* The CCXT class provides methods for interacting with cryptocurrency exchanges using the CCXT library. It includes
|
|
4
|
+
* functions for checking if an exchange is supported, handling errors, retrieving required credentials, loading
|
|
5
|
+
* markets, and more.
|
|
6
|
+
*
|
|
7
|
+
* @class
|
|
8
|
+
*/
|
|
2
9
|
export declare class CCXT {
|
|
3
10
|
ccxt: any;
|
|
4
11
|
context: HookContext;
|
|
5
12
|
exchange: any;
|
|
6
13
|
constructor(context: HookContext);
|
|
14
|
+
/**
|
|
15
|
+
* Checks if the given exchange is supported.
|
|
16
|
+
*
|
|
17
|
+
* @param exchange - The name of the exchange to check.
|
|
18
|
+
* @throws NotFound - If the exchange is not available.
|
|
19
|
+
*/
|
|
7
20
|
checkIfExchangeIsSupported(exchange: String): any;
|
|
21
|
+
/**
|
|
22
|
+
* Handles different types of errors thrown by the CCXT library.
|
|
23
|
+
*
|
|
24
|
+
* @param e - The error object.
|
|
25
|
+
* @returns Void
|
|
26
|
+
* @throws GeneralError - If the error is a DDoSProtection error or contains 'ECONNRESET' in the message.
|
|
27
|
+
* @throws Timeout - If the error is a RequestTimeout error.
|
|
28
|
+
* @throws NotAuthenticated - If the error is an AuthenticationError.
|
|
29
|
+
* @throws Unavailable - If the error is an ExchangeNotAvailable error.
|
|
30
|
+
* @throws GeneralError - If the error is an ExchangeError or NetworkError.
|
|
31
|
+
*/
|
|
8
32
|
errorHandler(e: any): any;
|
|
33
|
+
/**
|
|
34
|
+
* Retrieves the required credentials for a given exchange.
|
|
35
|
+
*
|
|
36
|
+
* @param exchange - The name of the exchange.
|
|
37
|
+
* @returns A promise that resolves to an array of required credentials.
|
|
38
|
+
*/
|
|
9
39
|
getRequiredCredentials(exchange: any): Promise<any>;
|
|
40
|
+
/**
|
|
41
|
+
* Validates the required credentials for an exchange.
|
|
42
|
+
*
|
|
43
|
+
* @param exchange - The exchange object containing the required credentials.
|
|
44
|
+
* @returns A promise that resolves to true if the credentials are valid, or false if they are not.
|
|
45
|
+
* @throws BadRequest error if the required credentials are not provided.
|
|
46
|
+
*/
|
|
10
47
|
checkCredentials(exchange: any): Promise<any>;
|
|
48
|
+
/**
|
|
49
|
+
* Loads the markets for a given exchange.
|
|
50
|
+
*
|
|
51
|
+
* This function is needed to store the pairs from each exchange and runs on every patch exchange hook. However, to
|
|
52
|
+
* avoid overloading the endpoint, the response update to the market table is done using a minimum time difference
|
|
53
|
+
* required.
|
|
54
|
+
*
|
|
55
|
+
* @param context - The context object.
|
|
56
|
+
* @param exchange - The exchange name.
|
|
57
|
+
* @param silent - Optional. If true, suppresses debug logs. Default is false.
|
|
58
|
+
* @returns A promise that resolves to the loaded markets.
|
|
59
|
+
* @throws {GeneralError} If there is an error loading the markets.
|
|
60
|
+
*/
|
|
11
61
|
loadMarkets(context: any, exchange: any, silent?: Boolean): Promise<any>;
|
|
62
|
+
/**
|
|
63
|
+
* Retrieves the bases and quotes from the given markets.
|
|
64
|
+
*
|
|
65
|
+
* @param markets - The markets object.
|
|
66
|
+
* @returns A promise that resolves to an object containing the markets, bases, and quotes.
|
|
67
|
+
*/
|
|
12
68
|
getBasesAndQuotes(markets: any): Promise<any>;
|
|
69
|
+
/**
|
|
70
|
+
* Verifies if the interval needed to wait in order to add again to the database is bigger than the value informed in
|
|
71
|
+
* default.json. If the interval is not bigger, the method skips creating the data into the database.
|
|
72
|
+
*
|
|
73
|
+
* @param {HookContext} context - The context object.
|
|
74
|
+
* @param {any} markets - The markets data.
|
|
75
|
+
* @param {String} exchange - The exchange name.
|
|
76
|
+
* @param {Boolean} [force] - Optional. If true, forces the refresh of the market data.
|
|
77
|
+
* @returns {Promise<any>} - A promise that resolves with the markets data if the refresh is needed, or false if the
|
|
78
|
+
* refresh is not needed.
|
|
79
|
+
*/
|
|
13
80
|
verifyIfNeedToRefresh(context: HookContext, markets: any, exchange: String, force?: Boolean): Promise<any>;
|
|
81
|
+
/**
|
|
82
|
+
* Finds all pairs/markets of a specific exchange and keeps only the last one to save space in the database.
|
|
83
|
+
*
|
|
84
|
+
* @param {HookContext} context - The context object.
|
|
85
|
+
* @param {String} exchange - The name of the exchange.
|
|
86
|
+
* @returns {Promise<any>} - A promise that resolves with the markets data.
|
|
87
|
+
* @throws {GeneralError} - If there is an error finding or removing the markets.
|
|
88
|
+
*/
|
|
14
89
|
keepOnlyLastOnePerExchange(context: HookContext, exchange: String): Promise<any>;
|
|
15
90
|
}
|
|
@@ -2,11 +2,83 @@ import { HookContext } from '@feathersjs/feathers';
|
|
|
2
2
|
export declare class Docker {
|
|
3
3
|
client: any;
|
|
4
4
|
constructor();
|
|
5
|
+
/**
|
|
6
|
+
* Validates if the strategy is available.
|
|
7
|
+
*
|
|
8
|
+
* @param context - The HookContext object.
|
|
9
|
+
* @throws {Unprocessable} - If the strategy is not available.
|
|
10
|
+
*/
|
|
5
11
|
static checkIfStrategyIsAvailable(context: HookContext): void;
|
|
12
|
+
/**
|
|
13
|
+
* Check if the strategy file exists in disk.
|
|
14
|
+
*
|
|
15
|
+
* @param context - The HookContext object.
|
|
16
|
+
* @returns Promise<void>
|
|
17
|
+
* @throws {Unprocessable} - If the strategy file is not available in the disk.
|
|
18
|
+
*/
|
|
6
19
|
static checkIfStrategyExistsInDisk(context: HookContext): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Check if the config file exists in disk.
|
|
22
|
+
*
|
|
23
|
+
* @param context - The HookContext object.
|
|
24
|
+
* @returns Promise<void>
|
|
25
|
+
*/
|
|
7
26
|
static checkIfConfigExistsInDisk(context: HookContext): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Requests an available host port.
|
|
29
|
+
*
|
|
30
|
+
* @param context - The HookContext object.
|
|
31
|
+
* @returns A Promise that resolves to a string representing the available port.
|
|
32
|
+
* @throws Error if unable to find a free port.
|
|
33
|
+
*/
|
|
8
34
|
static requestAvailableHostPort(context: HookContext): Promise<String>;
|
|
35
|
+
/**
|
|
36
|
+
* Generates a deployment object for Docker based on the provided context.
|
|
37
|
+
*
|
|
38
|
+
* @param {HookContext} context - The context object containing the necessary data for generating the deployment.
|
|
39
|
+
* @returns {Promise<object>} - A promise that resolves to the generated deployment object.
|
|
40
|
+
* @throws {GeneralError} - If there is an error during the generation process.
|
|
41
|
+
*/
|
|
9
42
|
static generate(context: HookContext): Promise<object>;
|
|
43
|
+
/**
|
|
44
|
+
* Deploys a container using the provided deployment configuration.
|
|
45
|
+
*
|
|
46
|
+
* @param context - The HookContext object.
|
|
47
|
+
* @param deployment - The deployment configuration.
|
|
48
|
+
* @returns A promise that resolves to the deployed container.
|
|
49
|
+
* @throws {NotFound} If the image specified in the deployment configuration is not found.
|
|
50
|
+
* @throws {GeneralError} If there is an error deploying the container.
|
|
51
|
+
*/
|
|
10
52
|
static deploy(context: HookContext, deployment: any): Promise<any>;
|
|
53
|
+
/**
|
|
54
|
+
* Returns the path to the trader data directory.
|
|
55
|
+
*
|
|
56
|
+
* @param {HookContext} context - The HookContext object.
|
|
57
|
+
* @returns {string} - The path to the trader data directory.
|
|
58
|
+
*/
|
|
11
59
|
static getTraderData(context: HookContext): string;
|
|
60
|
+
/**
|
|
61
|
+
* Checks if an image with the specified name exists in the Docker registry.
|
|
62
|
+
*
|
|
63
|
+
* @param {string} imageName - The name of the image to check.
|
|
64
|
+
* @returns {Promise<boolean>} - A promise that resolves to true if the image exists, false otherwise.
|
|
65
|
+
* @throws {Error} - If there is an error checking the image existence.
|
|
66
|
+
*/
|
|
67
|
+
static checkImageExists(imageName: string): Promise<boolean>;
|
|
68
|
+
/**
|
|
69
|
+
* Pulls an image from the Docker registry.
|
|
70
|
+
*
|
|
71
|
+
* @param {string} imageName - The name of the image to pull.
|
|
72
|
+
* @returns {Promise<void>} - A promise that resolves when the image is successfully pulled.
|
|
73
|
+
* @throws {Error} - If there is an error pulling the image.
|
|
74
|
+
*/
|
|
75
|
+
static pullImage(imageName: string): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Ensures that the specified image exists in the Docker registry.
|
|
78
|
+
*
|
|
79
|
+
* @param {string} imageName - The name of the image to ensure.
|
|
80
|
+
* @returns {Promise<void>} - A promise that resolves when the image is successfully ensured.
|
|
81
|
+
* @throws {Error} - If there is an error ensuring the image.
|
|
82
|
+
*/
|
|
83
|
+
static ensureImage(imageName: string): Promise<void>;
|
|
12
84
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Application, HookContext } from '@feathersjs/feathers';
|
|
2
|
+
import { User } from 'src/services/users/users.schema';
|
|
3
|
+
export declare class FunnellHelper {
|
|
4
|
+
app: Application;
|
|
5
|
+
context: HookContext;
|
|
6
|
+
mixpanel: any;
|
|
7
|
+
mautic: any;
|
|
8
|
+
constructor(context: HookContext);
|
|
9
|
+
trackSignup(type: String, user: User): Promise<void>;
|
|
10
|
+
incrementCountOf(key: string, user: User, count?: Number): Promise<void>;
|
|
11
|
+
trackEvent(context: HookContext): Promise<void>;
|
|
12
|
+
trackLogin(user: User): Promise<void>;
|
|
13
|
+
setUserToQualifying(user: User, event?: any): Promise<void>;
|
|
14
|
+
setUserToOnboarded(user: User): Promise<void>;
|
|
15
|
+
setUserToNurtured(user: User): Promise<void>;
|
|
16
|
+
setUserToGivingUp(user: User): Promise<void>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HookContext } from '@feathersjs/feathers';
|
|
2
|
+
export declare class Hyperopt {
|
|
3
|
+
context: HookContext;
|
|
4
|
+
client: any;
|
|
5
|
+
iam: any;
|
|
6
|
+
cloudformation: any;
|
|
7
|
+
constructor(context: HookContext);
|
|
8
|
+
prepareLocalEnvironment(): Promise<void>;
|
|
9
|
+
jobDefinitionExists(name: string): Promise<boolean>;
|
|
10
|
+
generate(context: HookContext): Promise<object>;
|
|
11
|
+
updateJobStatus(message: any): Promise<void>;
|
|
12
|
+
registerJobDefinition(definition: any): Promise<any>;
|
|
13
|
+
submitJob(): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HookContext } from '@feathersjs/feathers';
|
|
2
|
+
import { User } from '../../src/services/users/users.schema';
|
|
3
|
+
export declare class PushNotificationHelper {
|
|
4
|
+
client: any;
|
|
5
|
+
constructor(context: HookContext);
|
|
6
|
+
dispatch(user: User, notification: object): Promise<any>;
|
|
7
|
+
}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { HookContext } from '@feathersjs/feathers';
|
|
2
2
|
export declare class QueueHelper {
|
|
3
3
|
constructor();
|
|
4
|
+
/**
|
|
5
|
+
* Retrieves a queue from the context based on its ID.
|
|
6
|
+
*
|
|
7
|
+
* @param {HookContext} context - The context object containing the application and other data.
|
|
8
|
+
* @param {string} id - The ID of the queue to retrieve.
|
|
9
|
+
* @returns {Promise<any>} - A promise that resolves to the queue object.
|
|
10
|
+
* @throws {NotFound} - If the queue with the specified ID is not found.
|
|
11
|
+
*/
|
|
4
12
|
getQueue(context: HookContext, id: string): Promise<any>;
|
|
5
13
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { HookContext } from '@feathersjs/feathers';
|
|
2
|
+
/** SubscriptionHelper class provides methods for checking user subscriptions and limits. */
|
|
3
|
+
export declare class SubscriptionHelper {
|
|
4
|
+
private limits;
|
|
5
|
+
getLimits(context: HookContext): {
|
|
6
|
+
traders: number;
|
|
7
|
+
backtest: {
|
|
8
|
+
threshold: {
|
|
9
|
+
cpu: number;
|
|
10
|
+
};
|
|
11
|
+
simultaneous: number;
|
|
12
|
+
memory: number;
|
|
13
|
+
cpu: number;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Checks if the user has an active subscription.
|
|
18
|
+
*
|
|
19
|
+
* @param {HookContext} context - The hook context object.
|
|
20
|
+
* @returns {boolean} - Returns true if the user has an active subscription, otherwise undefined.
|
|
21
|
+
*/
|
|
22
|
+
hasActiveSubscription(context: HookContext): true | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Checks if the user has a trial subscription.
|
|
25
|
+
*
|
|
26
|
+
* @param {HookContext} context - The hook context object.
|
|
27
|
+
* @returns {boolean} - Returns true if the user has a trial subscription, otherwise undefined.
|
|
28
|
+
*/
|
|
29
|
+
hasFreeTrialSubscriptionExpired(context: HookContext): void;
|
|
30
|
+
/**
|
|
31
|
+
* Checks if the user can trade with real money.
|
|
32
|
+
*
|
|
33
|
+
* @param {HookContext} context - The hook context object.
|
|
34
|
+
* @returns {Promise<void>} - Returns a promise that resolves if the user can trade with real money.
|
|
35
|
+
* @throws {Forbidden} - Throws a Forbidden error if the user does not have an active subscription.
|
|
36
|
+
*/
|
|
37
|
+
verifyIfUserCanTradeWithRealMoney(context: HookContext): Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* Checks if the user is below the limits of traders.
|
|
40
|
+
*
|
|
41
|
+
* @param {HookContext} context - The hook context object.
|
|
42
|
+
* @returns {Promise<void>} - Returns a promise that resolves if the user is below the limits of traders.
|
|
43
|
+
* @throws {Forbidden} - Throws a Forbidden error if the user has reached the limit of running traders.
|
|
44
|
+
* @throws {Unprocessable} - Throws an Unprocessable error if there is an error getting traders.
|
|
45
|
+
*/
|
|
46
|
+
verifyIfUserIsBelowLimitsOfTraders(context: HookContext): Promise<void>;
|
|
47
|
+
verifyBacktestSimultaneouslyLimit(context: HookContext): Promise<void>;
|
|
48
|
+
}
|
|
@@ -1,7 +1,32 @@
|
|
|
1
|
+
import { HookContext } from '@feathersjs/feathers';
|
|
2
|
+
/** The TelegramHelper class provides methods for creating, updating, and deleting Telegram groups. */
|
|
1
3
|
export declare class TelegramHelper {
|
|
2
4
|
client: any;
|
|
3
|
-
constructor();
|
|
5
|
+
constructor(context: HookContext);
|
|
6
|
+
/**
|
|
7
|
+
* Creates a telegram group with the given title.
|
|
8
|
+
*
|
|
9
|
+
* @param {string} title - The title of the group.
|
|
10
|
+
* @returns {Promise<any>} - A promise that resolves to an object containing the chat_id and invite_link of the
|
|
11
|
+
* created group.
|
|
12
|
+
* @throws {GeneralError} - If there is an error during the creation of the group.
|
|
13
|
+
*/
|
|
4
14
|
createGroup(title: string): Promise<any>;
|
|
15
|
+
/**
|
|
16
|
+
* Updates the title of a telegram group.
|
|
17
|
+
*
|
|
18
|
+
* @param {any} chat_id - The ID of the group chat.
|
|
19
|
+
* @param {string} title - The new title for the group.
|
|
20
|
+
* @returns {Promise<any>} - A promise that resolves to the updated group object.
|
|
21
|
+
* @throws {GeneralError} - If there is an error during the update of the group title.
|
|
22
|
+
*/
|
|
5
23
|
updateGroup(chat_id: any, title: string): Promise<any>;
|
|
24
|
+
/**
|
|
25
|
+
* Deletes a telegram group with the given chat ID.
|
|
26
|
+
*
|
|
27
|
+
* @param {any} chat_id - The ID of the group chat.
|
|
28
|
+
* @returns {Promise<any>} - A promise that resolves to the result of deleting the group.
|
|
29
|
+
* @throws {GeneralError} - If there is an error during the deletion of the group.
|
|
30
|
+
*/
|
|
6
31
|
deleteGroup(chat_id: any): Promise<any>;
|
|
7
32
|
}
|