@remnawave/backend-contract 2.1.52 → 2.1.54
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/build/backend/api/controllers/system.d.ts +1 -0
- package/build/backend/api/controllers/system.d.ts.map +1 -1
- package/build/backend/api/controllers/system.js +1 -0
- package/build/backend/api/routes.d.ts +1 -0
- package/build/backend/api/routes.d.ts.map +1 -1
- package/build/backend/api/routes.js +1 -0
- package/build/backend/commands/system/tools/encrypt-happ-cryptolink.command.d.ts +33 -0
- package/build/backend/commands/system/tools/encrypt-happ-cryptolink.command.d.ts.map +1 -0
- package/build/backend/commands/system/tools/encrypt-happ-cryptolink.command.js +20 -0
- package/build/backend/commands/system/tools/{generate-x25519-command.d.ts → generate-x25519.command.d.ts} +1 -1
- package/build/backend/commands/system/tools/{generate-x25519-command.d.ts.map → generate-x25519.command.d.ts.map} +1 -1
- package/build/backend/commands/system/tools/index.d.ts +2 -1
- package/build/backend/commands/system/tools/index.d.ts.map +1 -1
- package/build/backend/commands/system/tools/index.js +2 -1
- package/build/backend/commands/users/update-user.command.d.ts +33 -4
- package/build/backend/commands/users/update-user.command.d.ts.map +1 -1
- package/build/backend/commands/users/update-user.command.js +11 -3
- package/build/frontend/api/controllers/system.js +1 -0
- package/build/frontend/api/routes.js +1 -0
- package/build/frontend/commands/system/tools/encrypt-happ-cryptolink.command.js +20 -0
- package/build/frontend/commands/system/tools/index.js +2 -1
- package/build/frontend/commands/users/update-user.command.js +11 -3
- package/package.json +1 -1
- /package/build/backend/commands/system/tools/{generate-x25519-command.js → generate-x25519.command.js} +0 -0
- /package/build/frontend/commands/system/tools/{generate-x25519-command.js → generate-x25519.command.js} +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../../../api/controllers/system.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,EAAG,QAAiB,CAAC;AAEnD,eAAO,MAAM,aAAa
|
1
|
+
{"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../../../api/controllers/system.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,EAAG,QAAiB,CAAC;AAEnD,eAAO,MAAM,aAAa;;;;;;;;;;;;CAYhB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AACpC,eAAO,MAAM,YAAY,EAAG,UAAmB,CAAC;AAChD,eAAO,MAAM,WAAW,EAAG,SAAkB,CAAC;AAC9C,eAAO,MAAM,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;gCAcE,MAAM;;;;;;;;;qCAYD,MAAM;;gCAGX,MAAM;;oCAIF,MAAM;qCAIL,MAAM;qCAIN,MAAM;;;;;;iDAUM,MAAM;;;;;;;;gCAWvB,MAAM;qCAGD,MAAM;0CAED,MAAM;sDAEM,MAAM;;qCAMvB,MAAM;oCAIP,MAAM;2CAIC,MAAM;iDAIA,MAAM;;;6CAOV,MAAM;0CAIT,MAAM;2DAIW,MAAM;+CAIlB,MAAM;oCAIjB,MAAM;gCAIV,MAAM;;;;;;;;;;;;;;;gDAmBU,MAAM;;;;;;;kCAWpB,MAAM;0CAEE,MAAM;uCAET,MAAM;;;;;;qCASR,MAAM;gCAEX,MAAM
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AACpC,eAAO,MAAM,YAAY,EAAG,UAAmB,CAAC;AAChD,eAAO,MAAM,WAAW,EAAG,SAAkB,CAAC;AAC9C,eAAO,MAAM,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;gCAcE,MAAM;;;;;;;;;qCAYD,MAAM;;gCAGX,MAAM;;oCAIF,MAAM;qCAIL,MAAM;qCAIN,MAAM;;;;;;iDAUM,MAAM;;;;;;;;gCAWvB,MAAM;qCAGD,MAAM;0CAED,MAAM;sDAEM,MAAM;;qCAMvB,MAAM;oCAIP,MAAM;2CAIC,MAAM;iDAIA,MAAM;;;6CAOV,MAAM;0CAIT,MAAM;2DAIW,MAAM;+CAIlB,MAAM;oCAIjB,MAAM;gCAIV,MAAM;;;;;;;;;;;;;;;gDAmBU,MAAM;;;;;;;kCAWpB,MAAM;0CAEE,MAAM;uCAET,MAAM;;;;;;qCASR,MAAM;gCAEX,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCAgCD,MAAM;;;;;;;;;;mDAaQ,MAAM;;;;;;;;0CAWf,MAAM;kCAId,MAAM;6CAIK,MAAM;iDAIF,MAAM;;;;;;;qCAUlB,MAAM;gCAIX,MAAM;sDAIgB,MAAM;;;;;;;qCAUvB,MAAM;gCAIX,MAAM;0CAII,MAAM;;uCAKT,MAAM;0CAEH,MAAM;;;;;;;yCASP,MAAM;8CAED,MAAM;;;;6CAMP,MAAM;;;gDAKH,MAAM;;;;;;CAOnC,CAAC"}
|
@@ -153,6 +153,7 @@ exports.REST_API = {
|
|
153
153
|
},
|
154
154
|
TOOLS: {
|
155
155
|
GENERATE_X25519: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.TOOLS.GENERATE_X25519}`,
|
156
|
+
ENCRYPT_HAPP_CRYPTO_LINK: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.TOOLS.ENCRYPT_HAPP_CRYPTO_LINK}`,
|
156
157
|
},
|
157
158
|
},
|
158
159
|
SUBSCRIPTION_TEMPLATE: {
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
export declare namespace EncryptHappCryptoLinkCommand {
|
3
|
+
const url: "/api/system/tools/happ/encrypt";
|
4
|
+
const TSQ_url: "/api/system/tools/happ/encrypt";
|
5
|
+
const endpointDetails: import("../../../constants").EndpointDetails;
|
6
|
+
const RequestSchema: z.ZodObject<{
|
7
|
+
linkToEncrypt: z.ZodString;
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
9
|
+
linkToEncrypt: string;
|
10
|
+
}, {
|
11
|
+
linkToEncrypt: string;
|
12
|
+
}>;
|
13
|
+
type Request = z.infer<typeof RequestSchema>;
|
14
|
+
const ResponseSchema: z.ZodObject<{
|
15
|
+
response: z.ZodObject<{
|
16
|
+
encryptedLink: z.ZodString;
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
18
|
+
encryptedLink: string;
|
19
|
+
}, {
|
20
|
+
encryptedLink: string;
|
21
|
+
}>;
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
23
|
+
response: {
|
24
|
+
encryptedLink: string;
|
25
|
+
};
|
26
|
+
}, {
|
27
|
+
response: {
|
28
|
+
encryptedLink: string;
|
29
|
+
};
|
30
|
+
}>;
|
31
|
+
type Response = z.infer<typeof ResponseSchema>;
|
32
|
+
}
|
33
|
+
//# sourceMappingURL=encrypt-happ-cryptolink.command.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"encrypt-happ-cryptolink.command.d.ts","sourceRoot":"","sources":["../../../../../commands/system/tools/encrypt-happ-cryptolink.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,4BAA4B,CAAC;IACnC,MAAM,GAAG,kCAAiD,CAAC;IAC3D,MAAM,OAAO,kCAAM,CAAC;IAEpB,MAAM,eAAe,8CAI3B,CAAC;IACK,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;MAIzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.EncryptHappCryptoLinkCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const constants_1 = require("../../../constants");
|
6
|
+
const api_1 = require("../../../api");
|
7
|
+
var EncryptHappCryptoLinkCommand;
|
8
|
+
(function (EncryptHappCryptoLinkCommand) {
|
9
|
+
EncryptHappCryptoLinkCommand.url = api_1.REST_API.SYSTEM.TOOLS.ENCRYPT_HAPP_CRYPTO_LINK;
|
10
|
+
EncryptHappCryptoLinkCommand.TSQ_url = EncryptHappCryptoLinkCommand.url;
|
11
|
+
EncryptHappCryptoLinkCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SYSTEM_ROUTES.TOOLS.ENCRYPT_HAPP_CRYPTO_LINK, 'post', 'Encrypt Happ Crypto Link');
|
12
|
+
EncryptHappCryptoLinkCommand.RequestSchema = zod_1.z.object({
|
13
|
+
linkToEncrypt: zod_1.z.string().url(),
|
14
|
+
});
|
15
|
+
EncryptHappCryptoLinkCommand.ResponseSchema = zod_1.z.object({
|
16
|
+
response: zod_1.z.object({
|
17
|
+
encryptedLink: zod_1.z.string(),
|
18
|
+
}),
|
19
|
+
});
|
20
|
+
})(EncryptHappCryptoLinkCommand || (exports.EncryptHappCryptoLinkCommand = EncryptHappCryptoLinkCommand = {}));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"generate-x25519
|
1
|
+
{"version":3,"file":"generate-x25519.command.d.ts","sourceRoot":"","sources":["../../../../../commands/system/tools/generate-x25519.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,qBAAqB,CAAC;IAC5B,MAAM,GAAG,qCAAwC,CAAC;IAClD,MAAM,OAAO,qCAAM,CAAC;IAEpB,MAAM,eAAe,8CAI3B,CAAC;IAEK,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MASzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../commands/system/tools/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../commands/system/tools/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC"}
|
@@ -14,4 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./
|
17
|
+
__exportStar(require("./encrypt-happ-cryptolink.command"), exports);
|
18
|
+
__exportStar(require("./generate-x25519.command"), exports);
|
@@ -3,8 +3,9 @@ export declare namespace UpdateUserCommand {
|
|
3
3
|
const url: "/api/users/";
|
4
4
|
const TSQ_url: "/api/users/";
|
5
5
|
const endpointDetails: import("../../constants").EndpointDetails;
|
6
|
-
const RequestSchema: z.ZodObject<{
|
7
|
-
|
6
|
+
const RequestSchema: z.ZodEffects<z.ZodObject<{
|
7
|
+
username: z.ZodOptional<z.ZodString>;
|
8
|
+
uuid: z.ZodOptional<z.ZodString>;
|
8
9
|
status: z.ZodOptional<z.ZodEnum<["ACTIVE", "DISABLED"]>>;
|
9
10
|
trafficLimitBytes: z.ZodOptional<z.ZodNumber>;
|
10
11
|
trafficLimitStrategy: z.ZodOptional<z.ZodEffects<z.ZodDefault<z.ZodNativeEnum<{
|
@@ -21,8 +22,9 @@ export declare namespace UpdateUserCommand {
|
|
21
22
|
hwidDeviceLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
22
23
|
activeInternalSquads: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
23
24
|
}, "strip", z.ZodTypeAny, {
|
24
|
-
uuid: string;
|
25
25
|
status?: "DISABLED" | "ACTIVE" | undefined;
|
26
|
+
uuid?: string | undefined;
|
27
|
+
username?: string | undefined;
|
26
28
|
tag?: string | null | undefined;
|
27
29
|
trafficLimitBytes?: number | undefined;
|
28
30
|
description?: string | null | undefined;
|
@@ -33,8 +35,35 @@ export declare namespace UpdateUserCommand {
|
|
33
35
|
hwidDeviceLimit?: number | null | undefined;
|
34
36
|
activeInternalSquads?: string[] | undefined;
|
35
37
|
}, {
|
36
|
-
uuid: string;
|
37
38
|
status?: "DISABLED" | "ACTIVE" | undefined;
|
39
|
+
uuid?: string | undefined;
|
40
|
+
username?: string | undefined;
|
41
|
+
tag?: string | null | undefined;
|
42
|
+
trafficLimitBytes?: number | undefined;
|
43
|
+
description?: string | null | undefined;
|
44
|
+
trafficLimitStrategy?: "MONTH" | "NO_RESET" | "DAY" | "WEEK" | undefined;
|
45
|
+
expireAt?: string | undefined;
|
46
|
+
telegramId?: number | null | undefined;
|
47
|
+
email?: string | null | undefined;
|
48
|
+
hwidDeviceLimit?: number | null | undefined;
|
49
|
+
activeInternalSquads?: string[] | undefined;
|
50
|
+
}>, {
|
51
|
+
status?: "DISABLED" | "ACTIVE" | undefined;
|
52
|
+
uuid?: string | undefined;
|
53
|
+
username?: string | undefined;
|
54
|
+
tag?: string | null | undefined;
|
55
|
+
trafficLimitBytes?: number | undefined;
|
56
|
+
description?: string | null | undefined;
|
57
|
+
trafficLimitStrategy?: "MONTH" | "NO_RESET" | "DAY" | "WEEK" | undefined;
|
58
|
+
expireAt?: Date | undefined;
|
59
|
+
telegramId?: number | null | undefined;
|
60
|
+
email?: string | null | undefined;
|
61
|
+
hwidDeviceLimit?: number | null | undefined;
|
62
|
+
activeInternalSquads?: string[] | undefined;
|
63
|
+
}, {
|
64
|
+
status?: "DISABLED" | "ACTIVE" | undefined;
|
65
|
+
uuid?: string | undefined;
|
66
|
+
username?: string | undefined;
|
38
67
|
tag?: string | null | undefined;
|
39
68
|
trafficLimitBytes?: number | undefined;
|
40
69
|
description?: string | null | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"update-user.command.d.ts","sourceRoot":"","sources":["../../../../commands/users/update-user.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,eAAwB,CAAC;IAClC,MAAM,OAAO,eAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa
|
1
|
+
{"version":3,"file":"update-user.command.d.ts","sourceRoot":"","sources":["../../../../commands/users/update-user.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,eAAwB,CAAC;IAClC,MAAM,OAAO,eAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA2EpB,CAAC;IAEP,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
@@ -9,9 +9,14 @@ var UpdateUserCommand;
|
|
9
9
|
(function (UpdateUserCommand) {
|
10
10
|
UpdateUserCommand.url = api_1.REST_API.USERS.UPDATE;
|
11
11
|
UpdateUserCommand.TSQ_url = UpdateUserCommand.url;
|
12
|
-
UpdateUserCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.USERS_ROUTES.UPDATE, 'patch', 'Update a user');
|
13
|
-
UpdateUserCommand.RequestSchema = zod_1.z
|
14
|
-
|
12
|
+
UpdateUserCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.USERS_ROUTES.UPDATE, 'patch', 'Update a user by UUID or username');
|
13
|
+
UpdateUserCommand.RequestSchema = zod_1.z
|
14
|
+
.object({
|
15
|
+
username: zod_1.z.optional(zod_1.z.string().describe('Username of the user')),
|
16
|
+
uuid: zod_1.z.optional(zod_1.z
|
17
|
+
.string()
|
18
|
+
.uuid()
|
19
|
+
.describe('UUID of the user. UUID has higher priority than username, so if both are provided, username will be ignored.')),
|
15
20
|
status: zod_1.z
|
16
21
|
.enum([constants_1.USERS_STATUS.ACTIVE, constants_1.USERS_STATUS.DISABLED], {
|
17
22
|
errorMap: () => ({
|
@@ -64,6 +69,9 @@ var UpdateUserCommand;
|
|
64
69
|
invalid_type_error: 'Enabled internal squads must be an array of UUIDs',
|
65
70
|
})
|
66
71
|
.optional(),
|
72
|
+
})
|
73
|
+
.refine((data) => data.uuid || data.username, {
|
74
|
+
message: 'Either uuid or username must be provided',
|
67
75
|
});
|
68
76
|
UpdateUserCommand.ResponseSchema = zod_1.z.object({
|
69
77
|
response: models_1.ExtendedUsersSchema,
|
@@ -153,6 +153,7 @@ exports.REST_API = {
|
|
153
153
|
},
|
154
154
|
TOOLS: {
|
155
155
|
GENERATE_X25519: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.TOOLS.GENERATE_X25519}`,
|
156
|
+
ENCRYPT_HAPP_CRYPTO_LINK: `${exports.ROOT}/${CONTROLLERS.SYSTEM_CONTROLLER}/${CONTROLLERS.SYSTEM_ROUTES.TOOLS.ENCRYPT_HAPP_CRYPTO_LINK}`,
|
156
157
|
},
|
157
158
|
},
|
158
159
|
SUBSCRIPTION_TEMPLATE: {
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.EncryptHappCryptoLinkCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const constants_1 = require("../../../constants");
|
6
|
+
const api_1 = require("../../../api");
|
7
|
+
var EncryptHappCryptoLinkCommand;
|
8
|
+
(function (EncryptHappCryptoLinkCommand) {
|
9
|
+
EncryptHappCryptoLinkCommand.url = api_1.REST_API.SYSTEM.TOOLS.ENCRYPT_HAPP_CRYPTO_LINK;
|
10
|
+
EncryptHappCryptoLinkCommand.TSQ_url = EncryptHappCryptoLinkCommand.url;
|
11
|
+
EncryptHappCryptoLinkCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SYSTEM_ROUTES.TOOLS.ENCRYPT_HAPP_CRYPTO_LINK, 'post', 'Encrypt Happ Crypto Link');
|
12
|
+
EncryptHappCryptoLinkCommand.RequestSchema = zod_1.z.object({
|
13
|
+
linkToEncrypt: zod_1.z.string().url(),
|
14
|
+
});
|
15
|
+
EncryptHappCryptoLinkCommand.ResponseSchema = zod_1.z.object({
|
16
|
+
response: zod_1.z.object({
|
17
|
+
encryptedLink: zod_1.z.string(),
|
18
|
+
}),
|
19
|
+
});
|
20
|
+
})(EncryptHappCryptoLinkCommand || (exports.EncryptHappCryptoLinkCommand = EncryptHappCryptoLinkCommand = {}));
|
@@ -14,4 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./
|
17
|
+
__exportStar(require("./encrypt-happ-cryptolink.command"), exports);
|
18
|
+
__exportStar(require("./generate-x25519.command"), exports);
|
@@ -9,9 +9,14 @@ var UpdateUserCommand;
|
|
9
9
|
(function (UpdateUserCommand) {
|
10
10
|
UpdateUserCommand.url = api_1.REST_API.USERS.UPDATE;
|
11
11
|
UpdateUserCommand.TSQ_url = UpdateUserCommand.url;
|
12
|
-
UpdateUserCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.USERS_ROUTES.UPDATE, 'patch', 'Update a user');
|
13
|
-
UpdateUserCommand.RequestSchema = zod_1.z
|
14
|
-
|
12
|
+
UpdateUserCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.USERS_ROUTES.UPDATE, 'patch', 'Update a user by UUID or username');
|
13
|
+
UpdateUserCommand.RequestSchema = zod_1.z
|
14
|
+
.object({
|
15
|
+
username: zod_1.z.optional(zod_1.z.string().describe('Username of the user')),
|
16
|
+
uuid: zod_1.z.optional(zod_1.z
|
17
|
+
.string()
|
18
|
+
.uuid()
|
19
|
+
.describe('UUID of the user. UUID has higher priority than username, so if both are provided, username will be ignored.')),
|
15
20
|
status: zod_1.z
|
16
21
|
.enum([constants_1.USERS_STATUS.ACTIVE, constants_1.USERS_STATUS.DISABLED], {
|
17
22
|
errorMap: () => ({
|
@@ -64,6 +69,9 @@ var UpdateUserCommand;
|
|
64
69
|
invalid_type_error: 'Enabled internal squads must be an array of UUIDs',
|
65
70
|
})
|
66
71
|
.optional(),
|
72
|
+
})
|
73
|
+
.refine((data) => data.uuid || data.username, {
|
74
|
+
message: 'Either uuid or username must be provided',
|
67
75
|
});
|
68
76
|
UpdateUserCommand.ResponseSchema = zod_1.z.object({
|
69
77
|
response: models_1.ExtendedUsersSchema,
|
package/package.json
CHANGED
File without changes
|
File without changes
|