wapi-client 0.9.0 → 0.9.2

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 (67) hide show
  1. package/dist/api/base-client.browser.cjs +12 -0
  2. package/dist/api/base-client.browser.js +13 -4
  3. package/dist/api/base-client.cjs +12 -0
  4. package/dist/api/base-client.d.ts +8 -0
  5. package/dist/api/base-client.js +13 -4
  6. package/dist/api/ws-client.cjs +1 -1
  7. package/dist/api/ws-client.d.ts +0 -1
  8. package/dist/api/ws-client.js +1 -1
  9. package/dist/client.browser.cjs +27 -0
  10. package/dist/client.browser.js +27 -0
  11. package/dist/client.cjs +28 -1
  12. package/dist/client.d.ts +26 -0
  13. package/dist/client.js +28 -1
  14. package/dist/fns/healthcheck/healthcheck.browser.cjs +56 -0
  15. package/dist/fns/healthcheck/healthcheck.browser.js +38 -0
  16. package/dist/fns/healthcheck/healthcheck.cjs +60 -0
  17. package/dist/fns/healthcheck/healthcheck.d.ts +9 -0
  18. package/dist/fns/healthcheck/healthcheck.enums.browser.cjs +17 -0
  19. package/dist/fns/healthcheck/healthcheck.enums.browser.js +0 -0
  20. package/dist/fns/healthcheck/healthcheck.enums.cjs +17 -0
  21. package/dist/fns/healthcheck/healthcheck.enums.d.ts +20 -0
  22. package/dist/fns/healthcheck/healthcheck.enums.js +0 -0
  23. package/dist/fns/healthcheck/healthcheck.guards.browser.cjs +36 -0
  24. package/dist/fns/healthcheck/healthcheck.guards.browser.js +16 -0
  25. package/dist/fns/healthcheck/healthcheck.guards.cjs +41 -0
  26. package/dist/fns/healthcheck/healthcheck.guards.d.ts +4 -0
  27. package/dist/fns/healthcheck/healthcheck.guards.js +16 -0
  28. package/dist/fns/healthcheck/healthcheck.js +38 -0
  29. package/dist/fns/healthcheck/healthcheck.schema.input.json +25 -0
  30. package/dist/fns/healthcheck/healthcheck.schema.output.json +8 -0
  31. package/dist/fns/import-data/import-data.cjs +22 -0
  32. package/dist/fns/import-data/import-data.js +22 -0
  33. package/dist/fns/import-data/import-data.node.browser.cjs +22 -0
  34. package/dist/fns/import-data/import-data.node.browser.js +22 -0
  35. package/dist/fns/import-data/import-data.node.cjs +22 -0
  36. package/dist/fns/import-data/import-data.node.js +22 -0
  37. package/dist/fns/index.browser.cjs +9 -0
  38. package/dist/fns/index.browser.js +9 -0
  39. package/dist/fns/index.cjs +12 -0
  40. package/dist/fns/index.d.ts +7 -1
  41. package/dist/fns/index.js +9 -0
  42. package/dist/lib/errors.d.ts +1 -1
  43. package/dist/lib/isomorphic/node/fetch.cjs +20 -17
  44. package/dist/lib/isomorphic/node/fetch.js +20 -17
  45. package/dist/lib/isomorphic/node/streams.d.ts +0 -2
  46. package/dist/lib/validator.browser.cjs +651 -960
  47. package/dist/lib/validator.browser.js +651 -960
  48. package/dist/lib/validator.cjs +41 -1
  49. package/dist/lib/validator.d.ts +5 -1
  50. package/dist/lib/validator.js +41 -1
  51. package/dist/lib/ws-types.d.ts +0 -1
  52. package/dist/txs/healthcheck/healthcheck.enums.browser.cjs +17 -0
  53. package/dist/txs/healthcheck/healthcheck.enums.browser.js +0 -0
  54. package/dist/txs/healthcheck/healthcheck.enums.cjs +17 -0
  55. package/dist/txs/healthcheck/healthcheck.enums.d.ts +22 -0
  56. package/dist/txs/healthcheck/healthcheck.enums.js +0 -0
  57. package/dist/txs/healthcheck/healthcheck.schema.input.json +23 -0
  58. package/dist/txs/healthcheck/healthcheck.schema.output.json +32 -0
  59. package/dist/txs/index.browser.cjs +7 -0
  60. package/dist/txs/index.browser.js +7 -0
  61. package/dist/txs/index.cjs +9 -0
  62. package/dist/txs/index.d.ts +5 -0
  63. package/dist/txs/index.js +7 -0
  64. package/dist/types/index.d.ts +119 -6
  65. package/dist/wapi-client-web.iife.js +6 -11
  66. package/dist/wapi-client.iife.js +6 -11
  67. package/package.json +7 -7
