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
@@ -76,7 +76,7 @@ var import_base_client = require('./base-client.cjs');
76
76
  var import_connection = require('./connection/connection.enums.cjs');
77
77
  var import__ = require('../index.cjs');
78
78
  var _a;
79
- var CLIENT_VERSION = (_a = '0.12.0-beta.2') != null ? _a : "";
79
+ var CLIENT_VERSION = (_a = '0.12.0-beta.3') != null ? _a : "";
80
80
  function createWsClient(opts, config) {
81
81
  const initialConnection = createConnection(opts, {
82
82
  timeout: config == null ? void 0 : config.connectingTimeout
@@ -48,7 +48,7 @@ import {
48
48
  } from "./connection/connection.enums";
49
49
  import { WapiClientType } from "../index";
50
50
  var _a;
51
- var CLIENT_VERSION = (_a = '0.12.0-beta.2') != null ? _a : "";
51
+ var CLIENT_VERSION = (_a = '0.12.0-beta.3') != null ? _a : "";
52
52
  function createWsClient(opts, config) {
53
53
  const initialConnection = createConnection(opts, {
54
54
  timeout: config == null ? void 0 : config.connectingTimeout
package/dist/client.cjs CHANGED
@@ -63,7 +63,7 @@ var import_api = require('./api/index.cjs');
63
63
  var import_errors = require('./lib/errors.cjs');
64
64
  var import_fns = require('./fns/index.cjs');
65
65
  var _a;
66
- var CLIENT_VERSION = (_a = '0.12.0-beta.2') != null ? _a : "";
66
+ var CLIENT_VERSION = (_a = '0.12.0-beta.3') != null ? _a : "";
67
67
  var Client = class {
68
68
  /**
69
69
  * @internal
package/dist/client.js CHANGED
@@ -44,7 +44,7 @@ import {
44
44
  import { ConfigError } from "./lib/errors";
45
45
  import { ClientFunctions } from "./fns";
46
46
  var _a;
47
- var CLIENT_VERSION = (_a = '0.12.0-beta.2') != null ? _a : "";
47
+ var CLIENT_VERSION = (_a = '0.12.0-beta.3') != null ? _a : "";
48
48
  var Client = class {
49
49
  /**
50
50
  * @internal
@@ -4077,12 +4077,14 @@ var MetadataSchema = z.record(
4077
4077
  z.boolean(),
4078
4078
  z.number(),
4079
4079
  z.null(),
4080
+ z.undefined(),
4080
4081
  z.lazy(() => MetadataSchema),
4081
4082
  z.union([
4082
4083
  z.string(),
4083
4084
  z.boolean(),
4084
4085
  z.number(),
4085
4086
  z.null(),
4087
+ z.undefined(),
4086
4088
  z.lazy(() => MetadataSchema)
4087
4089
  ]).array()
4088
4090
  ])
@@ -4005,12 +4005,14 @@ var MetadataSchema = z.record(
4005
4005
  z.boolean(),
4006
4006
  z.number(),
4007
4007
  z.null(),
4008
+ z.undefined(),
4008
4009
  z.lazy(() => MetadataSchema),
4009
4010
  z.union([
4010
4011
  z.string(),
4011
4012
  z.boolean(),
4012
4013
  z.number(),
4013
4014
  z.null(),
4015
+ z.undefined(),
4014
4016
  z.lazy(() => MetadataSchema)
4015
4017
  ]).array()
4016
4018
  ])
@@ -107,12 +107,14 @@ var MetadataSchema = import_zod.default.record(
107
107
  import_zod.default.boolean(),
108
108
  import_zod.default.number(),
109
109
  import_zod.default.null(),
110
+ import_zod.default.undefined(),
110
111
  import_zod.default.lazy(() => MetadataSchema),
111
112
  import_zod.default.union([
112
113
  import_zod.default.string(),
113
114
  import_zod.default.boolean(),
114
115
  import_zod.default.number(),
115
116
  import_zod.default.null(),
117
+ import_zod.default.undefined(),
116
118
  import_zod.default.lazy(() => MetadataSchema)
117
119
  ]).array()
118
120
  ])
@@ -1,6 +1,6 @@
1
1
  import z from 'zod';
2
2
  export type Metadata = {
3
- [key: string]: string | boolean | number | null | Metadata | (string | boolean | number | null | Metadata)[];
3
+ [key: string]: string | boolean | number | null | Metadata | undefined | (string | boolean | number | null | Metadata | undefined)[];
4
4
  } | null;
5
5
  export declare const MetadataSchema: z.ZodType<Metadata>;
6
6
  export declare const DatetimeSchema: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodString]>;
package/dist/db/consts.js CHANGED
@@ -25,12 +25,14 @@ var MetadataSchema = z.record(
25
25
  z.boolean(),
26
26
  z.number(),
27
27
  z.null(),
28
+ z.undefined(),
28
29
  z.lazy(() => MetadataSchema),
29
30
  z.union([
30
31
  z.string(),
31
32
  z.boolean(),
32
33
  z.number(),
33
34
  z.null(),
35
+ z.undefined(),
34
36
  z.lazy(() => MetadataSchema)
35
37
  ]).array()
36
38
  ])
@@ -1,6 +1,7 @@
1
1
  import z from "zod";
2
- import { iFnFindOptionsExtraSchema, iFnFindOptionsSchema, allowedStringIntSchema, allowedStringNumberSchema } from "./consts";
2
+ import { iFnFindOptionsExtraSchema, iFnFindOptionsSchema, allowedStringPositiveNumericSchema, allowedStringIntSchema, allowedStringNumberSchema } from "./consts";
3
3
  export type IFnFindOptionsExtra = z.infer<typeof iFnFindOptionsExtraSchema>;
4
4
  export type IFnFindOptions = z.infer<typeof iFnFindOptionsSchema>;
5
+ export type AllowedStringPositiveNumeric = z.infer<typeof allowedStringPositiveNumericSchema>;
5
6
  export type AllowedStringInt = z.infer<typeof allowedStringIntSchema>;
6
7
  export type AllowedStringNumber = z.infer<typeof allowedStringNumberSchema>;
@@ -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: