wapi-client 0.12.0-beta.1 → 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 (100) 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.browser.cjs +5 -0
  11. package/dist/fns/consts.browser.js +5 -0
  12. package/dist/fns/consts.cjs +6 -0
  13. package/dist/fns/consts.d.ts +1 -0
  14. package/dist/fns/consts.enums.d.ts +2 -1
  15. package/dist/fns/consts.js +5 -0
  16. package/dist/fns/create-deposit/create-deposit.browser.cjs +1 -0
  17. package/dist/fns/create-deposit/create-deposit.browser.js +2 -0
  18. package/dist/fns/create-deposit/create-deposit.cjs +1 -0
  19. package/dist/fns/create-deposit/create-deposit.js +2 -0
  20. package/dist/fns/create-deposit/create-deposit.schema.zod.browser.cjs +1 -1
  21. package/dist/fns/create-deposit/create-deposit.schema.zod.browser.js +5 -2
  22. package/dist/fns/create-deposit/create-deposit.schema.zod.cjs +1 -1
  23. package/dist/fns/create-deposit/create-deposit.schema.zod.d.ts +6 -6
  24. package/dist/fns/create-deposit/create-deposit.schema.zod.js +5 -2
  25. package/dist/fns/create-transfer/create-transfer.browser.cjs +1 -1
  26. package/dist/fns/create-transfer/create-transfer.browser.js +2 -1
  27. package/dist/fns/create-transfer/create-transfer.cjs +1 -1
  28. package/dist/fns/create-transfer/create-transfer.js +2 -1
  29. package/dist/fns/create-transfer/create-transfer.schema.zod.browser.cjs +1 -1
  30. package/dist/fns/create-transfer/create-transfer.schema.zod.browser.js +5 -2
  31. package/dist/fns/create-transfer/create-transfer.schema.zod.cjs +1 -1
  32. package/dist/fns/create-transfer/create-transfer.schema.zod.d.ts +30 -30
  33. package/dist/fns/create-transfer/create-transfer.schema.zod.js +5 -2
  34. package/dist/fns/create-transfer-group/create-transfer-group.schema.zod.d.ts +48 -48
  35. package/dist/fns/create-transfers/create-transfers.schema.zod.d.ts +15 -15
  36. package/dist/fns/create-withdrawal/create-withdrawal.browser.cjs +1 -0
  37. package/dist/fns/create-withdrawal/create-withdrawal.browser.js +2 -0
  38. package/dist/fns/create-withdrawal/create-withdrawal.cjs +1 -0
  39. package/dist/fns/create-withdrawal/create-withdrawal.js +2 -0
  40. package/dist/fns/create-withdrawal/create-withdrawal.schema.zod.browser.cjs +1 -1
  41. package/dist/fns/create-withdrawal/create-withdrawal.schema.zod.browser.js +5 -2
  42. package/dist/fns/create-withdrawal/create-withdrawal.schema.zod.cjs +1 -1
  43. package/dist/fns/create-withdrawal/create-withdrawal.schema.zod.d.ts +6 -6
  44. package/dist/fns/create-withdrawal/create-withdrawal.schema.zod.js +5 -2
  45. package/dist/fns/export-tokens/export-tokens.browser.cjs +1 -23
  46. package/dist/fns/export-tokens/export-tokens.browser.js +2 -27
  47. package/dist/fns/export-tokens/export-tokens.cjs +1 -23
  48. package/dist/fns/export-tokens/export-tokens.js +2 -27
  49. package/dist/fns/export-transfer-groups/export-transfer-groups.browser.cjs +2 -24
  50. package/dist/fns/export-transfer-groups/export-transfer-groups.browser.js +3 -28
  51. package/dist/fns/export-transfer-groups/export-transfer-groups.cjs +2 -24
  52. package/dist/fns/export-transfer-groups/export-transfer-groups.js +3 -28
  53. package/dist/fns/export-transfers/export-transfers.browser.cjs +2 -23
  54. package/dist/fns/export-transfers/export-transfers.browser.js +3 -27
  55. package/dist/fns/export-transfers/export-transfers.cjs +2 -23
  56. package/dist/fns/export-transfers/export-transfers.js +3 -27
  57. package/dist/fns/export-wallets/export-wallets.browser.cjs +15 -7
  58. package/dist/fns/export-wallets/export-wallets.browser.js +17 -8
  59. package/dist/fns/export-wallets/export-wallets.cjs +15 -7
  60. package/dist/fns/export-wallets/export-wallets.js +17 -8
  61. package/dist/fns/find-balances/find-balances.browser.cjs +1 -23
  62. package/dist/fns/find-balances/find-balances.browser.js +2 -27
  63. package/dist/fns/find-balances/find-balances.cjs +1 -23
  64. package/dist/fns/find-balances/find-balances.js +2 -27
  65. package/dist/fns/find-tokens/find-tokens.browser.cjs +1 -23
  66. package/dist/fns/find-tokens/find-tokens.browser.js +2 -27
  67. package/dist/fns/find-tokens/find-tokens.cjs +1 -23
  68. package/dist/fns/find-tokens/find-tokens.js +2 -27
  69. package/dist/fns/find-transfer-groups/find-transfer-groups.browser.cjs +1 -23
  70. package/dist/fns/find-transfer-groups/find-transfer-groups.browser.js +2 -27
  71. package/dist/fns/find-transfer-groups/find-transfer-groups.cjs +1 -23
  72. package/dist/fns/find-transfer-groups/find-transfer-groups.js +2 -27
  73. package/dist/fns/find-transfers/find-transfers.browser.cjs +28 -18
  74. package/dist/fns/find-transfers/find-transfers.browser.js +29 -19
  75. package/dist/fns/find-transfers/find-transfers.cjs +28 -18
  76. package/dist/fns/find-transfers/find-transfers.js +29 -19
  77. package/dist/fns/find-wallets/find-wallets.browser.cjs +14 -6
  78. package/dist/fns/find-wallets/find-wallets.browser.js +16 -7
  79. package/dist/fns/find-wallets/find-wallets.cjs +14 -6
  80. package/dist/fns/find-wallets/find-wallets.js +16 -7
  81. package/dist/fns/import-data/import-data.schema.zod.d.ts +186 -186
  82. package/dist/fns/index.d.ts +93 -93
  83. package/dist/fns/list-exports/list-exports.browser.cjs +2 -4
  84. package/dist/fns/list-exports/list-exports.browser.js +3 -5
  85. package/dist/fns/list-exports/list-exports.cjs +2 -4
  86. package/dist/fns/list-exports/list-exports.js +3 -5
  87. package/dist/lib/ts-utils.browser.cjs +1 -5
  88. package/dist/lib/ts-utils.browser.js +1 -5
  89. package/dist/lib/ts-utils.cjs +2 -7
  90. package/dist/lib/ts-utils.d.ts +0 -5
  91. package/dist/lib/ts-utils.js +1 -5
  92. package/dist/lib/utils.browser.cjs +27 -20
  93. package/dist/lib/utils.browser.js +29 -20
  94. package/dist/lib/utils.cjs +27 -22
  95. package/dist/lib/utils.d.ts +4 -5
  96. package/dist/lib/utils.js +25 -20
  97. package/dist/types/index.d.ts +392 -396
  98. package/dist/wapi-client-web.iife.js +1 -1
  99. package/dist/wapi-client.iife.js +1 -1
  100. package/package.json +2 -2
