wapi-client 0.14.1 → 0.14.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fns/get-token/get-token.browser.cjs +14 -7
- package/dist/fns/get-token/get-token.browser.js +16 -9
- package/dist/fns/get-token/get-token.cjs +14 -7
- package/dist/fns/get-token/get-token.js +16 -9
- package/dist/fns/get-token/get-token.schema.zod.browser.cjs +2 -1
- package/dist/fns/get-token/get-token.schema.zod.browser.js +2 -1
- package/dist/fns/get-token/get-token.schema.zod.cjs +2 -1
- package/dist/fns/get-token/get-token.schema.zod.js +2 -1
- package/dist/lib/env.browser.cjs +1 -1
- package/dist/lib/env.browser.js +1 -1
- package/dist/lib/env.cjs +1 -1
- package/dist/lib/env.js +1 -1
- package/dist/lib/errors.browser.cjs +5 -0
- package/dist/lib/errors.browser.js +5 -0
- package/dist/lib/errors.cjs +5 -0
- package/dist/lib/errors.js +5 -0
- package/dist/txs/find-apikey-many/find-apikey-many.schema.zod.browser.cjs +21 -4
- package/dist/txs/find-apikey-many/find-apikey-many.schema.zod.browser.js +24 -4
- package/dist/txs/find-apikey-many/find-apikey-many.schema.zod.cjs +21 -4
- package/dist/txs/find-apikey-many/find-apikey-many.schema.zod.js +24 -4
- package/dist/txs/get-balance-history/get-balance-history.schema.zod.browser.cjs +2 -1
- package/dist/txs/get-balance-history/get-balance-history.schema.zod.browser.js +2 -1
- package/dist/txs/get-balance-history/get-balance-history.schema.zod.cjs +2 -1
- package/dist/txs/get-balance-history/get-balance-history.schema.zod.js +2 -1
- package/dist/types/wapi-client.d.ts +550 -30
- package/dist/wapi-client-web.iife.js +8 -8
- package/dist/wapi-client.browser.cjs +7 -0
- package/dist/wapi-client.browser.js +7 -0
- package/dist/wapi-client.cjs +8 -0
- package/dist/wapi-client.iife.js +8 -8
- package/dist/wapi-client.js +7 -0
- package/package.json +1 -1
|
@@ -30,13 +30,20 @@ var import_get_token_schema_zod = require("./get-token.schema.zod.browser.cjs");
|
|
|
30
30
|
var zodValidator = (0, import_validation.getValidator)(import_get_token_schema_zod.getTokenFnInputSchema);
|
|
31
31
|
function getToken(options, input = {}, fnOptions) {
|
|
32
32
|
const { client } = options;
|
|
33
|
-
|
|
34
|
-
input,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
if (!input.token && !input.foreign && !client.getConfig("token")) {
|
|
34
|
+
throw new import_errors.ValidationError({ input }, `token is required if no default set`);
|
|
35
|
+
}
|
|
36
|
+
const inputCopy = zodValidator.validateInputWOptions(input, fnOptions);
|
|
37
|
+
if (inputCopy.foreign) {
|
|
38
|
+
console.log(".foreign is deprecated, use .token");
|
|
39
|
+
}
|
|
40
|
+
if ("token" in input && input.token === void 0) {
|
|
41
|
+
throw new import_errors.ValidationError({ input }, `undefined provided for token`);
|
|
42
|
+
}
|
|
43
|
+
if ("foreign" in input && input.foreign === void 0) {
|
|
44
|
+
throw new import_errors.ValidationError({ input }, `undefined provided for foreign`);
|
|
45
|
+
}
|
|
46
|
+
const token = inputCopy.token || inputCopy.foreign || client.getConfig("token");
|
|
40
47
|
if (token === void 0) {
|
|
41
48
|
throw new import_errors.InputError("INPUT_NEEDS_TOKEN", { input });
|
|
42
49
|
}
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
// src/fns/get-token/get-token.ts
|
|
2
|
-
import { InputError } from "../../lib/errors.browser.js";
|
|
3
|
-
import {
|
|
2
|
+
import { InputError, ValidationError } from "../../lib/errors.browser.js";
|
|
3
|
+
import { getForeign } from "../../lib/utils.browser.js";
|
|
4
4
|
import { getValidator } from "../../lib/validation.browser.js";
|
|
5
5
|
import { getTokenFnInputSchema } from "./get-token.schema.zod.browser.js";
|
|
6
6
|
var zodValidator = getValidator(getTokenFnInputSchema);
|
|
7
7
|
function getToken(options, input = {}, fnOptions) {
|
|
8
8
|
const { client } = options;
|
|
9
|
-
|
|
10
|
-
input,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
)
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
if (!input.token && !input.foreign && !client.getConfig("token")) {
|
|
10
|
+
throw new ValidationError({ input }, `token is required if no default set`);
|
|
11
|
+
}
|
|
12
|
+
const inputCopy = zodValidator.validateInputWOptions(input, fnOptions);
|
|
13
|
+
if (inputCopy.foreign) {
|
|
14
|
+
console.log(".foreign is deprecated, use .token");
|
|
15
|
+
}
|
|
16
|
+
if ("token" in input && input.token === void 0) {
|
|
17
|
+
throw new ValidationError({ input }, `undefined provided for token`);
|
|
18
|
+
}
|
|
19
|
+
if ("foreign" in input && input.foreign === void 0) {
|
|
20
|
+
throw new ValidationError({ input }, `undefined provided for foreign`);
|
|
21
|
+
}
|
|
22
|
+
const token = inputCopy.token || inputCopy.foreign || client.getConfig("token");
|
|
16
23
|
if (token === void 0) {
|
|
17
24
|
throw new InputError("INPUT_NEEDS_TOKEN", { input });
|
|
18
25
|
}
|
|
@@ -30,13 +30,20 @@ var import_get_token_schema_zod = require("./get-token.schema.zod.cjs");
|
|
|
30
30
|
var zodValidator = (0, import_validation.getValidator)(import_get_token_schema_zod.getTokenFnInputSchema);
|
|
31
31
|
function getToken(options, input = {}, fnOptions) {
|
|
32
32
|
const { client } = options;
|
|
33
|
-
|
|
34
|
-
input,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
if (!input.token && !input.foreign && !client.getConfig("token")) {
|
|
34
|
+
throw new import_errors.ValidationError({ input }, `token is required if no default set`);
|
|
35
|
+
}
|
|
36
|
+
const inputCopy = zodValidator.validateInputWOptions(input, fnOptions);
|
|
37
|
+
if (inputCopy.foreign) {
|
|
38
|
+
console.log(".foreign is deprecated, use .token");
|
|
39
|
+
}
|
|
40
|
+
if ("token" in input && input.token === void 0) {
|
|
41
|
+
throw new import_errors.ValidationError({ input }, `undefined provided for token`);
|
|
42
|
+
}
|
|
43
|
+
if ("foreign" in input && input.foreign === void 0) {
|
|
44
|
+
throw new import_errors.ValidationError({ input }, `undefined provided for foreign`);
|
|
45
|
+
}
|
|
46
|
+
const token = inputCopy.token || inputCopy.foreign || client.getConfig("token");
|
|
40
47
|
if (token === void 0) {
|
|
41
48
|
throw new import_errors.InputError("INPUT_NEEDS_TOKEN", { input });
|
|
42
49
|
}
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
// src/fns/get-token/get-token.ts
|
|
2
|
-
import { InputError } from "../../lib/errors.js";
|
|
3
|
-
import {
|
|
2
|
+
import { InputError, ValidationError } from "../../lib/errors.js";
|
|
3
|
+
import { getForeign } from "../../lib/utils.js";
|
|
4
4
|
import { getValidator } from "../../lib/validation.js";
|
|
5
5
|
import { getTokenFnInputSchema } from "./get-token.schema.zod.js";
|
|
6
6
|
var zodValidator = getValidator(getTokenFnInputSchema);
|
|
7
7
|
function getToken(options, input = {}, fnOptions) {
|
|
8
8
|
const { client } = options;
|
|
9
|
-
|
|
10
|
-
input,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
)
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
if (!input.token && !input.foreign && !client.getConfig("token")) {
|
|
10
|
+
throw new ValidationError({ input }, `token is required if no default set`);
|
|
11
|
+
}
|
|
12
|
+
const inputCopy = zodValidator.validateInputWOptions(input, fnOptions);
|
|
13
|
+
if (inputCopy.foreign) {
|
|
14
|
+
console.log(".foreign is deprecated, use .token");
|
|
15
|
+
}
|
|
16
|
+
if ("token" in input && input.token === void 0) {
|
|
17
|
+
throw new ValidationError({ input }, `undefined provided for token`);
|
|
18
|
+
}
|
|
19
|
+
if ("foreign" in input && input.foreign === void 0) {
|
|
20
|
+
throw new ValidationError({ input }, `undefined provided for foreign`);
|
|
21
|
+
}
|
|
22
|
+
const token = inputCopy.token || inputCopy.foreign || client.getConfig("token");
|
|
16
23
|
if (token === void 0) {
|
|
17
24
|
throw new InputError("INPUT_NEEDS_TOKEN", { input });
|
|
18
25
|
}
|
|
@@ -34,7 +34,8 @@ var getTokenFnOptionsSchema = import_get_token_schema_zod.getTokenTxInputOptions
|
|
|
34
34
|
"Optional flags for input"
|
|
35
35
|
);
|
|
36
36
|
var getTokenInputSchema = import_zod.z.object({
|
|
37
|
-
foreign: import_consts.allowedStringIntSchema.describe("Foreign of the token")
|
|
37
|
+
foreign: import_consts.allowedStringIntSchema.describe("Foreign of the token"),
|
|
38
|
+
token: import_consts.allowedStringIntSchema.describe("Foreign of the token")
|
|
38
39
|
}).partial();
|
|
39
40
|
var getTokenFnInputSchema = getTokenInputSchema.extend({
|
|
40
41
|
options: getTokenFnOptionsSchema.optional()
|
|
@@ -9,7 +9,8 @@ var getTokenFnOptionsSchema = getTokenTxInputOptionsSchema.describe(
|
|
|
9
9
|
"Optional flags for input"
|
|
10
10
|
);
|
|
11
11
|
var getTokenInputSchema = z.object({
|
|
12
|
-
foreign: allowedStringIntSchema.describe("Foreign of the token")
|
|
12
|
+
foreign: allowedStringIntSchema.describe("Foreign of the token"),
|
|
13
|
+
token: allowedStringIntSchema.describe("Foreign of the token")
|
|
13
14
|
}).partial();
|
|
14
15
|
var getTokenFnInputSchema = getTokenInputSchema.extend({
|
|
15
16
|
options: getTokenFnOptionsSchema.optional()
|
|
@@ -34,7 +34,8 @@ var getTokenFnOptionsSchema = import_get_token_schema_zod.getTokenTxInputOptions
|
|
|
34
34
|
"Optional flags for input"
|
|
35
35
|
);
|
|
36
36
|
var getTokenInputSchema = import_zod.z.object({
|
|
37
|
-
foreign: import_consts.allowedStringIntSchema.describe("Foreign of the token")
|
|
37
|
+
foreign: import_consts.allowedStringIntSchema.describe("Foreign of the token"),
|
|
38
|
+
token: import_consts.allowedStringIntSchema.describe("Foreign of the token")
|
|
38
39
|
}).partial();
|
|
39
40
|
var getTokenFnInputSchema = getTokenInputSchema.extend({
|
|
40
41
|
options: getTokenFnOptionsSchema.optional()
|
|
@@ -9,7 +9,8 @@ var getTokenFnOptionsSchema = getTokenTxInputOptionsSchema.describe(
|
|
|
9
9
|
"Optional flags for input"
|
|
10
10
|
);
|
|
11
11
|
var getTokenInputSchema = z.object({
|
|
12
|
-
foreign: allowedStringIntSchema.describe("Foreign of the token")
|
|
12
|
+
foreign: allowedStringIntSchema.describe("Foreign of the token"),
|
|
13
|
+
token: allowedStringIntSchema.describe("Foreign of the token")
|
|
13
14
|
}).partial();
|
|
14
15
|
var getTokenFnInputSchema = getTokenInputSchema.extend({
|
|
15
16
|
options: getTokenFnOptionsSchema.optional()
|
package/dist/lib/env.browser.cjs
CHANGED
|
@@ -24,7 +24,7 @@ __export(env_exports, {
|
|
|
24
24
|
getEnvConfig: () => getEnvConfig
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(env_exports);
|
|
27
|
-
var CLIENT_VERSION = "0.14.
|
|
27
|
+
var CLIENT_VERSION = "0.14.4";
|
|
28
28
|
function getEnvConfig(key, defaultValue) {
|
|
29
29
|
const val = getVariable(key);
|
|
30
30
|
if (val === void 0) {
|
package/dist/lib/env.browser.js
CHANGED
package/dist/lib/env.cjs
CHANGED
|
@@ -24,7 +24,7 @@ __export(env_exports, {
|
|
|
24
24
|
getEnvConfig: () => getEnvConfig
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(env_exports);
|
|
27
|
-
var CLIENT_VERSION = "0.14.
|
|
27
|
+
var CLIENT_VERSION = "0.14.4";
|
|
28
28
|
function getEnvConfig(key, defaultValue) {
|
|
29
29
|
const val = getVariable(key);
|
|
30
30
|
if (val === void 0) {
|
package/dist/lib/env.js
CHANGED
|
@@ -144,6 +144,11 @@ var ERROR_GROUPS = {
|
|
|
144
144
|
code: -10006,
|
|
145
145
|
message: "INPUT_STREAM_NOT_ALLOWED",
|
|
146
146
|
description: "Stream input not allowed for method"
|
|
147
|
+
},
|
|
148
|
+
INVALID_STREAM_START_METHOD: {
|
|
149
|
+
code: -10007,
|
|
150
|
+
message: "INVALID_STREAM_START_METHOD",
|
|
151
|
+
description: "Stream start message invalid, method missing"
|
|
147
152
|
}
|
|
148
153
|
}
|
|
149
154
|
},
|
|
@@ -106,6 +106,11 @@ var ERROR_GROUPS = {
|
|
|
106
106
|
code: -10006,
|
|
107
107
|
message: "INPUT_STREAM_NOT_ALLOWED",
|
|
108
108
|
description: "Stream input not allowed for method"
|
|
109
|
+
},
|
|
110
|
+
INVALID_STREAM_START_METHOD: {
|
|
111
|
+
code: -10007,
|
|
112
|
+
message: "INVALID_STREAM_START_METHOD",
|
|
113
|
+
description: "Stream start message invalid, method missing"
|
|
109
114
|
}
|
|
110
115
|
}
|
|
111
116
|
},
|
package/dist/lib/errors.cjs
CHANGED
|
@@ -144,6 +144,11 @@ var ERROR_GROUPS = {
|
|
|
144
144
|
code: -10006,
|
|
145
145
|
message: "INPUT_STREAM_NOT_ALLOWED",
|
|
146
146
|
description: "Stream input not allowed for method"
|
|
147
|
+
},
|
|
148
|
+
INVALID_STREAM_START_METHOD: {
|
|
149
|
+
code: -10007,
|
|
150
|
+
message: "INVALID_STREAM_START_METHOD",
|
|
151
|
+
description: "Stream start message invalid, method missing"
|
|
147
152
|
}
|
|
148
153
|
}
|
|
149
154
|
},
|
package/dist/lib/errors.js
CHANGED
|
@@ -106,6 +106,11 @@ var ERROR_GROUPS = {
|
|
|
106
106
|
code: -10006,
|
|
107
107
|
message: "INPUT_STREAM_NOT_ALLOWED",
|
|
108
108
|
description: "Stream input not allowed for method"
|
|
109
|
+
},
|
|
110
|
+
INVALID_STREAM_START_METHOD: {
|
|
111
|
+
code: -10007,
|
|
112
|
+
message: "INVALID_STREAM_START_METHOD",
|
|
113
|
+
description: "Stream start message invalid, method missing"
|
|
109
114
|
}
|
|
110
115
|
}
|
|
111
116
|
},
|
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
6
23
|
var __export = (target, all) => {
|
|
7
24
|
for (var name in all)
|
|
8
25
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -34,13 +51,13 @@ var import_consts = require("../consts.browser.cjs");
|
|
|
34
51
|
var import_consts2 = require("../../db/consts.browser.cjs");
|
|
35
52
|
var import_transfer_log_schema_zod = require("../../db/transfer-log/transfer-log.schema.zod.browser.cjs");
|
|
36
53
|
var import_wapi_apikey_schema_zod = require("../../db/wapi-apikey/wapi-apikey.schema.zod.browser.cjs");
|
|
37
|
-
var findApikeyManyTxInputOptionsSchema = import_consts.iTxGeneralOptions.
|
|
54
|
+
var findApikeyManyTxInputOptionsSchema = import_zod.z.object(__spreadProps(__spreadValues(__spreadValues(__spreadValues({}, import_consts.iTxGeneralOptions.shape), import_consts.iTxLimitingOptions.shape), import_consts.iTxMetadataOptions.shape), {
|
|
38
55
|
order: import_consts.iTxOrderingInput.extend({
|
|
39
56
|
field: import_transfer_log_schema_zod.transferLogTableSchema.keyof()
|
|
40
57
|
}).array(),
|
|
41
58
|
select: import_wapi_apikey_schema_zod.wapiApikeyTableSchema.keyof().array(),
|
|
42
59
|
deselect: import_wapi_apikey_schema_zod.wapiApikeyTableSchema.keyof().array()
|
|
43
|
-
}).partial();
|
|
60
|
+
})).partial();
|
|
44
61
|
var apikeyFilterObjectInputSchema = import_zod.z.object({
|
|
45
62
|
type: import_wapi_apikey_schema_zod.wapiApikeyTableTypeSchema,
|
|
46
63
|
status: import_wapi_apikey_schema_zod.wapiApikeyTableStatusSchema,
|
|
@@ -56,8 +73,8 @@ var advancedApikeyFilterSchema = (0, import_consts2.getDbFilter)(
|
|
|
56
73
|
apikeyFilterFullInputSchema
|
|
57
74
|
);
|
|
58
75
|
var apikeyFilterSchema = import_zod.z.union([
|
|
59
|
-
|
|
60
|
-
|
|
76
|
+
advancedApikeyFilterSchema.array(),
|
|
77
|
+
apikeyFilterObjectInputSchema
|
|
61
78
|
]);
|
|
62
79
|
var findApikeyManyTxInputSchema = import_zod.z.object({
|
|
63
80
|
apikey: apikeyFilterSchema,
|
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
|
|
1
21
|
// src/txs/find-apikey-many/find-apikey-many.schema.zod.ts
|
|
2
22
|
import { z } from "../../lib/zod.browser.js";
|
|
3
23
|
import {
|
|
@@ -14,13 +34,13 @@ import {
|
|
|
14
34
|
wapiApikeyTableStatusSchema,
|
|
15
35
|
wapiApikeyTableTypeSchema
|
|
16
36
|
} from "../../db/wapi-apikey/wapi-apikey.schema.zod.browser.js";
|
|
17
|
-
var findApikeyManyTxInputOptionsSchema = iTxGeneralOptions.
|
|
37
|
+
var findApikeyManyTxInputOptionsSchema = z.object(__spreadProps(__spreadValues(__spreadValues(__spreadValues({}, iTxGeneralOptions.shape), iTxLimitingOptions.shape), iTxMetadataOptions.shape), {
|
|
18
38
|
order: iTxOrderingInput.extend({
|
|
19
39
|
field: transferLogTableSchema.keyof()
|
|
20
40
|
}).array(),
|
|
21
41
|
select: wapiApikeyTableSchema.keyof().array(),
|
|
22
42
|
deselect: wapiApikeyTableSchema.keyof().array()
|
|
23
|
-
}).partial();
|
|
43
|
+
})).partial();
|
|
24
44
|
var apikeyFilterObjectInputSchema = z.object({
|
|
25
45
|
type: wapiApikeyTableTypeSchema,
|
|
26
46
|
status: wapiApikeyTableStatusSchema,
|
|
@@ -36,8 +56,8 @@ var advancedApikeyFilterSchema = getDbFilter(
|
|
|
36
56
|
apikeyFilterFullInputSchema
|
|
37
57
|
);
|
|
38
58
|
var apikeyFilterSchema = z.union([
|
|
39
|
-
|
|
40
|
-
|
|
59
|
+
advancedApikeyFilterSchema.array(),
|
|
60
|
+
apikeyFilterObjectInputSchema
|
|
41
61
|
]);
|
|
42
62
|
var findApikeyManyTxInputSchema = z.object({
|
|
43
63
|
apikey: apikeyFilterSchema,
|
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
6
23
|
var __export = (target, all) => {
|
|
7
24
|
for (var name in all)
|
|
8
25
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -34,13 +51,13 @@ var import_consts = require("../consts.cjs");
|
|
|
34
51
|
var import_consts2 = require("../../db/consts.cjs");
|
|
35
52
|
var import_transfer_log_schema_zod = require("../../db/transfer-log/transfer-log.schema.zod.cjs");
|
|
36
53
|
var import_wapi_apikey_schema_zod = require("../../db/wapi-apikey/wapi-apikey.schema.zod.cjs");
|
|
37
|
-
var findApikeyManyTxInputOptionsSchema = import_consts.iTxGeneralOptions.
|
|
54
|
+
var findApikeyManyTxInputOptionsSchema = import_zod.z.object(__spreadProps(__spreadValues(__spreadValues(__spreadValues({}, import_consts.iTxGeneralOptions.shape), import_consts.iTxLimitingOptions.shape), import_consts.iTxMetadataOptions.shape), {
|
|
38
55
|
order: import_consts.iTxOrderingInput.extend({
|
|
39
56
|
field: import_transfer_log_schema_zod.transferLogTableSchema.keyof()
|
|
40
57
|
}).array(),
|
|
41
58
|
select: import_wapi_apikey_schema_zod.wapiApikeyTableSchema.keyof().array(),
|
|
42
59
|
deselect: import_wapi_apikey_schema_zod.wapiApikeyTableSchema.keyof().array()
|
|
43
|
-
}).partial();
|
|
60
|
+
})).partial();
|
|
44
61
|
var apikeyFilterObjectInputSchema = import_zod.z.object({
|
|
45
62
|
type: import_wapi_apikey_schema_zod.wapiApikeyTableTypeSchema,
|
|
46
63
|
status: import_wapi_apikey_schema_zod.wapiApikeyTableStatusSchema,
|
|
@@ -56,8 +73,8 @@ var advancedApikeyFilterSchema = (0, import_consts2.getDbFilter)(
|
|
|
56
73
|
apikeyFilterFullInputSchema
|
|
57
74
|
);
|
|
58
75
|
var apikeyFilterSchema = import_zod.z.union([
|
|
59
|
-
|
|
60
|
-
|
|
76
|
+
advancedApikeyFilterSchema.array(),
|
|
77
|
+
apikeyFilterObjectInputSchema
|
|
61
78
|
]);
|
|
62
79
|
var findApikeyManyTxInputSchema = import_zod.z.object({
|
|
63
80
|
apikey: apikeyFilterSchema,
|
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
|
|
1
21
|
// src/txs/find-apikey-many/find-apikey-many.schema.zod.ts
|
|
2
22
|
import { z } from "../../lib/zod.js";
|
|
3
23
|
import {
|
|
@@ -14,13 +34,13 @@ import {
|
|
|
14
34
|
wapiApikeyTableStatusSchema,
|
|
15
35
|
wapiApikeyTableTypeSchema
|
|
16
36
|
} from "../../db/wapi-apikey/wapi-apikey.schema.zod.js";
|
|
17
|
-
var findApikeyManyTxInputOptionsSchema = iTxGeneralOptions.
|
|
37
|
+
var findApikeyManyTxInputOptionsSchema = z.object(__spreadProps(__spreadValues(__spreadValues(__spreadValues({}, iTxGeneralOptions.shape), iTxLimitingOptions.shape), iTxMetadataOptions.shape), {
|
|
18
38
|
order: iTxOrderingInput.extend({
|
|
19
39
|
field: transferLogTableSchema.keyof()
|
|
20
40
|
}).array(),
|
|
21
41
|
select: wapiApikeyTableSchema.keyof().array(),
|
|
22
42
|
deselect: wapiApikeyTableSchema.keyof().array()
|
|
23
|
-
}).partial();
|
|
43
|
+
})).partial();
|
|
24
44
|
var apikeyFilterObjectInputSchema = z.object({
|
|
25
45
|
type: wapiApikeyTableTypeSchema,
|
|
26
46
|
status: wapiApikeyTableStatusSchema,
|
|
@@ -36,8 +56,8 @@ var advancedApikeyFilterSchema = getDbFilter(
|
|
|
36
56
|
apikeyFilterFullInputSchema
|
|
37
57
|
);
|
|
38
58
|
var apikeyFilterSchema = z.union([
|
|
39
|
-
|
|
40
|
-
|
|
59
|
+
advancedApikeyFilterSchema.array(),
|
|
60
|
+
apikeyFilterObjectInputSchema
|
|
41
61
|
]);
|
|
42
62
|
var findApikeyManyTxInputSchema = z.object({
|
|
43
63
|
apikey: apikeyFilterSchema,
|
|
@@ -127,7 +127,8 @@ var getBalanceHistoryOrderingOptionsSchema = import_zod.z.object({
|
|
|
127
127
|
}).describe("Ordering options");
|
|
128
128
|
var balanceHistoryFields = balanceHistorySchema.keyof();
|
|
129
129
|
var getBalanceHistorySelectOptionsSchema = import_zod.z.object({
|
|
130
|
-
select: balanceHistoryFields.array()
|
|
130
|
+
select: balanceHistoryFields.array(),
|
|
131
|
+
deselect: balanceHistoryFields.array()
|
|
131
132
|
}).describe("Optional flags to limit search result");
|
|
132
133
|
var getBalanceHistoryTxInputOptionsSchema = import_zod.z.object(__spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, import_consts.iTxGeneralOptions.shape), import_consts.iTxLimitingOptions.shape), import_consts.iTxMetadataOptions.shape), getBalanceHistoryAdditionalOptionsSchema.shape), getBalanceHistoryOrderingOptionsSchema.shape), getBalanceHistorySelectOptionsSchema.shape), {
|
|
133
134
|
return_all_intervals: import_consts.iTxTimeFilter.describe(
|
|
@@ -109,7 +109,8 @@ var getBalanceHistoryOrderingOptionsSchema = z.object({
|
|
|
109
109
|
}).describe("Ordering options");
|
|
110
110
|
var balanceHistoryFields = balanceHistorySchema.keyof();
|
|
111
111
|
var getBalanceHistorySelectOptionsSchema = z.object({
|
|
112
|
-
select: balanceHistoryFields.array()
|
|
112
|
+
select: balanceHistoryFields.array(),
|
|
113
|
+
deselect: balanceHistoryFields.array()
|
|
113
114
|
}).describe("Optional flags to limit search result");
|
|
114
115
|
var getBalanceHistoryTxInputOptionsSchema = z.object(__spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, iTxGeneralOptions.shape), iTxLimitingOptions.shape), iTxMetadataOptions.shape), getBalanceHistoryAdditionalOptionsSchema.shape), getBalanceHistoryOrderingOptionsSchema.shape), getBalanceHistorySelectOptionsSchema.shape), {
|
|
115
116
|
return_all_intervals: iTxTimeFilter.describe(
|
|
@@ -127,7 +127,8 @@ var getBalanceHistoryOrderingOptionsSchema = import_zod.z.object({
|
|
|
127
127
|
}).describe("Ordering options");
|
|
128
128
|
var balanceHistoryFields = balanceHistorySchema.keyof();
|
|
129
129
|
var getBalanceHistorySelectOptionsSchema = import_zod.z.object({
|
|
130
|
-
select: balanceHistoryFields.array()
|
|
130
|
+
select: balanceHistoryFields.array(),
|
|
131
|
+
deselect: balanceHistoryFields.array()
|
|
131
132
|
}).describe("Optional flags to limit search result");
|
|
132
133
|
var getBalanceHistoryTxInputOptionsSchema = import_zod.z.object(__spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, import_consts.iTxGeneralOptions.shape), import_consts.iTxLimitingOptions.shape), import_consts.iTxMetadataOptions.shape), getBalanceHistoryAdditionalOptionsSchema.shape), getBalanceHistoryOrderingOptionsSchema.shape), getBalanceHistorySelectOptionsSchema.shape), {
|
|
133
134
|
return_all_intervals: import_consts.iTxTimeFilter.describe(
|
|
@@ -109,7 +109,8 @@ var getBalanceHistoryOrderingOptionsSchema = z.object({
|
|
|
109
109
|
}).describe("Ordering options");
|
|
110
110
|
var balanceHistoryFields = balanceHistorySchema.keyof();
|
|
111
111
|
var getBalanceHistorySelectOptionsSchema = z.object({
|
|
112
|
-
select: balanceHistoryFields.array()
|
|
112
|
+
select: balanceHistoryFields.array(),
|
|
113
|
+
deselect: balanceHistoryFields.array()
|
|
113
114
|
}).describe("Optional flags to limit search result");
|
|
114
115
|
var getBalanceHistoryTxInputOptionsSchema = z.object(__spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, iTxGeneralOptions.shape), iTxLimitingOptions.shape), iTxMetadataOptions.shape), getBalanceHistoryAdditionalOptionsSchema.shape), getBalanceHistoryOrderingOptionsSchema.shape), getBalanceHistorySelectOptionsSchema.shape), {
|
|
115
116
|
return_all_intervals: iTxTimeFilter.describe(
|