@@ -705,6 +705,18 @@ var BaseClient = class {
705
705
  input
706
706
  );
707
707
  }
708
+ /**
709
+ *
710
+ * @param {HealthcheckTxInput} input
711
+ * @returns {StreamPromise<HealthcheckTxOutput>}
712
+ *
713
+ */
714
+ healthcheck(input) {
715
+ return this._sendTransaction(
716
+ import_txs.APIFunctions.healthcheck,
717
+ input != null ? input : {}
718
+ );
719
+ }
708
720
  /**
709
721
  *
710
722
  * @param {ImportActionsTxInput} input
@@ -37,10 +37,7 @@ var __async = (__this, __arguments, generator) => {
37
37
 
38
38
  // src/api/base-client.ts
39
39
  import { debugLog } from "../lib/debug.browser.js";
40
- import {
41
- StreamError,
42
- ValidationError
43
- } from "../lib/errors.browser.js";
40
+ import { StreamError, ValidationError } from "../lib/errors.browser.js";
44
41
  import { StreamPromise } from "../lib/stream-promise.browser.js";
45
42
  import { StreamPromiseInput } from "../lib/stream-promise-input.browser.js";
46
43
  import {
@@ -695,6 +692,18 @@ var BaseClient = class {
695
692
  input
696
693
  );
697
694
  }
695
+ /**
696
+ *
697
+ * @param {HealthcheckTxInput} input
698
+ * @returns {StreamPromise<HealthcheckTxOutput>}
699
+ *
700
+ */
701
+ healthcheck(input) {
702
+ return this._sendTransaction(
703
+ APIFunctions.healthcheck,
704
+ input != null ? input : {}
705
+ );
706
+ }
698
707
  /**
699
708
  *
700
709
  * @param {ImportActionsTxInput} input
@@ -705,6 +705,18 @@ var BaseClient = class {
705
705
  input
706
706
  );
707
707
  }
708
+ /**
709
+ *
710
+ * @param {HealthcheckTxInput} input
711
+ * @returns {StreamPromise<HealthcheckTxOutput>}
712
+ *
713
+ */
714
+ healthcheck(input) {
715
+ return this._sendTransaction(
716
+ import_txs.APIFunctions.healthcheck,
717
+ input != null ? input : {}
718
+ );
719
+ }
708
720
  /**
709
721
  *
710
722
  * @param {ImportActionsTxInput} input
@@ -36,6 +36,7 @@ import { GetTransferGroupTxInput, GetTransferGroupTxOutput } from '../txs/get-tr
36
36
  import { GetTransferTxInput, GetTransferTxOutput } from '../txs/get-transfer/get-transfer.enums';
37
37
  import { GetWalletManyTxInput, GetWalletManyTxOutput } from '../txs/get-wallet-many/get-wallet-many.enums';
38
38
  import { GetWalletTxInput, GetWalletTxOutput } from '../txs/get-wallet/get-wallet.enums';
39
+ import { HealthcheckTxInput, HealthcheckTxOutput } from '../txs/healthcheck/healthcheck.enums';
39
40
  import { ImportActionsTxInput, ImportActionsTxOutput, ImportActionsTxOptions } from '../txs/import-actions/import-actions.enums';
40
41
  import { ImportDatabaseTxInput, ImportDatabaseTxOutput } from '../txs/import-database/import-database.enums';
41
42
  import { ListDatabaseExportsTxInput, ListDatabaseExportsTxOutput } from '../txs/list-database-exports/list-database-exports.enums';
@@ -302,6 +303,13 @@ export declare class BaseClient {
302
303
  *
303
304
  */
