wapi-client 0.9.2 → 0.9.4
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/dist/api/ws-client.cjs +1 -1
- package/dist/api/ws-client.js +1 -1
- package/dist/client.cjs +1 -1
- package/dist/client.d.ts +4 -4
- package/dist/client.js +1 -1
- package/dist/fns/aggregate-transfers/aggregate-transfers.d.ts +1 -1
- package/dist/fns/find-tokens/find-tokens.enums.d.ts +2 -3
- package/dist/fns/find-tokens/find-tokens.schema.input.json +1 -16
- package/dist/fns/find-transfer-groups/find-transfer-groups.enums.d.ts +2 -8
- package/dist/fns/find-transfer-groups/find-transfer-groups.schema.input.json +3 -34
- package/dist/fns/find-wallets/find-wallets.enums.d.ts +1 -1
- package/dist/fns/reverse-transfers/reverse-transfers.d.ts +1 -1
- package/dist/fns/update-transfer-groups/update-transfer-groups.d.ts +1 -1
- package/dist/fns/update-transfers/update-transfers.d.ts +1 -1
- package/dist/lib/query-builder.d.ts +6 -8
- package/dist/txs/create-distribution/create-distribution.enums.d.ts +1 -1
- package/dist/txs/find-balance-many/find-balance-many.enums.d.ts +1 -1
- package/dist/txs/find-token-many/find-token-many.enums.d.ts +4 -3
- package/dist/txs/find-token-many/find-token-many.schema.input.json +6 -0
- package/dist/txs/find-token-many/find-token-many.schema.output.json +8 -1
- package/dist/txs/find-transfer-group-many/find-transfer-group-many.enums.d.ts +10 -4
- package/dist/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json +4 -3
- package/dist/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json +23 -1
- package/dist/txs/find-transfer-many/find-transfer-many.enums.d.ts +1 -1
- package/dist/txs/get-balance-history/get-balance-history.enums.d.ts +5 -1
- package/dist/txs/get-balance-history/get-balance-history.schema.output.json +7 -1
- package/dist/txs/get-token/get-token.enums.d.ts +43 -1
- package/dist/txs/get-token/get-token.schema.input.json +5 -1
- package/dist/txs/get-token/get-token.schema.output.json +63 -2
- package/dist/txs/get-token-many/get-token-many.enums.d.ts +6 -2
- package/dist/txs/get-token-many/get-token-many.schema.input.json +5 -0
- package/dist/txs/get-token-many/get-token-many.schema.output.json +3 -0
- package/dist/txs/update-transfer-group/update-transfer-group.enums.d.ts +1 -1
- package/dist/types/index.d.ts +91 -43
- package/dist/wapi-client-web.iife.js +1 -1
- package/dist/wapi-client.iife.js +1 -1
- package/package.json +2 -3
package/dist/api/ws-client.cjs
CHANGED
|
@@ -61,7 +61,7 @@ var import_base_client = require('./base-client.cjs');
|
|
|
61
61
|
var import_connection = require('./connection/connection.enums.cjs');
|
|
62
62
|
var import__ = require('../index.cjs');
|
|
63
63
|
var _a;
|
|
64
|
-
var CLIENT_VERSION = (_a = '0.9.
|
|
64
|
+
var CLIENT_VERSION = (_a = '0.9.4') != null ? _a : "";
|
|
65
65
|
function createWsClient(opts) {
|
|
66
66
|
const initialConnection = createConnection(opts);
|
|
67
67
|
return new WsClient(initialConnection, opts);
|
package/dist/api/ws-client.js
CHANGED
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
} from "./connection/connection.enums";
|
|
32
32
|
import { WapiClientType } from "../index";
|
|
33
33
|
var _a;
|
|
34
|
-
var CLIENT_VERSION = (_a = '0.9.
|
|
34
|
+
var CLIENT_VERSION = (_a = '0.9.4') != null ? _a : "";
|
|
35
35
|
function createWsClient(opts) {
|
|
36
36
|
const initialConnection = createConnection(opts);
|
|
37
37
|
return new WsClient(initialConnection, opts);
|
package/dist/client.cjs
CHANGED
|
@@ -66,7 +66,7 @@ var import_errors = require('./lib/errors.cjs');
|
|
|
66
66
|
var import_fns = require('./fns/index.cjs');
|
|
67
67
|
var import_import_data = require('./fns/import-data/import-data.guards.cjs');
|
|
68
68
|
var _a;
|
|
69
|
-
var CLIENT_VERSION = (_a = '0.9.
|
|
69
|
+
var CLIENT_VERSION = (_a = '0.9.4') != null ? _a : "";
|
|
70
70
|
var Client = class {
|
|
71
71
|
/**
|
|
72
72
|
* @internal
|
package/dist/client.d.ts
CHANGED
|
@@ -215,7 +215,7 @@ export declare class Client {
|
|
|
215
215
|
* @returns {StreamPromise<AggregateTransfersFnOutput>}
|
|
216
216
|
*
|
|
217
217
|
*/
|
|
218
|
-
aggregateTransfers(): AggregateQueryBuilder<AggregateTransfersFnFields, AggregateTransfersFnStringFields, AggregateTransfersFnMetadataFields, AggregateTransfersFnGroupFields, AggregateTransfersFnOutput>;
|
|
218
|
+
aggregateTransfers(): AggregateQueryBuilder<AggregateTransfersFnFields, AggregateTransfersFnStringFields, AggregateTransfersFnMetadataFields, AggregateTransfersFnGroupFields, AggregateTransfersFnOptions, AggregateTransfersFnOutput>;
|
|
219
219
|
aggregateTransfers(input: AggregateTransfersFnInput, options?: AggregateTransfersFnOptions): StreamPromise<AggregateTransfersFnOutput>;
|
|
220
220
|
/**
|
|
221
221
|
*
|
|
@@ -1515,7 +1515,7 @@ export declare class Client {
|
|
|
1515
1515
|
* @returns {StreamPromise<ReverseTransfersFnOutput>}
|
|
1516
1516
|
*
|
|
1517
1517
|
*/
|
|
1518
|
-
reverseTransfers(): ReverseQueryBuilder<ReverseTransfersFnFields, ReverseTransfersFnStringFields, ReverseTransfersFnMetadataFields, ReverseTransfersFnModifications, ReverseTransfersFnOutput>;
|
|
1518
|
+
reverseTransfers(): ReverseQueryBuilder<ReverseTransfersFnFields, ReverseTransfersFnStringFields, ReverseTransfersFnMetadataFields, ReverseTransfersFnModifications, ReverseTransfersFnOptions, ReverseTransfersFnOutput>;
|
|
1519
1519
|
reverseTransfers(input: ReverseTransfersFnInput, options?: ReverseTransfersFnOptions): StreamPromise<ReverseTransfersFnOutput>;
|
|
1520
1520
|
/**
|
|
1521
1521
|
*
|
|
@@ -1729,7 +1729,7 @@ export declare class Client {
|
|
|
1729
1729
|
* @returns {StreamPromise<UpdateTransferGroupsFnOutput>}
|
|
1730
1730
|
*
|
|
1731
1731
|
*/
|
|
1732
|
-
updateTransferGroups(): UpdateQueryBuilder<UpdateTransferGroupsFnFields, UpdateTransferGroupsFnStringFields, UpdateTransferGroupsFnMetadataFields, UpdateTransferGroupsFnResultFields, UpdateTransferGroupsFnUpdateFields, UpdateTransferGroupsFnOutput>;
|
|
1732
|
+
updateTransferGroups(): UpdateQueryBuilder<UpdateTransferGroupsFnFields, UpdateTransferGroupsFnStringFields, UpdateTransferGroupsFnMetadataFields, UpdateTransferGroupsFnResultFields, UpdateTransferGroupsFnUpdateFields, UpdateTransferGroupsFnOptions, UpdateTransferGroupsFnOutput>;
|
|
1733
1733
|
updateTransferGroups(input: UpdateTransferGroupsFnInput, options?: UpdateTransferGroupsFnOptions): StreamPromise<UpdateTransferGroupsFnOutput>;
|
|
1734
1734
|
/**
|
|
1735
1735
|
*
|
|
@@ -1758,7 +1758,7 @@ export declare class Client {
|
|
|
1758
1758
|
* @returns {StreamPromise<UpdateTransfersFnOutput>}
|
|
1759
1759
|
*
|
|
1760
1760
|
*/
|
|
1761
|
-
updateTransfers(): UpdateQueryBuilder<UpdateTransfersFnFields, UpdateTransfersFnStringFields, UpdateTransfersFnMetadataFields, UpdateTransfersFnResultFields, UpdateTransfersFnUpdateFields, UpdateTransfersFnOutput>;
|
|
1761
|
+
updateTransfers(): UpdateQueryBuilder<UpdateTransfersFnFields, UpdateTransfersFnStringFields, UpdateTransfersFnMetadataFields, UpdateTransfersFnResultFields, UpdateTransfersFnUpdateFields, UpdateTransfersFnOptions, UpdateTransfersFnOutput>;
|
|
1762
1762
|
updateTransfers(input: UpdateTransfersFnInput, options?: UpdateTransfersFnOptions): StreamPromise<UpdateTransfersFnOutput>;
|
|
1763
1763
|
/**
|
|
1764
1764
|
* Update Wallet
|
package/dist/client.js
CHANGED
|
@@ -15,5 +15,5 @@ export type AggregateTransfersFnGroupFields = AggregateTransferManyGroupByFields
|
|
|
15
15
|
* Aggregate Transfers using either a simple filter or queryBuilder
|
|
16
16
|
*
|
|
17
17
|
*/
|
|
18
|
-
export declare function aggregateTransfers(options: ClientFunctionOptions): AggregateQueryBuilder<AggregateTransfersFnFields, AggregateTransfersFnStringFields, AggregateTransfersFnMetadataFields, AggregateTransfersFnGroupFields, AggregateTransfersFnOutput>;
|
|
18
|
+
export declare function aggregateTransfers(options: ClientFunctionOptions): AggregateQueryBuilder<AggregateTransfersFnFields, AggregateTransfersFnStringFields, AggregateTransfersFnMetadataFields, AggregateTransfersFnGroupFields, AggregateTransfersFnOptions, AggregateTransfersFnOutput>;
|
|
19
19
|
export declare function aggregateTransfers(options: ClientFunctionOptions, input: AggregateTransfersFnInput, fnOptions?: AggregateTransfersFnOptions): StreamPromise<AggregateTransfersFnOutput>;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { DbFilterMetadata } from '../../db/consts.enums';
|
|
2
2
|
import { IFnFindOptionsExtra } from '../fn-consts.enums';
|
|
3
|
-
import {
|
|
4
|
-
import { FindTokenManyOrderingOptions, FindTokenManyTxOutput } from '../../txs/find-token-many/find-token-many.enums';
|
|
3
|
+
import { FindTokenManyTxOptions, FindTokenManyTxOutput } from '../../txs/find-token-many/find-token-many.enums';
|
|
5
4
|
export type FindTokensFnInputStringFields = 'foreign' | 'belongs_to';
|
|
6
5
|
/**
|
|
7
6
|
* findtokens function options
|
|
8
7
|
*/
|
|
9
|
-
export type FindTokensFnOptions = IFnFindOptionsExtra &
|
|
8
|
+
export type FindTokensFnOptions = IFnFindOptionsExtra & FindTokenManyTxOptions;
|
|
10
9
|
/**
|
|
11
10
|
* Input for findTokens
|
|
12
11
|
*
|
|
@@ -32,22 +32,7 @@
|
|
|
32
32
|
"$ref": "/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
|
-
"$ref": "/txs/
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"$ref": "/txs/find-token-many/find-token-many.schema.input.json#/definitions/find_token_many_ordering_options"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"$ref": "/txs/tx-consts.schema.json#/definitions/i_tx_general_options"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"$ref": "/txs/tx-consts.schema.json#/definitions/i_tx_select_options"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"$ref": "/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"$ref": "/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"
|
|
35
|
+
"$ref": "/txs/find-token-many/find-token-many.schema.input.json#/definitions/find_token_many_tx_options"
|
|
51
36
|
}
|
|
52
37
|
]
|
|
53
38
|
}
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
import { DbFilterMetadata, TransferGroupType } from '../../db/consts.enums';
|
|
2
2
|
import { IFnFindOptionsExtra } from '../fn-consts.enums';
|
|
3
|
-
import {
|
|
4
|
-
import { FindTransferGroupManyOrderingOptions, FindTransferGroupManyTxOutput } from '../../txs/find-transfer-group-many/find-transfer-group-many.enums';
|
|
5
|
-
/**
|
|
6
|
-
* simplified options for findTransferGroups
|
|
7
|
-
*/
|
|
8
|
-
export interface FindTransferGroupsFnExtraOptions {
|
|
9
|
-
}
|
|
3
|
+
import { FindTransferGroupManyTxOptions, FindTransferGroupManyTxOutput } from '../../txs/find-transfer-group-many/find-transfer-group-many.enums';
|
|
10
4
|
export type FindTransferGroupsFnInputStringFields = 'identifier' | 'reverses';
|
|
11
5
|
/**
|
|
12
6
|
* findTransferGroups function options
|
|
13
7
|
*/
|
|
14
|
-
export type FindTransferGroupsFnOptions = IFnFindOptionsExtra &
|
|
8
|
+
export type FindTransferGroupsFnOptions = IFnFindOptionsExtra & FindTransferGroupManyTxOptions;
|
|
15
9
|
/**
|
|
16
10
|
* Input for findTransferGroups
|
|
17
11
|
*
|
|
@@ -7,10 +7,7 @@
|
|
|
7
7
|
"properties": {
|
|
8
8
|
"identifier": {
|
|
9
9
|
"description": "Identifier of the transfer_group",
|
|
10
|
-
"type": [
|
|
11
|
-
"string",
|
|
12
|
-
"integer"
|
|
13
|
-
]
|
|
10
|
+
"type": ["string", "integer"]
|
|
14
11
|
},
|
|
15
12
|
"transfer_status": {
|
|
16
13
|
"description": "Status of the transfers",
|
|
@@ -26,10 +23,7 @@
|
|
|
26
23
|
},
|
|
27
24
|
"reverses": {
|
|
28
25
|
"description": "Identifier of the transfer_group the transfer_group reverses",
|
|
29
|
-
"type": [
|
|
30
|
-
"string",
|
|
31
|
-
"integer"
|
|
32
|
-
]
|
|
26
|
+
"type": ["string", "integer"]
|
|
33
27
|
},
|
|
34
28
|
"type": {
|
|
35
29
|
"description": "Type of the transfer group",
|
|
@@ -47,34 +41,9 @@
|
|
|
47
41
|
"$ref": "/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"
|
|
48
42
|
},
|
|
49
43
|
{
|
|
50
|
-
"$ref": "/txs/
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"$ref": "/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_ordering_options"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"$ref": "/txs/tx-consts.schema.json#/definitions/i_tx_general_options"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"$ref": "#/definitions/find_transfer_groups_fn_extra_options"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"$ref": "/txs/tx-consts.schema.json#/definitions/i_tx_select_options"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"$ref": "/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"$ref": "/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"
|
|
44
|
+
"$ref": "/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_tx_options"
|
|
69
45
|
}
|
|
70
46
|
]
|
|
71
|
-
},
|
|
72
|
-
"find_transfer_groups_fn_extra_options": {
|
|
73
|
-
"description": "simplified options for findTransferGroups",
|
|
74
|
-
"type": "object",
|
|
75
|
-
"properties": {
|
|
76
|
-
},
|
|
77
|
-
"$typescript": "{\"additionalProperties\":false}"
|
|
78
47
|
}
|
|
79
48
|
},
|
|
80
49
|
"$queryBuilder": true,
|
|
@@ -10,7 +10,7 @@ export interface FindWalletsFnExtraOptions {
|
|
|
10
10
|
/**
|
|
11
11
|
* Optional flags for input
|
|
12
12
|
*/
|
|
13
|
-
export type FindWalletsFnOptions = IFnFindOptionsExtra & FindWalletManyTxOptions & FindWalletsFnExtraOptions;
|
|
13
|
+
export type FindWalletsFnOptions = IFnFindOptionsExtra & Omit<FindWalletManyTxOptions, keyof FindWalletsFnExtraOptions> & FindWalletsFnExtraOptions;
|
|
14
14
|
/**
|
|
15
15
|
* Input for findWallets
|
|
16
16
|
*
|
|
@@ -13,5 +13,5 @@ export type ReverseTransfersFnMetadataFields = TransferTableObjectFields;
|
|
|
13
13
|
* @internal
|
|
14
14
|
*
|
|
15
15
|
*/
|
|
16
|
-
export declare function reverseTransfers(options: ClientFunctionOptions): ReverseQueryBuilder<ReverseTransfersFnFields, ReverseTransfersFnStringFields, ReverseTransfersFnMetadataFields, ReverseTransfersFnModifications, ReverseTransfersFnOutput>;
|
|
16
|
+
export declare function reverseTransfers(options: ClientFunctionOptions): ReverseQueryBuilder<ReverseTransfersFnFields, ReverseTransfersFnStringFields, ReverseTransfersFnMetadataFields, ReverseTransfersFnModifications, ReverseTransfersFnOptions, ReverseTransfersFnOutput>;
|
|
17
17
|
export declare function reverseTransfers(options: ClientFunctionOptions, input: ReverseTransfersFnInput, fnOptions: ReverseTransfersFnOptions): StreamPromise<ReverseTransfersFnOutput>;
|
|
@@ -14,5 +14,5 @@ export type UpdateTransferGroupsFnMetadataFields = TransferGroupTableObjectField
|
|
|
14
14
|
* @internal
|
|
15
15
|
*
|
|
16
16
|
*/
|
|
17
|
-
export declare function updateTransferGroups(options: ClientFunctionOptions): UpdateQueryBuilder<UpdateTransferGroupsFnFields, UpdateTransferGroupsFnStringFields, UpdateTransferGroupsFnMetadataFields, UpdateTransferGroupsFnResultFields, UpdateTransferGroupData, UpdateTransferGroupsFnOutput>;
|
|
17
|
+
export declare function updateTransferGroups(options: ClientFunctionOptions): UpdateQueryBuilder<UpdateTransferGroupsFnFields, UpdateTransferGroupsFnStringFields, UpdateTransferGroupsFnMetadataFields, UpdateTransferGroupsFnResultFields, UpdateTransferGroupData, UpdateTransferGroupsFnOptions, UpdateTransferGroupsFnOutput>;
|
|
18
18
|
export declare function updateTransferGroups(options: ClientFunctionOptions, input: UpdateTransferGroupsFnInput, fnOptions?: UpdateTransferGroupsFnOptions): StreamPromise<UpdateTransferGroupsFnOutput>;
|
|
@@ -13,5 +13,5 @@ export type UpdateTransfersFnMetadataFields = TransferTableObjectFields;
|
|
|
13
13
|
* @internal
|
|
14
14
|
*
|
|
15
15
|
*/
|
|
16
|
-
export declare function updateTransfers(options: ClientFunctionOptions): UpdateQueryBuilder<UpdateTransfersFnFields, UpdateTransfersFnStringFields, UpdateTransfersFnMetadataFields, UpdateTransfersFnResultFields, UpdateTransfersFnUpdateFields, UpdateTransfersFnOutput>;
|
|
16
|
+
export declare function updateTransfers(options: ClientFunctionOptions): UpdateQueryBuilder<UpdateTransfersFnFields, UpdateTransfersFnStringFields, UpdateTransfersFnMetadataFields, UpdateTransfersFnResultFields, UpdateTransfersFnUpdateFields, UpdateTransfersFnOptions, UpdateTransfersFnOutput>;
|
|
17
17
|
export declare function updateTransfers(options: ClientFunctionOptions, input: UpdateTransfersFnInput, fnOptions?: UpdateTransfersFnOptions): StreamPromise<UpdateTransfersFnOutput>;
|
|
@@ -110,7 +110,7 @@ export type QueryBuilderOrderingInputObject = {
|
|
|
110
110
|
nulls?: 'first' | 'last';
|
|
111
111
|
};
|
|
112
112
|
export type QueryBuilderOrderingInput = string | QueryBuilderOrderingInputObject;
|
|
113
|
-
export declare class QueryBuilderInterface<TableFields extends string, StringFields extends string, MetadataFields extends string, Result> extends QueryBuilderInner<TableFields, StringFields, MetadataFields, Result> {
|
|
113
|
+
export declare class QueryBuilderInterface<TableFields extends string, StringFields extends string, MetadataFields extends string, Options, Result> extends QueryBuilderInner<TableFields, StringFields, MetadataFields, Result> {
|
|
114
114
|
private execFn;
|
|
115
115
|
protected optionsObject: {
|
|
116
116
|
[k: string]: unknown;
|
|
@@ -125,9 +125,7 @@ export declare class QueryBuilderInterface<TableFields extends string, StringFie
|
|
|
125
125
|
});
|
|
126
126
|
private start;
|
|
127
127
|
toJSON(): BuiltQuery;
|
|
128
|
-
options(optionsInput:
|
|
129
|
-
[key: string]: unknown;
|
|
130
|
-
}): this;
|
|
128
|
+
options(optionsInput: Options): this;
|
|
131
129
|
then<TResult1 = Result, TResult2 = never>(onfulfilled?: (value: Result) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: Error) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>;
|
|
132
130
|
catch<TResult2 = never>(onerror: (reason: Error) => TResult2 | PromiseLike<TResult2>): Promise<Result | TResult2>;
|
|
133
131
|
stream(): ReadStream;
|
|
@@ -162,7 +160,7 @@ export declare class QueryBuilderInterface<TableFields extends string, StringFie
|
|
|
162
160
|
*
|
|
163
161
|
* ```
|
|
164
162
|
*/
|
|
165
|
-
export declare class QueryBuilder<TableFields extends string, StringFields extends string, MetadataFields extends string, ResultFields extends string, Options extends BaseOptions, Result> extends QueryBuilderInterface<TableFields, StringFields, MetadataFields, Result> {
|
|
163
|
+
export declare class QueryBuilder<TableFields extends string, StringFields extends string, MetadataFields extends string, ResultFields extends string, Options extends BaseOptions, Result> extends QueryBuilderInterface<TableFields, StringFields, MetadataFields, Options, Result> {
|
|
166
164
|
constructor({ start, modifiers, optionsModifiers, }: {
|
|
167
165
|
start: (query: BuiltQuery) => StreamPromise<Result>;
|
|
168
166
|
modifiers?: (field: TableFields | StringFields | MetadataFields, value: Primitive | {
|
|
@@ -205,7 +203,7 @@ export declare class QueryBuilder<TableFields extends string, StringFields exten
|
|
|
205
203
|
*
|
|
206
204
|
* ```
|
|
207
205
|
*/
|
|
208
|
-
export declare class AggregateQueryBuilder<TableFields extends string, StringFields extends string, MetadataFields extends string, GroupFields extends string, Result> extends QueryBuilderInterface<TableFields, StringFields, MetadataFields, Result> {
|
|
206
|
+
export declare class AggregateQueryBuilder<TableFields extends string, StringFields extends string, MetadataFields extends string, GroupFields extends string, Options, Result> extends QueryBuilderInterface<TableFields, StringFields, MetadataFields, Options, Result> {
|
|
209
207
|
private aggregatorObject;
|
|
210
208
|
private timezoneString;
|
|
211
209
|
constructor({ start, modifiers, optionsModifiers, }: {
|
|
@@ -225,7 +223,7 @@ export declare class AggregateQueryBuilder<TableFields extends string, StringFie
|
|
|
225
223
|
max(input?: string): this;
|
|
226
224
|
sum(input?: string): this;
|
|
227
225
|
}
|
|
228
|
-
export declare class UpdateQueryBuilder<TableFields extends string, StringFields extends string, MetadataFields extends string, ResultFields extends string, UpdateFields, Result> extends QueryBuilderInterface<TableFields, StringFields, MetadataFields, Result> {
|
|
226
|
+
export declare class UpdateQueryBuilder<TableFields extends string, StringFields extends string, MetadataFields extends string, ResultFields extends string, UpdateFields, Options, Result> extends QueryBuilderInterface<TableFields, StringFields, MetadataFields, Options, Result> {
|
|
229
227
|
private updateObject;
|
|
230
228
|
constructor({ start, modifiers, optionsModifiers, }: {
|
|
231
229
|
start?: (query: BuiltUpdateQuery) => StreamPromise<Result>;
|
|
@@ -237,7 +235,7 @@ export declare class UpdateQueryBuilder<TableFields extends string, StringFields
|
|
|
237
235
|
toJSON(): BuiltUpdateQuery;
|
|
238
236
|
update(updateData: UpdateFields): this;
|
|
239
237
|
}
|
|
240
|
-
export declare class ReverseQueryBuilder<TableFields extends string, StringFields extends string, MetadataFields extends string, ReverseModifications, Result> extends QueryBuilderInterface<TableFields, StringFields, MetadataFields, Result> {
|
|
238
|
+
export declare class ReverseQueryBuilder<TableFields extends string, StringFields extends string, MetadataFields extends string, ReverseModifications, Options, Result> extends QueryBuilderInterface<TableFields, StringFields, MetadataFields, Options, Result> {
|
|
241
239
|
private reverseModifications;
|
|
242
240
|
constructor({ start, modifiers, optionsModifiers, }: {
|
|
243
241
|
start?: (query: BuiltReverseQuery) => StreamPromise<Result>;
|
|
@@ -2,8 +2,8 @@ import { ITxGeneralOptions, ITxDistributorLeftoverRule } from '../tx-consts.enum
|
|
|
2
2
|
import { UniqueWalletFilter } from '../get-wallet/get-wallet.enums';
|
|
3
3
|
import { UniqueTokenFilter } from '../get-token/get-token.enums';
|
|
4
4
|
import { UniqueTransferGroupFilter } from '../get-transfer-group/get-transfer-group.enums';
|
|
5
|
-
import { TransferTable } from '../../db/transfer/transfer.enums';
|
|
6
5
|
import { TransferGroupTable } from '../../db/transfer-group/transfer-group.enums';
|
|
6
|
+
import { TransferTable } from '../../db/transfer/transfer.enums';
|
|
7
7
|
/**
|
|
8
8
|
* Optional flags for input
|
|
9
9
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ITxLimitingOptions, ITxGeneralOptions, ITxSelectOptions, ITxDeselectOptions, ITxMetadataOptions, ITxOrderingInput, ITxFindMetadata } from '../tx-consts.enums';
|
|
2
|
-
import { DbFilterMetadata, DbFilterFunctionWhereInner, DbFilterFunctionWherePrimitive, DbFilterFunctionWherePrimitiveForeign, DbFilterFunctionWhereObject, DbFilterFunctionWhereIns, DbFilterFunctionWhereNulls, DbFilterFunctionWhereMetadataIns, DbFilterFunctionWhereMetadataNulls } from '../../db/consts.enums';
|
|
3
2
|
import { TransferLogTableFields } from '../../db/transfer-log/transfer-log.enums';
|
|
3
|
+
import { DbFilterMetadata, DbFilterFunctionWhereInner, DbFilterFunctionWherePrimitive, DbFilterFunctionWherePrimitiveForeign, DbFilterFunctionWhereObject, DbFilterFunctionWhereIns, DbFilterFunctionWhereNulls, DbFilterFunctionWhereMetadataIns, DbFilterFunctionWhereMetadataNulls } from '../../db/consts.enums';
|
|
4
4
|
import { UniqueWalletFilter } from '../get-wallet/get-wallet.enums';
|
|
5
5
|
import { UniqueTokenFilter } from '../get-token/get-token.enums';
|
|
6
6
|
import { UniqueTransferFilter } from '../get-transfer/get-transfer.enums';
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { ITxLimitingOptions, ITxGeneralOptions, ITxSelectOptions, ITxDeselectOptions, ITxMetadataOptions, ITxOrderingInput, ITxFindMetadata } from '../tx-consts.enums';
|
|
2
|
-
import { DbFilterMetadata, DbFilterFunctionWhereInner, DbFilterFunctionWherePrimitive, DbFilterFunctionWherePrimitiveForeign, DbFilterFunctionWhereObject, DbFilterFunctionWhereIns, DbFilterFunctionWhereNulls, DbFilterFunctionWhereMetadataIns, DbFilterFunctionWhereMetadataPrimitive, DbFilterFunctionWhereMetadataNulls } from '../../db/consts.enums';
|
|
3
2
|
import { TokenTableFields } from '../../db/token/token.enums';
|
|
3
|
+
import { DbFilterMetadata, DbFilterFunctionWhereInner, DbFilterFunctionWherePrimitive, DbFilterFunctionWherePrimitiveForeign, DbFilterFunctionWhereObject, DbFilterFunctionWhereIns, DbFilterFunctionWhereNulls, DbFilterFunctionWhereMetadataIns, DbFilterFunctionWhereMetadataPrimitive, DbFilterFunctionWhereMetadataNulls } from '../../db/consts.enums';
|
|
4
4
|
import { UniqueWalletFilter } from '../get-wallet/get-wallet.enums';
|
|
5
|
-
import { Token } from '../get-token/get-token.enums';
|
|
5
|
+
import { Token, TokenWithBalance } from '../get-token/get-token.enums';
|
|
6
6
|
/**
|
|
7
7
|
* Optional flags for input
|
|
8
8
|
*/
|
|
9
9
|
export interface FindTokenManyAdditionalOptions {
|
|
10
|
+
include_balance?: boolean;
|
|
10
11
|
}
|
|
11
12
|
/**
|
|
12
13
|
* Optional flags for input ordering
|
|
@@ -77,6 +78,6 @@ export interface FindTokenManyTxOutput {
|
|
|
77
78
|
/**
|
|
78
79
|
* Found tokens
|
|
79
80
|
*/
|
|
80
|
-
tokens: Token[];
|
|
81
|
+
tokens: Token[] | TokenWithBalance[];
|
|
81
82
|
metadata: ITxFindMetadata;
|
|
82
83
|
}
|
|
@@ -42,6 +42,12 @@
|
|
|
42
42
|
"description": "Optional flags for input",
|
|
43
43
|
"type": "object",
|
|
44
44
|
"default": {},
|
|
45
|
+
"properties": {
|
|
46
|
+
"include_balance": {
|
|
47
|
+
"description": "Return the total system balance of token",
|
|
48
|
+
"type": "boolean"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
45
51
|
"$typescript": "{\"additionalProperties\":false}"
|
|
46
52
|
},
|
|
47
53
|
"find_token_many_ordering_options": {
|
|
@@ -9,7 +9,14 @@
|
|
|
9
9
|
"description": "Found tokens",
|
|
10
10
|
"type": "array",
|
|
11
11
|
"items": {
|
|
12
|
-
"
|
|
12
|
+
"anyOf": [
|
|
13
|
+
{
|
|
14
|
+
"$ref": "/txs/get-token/get-token.schema.output.json#/definitions/token"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"$ref": "/txs/get-token/get-token.schema.output.json#/definitions/token_with_balance"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
13
20
|
}
|
|
14
21
|
},
|
|
15
22
|
"metadata": {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { ITxLimitingOptions, ITxGeneralOptions, ITxSelectOptions, ITxDeselectOptions, ITxMetadataOptions, ITxOrderingInput, ITxFindMetadata } from '../tx-consts.enums';
|
|
2
|
-
import {
|
|
2
|
+
import { TransferGroupTableFields } from '../../db/transfer-group/transfer-group.enums';
|
|
3
3
|
import { DbFilterMetadata, DbFilterFunctionWhereInner, DbFilterFunctionWherePrimitive, DbFilterFunctionWherePrimitiveIdentifier, DbFilterFunctionWhereObject, DbFilterFunctionWhereIns, DbFilterFunctionWhereNulls, DbFilterFunctionWhereMetadataIns, DbFilterFunctionWhereMetadataPrimitive, DbFilterFunctionWhereMetadataNulls } from '../../db/consts.enums';
|
|
4
4
|
import { UniqueTransferGroupFilter, TransferGroup } from '../get-transfer-group/get-transfer-group.enums';
|
|
5
|
-
import { TransferGroupTableFields } from '../../db/transfer-group/transfer-group.enums';
|
|
6
5
|
export interface FindTransferGroupManyAdditionalOptions {
|
|
7
6
|
/**
|
|
8
7
|
* Return running balance for each transfer_group for wallet in question
|
|
9
8
|
*/
|
|
10
|
-
|
|
9
|
+
return_transfers_count?: boolean;
|
|
11
10
|
}
|
|
12
11
|
/**
|
|
13
12
|
* Optional flags for input ordering
|
|
@@ -82,10 +81,17 @@ export interface FindTransferGroupManyTxInput {
|
|
|
82
81
|
*
|
|
83
82
|
* @category Output
|
|
84
83
|
*/
|
|
84
|
+
export interface TransferGroupTransfersCount {
|
|
85
|
+
/**
|
|
86
|
+
* Number of transfers in the transfer_group
|
|
87
|
+
*/
|
|
88
|
+
transfers_count?: number;
|
|
89
|
+
}
|
|
90
|
+
export type TransferGroupWithTransfersCount = TransferGroup & TransferGroupTransfersCount;
|
|
85
91
|
export interface FindTransferGroupManyTxOutput {
|
|
86
92
|
/**
|
|
87
93
|
* Found transfers
|
|
88
94
|
*/
|
|
89
|
-
transfer_groups:
|
|
95
|
+
transfer_groups: TransferGroupWithTransfersCount[];
|
|
90
96
|
metadata: ITxFindMetadata;
|
|
91
97
|
}
|
|
@@ -42,9 +42,10 @@
|
|
|
42
42
|
"$typescript": "{\"additionalProperties\":false}",
|
|
43
43
|
"type": "object",
|
|
44
44
|
"properties": {
|
|
45
|
-
"
|
|
46
|
-
"description": "Return
|
|
47
|
-
"
|
|
45
|
+
"return_transfers_count": {
|
|
46
|
+
"description": "Return number of transfers in the transfer_group",
|
|
47
|
+
"type": "boolean",
|
|
48
|
+
"default": false
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
51
|
},
|
|
@@ -9,13 +9,35 @@
|
|
|
9
9
|
"description": "Found transfers",
|
|
10
10
|
"type": "array",
|
|
11
11
|
"items": {
|
|
12
|
-
"$ref": "
|
|
12
|
+
"$ref": "#/definitions/transfer_group_with_transfers_count"
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"metadata": {
|
|
16
16
|
"$ref": "/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
|
+
"definitions": {
|
|
20
|
+
"transfer_group_transfers_count": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"properties": {
|
|
23
|
+
"transfers_count": {
|
|
24
|
+
"description": "Number of transfers in the group",
|
|
25
|
+
"type": "number"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"$typescript": "{\"additionalProperties\": false}"
|
|
29
|
+
},
|
|
30
|
+
"transfer_group_with_transfers_count": {
|
|
31
|
+
"allOf": [
|
|
32
|
+
{
|
|
33
|
+
"$ref": "/txs/get-transfer-group/get-transfer-group.schema.output.json#/definitions/transfer_group"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"$ref": "#/definitions/transfer_group_transfers_count"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
},
|
|
19
41
|
"required": ["transfer_groups", "metadata"],
|
|
20
42
|
"additionalProperties": false
|
|
21
43
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ITxLimitingOptions, ITxGeneralOptions, ITxSelectOptions, ITxDeselectOptions, ITxMetadataOptions, ITxOrderingInput, ITxFindMetadata } from '../tx-consts.enums';
|
|
2
2
|
import { UniqueWalletFilter } from '../get-wallet/get-wallet.enums';
|
|
3
|
-
import { DbFilterMetadata, DbFilterFunctionWhereInner, DbFilterFunctionWherePrimitive, DbFilterFunctionWherePrimitiveForeign, DbFilterFunctionWherePrimitiveIdentifier, DbFilterFunctionWhereObject, DbFilterFunctionWhereIns, DbFilterFunctionWhereNulls, DbFilterFunctionWhereMetadataIns, DbFilterFunctionWhereMetadataPrimitive, DbFilterFunctionWhereMetadataNulls } from '../../db/consts.enums';
|
|
4
3
|
import { TransferTableAccessibleFields } from '../../db/transfer/transfer.enums';
|
|
4
|
+
import { DbFilterMetadata, DbFilterFunctionWhereInner, DbFilterFunctionWherePrimitive, DbFilterFunctionWherePrimitiveForeign, DbFilterFunctionWherePrimitiveIdentifier, DbFilterFunctionWhereObject, DbFilterFunctionWhereIns, DbFilterFunctionWhereNulls, DbFilterFunctionWhereMetadataIns, DbFilterFunctionWhereMetadataPrimitive, DbFilterFunctionWhereMetadataNulls } from '../../db/consts.enums';
|
|
5
5
|
import { UniqueTokenFilter } from '../get-token/get-token.enums';
|
|
6
6
|
import { UniqueTransferGroupFilter } from '../get-transfer-group/get-transfer-group.enums';
|
|
7
7
|
import { Transfer } from '../get-transfer/get-transfer.enums';
|
|
@@ -86,6 +86,10 @@ export interface BalanceHistory {
|
|
|
86
86
|
* Current finished and pending balance sum
|
|
87
87
|
*/
|
|
88
88
|
amount?: number;
|
|
89
|
+
/**
|
|
90
|
+
* The status of the change to balance
|
|
91
|
+
*/
|
|
92
|
+
status?: 'pending' | 'finished';
|
|
89
93
|
/**
|
|
90
94
|
* Latest control_hash associated with wallet token combination
|
|
91
95
|
*/
|
|
@@ -173,7 +177,7 @@ export interface BalanceHistory {
|
|
|
173
177
|
*/
|
|
174
178
|
transfer_status_finalized_at?: string | null;
|
|
175
179
|
}
|
|
176
|
-
export type BalanceHistoryFields = 'transfer_id' | 'transfer_identifier' | 'transfer_control_hash' | 'transfer_from_wallet_id' | 'transfer_from_wallet_foreign' | 'transfer_to_wallet_id' | 'transfer_to_wallet_foreign' | 'transfer_amount' | 'transfer_type' | 'transfer_status' | 'transfer_force' | 'transfer_created_at' | 'transfer_updated_at' | 'transfer_metadata' | 'transfer_transfer_group_id' | 'transfer_transfer_group_identifier' | 'transfer_reverses_id' | 'transfer_reverses_identifier' | 'transfer_status_finalized_at' | 'balance_id' | 'token_id' | 'token_foreign' | 'wallet_id' | 'wallet_foreign' | 'pending_amount' | 'pending_amount_to' | 'pending_amount_from' | 'finished_amount' | 'amount' | 'latest_control_hash' | 'updated_at' | 'status';
|
|
180
|
+
export type BalanceHistoryFields = 'transfer_id' | 'transfer_identifier' | 'transfer_control_hash' | 'transfer_from_wallet_id' | 'transfer_from_wallet_foreign' | 'transfer_to_wallet_id' | 'transfer_to_wallet_foreign' | 'transfer_amount' | 'transfer_type' | 'transfer_status' | 'transfer_force' | 'transfer_created_at' | 'transfer_updated_at' | 'transfer_metadata' | 'transfer_transfer_group_id' | 'transfer_transfer_group_identifier' | 'transfer_reverses_id' | 'transfer_reverses_identifier' | 'transfer_status_finalized_at' | 'balance_id' | 'token_id' | 'token_foreign' | 'wallet_id' | 'wallet_foreign' | 'pending_amount' | 'pending_amount_to' | 'pending_amount_from' | 'finished_amount' | 'amount' | 'latest_control_hash' | 'updated_at' | 'status' | 'available_balance';
|
|
177
181
|
/**
|
|
178
182
|
* Output of getBalanceHistory
|
|
179
183
|
*
|
|
@@ -64,6 +64,11 @@
|
|
|
64
64
|
"description": "Current finished and pending balance sum",
|
|
65
65
|
"type": "number"
|
|
66
66
|
},
|
|
67
|
+
"status": {
|
|
68
|
+
"description": "The status of the change to balance",
|
|
69
|
+
"type": ["string"],
|
|
70
|
+
"enum": ["pending", "finished"]
|
|
71
|
+
},
|
|
67
72
|
"latest_control_hash": {
|
|
68
73
|
"description": "Latest control_hash associated with wallet token combination",
|
|
69
74
|
"$ref": "/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"
|
|
@@ -170,7 +175,8 @@
|
|
|
170
175
|
"amount",
|
|
171
176
|
"latest_control_hash",
|
|
172
177
|
"updated_at",
|
|
173
|
-
"status"
|
|
178
|
+
"status",
|
|
179
|
+
"available_balance"
|
|
174
180
|
]
|
|
175
181
|
}
|
|
176
182
|
},
|
|
@@ -12,6 +12,10 @@ export interface GetTokenAdditionalOptions {
|
|
|
12
12
|
* If true then the returning object is only guaranteed to have id
|
|
13
13
|
*/
|
|
14
14
|
return_only_id?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Return the total system balance of token
|
|
17
|
+
*/
|
|
18
|
+
include_balance?: boolean;
|
|
15
19
|
}
|
|
16
20
|
/**
|
|
17
21
|
* ID based filter for token
|
|
@@ -101,6 +105,44 @@ export interface Token {
|
|
|
101
105
|
*/
|
|
102
106
|
belongs_to_foreign?: string | null;
|
|
103
107
|
}
|
|
108
|
+
export interface TokenWithBalance extends Token {
|
|
109
|
+
/**
|
|
110
|
+
* Latest transfer affecting the balance
|
|
111
|
+
*/
|
|
112
|
+
balance_transfer_id: number | null;
|
|
113
|
+
/**
|
|
114
|
+
* Current pending balance
|
|
115
|
+
*/
|
|
116
|
+
balance_pending_amount: number | null;
|
|
117
|
+
/**
|
|
118
|
+
* Sum of incoming pending transfers
|
|
119
|
+
*/
|
|
120
|
+
balance_pending_amount_to: number | null;
|
|
121
|
+
/**
|
|
122
|
+
* Sum of outgoing pending transfers
|
|
123
|
+
*/
|
|
124
|
+
balance_pending_amount_from: number | null;
|
|
125
|
+
/**
|
|
126
|
+
* Current finished balance
|
|
127
|
+
*/
|
|
128
|
+
balance_finished_amount: number | null;
|
|
129
|
+
/**
|
|
130
|
+
* Current finished and pending balance sum
|
|
131
|
+
*/
|
|
132
|
+
balance_amount: number | null;
|
|
133
|
+
/**
|
|
134
|
+
* Available balance that is sum of pending_amount_from and finished_amount
|
|
135
|
+
*/
|
|
136
|
+
balance_available_balance: number | null;
|
|
137
|
+
/**
|
|
138
|
+
* Latest control_hash associated with wallet token combination
|
|
139
|
+
*/
|
|
140
|
+
balance_latest_control_hash: number | null;
|
|
141
|
+
/**
|
|
142
|
+
* Last modification date of balance
|
|
143
|
+
*/
|
|
144
|
+
balance_updated_at: number | null;
|
|
145
|
+
}
|
|
104
146
|
/**
|
|
105
147
|
* Output of getToken
|
|
106
148
|
*
|
|
@@ -110,5 +152,5 @@ export interface GetTokenTxOutput {
|
|
|
110
152
|
/**
|
|
111
153
|
* requested token
|
|
112
154
|
*/
|
|
113
|
-
token?: Token;
|
|
155
|
+
token?: Token | TokenWithBalance;
|
|
114
156
|
}
|
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
"type": "object",
|
|
27
27
|
"properties": {
|
|
28
28
|
"ignore_cache": {
|
|
29
|
-
"description": "If true then result is returned from cache layer if possible",
|
|
30
29
|
"type": "boolean",
|
|
31
30
|
"default": false
|
|
32
31
|
},
|
|
@@ -39,6 +38,11 @@
|
|
|
39
38
|
"type": "boolean",
|
|
40
39
|
"description": "If true then the returning object is only guaranteed to have id",
|
|
41
40
|
"default": false
|
|
41
|
+
},
|
|
42
|
+
"include_balance": {
|
|
43
|
+
"type": "boolean",
|
|
44
|
+
"description": "Return the total system balance of token",
|
|
45
|
+
"default": false
|
|
42
46
|
}
|
|
43
47
|
},
|
|
44
48
|
"default": {},
|