wapi-client 0.6.16 → 0.6.22
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/index.d.ts +1 -1
- package/dist/fns/update-transfer-group/update-transfer-group.enums.d.ts +35 -2
- package/dist/txs/update-transfer-group/update-transfer-group.enums.d.ts +23 -1
- package/dist/wapi-client.cjs.development.js +182 -63
- package/dist/wapi-client.cjs.js +7 -7
- package/package.json +1 -1
package/dist/api/index.d.ts
CHANGED
|
@@ -5,6 +5,12 @@ export interface UpdateTransferGroupFnStatus {
|
|
|
5
5
|
* identifier of the transfer group to reverse
|
|
6
6
|
*/
|
|
7
7
|
transfer_group: string | number;
|
|
8
|
+
/**
|
|
9
|
+
* Key value object to be replaced or extended with existing TransferGroup metadata
|
|
10
|
+
*/
|
|
11
|
+
metadata?: {
|
|
12
|
+
[k: string]: unknown;
|
|
13
|
+
} | null;
|
|
8
14
|
/**
|
|
9
15
|
* Lifecycle status of the TransferGroup
|
|
10
16
|
*/
|
|
@@ -17,9 +23,15 @@ export interface UpdateTransferGroupFnStatus {
|
|
|
17
23
|
}
|
|
18
24
|
export interface UpdateTransferGroupFnTransferStatus {
|
|
19
25
|
/**
|
|
20
|
-
* identifier of the transfer group to
|
|
26
|
+
* identifier of the transfer group to update
|
|
21
27
|
*/
|
|
22
28
|
transfer_group: string | number;
|
|
29
|
+
/**
|
|
30
|
+
* Key value object to be replaced or extended with existing TransferGroup metadata
|
|
31
|
+
*/
|
|
32
|
+
metadata?: {
|
|
33
|
+
[k: string]: unknown;
|
|
34
|
+
} | null;
|
|
23
35
|
/**
|
|
24
36
|
* Lifecycle status of the TransferGroup
|
|
25
37
|
*/
|
|
@@ -30,13 +42,34 @@ export interface UpdateTransferGroupFnTransferStatus {
|
|
|
30
42
|
transfer_status: TransferStatus;
|
|
31
43
|
options?: UpdateTransferGroupFnOptions;
|
|
32
44
|
}
|
|
45
|
+
export interface UpdateTransferGroupFnMetadata {
|
|
46
|
+
/**
|
|
47
|
+
* identifier of the transfer group to update
|
|
48
|
+
*/
|
|
49
|
+
transfer_group: string | number;
|
|
50
|
+
/**
|
|
51
|
+
* Key value object to be replaced or extended with existing TransferGroup metadata
|
|
52
|
+
*/
|
|
53
|
+
metadata: {
|
|
54
|
+
[k: string]: unknown;
|
|
55
|
+
} | null;
|
|
56
|
+
/**
|
|
57
|
+
* Lifecycle status of the TransferGroup
|
|
58
|
+
*/
|
|
59
|
+
status?: TransferGroupStatus;
|
|
60
|
+
/**
|
|
61
|
+
* Status all the transfers should be set at.
|
|
62
|
+
*/
|
|
63
|
+
transfer_status?: TransferStatus;
|
|
64
|
+
options?: UpdateTransferGroupFnOptions;
|
|
65
|
+
}
|
|
33
66
|
export declare type UpdateTransferGroupFnOptions = UpdateTransferGroupTxOptions;
|
|
34
67
|
/**
|
|
35
68
|
* Input for updateTransferGroup
|
|
36
69
|
*
|
|
37
70
|
* @category Input
|
|
38
71
|
*/
|
|
39
|
-
export declare type UpdateTransferGroupFnInput = UpdateTransferGroupFnStatus | UpdateTransferGroupFnTransferStatus;
|
|
72
|
+
export declare type UpdateTransferGroupFnInput = UpdateTransferGroupFnStatus | UpdateTransferGroupFnTransferStatus | UpdateTransferGroupFnMetadata;
|
|
40
73
|
/**
|
|
41
74
|
* Output of updateTransferGroup
|
|
42
75
|
*
|
|
@@ -61,8 +61,30 @@ export interface UpdateTransferGroupTransferStatus {
|
|
|
61
61
|
*/
|
|
62
62
|
transfer_status: TransferStatus;
|
|
63
63
|
}
|
|
64
|
+
export interface UpdateTransferGroupMetadata {
|
|
65
|
+
/**
|
|
66
|
+
* Key value object to be replaced or extended with existing TransferGroup metadata
|
|
67
|
+
*/
|
|
68
|
+
metadata: {
|
|
69
|
+
[k: string]: unknown;
|
|
70
|
+
} | null;
|
|
71
|
+
/**
|
|
72
|
+
* Key value object to be replaced or extended with existing Transfer metadata
|
|
73
|
+
*/
|
|
74
|
+
transfer_metadata?: {
|
|
75
|
+
[k: string]: unknown;
|
|
76
|
+
} | null;
|
|
77
|
+
/**
|
|
78
|
+
* Lifecycle status of the TransferGroup
|
|
79
|
+
*/
|
|
80
|
+
status?: TransferGroupStatus;
|
|
81
|
+
/**
|
|
82
|
+
* Status all the transfers should be set at. Changing transfer_status will also close the group
|
|
83
|
+
*/
|
|
84
|
+
transfer_status?: TransferStatus;
|
|
85
|
+
}
|
|
64
86
|
export declare type UpdateTransferGroupTxOptions = ITxGeneralOptionsWithoutTx & UpdateTransferGroupAdditionalOptions;
|
|
65
|
-
export declare type UpdateTransferGroupData = UpdateTransferGroupStatus | UpdateTransferGroupTransferStatus;
|
|
87
|
+
export declare type UpdateTransferGroupData = UpdateTransferGroupStatus | UpdateTransferGroupTransferStatus | UpdateTransferGroupMetadata;
|
|
66
88
|
/**
|
|
67
89
|
* Input for updateTransferGroup
|
|
68
90
|
*
|
|
@@ -80,9 +80,9 @@ var require_constants = __commonJS({
|
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
82
|
|
|
83
|
-
// node_modules/node-gyp-build/
|
|
83
|
+
// node_modules/node-gyp-build/node-gyp-build.js
|
|
84
84
|
var require_node_gyp_build = __commonJS({
|
|
85
|
-
"node_modules/node-gyp-build/
|
|
85
|
+
"node_modules/node-gyp-build/node-gyp-build.js"(exports, module2) {
|
|
86
86
|
var fs = require("fs");
|
|
87
87
|
var path = require("path");
|
|
88
88
|
var os = require("os");
|
|
@@ -98,9 +98,9 @@ var require_node_gyp_build = __commonJS({
|
|
|
98
98
|
var uv = (process.versions.uv || "").split(".")[0];
|
|
99
99
|
module2.exports = load;
|
|
100
100
|
function load(dir) {
|
|
101
|
-
return runtimeRequire(load.
|
|
101
|
+
return runtimeRequire(load.resolve(dir));
|
|
102
102
|
}
|
|
103
|
-
load.path = function(dir) {
|
|
103
|
+
load.resolve = load.path = function(dir) {
|
|
104
104
|
dir = path.resolve(dir || ".");
|
|
105
105
|
try {
|
|
106
106
|
var name = runtimeRequire(path.join(dir, "package.json")).name.toUpperCase().replace(/-/g, "_");
|
|
@@ -270,6 +270,17 @@ var require_node_gyp_build = __commonJS({
|
|
|
270
270
|
}
|
|
271
271
|
});
|
|
272
272
|
|
|
273
|
+
// node_modules/node-gyp-build/index.js
|
|
274
|
+
var require_node_gyp_build2 = __commonJS({
|
|
275
|
+
"node_modules/node-gyp-build/index.js"(exports, module2) {
|
|
276
|
+
if (typeof process.addon === "function") {
|
|
277
|
+
module2.exports = process.addon.bind(process);
|
|
278
|
+
} else {
|
|
279
|
+
module2.exports = require_node_gyp_build();
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
|
|
273
284
|
// node_modules/bufferutil/fallback.js
|
|
274
285
|
var require_fallback = __commonJS({
|
|
275
286
|
"node_modules/bufferutil/fallback.js"(exports, module2) {
|
|
@@ -294,7 +305,7 @@ var require_bufferutil = __commonJS({
|
|
|
294
305
|
"node_modules/bufferutil/index.js"(exports, module2) {
|
|
295
306
|
"use strict";
|
|
296
307
|
try {
|
|
297
|
-
module2.exports =
|
|
308
|
+
module2.exports = require_node_gyp_build2()(__dirname);
|
|
298
309
|
} catch (e) {
|
|
299
310
|
module2.exports = require_fallback();
|
|
300
311
|
}
|
|
@@ -306,6 +317,7 @@ var require_buffer_util = __commonJS({
|
|
|
306
317
|
"node_modules/ws/lib/buffer-util.js"(exports, module2) {
|
|
307
318
|
"use strict";
|
|
308
319
|
var { EMPTY_BUFFER } = require_constants();
|
|
320
|
+
var FastBuffer = Buffer[Symbol.species];
|
|
309
321
|
function concat(list, totalLength) {
|
|
310
322
|
if (list.length === 0)
|
|
311
323
|
return EMPTY_BUFFER;
|
|
@@ -318,8 +330,9 @@ var require_buffer_util = __commonJS({
|
|
|
318
330
|
target.set(buf, offset);
|
|
319
331
|
offset += buf.length;
|
|
320
332
|
}
|
|
321
|
-
if (offset < totalLength)
|
|
322
|
-
return target.
|
|
333
|
+
if (offset < totalLength) {
|
|
334
|
+
return new FastBuffer(target.buffer, target.byteOffset, offset);
|
|
335
|
+
}
|
|
323
336
|
return target;
|
|
324
337
|
}
|
|
325
338
|
function _mask(source, mask, output, offset, length) {
|
|
@@ -333,10 +346,10 @@ var require_buffer_util = __commonJS({
|
|
|
333
346
|
}
|
|
334
347
|
}
|
|
335
348
|
function toArrayBuffer(buf) {
|
|
336
|
-
if (buf.
|
|
349
|
+
if (buf.length === buf.buffer.byteLength) {
|
|
337
350
|
return buf.buffer;
|
|
338
351
|
}
|
|
339
|
-
return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.
|
|
352
|
+
return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.length);
|
|
340
353
|
}
|
|
341
354
|
function toBuffer(data) {
|
|
342
355
|
toBuffer.readOnly = true;
|
|
@@ -344,9 +357,9 @@ var require_buffer_util = __commonJS({
|
|
|
344
357
|
return data;
|
|
345
358
|
let buf;
|
|
346
359
|
if (data instanceof ArrayBuffer) {
|
|
347
|
-
buf =
|
|
360
|
+
buf = new FastBuffer(data);
|
|
348
361
|
} else if (ArrayBuffer.isView(data)) {
|
|
349
|
-
buf =
|
|
362
|
+
buf = new FastBuffer(data.buffer, data.byteOffset, data.byteLength);
|
|
350
363
|
} else {
|
|
351
364
|
buf = Buffer.from(data);
|
|
352
365
|
toBuffer.readOnly = false;
|
|
@@ -423,6 +436,7 @@ var require_permessage_deflate = __commonJS({
|
|
|
423
436
|
var bufferUtil = require_buffer_util();
|
|
424
437
|
var Limiter = require_limiter();
|
|
425
438
|
var { kStatusCode } = require_constants();
|
|
439
|
+
var FastBuffer = Buffer[Symbol.species];
|
|
426
440
|
var TRAILER = Buffer.from([0, 0, 255, 255]);
|
|
427
441
|
var kPerMessageDeflate = Symbol("permessage-deflate");
|
|
428
442
|
var kTotalLength = Symbol("total-length");
|
|
@@ -656,8 +670,9 @@ var require_permessage_deflate = __commonJS({
|
|
|
656
670
|
this._deflate[kBuffers],
|
|
657
671
|
this._deflate[kTotalLength]
|
|
658
672
|
);
|
|
659
|
-
if (fin)
|
|
660
|
-
data2 = data2.
|
|
673
|
+
if (fin) {
|
|
674
|
+
data2 = new FastBuffer(data2.buffer, data2.byteOffset, data2.length - 4);
|
|
675
|
+
}
|
|
661
676
|
this._deflate[kCallback] = null;
|
|
662
677
|
this._deflate[kTotalLength] = 0;
|
|
663
678
|
this._deflate[kBuffers] = [];
|
|
@@ -733,7 +748,7 @@ var require_utf_8_validate = __commonJS({
|
|
|
733
748
|
"node_modules/utf-8-validate/index.js"(exports, module2) {
|
|
734
749
|
"use strict";
|
|
735
750
|
try {
|
|
736
|
-
module2.exports =
|
|
751
|
+
module2.exports = require_node_gyp_build2()(__dirname);
|
|
737
752
|
} catch (e) {
|
|
738
753
|
module2.exports = require_fallback2();
|
|
739
754
|
}
|
|
@@ -744,6 +759,7 @@ var require_utf_8_validate = __commonJS({
|
|
|
744
759
|
var require_validation = __commonJS({
|
|
745
760
|
"node_modules/ws/lib/validation.js"(exports, module2) {
|
|
746
761
|
"use strict";
|
|
762
|
+
var { isUtf8 } = require("buffer");
|
|
747
763
|
var tokenChars = [
|
|
748
764
|
0,
|
|
749
765
|
0,
|
|
@@ -909,11 +925,15 @@ var require_validation = __commonJS({
|
|
|
909
925
|
isValidUTF8: _isValidUTF8,
|
|
910
926
|
tokenChars
|
|
911
927
|
};
|
|
912
|
-
if (
|
|
928
|
+
if (isUtf8) {
|
|
929
|
+
module2.exports.isValidUTF8 = function(buf) {
|
|
930
|
+
return buf.length < 24 ? _isValidUTF8(buf) : isUtf8(buf);
|
|
931
|
+
};
|
|
932
|
+
} else if (!process.env.WS_NO_UTF_8_VALIDATE) {
|
|
913
933
|
try {
|
|
914
934
|
const isValidUTF8 = require_utf_8_validate();
|
|
915
935
|
module2.exports.isValidUTF8 = function(buf) {
|
|
916
|
-
return buf.length <
|
|
936
|
+
return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf);
|
|
917
937
|
};
|
|
918
938
|
} catch (e) {
|
|
919
939
|
}
|
|
@@ -935,6 +955,7 @@ var require_receiver = __commonJS({
|
|
|
935
955
|
} = require_constants();
|
|
936
956
|
var { concat, toArrayBuffer, unmask } = require_buffer_util();
|
|
937
957
|
var { isValidStatusCode, isValidUTF8 } = require_validation();
|
|
958
|
+
var FastBuffer = Buffer[Symbol.species];
|
|
938
959
|
var GET_INFO = 0;
|
|
939
960
|
var GET_PAYLOAD_LENGTH_16 = 1;
|
|
940
961
|
var GET_PAYLOAD_LENGTH_64 = 2;
|
|
@@ -978,8 +999,12 @@ var require_receiver = __commonJS({
|
|
|
978
999
|
return this._buffers.shift();
|
|
979
1000
|
if (n < this._buffers[0].length) {
|
|
980
1001
|
const buf = this._buffers[0];
|
|
981
|
-
this._buffers[0] =
|
|
982
|
-
|
|
1002
|
+
this._buffers[0] = new FastBuffer(
|
|
1003
|
+
buf.buffer,
|
|
1004
|
+
buf.byteOffset + n,
|
|
1005
|
+
buf.length - n
|
|
1006
|
+
);
|
|
1007
|
+
return new FastBuffer(buf.buffer, buf.byteOffset, n);
|
|
983
1008
|
}
|
|
984
1009
|
const dst = Buffer.allocUnsafe(n);
|
|
985
1010
|
do {
|
|
@@ -989,7 +1014,11 @@ var require_receiver = __commonJS({
|
|
|
989
1014
|
dst.set(this._buffers.shift(), offset);
|
|
990
1015
|
} else {
|
|
991
1016
|
dst.set(new Uint8Array(buf.buffer, buf.byteOffset, n), offset);
|
|
992
|
-
this._buffers[0] =
|
|
1017
|
+
this._buffers[0] = new FastBuffer(
|
|
1018
|
+
buf.buffer,
|
|
1019
|
+
buf.byteOffset + n,
|
|
1020
|
+
buf.length - n
|
|
1021
|
+
);
|
|
993
1022
|
}
|
|
994
1023
|
n -= buf.length;
|
|
995
1024
|
} while (n > 0);
|
|
@@ -1107,7 +1136,7 @@ var require_receiver = __commonJS({
|
|
|
1107
1136
|
"WS_ERR_UNEXPECTED_RSV_1"
|
|
1108
1137
|
);
|
|
1109
1138
|
}
|
|
1110
|
-
if (this._payloadLength > 125) {
|
|
1139
|
+
if (this._payloadLength > 125 || this._opcode === 8 && this._payloadLength === 1) {
|
|
1111
1140
|
this._loop = false;
|
|
1112
1141
|
return error(
|
|
1113
1142
|
RangeError,
|
|
@@ -1305,14 +1334,6 @@ var require_receiver = __commonJS({
|
|
|
1305
1334
|
if (data.length === 0) {
|
|
1306
1335
|
this.emit("conclude", 1005, EMPTY_BUFFER);
|
|
1307
1336
|
this.end();
|
|
1308
|
-
} else if (data.length === 1) {
|
|
1309
|
-
return error(
|
|
1310
|
-
RangeError,
|
|
1311
|
-
"invalid payload length 1",
|
|
1312
|
-
true,
|
|
1313
|
-
1002,
|
|
1314
|
-
"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH"
|
|
1315
|
-
);
|
|
1316
1337
|
} else {
|
|
1317
1338
|
const code = data.readUInt16BE(0);
|
|
1318
1339
|
if (!isValidStatusCode(code)) {
|
|
@@ -1324,7 +1345,11 @@ var require_receiver = __commonJS({
|
|
|
1324
1345
|
"WS_ERR_INVALID_CLOSE_CODE"
|
|
1325
1346
|
);
|
|
1326
1347
|
}
|
|
1327
|
-
const buf =
|
|
1348
|
+
const buf = new FastBuffer(
|
|
1349
|
+
data.buffer,
|
|
1350
|
+
data.byteOffset + 2,
|
|
1351
|
+
data.length - 2
|
|
1352
|
+
);
|
|
1328
1353
|
if (!this._skipUTF8Validation && !isValidUTF8(buf)) {
|
|
1329
1354
|
return error(
|
|
1330
1355
|
Error,
|
|
@@ -1732,7 +1757,12 @@ var require_event_target = __commonJS({
|
|
|
1732
1757
|
};
|
|
1733
1758
|
Object.defineProperty(MessageEvent3.prototype, "data", { enumerable: true });
|
|
1734
1759
|
var EventTarget = {
|
|
1735
|
-
addEventListener(type,
|
|
1760
|
+
addEventListener(type, handler, options = {}) {
|
|
1761
|
+
for (const listener of this.listeners(type)) {
|
|
1762
|
+
if (!options[kForOnEventAttribute] && listener[kListener] === handler && !listener[kForOnEventAttribute]) {
|
|
1763
|
+
return;
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1736
1766
|
let wrapper;
|
|
1737
1767
|
if (type === "message") {
|
|
1738
1768
|
wrapper = function onMessage(data, isBinary) {
|
|
@@ -1740,7 +1770,7 @@ var require_event_target = __commonJS({
|
|
|
1740
1770
|
data: isBinary ? data : data.toString()
|
|
1741
1771
|
});
|
|
1742
1772
|
event[kTarget] = this;
|
|
1743
|
-
|
|
1773
|
+
callListener(handler, this, event);
|
|
1744
1774
|
};
|
|
1745
1775
|
} else if (type === "close") {
|
|
1746
1776
|
wrapper = function onClose(code, message) {
|
|
@@ -1750,7 +1780,7 @@ var require_event_target = __commonJS({
|
|
|
1750
1780
|
wasClean: this._closeFrameReceived && this._closeFrameSent
|
|
1751
1781
|
});
|
|
1752
1782
|
event[kTarget] = this;
|
|
1753
|
-
|
|
1783
|
+
callListener(handler, this, event);
|
|
1754
1784
|
};
|
|
1755
1785
|
} else if (type === "error") {
|
|
1756
1786
|
wrapper = function onError(error) {
|
|
@@ -1759,19 +1789,19 @@ var require_event_target = __commonJS({
|
|
|
1759
1789
|
message: error.message
|
|
1760
1790
|
});
|
|
1761
1791
|
event[kTarget] = this;
|
|
1762
|
-
|
|
1792
|
+
callListener(handler, this, event);
|
|
1763
1793
|
};
|
|
1764
1794
|
} else if (type === "open") {
|
|
1765
1795
|
wrapper = function onOpen() {
|
|
1766
1796
|
const event = new Event("open");
|
|
1767
1797
|
event[kTarget] = this;
|
|
1768
|
-
|
|
1798
|
+
callListener(handler, this, event);
|
|
1769
1799
|
};
|
|
1770
1800
|
} else {
|
|
1771
1801
|
return;
|
|
1772
1802
|
}
|
|
1773
1803
|
wrapper[kForOnEventAttribute] = !!options[kForOnEventAttribute];
|
|
1774
|
-
wrapper[kListener] =
|
|
1804
|
+
wrapper[kListener] = handler;
|
|
1775
1805
|
if (options.once) {
|
|
1776
1806
|
this.once(type, wrapper);
|
|
1777
1807
|
} else {
|
|
@@ -1794,6 +1824,13 @@ var require_event_target = __commonJS({
|
|
|
1794
1824
|
EventTarget,
|
|
1795
1825
|
MessageEvent: MessageEvent3
|
|
1796
1826
|
};
|
|
1827
|
+
function callListener(listener, thisArg, event) {
|
|
1828
|
+
if (typeof listener === "object" && listener.handleEvent) {
|
|
1829
|
+
listener.handleEvent.call(listener, event);
|
|
1830
|
+
} else {
|
|
1831
|
+
listener.call(thisArg, event);
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1797
1834
|
}
|
|
1798
1835
|
});
|
|
1799
1836
|
|
|
@@ -2127,7 +2164,8 @@ var require_websocket = __commonJS({
|
|
|
2127
2164
|
return;
|
|
2128
2165
|
if (this.readyState === WebSocket2.CONNECTING) {
|
|
2129
2166
|
const msg = "WebSocket was closed before the connection was established";
|
|
2130
|
-
|
|
2167
|
+
abortHandshake(this, this._req, msg);
|
|
2168
|
+
return;
|
|
2131
2169
|
}
|
|
2132
2170
|
if (this.readyState === WebSocket2.CLOSING) {
|
|
2133
2171
|
if (this._closeFrameSent && (this._closeFrameReceived || this._receiver._writableState.errorEmitted)) {
|
|
@@ -2236,7 +2274,8 @@ var require_websocket = __commonJS({
|
|
|
2236
2274
|
return;
|
|
2237
2275
|
if (this.readyState === WebSocket2.CONNECTING) {
|
|
2238
2276
|
const msg = "WebSocket was closed before the connection was established";
|
|
2239
|
-
|
|
2277
|
+
abortHandshake(this, this._req, msg);
|
|
2278
|
+
return;
|
|
2240
2279
|
}
|
|
2241
2280
|
if (this._socket) {
|
|
2242
2281
|
this._readyState = WebSocket2.CLOSING;
|
|
@@ -2352,17 +2391,17 @@ var require_websocket = __commonJS({
|
|
|
2352
2391
|
websocket._url = address;
|
|
2353
2392
|
}
|
|
2354
2393
|
const isSecure = parsedUrl.protocol === "wss:";
|
|
2355
|
-
const
|
|
2356
|
-
let
|
|
2357
|
-
if (parsedUrl.protocol !== "ws:" && !isSecure && !
|
|
2358
|
-
|
|
2359
|
-
} else if (
|
|
2360
|
-
|
|
2394
|
+
const isIpcUrl = parsedUrl.protocol === "ws+unix:";
|
|
2395
|
+
let invalidUrlMessage;
|
|
2396
|
+
if (parsedUrl.protocol !== "ws:" && !isSecure && !isIpcUrl) {
|
|
2397
|
+
invalidUrlMessage = `The URL's protocol must be one of "ws:", "wss:", or "ws+unix:"`;
|
|
2398
|
+
} else if (isIpcUrl && !parsedUrl.pathname) {
|
|
2399
|
+
invalidUrlMessage = "The URL's pathname is empty";
|
|
2361
2400
|
} else if (parsedUrl.hash) {
|
|
2362
|
-
|
|
2401
|
+
invalidUrlMessage = "The URL contains a fragment identifier";
|
|
2363
2402
|
}
|
|
2364
|
-
if (
|
|
2365
|
-
const err = new SyntaxError(
|
|
2403
|
+
if (invalidUrlMessage) {
|
|
2404
|
+
const err = new SyntaxError(invalidUrlMessage);
|
|
2366
2405
|
if (websocket._redirects === 0) {
|
|
2367
2406
|
throw err;
|
|
2368
2407
|
} else {
|
|
@@ -2418,7 +2457,7 @@ var require_websocket = __commonJS({
|
|
|
2418
2457
|
if (parsedUrl.username || parsedUrl.password) {
|
|
2419
2458
|
opts.auth = `${parsedUrl.username}:${parsedUrl.password}`;
|
|
2420
2459
|
}
|
|
2421
|
-
if (
|
|
2460
|
+
if (isIpcUrl) {
|
|
2422
2461
|
const parts = opts.path.split(":");
|
|
2423
2462
|
opts.socketPath = parts[0];
|
|
2424
2463
|
opts.path = parts[1];
|
|
@@ -2426,9 +2465,9 @@ var require_websocket = __commonJS({
|
|
|
2426
2465
|
let req;
|
|
2427
2466
|
if (opts.followRedirects) {
|
|
2428
2467
|
if (websocket._redirects === 0) {
|
|
2429
|
-
websocket.
|
|
2468
|
+
websocket._originalIpc = isIpcUrl;
|
|
2430
2469
|
websocket._originalSecure = isSecure;
|
|
2431
|
-
websocket._originalHostOrSocketPath =
|
|
2470
|
+
websocket._originalHostOrSocketPath = isIpcUrl ? opts.socketPath : parsedUrl.host;
|
|
2432
2471
|
const headers = options && options.headers;
|
|
2433
2472
|
options = __spreadProps(__spreadValues({}, options), { headers: {} });
|
|
2434
2473
|
if (headers) {
|
|
@@ -2437,7 +2476,7 @@ var require_websocket = __commonJS({
|
|
|
2437
2476
|
}
|
|
2438
2477
|
}
|
|
2439
2478
|
} else if (websocket.listenerCount("redirect") === 0) {
|
|
2440
|
-
const isSameHost =
|
|
2479
|
+
const isSameHost = isIpcUrl ? websocket._originalIpc ? opts.socketPath === websocket._originalHostOrSocketPath : false : websocket._originalIpc ? false : parsedUrl.host === websocket._originalHostOrSocketPath;
|
|
2441
2480
|
if (!isSameHost || websocket._originalSecure && !isSecure) {
|
|
2442
2481
|
delete opts.headers.authorization;
|
|
2443
2482
|
delete opts.headers.cookie;
|
|
@@ -2607,7 +2646,7 @@ var require_websocket = __commonJS({
|
|
|
2607
2646
|
const err = new Error(
|
|
2608
2647
|
`WebSocket is not open: readyState ${websocket.readyState} (${readyStates[websocket.readyState]})`
|
|
2609
2648
|
);
|
|
2610
|
-
cb
|
|
2649
|
+
process.nextTick(cb, err);
|
|
2611
2650
|
}
|
|
2612
2651
|
}
|
|
2613
2652
|
function receiverOnConclude(code, reason) {
|
|
@@ -6162,7 +6201,7 @@ var require_validate2 = __commonJS({
|
|
|
6162
6201
|
strictTypesError(it, `type "${t}" not allowed by context "${it.dataTypes.join(",")}"`);
|
|
6163
6202
|
}
|
|
6164
6203
|
});
|
|
6165
|
-
it
|
|
6204
|
+
narrowSchemaTypes(it, types);
|
|
6166
6205
|
}
|
|
6167
6206
|
function checkMultipleTypes(it, ts) {
|
|
6168
6207
|
if (ts.length > 1 && !(ts.length === 2 && ts.includes("null"))) {
|
|
@@ -6187,6 +6226,16 @@ var require_validate2 = __commonJS({
|
|
|
6187
6226
|
function includesType(ts, t) {
|
|
6188
6227
|
return ts.includes(t) || t === "integer" && ts.includes("number");
|
|
6189
6228
|
}
|
|
6229
|
+
function narrowSchemaTypes(it, withTypes) {
|
|
6230
|
+
const ts = [];
|
|
6231
|
+
for (const t of it.dataTypes) {
|
|
6232
|
+
if (includesType(withTypes, t))
|
|
6233
|
+
ts.push(t);
|
|
6234
|
+
else if (withTypes.includes("integer") && t === "number")
|
|
6235
|
+
ts.push("integer");
|
|
6236
|
+
}
|
|
6237
|
+
it.dataTypes = ts;
|
|
6238
|
+
}
|
|
6190
6239
|
function strictTypesError(it, msg) {
|
|
6191
6240
|
const schemaPath = it.schemaEnv.baseId + it.errSchemaPath;
|
|
6192
6241
|
msg += ` at "${schemaPath}" (strictTypes)`;
|
|
@@ -10272,7 +10321,7 @@ var require_ajv = __commonJS({
|
|
|
10272
10321
|
"node_modules/ajv/dist/ajv.js"(exports, module2) {
|
|
10273
10322
|
"use strict";
|
|
10274
10323
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10275
|
-
exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;
|
|
10324
|
+
exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;
|
|
10276
10325
|
var core_1 = require_core();
|
|
10277
10326
|
var draft7_1 = require_draft7();
|
|
10278
10327
|
var discriminator_1 = require_discriminator();
|
|
@@ -10324,6 +10373,14 @@ var require_ajv = __commonJS({
|
|
|
10324
10373
|
Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function() {
|
|
10325
10374
|
return codegen_1.CodeGen;
|
|
10326
10375
|
} });
|
|
10376
|
+
var validation_error_1 = require_validation_error();
|
|
10377
|
+
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function() {
|
|
10378
|
+
return validation_error_1.default;
|
|
10379
|
+
} });
|
|
10380
|
+
var ref_error_1 = require_ref_error();
|
|
10381
|
+
Object.defineProperty(exports, "MissingRefError", { enumerable: true, get: function() {
|
|
10382
|
+
return ref_error_1.default;
|
|
10383
|
+
} });
|
|
10327
10384
|
}
|
|
10328
10385
|
});
|
|
10329
10386
|
|
|
@@ -19988,15 +20045,20 @@ var update_transfer_group_schema_input_default = {
|
|
|
19988
20045
|
},
|
|
19989
20046
|
{
|
|
19990
20047
|
$ref: "#/definitions/update_transfer_group_fn_transfer_status"
|
|
20048
|
+
},
|
|
20049
|
+
{
|
|
20050
|
+
$ref: "#/definitions/update_transfer_group_fn_metadata"
|
|
19991
20051
|
}
|
|
19992
20052
|
],
|
|
19993
20053
|
definitions: {
|
|
19994
20054
|
update_transfer_group_fn_options: {
|
|
19995
20055
|
$comment: "Using allOf so that references dont break",
|
|
19996
20056
|
type: "object",
|
|
19997
|
-
allOf: [
|
|
19998
|
-
|
|
19999
|
-
|
|
20057
|
+
allOf: [
|
|
20058
|
+
{
|
|
20059
|
+
$ref: "/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"
|
|
20060
|
+
}
|
|
20061
|
+
]
|
|
20000
20062
|
},
|
|
20001
20063
|
update_transfer_group_fn_status: {
|
|
20002
20064
|
type: "object",
|
|
@@ -20013,6 +20075,10 @@ var update_transfer_group_schema_input_default = {
|
|
|
20013
20075
|
description: "Status all the transfers should be set at.",
|
|
20014
20076
|
$ref: "/db/consts.schema.json#/definitions/TransferStatus"
|
|
20015
20077
|
},
|
|
20078
|
+
metadata: {
|
|
20079
|
+
description: "Key value object to be replaced or extended with existing TransferGroup metadata",
|
|
20080
|
+
$ref: "/db/transfer/transfer.schema.json#/properties/metadata"
|
|
20081
|
+
},
|
|
20016
20082
|
options: {
|
|
20017
20083
|
$ref: "#/definitions/update_transfer_group_fn_options"
|
|
20018
20084
|
}
|
|
@@ -20024,7 +20090,7 @@ var update_transfer_group_schema_input_default = {
|
|
|
20024
20090
|
type: "object",
|
|
20025
20091
|
properties: {
|
|
20026
20092
|
transfer_group: {
|
|
20027
|
-
description: "identifier of the transfer group to
|
|
20093
|
+
description: "identifier of the transfer group to update",
|
|
20028
20094
|
type: ["string", "number"]
|
|
20029
20095
|
},
|
|
20030
20096
|
status: {
|
|
@@ -20035,12 +20101,42 @@ var update_transfer_group_schema_input_default = {
|
|
|
20035
20101
|
description: "Status all the transfers should be set at.",
|
|
20036
20102
|
$ref: "/db/consts.schema.json#/definitions/TransferStatus"
|
|
20037
20103
|
},
|
|
20104
|
+
metadata: {
|
|
20105
|
+
description: "Key value object to be replaced or extended with existing TransferGroup metadata",
|
|
20106
|
+
$ref: "/db/transfer/transfer.schema.json#/properties/metadata"
|
|
20107
|
+
},
|
|
20038
20108
|
options: {
|
|
20039
20109
|
$ref: "#/definitions/update_transfer_group_fn_options"
|
|
20040
20110
|
}
|
|
20041
20111
|
},
|
|
20042
20112
|
required: ["transfer_group", "transfer_status"],
|
|
20043
20113
|
$typescript: '{"additionalProperties": false}'
|
|
20114
|
+
},
|
|
20115
|
+
update_transfer_group_fn_metadata: {
|
|
20116
|
+
type: "object",
|
|
20117
|
+
properties: {
|
|
20118
|
+
transfer_group: {
|
|
20119
|
+
description: "identifier of the transfer group to update",
|
|
20120
|
+
type: ["string", "number"]
|
|
20121
|
+
},
|
|
20122
|
+
status: {
|
|
20123
|
+
description: "Lifecycle status of the TransferGroup",
|
|
20124
|
+
$ref: "/db/consts.schema.json#/definitions/TransferGroupStatus"
|
|
20125
|
+
},
|
|
20126
|
+
transfer_status: {
|
|
20127
|
+
description: "Status all the transfers should be set at.",
|
|
20128
|
+
$ref: "/db/consts.schema.json#/definitions/TransferStatus"
|
|
20129
|
+
},
|
|
20130
|
+
metadata: {
|
|
20131
|
+
description: "Key value object to be replaced or extended with existing TransferGroup metadata",
|
|
20132
|
+
$ref: "/db/transfer/transfer.schema.json#/properties/metadata"
|
|
20133
|
+
},
|
|
20134
|
+
options: {
|
|
20135
|
+
$ref: "#/definitions/update_transfer_group_fn_options"
|
|
20136
|
+
}
|
|
20137
|
+
},
|
|
20138
|
+
required: ["transfer_group", "metadata"],
|
|
20139
|
+
$typescript: '{"additionalProperties": false}'
|
|
20044
20140
|
}
|
|
20045
20141
|
}
|
|
20046
20142
|
};
|
|
@@ -27023,7 +27119,8 @@ var update_transfer_group_schema_input_default2 = {
|
|
|
27023
27119
|
update_transfer_group_data: {
|
|
27024
27120
|
anyOf: [
|
|
27025
27121
|
{ $ref: "#/definitions/update_transfer_group_status" },
|
|
27026
|
-
{ $ref: "#/definitions/update_transfer_group_transfer_status" }
|
|
27122
|
+
{ $ref: "#/definitions/update_transfer_group_transfer_status" },
|
|
27123
|
+
{ $ref: "#/definitions/update_transfer_group_metadata" }
|
|
27027
27124
|
]
|
|
27028
27125
|
},
|
|
27029
27126
|
update_transfer_group_status: {
|
|
@@ -27071,6 +27168,29 @@ var update_transfer_group_schema_input_default2 = {
|
|
|
27071
27168
|
},
|
|
27072
27169
|
required: ["transfer_status"],
|
|
27073
27170
|
additionalProperties: false
|
|
27171
|
+
},
|
|
27172
|
+
update_transfer_group_metadata: {
|
|
27173
|
+
type: "object",
|
|
27174
|
+
properties: {
|
|
27175
|
+
status: {
|
|
27176
|
+
description: "Lifecycle status of the TransferGroup",
|
|
27177
|
+
$ref: "/db/consts.schema.json#/definitions/TransferGroupStatus"
|
|
27178
|
+
},
|
|
27179
|
+
transfer_status: {
|
|
27180
|
+
description: "Status all the transfers should be set at.",
|
|
27181
|
+
$ref: "/db/consts.schema.json#/definitions/TransferStatus"
|
|
27182
|
+
},
|
|
27183
|
+
metadata: {
|
|
27184
|
+
description: "Key value object to be replaced or extended with existing TransferGroup metadata",
|
|
27185
|
+
$ref: "/db/transfer/transfer.schema.json#/properties/metadata"
|
|
27186
|
+
},
|
|
27187
|
+
transfer_metadata: {
|
|
27188
|
+
description: "Key value object to be replaced or extended with existing Transfer metadata",
|
|
27189
|
+
$ref: "/db/transfer/transfer.schema.json#/properties/metadata"
|
|
27190
|
+
}
|
|
27191
|
+
},
|
|
27192
|
+
required: ["metadata"],
|
|
27193
|
+
additionalProperties: false
|
|
27074
27194
|
}
|
|
27075
27195
|
},
|
|
27076
27196
|
required: ["transfer_group"],
|
|
@@ -29994,7 +30114,7 @@ var BaseClient = class {
|
|
|
29994
30114
|
};
|
|
29995
30115
|
|
|
29996
30116
|
// package.json
|
|
29997
|
-
var version = "0.6.
|
|
30117
|
+
var version = "0.6.22";
|
|
29998
30118
|
|
|
29999
30119
|
// src/api/ws-client.ts
|
|
30000
30120
|
function createClient(opts) {
|
|
@@ -31454,9 +31574,7 @@ function findTransfers(options, input, fnOptions) {
|
|
|
31454
31574
|
);
|
|
31455
31575
|
}
|
|
31456
31576
|
if (returnRunningBalance) {
|
|
31457
|
-
findOptions.return_running_balance_for_wallet = getForeign(
|
|
31458
|
-
returnRunningBalance
|
|
31459
|
-
);
|
|
31577
|
+
findOptions.return_running_balance_for_wallet = getForeign(returnRunningBalance);
|
|
31460
31578
|
}
|
|
31461
31579
|
if (returnSigned) {
|
|
31462
31580
|
findOptions.return_signed_amount_for_wallet = getForeign(returnSigned);
|
|
@@ -32147,7 +32265,8 @@ function updateTransferGroup(options, input, fnOptions) {
|
|
|
32147
32265
|
transfer_group: getIdentifierFilter(inputCopy.transfer_group),
|
|
32148
32266
|
update: {
|
|
32149
32267
|
transfer_status: inputCopy.transfer_status,
|
|
32150
|
-
status: inputCopy.status
|
|
32268
|
+
status: inputCopy.status,
|
|
32269
|
+
metadata: inputCopy.metadata
|
|
32151
32270
|
},
|
|
32152
32271
|
options: inputCopy.options
|
|
32153
32272
|
});
|