wapi-client 0.12.0-beta.2 → 0.12.0-beta.3

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 (64) hide show
  1. package/dist/api/ws-client.cjs +1 -1
  2. package/dist/api/ws-client.js +1 -1
  3. package/dist/client.cjs +1 -1
  4. package/dist/client.js +1 -1
  5. package/dist/db/consts.browser.cjs +2 -0
  6. package/dist/db/consts.browser.js +2 -0
  7. package/dist/db/consts.cjs +2 -0
  8. package/dist/db/consts.d.ts +1 -1
  9. package/dist/db/consts.js +2 -0
  10. package/dist/fns/consts.enums.d.ts +2 -1
  11. package/dist/fns/export-tokens/export-tokens.browser.cjs +1 -23
  12. package/dist/fns/export-tokens/export-tokens.browser.js +2 -27
  13. package/dist/fns/export-tokens/export-tokens.cjs +1 -23
  14. package/dist/fns/export-tokens/export-tokens.js +2 -27
  15. package/dist/fns/export-transfer-groups/export-transfer-groups.browser.cjs +2 -24
  16. package/dist/fns/export-transfer-groups/export-transfer-groups.browser.js +3 -28
  17. package/dist/fns/export-transfer-groups/export-transfer-groups.cjs +2 -24
  18. package/dist/fns/export-transfer-groups/export-transfer-groups.js +3 -28
  19. package/dist/fns/export-transfers/export-transfers.browser.cjs +2 -23
  20. package/dist/fns/export-transfers/export-transfers.browser.js +3 -27
  21. package/dist/fns/export-transfers/export-transfers.cjs +2 -23
  22. package/dist/fns/export-transfers/export-transfers.js +3 -27
  23. package/dist/fns/export-wallets/export-wallets.browser.cjs +15 -7
  24. package/dist/fns/export-wallets/export-wallets.browser.js +17 -8
  25. package/dist/fns/export-wallets/export-wallets.cjs +15 -7
  26. package/dist/fns/export-wallets/export-wallets.js +17 -8
  27. package/dist/fns/find-balances/find-balances.browser.cjs +1 -23
  28. package/dist/fns/find-balances/find-balances.browser.js +2 -27
  29. package/dist/fns/find-balances/find-balances.cjs +1 -23
  30. package/dist/fns/find-balances/find-balances.js +2 -27
  31. package/dist/fns/find-tokens/find-tokens.browser.cjs +1 -23
  32. package/dist/fns/find-tokens/find-tokens.browser.js +2 -27
  33. package/dist/fns/find-tokens/find-tokens.cjs +1 -23
  34. package/dist/fns/find-tokens/find-tokens.js +2 -27
  35. package/dist/fns/find-transfer-groups/find-transfer-groups.browser.cjs +1 -23
  36. package/dist/fns/find-transfer-groups/find-transfer-groups.browser.js +2 -27
  37. package/dist/fns/find-transfer-groups/find-transfer-groups.cjs +1 -23
  38. package/dist/fns/find-transfer-groups/find-transfer-groups.js +2 -27
  39. package/dist/fns/find-transfers/find-transfers.browser.cjs +28 -18
  40. package/dist/fns/find-transfers/find-transfers.browser.js +29 -19
  41. package/dist/fns/find-transfers/find-transfers.cjs +28 -18
  42. package/dist/fns/find-transfers/find-transfers.js +29 -19
  43. package/dist/fns/find-wallets/find-wallets.browser.cjs +14 -6
  44. package/dist/fns/find-wallets/find-wallets.browser.js +16 -7
  45. package/dist/fns/find-wallets/find-wallets.cjs +14 -6
  46. package/dist/fns/find-wallets/find-wallets.js +16 -7
  47. package/dist/fns/list-exports/list-exports.browser.cjs +2 -4
  48. package/dist/fns/list-exports/list-exports.browser.js +3 -5
  49. package/dist/fns/list-exports/list-exports.cjs +2 -4
  50. package/dist/fns/list-exports/list-exports.js +3 -5
  51. package/dist/lib/ts-utils.browser.cjs +1 -5
  52. package/dist/lib/ts-utils.browser.js +1 -5
  53. package/dist/lib/ts-utils.cjs +2 -7
  54. package/dist/lib/ts-utils.d.ts +0 -5
  55. package/dist/lib/ts-utils.js +1 -5
  56. package/dist/lib/utils.browser.cjs +20 -20
  57. package/dist/lib/utils.browser.js +22 -20
  58. package/dist/lib/utils.cjs +19 -22
  59. package/dist/lib/utils.d.ts +3 -5
  60. package/dist/lib/utils.js +18 -20
  61. package/dist/types/index.d.ts +6 -12
  62. package/dist/wapi-client-web.iife.js +1 -1
  63. package/dist/wapi-client.iife.js +1 -1
  64. package/package.json +2 -2