@@ -18,12 +18,12 @@ export declare const createWithdrawalInputSchema: z.ZodObject<{
18
18
  metadata: z.ZodOptional<z.ZodOptional<z.ZodType<import("../../db/consts").Metadata, z.ZodTypeDef, import("../../db/consts").Metadata>>>;
19
19
  token: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
20
20
  created_at: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString, z.ZodString]>>;
21
- amount: z.ZodNumber;
21
+ amount: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
22
22
  latest_control_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23
23
  wallet: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
24
24
  transfer_group: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
25
25
  }, "strip", z.ZodTypeAny, {
26
- amount: number;
26
+ amount: string | number;
27
27
  wallet: string | number;
28
28
  status?: "pending" | "finished" | undefined;
29
29
  identifier?: string | undefined;
@@ -33,7 +33,7 @@ export declare const createWithdrawalInputSchema: z.ZodObject<{
33
33
  latest_control_hash?: string | null | undefined;
34
34
  transfer_group?: string | number | undefined;
35
35
  }, {
36
- amount: number;
36
+ amount: string | number;
37
37
  wallet: string | number;
38
38
  status?: "pending" | "finished" | undefined;
39
39
  identifier?: string | undefined;
@@ -49,7 +49,7 @@ export declare const createWithdrawalFnInputSchema: z.ZodObject<z.objectUtil.ext
49
49
  metadata: z.ZodOptional<z.ZodOptional<z.ZodType<import("../../db/consts").Metadata, z.ZodTypeDef, import("../../db/consts").Metadata>>>;
50
50
  token: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
51
51
  created_at: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString, z.ZodString]>>;
52
- amount: z.ZodNumber;
52
+ amount: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
53
53
  latest_control_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
54
54
  wallet: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
55
55
  transfer_group: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
@@ -68,7 +68,7 @@ export declare const createWithdrawalFnInputSchema: z.ZodObject<z.objectUtil.ext
68
68
  return_balance?: boolean | undefined;
69
69
  }>>;
