@cryptorobot.ai/client 0.0.15 → 0.0.17

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.
Files changed (29) hide show
  1. package/lib/configuration.d.ts +9 -0
  2. package/lib/helpers/logging.helper.d.ts +6 -6
  3. package/lib/helpers/queue.helper.d.ts +5 -0
  4. package/lib/helpers/telegram.helper.d.ts +7 -0
  5. package/lib/helpers/trader.helper.d.ts +2 -0
  6. package/lib/hooks/bootstrap-user-exchanges.d.ts +2 -0
  7. package/lib/hooks/bootstrap-user-strategies.d.ts +2 -0
  8. package/lib/hooks/bootstrap-user-telegram.d.ts +2 -0
  9. package/lib/hooks/bootstrap-user-traders.d.ts +2 -0
  10. package/lib/hooks/setup-cronjobs.d.ts +2 -0
  11. package/lib/hooks/setup-queues.d.ts +3 -0
  12. package/lib/hooks/setup-telegram-client.d.ts +3 -0
  13. package/lib/hooks/telegram-create-group.d.ts +2 -0
  14. package/lib/hooks/telegram-delete-group.d.ts +2 -0
  15. package/lib/hooks/telegram-update-group.d.ts +2 -0
  16. package/lib/hooks/tickers-fetch.d.ts +1 -1
  17. package/lib/hooks/traders/pods-process-worker.d.ts +1 -1
  18. package/lib/services/exchanges/balance/balance.schema.d.ts +4 -12
  19. package/lib/services/exchanges/download/download.schema.d.ts +8 -16
  20. package/lib/services/exchanges/exchanges.schema.d.ts +57 -15
  21. package/lib/services/exchanges/ticker/ticker.schema.d.ts +4 -12
  22. package/lib/services/messages/messages.schema.d.ts +101 -3
  23. package/lib/services/strategies/strategies.schema.d.ts +360 -80
  24. package/lib/services/traders/pods/api/api.schema.d.ts +1044 -212
  25. package/lib/services/traders/pods/pods.schema.d.ts +704 -152
  26. package/lib/services/traders/traders.schema.d.ts +340 -60
  27. package/lib/services/users/users.schema.d.ts +16 -0
  28. package/lib/telegram-get-credentials.d.ts +1 -0
  29. package/package.json +1 -1
@@ -96,6 +96,7 @@ export declare const configurationSchema: import("@feathersjs/typebox").TInterse
96
96
  port: import("@feathersjs/typebox").TNumber;
97
97
  public: import("@feathersjs/typebox").TString<string>;
98
98
  protocol: import("@feathersjs/typebox").TString<string>;
99
+ database: import("@feathersjs/typebox").TString<string>;
99
100
  project: import("@feathersjs/typebox").TObject<{
100
101
  name: import("@feathersjs/typebox").TString<string>;
101
102
  address: import("@feathersjs/typebox").TString<string>;
@@ -108,6 +109,7 @@ export declare const configurationSchema: import("@feathersjs/typebox").TInterse
108
109
  minRefreshIntervalBalancesInMinutes: import("@feathersjs/typebox").TNumber;
109
110
  proxies: import("@feathersjs/typebox").TAny;
110
111
  }>;
112
+ queues: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TArray<import("@feathersjs/typebox").TAny>>;
111
113
  storage: import("@feathersjs/typebox").TString<string>;
112
114
  configurationId: import("@feathersjs/typebox").TString<string>;
113
115
  provider: import("@feathersjs/typebox").TUnion<[import("@feathersjs/typebox").TLiteral<"docker">]>;
@@ -145,6 +147,13 @@ export declare const configurationSchema: import("@feathersjs/typebox").TInterse
145
147
  }>;
146
148
  testData: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TAny>;
147
149
  mixpanel: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TAny>;
150
+ telegramClient: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TAny>;
151
+ telegram: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TObject<{
152
+ enabled: import("@feathersjs/typebox").TBoolean;
153
+ apiId: import("@feathersjs/typebox").TAny;
154
+ apiHash: import("@feathersjs/typebox").TAny;
155
+ stringSession: import("@feathersjs/typebox").TAny;
156
+ }>>;
148
157
  }>]>;
