@remnawave/backend-contract 0.6.0 → 0.6.2
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/auth.d.ts +3 -0
- package/build/backend/api/controllers/auth.d.ts.map +1 -1
- package/build/backend/api/controllers/auth.js +3 -0
- package/build/backend/api/routes.d.ts +3 -0
- package/build/backend/api/routes.d.ts.map +1 -1
- package/build/backend/api/routes.js +3 -0
- package/build/backend/commands/auth/get-status.command.d.ts +19 -0
- package/build/backend/commands/auth/get-status.command.d.ts.map +1 -1
- package/build/backend/commands/auth/get-status.command.js +5 -0
- package/build/backend/commands/auth/index.d.ts +1 -0
- package/build/backend/commands/auth/index.d.ts.map +1 -1
- package/build/backend/commands/auth/index.js +1 -0
- package/build/backend/commands/auth/oauth2/index.d.ts +2 -0
- package/build/backend/commands/auth/oauth2/index.d.ts.map +1 -0
- package/build/backend/commands/auth/oauth2/index.js +17 -0
- package/build/backend/commands/auth/oauth2/telegram-callback.command.d.ts +48 -0
- package/build/backend/commands/auth/oauth2/telegram-callback.command.d.ts.map +1 -0
- package/build/backend/commands/auth/oauth2/telegram-callback.command.js +25 -0
- package/build/backend/commands/hosts/update.command.d.ts +3 -3
- package/build/backend/commands/nodes/update.command.d.ts +3 -3
- package/build/backend/commands/users/actions/activate-all-inbounds.command.d.ts +3 -3
- package/build/backend/commands/users/actions/disable-user.command.d.ts +3 -3
- package/build/backend/commands/users/actions/enable-user.command.d.ts +3 -3
- package/build/backend/commands/users/actions/reset-user-traffic.command.d.ts +3 -3
- package/build/backend/commands/users/actions/revoke-user-subscription.command.d.ts +3 -3
- package/build/backend/commands/users/create-user.command.d.ts +3 -3
- package/build/backend/commands/users/get-all-users.command.d.ts +3 -3
- package/build/backend/commands/users/get-by/get-user-by-email.command.d.ts +3 -3
- package/build/backend/commands/users/get-by/get-user-by-short-uuid.command.d.ts +3 -3
- package/build/backend/commands/users/get-by/get-user-by-subscription-uuid.command.d.ts +3 -3
- package/build/backend/commands/users/get-by/get-user-by-tag.command.d.ts +3 -3
- package/build/backend/commands/users/get-by/get-user-by-telegram-id.command.d.ts +3 -3
- package/build/backend/commands/users/get-by/get-user-by-username.command.d.ts +3 -3
- package/build/backend/commands/users/get-user-by-uuid.command.d.ts +3 -3
- package/build/backend/commands/users/tags/get-all-tags.command.d.ts +2 -2
- package/build/backend/commands/users/tags/get-all-tags.command.d.ts.map +1 -1
- package/build/backend/commands/users/tags/get-all-tags.command.js +1 -1
- package/build/backend/commands/users/update-user.command.d.ts +6 -6
- package/build/backend/models/extented-users.schema.d.ts +3 -3
- package/build/frontend/api/controllers/auth.js +3 -0
- package/build/frontend/api/routes.js +3 -0
- package/build/frontend/commands/auth/get-status.command.js +5 -0
- package/build/frontend/commands/auth/index.js +1 -0
- package/build/frontend/commands/auth/oauth2/index.js +17 -0
- package/build/frontend/commands/auth/oauth2/telegram-callback.command.js +25 -0
- package/build/frontend/commands/users/tags/get-all-tags.command.js +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../api/controllers/auth.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,EAAG,MAAe,CAAC;AAE/C,eAAO,MAAM,WAAW
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../api/controllers/auth.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,EAAG,MAAe,CAAC;AAE/C,eAAO,MAAM,WAAW;;;;;;;CAQd,CAAC"}
|
@@ -6,6 +6,9 @@ export declare const REST_API: {
|
|
6
6
|
readonly LOGIN: "/api/auth/login";
|
7
7
|
readonly REGISTER: "/api/auth/register";
|
8
8
|
readonly GET_STATUS: "/api/auth/status";
|
9
|
+
readonly OAUTH2: {
|
10
|
+
readonly TELEGRAM_CALLBACK: "/api/auth/oauth2/tg/callback";
|
11
|
+
};
|
9
12
|
};
|
10
13
|
readonly API_TOKENS: {
|
11
14
|
readonly CREATE: "/api/tokens/";
|
@@ -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,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ
|
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,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;;;;gCAYE,MAAM;;;;;;;;;qCAYD,MAAM;;gCAGX,MAAM;;oCAIF,MAAM;qCAIL,MAAM;qCAIN,MAAM;;;;;;iDAUM,MAAM;;;;;;;;;;;;;;;;;;;;;;gCA0BvB,MAAM;qCAGD,MAAM;;qCAIN,MAAM;oCAIP,MAAM;2CAIC,MAAM;mDAIE,MAAM;iDAIR,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;;;;;;;;;;;;;;;;;;;;qCAsBD,MAAM;;;;;;;;;mDAYQ,MAAM;;;;;;0CASf,MAAM;;;CAM7B,CAAC"}
|
@@ -43,6 +43,9 @@ exports.REST_API = {
|
|
43
43
|
LOGIN: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.LOGIN}`,
|
44
44
|
REGISTER: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.REGISTER}`,
|
45
45
|
GET_STATUS: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.GET_STATUS}`,
|
46
|
+
OAUTH2: {
|
47
|
+
TELEGRAM_CALLBACK: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.OAUTH2.TELEGRAM_CALLBACK}`,
|
48
|
+
},
|
46
49
|
},
|
47
50
|
API_TOKENS: {
|
48
51
|
CREATE: `${exports.ROOT}/${CONTROLLERS.API_TOKENS_CONTROLLER}/${CONTROLLERS.API_TOKENS_ROUTES.CREATE}`,
|
@@ -7,22 +7,41 @@ export declare namespace GetStatusCommand {
|
|
7
7
|
response: z.ZodObject<{
|
8
8
|
isLoginAllowed: z.ZodBoolean;
|
9
9
|
isRegisterAllowed: z.ZodBoolean;
|
10
|
+
tgAuth: z.ZodNullable<z.ZodObject<{
|
11
|
+
botId: z.ZodNumber;
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
13
|
+
botId: number;
|
14
|
+
}, {
|
15
|
+
botId: number;
|
16
|
+
}>>;
|
10
17
|
}, "strip", z.ZodTypeAny, {
|
11
18
|
isLoginAllowed: boolean;
|
12
19
|
isRegisterAllowed: boolean;
|
20
|
+
tgAuth: {
|
21
|
+
botId: number;
|
22
|
+
} | null;
|
13
23
|
}, {
|
14
24
|
isLoginAllowed: boolean;
|
15
25
|
isRegisterAllowed: boolean;
|
26
|
+
tgAuth: {
|
27
|
+
botId: number;
|
28
|
+
} | null;
|
16
29
|
}>;
|
17
30
|
}, "strip", z.ZodTypeAny, {
|
18
31
|
response: {
|
19
32
|
isLoginAllowed: boolean;
|
20
33
|
isRegisterAllowed: boolean;
|
34
|
+
tgAuth: {
|
35
|
+
botId: number;
|
36
|
+
} | null;
|
21
37
|
};
|
22
38
|
}, {
|
23
39
|
response: {
|
24
40
|
isLoginAllowed: boolean;
|
25
41
|
isRegisterAllowed: boolean;
|
42
|
+
tgAuth: {
|
43
|
+
botId: number;
|
44
|
+
} | null;
|
26
45
|
};
|
27
46
|
}>;
|
28
47
|
type Response = z.infer<typeof ResponseSchema>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"get-status.command.d.ts","sourceRoot":"","sources":["../../../../commands/auth/get-status.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,gBAAgB,CAAC;IACvB,MAAM,GAAG,oBAA2B,CAAC;IACrC,MAAM,OAAO,oBAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,cAAc
|
1
|
+
{"version":3,"file":"get-status.command.d.ts","sourceRoot":"","sources":["../../../../commands/auth/get-status.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,gBAAgB,CAAC;IACvB,MAAM,GAAG,oBAA2B,CAAC;IACrC,MAAM,OAAO,oBAAM,CAAC;IAEpB,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAUzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
@@ -13,6 +13,11 @@ var GetStatusCommand;
|
|
13
13
|
response: zod_1.z.object({
|
14
14
|
isLoginAllowed: zod_1.z.boolean(),
|
15
15
|
isRegisterAllowed: zod_1.z.boolean(),
|
16
|
+
tgAuth: zod_1.z
|
17
|
+
.object({
|
18
|
+
botId: zod_1.z.number(),
|
19
|
+
})
|
20
|
+
.nullable(),
|
16
21
|
}),
|
17
22
|
});
|
18
23
|
})(GetStatusCommand || (exports.GetStatusCommand = GetStatusCommand = {}));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC"}
|
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
17
|
__exportStar(require("./get-status.command"), exports);
|
18
18
|
__exportStar(require("./login.command"), exports);
|
19
|
+
__exportStar(require("./oauth2"), exports);
|
19
20
|
__exportStar(require("./register.command"), exports);
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../commands/auth/oauth2/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./telegram-callback.command"), exports);
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
export declare namespace TelegramCallbackCommand {
|
3
|
+
const url: "/api/auth/oauth2/tg/callback";
|
4
|
+
const TSQ_url: "/api/auth/oauth2/tg/callback";
|
5
|
+
const endpointDetails: import("../../../constants").EndpointDetails;
|
6
|
+
const RequestSchema: z.ZodObject<{
|
7
|
+
id: z.ZodNumber;
|
8
|
+
first_name: z.ZodString;
|
9
|
+
last_name: z.ZodOptional<z.ZodString>;
|
10
|
+
username: z.ZodOptional<z.ZodString>;
|
11
|
+
auth_date: z.ZodNumber;
|
12
|
+
hash: z.ZodString;
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
14
|
+
id: number;
|
15
|
+
first_name: string;
|
16
|
+
auth_date: number;
|
17
|
+
hash: string;
|
18
|
+
username?: string | undefined;
|
19
|
+
last_name?: string | undefined;
|
20
|
+
}, {
|
21
|
+
id: number;
|
22
|
+
first_name: string;
|
23
|
+
auth_date: number;
|
24
|
+
hash: string;
|
25
|
+
username?: string | undefined;
|
26
|
+
last_name?: string | undefined;
|
27
|
+
}>;
|
28
|
+
type Request = z.infer<typeof RequestSchema>;
|
29
|
+
const ResponseSchema: z.ZodObject<{
|
30
|
+
response: z.ZodObject<{
|
31
|
+
accessToken: z.ZodString;
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
33
|
+
accessToken: string;
|
34
|
+
}, {
|
35
|
+
accessToken: string;
|
36
|
+
}>;
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
38
|
+
response: {
|
39
|
+
accessToken: string;
|
40
|
+
};
|
41
|
+
}, {
|
42
|
+
response: {
|
43
|
+
accessToken: string;
|
44
|
+
};
|
45
|
+
}>;
|
46
|
+
type Response = z.infer<typeof ResponseSchema>;
|
47
|
+
}
|
48
|
+
//# sourceMappingURL=telegram-callback.command.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"telegram-callback.command.d.ts","sourceRoot":"","sources":["../../../../../commands/auth/oauth2/telegram-callback.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,uBAAuB,CAAC;IAC9B,MAAM,GAAG,gCAAyC,CAAC;IACnD,MAAM,OAAO,gCAAM,CAAC;IAEpB,MAAM,eAAe,8CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;MAOxB,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,25 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.TelegramCallbackCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const constants_1 = require("../../../constants");
|
6
|
+
const api_1 = require("../../../api");
|
7
|
+
var TelegramCallbackCommand;
|
8
|
+
(function (TelegramCallbackCommand) {
|
9
|
+
TelegramCallbackCommand.url = api_1.REST_API.AUTH.OAUTH2.TELEGRAM_CALLBACK;
|
10
|
+
TelegramCallbackCommand.TSQ_url = TelegramCallbackCommand.url;
|
11
|
+
TelegramCallbackCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.AUTH_ROUTES.OAUTH2.TELEGRAM_CALLBACK, 'post', 'Callback from Telegram OAuth2');
|
12
|
+
TelegramCallbackCommand.RequestSchema = zod_1.z.object({
|
13
|
+
id: zod_1.z.number(),
|
14
|
+
first_name: zod_1.z.string(),
|
15
|
+
last_name: zod_1.z.string().optional(),
|
16
|
+
username: zod_1.z.string().optional(),
|
17
|
+
auth_date: zod_1.z.number(),
|
18
|
+
hash: zod_1.z.string(),
|
19
|
+
});
|
20
|
+
TelegramCallbackCommand.ResponseSchema = zod_1.z.object({
|
21
|
+
response: zod_1.z.object({
|
22
|
+
accessToken: zod_1.z.string(),
|
23
|
+
}),
|
24
|
+
});
|
25
|
+
})(TelegramCallbackCommand || (exports.TelegramCallbackCommand = TelegramCallbackCommand = {}));
|
@@ -3,7 +3,7 @@ export declare namespace UpdateHostCommand {
|
|
3
3
|
const url: "/api/hosts/";
|
4
4
|
const TSQ_url: "/api/hosts/";
|
5
5
|
const endpointDetails: import("../../constants").EndpointDetails;
|
6
|
-
const RequestSchema: z.ZodObject<Pick<{
|
6
|
+
const RequestSchema: z.ZodObject<z.objectUtil.extendShape<Pick<{
|
7
7
|
uuid: z.ZodString;
|
8
8
|
inboundUuid: z.ZodString;
|
9
9
|
viewPosition: z.ZodNumber;
|
@@ -23,7 +23,7 @@ export declare namespace UpdateHostCommand {
|
|
23
23
|
readonly NONE: "NONE";
|
24
24
|
}>>;
|
25
25
|
xHttpExtraParams: z.ZodNullable<z.ZodUnknown>;
|
26
|
-
}, "uuid"
|
26
|
+
}, "uuid">, {
|
27
27
|
inboundUuid: z.ZodOptional<z.ZodString>;
|
28
28
|
remark: z.ZodOptional<z.ZodString>;
|
29
29
|
address: z.ZodOptional<z.ZodString>;
|
@@ -58,7 +58,7 @@ export declare namespace UpdateHostCommand {
|
|
58
58
|
readonly NONE: "NONE";
|
59
59
|
}>>;
|
60
60
|
xHttpExtraParams: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
61
|
-
}
|
61
|
+
}>, "strip", z.ZodTypeAny, {
|
62
62
|
uuid: string;
|
63
63
|
path?: string | undefined;
|
64
64
|
port?: number | undefined;
|
@@ -3,7 +3,7 @@ export declare namespace UpdateNodeCommand {
|
|
3
3
|
const url: "/api/nodes/";
|
4
4
|
const TSQ_url: "/api/nodes/";
|
5
5
|
const endpointDetails: import("../../constants").EndpointDetails;
|
6
|
-
const RequestSchema: z.ZodObject<Pick<{
|
6
|
+
const RequestSchema: z.ZodObject<z.objectUtil.extendShape<Pick<{
|
7
7
|
uuid: z.ZodString;
|
8
8
|
name: z.ZodString;
|
9
9
|
address: z.ZodString;
|
@@ -50,7 +50,7 @@ export declare namespace UpdateNodeCommand {
|
|
50
50
|
network: string | null;
|
51
51
|
security: string | null;
|
52
52
|
}>, "many">;
|
53
|
-
}, "uuid"
|
53
|
+
}, "uuid">, {
|
54
54
|
name: z.ZodOptional<z.ZodString>;
|
55
55
|
address: z.ZodOptional<z.ZodString>;
|
56
56
|
port: z.ZodOptional<z.ZodNumber>;
|
@@ -61,7 +61,7 @@ export declare namespace UpdateNodeCommand {
|
|
61
61
|
excludedInbounds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
62
62
|
countryCode: z.ZodOptional<z.ZodString>;
|
63
63
|
consumptionMultiplier: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
|
64
|
-
}
|
64
|
+
}>, "strip", z.ZodTypeAny, {
|
65
65
|
uuid: string;
|
66
66
|
trafficLimitBytes?: number | undefined;
|
67
67
|
port?: number | undefined;
|
@@ -12,7 +12,7 @@ export declare namespace ActivateAllInboundsCommand {
|
|
12
12
|
}>;
|
13
13
|
type Request = z.infer<typeof RequestSchema>;
|
14
14
|
const ResponseSchema: z.ZodObject<{
|
15
|
-
response: z.ZodObject<{
|
15
|
+
response: z.ZodObject<z.objectUtil.extendShape<{
|
16
16
|
uuid: z.ZodString;
|
17
17
|
subscriptionUuid: z.ZodString;
|
18
18
|
shortUuid: z.ZodString;
|
@@ -67,7 +67,7 @@ export declare namespace ActivateAllInboundsCommand {
|
|
67
67
|
network: string | null;
|
68
68
|
security: string | null;
|
69
69
|
}>, "many">;
|
70
|
-
}
|
70
|
+
}, {
|
71
71
|
subscriptionUrl: z.ZodString;
|
72
72
|
lastConnectedNode: z.ZodNullable<z.ZodObject<{
|
73
73
|
connectedAt: z.ZodEffects<z.ZodString, Date, string>;
|
@@ -86,7 +86,7 @@ export declare namespace ActivateAllInboundsCommand {
|
|
86
86
|
}, {
|
87
87
|
cryptoLink: string;
|
88
88
|
}>;
|
89
|
-
}
|
89
|
+
}>, "strip", z.ZodTypeAny, {
|
90
90
|
status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
91
91
|
uuid: string;
|
92
92
|
createdAt: Date;
|
@@ -12,7 +12,7 @@ export declare namespace DisableUserCommand {
|
|
12
12
|
}>;
|
13
13
|
type Request = z.infer<typeof RequestSchema>;
|
14
14
|
const ResponseSchema: z.ZodObject<{
|
15
|
-
response: z.ZodObject<{
|
15
|
+
response: z.ZodObject<z.objectUtil.extendShape<{
|
16
16
|
uuid: z.ZodString;
|
17
17
|
subscriptionUuid: z.ZodString;
|
18
18
|
shortUuid: z.ZodString;
|
@@ -67,7 +67,7 @@ export declare namespace DisableUserCommand {
|
|
67
67
|
network: string | null;
|
68
68
|
security: string | null;
|
69
69
|
}>, "many">;
|
70
|
-
}
|
70
|
+
}, {
|
71
71
|
subscriptionUrl: z.ZodString;
|
72
72
|
lastConnectedNode: z.ZodNullable<z.ZodObject<{
|
73
73
|
connectedAt: z.ZodEffects<z.ZodString, Date, string>;
|
@@ -86,7 +86,7 @@ export declare namespace DisableUserCommand {
|
|
86
86
|
}, {
|
87
87
|
cryptoLink: string;
|
88
88
|
}>;
|
89
|
-
}
|
89
|
+
}>, "strip", z.ZodTypeAny, {
|
90
90
|
status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
91
91
|
uuid: string;
|
92
92
|
createdAt: Date;
|
@@ -12,7 +12,7 @@ export declare namespace EnableUserCommand {
|
|
12
12
|
}>;
|
13
13
|
type Request = z.infer<typeof RequestSchema>;
|
14
14
|
const ResponseSchema: z.ZodObject<{
|
15
|
-
response: z.ZodObject<{
|
15
|
+
response: z.ZodObject<z.objectUtil.extendShape<{
|
16
16
|
uuid: z.ZodString;
|
17
17
|
subscriptionUuid: z.ZodString;
|
18
18
|
shortUuid: z.ZodString;
|
@@ -67,7 +67,7 @@ export declare namespace EnableUserCommand {
|
|
67
67
|
network: string | null;
|
68
68
|
security: string | null;
|
69
69
|
}>, "many">;
|
70
|
-
}
|
70
|
+
}, {
|
71
71
|
subscriptionUrl: z.ZodString;
|
72
72
|
lastConnectedNode: z.ZodNullable<z.ZodObject<{
|
73
73
|
connectedAt: z.ZodEffects<z.ZodString, Date, string>;
|
@@ -86,7 +86,7 @@ export declare namespace EnableUserCommand {
|
|
86
86
|
}, {
|
87
87
|
cryptoLink: string;
|
88
88
|
}>;
|
89
|
-
}
|
89
|
+
}>, "strip", z.ZodTypeAny, {
|
90
90
|
status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
91
91
|
uuid: string;
|
92
92
|
createdAt: Date;
|
@@ -12,7 +12,7 @@ export declare namespace ResetUserTrafficCommand {
|
|
12
12
|
}>;
|
13
13
|
type Request = z.infer<typeof RequestSchema>;
|
14
14
|
const ResponseSchema: z.ZodObject<{
|
15
|
-
response: z.ZodObject<{
|
15
|
+
response: z.ZodObject<z.objectUtil.extendShape<{
|
16
16
|
uuid: z.ZodString;
|
17
17
|
subscriptionUuid: z.ZodString;
|
18
18
|
shortUuid: z.ZodString;
|
@@ -67,7 +67,7 @@ export declare namespace ResetUserTrafficCommand {
|
|
67
67
|
network: string | null;
|
68
68
|
security: string | null;
|
69
69
|
}>, "many">;
|
70
|
-
}
|
70
|
+
}, {
|
71
71
|
subscriptionUrl: z.ZodString;
|
72
72
|
lastConnectedNode: z.ZodNullable<z.ZodObject<{
|
73
73
|
connectedAt: z.ZodEffects<z.ZodString, Date, string>;
|
@@ -86,7 +86,7 @@ export declare namespace ResetUserTrafficCommand {
|
|
86
86
|
}, {
|
87
87
|
cryptoLink: string;
|
88
88
|
}>;
|
89
|
-
}
|
89
|
+
}>, "strip", z.ZodTypeAny, {
|
90
90
|
status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
91
91
|
uuid: string;
|
92
92
|
createdAt: Date;
|
@@ -12,7 +12,7 @@ export declare namespace RevokeUserSubscriptionCommand {
|
|
12
12
|
}>;
|
13
13
|
type Request = z.infer<typeof RequestSchema>;
|
14
14
|
const ResponseSchema: z.ZodObject<{
|
15
|
-
response: z.ZodObject<{
|
15
|
+
response: z.ZodObject<z.objectUtil.extendShape<{
|
16
16
|
uuid: z.ZodString;
|
17
17
|
subscriptionUuid: z.ZodString;
|
18
18
|
shortUuid: z.ZodString;
|
@@ -67,7 +67,7 @@ export declare namespace RevokeUserSubscriptionCommand {
|
|
67
67
|
network: string | null;
|
68
68
|
security: string | null;
|
69
69
|
}>, "many">;
|
70
|
-
}
|
70
|
+
}, {
|
71
71
|
subscriptionUrl: z.ZodString;
|
72
72
|
lastConnectedNode: z.ZodNullable<z.ZodObject<{
|
73
73
|
connectedAt: z.ZodEffects<z.ZodString, Date, string>;
|
@@ -86,7 +86,7 @@ export declare namespace RevokeUserSubscriptionCommand {
|
|
86
86
|
}, {
|
87
87
|
cryptoLink: string;
|
88
88
|
}>;
|
89
|
-
}
|
89
|
+
}>, "strip", z.ZodTypeAny, {
|
90
90
|
status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
91
91
|
uuid: string;
|
92
92
|
createdAt: Date;
|
@@ -76,7 +76,7 @@ export declare namespace CreateUserCommand {
|
|
76
76
|
}>;
|
77
77
|
type Request = z.infer<typeof RequestSchema>;
|
78
78
|
const ResponseSchema: z.ZodObject<{
|
79
|
-
response: z.ZodObject<{
|
79
|
+
response: z.ZodObject<z.objectUtil.extendShape<{
|
80
80
|
uuid: z.ZodString;
|
81
81
|
subscriptionUuid: z.ZodString;
|
82
82
|
shortUuid: z.ZodString;
|
@@ -131,7 +131,7 @@ export declare namespace CreateUserCommand {
|
|
131
131
|
network: string | null;
|
132
132
|
security: string | null;
|
133
133
|
}>, "many">;
|
134
|
-
}
|
134
|
+
}, {
|
135
135
|
subscriptionUrl: z.ZodString;
|
136
136
|
lastConnectedNode: z.ZodNullable<z.ZodObject<{
|
137
137
|
connectedAt: z.ZodEffects<z.ZodString, Date, string>;
|
@@ -150,7 +150,7 @@ export declare namespace CreateUserCommand {
|
|
150
150
|
}, {
|
151
151
|
cryptoLink: string;
|
152
152
|
}>;
|
153
|
-
}
|
153
|
+
}>, "strip", z.ZodTypeAny, {
|
154
154
|
status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
155
155
|
uuid: string;
|
156
156
|
createdAt: Date;
|
@@ -58,7 +58,7 @@ export declare namespace GetAllUsersCommand {
|
|
58
58
|
type RequestQuery = z.infer<typeof RequestQuerySchema>;
|
59
59
|
const ResponseSchema: z.ZodObject<{
|
60
60
|
response: z.ZodObject<{
|
61
|
-
users: z.ZodArray<z.ZodObject<{
|
61
|
+
users: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
|
62
62
|
uuid: z.ZodString;
|
63
63
|
subscriptionUuid: z.ZodString;
|
64
64
|
shortUuid: z.ZodString;
|
@@ -113,7 +113,7 @@ export declare namespace GetAllUsersCommand {
|
|
113
113
|
network: string | null;
|
114
114
|
security: string | null;
|
115
115
|
}>, "many">;
|
116
|
-
}
|
116
|
+
}, {
|
117
117
|
subscriptionUrl: z.ZodString;
|
118
118
|
lastConnectedNode: z.ZodNullable<z.ZodObject<{
|
119
119
|
connectedAt: z.ZodEffects<z.ZodString, Date, string>;
|
@@ -132,7 +132,7 @@ export declare namespace GetAllUsersCommand {
|
|
132
132
|
}, {
|
133
133
|
cryptoLink: string;
|
134
134
|
}>;
|
135
|
-
}
|
135
|
+
}>, "strip", z.ZodTypeAny, {
|
136
136
|
status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
137
137
|
uuid: string;
|
138
138
|
createdAt: Date;
|
@@ -12,7 +12,7 @@ export declare namespace GetUserByEmailCommand {
|
|
12
12
|
}>;
|
13
13
|
type Request = z.infer<typeof RequestSchema>;
|
14
14
|
const ResponseSchema: z.ZodObject<{
|
15
|
-
response: z.ZodArray<z.ZodObject<{
|
15
|
+
response: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
|
16
16
|
uuid: z.ZodString;
|
17
17
|
subscriptionUuid: z.ZodString;
|
18
18
|
shortUuid: z.ZodString;
|
@@ -67,7 +67,7 @@ export declare namespace GetUserByEmailCommand {
|
|
67
67
|
network: string | null;
|
68
68
|
security: string | null;
|
69
69
|
}>, "many">;
|
70
|
-
}
|
70
|
+
}, {
|
71
71
|
subscriptionUrl: z.ZodString;
|
72
72
|
lastConnectedNode: z.ZodNullable<z.ZodObject<{
|
73
73
|
connectedAt: z.ZodEffects<z.ZodString, Date, string>;
|
@@ -86,7 +86,7 @@ export declare namespace GetUserByEmailCommand {
|
|
86
86
|
}, {
|
87
87
|
cryptoLink: string;
|
88
88
|
}>;
|
89
|
-
}
|
89
|
+
}>, "strip", z.ZodTypeAny, {
|
90
90
|
status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
91
91
|
uuid: string;
|
92
92
|
createdAt: Date;
|
@@ -12,7 +12,7 @@ export declare namespace GetUserByShortUuidCommand {
|
|
12
12
|
}>;
|
13
13
|
type Request = z.infer<typeof RequestSchema>;
|
14
14
|
const ResponseSchema: z.ZodObject<{
|
15
|
-
response: z.ZodObject<{
|
15
|
+
response: z.ZodObject<z.objectUtil.extendShape<{
|
16
16
|
uuid: z.ZodString;
|
17
17
|
subscriptionUuid: z.ZodString;
|
18
18
|
shortUuid: z.ZodString;
|
@@ -67,7 +67,7 @@ export declare namespace GetUserByShortUuidCommand {
|
|
67
67
|
network: string | null;
|
68
68
|
security: string | null;
|
69
69
|
}>, "many">;
|
70
|
-
}
|
70
|
+
}, {
|
71
71
|
subscriptionUrl: z.ZodString;
|
72
72
|
lastConnectedNode: z.ZodNullable<z.ZodObject<{
|
73
73
|
connectedAt: z.ZodEffects<z.ZodString, Date, string>;
|
@@ -86,7 +86,7 @@ export declare namespace GetUserByShortUuidCommand {
|
|
86
86
|
}, {
|
87
87
|
cryptoLink: string;
|
88
88
|
}>;
|
89
|
-
}
|
89
|
+
}>, "strip", z.ZodTypeAny, {
|
90
90
|
status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
91
91
|
uuid: string;
|
92
92
|
createdAt: Date;
|
@@ -12,7 +12,7 @@ export declare namespace GetUserBySubscriptionUuidCommand {
|
|
12
12
|
}>;
|
13
13
|
type Request = z.infer<typeof RequestSchema>;
|
14
14
|
const ResponseSchema: z.ZodObject<{
|
15
|
-
response: z.ZodObject<{
|
15
|
+
response: z.ZodObject<z.objectUtil.extendShape<{
|
16
16
|
uuid: z.ZodString;
|
17
17
|
subscriptionUuid: z.ZodString;
|
18
18
|
shortUuid: z.ZodString;
|
@@ -67,7 +67,7 @@ export declare namespace GetUserBySubscriptionUuidCommand {
|
|
67
67
|
network: string | null;
|
68
68
|
security: string | null;
|
69
69
|
}>, "many">;
|
70
|
-
}
|
70
|
+
}, {
|
71
71
|
subscriptionUrl: z.ZodString;
|
72
72
|
lastConnectedNode: z.ZodNullable<z.ZodObject<{
|
73
73
|
connectedAt: z.ZodEffects<z.ZodString, Date, string>;
|
@@ -86,7 +86,7 @@ export declare namespace GetUserBySubscriptionUuidCommand {
|
|
86
86
|
}, {
|
87
87
|
cryptoLink: string;
|
88
88
|
}>;
|
89
|
-
}
|
89
|
+
}>, "strip", z.ZodTypeAny, {
|
90
90
|
status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
91
91
|
uuid: string;
|
92
92
|
createdAt: Date;
|
@@ -12,7 +12,7 @@ export declare namespace GetUserByTagCommand {
|
|
12
12
|
}>;
|
13
13
|
type Request = z.infer<typeof RequestSchema>;
|
14
14
|
const ResponseSchema: z.ZodObject<{
|
15
|
-
response: z.ZodArray<z.ZodObject<{
|
15
|
+
response: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
|
16
16
|
uuid: z.ZodString;
|
17
17
|
subscriptionUuid: z.ZodString;
|
18
18
|
shortUuid: z.ZodString;
|
@@ -67,7 +67,7 @@ export declare namespace GetUserByTagCommand {
|
|
67
67
|
network: string | null;
|
68
68
|
security: string | null;
|
69
69
|
}>, "many">;
|
70
|
-
}
|
70
|
+
}, {
|
71
71
|
subscriptionUrl: z.ZodString;
|
72
72
|
lastConnectedNode: z.ZodNullable<z.ZodObject<{
|
73
73
|
connectedAt: z.ZodEffects<z.ZodString, Date, string>;
|
@@ -86,7 +86,7 @@ export declare namespace GetUserByTagCommand {
|
|
86
86
|
}, {
|
87
87
|
cryptoLink: string;
|
88
88
|
}>;
|
89
|
-
}
|
89
|
+
}>, "strip", z.ZodTypeAny, {
|
90
90
|
status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
91
91
|
uuid: string;
|
92
92
|
createdAt: Date;
|
@@ -12,7 +12,7 @@ export declare namespace GetUserByTelegramIdCommand {
|
|
12
12
|
}>;
|
13
13
|
type Request = z.infer<typeof RequestSchema>;
|
14
14
|
const ResponseSchema: z.ZodObject<{
|
15
|
-
response: z.ZodArray<z.ZodObject<{
|
15
|
+
response: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
|
16
16
|
uuid: z.ZodString;
|
17
17
|
subscriptionUuid: z.ZodString;
|
18
18
|
shortUuid: z.ZodString;
|
@@ -67,7 +67,7 @@ export declare namespace GetUserByTelegramIdCommand {
|
|
67
67
|
network: string | null;
|
68
68
|
security: string | null;
|
69
69
|
}>, "many">;
|
70
|
-
}
|
70
|
+
}, {
|
71
71
|
subscriptionUrl: z.ZodString;
|
72
72
|
lastConnectedNode: z.ZodNullable<z.ZodObject<{
|
73
73
|
connectedAt: z.ZodEffects<z.ZodString, Date, string>;
|
@@ -86,7 +86,7 @@ export declare namespace GetUserByTelegramIdCommand {
|
|
86
86
|
}, {
|
87
87
|
cryptoLink: string;
|
88
88
|
}>;
|
89
|
-
}
|
89
|
+
}>, "strip", z.ZodTypeAny, {
|
90
90
|
status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
91
91
|
uuid: string;
|
92
92
|
createdAt: Date;
|
@@ -12,7 +12,7 @@ export declare namespace GetUserByUsernameCommand {
|
|
12
12
|
}>;
|
13
13
|
type Request = z.infer<typeof RequestSchema>;
|
14
14
|
const ResponseSchema: z.ZodObject<{
|
15
|
-
response: z.ZodObject<{
|
15
|
+
response: z.ZodObject<z.objectUtil.extendShape<{
|
16
16
|
uuid: z.ZodString;
|
17
17
|
subscriptionUuid: z.ZodString;
|
18
18
|
shortUuid: z.ZodString;
|
@@ -67,7 +67,7 @@ export declare namespace GetUserByUsernameCommand {
|
|
67
67
|
network: string | null;
|
68
68
|
security: string | null;
|
69
69
|
}>, "many">;
|
70
|
-
}
|
70
|
+
}, {
|
71
71
|
subscriptionUrl: z.ZodString;
|
72
72
|
lastConnectedNode: z.ZodNullable<z.ZodObject<{
|
73
73
|
connectedAt: z.ZodEffects<z.ZodString, Date, string>;
|
@@ -86,7 +86,7 @@ export declare namespace GetUserByUsernameCommand {
|
|
86
86
|
}, {
|
87
87
|
cryptoLink: string;
|
88
88
|
}>;
|
89
|
-
}
|
89
|
+
}>, "strip", z.ZodTypeAny, {
|
90
90
|
status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
91
91
|
uuid: string;
|
92
92
|
createdAt: Date;
|
@@ -12,7 +12,7 @@ export declare namespace GetUserByUuidCommand {
|
|
12
12
|
}>;
|
13
13
|
type Request = z.infer<typeof RequestSchema>;
|
14
14
|
const ResponseSchema: z.ZodObject<{
|
15
|
-
response: z.ZodObject<{
|
15
|
+
response: z.ZodObject<z.objectUtil.extendShape<{
|
16
16
|
uuid: z.ZodString;
|
17
17
|
subscriptionUuid: z.ZodString;
|
18
18
|
shortUuid: z.ZodString;
|
@@ -67,7 +67,7 @@ export declare namespace GetUserByUuidCommand {
|
|
67
67
|
network: string | null;
|
68
68
|
security: string | null;
|
69
69
|
}>, "many">;
|
70
|
-
}
|
70
|
+
}, {
|
71
71
|
subscriptionUrl: z.ZodString;
|
72
72
|
lastConnectedNode: z.ZodNullable<z.ZodObject<{
|
73
73
|
connectedAt: z.ZodEffects<z.ZodString, Date, string>;
|
@@ -86,7 +86,7 @@ export declare namespace GetUserByUuidCommand {
|
|
86
86
|
}, {
|
87
87
|
cryptoLink: string;
|
88
88
|
}>;
|
89
|
-
}
|
89
|
+
}>, "strip", z.ZodTypeAny, {
|
90
90
|
status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
91
91
|
uuid: string;
|
92
92
|
createdAt: Date;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { z } from 'zod';
|
2
2
|
export declare namespace GetAllTagsCommand {
|
3
|
-
const url: "/api/users/";
|
4
|
-
const TSQ_url: "/api/users/";
|
3
|
+
const url: "/api/users/tags";
|
4
|
+
const TSQ_url: "/api/users/tags";
|
5
5
|
const endpointDetails: import("../../../constants").EndpointDetails;
|
6
6
|
const ResponseSchema: z.ZodObject<{
|
7
7
|
response: z.ZodObject<{
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"get-all-tags.command.d.ts","sourceRoot":"","sources":["../../../../../commands/users/tags/get-all-tags.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,
|
1
|
+
{"version":3,"file":"get-all-tags.command.d.ts","sourceRoot":"","sources":["../../../../../commands/users/tags/get-all-tags.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,mBAA0B,CAAC;IACpC,MAAM,OAAO,mBAAM,CAAC;IAEpB,MAAM,eAAe,8CAI3B,CAAC;IAEK,MAAM,cAAc;;;;;;;;;;;;;;;;MAIzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
@@ -6,7 +6,7 @@ const constants_1 = require("../../../constants");
|
|
6
6
|
const api_1 = require("../../../api");
|
7
7
|
var GetAllTagsCommand;
|
8
8
|
(function (GetAllTagsCommand) {
|
9
|
-
GetAllTagsCommand.url = api_1.REST_API.USERS.GET;
|
9
|
+
GetAllTagsCommand.url = api_1.REST_API.USERS.TAGS.GET;
|
10
10
|
GetAllTagsCommand.TSQ_url = GetAllTagsCommand.url;
|
11
11
|
GetAllTagsCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.USERS_ROUTES.TAGS.GET, 'get', 'Get all existing user tags');
|
12
12
|
GetAllTagsCommand.ResponseSchema = zod_1.z.object({
|
@@ -3,7 +3,7 @@ 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<Pick<{
|
6
|
+
const RequestSchema: z.ZodObject<z.objectUtil.extendShape<Pick<{
|
7
7
|
uuid: z.ZodString;
|
8
8
|
subscriptionUuid: z.ZodString;
|
9
9
|
shortUuid: z.ZodString;
|
@@ -58,7 +58,7 @@ export declare namespace UpdateUserCommand {
|
|
58
58
|
network: string | null;
|
59
59
|
security: string | null;
|
60
60
|
}>, "many">;
|
61
|
-
}, "uuid"
|
61
|
+
}, "uuid">, {
|
62
62
|
status: z.ZodOptional<z.ZodDefault<z.ZodNativeEnum<{
|
63
63
|
readonly ACTIVE: "ACTIVE";
|
64
64
|
readonly DISABLED: "DISABLED";
|
@@ -79,7 +79,7 @@ export declare namespace UpdateUserCommand {
|
|
79
79
|
telegramId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
80
80
|
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
81
81
|
hwidDeviceLimit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
82
|
-
}
|
82
|
+
}>, "strip", z.ZodTypeAny, {
|
83
83
|
uuid: string;
|
84
84
|
status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
|
85
85
|
tag?: string | null | undefined;
|
@@ -106,7 +106,7 @@ export declare namespace UpdateUserCommand {
|
|
106
106
|
}>;
|
107
107
|
type Request = z.infer<typeof RequestSchema>;
|
108
108
|
const ResponseSchema: z.ZodObject<{
|
109
|
-
response: z.ZodObject<{
|
109
|
+
response: z.ZodObject<z.objectUtil.extendShape<{
|
110
110
|
uuid: z.ZodString;
|
111
111
|
subscriptionUuid: z.ZodString;
|
112
112
|
shortUuid: z.ZodString;
|
@@ -161,7 +161,7 @@ export declare namespace UpdateUserCommand {
|
|
161
161
|
network: string | null;
|
162
162
|
security: string | null;
|
163
163
|
}>, "many">;
|
164
|
-
}
|
164
|
+
}, {
|
165
165
|
subscriptionUrl: z.ZodString;
|
166
166
|
lastConnectedNode: z.ZodNullable<z.ZodObject<{
|
167
167
|
connectedAt: z.ZodEffects<z.ZodString, Date, string>;
|
@@ -180,7 +180,7 @@ export declare namespace UpdateUserCommand {
|
|
180
180
|
}, {
|
181
181
|
cryptoLink: string;
|
182
182
|
}>;
|
183
|
-
}
|
183
|
+
}>, "strip", z.ZodTypeAny, {
|
184
184
|
status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
185
185
|
uuid: string;
|
186
186
|
createdAt: Date;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { z } from 'zod';
|
2
|
-
export declare const ExtendedUsersSchema: z.ZodObject<{
|
2
|
+
export declare const ExtendedUsersSchema: z.ZodObject<z.objectUtil.extendShape<{
|
3
3
|
uuid: z.ZodString;
|
4
4
|
subscriptionUuid: z.ZodString;
|
5
5
|
shortUuid: z.ZodString;
|
@@ -54,7 +54,7 @@ export declare const ExtendedUsersSchema: z.ZodObject<{
|
|
54
54
|
network: string | null;
|
55
55
|
security: string | null;
|
56
56
|
}>, "many">;
|
57
|
-
}
|
57
|
+
}, {
|
58
58
|
subscriptionUrl: z.ZodString;
|
59
59
|
lastConnectedNode: z.ZodNullable<z.ZodObject<{
|
60
60
|
connectedAt: z.ZodEffects<z.ZodString, Date, string>;
|
@@ -73,7 +73,7 @@ export declare const ExtendedUsersSchema: z.ZodObject<{
|
|
73
73
|
}, {
|
74
74
|
cryptoLink: string;
|
75
75
|
}>;
|
76
|
-
}
|
76
|
+
}>, "strip", z.ZodTypeAny, {
|
77
77
|
status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
78
78
|
uuid: string;
|
79
79
|
createdAt: Date;
|
@@ -43,6 +43,9 @@ exports.REST_API = {
|
|
43
43
|
LOGIN: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.LOGIN}`,
|
44
44
|
REGISTER: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.REGISTER}`,
|
45
45
|
GET_STATUS: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.GET_STATUS}`,
|
46
|
+
OAUTH2: {
|
47
|
+
TELEGRAM_CALLBACK: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.OAUTH2.TELEGRAM_CALLBACK}`,
|
48
|
+
},
|
46
49
|
},
|
47
50
|
API_TOKENS: {
|
48
51
|
CREATE: `${exports.ROOT}/${CONTROLLERS.API_TOKENS_CONTROLLER}/${CONTROLLERS.API_TOKENS_ROUTES.CREATE}`,
|
@@ -13,6 +13,11 @@ var GetStatusCommand;
|
|
13
13
|
response: zod_1.z.object({
|
14
14
|
isLoginAllowed: zod_1.z.boolean(),
|
15
15
|
isRegisterAllowed: zod_1.z.boolean(),
|
16
|
+
tgAuth: zod_1.z
|
17
|
+
.object({
|
18
|
+
botId: zod_1.z.number(),
|
19
|
+
})
|
20
|
+
.nullable(),
|
16
21
|
}),
|
17
22
|
});
|
18
23
|
})(GetStatusCommand || (exports.GetStatusCommand = GetStatusCommand = {}));
|
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
17
|
__exportStar(require("./get-status.command"), exports);
|
18
18
|
__exportStar(require("./login.command"), exports);
|
19
|
+
__exportStar(require("./oauth2"), exports);
|
19
20
|
__exportStar(require("./register.command"), exports);
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./telegram-callback.command"), exports);
|
@@ -0,0 +1,25 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.TelegramCallbackCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const constants_1 = require("../../../constants");
|
6
|
+
const api_1 = require("../../../api");
|
7
|
+
var TelegramCallbackCommand;
|
8
|
+
(function (TelegramCallbackCommand) {
|
9
|
+
TelegramCallbackCommand.url = api_1.REST_API.AUTH.OAUTH2.TELEGRAM_CALLBACK;
|
10
|
+
TelegramCallbackCommand.TSQ_url = TelegramCallbackCommand.url;
|
11
|
+
TelegramCallbackCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.AUTH_ROUTES.OAUTH2.TELEGRAM_CALLBACK, 'post', 'Callback from Telegram OAuth2');
|
12
|
+
TelegramCallbackCommand.RequestSchema = zod_1.z.object({
|
13
|
+
id: zod_1.z.number(),
|
14
|
+
first_name: zod_1.z.string(),
|
15
|
+
last_name: zod_1.z.string().optional(),
|
16
|
+
username: zod_1.z.string().optional(),
|
17
|
+
auth_date: zod_1.z.number(),
|
18
|
+
hash: zod_1.z.string(),
|
19
|
+
});
|
20
|
+
TelegramCallbackCommand.ResponseSchema = zod_1.z.object({
|
21
|
+
response: zod_1.z.object({
|
22
|
+
accessToken: zod_1.z.string(),
|
23
|
+
}),
|
24
|
+
});
|
25
|
+
})(TelegramCallbackCommand || (exports.TelegramCallbackCommand = TelegramCallbackCommand = {}));
|
@@ -6,7 +6,7 @@ const constants_1 = require("../../../constants");
|
|
6
6
|
const api_1 = require("../../../api");
|
7
7
|
var GetAllTagsCommand;
|
8
8
|
(function (GetAllTagsCommand) {
|
9
|
-
GetAllTagsCommand.url = api_1.REST_API.USERS.GET;
|
9
|
+
GetAllTagsCommand.url = api_1.REST_API.USERS.TAGS.GET;
|
10
10
|
GetAllTagsCommand.TSQ_url = GetAllTagsCommand.url;
|
11
11
|
GetAllTagsCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.USERS_ROUTES.TAGS.GET, 'get', 'Get all existing user tags');
|
12
12
|
GetAllTagsCommand.ResponseSchema = zod_1.z.object({
|