70
70
  }>, "strict", z.ZodTypeAny, {
71
- amount: number;
71
+ amount: string | number;
72
72
  wallet: string | number;
73
73
  options?: {
74
74
  tracking_id?: string | undefined;
@@ -83,7 +83,7 @@ export declare const createWithdrawalFnInputSchema: z.ZodObject<z.objectUtil.ext
83
83
  latest_control_hash?: string | null | undefined;
84
84
  transfer_group?: string | number | undefined;
85
85
  }, {
86
- amount: number;
86
+ amount: string | number;
87
87
  wallet: string | number;
88
88
  options?: {
89
89
  tracking_id?: string | undefined;
@@ -6,7 +6,10 @@ import {
6
6
  } from "../../db/transfer/transfer.schema.zod";
7
7
  import { iTxGeneralOptions } from "../../txs/consts";
8
8
  import { createWithdrawalTxOutputSchema } from "../../txs/create-withdrawal/create-withdrawal.schema.zod";
9
- import { allowedStringIntSchema } from "../consts";
9
+ import {
10
+ allowedStringIntSchema,
11
+ allowedStringPositiveNumericSchema
12
+ } from "../consts";
10
13
  var createWithdrawalFnOptionsSchema = iTxGeneralOptions.extend({
11
14
  return_balance: z.boolean().describe("Return balance after withdrawal")
12
15
  }).partial().describe("Optional flags for input");
@@ -17,7 +20,7 @@ var createWithdrawalInputSchema = z.object({
17
20
  "Id of the wallet to withdraw from"
18
21
  ),
19
22
  latest_control_hash: transferTableSchema.shape.control_hash,
20
- amount: z.number().positive().describe("amount to withdraw"),
23
+ amount: allowedStringPositiveNumericSchema.describe("amount to withdraw"),
21
24
  metadata: transferTableSchema.shape.metadata,
22
25
  status: transferTableStatusInputSchema.describe("status of the withdrawal"),
23
26
  transfer_group: allowedStringIntSchema.describe(
@@ -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_export_tokens_schema = require('./export-tokens.schema.zod.cjs');
44
30
  var zodValidator = (0, import_validation.getValidator)(import_export_tokens_schema.exportTokensFnInputSchema);
45
31
  function exportTokens(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 exportTokens(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 exportOptions = __spreadValues({}, inputCopy.options);
76
- if (!exportOptions.order && orderBy) {
77
- exportOptions.order = (0, import_utils.orderByToOrder)(
78
- orderBy
79
- );
80
- }
58
+ const exportOptions = (0, import_utils.mergeFnOptionsOrderBy)(inputCopy.options);
81
59
  return client.api.exportTokenMany({
82
60
  token: filter,
83
61
  options: exportOptions
@@ -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/export-tokens/export-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 { exportTokensFnInputSchema } from "./export-tokens.schema.zod.browser.js";
23
6
  var zodValidator = getValidator(exportTokensFnInputSchema);
24
7
  function exportTokens(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 exportTokens(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 exportOptions = __spreadValues({}, inputCopy.options);
55
- if (!exportOptions.order && orderBy) {
56
- exportOptions.order = orderByToOrder(
57
- orderBy
58
- );
59
- }
34
+ const exportOptions = mergeFnOptionsOrderBy(inputCopy.options);
60
35
  return client.api.exportTokenMany({
61
36
  token: filter,
62
37
  options: exportOptions
@@ -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_export_tokens_schema = require('./export-tokens.schema.zod.cjs');
44
30
  var zodValidator = (0, import_validation.getValidator)(import_export_tokens_schema.exportTokensFnInputSchema);
45
31
  function exportTokens(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 exportTokens(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 exportOptions = __spreadValues({}, inputCopy.options);
76
- if (!exportOptions.order && orderBy) {
77
- exportOptions.order = (0, import_utils.orderByToOrder)(
78
- orderBy
79
- );
80
- }
58
+ const exportOptions = (0, import_utils.mergeFnOptionsOrderBy)(inputCopy.options);
81
59
  return client.api.exportTokenMany({
82
60
  token: filter,
83
61
  options: exportOptions
@@ -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/export-tokens/export-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 { exportTokensFnInputSchema } from "./export-tokens.schema.zod";
23
6
  var zodValidator = getValidator(exportTokensFnInputSchema);
24
7
  function exportTokens(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 exportTokens(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 exportOptions = __spreadValues({}, inputCopy.options);
55
- if (!exportOptions.order && orderBy) {
56
- exportOptions.order = orderByToOrder(
57
- orderBy
58
- );
59
- }
34
+ const exportOptions = mergeFnOptionsOrderBy(inputCopy.options);
60
35
  return client.api.exportTokenMany({
61
36
  token: filter,
62
37
  options: exportOptions
@@ -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_export_transfer_groups_schema = require('./export-transfer-groups.schema.zod.cjs');
44
30
  var zodValidator = (0, import_validation.getValidator)(import_export_transfer_groups_schema.exportTransferGroupsFnInputSchema);
45
31
  function exportTransferGroups(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,16 +58,9 @@ function exportTransferGroups(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 exportOptions = (0, import_utils.mergeFnOptionsOrderBy)(inputCopy.options);
84
62
  return client.api.exportTransferGroupMany({
85
63
  transfer_group: filter,
86
- options: findOptions
64
+ options: exportOptions
87
65
  });
88
66
  }
@@ -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/export-transfer-groups/export-transfer-groups.ts
19
2
  import { QueryBuilder } from "../../lib/query-builder.browser.js";
20
- import { getIdentifierFilter, orderByToOrder } from "../../lib/utils.browser.js";
3
+ import { getIdentifierFilter, mergeFnOptionsOrderBy } from "../../lib/utils.browser.js";
21
4
  import { getValidator } from "../../lib/validation.browser.js";
22
5
  import { exportTransferGroupsFnInputSchema } from "./export-transfer-groups.schema.zod.browser.js";
23
6
  var zodValidator = getValidator(exportTransferGroupsFnInputSchema);
24
7
  function exportTransferGroups(options, input, fnOptions) {
25
- var _a, _b;
26
8
  const { client } = options;
27
9
  if (input === void 0) {
28
10
  return new QueryBuilder({
@@ -52,17 +34,10 @@ function exportTransferGroups(options, input, fnOptions) {
52
34
  if (inputCopy.reverses) {
53
35
  filter.reverses = getIdentifierFilter(inputCopy.reverses);
54
36
  }
55
- const orderBy = (_a = inputCopy.options) == null ? void 0 : _a.order_by;
56
- (_b = inputCopy.options) == null ? true : delete _b.order_by;
57
- const findOptions = __spreadValues({}, inputCopy.options);
58
- if (!findOptions.order && orderBy) {
59
- findOptions.order = orderByToOrder(
60
- orderBy
61
- );
62
- }
37
+ const exportOptions = mergeFnOptionsOrderBy(inputCopy.options);
63
38
  return client.api.exportTransferGroupMany({
64
39
  transfer_group: filter,
65
- options: findOptions
40
+ options: exportOptions
66
41
  });
67
42
  }
68
43
  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 });
@@ -43,7 +29,6 @@ var import_validation = require('../../lib/validation.cjs');
43
29
  var import_export_transfer_groups_schema = require('./export-transfer-groups.schema.zod.cjs');
44
30
  var zodValidator = (0, import_validation.getValidator)(import_export_transfer_groups_schema.exportTransferGroupsFnInputSchema);
45
31
  function exportTransferGroups(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,17 +58,10 @@ function exportTransferGroups(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 exportOptions = (0, import_utils.mergeFnOptionsOrderBy)(inputCopy.options);
84
62
  return client.api.exportTransferGroupMany({
85
63
  transfer_group: filter,
86
- options: findOptions
64
+ options: exportOptions
87
65
  });
88
66
  }
89
67
  // Annotate the CommonJS export names for ESM import in node:
@@ -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/export-transfer-groups/export-transfer-groups.ts
19
2
  import { QueryBuilder } from "../../lib/query-builder";
20
- import { getIdentifierFilter, orderByToOrder } from "../../lib/utils";
3
+ import { getIdentifierFilter, mergeFnOptionsOrderBy } from "../../lib/utils";
21
4
  import { getValidator } from "../../lib/validation";
22
5
  import { exportTransferGroupsFnInputSchema } from "./export-transfer-groups.schema.zod";
23
6
  var zodValidator = getValidator(exportTransferGroupsFnInputSchema);
24
7
  function exportTransferGroups(options, input, fnOptions) {
25
- var _a, _b;
26
8
  const { client } = options;
27
9
  if (input === void 0) {
28
10
  return new QueryBuilder({
@@ -52,17 +34,10 @@ function exportTransferGroups(options, input, fnOptions) {
52
34
  if (inputCopy.reverses) {
53
35
  filter.reverses = getIdentifierFilter(inputCopy.reverses);
54
36
  }
55
- const orderBy = (_a = inputCopy.options) == null ? void 0 : _a.order_by;
56
- (_b = inputCopy.options) == null ? true : delete _b.order_by;
57
- const findOptions = __spreadValues({}, inputCopy.options);
58
- if (!findOptions.order && orderBy) {
59
- findOptions.order = orderByToOrder(
60
- orderBy
61
- );
62
- }
37
+ const exportOptions = mergeFnOptionsOrderBy(inputCopy.options);
63
38
  return client.api.exportTransferGroupMany({
64
39
  transfer_group: filter,
65
- options: findOptions
40
+ options: exportOptions
66
41
  });
67
42
  }
68
43
  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 });
@@ -82,16 +68,9 @@ function exportTransfers(options, input, fnOptions) {
82
68
  filter.metadata = inputCopy.metadata;
83
69
  }
84
70
  (_a = inputCopy.options) != null ? _a : inputCopy.options = {};
85
- const orderBy = inputCopy.options.order_by;
86
- delete inputCopy.options.order_by;
87
- const findOptions = __spreadValues({}, inputCopy.options);
88
- if (!findOptions.order && orderBy) {
89
- findOptions.order = (0, import_utils.orderByToOrder)(
90
- orderBy
91
- );
92
- }
71
+ const exportOptions = (0, import_utils.mergeFnOptionsOrderBy)(inputCopy.options);
93
72
  return client.api.exportTransferMany({
94
73
  transfer: filter,
95
- options: findOptions
74
+ options: exportOptions
96
75
  });
97
76
  }
@@ -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.browser.js";
20
3
  import {
21
4
  getForeign,
22
5
  getIdentifierFilter,
23
- orderByToOrder
6
+ mergeFnOptionsOrderBy
24
7
  } from "../../lib/utils.browser.js";
25
8
  import { getValidator } from "../../lib/validation.browser.js";
26
9
  import { exportTransfersFnInputSchema } from "./export-transfers.schema.zod.browser.js";
@@ -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 {
@@ -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 });
@@ -82,17 +68,10 @@ function exportTransfers(options, input, fnOptions) {
82
68
  filter.metadata = inputCopy.metadata;
83
69
  }
84
70
  (_a = inputCopy.options) != null ? _a : inputCopy.options = {};
85
- const orderBy = inputCopy.options.order_by;
86
- delete inputCopy.options.order_by;
87
- const findOptions = __spreadValues({}, inputCopy.options);
88
- if (!findOptions.order && orderBy) {
89
- findOptions.order = (0, import_utils.orderByToOrder)(
90
- orderBy
91
- );
92
- }
71
+ const exportOptions = (0, import_utils.mergeFnOptionsOrderBy)(inputCopy.options);
93
72
  return client.api.exportTransferMany({
94
73
  transfer: filter,
95
- options: findOptions
74
+ options: exportOptions
96
75
  });
97
76
  }
98
77
  // Annotate the CommonJS export names for ESM import in node:
@@ -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 {