@@ -1,26 +1,9 @@
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
1
  // src/fns/export-transfers/export-transfers.ts
19
2
  import { QueryBuilder } from "../../lib/query-builder";
20
3
  import {
21
4
  getForeign,
22
5
  getIdentifierFilter,
23
- orderByToOrder
6
+ mergeFnOptionsOrderBy
24
7
  } from "../../lib/utils";
25
8
  import { getValidator } from "../../lib/validation";
26
9
  import { exportTransfersFnInputSchema } from "./export-transfers.schema.zod";
@@ -65,17 +48,10 @@ function exportTransfers(options, input, fnOptions) {
65
48
  filter.metadata = inputCopy.metadata;
66
49
  }
67
50
  (_a = inputCopy.options) != null ? _a : inputCopy.options = {};
68
- const orderBy = inputCopy.options.order_by;
69
- delete inputCopy.options.order_by;
70
- const findOptions = __spreadValues({}, inputCopy.options);
71
- if (!findOptions.order && orderBy) {
72
- findOptions.order = orderByToOrder(
73
- orderBy
74
- );
75
- }
51
+ const exportOptions = mergeFnOptionsOrderBy(inputCopy.options);
76
52
  return client.api.exportTransferMany({
77
53
  transfer: filter,
78
- options: findOptions
54
+ options: exportOptions
79
55
  });
80
56
  }
81
57
  export {
@@ -5,6 +5,18 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
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
+ };
8
20
  var __objRest = (source, exclude) => {
9
21
  var target = {};
10
22
  for (var prop in source)
@@ -62,14 +74,10 @@ function exportWallets(options, input, fnOptions) {
62
74
  }
63
75
  const inputCopy = zodValidator.validateInputWOptions(input, fnOptions);
64
76
  const _a = inputCopy, { options: inputOptions } = _a, filter = __objRest(_a, ["options"]);
65
- const _b = inputOptions != null ? inputOptions : {}, { order_by: orderBy } = _b, findOptions = __objRest(_b, ["order_by"]);
66
- if (!findOptions.order && orderBy) {
67
- findOptions.order = (0, import_utils.orderByToOrder)(
68
- orderBy
69
- );
70
- }
77
+ const _b = inputOptions, { include_balance_for_token } = _b, preOptions = __objRest(_b, ["include_balance_for_token"]);
78
+ const exportOptions = (0, import_utils.mergeFnOptionsOrderBy)(__spreadValues(__spreadValues({}, preOptions), include_balance_for_token ? { include_balance_for_token: (0, import_utils.getForeign)(include_balance_for_token) } : {}));
71
79
  return client.api.exportWalletMany({
72
80
  wallet: filter,
73
- options: findOptions
81
+ options: exportOptions
74
82
  });
75
83
  }
@@ -1,6 +1,19 @@
1
+ var __defProp = Object.defineProperty;
1
2
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
2
3
  var __hasOwnProp = Object.prototype.hasOwnProperty;