149
158
  export type ApplicationConfiguration = Static<typeof configurationSchema>;
150
159
  export declare const configurationValidator: import("@feathersjs/schema").Validator<any, any>;
@@ -1,8 +1,8 @@
1
1
  export default class Log {
2
- static info(message: any, context: any, filename?: any, extra?: any): void;
3
- static warn(message: any, context: any, filename?: any, extra?: any): void;
4
- static debug(message: any, context: any, filename?: any, extra?: any): void;
5
- static error(message: any, context: any, filename?: any, extra?: any): void;
6
- static silly(message: any, context: any, filename?: any, extra?: any): void;
7
- static verbose(message: any, context: any, filename?: any, extra?: any): void;
2
+ static info(message: any, context?: any, filename?: any, extra?: any): void;
3
+ static warn(message: any, context?: any, filename?: any, extra?: any): void;
4
+ static debug(message: any, context?: any, filename?: any, extra?: any): void;
5
+ static error(message: any, context?: any, filename?: any, extra?: any): void;
6
+ static silly(message: any, context?: any, filename?: any, extra?: any): void;
7
+ static verbose(message: any, context?: any, filename?: any, extra?: any): void;
8
8
  }
@@ -0,0 +1,5 @@
1
+ import { HookContext } from '@feathersjs/feathers';
2
+ export declare class QueueHelper {
3
+ constructor();
4
+ getQueue(context: HookContext, id: string): Promise<any>;
5
+ }
@@ -0,0 +1,7 @@
1
+ export declare class TelegramHelper {
2
+ client: any;
3
+ constructor();
4
+ createGroup(title: string): Promise<any>;
5
+ updateGroup(chat_id: any, title: string): Promise<any>;
6
+ deleteGroup(chat_id: any): Promise<any>;
7
+ }
@@ -1,10 +1,12 @@
1
1
  /// <reference types="node" />
2
2
  import { HookContext } from '@feathersjs/feathers';
3
3
  import { PathLike } from 'fs';
4
+ import { Traders } from 'src/services/traders/traders.schema';
4
5
  export declare class TraderHelper {
5
6
  getWebhookUrl(context: HookContext): PathLike;
6
7
  getTradersDataPath(context: HookContext): PathLike;
7
8
  getRelativeTradersDataPath(context: HookContext): PathLike;
8
9
  generateWebhooks(context: HookContext): any;
9
10
  generateApiServer(context: HookContext): any;
11
+ generateTelegram(chat_id: any, invite_link: string): Pick<Traders, 'telegram'>;
10
12
  }
@@ -0,0 +1,2 @@
1
+ import type { HookContext } from '../declarations';
2
+ export declare const bootstrapUserExchanges: (context: HookContext) => Promise<void>;
@@ -0,0 +1,2 @@
1
+ import type { HookContext } from '../declarations';
2
+ export declare const bootstrapUserStrategies: (context: HookContext) => Promise<void>;
@@ -0,0 +1,2 @@
1
+ import type { HookContext } from '../declarations';
2
+ export declare const bootstrapUserTelegram: (context: HookContext) => Promise<void>;
@@ -0,0 +1,2 @@
1
+ import type { HookContext } from '../declarations';
2
+ export declare const bootstrapUserTraders: (context: HookContext) => Promise<void>;
@@ -0,0 +1,2 @@
1
+ import type { HookContext, NextFunction } from '../declarations';
2
+ export declare const setupCronjobs: (context: HookContext, next: NextFunction) => Promise<void>;
@@ -0,0 +1,3 @@
1
+ import type { HookContext } from '../declarations';
2
+ import { NextFunction } from '@feathersjs/feathers';
3
+ export declare const setupQueues: (context: HookContext, next: NextFunction) => Promise<void>;
@@ -0,0 +1,3 @@
1
+ import type { HookContext } from '../declarations';
2
+ import { NextFunction } from '@feathersjs/feathers';
3
+ export declare const setupTelegramClient: (context: HookContext, next: NextFunction) => Promise<void>;
@@ -0,0 +1,2 @@
1
+ import type { HookContext } from '../declarations';
2
+ export declare const telegramCreateGroup: (context: HookContext) => Promise<void>;
@@ -0,0 +1,2 @@
1
+ import type { HookContext } from '../declarations';
2
+ export declare const telegramDeleteGroup: (context: HookContext) => Promise<void>;
@@ -0,0 +1,2 @@
1
+ import type { HookContext } from '../declarations';
2
+ export declare const telegramUpdateGroup: (context: HookContext) => Promise<void>;
@@ -1,2 +1,2 @@
1
1
  import type { HookContext } from '../declarations';
2
- export declare const tickersFetch: (context: HookContext) => Promise<HookContext>;
2
+ export declare const tickersFetch: (context: HookContext) => Promise<HookContext | undefined>;
@@ -1,2 +1,2 @@
1
1
  import type { HookContext } from '../../declarations';
2
- export declare const podsProcessWorker: (context: HookContext) => Promise<any>;
2
+ export declare const podsProcessWorker: (context: HookContext) => Promise<void>;
@@ -42,7 +42,6 @@ export declare const exchangesBalanceSchema: import("@feathersjs/typebox").TObje
42
42
  }>>>;
43
43
  ccxt_async_config: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TAny>;
44
44
  which: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
45
- key: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
46
45
  apiKey: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
47
46
  secret: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
48
47
  requiredCredentials: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TAny>;
@@ -66,13 +65,13 @@ export declare const exchangesBalanceResolver: import("@feathersjs/schema").Reso
66
65
  name?: any;
67
66
  apiKey?: string | undefined;
68
67
  secret?: string | undefined;
69
- key?: string | undefined;
70
68
  avatar?: any;
71
69
  createdAt?: any;
72
70
  updatedAt?: any;
73
71
  userId?: string | {} | undefined;
74
72
  which?: string | undefined;
75
73
  connected?: boolean | undefined;
74
+ token?: string | undefined;
76
75
  downloaded?: {
77
76
  updatedAt: any;
78
77
  size: string;
@@ -109,7 +108,6 @@ export declare const exchangesBalanceResolver: import("@feathersjs/schema").Reso
109
108
  twofa?: string | undefined;
110
109
  privateKey?: string | undefined;
111
110
  walletAddress?: string | undefined;
112
- token?: string | undefined;
113
111
  __v?: any;
114
112
  _id: string | {};
115
113
  } | undefined;
@@ -123,13 +121,13 @@ export declare const exchangesBalanceExternalResolver: import("@feathersjs/schem
123
121
  name?: any;
124
122
  apiKey?: string | undefined;
125
123
  secret?: string | undefined;
126
- key?: string | undefined;
127
124
  avatar?: any;
128
125
  createdAt?: any;
129
126
  updatedAt?: any;
130
127
  userId?: string | {} | undefined;
131
128
  which?: string | undefined;
132
129
  connected?: boolean | undefined;
130
+ token?: string | undefined;
133
131
  downloaded?: {
134
132
  updatedAt: any;
135
133
  size: string;
@@ -166,7 +164,6 @@ export declare const exchangesBalanceExternalResolver: import("@feathersjs/schem
166
164
  twofa?: string | undefined;
167
165
  privateKey?: string | undefined;
168
166
  walletAddress?: string | undefined;
169
- token?: string | undefined;
170
167
  __v?: any;
171
168
  _id: string | {};
172
169
  } | undefined;
@@ -215,7 +212,6 @@ export declare const exchangesBalanceDataSchema: import("@feathersjs/typebox").T
215
212
  }>>>;
216
213
  ccxt_async_config: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TAny>;
217
214
  which: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
218
- key: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
219
215
  apiKey: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
220
216
  secret: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
221
217
  requiredCredentials: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TAny>;
@@ -239,13 +235,13 @@ export declare const exchangesBalanceDataResolver: import("@feathersjs/schema").
239
235
  name?: any;
240
236
  apiKey?: string | undefined;
241
237
  secret?: string | undefined;
242
- key?: string | undefined;
243
238
  avatar?: any;
244
239
  createdAt?: any;
245
240
  updatedAt?: any;
246
241
  userId?: string | {} | undefined;
247
242
  which?: string | undefined;
248
243
  connected?: boolean | undefined;
244
+ token?: string | undefined;
249
245
  downloaded?: {
250
246
  updatedAt: any;
251
247
  size: string;
@@ -282,7 +278,6 @@ export declare const exchangesBalanceDataResolver: import("@feathersjs/schema").
282
278
  twofa?: string | undefined;
283
279
  privateKey?: string | undefined;
284
280
  walletAddress?: string | undefined;
285
- token?: string | undefined;
286
281
  __v?: any;
287
282
  _id: string | {};
288
283
  } | undefined;
@@ -331,7 +326,6 @@ export declare const exchangesBalancePatchSchema: import("@feathersjs/typebox").
331
326
  }>>>;