304
305
  getWalletMany(input: GetWalletManyTxInput): StreamPromise<GetWalletManyTxOutput>;
306
+ /**
307
+ *
308
+ * @param {HealthcheckTxInput} input
309
+ * @returns {StreamPromise<HealthcheckTxOutput>}
310
+ *
311
+ */
312
+ healthcheck(input?: HealthcheckTxInput): StreamPromise<HealthcheckTxOutput>;
305
313
  /**
306
314
  *
307
315
  * @param {ImportActionsTxInput} input
@@ -37,10 +37,7 @@ var __async = (__this, __arguments, generator) => {
37
37
 
38
38
  // src/api/base-client.ts
39
39
  import { debugLog } from "../lib/debug";
40
- import {
41
- StreamError,
42
- ValidationError
43
- } from "../lib/errors";
40
+ import { StreamError, ValidationError } from "../lib/errors";
44
41
  import { StreamPromise } from "../lib/stream-promise";
45
42
  import { StreamPromiseInput } from "../lib/stream-promise-input";
46
43
  import {
@@ -695,6 +692,18 @@ var BaseClient = class {
695
692
  input
696
693
  );
697
694
  }
695
+ /**
696
+ *
697
+ * @param {HealthcheckTxInput} input
698
+ * @returns {StreamPromise<HealthcheckTxOutput>}
699
+ *
700
+ */
701
+ healthcheck(input) {
702
+ return this._sendTransaction(
703
+ APIFunctions.healthcheck,
704
+ input != null ? input : {}
705
+ );
706
+ }
698
707
  /**
699
708
  *
700
709
  * @param {ImportActionsTxInput} input
@@ -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.0') != null ? _a : "";
64
+ var CLIENT_VERSION = (_a = '0.9.2') != null ? _a : "";
65
65
  function createWsClient(opts) {
66
66
  const initialConnection = createConnection(opts);
67
67
  return new WsClient(initialConnection, opts);
@@ -1,4 +1,3 @@
1
- /// <reference types="ws" />
2
1
  import WebSocket from 'modern-isomorphic-ws';
3
2
  import { AuthenticationError } from '../lib/errors';
4
3
  import { BaseClient, ISocketId } from './base-client';
@@ -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.0') != null ? _a : "";
34
+ var CLIENT_VERSION = (_a = '0.9.2') != null ? _a : "";
35
35
  function createWsClient(opts) {
36
36
  const initialConnection = createConnection(opts);
37
37
  return new WsClient(initialConnection, opts);
@@ -1112,6 +1112,33 @@ var Client = class {
1112
1112
  getWallet(input, options) {
1113
1113
  return import_fns.ClientFunctions.getWallet({ client: this }, input, options);
1114
1114
  }
1115
+ /**
1116
+ *
1117
+ * Get health information about service
1118
+ *
1119
+ * ```javascript
1120
+ *
1121
+ * const result = await wapiClient.healthcheck({
1122
+ * }, {
1123
+ * tracking_id: 'mylogId',
1124
+ * });
1125
+ * expect(result).toEqual({
1126
+ * status: 'green',
1127
+ * database_size: '3240MB',
1128
+ * indexes_size: '1234MB',
1129
+ * connection_count: 1,
1130
+ * });
1131
+ *
1132
+ * ```
1133
+ *
1134
+ * @param {HealthcheckFnInput} input
1135
+ * @param {HealthcheckFnOptions} [options]
1136
+ * @returns {StreamPromise<HealthcheckFnOutput>}
1137
+ *
1138
+ */
1139
+ healthcheck(input, options) {
1140
+ return import_fns.ClientFunctions.healthcheck({ client: this }, input != null ? input : {}, options);
1141
+ }
1115
1142
  importData(input, options) {
1116
1143
  if (input === void 0 && options === void 0) {
1117
1144
  return import_fns.ClientFunctions.importData({ client: this });
@@ -1096,6 +1096,33 @@ var Client = class {
1096
1096
  getWallet(input, options) {
1097
1097
  return ClientFunctions.getWallet({ client: this }, input, options);
1098
1098
  }
1099
+ /**
1100
+ *
1101
+ * Get health information about service
1102
+ *
1103
+ * ```javascript
1104
+ *
1105
+ * const result = await wapiClient.healthcheck({
1106
+ * }, {
1107
+ * tracking_id: 'mylogId',
1108
+ * });
1109
+ * expect(result).toEqual({
1110
+ * status: 'green',
1111
+ * database_size: '3240MB',
1112
+ * indexes_size: '1234MB',
1113
+ * connection_count: 1,
1114
+ * });
1115
+ *
1116
+ * ```
1117
+ *
1118
+ * @param {HealthcheckFnInput} input
1119
+ * @param {HealthcheckFnOptions} [options]
1120
+ * @returns {StreamPromise<HealthcheckFnOutput>}
1121
+ *
1122
+ */
1123
+ healthcheck(input, options) {
1124
+ return ClientFunctions.healthcheck({ client: this }, input != null ? input : {}, options);
1125
+ }
1099
1126
  importData(input, options) {
1100
1127
  if (input === void 0 && options === void 0) {
1101
1128
  return ClientFunctions.importData({ client: this });
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.0') != null ? _a : "";
69
+ var CLIENT_VERSION = (_a = '0.9.2') != null ? _a : "";
70
70
  var Client = class {
71
71
  /**
72
72
  * @internal
@@ -1112,6 +1112,33 @@ var Client = class {
1112
1112
  getWallet(input, options) {
1113
1113
  return import_fns.ClientFunctions.getWallet({ client: this }, input, options);
1114
1114
  }
1115
+ /**
1116
+ *
1117
+ * Get health information about service
1118
+ *
1119
+ * ```javascript
1120
+ *
1121
+ * const result = await wapiClient.healthcheck({
1122
+ * }, {
1123
+ * tracking_id: 'mylogId',
1124
+ * });
1125
+ * expect(result).toEqual({
1126
+ * status: 'green',
1127
+ * database_size: '3240MB',
1128
+ * indexes_size: '1234MB',
1129
+ * connection_count: 1,
1130
+ * });
1131
+ *
1132
+ * ```
1133
+ *
1134
+ * @param {HealthcheckFnInput} input
1135
+ * @param {HealthcheckFnOptions} [options]
1136
+ * @returns {StreamPromise<HealthcheckFnOutput>}
1137
+ *
1138
+ */
1139
+ healthcheck(input, options) {
1140
+ return import_fns.ClientFunctions.healthcheck({ client: this }, input != null ? input : {}, options);
1141
+ }
1115
1142
  importData(input, options) {
1116
1143
  if (input === void 0 && options === void 0) {
1117
1144
  return import_fns.ClientFunctions.importData({ client: this });
package/dist/client.d.ts CHANGED
@@ -33,6 +33,7 @@ import { GetTokenFnInput, GetTokenFnOptions, GetTokenFnOutput } from './fns/get-
33
33
  import { GetTransferGroupFnInput, GetTransferGroupFnOptions, GetTransferGroupFnOutput } from './fns/get-transfer-group/get-transfer-group.enums';
34
34
  import { GetTransferFnInput, GetTransferFnOptions, GetTransferFnOutput } from './fns/get-transfer/get-transfer.enums';
35
35
  import { GetWalletFnInput, GetWalletFnOptions, GetWalletFnOutput } from './fns/get-wallet/get-wallet.enums';
36
+ import { HealthcheckFnInput, HealthcheckFnOptions, HealthcheckFnOutput } from './fns/healthcheck/healthcheck.enums';
36
37
  import { ImportDataFnOptions, ImportDataFnOutput, ImportDataFnStreamChunk, ImportDataFnInput } from './fns/import-data/import-data.enums';
37
38
  import { ReverseTransferGroupFnInput, ReverseTransferGroupFnOptions, ReverseTransferGroupFnOutput } from './fns/reverse-transfer-group/reverse-transfer-group.enums';
38
39
  import { ReverseTransferFnInput, ReverseTransferFnOptions, ReverseTransferFnOutput } from './fns/reverse-transfer/reverse-transfer.enums';
@@ -1272,6 +1273,31 @@ export declare class Client {
1272
1273
  *
1273
1274
  */
1274
1275
  getWallet(input: GetWalletFnInput, options?: GetWalletFnOptions): StreamPromise<GetWalletFnOutput>;
1276
+ /**
1277
+ *
1278
+ * Get health information about service
1279
+ *
1280
+ * ```javascript
1281
+ *
1282
+ * const result = await wapiClient.healthcheck({
1283
+ * }, {
1284
+ * tracking_id: 'mylogId',
1285
+ * });
1286
+ * expect(result).toEqual({
1287
+ * status: 'green',
1288
+ * database_size: '3240MB',
1289
+ * indexes_size: '1234MB',
1290
+ * connection_count: 1,
1291
+ * });
1292
+ *
1293
+ * ```
1294
+ *
1295
+ * @param {HealthcheckFnInput} input
1296
+ * @param {HealthcheckFnOptions} [options]
1297
+ * @returns {StreamPromise<HealthcheckFnOutput>}
1298
+ *
1299
+ */
1300
+ healthcheck(input?: HealthcheckFnInput, options?: HealthcheckFnOptions): StreamPromise<HealthcheckFnOutput>;
1275
1301
  /**
1276
1302
  *
1277
1303
  *
package/dist/client.js CHANGED
@@ -50,7 +50,7 @@ import {
50
50
  isImportDataFnInput
51
51
  } from "./fns/import-data/import-data.guards";
52
52
  var _a;
53
- var CLIENT_VERSION = (_a = '0.9.0') != null ? _a : "";
53
+ var CLIENT_VERSION = (_a = '0.9.2') != null ? _a : "";
54
54
  var Client = class {
55
55
  /**
56
56
  * @internal
@@ -1096,6 +1096,33 @@ var Client = class {
1096
1096
  getWallet(input, options) {
1097
1097
  return ClientFunctions.getWallet({ client: this }, input, options);
1098
1098
  }
1099
+ /**
1100
+ *
1101
+ * Get health information about service
1102
+ *
1103
+ * ```javascript
1104
+ *
1105
+ * const result = await wapiClient.healthcheck({
1106
+ * }, {
1107
+ * tracking_id: 'mylogId',
1108
+ * });
1109
+ * expect(result).toEqual({
1110
+ * status: 'green',
1111
+ * database_size: '3240MB',
1112
+ * indexes_size: '1234MB',
1113
+ * connection_count: 1,
1114
+ * });
1115
+ *
1116
+ * ```
1117
+ *
1118
+ * @param {HealthcheckFnInput} input
1119
+ * @param {HealthcheckFnOptions} [options]
1120
+ * @returns {StreamPromise<HealthcheckFnOutput>}
1121
+ *
1122
+ */
1123
+ healthcheck(input, options) {
1124
+ return ClientFunctions.healthcheck({ client: this }, input != null ? input : {}, options);
1125
+ }
1099
1126
  importData(input, options) {
1100
1127
  if (input === void 0 && options === void 0) {
1101
1128
  return ClientFunctions.importData({ client: this });
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
+ var __spreadValues = (a, b) => {
10
+ for (var prop in b || (b = {}))
11
+ if (__hasOwnProp.call(b, prop))
12
+ __defNormalProp(a, prop, b[prop]);
13
+ if (__getOwnPropSymbols)
14
+ for (var prop of __getOwnPropSymbols(b)) {
15
+ if (__propIsEnum.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ }
18
+ return a;
19
+ };
20
+ var __export = (target, all) => {
21
+ for (var name in all)
22
+ __defProp(target, name, { get: all[name], enumerable: true });
23
+ };
24
+ var __copyProps = (to, from, except, desc) => {
25
+ if (from && typeof from === "object" || typeof from === "function") {
26
+ for (let key of __getOwnPropNames(from))
27
+ if (!__hasOwnProp.call(to, key) && key !== except)
28
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
29
+ }
30
+ return to;
31
+ };
32
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
33
+
34
+ // src/fns/healthcheck/healthcheck.ts
35
+ var healthcheck_exports = {};
36
+ __export(healthcheck_exports, {
37
+ healthcheck: () => healthcheck
38
+ });
39
+ module.exports = __toCommonJS(healthcheck_exports);
40
+ var import_utils = require('../../lib/utils.cjs');
41
+ var import_validator = require('../../lib/validator.cjs');
42
+ var validate = (0, import_validator.getValidator)(import_validator.SchemaNames.HealthcheckFnInput);
43
+ function healthcheck(options, input, fnOptions) {
44
+ const { client } = options;
45
+ const { inputCopy, error } = (0, import_utils.validateClientFnInput)({
46
+ input,
47
+ options: fnOptions,
48
+ validate
49
+ });
50
+ if (error) {
51
+ throw error;
52
+ }
53
+ return client.api.healthcheck({
54
+ options: __spreadValues(__spreadValues({}, inputCopy.options), fnOptions)
55
+ });
56
+ }
@@ -0,0 +1,38 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
4
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __spreadValues = (a, b) => {
7
+ for (var prop in b || (b = {}))
8
+ if (__hasOwnProp.call(b, prop))
9
+ __defNormalProp(a, prop, b[prop]);
10
+ if (__getOwnPropSymbols)
11
+ for (var prop of __getOwnPropSymbols(b)) {
12
+ if (__propIsEnum.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ }
15
+ return a;
16
+ };
17
+
18
+ // src/fns/healthcheck/healthcheck.ts
19
+ import { validateClientFnInput } from "../../lib/utils.browser.js";
20
+ import { getValidator, SchemaNames } from "../../lib/validator.browser.js";
21
+ var validate = getValidator(SchemaNames.HealthcheckFnInput);
22
+ function healthcheck(options, input, fnOptions) {
23
+ const { client } = options;
24
+ const { inputCopy, error } = validateClientFnInput({
25
+ input,
26
+ options: fnOptions,
27
+ validate
28
+ });
29
+ if (error) {
30
+ throw error;
31
+ }
32
+ return client.api.healthcheck({
33
+ options: __spreadValues(__spreadValues({}, inputCopy.options), fnOptions)
34
+ });
35
+ }
36
+ export {
37
+ healthcheck
38
+ };
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
+ var __spreadValues = (a, b) => {
10
+ for (var prop in b || (b = {}))
11
+ if (__hasOwnProp.call(b, prop))
12
+ __defNormalProp(a, prop, b[prop]);
13
+ if (__getOwnPropSymbols)
14
+ for (var prop of __getOwnPropSymbols(b)) {
15
+ if (__propIsEnum.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ }
18
+ return a;
19
+ };
20
+ var __export = (target, all) => {
21
+ for (var name in all)
22
+ __defProp(target, name, { get: all[name], enumerable: true });
23
+ };
24
+ var __copyProps = (to, from, except, desc) => {
25
+ if (from && typeof from === "object" || typeof from === "function") {
26
+ for (let key of __getOwnPropNames(from))
27
+ if (!__hasOwnProp.call(to, key) && key !== except)
28
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
29
+ }
30
+ return to;
31
+ };
32
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
33
+
34
+ // src/fns/healthcheck/healthcheck.ts
35
+ var healthcheck_exports = {};
36
+ __export(healthcheck_exports, {
37
+ healthcheck: () => healthcheck
38
+ });
39
+ module.exports = __toCommonJS(healthcheck_exports);
40
+ var import_utils = require('../../lib/utils.cjs');
41
+ var import_validator = require('../../lib/validator.cjs');
42
+ var validate = (0, import_validator.getValidator)(import_validator.SchemaNames.HealthcheckFnInput);
43
+ function healthcheck(options, input, fnOptions) {
44
+ const { client } = options;
45
+ const { inputCopy, error } = (0, import_utils.validateClientFnInput)({
46
+ input,
47
+ options: fnOptions,
48
+ validate
49
+ });
50
+ if (error) {
51
+ throw error;
52
+ }
53
+ return client.api.healthcheck({
54
+ options: __spreadValues(__spreadValues({}, inputCopy.options), fnOptions)
55
+ });
56
+ }
57
+ // Annotate the CommonJS export names for ESM import in node:
58
+ 0 && (module.exports = {
59
+ healthcheck
60
+ });
@@ -0,0 +1,9 @@
1
+ import { ClientFunctionOptions } from '../fn-consts.enums';
2
+ import { StreamPromise } from '../../lib/stream-promise';
3
+ import { HealthcheckFnInput, HealthcheckFnOptions, HealthcheckFnOutput } from './healthcheck.enums';
4
+ /**
5
+ * @internal
6
+ *
7
+ * Get information about wallet
8
+ */
9
+ export declare function healthcheck(options: ClientFunctionOptions, input: HealthcheckFnInput, fnOptions?: HealthcheckFnOptions): StreamPromise<HealthcheckFnOutput>;
@@ -0,0 +1,17 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+
15
+ // src/fns/healthcheck/healthcheck.enums.ts
16
+ var healthcheck_enums_exports = {};
17
+ module.exports = __toCommonJS(healthcheck_enums_exports);
@@ -0,0 +1,17 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+
15
+ // src/fns/healthcheck/healthcheck.enums.ts
16
+ var healthcheck_enums_exports = {};
17
+ module.exports = __toCommonJS(healthcheck_enums_exports);
@@ -0,0 +1,20 @@
1
+ import { HealthcheckTxOptions, HealthcheckTxOutput } from '../../txs/healthcheck/healthcheck.enums';
2
+ /**
3
+ * Optional flags for input
4
+ */
5
+ export type HealthcheckFnOptions = HealthcheckTxOptions;
6
+ /**
7
+ * Input for healthcheck
8
+ *
9
+ * @category Input
10
+ */
11
+ export interface HealthcheckFnInput {
12
+ options?: HealthcheckFnOptions;
13
+ }
14
+ /**
15
+ * Output of healthcheck
16
+ *
17
+ * @category Output
18
+ */
19
+ export interface HealthcheckFnOutput extends HealthcheckTxOutput {
20
+ }
File without changes
@@ -0,0 +1,36 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/fns/healthcheck/healthcheck.guards.ts
20
+ var healthcheck_guards_exports = {};
21
+ __export(healthcheck_guards_exports, {
22
+ isHealthcheckFnInput: () => isHealthcheckFnInput,
23
+ isHealthcheckFnOutput: () => isHealthcheckFnOutput
24
+ });
25
+ module.exports = __toCommonJS(healthcheck_guards_exports);
26
+ var import_validator = require('../../lib/validator.cjs');
27
+ var inputValidator = (0, import_validator.getValidator)(import_validator.SchemaNames.HealthcheckFnInput);
28
+ function isHealthcheckFnInput(input) {
29
+ const { error } = inputValidator(input);
30
+ return error === void 0;
31
+ }
32
+ var outputValidator = (0, import_validator.getValidator)(import_validator.SchemaNames.HealthcheckFnOutput);
33
+ function isHealthcheckFnOutput(input) {
34
+ const { error } = outputValidator(input);
35
+ return error === void 0;
36
+ }
@@ -0,0 +1,16 @@
1
+ // src/fns/healthcheck/healthcheck.guards.ts
2
+ import { getValidator, SchemaNames } from "../../lib/validator.browser.js";
3
+ var inputValidator = getValidator(SchemaNames.HealthcheckFnInput);
4
+ function isHealthcheckFnInput(input) {
5
+ const { error } = inputValidator(input);
6
+ return error === void 0;
7
+ }
8
+ var outputValidator = getValidator(SchemaNames.HealthcheckFnOutput);
9
+ function isHealthcheckFnOutput(input) {
10
+ const { error } = outputValidator(input);
11
+ return error === void 0;
12
+ }
13
+ export {
14
+ isHealthcheckFnInput,
15
+ isHealthcheckFnOutput
16
+ };