@wenex/sdk 0.4.7 → 0.4.9

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 (121) hide show
  1. package/common/enums/common/scope.enum.d.ts +40 -1
  2. package/common/enums/common/scope.enum.js +39 -0
  3. package/common/enums/common/scope.enum.js.map +1 -1
  4. package/common/enums/financial/accounts/broker.enum.d.ts +3 -0
  5. package/common/enums/financial/accounts/broker.enum.js +8 -0
  6. package/common/enums/financial/accounts/broker.enum.js.map +1 -0
  7. package/common/enums/financial/accounts/index.d.ts +3 -0
  8. package/common/enums/financial/accounts/index.js +20 -0
  9. package/common/enums/financial/accounts/index.js.map +1 -0
  10. package/common/enums/financial/accounts/ownership.enum.d.ts +4 -0
  11. package/common/enums/financial/accounts/ownership.enum.js +9 -0
  12. package/common/enums/financial/accounts/ownership.enum.js.map +1 -0
  13. package/common/enums/financial/accounts/type.enum.d.ts +5 -0
  14. package/common/enums/financial/accounts/type.enum.js +10 -0
  15. package/common/enums/financial/accounts/type.enum.js.map +1 -0
  16. package/common/enums/financial/coins/index.d.ts +2 -0
  17. package/common/enums/financial/coins/index.js +19 -0
  18. package/common/enums/financial/coins/index.js.map +1 -0
  19. package/common/enums/financial/coins/provider.enum.d.ts +3 -0
  20. package/common/enums/financial/coins/provider.enum.js +8 -0
  21. package/common/enums/financial/coins/provider.enum.js.map +1 -0
  22. package/common/enums/financial/coins/type.enum.d.ts +4 -0
  23. package/common/enums/financial/coins/type.enum.js +9 -0
  24. package/common/enums/financial/coins/type.enum.js.map +1 -0
  25. package/common/enums/financial/common/index.d.ts +1 -0
  26. package/common/enums/financial/common/index.js +18 -0
  27. package/common/enums/financial/common/index.js.map +1 -0
  28. package/common/enums/financial/common/pay-type.enum.d.ts +6 -0
  29. package/common/enums/financial/common/pay-type.enum.js +11 -0
  30. package/common/enums/financial/common/pay-type.enum.js.map +1 -0
  31. package/common/enums/financial/index.d.ts +8 -0
  32. package/common/enums/financial/index.js +25 -0
  33. package/common/enums/financial/index.js.map +1 -0
  34. package/common/enums/financial/invoices/index.d.ts +1 -0
  35. package/common/enums/financial/invoices/index.js +18 -0
  36. package/common/enums/financial/invoices/index.js.map +1 -0
  37. package/common/enums/financial/invoices/type.enum.d.ts +6 -0
  38. package/common/enums/financial/invoices/type.enum.js +11 -0
  39. package/common/enums/financial/invoices/type.enum.js.map +1 -0
  40. package/common/enums/financial/orders/index.d.ts +2 -0
  41. package/common/enums/financial/orders/index.js +19 -0
  42. package/common/enums/financial/orders/index.js.map +1 -0
  43. package/common/enums/financial/orders/side.enum.d.ts +4 -0
  44. package/common/enums/financial/orders/side.enum.js +9 -0
  45. package/common/enums/financial/orders/side.enum.js.map +1 -0
  46. package/common/enums/financial/orders/type.enum.d.ts +6 -0
  47. package/common/enums/financial/orders/type.enum.js +11 -0
  48. package/common/enums/financial/orders/type.enum.js.map +1 -0
  49. package/common/enums/financial/positions/index.d.ts +1 -0
  50. package/common/enums/financial/positions/index.js +18 -0
  51. package/common/enums/financial/positions/index.js.map +1 -0
  52. package/common/enums/financial/positions/side.enum.d.ts +4 -0
  53. package/common/enums/financial/positions/side.enum.js +9 -0
  54. package/common/enums/financial/positions/side.enum.js.map +1 -0
  55. package/common/enums/financial/transactions/index.d.ts +3 -0
  56. package/common/enums/financial/transactions/index.js +20 -0
  57. package/common/enums/financial/transactions/index.js.map +1 -0
  58. package/common/enums/financial/transactions/reason.enum.d.ts +11 -0
  59. package/common/enums/financial/transactions/reason.enum.js +16 -0
  60. package/common/enums/financial/transactions/reason.enum.js.map +1 -0
  61. package/common/enums/financial/transactions/state.enum.d.ts +7 -0
  62. package/common/enums/financial/transactions/state.enum.js +12 -0
  63. package/common/enums/financial/transactions/state.enum.js.map +1 -0
  64. package/common/enums/financial/transactions/type.enum.d.ts +6 -0
  65. package/common/enums/financial/transactions/type.enum.js +11 -0
  66. package/common/enums/financial/transactions/type.enum.js.map +1 -0
  67. package/common/enums/financial/wallets/index.d.ts +1 -0
  68. package/common/enums/financial/wallets/index.js +18 -0
  69. package/common/enums/financial/wallets/index.js.map +1 -0
  70. package/common/enums/financial/wallets/provider.enum.d.ts +3 -0
  71. package/common/enums/financial/wallets/provider.enum.js +8 -0
  72. package/common/enums/financial/wallets/provider.enum.js.map +1 -0
  73. package/common/enums/index.d.ts +1 -0
  74. package/common/enums/index.js +1 -0
  75. package/common/enums/index.js.map +1 -1
  76. package/common/interfaces/financial/account.interface.d.ts +34 -0
  77. package/common/interfaces/financial/account.interface.js +3 -0
  78. package/common/interfaces/financial/account.interface.js.map +1 -0
  79. package/common/interfaces/financial/coin.interface.d.ts +42 -0
  80. package/common/interfaces/financial/coin.interface.js +3 -0
  81. package/common/interfaces/financial/coin.interface.js.map +1 -0
  82. package/common/interfaces/financial/common/index.d.ts +1 -0
  83. package/common/interfaces/financial/common/index.js +18 -0
  84. package/common/interfaces/financial/common/index.js.map +1 -0
  85. package/common/interfaces/financial/common/pay.interface.d.ts +9 -0
  86. package/common/interfaces/financial/common/pay.interface.js +3 -0
  87. package/common/interfaces/financial/common/pay.interface.js.map +1 -0
  88. package/common/interfaces/financial/index.d.ts +4 -0
  89. package/common/interfaces/financial/index.js +21 -0
  90. package/common/interfaces/financial/index.js.map +1 -0
  91. package/common/interfaces/financial/transaction.interface.d.ts +44 -0
  92. package/common/interfaces/financial/transaction.interface.js +3 -0
  93. package/common/interfaces/financial/transaction.interface.js.map +1 -0
  94. package/common/interfaces/financial/wallet.interface.d.ts +38 -0
  95. package/common/interfaces/financial/wallet.interface.js +3 -0
  96. package/common/interfaces/financial/wallet.interface.js.map +1 -0
  97. package/common/interfaces/index.d.ts +1 -0
  98. package/common/interfaces/index.js +1 -0
  99. package/common/interfaces/index.js.map +1 -1
  100. package/index.d.ts +3 -1
  101. package/index.js +4 -0
  102. package/index.js.map +1 -1
  103. package/package.json +5 -5
  104. package/services/financial/accounts.service.d.ts +7 -0
  105. package/services/financial/accounts.service.js +12 -0
  106. package/services/financial/accounts.service.js.map +1 -0
  107. package/services/financial/coins.service.d.ts +7 -0
  108. package/services/financial/coins.service.js +12 -0
  109. package/services/financial/coins.service.js.map +1 -0
  110. package/services/financial/index.d.ts +21 -0
  111. package/services/financial/index.js +49 -0
  112. package/services/financial/index.js.map +1 -0
  113. package/services/financial/transactions.service.d.ts +7 -0
  114. package/services/financial/transactions.service.js +12 -0
  115. package/services/financial/transactions.service.js.map +1 -0
  116. package/services/financial/wallets.service.d.ts +7 -0
  117. package/services/financial/wallets.service.js +12 -0
  118. package/services/financial/wallets.service.js.map +1 -0
  119. package/services/index.d.ts +1 -0
  120. package/services/index.js +1 -0
  121. package/services/index.js.map +1 -1
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionReason = void 0;
4
+ var TransactionReason;
5
+ (function (TransactionReason) {
6
+ TransactionReason["Transfer"] = "transfer";
7
+ TransactionReason["Reward"] = "reward";
8
+ TransactionReason["Cashback"] = "cashback";
9
+ TransactionReason["Earning"] = "earning";
10
+ TransactionReason["Expense"] = "expense";
11
+ TransactionReason["InvoicePayNormal"] = "invoice:pay-normal";
12
+ TransactionReason["InvoicePayRepeatable"] = "invoice:pay-repeatable";
13
+ TransactionReason["InvoicePayReplication"] = "invoice:pay-replication";
14
+ TransactionReason["InvoicePaySubscription"] = "invoice:pay-subscription";
15
+ })(TransactionReason || (exports.TransactionReason = TransactionReason = {}));
16
+ //# sourceMappingURL=reason.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reason.enum.js","sourceRoot":"","sources":["../../../../src/common/enums/financial/transactions/reason.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAaX;AAbD,WAAY,iBAAiB;IAC3B,0CAAqB,CAAA;IAErB,sCAAiB,CAAA;IACjB,0CAAqB,CAAA;IAErB,wCAAmB,CAAA;IACnB,wCAAmB,CAAA;IAEnB,4DAAuC,CAAA;IACvC,oEAA+C,CAAA;IAC/C,sEAAiD,CAAA;IACjD,wEAAmD,CAAA;AACrD,CAAC,EAbW,iBAAiB,iCAAjB,iBAAiB,QAa5B"}
@@ -0,0 +1,7 @@
1
+ export declare enum TransactionState {
2
+ Failed = "failed",
3
+ Pending = "pending",
4
+ Verified = "verified",
5
+ Rollback = "rollback",
6
+ Cancelled = "cancelled"
7
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionState = void 0;
4
+ var TransactionState;
5
+ (function (TransactionState) {
6
+ TransactionState["Failed"] = "failed";
7
+ TransactionState["Pending"] = "pending";
8
+ TransactionState["Verified"] = "verified";
9
+ TransactionState["Rollback"] = "rollback";
10
+ TransactionState["Cancelled"] = "cancelled";
11
+ })(TransactionState || (exports.TransactionState = TransactionState = {}));
12
+ //# sourceMappingURL=state.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.enum.js","sourceRoot":"","sources":["../../../../src/common/enums/financial/transactions/state.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAMX;AAND,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,uCAAmB,CAAA;IACnB,yCAAqB,CAAA;IACrB,yCAAqB,CAAA;IACrB,2CAAuB,CAAA;AACzB,CAAC,EANW,gBAAgB,gCAAhB,gBAAgB,QAM3B"}
@@ -0,0 +1,6 @@
1
+ export declare enum TransactionType {
2
+ Service = "service",
3
+ Deposit = "deposit",
4
+ Withdraw = "withdraw",
5
+ Transfer = "transfer"
6
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionType = void 0;
4
+ var TransactionType;
5
+ (function (TransactionType) {
6
+ TransactionType["Service"] = "service";
7
+ TransactionType["Deposit"] = "deposit";
8
+ TransactionType["Withdraw"] = "withdraw";
9
+ TransactionType["Transfer"] = "transfer";
10
+ })(TransactionType || (exports.TransactionType = TransactionType = {}));
11
+ //# sourceMappingURL=type.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.enum.js","sourceRoot":"","sources":["../../../../src/common/enums/financial/transactions/type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,eAMX;AAND,WAAY,eAAe;IACzB,sCAAmB,CAAA;IAEnB,sCAAmB,CAAA;IACnB,wCAAqB,CAAA;IACrB,wCAAqB,CAAA;AACvB,CAAC,EANW,eAAe,+BAAf,eAAe,QAM1B"}
@@ -0,0 +1 @@
1
+ export * from './provider.enum';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./provider.enum"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/enums/financial/wallets/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC"}
@@ -0,0 +1,3 @@
1
+ export declare enum WalletProvider {
2
+ Wenex = "wenex"
3
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WalletProvider = void 0;
4
+ var WalletProvider;
5
+ (function (WalletProvider) {
6
+ WalletProvider["Wenex"] = "wenex";
7
+ })(WalletProvider || (exports.WalletProvider = WalletProvider = {}));
8
+ //# sourceMappingURL=provider.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.enum.js","sourceRoot":"","sources":["../../../../src/common/enums/financial/wallets/provider.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,cAEX;AAFD,WAAY,cAAc;IACxB,iCAAe,CAAA;AACjB,CAAC,EAFW,cAAc,8BAAd,cAAc,QAEzB"}
@@ -4,3 +4,4 @@ export * from './common';
4
4
  export * from './domain';
5
5
  export * from './special';
6
6
  export * from './identity';
7
+ export * from './financial';
@@ -20,4 +20,5 @@ __exportStar(require("./common"), exports);
20
20
  __exportStar(require("./domain"), exports);
21
21
  __exportStar(require("./special"), exports);
22
22
  __exportStar(require("./identity"), exports);
23
+ __exportStar(require("./financial"), exports);
23
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,4CAA0B;AAC1B,6CAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,4CAA0B;AAC1B,6CAA2B;AAC3B,8CAA4B"}
@@ -0,0 +1,34 @@
1
+ /// <reference types="mongoose/types/aggregate" />
2
+ /// <reference types="mongoose/types/callback" />
3
+ /// <reference types="mongoose/types/collection" />
4
+ /// <reference types="mongoose/types/connection" />
5
+ /// <reference types="mongoose/types/cursor" />
6
+ /// <reference types="mongoose/types/document" />
7
+ /// <reference types="mongoose/types/error" />
8
+ /// <reference types="mongoose/types/expressions" />
9
+ /// <reference types="mongoose/types/helpers" />
10
+ /// <reference types="mongoose/types/middlewares" />
11
+ /// <reference types="mongoose/types/indexes" />
12
+ /// <reference types="mongoose/types/models" />
13
+ /// <reference types="mongoose/types/mongooseoptions" />
14
+ /// <reference types="mongoose/types/pipelinestage" />
15
+ /// <reference types="mongoose/types/populate" />
16
+ /// <reference types="mongoose/types/query" />
17
+ /// <reference types="mongoose/types/schemaoptions" />
18
+ /// <reference types="mongoose/types/schematypes" />
19
+ /// <reference types="mongoose/types/session" />
20
+ /// <reference types="mongoose/types/types" />
21
+ /// <reference types="mongoose/types/utility" />
22
+ /// <reference types="mongoose/types/validation" />
23
+ /// <reference types="mongoose/types/virtuals" />
24
+ /// <reference types="mongoose/types/inferschematype" />
25
+ import type { Document } from 'mongoose';
26
+ import { Core, Dto, MakeOptional } from '../common';
27
+ import { AccountBroker, AccountOwnership, AccountType } from '../../enums';
28
+ export interface Account extends Core {
29
+ type: AccountType;
30
+ broker: AccountBroker;
31
+ ownership: AccountOwnership;
32
+ }
33
+ export type AccountDoc = Account & Document;
34
+ export type AccountDto = Dto<MakeOptional<Account, 'broker'>>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=account.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account.interface.js","sourceRoot":"","sources":["../../../src/common/interfaces/financial/account.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,42 @@
1
+ /// <reference types="mongoose/types/aggregate" />
2
+ /// <reference types="mongoose/types/callback" />
3
+ /// <reference types="mongoose/types/collection" />
4
+ /// <reference types="mongoose/types/connection" />
5
+ /// <reference types="mongoose/types/cursor" />
6
+ /// <reference types="mongoose/types/document" />
7
+ /// <reference types="mongoose/types/error" />
8
+ /// <reference types="mongoose/types/expressions" />
9
+ /// <reference types="mongoose/types/helpers" />
10
+ /// <reference types="mongoose/types/middlewares" />
11
+ /// <reference types="mongoose/types/indexes" />
12
+ /// <reference types="mongoose/types/models" />
13
+ /// <reference types="mongoose/types/mongooseoptions" />
14
+ /// <reference types="mongoose/types/pipelinestage" />
15
+ /// <reference types="mongoose/types/populate" />
16
+ /// <reference types="mongoose/types/query" />
17
+ /// <reference types="mongoose/types/schemaoptions" />
18
+ /// <reference types="mongoose/types/schematypes" />
19
+ /// <reference types="mongoose/types/session" />
20
+ /// <reference types="mongoose/types/types" />
21
+ /// <reference types="mongoose/types/utility" />
22
+ /// <reference types="mongoose/types/validation" />
23
+ /// <reference types="mongoose/types/virtuals" />
24
+ /// <reference types="mongoose/types/inferschematype" />
25
+ import type { Document } from 'mongoose';
26
+ import { Core, Dto, MakeOptional } from '../common';
27
+ import { CoinProvider, CoinType } from '../../enums';
28
+ export interface Coin extends Core {
29
+ type: CoinType;
30
+ iso: string;
31
+ code?: string;
32
+ name?: string;
33
+ alias?: string;
34
+ symbol?: string;
35
+ network?: string;
36
+ contract?: string;
37
+ precision: number;
38
+ countries?: string[];
39
+ provider: CoinProvider;
40
+ }
41
+ export type CoinDoc = Coin & Document;
42
+ export type CoinDto = Dto<MakeOptional<Coin, 'provider'>>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=coin.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coin.interface.js","sourceRoot":"","sources":["../../../src/common/interfaces/financial/coin.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export * from './pay.interface';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./pay.interface"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/interfaces/financial/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC"}
@@ -0,0 +1,9 @@
1
+ import { PayType } from '../../../enums';
2
+ import { Core, Dto } from '../../common';
3
+ export interface Pay extends Core {
4
+ wallet: string;
5
+ type: PayType;
6
+ amount?: number;
7
+ percent?: number;
8
+ }
9
+ export type PayDto = Dto<Pay>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=pay.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pay.interface.js","sourceRoot":"","sources":["../../../../src/common/interfaces/financial/common/pay.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export * from './coin.interface';
2
+ export * from './wallet.interface';
3
+ export * from './account.interface';
4
+ export * from './transaction.interface';
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./coin.interface"), exports);
18
+ __exportStar(require("./wallet.interface"), exports);
19
+ __exportStar(require("./account.interface"), exports);
20
+ __exportStar(require("./transaction.interface"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/interfaces/financial/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,qDAAmC;AACnC,sDAAoC;AACpC,0DAAwC"}
@@ -0,0 +1,44 @@
1
+ /// <reference types="mongoose/types/aggregate" />
2
+ /// <reference types="mongoose/types/callback" />
3
+ /// <reference types="mongoose/types/collection" />
4
+ /// <reference types="mongoose/types/connection" />
5
+ /// <reference types="mongoose/types/cursor" />
6
+ /// <reference types="mongoose/types/document" />
7
+ /// <reference types="mongoose/types/error" />
8
+ /// <reference types="mongoose/types/expressions" />
9
+ /// <reference types="mongoose/types/helpers" />
10
+ /// <reference types="mongoose/types/middlewares" />
11
+ /// <reference types="mongoose/types/indexes" />
12
+ /// <reference types="mongoose/types/models" />
13
+ /// <reference types="mongoose/types/mongooseoptions" />
14
+ /// <reference types="mongoose/types/pipelinestage" />
15
+ /// <reference types="mongoose/types/populate" />
16
+ /// <reference types="mongoose/types/query" />
17
+ /// <reference types="mongoose/types/schemaoptions" />
18
+ /// <reference types="mongoose/types/schematypes" />
19
+ /// <reference types="mongoose/types/session" />
20
+ /// <reference types="mongoose/types/types" />
21
+ /// <reference types="mongoose/types/utility" />
22
+ /// <reference types="mongoose/types/validation" />
23
+ /// <reference types="mongoose/types/virtuals" />
24
+ /// <reference types="mongoose/types/inferschematype" />
25
+ import type { Document } from 'mongoose';
26
+ import { Core, Dto } from '../common';
27
+ import { Pay, PayDto } from './common';
28
+ import { TransactionReason, TransactionState, TransactionType } from '../../enums';
29
+ export interface Transaction extends Core {
30
+ type: TransactionType;
31
+ state: TransactionState;
32
+ reason: TransactionReason;
33
+ amount: number;
34
+ payees?: Pay[];
35
+ payers?: Pay[];
36
+ verified_at?: Date;
37
+ canceled_at?: Date;
38
+ invoice?: string;
39
+ }
40
+ export type TransactionDoc = Transaction & Document;
41
+ export type TransactionDto = Dto<Omit<Transaction, 'payers' | 'payees'>> & {
42
+ payees?: PayDto[];
43
+ payers?: PayDto[];
44
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=transaction.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transaction.interface.js","sourceRoot":"","sources":["../../../src/common/interfaces/financial/transaction.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,38 @@
1
+ /// <reference types="mongoose/types/aggregate" />
2
+ /// <reference types="mongoose/types/callback" />
3
+ /// <reference types="mongoose/types/collection" />
4
+ /// <reference types="mongoose/types/connection" />
5
+ /// <reference types="mongoose/types/cursor" />
6
+ /// <reference types="mongoose/types/document" />
7
+ /// <reference types="mongoose/types/error" />
8
+ /// <reference types="mongoose/types/expressions" />
9
+ /// <reference types="mongoose/types/helpers" />
10
+ /// <reference types="mongoose/types/middlewares" />
11
+ /// <reference types="mongoose/types/indexes" />
12
+ /// <reference types="mongoose/types/models" />
13
+ /// <reference types="mongoose/types/mongooseoptions" />
14
+ /// <reference types="mongoose/types/pipelinestage" />
15
+ /// <reference types="mongoose/types/populate" />
16
+ /// <reference types="mongoose/types/query" />
17
+ /// <reference types="mongoose/types/schemaoptions" />
18
+ /// <reference types="mongoose/types/schematypes" />
19
+ /// <reference types="mongoose/types/session" />
20
+ /// <reference types="mongoose/types/types" />
21
+ /// <reference types="mongoose/types/utility" />
22
+ /// <reference types="mongoose/types/validation" />
23
+ /// <reference types="mongoose/types/virtuals" />
24
+ /// <reference types="mongoose/types/inferschematype" />
25
+ import type { Document } from 'mongoose';
26
+ import { WalletProvider } from '../../enums';
27
+ import { Core, Dto, MakeOptional } from '../common';
28
+ export interface Wallet extends Core {
29
+ coin: string;
30
+ accounts: string[];
31
+ amount: number;
32
+ blocked?: number;
33
+ internal?: number;
34
+ external?: number;
35
+ provider: WalletProvider;
36
+ }
37
+ export type WalletDoc = Wallet & Document;
38
+ export type WalletDto = Dto<MakeOptional<Wallet, 'provider'>>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=wallet.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet.interface.js","sourceRoot":"","sources":["../../../src/common/interfaces/financial/wallet.interface.ts"],"names":[],"mappings":""}
@@ -5,3 +5,4 @@ export * from './config';
5
5
  export * from './domain';
6
6
  export * from './special';
7
7
  export * from './identity';
8
+ export * from './financial';
@@ -21,4 +21,5 @@ __exportStar(require("./config"), exports);
21
21
  __exportStar(require("./domain"), exports);
22
22
  __exportStar(require("./special"), exports);
23
23
  __exportStar(require("./identity"), exports);
24
+ __exportStar(require("./financial"), exports);
24
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AAEzB,yCAAuB;AACvB,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,4CAA0B;AAC1B,6CAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AAEzB,yCAAuB;AACvB,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,4CAA0B;AAC1B,6CAA2B;AAC3B,8CAA4B"}
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { AxiosInstance } from 'axios';
2
- import { AuthClient, ConfigClient, DomainClient, IdentityClient, SpecialClient, TouchClient } from './services';
2
+ import { AuthClient, ConfigClient, DomainClient, IdentityClient, SpecialClient, TouchClient, FinancialClient } from './services';
3
3
  import { GraphqlService } from './common/classes';
4
4
  export * from './services';
5
5
  export declare class PlatformClient {
@@ -11,6 +11,7 @@ export declare class PlatformClient {
11
11
  private $domain;
12
12
  private $special;
13
13
  private $identity;
14
+ private $financial;
14
15
  constructor(axios: AxiosInstance);
15
16
  get graphql(): GraphqlService;
16
17
  get auth(): AuthClient;
@@ -19,4 +20,5 @@ export declare class PlatformClient {
19
20
  get config(): ConfigClient;
20
21
  get special(): SpecialClient;
21
22
  get identity(): IdentityClient;
23
+ get financial(): FinancialClient;
22
24
  }
package/index.js CHANGED
@@ -50,6 +50,10 @@ class PlatformClient {
50
50
  var _a;
51
51
  return (this.$identity = (_a = this.$identity) !== null && _a !== void 0 ? _a : new services_1.IdentityClient(this.axios));
52
52
  }
53
+ get financial() {
54
+ var _a;
55
+ return (this.$financial = (_a = this.$financial) !== null && _a !== void 0 ? _a : new services_1.FinancialClient(this.axios));
56
+ }
53
57
  }
54
58
  exports.PlatformClient = PlatformClient;
55
59
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,yCAOoB;AACpB,8CAAkD;AAElD,6CAA2B;AAE3B,MAAa,cAAc;IAUzB,YAAqB,KAAoB;QAApB,UAAK,GAAL,KAAK,CAAe;IAAG,CAAC;IAE7C,IAAI,OAAO;;QACT,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG,MAAA,IAAI,CAAC,QAAQ,mCAAI,IAAI,wBAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC3E,CAAC;IAED,IAAI,IAAI;;QACN,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,MAAA,IAAI,CAAC,KAAK,mCAAI,IAAI,qBAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACjE,CAAC;IAED,IAAI,KAAK;;QACP,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,MAAA,IAAI,CAAC,MAAM,mCAAI,IAAI,sBAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACpE,CAAC;IAED,IAAI,MAAM;;QACR,OAAO,CAAC,IAAI,CAAC,OAAO,GAAG,MAAA,IAAI,CAAC,OAAO,mCAAI,IAAI,uBAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACvE,CAAC;IAED,IAAI,MAAM;;QACR,OAAO,CAAC,IAAI,CAAC,OAAO,GAAG,MAAA,IAAI,CAAC,OAAO,mCAAI,IAAI,uBAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACvE,CAAC;IAED,IAAI,OAAO;;QACT,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG,MAAA,IAAI,CAAC,QAAQ,mCAAI,IAAI,wBAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1E,CAAC;IAED,IAAI,QAAQ;;QACV,OAAO,CAAC,IAAI,CAAC,SAAS,GAAG,MAAA,IAAI,CAAC,SAAS,mCAAI,IAAI,yBAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7E,CAAC;CACF;AAvCD,wCAuCC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,yCAQoB;AACpB,8CAAkD;AAElD,6CAA2B;AAE3B,MAAa,cAAc;IAWzB,YAAqB,KAAoB;QAApB,UAAK,GAAL,KAAK,CAAe;IAAG,CAAC;IAE7C,IAAI,OAAO;;QACT,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG,MAAA,IAAI,CAAC,QAAQ,mCAAI,IAAI,wBAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC3E,CAAC;IAED,IAAI,IAAI;;QACN,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,MAAA,IAAI,CAAC,KAAK,mCAAI,IAAI,qBAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACjE,CAAC;IAED,IAAI,KAAK;;QACP,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,MAAA,IAAI,CAAC,MAAM,mCAAI,IAAI,sBAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACpE,CAAC;IAED,IAAI,MAAM;;QACR,OAAO,CAAC,IAAI,CAAC,OAAO,GAAG,MAAA,IAAI,CAAC,OAAO,mCAAI,IAAI,uBAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACvE,CAAC;IAED,IAAI,MAAM;;QACR,OAAO,CAAC,IAAI,CAAC,OAAO,GAAG,MAAA,IAAI,CAAC,OAAO,mCAAI,IAAI,uBAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACvE,CAAC;IAED,IAAI,OAAO;;QACT,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG,MAAA,IAAI,CAAC,QAAQ,mCAAI,IAAI,wBAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1E,CAAC;IAED,IAAI,QAAQ;;QACV,OAAO,CAAC,IAAI,CAAC,SAAS,GAAG,MAAA,IAAI,CAAC,SAAS,mCAAI,IAAI,yBAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7E,CAAC;IAED,IAAI,SAAS;;QACX,OAAO,CAAC,IAAI,CAAC,UAAU,GAAG,MAAA,IAAI,CAAC,UAAU,mCAAI,IAAI,0BAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAChF,CAAC;CACF;AA5CD,wCA4CC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wenex/sdk",
3
- "version": "0.4.7",
3
+ "version": "0.4.9",
4
4
  "description": "Wenex SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -41,11 +41,11 @@
41
41
  "devDependencies": {
42
42
  "@types/debug": "^4.1.12",
43
43
  "@types/jest": "^29.5.12",
44
- "@types/node": "^20.11.17",
44
+ "@types/node": "^20.11.19",
45
45
  "@types/qs": "^6.9.11",
46
- "@typescript-eslint/eslint-plugin": "^7.0.1",
47
- "@typescript-eslint/parser": "^7.0.1",
48
- "dotenv": "^16.4.3",
46
+ "@typescript-eslint/eslint-plugin": "^7.0.2",
47
+ "@typescript-eslint/parser": "^7.0.2",
48
+ "dotenv": "^16.4.5",
49
49
  "eslint": "^8.56.0",
50
50
  "eslint-config-prettier": "^9.1.0",
51
51
  "eslint-plugin-prettier": "^5.1.3",
@@ -0,0 +1,7 @@
1
+ import type { AxiosInstance } from 'axios';
2
+ import { RestfulService } from '../../common/classes';
3
+ import { Account, AccountDto } from '../../common/interfaces';
4
+ export declare class AccountsService extends RestfulService<Account, AccountDto> {
5
+ protected axios: AxiosInstance;
6
+ constructor(axios: AxiosInstance);
7
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AccountsService = void 0;
4
+ const classes_1 = require("../../common/classes");
5
+ class AccountsService extends classes_1.RestfulService {
6
+ constructor(axios) {
7
+ super('accounts', axios);
8
+ this.axios = axios;
9
+ }
10
+ }
11
+ exports.AccountsService = AccountsService;
12
+ //# sourceMappingURL=accounts.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accounts.service.js","sourceRoot":"","sources":["../../src/services/financial/accounts.service.ts"],"names":[],"mappings":";;;AAGA,kDAAsD;AAGtD,MAAa,eAAgB,SAAQ,wBAAmC;IACtE,YAAsB,KAAoB;QACxC,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;QADL,UAAK,GAAL,KAAK,CAAe;IAE1C,CAAC;CACF;AAJD,0CAIC"}
@@ -0,0 +1,7 @@
1
+ import type { AxiosInstance } from 'axios';
2
+ import { RestfulService } from '../../common/classes';
3
+ import { Coin, CoinDto } from '../../common/interfaces';
4
+ export declare class CoinsService extends RestfulService<Coin, CoinDto> {
5
+ protected axios: AxiosInstance;
6
+ constructor(axios: AxiosInstance);
7
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CoinsService = void 0;
4
+ const classes_1 = require("../../common/classes");
5
+ class CoinsService extends classes_1.RestfulService {
6
+ constructor(axios) {
7
+ super('coins', axios);
8
+ this.axios = axios;
9
+ }
10
+ }
11
+ exports.CoinsService = CoinsService;
12
+ //# sourceMappingURL=coins.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coins.service.js","sourceRoot":"","sources":["../../src/services/financial/coins.service.ts"],"names":[],"mappings":";;;AAGA,kDAAsD;AAGtD,MAAa,YAAa,SAAQ,wBAA6B;IAC7D,YAAsB,KAAoB;QACxC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QADF,UAAK,GAAL,KAAK,CAAe;IAE1C,CAAC;CACF;AAJD,oCAIC"}
@@ -0,0 +1,21 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import { CoinsService } from './coins.service';
3
+ import { WalletsService } from './wallets.service';
4
+ import { AccountsService } from './accounts.service';
5
+ import { TransactionsService } from './transactions.service';
6
+ export * from './coins.service';
7
+ export * from './wallets.service';
8
+ export * from './accounts.service';
9
+ export * from './transactions.service';
10
+ export declare class FinancialClient {
11
+ readonly axios: AxiosInstance;
12
+ private $coins;
13
+ private $wallets;
14
+ private $accounts;
15
+ private $transactions;
16
+ constructor(axios: AxiosInstance);
17
+ get coins(): CoinsService;
18
+ get wallets(): WalletsService;
19
+ get accounts(): AccountsService;
20
+ get transactions(): TransactionsService;
21
+ }