332
327
  ccxt_async_config: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TAny>;
333
328
  which: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
334
- key: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
335
329
  apiKey: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
336
330
  secret: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
337
331
  requiredCredentials: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TAny>;
@@ -355,13 +349,13 @@ export declare const exchangesBalancePatchResolver: import("@feathersjs/schema")
355
349
  name?: any;
356
350
  apiKey?: string | undefined;
357
351
  secret?: string | undefined;
358
- key?: string | undefined;
359
352
  avatar?: any;
360
353
  createdAt?: any;
361
354
  updatedAt?: any;
362
355
  userId?: string | {} | undefined;
363
356
  which?: string | undefined;
364
357
  connected?: boolean | undefined;
358
+ token?: string | undefined;
365
359
  downloaded?: {
366
360
  updatedAt: any;
367
361
  size: string;
@@ -398,7 +392,6 @@ export declare const exchangesBalancePatchResolver: import("@feathersjs/schema")
398
392
  twofa?: string | undefined;
399
393
  privateKey?: string | undefined;
400
394
  walletAddress?: string | undefined;
401
- token?: string | undefined;
402
395
  __v?: any;
403
396
  _id: string | {};
404
397
  } | undefined;
@@ -447,7 +440,6 @@ export declare const exchangesBalanceQueryProperties: import("@feathersjs/typebo
447
440
  }>>>;
448
441
  ccxt_async_config: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TAny>;
449
442
  which: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
450
- key: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
451
443
  apiKey: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
452
444
  secret: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
453
445
  requiredCredentials: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TAny>;
@@ -43,7 +43,6 @@ export declare const exchangesDownloadSchema: import("@feathersjs/typebox").TObj
43
43
  }>>>;
44
44
  ccxt_async_config: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TAny>;
45
45
  which: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
46
- key: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
47
46
  apiKey: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
48
47
  secret: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
49
48
  requiredCredentials: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TAny>;
@@ -86,13 +85,13 @@ export declare const exchangesDownloadResolver: import("@feathersjs/schema").Res
86
85
  name?: any;
87
86
  apiKey?: string | undefined;
88
87
  secret?: string | undefined;
89
- key?: string | undefined;
90
88
  avatar?: any;
91
89
  createdAt?: any;
92
90
  updatedAt?: any;
93
91
  userId?: string | {} | undefined;
94
92
  which?: string | undefined;
95
93
  connected?: boolean | undefined;
94
+ token?: string | undefined;
96
95
  downloaded?: {
97
96
  updatedAt: any;
98
97
  size: string;
@@ -129,14 +128,13 @@ export declare const exchangesDownloadResolver: import("@feathersjs/schema").Res
129
128
  twofa?: string | undefined;
130
129
  privateKey?: string | undefined;
131
130
  walletAddress?: string | undefined;
132
- token?: string | undefined;
133
131
  __v?: any;
134
132
  _id: string | {};
135
133
  } | undefined;