3
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
+ };
4
17
  var __objRest = (source, exclude) => {
5
18
  var target = {};
6
19
  for (var prop in source)
@@ -16,7 +29,7 @@ var __objRest = (source, exclude) => {
16
29
 
17
30
  // src/fns/export-wallets/export-wallets.ts
18
31
  import { QueryBuilder } from "../../lib/query-builder.browser.js";
19
- import { getForeign, orderByToOrder } from "../../lib/utils.browser.js";
32
+ import { getForeign, mergeFnOptionsOrderBy } from "../../lib/utils.browser.js";
20
33
  import { getValidator } from "../../lib/validation.browser.js";
21
34
  import { exportWalletsFnInputSchema } from "./export-wallets.schema.zod.browser.js";
22
35
  var zodValidator = getValidator(exportWalletsFnInputSchema);
@@ -40,15 +53,11 @@ function exportWallets(options, input, fnOptions) {
40
53
  }
41
54
  const inputCopy = zodValidator.validateInputWOptions(input, fnOptions);
42
55
  const _a = inputCopy, { options: inputOptions } = _a, filter = __objRest(_a, ["options"]);
43
- const _b = inputOptions != null ? inputOptions : {}, { order_by: orderBy } = _b, findOptions = __objRest(_b, ["order_by"]);
44
- if (!findOptions.order && orderBy) {
45
- findOptions.order = orderByToOrder(
46
- orderBy
47
- );
48
- }
56
+ const _b = inputOptions, { include_balance_for_token } = _b, preOptions = __objRest(_b, ["include_balance_for_token"]);
57
+ const exportOptions = mergeFnOptionsOrderBy(__spreadValues(__spreadValues({}, preOptions), include_balance_for_token ? { include_balance_for_token: getForeign(include_balance_for_token) } : {}));
49
58
  return client.api.exportWalletMany({
50
59
  wallet: filter,
51
- options: findOptions
60
+ options: exportOptions
52
61
  });
53
62
  }
54
63
  export {
@@ -5,6 +5,18 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
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
+ };
8
20
  var __objRest = (source, exclude) => {
9
21
  var target = {};
10
22
  for (var prop in source)
@@ -62,15 +74,11 @@ function exportWallets(options, input, fnOptions) {
62
74
  }
63
75
  const inputCopy = zodValidator.validateInputWOptions(input, fnOptions);
64
76
  const _a = inputCopy, { options: inputOptions } = _a, filter = __objRest(_a, ["options"]);
65
- const _b = inputOptions != null ? inputOptions : {}, { order_by: orderBy } = _b, findOptions = __objRest(_b, ["order_by"]);
66
- if (!findOptions.order && orderBy) {
67
- findOptions.order = (0, import_utils.orderByToOrder)(
68
- orderBy
69
- );
70
- }
77
+ const _b = inputOptions, { include_balance_for_token } = _b, preOptions = __objRest(_b, ["include_balance_for_token"]);
78
+ const exportOptions = (0, import_utils.mergeFnOptionsOrderBy)(__spreadValues(__spreadValues({}, preOptions), include_balance_for_token ? { include_balance_for_token: (0, import_utils.getForeign)(include_balance_for_token) } : {}));
71
79
  return client.api.exportWalletMany({
72
80
  wallet: filter,
73
- options: findOptions
81
+ options: exportOptions
74
82
  });
75
83
  }
76
84
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,6 +1,19 @@
1
+ var __defProp = Object.defineProperty;
1
2
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
2
3
  var __hasOwnProp = Object.prototype.hasOwnProperty;
3
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
+ };
4
17
  var __objRest = (source, exclude) => {
5
18
  var target = {};
6
19
  for (var prop in source)
@@ -16,7 +29,7 @@ var __objRest = (source, exclude) => {
16
29
 
17
30
  // src/fns/export-wallets/export-wallets.ts
18
31
  import { QueryBuilder } from "../../lib/query-builder";
19
- import { getForeign, orderByToOrder } from "../../lib/utils";
32
+ import { getForeign, mergeFnOptionsOrderBy } from "../../lib/utils";
20
33
  import { getValidator } from "../../lib/validation";
21
34
  import { exportWalletsFnInputSchema } from "./export-wallets.schema.zod";
22
35
  var zodValidator = getValidator(exportWalletsFnInputSchema);
@@ -40,15 +53,11 @@ function exportWallets(options, input, fnOptions) {
40
53
  }
41
54
  const inputCopy = zodValidator.validateInputWOptions(input, fnOptions);
42
55
  const _a = inputCopy, { options: inputOptions } = _a, filter = __objRest(_a, ["options"]);
43
- const _b = inputOptions != null ? inputOptions : {}, { order_by: orderBy } = _b, findOptions = __objRest(_b, ["order_by"]);
44
- if (!findOptions.order && orderBy) {
45
- findOptions.order = orderByToOrder(
46
- orderBy
47
- );
48
- }
56
+ const _b = inputOptions, { include_balance_for_token } = _b, preOptions = __objRest(_b, ["include_balance_for_token"]);
57
+ const exportOptions = mergeFnOptionsOrderBy(__spreadValues(__spreadValues({}, preOptions), include_balance_for_token ? { include_balance_for_token: getForeign(include_balance_for_token) } : {}));
49
58
  return client.api.exportWalletMany({
50
59
  wallet: filter,
51
- options: findOptions
60
+ options: exportOptions
52
61
  });
53
62
  }
54
63
  export {
@@ -2,21 +2,7 @@
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
5
  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
6
  var __export = (target, all) => {
21
7
  for (var name in all)
22
8
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -44,7 +30,6 @@ var import_validation = require('../../lib/validation.cjs');
44
30
  var import_find_balances_schema = require('./find-balances.schema.zod.cjs');
45
31
  var zodValidator = (0, import_validation.getValidator)(import_find_balances_schema.findBalancesFnInputSchema);
46
32
  function findBalances(options, input, fnOptions) {
47
- var _a, _b;
48
33
  const { client } = options;
49
34
  if (input === void 0) {
50
35
  return new import_query_builder.QueryBuilder({
@@ -70,14 +55,7 @@ function findBalances(options, input, fnOptions) {
70
55
  if (inputCopy.token) {
71
56
  filter.token = (0, import_utils.getForeign)(inputCopy.token);
72
57
  }
73
- const orderBy = (_a = inputCopy.options) == null ? void 0 : _a.order_by;
74
- (_b = inputCopy.options) == null ? true : delete _b.order_by;
75
- const findOptions = __spreadValues({}, inputCopy.options);
76
- if (!findOptions.order && orderBy) {
77
- findOptions.order = (0, import_utils.orderByToOrder)(
78
- orderBy
79
- );
80
- }
58
+ const findOptions = (0, import_utils.mergeFnOptionsOrderBy)(inputCopy.options);
81
59
  return client.api.findBalanceMany({
82
60
  balance: filter,
83
61
  options: findOptions
@@ -1,28 +1,10 @@
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
1
  // src/fns/find-balances/find-balances.ts
19
2
  import { QueryBuilder } from "../../lib/query-builder.browser.js";
20
- import { getForeign, orderByToOrder } from "../../lib/utils.browser.js";
3
+ import { getForeign, mergeFnOptionsOrderBy } from "../../lib/utils.browser.js";
21
4
  import { getValidator } from "../../lib/validation.browser.js";
22
5
  import { findBalancesFnInputSchema } from "./find-balances.schema.zod.browser.js";
23
6
  var zodValidator = getValidator(findBalancesFnInputSchema);
24
7
  function findBalances(options, input, fnOptions) {
25
- var _a, _b;
26
8
  const { client } = options;
27
9
  if (input === void 0) {
28
10
  return new QueryBuilder({
@@ -48,14 +30,7 @@ function findBalances(options, input, fnOptions) {
48
30
  if (inputCopy.token) {
49
31
  filter.token = getForeign(inputCopy.token);
50
32
  }
51
- const orderBy = (_a = inputCopy.options) == null ? void 0 : _a.order_by;
52
- (_b = inputCopy.options) == null ? true : delete _b.order_by;
53
- const findOptions = __spreadValues({}, inputCopy.options);
54
- if (!findOptions.order && orderBy) {
55
- findOptions.order = orderByToOrder(
56
- orderBy
57
- );
58
- }
33
+ const findOptions = mergeFnOptionsOrderBy(inputCopy.options);
59
34
  return client.api.findBalanceMany({
60
35
  balance: filter,
61
36
  options: findOptions
@@ -2,21 +2,7 @@
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
5
  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
6
  var __export = (target, all) => {
21
7
  for (var name in all)
22
8
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -44,7 +30,6 @@ var import_validation = require('../../lib/validation.cjs');
44
30
  var import_find_balances_schema = require('./find-balances.schema.zod.cjs');
45
31
  var zodValidator = (0, import_validation.getValidator)(import_find_balances_schema.findBalancesFnInputSchema);
46
32
  function findBalances(options, input, fnOptions) {
47
- var _a, _b;
48
33
  const { client } = options;
49
34
  if (input === void 0) {
50
35
  return new import_query_builder.QueryBuilder({
@@ -70,14 +55,7 @@ function findBalances(options, input, fnOptions) {
70
55
  if (inputCopy.token) {
71
56
  filter.token = (0, import_utils.getForeign)(inputCopy.token);
72
57
  }
73
- const orderBy = (_a = inputCopy.options) == null ? void 0 : _a.order_by;
74
- (_b = inputCopy.options) == null ? true : delete _b.order_by;
75
- const findOptions = __spreadValues({}, inputCopy.options);
76
- if (!findOptions.order && orderBy) {
77
- findOptions.order = (0, import_utils.orderByToOrder)(
78
- orderBy
79
- );
80
- }
58
+ const findOptions = (0, import_utils.mergeFnOptionsOrderBy)(inputCopy.options);
81
59
  return client.api.findBalanceMany({
82
60
  balance: filter,
83
61
  options: findOptions
@@ -1,28 +1,10 @@
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
1
  // src/fns/find-balances/find-balances.ts
19
2
  import { QueryBuilder } from "../../lib/query-builder";
20
- import { getForeign, orderByToOrder } from "../../lib/utils";
3
+ import { getForeign, mergeFnOptionsOrderBy } from "../../lib/utils";
21
4
  import { getValidator } from "../../lib/validation";
22
5
  import { findBalancesFnInputSchema } from "./find-balances.schema.zod";
23
6
  var zodValidator = getValidator(findBalancesFnInputSchema);
24
7
  function findBalances(options, input, fnOptions) {
25
- var _a, _b;
26
8
  const { client } = options;
27
9
  if (input === void 0) {
28
10
  return new QueryBuilder({
@@ -48,14 +30,7 @@ function findBalances(options, input, fnOptions) {
48
30
  if (inputCopy.token) {
49
31
  filter.token = getForeign(inputCopy.token);
50
32
  }
51
- const orderBy = (_a = inputCopy.options) == null ? void 0 : _a.order_by;
52
- (_b = inputCopy.options) == null ? true : delete _b.order_by;
53
- const findOptions = __spreadValues({}, inputCopy.options);
54
- if (!findOptions.order && orderBy) {
55
- findOptions.order = orderByToOrder(
56
- orderBy
57
- );
58
- }
33
+ const findOptions = mergeFnOptionsOrderBy(inputCopy.options);
59
34
  return client.api.findBalanceMany({
60
35
  balance: filter,
61
36
  options: findOptions
@@ -2,21 +2,7 @@
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
5
  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
6
  var __export = (target, all) => {
21
7
  for (var name in all)
22
8
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -43,7 +29,6 @@ var import_validation = require('../../lib/validation.cjs');
43
29
  var import_find_tokens_schema = require('./find-tokens.schema.zod.cjs');
44
30
  var zodValidator = (0, import_validation.getValidator)(import_find_tokens_schema.findTokensFnInputSchema);
45
31
  function findTokens(options, input, fnOptions) {
46
- var _a, _b;
47
32
  const { client } = options;
48
33
  if (input === void 0) {
49
34
  return new import_query_builder.QueryBuilder({
@@ -70,14 +55,7 @@ function findTokens(options, input, fnOptions) {
70
55
  if (inputCopy.belongs_to) {
71
56
  filter.belongs_to = (0, import_utils.getForeign)(inputCopy.belongs_to);
72
57
  }
73
- const orderBy = (_a = inputCopy.options) == null ? void 0 : _a.order_by;
74
- (_b = inputCopy.options) == null ? true : delete _b.order_by;
75
- const findOptions = __spreadValues({}, inputCopy.options);
76
- if (!findOptions.order && orderBy) {
77
- findOptions.order = (0, import_utils.orderByToOrder)(
78
- orderBy
79
- );
80
- }
58
+ const findOptions = (0, import_utils.mergeFnOptionsOrderBy)(inputCopy.options);
81
59
  return client.api.findTokenMany({
82
60
  token: filter,
83
61
  options: findOptions
@@ -1,28 +1,10 @@
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
1
  // src/fns/find-tokens/find-tokens.ts
19
2
  import { QueryBuilder } from "../../lib/query-builder.browser.js";
20
- import { getForeign, orderByToOrder } from "../../lib/utils.browser.js";
3
+ import { getForeign, mergeFnOptionsOrderBy } from "../../lib/utils.browser.js";
21
4
  import { getValidator } from "../../lib/validation.browser.js";
22
5
  import { findTokensFnInputSchema } from "./find-tokens.schema.zod.browser.js";
23
6
  var zodValidator = getValidator(findTokensFnInputSchema);
24
7
  function findTokens(options, input, fnOptions) {
25
- var _a, _b;
26
8
  const { client } = options;
27
9
  if (input === void 0) {
28
10
  return new QueryBuilder({
@@ -49,14 +31,7 @@ function findTokens(options, input, fnOptions) {
49
31
  if (inputCopy.belongs_to) {
50
32
  filter.belongs_to = getForeign(inputCopy.belongs_to);
51
33
  }
52
- const orderBy = (_a = inputCopy.options) == null ? void 0 : _a.order_by;
53
- (_b = inputCopy.options) == null ? true : delete _b.order_by;
54
- const findOptions = __spreadValues({}, inputCopy.options);
55
- if (!findOptions.order && orderBy) {
56
- findOptions.order = orderByToOrder(
57
- orderBy
58
- );
59
- }
34
+ const findOptions = mergeFnOptionsOrderBy(inputCopy.options);
60
35
  return client.api.findTokenMany({
61
36
  token: filter,
62
37
  options: findOptions
@@ -2,21 +2,7 @@
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
5
  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
6
  var __export = (target, all) => {
21
7
  for (var name in all)
22
8
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -43,7 +29,6 @@ var import_validation = require('../../lib/validation.cjs');
43
29
  var import_find_tokens_schema = require('./find-tokens.schema.zod.cjs');
44
30
  var zodValidator = (0, import_validation.getValidator)(import_find_tokens_schema.findTokensFnInputSchema);
45
31
  function findTokens(options, input, fnOptions) {
46
- var _a, _b;
47
32
  const { client } = options;
48
33
  if (input === void 0) {
49
34
  return new import_query_builder.QueryBuilder({
@@ -70,14 +55,7 @@ function findTokens(options, input, fnOptions) {
70
55
  if (inputCopy.belongs_to) {
71
56
  filter.belongs_to = (0, import_utils.getForeign)(inputCopy.belongs_to);
72
57
  }
73
- const orderBy = (_a = inputCopy.options) == null ? void 0 : _a.order_by;
74
- (_b = inputCopy.options) == null ? true : delete _b.order_by;
75
- const findOptions = __spreadValues({}, inputCopy.options);
76
- if (!findOptions.order && orderBy) {
77
- findOptions.order = (0, import_utils.orderByToOrder)(
78
- orderBy
79
- );
80
- }
58
+ const findOptions = (0, import_utils.mergeFnOptionsOrderBy)(inputCopy.options);
81
59
  return client.api.findTokenMany({
82
60
  token: filter,
83
61
  options: findOptions
@@ -1,28 +1,10 @@
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
1
  // src/fns/find-tokens/find-tokens.ts
19
2
  import { QueryBuilder } from "../../lib/query-builder";
20
- import { getForeign, orderByToOrder } from "../../lib/utils";
3
+ import { getForeign, mergeFnOptionsOrderBy } from "../../lib/utils";
21
4
  import { getValidator } from "../../lib/validation";
22
5
  import { findTokensFnInputSchema } from "./find-tokens.schema.zod";
23
6
  var zodValidator = getValidator(findTokensFnInputSchema);
24
7
  function findTokens(options, input, fnOptions) {
25
- var _a, _b;
26
8
  const { client } = options;
27
9
  if (input === void 0) {
28
10
  return new QueryBuilder({
@@ -49,14 +31,7 @@ function findTokens(options, input, fnOptions) {
49
31
  if (inputCopy.belongs_to) {
50
32
  filter.belongs_to = getForeign(inputCopy.belongs_to);
51
33
  }
52
- const orderBy = (_a = inputCopy.options) == null ? void 0 : _a.order_by;
53
- (_b = inputCopy.options) == null ? true : delete _b.order_by;
54
- const findOptions = __spreadValues({}, inputCopy.options);
55
- if (!findOptions.order && orderBy) {
56
- findOptions.order = orderByToOrder(
57
- orderBy
58
- );
59
- }
34
+ const findOptions = mergeFnOptionsOrderBy(inputCopy.options);
60
35
  return client.api.findTokenMany({
61
36
  token: filter,
62
37
  options: findOptions
@@ -2,21 +2,7 @@
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
5
  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
6
  var __export = (target, all) => {
21
7
  for (var name in all)
22
8
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -43,7 +29,6 @@ var import_validation = require('../../lib/validation.cjs');
43
29
  var import_find_transfer_groups_schema = require('./find-transfer-groups.schema.zod.cjs');
44
30
  var zodValidator = (0, import_validation.getValidator)(import_find_transfer_groups_schema.findTransferGroupsFnInputSchema);
45
31
  function findTransferGroups(options, input, fnOptions) {
46
- var _a, _b;
47
32
  const { client } = options;
48
33
  if (input === void 0) {
49
34
  return new import_query_builder.QueryBuilder({
@@ -73,14 +58,7 @@ function findTransferGroups(options, input, fnOptions) {
73
58
  if (inputCopy.reverses) {
74
59
  filter.reverses = (0, import_utils.getIdentifierFilter)(inputCopy.reverses);
75
60
  }
76
- const orderBy = (_a = inputCopy.options) == null ? void 0 : _a.order_by;
77
- (_b = inputCopy.options) == null ? true : delete _b.order_by;
78
- const findOptions = __spreadValues({}, inputCopy.options);
79
- if (!findOptions.order && orderBy) {
80
- findOptions.order = (0, import_utils.orderByToOrder)(
81
- orderBy
82
- );
83
- }
61
+ const findOptions = (0, import_utils.mergeFnOptionsOrderBy)(inputCopy.options);
84
62
  return client.api.findTransferGroupMany({
85
63
  transfer_group: filter,
86
64
  options: findOptions