wapi-client 0.16.0 → 0.17.0
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/client.browser.cjs +109 -0
- package/dist/client.browser.js +109 -0
- package/dist/client.cjs +109 -0
- package/dist/client.js +109 -0
- package/dist/fns/create-apikey/create-apikey.browser.cjs +51 -0
- package/dist/fns/create-apikey/create-apikey.browser.js +32 -0
- package/dist/fns/create-apikey/create-apikey.cjs +55 -0
- package/dist/fns/create-apikey/create-apikey.enums.browser.cjs +18 -0
- package/dist/fns/create-apikey/create-apikey.enums.browser.js +0 -0
- package/dist/fns/create-apikey/create-apikey.enums.cjs +18 -0
- package/dist/fns/create-apikey/create-apikey.enums.js +0 -0
- package/dist/fns/create-apikey/create-apikey.js +32 -0
- package/dist/fns/create-apikey/create-apikey.schema.zod.browser.cjs +49 -0
- package/dist/fns/create-apikey/create-apikey.schema.zod.browser.js +32 -0
- package/dist/fns/create-apikey/create-apikey.schema.zod.cjs +57 -0
- package/dist/fns/create-apikey/create-apikey.schema.zod.js +32 -0
- package/dist/fns/find-apikeys/find-apikeys.browser.cjs +49 -0
- package/dist/fns/find-apikeys/find-apikeys.browser.js +33 -0
- package/dist/fns/find-apikeys/find-apikeys.cjs +53 -0
- package/dist/fns/find-apikeys/find-apikeys.enums.browser.cjs +18 -0
- package/dist/fns/find-apikeys/find-apikeys.enums.browser.js +0 -0
- package/dist/fns/find-apikeys/find-apikeys.enums.cjs +18 -0
- package/dist/fns/find-apikeys/find-apikeys.enums.js +0 -0
- package/dist/fns/find-apikeys/find-apikeys.js +33 -0
- package/dist/fns/find-apikeys/find-apikeys.schema.zod.browser.cjs +64 -0
- package/dist/fns/find-apikeys/find-apikeys.schema.zod.browser.js +52 -0
- package/dist/fns/find-apikeys/find-apikeys.schema.zod.cjs +72 -0
- package/dist/fns/find-apikeys/find-apikeys.schema.zod.js +52 -0
- package/dist/fns/fn-types.browser.cjs +2 -0
- package/dist/fns/fn-types.browser.js +2 -0
- package/dist/fns/fn-types.cjs +4 -0
- package/dist/fns/fn-types.js +2 -0
- package/dist/fns/update-apikey/update-apikey.browser.cjs +41 -0
- package/dist/fns/update-apikey/update-apikey.browser.js +20 -0
- package/dist/fns/update-apikey/update-apikey.cjs +45 -0
- package/dist/fns/update-apikey/update-apikey.enums.browser.cjs +18 -0
- package/dist/fns/update-apikey/update-apikey.enums.browser.js +0 -0
- package/dist/fns/update-apikey/update-apikey.enums.cjs +18 -0
- package/dist/fns/update-apikey/update-apikey.enums.js +0 -0
- package/dist/fns/update-apikey/update-apikey.js +20 -0
- package/dist/fns/update-apikey/update-apikey.schema.zod.browser.cjs +48 -0
- package/dist/fns/update-apikey/update-apikey.schema.zod.browser.js +30 -0
- package/dist/fns/update-apikey/update-apikey.schema.zod.cjs +56 -0
- package/dist/fns/update-apikey/update-apikey.schema.zod.js +30 -0
- 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 +15 -0
- package/dist/lib/errors.browser.js +15 -0
- package/dist/lib/errors.cjs +15 -0
- package/dist/lib/errors.js +15 -0
- package/dist/lib/validator.browser.cjs +15 -6
- package/dist/lib/validator.browser.js +18 -0
- package/dist/lib/validator.cjs +15 -6
- package/dist/lib/validator.js +18 -0
- package/dist/txs/consts.browser.cjs +4 -1
- package/dist/txs/consts.browser.js +4 -1
- package/dist/txs/consts.cjs +4 -1
- package/dist/txs/consts.js +4 -1
- package/dist/txs/create-apikey/create-apikey.schema.zod.browser.cjs +6 -4
- package/dist/txs/create-apikey/create-apikey.schema.zod.browser.js +7 -5
- package/dist/txs/create-apikey/create-apikey.schema.zod.cjs +6 -4
- package/dist/txs/create-apikey/create-apikey.schema.zod.js +7 -5
- package/dist/txs/find-apikey-many/find-apikey-many.schema.zod.browser.cjs +1 -2
- package/dist/txs/find-apikey-many/find-apikey-many.schema.zod.browser.js +1 -2
- package/dist/txs/find-apikey-many/find-apikey-many.schema.zod.cjs +1 -2
- package/dist/txs/find-apikey-many/find-apikey-many.schema.zod.js +1 -2
- package/dist/txs/get-balance/get-balance.schema.zod.browser.cjs +1 -1
- package/dist/txs/get-balance/get-balance.schema.zod.browser.js +1 -1
- package/dist/txs/get-balance/get-balance.schema.zod.cjs +1 -1
- package/dist/txs/get-balance/get-balance.schema.zod.js +1 -1
- package/dist/txs/get-balance-history/get-balance-history.schema.zod.browser.cjs +1 -0
- package/dist/txs/get-balance-history/get-balance-history.schema.zod.browser.js +1 -0
- package/dist/txs/get-balance-history/get-balance-history.schema.zod.cjs +1 -0
- package/dist/txs/get-balance-history/get-balance-history.schema.zod.js +1 -0
- package/dist/types/wapi-client.d.ts +2029 -1217
- package/dist/wapi-client-web.iife.js +6 -6
- package/dist/wapi-client.iife.js +6 -6
- package/package.json +1 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
+
var __objRest = (source, exclude) => {
|
|
9
|
+
var target = {};
|
|
10
|
+
for (var prop in source)
|
|
11
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
12
|
+
target[prop] = source[prop];
|
|
13
|
+
if (source != null && __getOwnPropSymbols)
|
|
14
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
15
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
16
|
+
target[prop] = source[prop];
|
|
17
|
+
}
|
|
18
|
+
return target;
|
|
19
|
+
};
|
|
20
|
+
var __export = (target, all) => {
|
|
21
|
+
for (var name in all)
|
|
22
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
23
|
+
};
|
|
24
|
+
var __copyProps = (to, from, except, desc) => {
|
|
25
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
26
|
+
for (let key of __getOwnPropNames(from))
|
|
27
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
28
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
29
|
+
}
|
|
30
|
+
return to;
|
|
31
|
+
};
|
|
32
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
33
|
+
|
|
34
|
+
// src/fns/create-apikey/create-apikey.ts
|
|
35
|
+
var create_apikey_exports = {};
|
|
36
|
+
__export(create_apikey_exports, {
|
|
37
|
+
createApikey: () => createApikey
|
|
38
|
+
});
|
|
39
|
+
module.exports = __toCommonJS(create_apikey_exports);
|
|
40
|
+
var import_validation = require("../../lib/validation.cjs");
|
|
41
|
+
var import_create_apikey_schema_zod = require("./create-apikey.schema.zod.cjs");
|
|
42
|
+
var zodValidator = (0, import_validation.getValidator)(import_create_apikey_schema_zod.createApikeyFnInputSchema);
|
|
43
|
+
function createApikey(options, input, fnOptions) {
|
|
44
|
+
const { client } = options;
|
|
45
|
+
const inputCopy = zodValidator.validateInputWOptions(input, fnOptions);
|
|
46
|
+
const _a = inputCopy, { options: clientOptions } = _a, apikey = __objRest(_a, ["options"]);
|
|
47
|
+
return client.api.createApikey({
|
|
48
|
+
apikey,
|
|
49
|
+
options: clientOptions
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
53
|
+
0 && (module.exports = {
|
|
54
|
+
createApikey
|
|
55
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/fns/create-apikey/create-apikey.enums.ts
|
|
17
|
+
var create_apikey_enums_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(create_apikey_enums_exports);
|
|
File without changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/fns/create-apikey/create-apikey.enums.ts
|
|
17
|
+
var create_apikey_enums_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(create_apikey_enums_exports);
|
|
File without changes
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
2
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
3
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var __objRest = (source, exclude) => {
|
|
5
|
+
var target = {};
|
|
6
|
+
for (var prop in source)
|
|
7
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
8
|
+
target[prop] = source[prop];
|
|
9
|
+
if (source != null && __getOwnPropSymbols)
|
|
10
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
11
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
12
|
+
target[prop] = source[prop];
|
|
13
|
+
}
|
|
14
|
+
return target;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
// src/fns/create-apikey/create-apikey.ts
|
|
18
|
+
import { getValidator } from "../../lib/validation.js";
|
|
19
|
+
import { createApikeyFnInputSchema } from "./create-apikey.schema.zod.js";
|
|
20
|
+
var zodValidator = getValidator(createApikeyFnInputSchema);
|
|
21
|
+
function createApikey(options, input, fnOptions) {
|
|
22
|
+
const { client } = options;
|
|
23
|
+
const inputCopy = zodValidator.validateInputWOptions(input, fnOptions);
|
|
24
|
+
const _a = inputCopy, { options: clientOptions } = _a, apikey = __objRest(_a, ["options"]);
|
|
25
|
+
return client.api.createApikey({
|
|
26
|
+
apikey,
|
|
27
|
+
options: clientOptions
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
createApikey
|
|
32
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/fns/create-apikey/create-apikey.schema.zod.ts
|
|
21
|
+
var create_apikey_schema_zod_exports = {};
|
|
22
|
+
__export(create_apikey_schema_zod_exports, {
|
|
23
|
+
config: () => config,
|
|
24
|
+
createApikeyFnInputSchema: () => createApikeyFnInputSchema,
|
|
25
|
+
createApikeyFnOptionsSchema: () => createApikeyFnOptionsSchema,
|
|
26
|
+
createApikeyFnOutputSchema: () => createApikeyFnOutputSchema,
|
|
27
|
+
createApikeyInputSchema: () => createApikeyInputSchema
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(create_apikey_schema_zod_exports);
|
|
30
|
+
var import_create_apikey_schema_zod = require("../../txs/create-apikey/create-apikey.schema.zod.browser.cjs");
|
|
31
|
+
var import_zod = require("../../lib/zod.browser.cjs");
|
|
32
|
+
var import_consts = require("../../db/consts.browser.cjs");
|
|
33
|
+
var createApikeyFnOptionsSchema = import_create_apikey_schema_zod.createApikeyTxInputOptionsSchema.describe("Optional flags for input");
|
|
34
|
+
var createApikeyInputSchema = import_zod.z.object({
|
|
35
|
+
type: import_zod.z.enum(["admin", "limited"]).describe("Type of the Apikey"),
|
|
36
|
+
description: import_zod.z.string().describe("Description of the accessKey"),
|
|
37
|
+
functions: import_create_apikey_schema_zod.createApikeyFunctionsSchema.array().optional().describe("Scopes for limited apikey, will be ignored if type is admin"),
|
|
38
|
+
valid_until: import_consts.DatetimeSchema.optional().describe(
|
|
39
|
+
"ApiKey expiration datetime"
|
|
40
|
+
),
|
|
41
|
+
metadata: import_consts.MetadataSchema.optional()
|
|
42
|
+
}).describe("Apikey configuration");
|
|
43
|
+
var createApikeyFnInputSchema = createApikeyInputSchema.extend({
|
|
44
|
+
options: import_create_apikey_schema_zod.createApikeyTxInputOptionsSchema.optional()
|
|
45
|
+
}).describe("Input for createApikey");
|
|
46
|
+
var createApikeyFnOutputSchema = import_create_apikey_schema_zod.createApikeyTxOutputSchema.describe(
|
|
47
|
+
"Output of createApikey"
|
|
48
|
+
);
|
|
49
|
+
var config = {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// src/fns/create-apikey/create-apikey.schema.zod.ts
|
|
2
|
+
import {
|
|
3
|
+
createApikeyTxInputOptionsSchema,
|
|
4
|
+
createApikeyTxOutputSchema,
|
|
5
|
+
createApikeyFunctionsSchema
|
|
6
|
+
} from "../../txs/create-apikey/create-apikey.schema.zod.browser.js";
|
|
7
|
+
import { z } from "../../lib/zod.browser.js";
|
|
8
|
+
import { DatetimeSchema, MetadataSchema } from "../../db/consts.browser.js";
|
|
9
|
+
var createApikeyFnOptionsSchema = createApikeyTxInputOptionsSchema.describe("Optional flags for input");
|
|
10
|
+
var createApikeyInputSchema = z.object({
|
|
11
|
+
type: z.enum(["admin", "limited"]).describe("Type of the Apikey"),
|
|
12
|
+
description: z.string().describe("Description of the accessKey"),
|
|
13
|
+
functions: createApikeyFunctionsSchema.array().optional().describe("Scopes for limited apikey, will be ignored if type is admin"),
|
|
14
|
+
valid_until: DatetimeSchema.optional().describe(
|
|
15
|
+
"ApiKey expiration datetime"
|
|
16
|
+
),
|
|
17
|
+
metadata: MetadataSchema.optional()
|
|
18
|
+
}).describe("Apikey configuration");
|
|
19
|
+
var createApikeyFnInputSchema = createApikeyInputSchema.extend({
|
|
20
|
+
options: createApikeyTxInputOptionsSchema.optional()
|
|
21
|
+
}).describe("Input for createApikey");
|
|
22
|
+
var createApikeyFnOutputSchema = createApikeyTxOutputSchema.describe(
|
|
23
|
+
"Output of createApikey"
|
|
24
|
+
);
|
|
25
|
+
var config = {};
|
|
26
|
+
export {
|
|
27
|
+
config,
|
|
28
|
+
createApikeyFnInputSchema,
|
|
29
|
+
createApikeyFnOptionsSchema,
|
|
30
|
+
createApikeyFnOutputSchema,
|
|
31
|
+
createApikeyInputSchema
|
|
32
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/fns/create-apikey/create-apikey.schema.zod.ts
|
|
21
|
+
var create_apikey_schema_zod_exports = {};
|
|
22
|
+
__export(create_apikey_schema_zod_exports, {
|
|
23
|
+
config: () => config,
|
|
24
|
+
createApikeyFnInputSchema: () => createApikeyFnInputSchema,
|
|
25
|
+
createApikeyFnOptionsSchema: () => createApikeyFnOptionsSchema,
|
|
26
|
+
createApikeyFnOutputSchema: () => createApikeyFnOutputSchema,
|
|
27
|
+
createApikeyInputSchema: () => createApikeyInputSchema
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(create_apikey_schema_zod_exports);
|
|
30
|
+
var import_create_apikey_schema_zod = require("../../txs/create-apikey/create-apikey.schema.zod.cjs");
|
|
31
|
+
var import_zod = require("../../lib/zod.cjs");
|
|
32
|
+
var import_consts = require("../../db/consts.cjs");
|
|
33
|
+
var createApikeyFnOptionsSchema = import_create_apikey_schema_zod.createApikeyTxInputOptionsSchema.describe("Optional flags for input");
|
|
34
|
+
var createApikeyInputSchema = import_zod.z.object({
|
|
35
|
+
type: import_zod.z.enum(["admin", "limited"]).describe("Type of the Apikey"),
|
|
36
|
+
description: import_zod.z.string().describe("Description of the accessKey"),
|
|
37
|
+
functions: import_create_apikey_schema_zod.createApikeyFunctionsSchema.array().optional().describe("Scopes for limited apikey, will be ignored if type is admin"),
|
|
38
|
+
valid_until: import_consts.DatetimeSchema.optional().describe(
|
|
39
|
+
"ApiKey expiration datetime"
|
|
40
|
+
),
|
|
41
|
+
metadata: import_consts.MetadataSchema.optional()
|
|
42
|
+
}).describe("Apikey configuration");
|
|
43
|
+
var createApikeyFnInputSchema = createApikeyInputSchema.extend({
|
|
44
|
+
options: import_create_apikey_schema_zod.createApikeyTxInputOptionsSchema.optional()
|
|
45
|
+
}).describe("Input for createApikey");
|
|
46
|
+
var createApikeyFnOutputSchema = import_create_apikey_schema_zod.createApikeyTxOutputSchema.describe(
|
|
47
|
+
"Output of createApikey"
|
|
48
|
+
);
|
|
49
|
+
var config = {};
|
|
50
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
51
|
+
0 && (module.exports = {
|
|
52
|
+
config,
|
|
53
|
+
createApikeyFnInputSchema,
|
|
54
|
+
createApikeyFnOptionsSchema,
|
|
55
|
+
createApikeyFnOutputSchema,
|
|
56
|
+
createApikeyInputSchema
|
|
57
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// src/fns/create-apikey/create-apikey.schema.zod.ts
|
|
2
|
+
import {
|
|
3
|
+
createApikeyTxInputOptionsSchema,
|
|
4
|
+
createApikeyTxOutputSchema,
|
|
5
|
+
createApikeyFunctionsSchema
|
|
6
|
+
} from "../../txs/create-apikey/create-apikey.schema.zod.js";
|
|
7
|
+
import { z } from "../../lib/zod.js";
|
|
8
|
+
import { DatetimeSchema, MetadataSchema } from "../../db/consts.js";
|
|
9
|
+
var createApikeyFnOptionsSchema = createApikeyTxInputOptionsSchema.describe("Optional flags for input");
|
|
10
|
+
var createApikeyInputSchema = z.object({
|
|
11
|
+
type: z.enum(["admin", "limited"]).describe("Type of the Apikey"),
|
|
12
|
+
description: z.string().describe("Description of the accessKey"),
|
|
13
|
+
functions: createApikeyFunctionsSchema.array().optional().describe("Scopes for limited apikey, will be ignored if type is admin"),
|
|
14
|
+
valid_until: DatetimeSchema.optional().describe(
|
|
15
|
+
"ApiKey expiration datetime"
|
|
16
|
+
),
|
|
17
|
+
metadata: MetadataSchema.optional()
|
|
18
|
+
}).describe("Apikey configuration");
|
|
19
|
+
var createApikeyFnInputSchema = createApikeyInputSchema.extend({
|
|
20
|
+
options: createApikeyTxInputOptionsSchema.optional()
|
|
21
|
+
}).describe("Input for createApikey");
|
|
22
|
+
var createApikeyFnOutputSchema = createApikeyTxOutputSchema.describe(
|
|
23
|
+
"Output of createApikey"
|
|
24
|
+
);
|
|
25
|
+
var config = {};
|
|
26
|
+
export {
|
|
27
|
+
config,
|
|
28
|
+
createApikeyFnInputSchema,
|
|
29
|
+
createApikeyFnOptionsSchema,
|
|
30
|
+
createApikeyFnOutputSchema,
|
|
31
|
+
createApikeyInputSchema
|
|
32
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/fns/find-apikeys/find-apikeys.ts
|
|
21
|
+
var find_apikeys_exports = {};
|
|
22
|
+
__export(find_apikeys_exports, {
|
|
23
|
+
findApikeys: () => findApikeys
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(find_apikeys_exports);
|
|
26
|
+
var import_find_apikeys_schema_zod = require("./find-apikeys.schema.zod.browser.cjs");
|
|
27
|
+
var import_find_query_builder = require("../../lib/query-builder/find-query-builder.browser.cjs");
|
|
28
|
+
var import_find_apikey_many_schema_zod = require("../../txs/find-apikey-many/find-apikey-many.schema.zod.browser.cjs");
|
|
29
|
+
var import_utils = require("../../lib/utils.browser.cjs");
|
|
30
|
+
var apikeyFilterFullInputSchemaRequired = import_find_apikey_many_schema_zod.apikeyFilterFullInputSchema.required();
|
|
31
|
+
function findApikeys(options, input, fnOptions) {
|
|
32
|
+
const { client } = options;
|
|
33
|
+
const $query = new import_find_query_builder.FindQueryBuilder({
|
|
34
|
+
start(query) {
|
|
35
|
+
return client.api.findApikeyMany({
|
|
36
|
+
apikey: query.filter,
|
|
37
|
+
options: query.options
|
|
38
|
+
});
|
|
39
|
+
},
|
|
40
|
+
schemaBasic: import_find_apikeys_schema_zod.findApikeysInputSchema,
|
|
41
|
+
schema: apikeyFilterFullInputSchemaRequired,
|
|
42
|
+
optionsSchema: import_find_apikeys_schema_zod.findApikeysFnOptionsSchema
|
|
43
|
+
});
|
|
44
|
+
if (input) {
|
|
45
|
+
const { filter, options: options2 } = (0, import_utils.mergeFnOptions)(input, fnOptions);
|
|
46
|
+
return $query.where(filter).options(options2);
|
|
47
|
+
}
|
|
48
|
+
return $query;
|
|
49
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// src/fns/find-apikeys/find-apikeys.ts
|
|
2
|
+
import {
|
|
3
|
+
findApikeysFnOptionsSchema,
|
|
4
|
+
findApikeysInputSchema
|
|
5
|
+
} from "./find-apikeys.schema.zod.browser.js";
|
|
6
|
+
import {
|
|
7
|
+
FindQueryBuilder
|
|
8
|
+
} from "../../lib/query-builder/find-query-builder.browser.js";
|
|
9
|
+
import { apikeyFilterFullInputSchema } from "../../txs/find-apikey-many/find-apikey-many.schema.zod.browser.js";
|
|
10
|
+
import { mergeFnOptions } from "../../lib/utils.browser.js";
|
|
11
|
+
var apikeyFilterFullInputSchemaRequired = apikeyFilterFullInputSchema.required();
|
|
12
|
+
function findApikeys(options, input, fnOptions) {
|
|
13
|
+
const { client } = options;
|
|
14
|
+
const $query = new FindQueryBuilder({
|
|
15
|
+
start(query) {
|
|
16
|
+
return client.api.findApikeyMany({
|
|
17
|
+
apikey: query.filter,
|
|
18
|
+
options: query.options
|
|
19
|
+
});
|
|
20
|
+
},
|
|
21
|
+
schemaBasic: findApikeysInputSchema,
|
|
22
|
+
schema: apikeyFilterFullInputSchemaRequired,
|
|
23
|
+
optionsSchema: findApikeysFnOptionsSchema
|
|
24
|
+
});
|
|
25
|
+
if (input) {
|
|
26
|
+
const { filter, options: options2 } = mergeFnOptions(input, fnOptions);
|
|
27
|
+
return $query.where(filter).options(options2);
|
|
28
|
+
}
|
|
29
|
+
return $query;
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
findApikeys
|
|
33
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/fns/find-apikeys/find-apikeys.ts
|
|
21
|
+
var find_apikeys_exports = {};
|
|
22
|
+
__export(find_apikeys_exports, {
|
|
23
|
+
findApikeys: () => findApikeys
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(find_apikeys_exports);
|
|
26
|
+
var import_find_apikeys_schema_zod = require("./find-apikeys.schema.zod.cjs");
|
|
27
|
+
var import_find_query_builder = require("../../lib/query-builder/find-query-builder.cjs");
|
|
28
|
+
var import_find_apikey_many_schema_zod = require("../../txs/find-apikey-many/find-apikey-many.schema.zod.cjs");
|
|
29
|
+
var import_utils = require("../../lib/utils.cjs");
|
|
30
|
+
var apikeyFilterFullInputSchemaRequired = import_find_apikey_many_schema_zod.apikeyFilterFullInputSchema.required();
|
|
31
|
+
function findApikeys(options, input, fnOptions) {
|
|
32
|
+
const { client } = options;
|
|
33
|
+
const $query = new import_find_query_builder.FindQueryBuilder({
|
|
34
|
+
start(query) {
|
|
35
|
+
return client.api.findApikeyMany({
|
|
36
|
+
apikey: query.filter,
|
|
37
|
+
options: query.options
|
|
38
|
+
});
|
|
39
|
+
},
|
|
40
|
+
schemaBasic: import_find_apikeys_schema_zod.findApikeysInputSchema,
|
|
41
|
+
schema: apikeyFilterFullInputSchemaRequired,
|
|
42
|
+
optionsSchema: import_find_apikeys_schema_zod.findApikeysFnOptionsSchema
|
|
43
|
+
});
|
|
44
|
+
if (input) {
|
|
45
|
+
const { filter, options: options2 } = (0, import_utils.mergeFnOptions)(input, fnOptions);
|
|
46
|
+
return $query.where(filter).options(options2);
|
|
47
|
+
}
|
|
48
|
+
return $query;
|
|
49
|
+
}
|
|
50
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
51
|
+
0 && (module.exports = {
|
|
52
|
+
findApikeys
|
|
53
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/fns/find-apikeys/find-apikeys.enums.ts
|
|
17
|
+
var find_apikeys_enums_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(find_apikeys_enums_exports);
|
|
File without changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/fns/find-apikeys/find-apikeys.enums.ts
|
|
17
|
+
var find_apikeys_enums_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(find_apikeys_enums_exports);
|
|
File without changes
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// src/fns/find-apikeys/find-apikeys.ts
|
|
2
|
+
import {
|
|
3
|
+
findApikeysFnOptionsSchema,
|
|
4
|
+
findApikeysInputSchema
|
|
5
|
+
} from "./find-apikeys.schema.zod.js";
|
|
6
|
+
import {
|
|
7
|
+
FindQueryBuilder
|
|
8
|
+
} from "../../lib/query-builder/find-query-builder.js";
|
|
9
|
+
import { apikeyFilterFullInputSchema } from "../../txs/find-apikey-many/find-apikey-many.schema.zod.js";
|
|
10
|
+
import { mergeFnOptions } from "../../lib/utils.js";
|
|
11
|
+
var apikeyFilterFullInputSchemaRequired = apikeyFilterFullInputSchema.required();
|
|
12
|
+
function findApikeys(options, input, fnOptions) {
|
|
13
|
+
const { client } = options;
|
|
14
|
+
const $query = new FindQueryBuilder({
|
|
15
|
+
start(query) {
|
|
16
|
+
return client.api.findApikeyMany({
|
|
17
|
+
apikey: query.filter,
|
|
18
|
+
options: query.options
|
|
19
|
+
});
|
|
20
|
+
},
|
|
21
|
+
schemaBasic: findApikeysInputSchema,
|
|
22
|
+
schema: apikeyFilterFullInputSchemaRequired,
|
|
23
|
+
optionsSchema: findApikeysFnOptionsSchema
|
|
24
|
+
});
|
|
25
|
+
if (input) {
|
|
26
|
+
const { filter, options: options2 } = mergeFnOptions(input, fnOptions);
|
|
27
|
+
return $query.where(filter).options(options2);
|
|
28
|
+
}
|
|
29
|
+
return $query;
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
findApikeys
|
|
33
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
+
var __spreadValues = (a, b) => {
|
|
10
|
+
for (var prop in b || (b = {}))
|
|
11
|
+
if (__hasOwnProp.call(b, prop))
|
|
12
|
+
__defNormalProp(a, prop, b[prop]);
|
|
13
|
+
if (__getOwnPropSymbols)
|
|
14
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
+
if (__propIsEnum.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
}
|
|
18
|
+
return a;
|
|
19
|
+
};
|
|
20
|
+
var __export = (target, all) => {
|
|
21
|
+
for (var name in all)
|
|
22
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
23
|
+
};
|
|
24
|
+
var __copyProps = (to, from, except, desc) => {
|
|
25
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
26
|
+
for (let key of __getOwnPropNames(from))
|
|
27
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
28
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
29
|
+
}
|
|
30
|
+
return to;
|
|
31
|
+
};
|
|
32
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
33
|
+
|
|
34
|
+
// src/fns/find-apikeys/find-apikeys.schema.zod.ts
|
|
35
|
+
var find_apikeys_schema_zod_exports = {};
|
|
36
|
+
__export(find_apikeys_schema_zod_exports, {
|
|
37
|
+
config: () => config,
|
|
38
|
+
findApikeysFnInputSchema: () => findApikeysFnInputSchema,
|
|
39
|
+
findApikeysFnOptionsSchema: () => findApikeysFnOptionsSchema,
|
|
40
|
+
findApikeysFnOutputSchema: () => findApikeysFnOutputSchema,
|
|
41
|
+
findApikeysInputSchema: () => findApikeysInputSchema
|
|
42
|
+
});
|
|
43
|
+
module.exports = __toCommonJS(find_apikeys_schema_zod_exports);
|
|
44
|
+
var import_zod = require("../../lib/zod.browser.cjs");
|
|
45
|
+
var import_find_apikey_many_schema_zod = require("../../txs/find-apikey-many/find-apikey-many.schema.zod.browser.cjs");
|
|
46
|
+
var import_consts = require("../consts.browser.cjs");
|
|
47
|
+
var import_wapi_apikey_schema_zod = require("../../db/wapi-apikey/wapi-apikey.schema.zod.browser.cjs");
|
|
48
|
+
var import_consts2 = require("../../db/consts.browser.cjs");
|
|
49
|
+
var findApikeysFnOptionsSchema = import_find_apikey_many_schema_zod.findApikeyManyTxInputOptionsSchema.extend(__spreadValues({}, import_consts.iFnFindOptionsSchema.shape)).partial().describe("Optional flags for input");
|
|
50
|
+
var findApikeysInputSchema = import_zod.z.object({
|
|
51
|
+
type: import_wapi_apikey_schema_zod.wapiApikeyTableTypeSchema,
|
|
52
|
+
status: import_wapi_apikey_schema_zod.wapiApikeyTableStatusSchema,
|
|
53
|
+
description: import_zod.z.string().describe("Apikey description"),
|
|
54
|
+
metadata: import_consts2.DbFilterMetadataSchema
|
|
55
|
+
}).partial();
|
|
56
|
+
var findApikeysFnInputSchema = findApikeysInputSchema.extend({
|
|
57
|
+
options: findApikeysFnOptionsSchema.optional()
|
|
58
|
+
}).strict().describe("Input for findApikeys");
|
|
59
|
+
var findApikeysFnOutputSchema = import_find_apikey_many_schema_zod.findApikeyManyTxOutputSchema.describe(
|
|
60
|
+
"Output of findApikeys"
|
|
61
|
+
);
|
|
62
|
+
var config = {
|
|
63
|
+
queryBuilder: true
|
|
64
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// src/fns/find-apikeys/find-apikeys.schema.zod.ts
|
|
19
|
+
import { z } from "../../lib/zod.browser.js";
|
|
20
|
+
import {
|
|
21
|
+
findApikeyManyTxInputOptionsSchema,
|
|
22
|
+
findApikeyManyTxOutputSchema
|
|
23
|
+
} from "../../txs/find-apikey-many/find-apikey-many.schema.zod.browser.js";
|
|
24
|
+
import { iFnFindOptionsSchema } from "../consts.browser.js";
|
|
25
|
+
import {
|
|
26
|
+
wapiApikeyTableStatusSchema,
|
|
27
|
+
wapiApikeyTableTypeSchema
|
|
28
|
+
} from "../../db/wapi-apikey/wapi-apikey.schema.zod.browser.js";
|
|
29
|
+
import { DbFilterMetadataSchema } from "../../db/consts.browser.js";
|
|
30
|
+
var findApikeysFnOptionsSchema = findApikeyManyTxInputOptionsSchema.extend(__spreadValues({}, iFnFindOptionsSchema.shape)).partial().describe("Optional flags for input");
|
|
31
|
+
var findApikeysInputSchema = z.object({
|
|
32
|
+
type: wapiApikeyTableTypeSchema,
|
|
33
|
+
status: wapiApikeyTableStatusSchema,
|
|
34
|
+
description: z.string().describe("Apikey description"),
|
|
35
|
+
metadata: DbFilterMetadataSchema
|
|
36
|
+
}).partial();
|
|
37
|
+
var findApikeysFnInputSchema = findApikeysInputSchema.extend({
|
|
38
|
+
options: findApikeysFnOptionsSchema.optional()
|
|
39
|
+
}).strict().describe("Input for findApikeys");
|
|
40
|
+
var findApikeysFnOutputSchema = findApikeyManyTxOutputSchema.describe(
|
|
41
|
+
"Output of findApikeys"
|
|
42
|
+
);
|
|
43
|
+
var config = {
|
|
44
|
+
queryBuilder: true
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
config,
|
|
48
|
+
findApikeysFnInputSchema,
|
|
49
|
+
findApikeysFnOptionsSchema,
|
|
50
|
+
findApikeysFnOutputSchema,
|
|
51
|
+
findApikeysInputSchema
|
|
52
|
+
};
|