136
134
  webhook?: {
137
135
  url: string;
138
- format: any;
139
136
  enabled: boolean;
137
+ format: any;
140
138
  webhookstatus: {
141
139
  event: string;
142
140
  status: string;
@@ -163,13 +161,13 @@ export declare const exchangesDownloadExternalResolver: import("@feathersjs/sche
163
161
  name?: any;
164
162
  apiKey?: string | undefined;
165
163
  secret?: string | undefined;
166
- key?: string | undefined;
167
164
  avatar?: any;
168
165
  createdAt?: any;
169
166
  updatedAt?: any;
170
167
  userId?: string | {} | undefined;
171
168
  which?: string | undefined;
172
169
  connected?: boolean | undefined;
170
+ token?: string | undefined;
173
171
  downloaded?: {
174
172
  updatedAt: any;
175
173
  size: string;
@@ -206,14 +204,13 @@ export declare const exchangesDownloadExternalResolver: import("@feathersjs/sche
206
204
  twofa?: string | undefined;
207
205
  privateKey?: string | undefined;
208
206
  walletAddress?: string | undefined;
209
- token?: string | undefined;
210
207
  __v?: any;
211
208
  _id: string | {};
212
209
  } | undefined;
213
210
  webhook?: {
214
211
  url: string;
215
- format: any;
216
212
  enabled: boolean;
213
+ format: any;
217
214
  webhookstatus: {
218
215
  event: string;
219
216
  status: string;
@@ -276,7 +273,6 @@ export declare const exchangesDownloadDataSchema: import("@feathersjs/typebox").
276
273
  }>>>;
277
274
  ccxt_async_config: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TAny>;
278
275
  which: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
279
- key: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
280
276
  apiKey: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
281
277
  secret: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
282
278
  requiredCredentials: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TAny>;
@@ -319,13 +315,13 @@ export declare const exchangesDownloadDataResolver: import("@feathersjs/schema")
319
315
  name?: any;
320
316
  apiKey?: string | undefined;
321
317
  secret?: string | undefined;
322
- key?: string | undefined;
323
318
  avatar?: any;
324
319
  createdAt?: any;
325
320
  updatedAt?: any;
326
321
  userId?: string | {} | undefined;
327
322
  which?: string | undefined;
328
323
  connected?: boolean | undefined;
324
+ token?: string | undefined;
329
325
  downloaded?: {
330
326
  updatedAt: any;
331
327
  size: string;
@@ -362,14 +358,13 @@ export declare const exchangesDownloadDataResolver: import("@feathersjs/schema")
362
358
  twofa?: string | undefined;
363
359
  privateKey?: string | undefined;
364
360
  walletAddress?: string | undefined;
365
- token?: string | undefined;
366
361
  __v?: any;
367
362
  _id: string | {};
368
363
  } | undefined;
369
364
  webhook?: {
370
365
  url: string;
371
- format: any;
372
366
  enabled: boolean;
367
+ format: any;
373
368
  webhookstatus: {
374
369
  event: string;
375
370
  status: string;
@@ -432,7 +427,6 @@ export declare const exchangesDownloadPatchSchema: import("@feathersjs/typebox")
432
427
  }>>>;
433
428
  ccxt_async_config: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TAny>;
434
429
  which: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
435
- key: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
436
430
  apiKey: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
437
431
  secret: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
438
432
  requiredCredentials: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TAny>;
@@ -475,13 +469,13 @@ export declare const exchangesDownloadPatchResolver: import("@feathersjs/schema"
475
469
  name?: any;
476
470
  apiKey?: string | undefined;
477
471
  secret?: string | undefined;
478
- key?: string | undefined;
479
472
  avatar?: any;
480
473
  createdAt?: any;
481
474
  updatedAt?: any;
482
475
  userId?: string | {} | undefined;
483
476
  which?: string | undefined;
484
477
  connected?: boolean | undefined;
478
+ token?: string | undefined;
485
479
  downloaded?: {
486
480
  updatedAt: any;
487
481
  size: string;
@@ -518,14 +512,13 @@ export declare const exchangesDownloadPatchResolver: import("@feathersjs/schema"
518
512
  twofa?: string | undefined;
519
513
  privateKey?: string | undefined;
520
514
  walletAddress?: string | undefined;
521
- token?: string | undefined;
522
515
  __v?: any;
523
516
  _id: string | {};
524
517
  } | undefined;
525
518
  webhook?: {
526
519
  url: string;
527
- format: any;
528
520
  enabled: boolean;
521
+ format: any;
529
522
  webhookstatus: {
530
523
  event: string;
531
524
  status: string;
@@ -588,7 +581,6 @@ export declare const exchangesDownloadQueryProperties: import("@feathersjs/typeb
588
581
  }>>>;
589
582
  ccxt_async_config: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TAny>;
590
583
  which: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
591
- key: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
592
584
  apiKey: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
593
585
  secret: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
594
586
  requiredCredentials: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TAny>;