@remnawave/backend-contract 2.1.34 → 2.1.36
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/users.d.ts +1 -0
- package/build/backend/api/controllers/users.d.ts.map +1 -1
- package/build/backend/api/controllers/users.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/users/get-user-subscription-request-history.command.d.ts +80 -0
- package/build/backend/commands/users/get-user-subscription-request-history.command.d.ts.map +1 -0
- package/build/backend/commands/users/get-user-subscription-request-history.command.js +30 -0
- package/build/backend/commands/users/index.d.ts +1 -0
- package/build/backend/commands/users/index.d.ts.map +1 -1
- package/build/backend/commands/users/index.js +1 -0
- package/build/backend/constants/errors/errors.d.ts +10 -0
- package/build/backend/constants/errors/errors.d.ts.map +1 -1
- package/build/backend/constants/errors/errors.js +10 -0
- package/build/frontend/api/controllers/users.js +1 -0
- package/build/frontend/api/routes.js +1 -0
- package/build/frontend/commands/users/get-user-subscription-request-history.command.js +30 -0
- package/build/frontend/commands/users/index.js +1 -0
- package/build/frontend/constants/errors/errors.js +10 -0
- package/package.json +1 -1
|
@@ -7,6 +7,7 @@ export declare const USERS_ROUTES: {
|
|
|
7
7
|
readonly DELETE: (uuid: string) => string;
|
|
8
8
|
readonly GET_BY_UUID: (uuid: string) => string;
|
|
9
9
|
readonly ACCESSIBLE_NODES: (uuid: string) => string;
|
|
10
|
+
readonly SUBSCRIPTION_REQUEST_HISTORY: (uuid: string) => string;
|
|
10
11
|
readonly ACTIONS: {
|
|
11
12
|
readonly ENABLE: (uuid: string) => string;
|
|
12
13
|
readonly DISABLE: (uuid: string) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../../api/controllers/users.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,mBAAmB,EAAG,SAAkB,CAAC;AAEtD,eAAO,MAAM,YAAY;;;;4BAIN,MAAM;iCACD,MAAM;sCACD,MAAM;;
|
|
1
|
+
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../../api/controllers/users.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,mBAAmB,EAAG,SAAkB,CAAC;AAEtD,eAAO,MAAM,YAAY;;;;4BAIN,MAAM;iCACD,MAAM;sCACD,MAAM;kDACM,MAAM;;gCAExB,MAAM;iCACL,MAAM;uCACA,MAAM;6CACA,MAAM;;;yCAGV,MAAM;sCACT,MAAM;uDACW,MAAM;2CAClB,MAAM;gCACjB,MAAM;4BACV,MAAM;;;;;;;;;;;;;;;4CAiBU,MAAM;;;;;CAM/B,CAAC"}
|
|
@@ -10,6 +10,7 @@ exports.USERS_ROUTES = {
|
|
|
10
10
|
DELETE: (uuid) => `${uuid}`,
|
|
11
11
|
GET_BY_UUID: (uuid) => `${uuid}`,
|
|
12
12
|
ACCESSIBLE_NODES: (uuid) => `${uuid}/accessible-nodes`,
|
|
13
|
+
SUBSCRIPTION_REQUEST_HISTORY: (uuid) => `${uuid}/subscription-request-history`,
|
|
13
14
|
ACTIONS: {
|
|
14
15
|
ENABLE: (uuid) => `${uuid}/${exports.USERS_ACTIONS_ROUTE}/enable`,
|
|
15
16
|
DISABLE: (uuid) => `${uuid}/${exports.USERS_ACTIONS_ROUTE}/disable`,
|
|
@@ -47,6 +47,7 @@ export declare const REST_API: {
|
|
|
47
47
|
readonly DELETE: (uuid: string) => string;
|
|
48
48
|
readonly GET_BY_UUID: (uuid: string) => string;
|
|
49
49
|
readonly ACCESSIBLE_NODES: (uuid: string) => string;
|
|
50
|
+
readonly SUBSCRIPTION_REQUEST_HISTORY: (uuid: string) => string;
|
|
50
51
|
readonly ACTIONS: {
|
|
51
52
|
readonly DISABLE: (uuid: string) => string;
|
|
52
53
|
readonly ENABLE: (uuid: string) => string;
|
|
@@ -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;;
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCA+BD,MAAM;;;;;;;;;mDAYQ,MAAM;;;;;;;0CAUf,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;;CAGnC,CAAC"}
|
|
@@ -84,6 +84,7 @@ exports.REST_API = {
|
|
|
84
84
|
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.DELETE(uuid)}`,
|
|
85
85
|
GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY_UUID(uuid)}`,
|
|
86
86
|
ACCESSIBLE_NODES: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ACCESSIBLE_NODES(uuid)}`,
|
|
87
|
+
SUBSCRIPTION_REQUEST_HISTORY: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.SUBSCRIPTION_REQUEST_HISTORY(uuid)}`,
|
|
87
88
|
ACTIONS: {
|
|
88
89
|
DISABLE: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ACTIONS.DISABLE(uuid)}`,
|
|
89
90
|
ENABLE: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ACTIONS.ENABLE(uuid)}`,
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare namespace GetUserSubscriptionRequestHistoryCommand {
|
|
3
|
+
const url: (uuid: string) => string;
|
|
4
|
+
const TSQ_url: string;
|
|
5
|
+
const endpointDetails: import("../../constants").EndpointDetails;
|
|
6
|
+
const RequestSchema: z.ZodObject<{
|
|
7
|
+
uuid: z.ZodString;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
uuid: string;
|
|
10
|
+
}, {
|
|
11
|
+
uuid: string;
|
|
12
|
+
}>;
|
|
13
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
14
|
+
const ResponseSchema: z.ZodObject<{
|
|
15
|
+
response: z.ZodObject<{
|
|
16
|
+
total: z.ZodNumber;
|
|
17
|
+
records: z.ZodArray<z.ZodObject<{
|
|
18
|
+
id: z.ZodNumber;
|
|
19
|
+
userUuid: z.ZodString;
|
|
20
|
+
requestAt: z.ZodEffects<z.ZodString, Date, string>;
|
|
21
|
+
requestIp: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
22
|
+
userAgent: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
id: number;
|
|
25
|
+
userUuid: string;
|
|
26
|
+
requestAt: Date;
|
|
27
|
+
userAgent?: string | null | undefined;
|
|
28
|
+
requestIp?: string | null | undefined;
|
|
29
|
+
}, {
|
|
30
|
+
id: number;
|
|
31
|
+
userUuid: string;
|
|
32
|
+
requestAt: string;
|
|
33
|
+
userAgent?: string | null | undefined;
|
|
34
|
+
requestIp?: string | null | undefined;
|
|
35
|
+
}>, "many">;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
total: number;
|
|
38
|
+
records: {
|
|
39
|
+
id: number;
|
|
40
|
+
userUuid: string;
|
|
41
|
+
requestAt: Date;
|
|
42
|
+
userAgent?: string | null | undefined;
|
|
43
|
+
requestIp?: string | null | undefined;
|
|
44
|
+
}[];
|
|
45
|
+
}, {
|
|
46
|
+
total: number;
|
|
47
|
+
records: {
|
|
48
|
+
id: number;
|
|
49
|
+
userUuid: string;
|
|
50
|
+
requestAt: string;
|
|
51
|
+
userAgent?: string | null | undefined;
|
|
52
|
+
requestIp?: string | null | undefined;
|
|
53
|
+
}[];
|
|
54
|
+
}>;
|
|
55
|
+
}, "strip", z.ZodTypeAny, {
|
|
56
|
+
response: {
|
|
57
|
+
total: number;
|
|
58
|
+
records: {
|
|
59
|
+
id: number;
|
|
60
|
+
userUuid: string;
|
|
61
|
+
requestAt: Date;
|
|
62
|
+
userAgent?: string | null | undefined;
|
|
63
|
+
requestIp?: string | null | undefined;
|
|
64
|
+
}[];
|
|
65
|
+
};
|
|
66
|
+
}, {
|
|
67
|
+
response: {
|
|
68
|
+
total: number;
|
|
69
|
+
records: {
|
|
70
|
+
id: number;
|
|
71
|
+
userUuid: string;
|
|
72
|
+
requestAt: string;
|
|
73
|
+
userAgent?: string | null | undefined;
|
|
74
|
+
requestIp?: string | null | undefined;
|
|
75
|
+
}[];
|
|
76
|
+
};
|
|
77
|
+
}>;
|
|
78
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=get-user-subscription-request-history.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-user-subscription-request-history.command.d.ts","sourceRoot":"","sources":["../../../../commands/users/get-user-subscription-request-history.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,wCAAwC,CAAC;IAC/C,MAAM,GAAG,0BAA8C,CAAC;IACxD,MAAM,OAAO,QAAe,CAAC;IAE7B,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAgBzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetUserSubscriptionRequestHistoryCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
const api_1 = require("../../api");
|
|
7
|
+
var GetUserSubscriptionRequestHistoryCommand;
|
|
8
|
+
(function (GetUserSubscriptionRequestHistoryCommand) {
|
|
9
|
+
GetUserSubscriptionRequestHistoryCommand.url = api_1.REST_API.USERS.SUBSCRIPTION_REQUEST_HISTORY;
|
|
10
|
+
GetUserSubscriptionRequestHistoryCommand.TSQ_url = GetUserSubscriptionRequestHistoryCommand.url(':uuid');
|
|
11
|
+
GetUserSubscriptionRequestHistoryCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.USERS_ROUTES.SUBSCRIPTION_REQUEST_HISTORY(':uuid'), 'get', 'Get user subscription request history, recent 24 records');
|
|
12
|
+
GetUserSubscriptionRequestHistoryCommand.RequestSchema = zod_1.z.object({
|
|
13
|
+
uuid: zod_1.z.string().uuid(),
|
|
14
|
+
});
|
|
15
|
+
GetUserSubscriptionRequestHistoryCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
+
response: zod_1.z.object({
|
|
17
|
+
total: zod_1.z.number(),
|
|
18
|
+
records: zod_1.z.array(zod_1.z.object({
|
|
19
|
+
id: zod_1.z.number(),
|
|
20
|
+
userUuid: zod_1.z.string().uuid(),
|
|
21
|
+
requestAt: zod_1.z
|
|
22
|
+
.string()
|
|
23
|
+
.datetime()
|
|
24
|
+
.transform((str) => new Date(str)),
|
|
25
|
+
requestIp: zod_1.z.string().optional().nullable(),
|
|
26
|
+
userAgent: zod_1.z.string().optional().nullable(),
|
|
27
|
+
})),
|
|
28
|
+
}),
|
|
29
|
+
});
|
|
30
|
+
})(GetUserSubscriptionRequestHistoryCommand || (exports.GetUserSubscriptionRequestHistoryCommand = GetUserSubscriptionRequestHistoryCommand = {}));
|
|
@@ -7,6 +7,7 @@ export * from './get-all-users.command';
|
|
|
7
7
|
export * from './get-by';
|
|
8
8
|
export * from './get-user-accessible-nodes.command';
|
|
9
9
|
export * from './get-user-by-uuid.command';
|
|
10
|
+
export * from './get-user-subscription-request-history.command';
|
|
10
11
|
export * from './get-user-usage-by-range.command';
|
|
11
12
|
export * from './tags';
|
|
12
13
|
export * from './update-user.command';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/users/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAE3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,UAAU,CAAC;AAEzB,cAAc,qCAAqC,CAAC;AAEpD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/users/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAE3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,UAAU,CAAC;AAEzB,cAAc,qCAAqC,CAAC;AAEpD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iDAAiD,CAAC;AAEhE,cAAc,mCAAmC,CAAC;AAClD,cAAc,QAAQ,CAAC;AAEvB,cAAc,uBAAuB,CAAC"}
|
|
@@ -23,6 +23,7 @@ __exportStar(require("./get-all-users.command"), exports);
|
|
|
23
23
|
__exportStar(require("./get-by"), exports);
|
|
24
24
|
__exportStar(require("./get-user-accessible-nodes.command"), exports);
|
|
25
25
|
__exportStar(require("./get-user-by-uuid.command"), exports);
|
|
26
|
+
__exportStar(require("./get-user-subscription-request-history.command"), exports);
|
|
26
27
|
__exportStar(require("./get-user-usage-by-range.command"), exports);
|
|
27
28
|
__exportStar(require("./tags"), exports);
|
|
28
29
|
__exportStar(require("./update-user.command"), exports);
|
|
@@ -804,5 +804,15 @@ export declare const ERRORS: {
|
|
|
804
804
|
readonly message: "Delete hwid user devices error";
|
|
805
805
|
readonly httpCode: 500;
|
|
806
806
|
};
|
|
807
|
+
readonly CREATE_USER_SUBSCRIPTION_REQUEST_HISTORY_ERROR: {
|
|
808
|
+
readonly code: "A156";
|
|
809
|
+
readonly message: "Create user subscription request history error";
|
|
810
|
+
readonly httpCode: 500;
|
|
811
|
+
};
|
|
812
|
+
readonly GET_USER_SUBSCRIPTION_REQUEST_HISTORY_ERROR: {
|
|
813
|
+
readonly code: "A157";
|
|
814
|
+
readonly message: "Get user subscription request history error";
|
|
815
|
+
readonly httpCode: 500;
|
|
816
|
+
};
|
|
807
817
|
};
|
|
808
818
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../constants/errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAwJY,MAAM;;;;;;;;;;wCAUN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA4IN,MAAM
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../constants/errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAwJY,MAAM;;;;;;;;;;wCAUN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA4IN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoe3B,CAAC"}
|
|
@@ -775,4 +775,14 @@ exports.ERRORS = {
|
|
|
775
775
|
message: 'Delete hwid user devices error',
|
|
776
776
|
httpCode: 500,
|
|
777
777
|
},
|
|
778
|
+
CREATE_USER_SUBSCRIPTION_REQUEST_HISTORY_ERROR: {
|
|
779
|
+
code: 'A156',
|
|
780
|
+
message: 'Create user subscription request history error',
|
|
781
|
+
httpCode: 500,
|
|
782
|
+
},
|
|
783
|
+
GET_USER_SUBSCRIPTION_REQUEST_HISTORY_ERROR: {
|
|
784
|
+
code: 'A157',
|
|
785
|
+
message: 'Get user subscription request history error',
|
|
786
|
+
httpCode: 500,
|
|
787
|
+
},
|
|
778
788
|
};
|
|
@@ -10,6 +10,7 @@ exports.USERS_ROUTES = {
|
|
|
10
10
|
DELETE: (uuid) => `${uuid}`,
|
|
11
11
|
GET_BY_UUID: (uuid) => `${uuid}`,
|
|
12
12
|
ACCESSIBLE_NODES: (uuid) => `${uuid}/accessible-nodes`,
|
|
13
|
+
SUBSCRIPTION_REQUEST_HISTORY: (uuid) => `${uuid}/subscription-request-history`,
|
|
13
14
|
ACTIONS: {
|
|
14
15
|
ENABLE: (uuid) => `${uuid}/${exports.USERS_ACTIONS_ROUTE}/enable`,
|
|
15
16
|
DISABLE: (uuid) => `${uuid}/${exports.USERS_ACTIONS_ROUTE}/disable`,
|
|
@@ -84,6 +84,7 @@ exports.REST_API = {
|
|
|
84
84
|
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.DELETE(uuid)}`,
|
|
85
85
|
GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY_UUID(uuid)}`,
|
|
86
86
|
ACCESSIBLE_NODES: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ACCESSIBLE_NODES(uuid)}`,
|
|
87
|
+
SUBSCRIPTION_REQUEST_HISTORY: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.SUBSCRIPTION_REQUEST_HISTORY(uuid)}`,
|
|
87
88
|
ACTIONS: {
|
|
88
89
|
DISABLE: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ACTIONS.DISABLE(uuid)}`,
|
|
89
90
|
ENABLE: (uuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ACTIONS.ENABLE(uuid)}`,
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetUserSubscriptionRequestHistoryCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
const api_1 = require("../../api");
|
|
7
|
+
var GetUserSubscriptionRequestHistoryCommand;
|
|
8
|
+
(function (GetUserSubscriptionRequestHistoryCommand) {
|
|
9
|
+
GetUserSubscriptionRequestHistoryCommand.url = api_1.REST_API.USERS.SUBSCRIPTION_REQUEST_HISTORY;
|
|
10
|
+
GetUserSubscriptionRequestHistoryCommand.TSQ_url = GetUserSubscriptionRequestHistoryCommand.url(':uuid');
|
|
11
|
+
GetUserSubscriptionRequestHistoryCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.USERS_ROUTES.SUBSCRIPTION_REQUEST_HISTORY(':uuid'), 'get', 'Get user subscription request history, recent 24 records');
|
|
12
|
+
GetUserSubscriptionRequestHistoryCommand.RequestSchema = zod_1.z.object({
|
|
13
|
+
uuid: zod_1.z.string().uuid(),
|
|
14
|
+
});
|
|
15
|
+
GetUserSubscriptionRequestHistoryCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
+
response: zod_1.z.object({
|
|
17
|
+
total: zod_1.z.number(),
|
|
18
|
+
records: zod_1.z.array(zod_1.z.object({
|
|
19
|
+
id: zod_1.z.number(),
|
|
20
|
+
userUuid: zod_1.z.string().uuid(),
|
|
21
|
+
requestAt: zod_1.z
|
|
22
|
+
.string()
|
|
23
|
+
.datetime()
|
|
24
|
+
.transform((str) => new Date(str)),
|
|
25
|
+
requestIp: zod_1.z.string().optional().nullable(),
|
|
26
|
+
userAgent: zod_1.z.string().optional().nullable(),
|
|
27
|
+
})),
|
|
28
|
+
}),
|
|
29
|
+
});
|
|
30
|
+
})(GetUserSubscriptionRequestHistoryCommand || (exports.GetUserSubscriptionRequestHistoryCommand = GetUserSubscriptionRequestHistoryCommand = {}));
|
|
@@ -23,6 +23,7 @@ __exportStar(require("./get-all-users.command"), exports);
|
|
|
23
23
|
__exportStar(require("./get-by"), exports);
|
|
24
24
|
__exportStar(require("./get-user-accessible-nodes.command"), exports);
|
|
25
25
|
__exportStar(require("./get-user-by-uuid.command"), exports);
|
|
26
|
+
__exportStar(require("./get-user-subscription-request-history.command"), exports);
|
|
26
27
|
__exportStar(require("./get-user-usage-by-range.command"), exports);
|
|
27
28
|
__exportStar(require("./tags"), exports);
|
|
28
29
|
__exportStar(require("./update-user.command"), exports);
|
|
@@ -775,4 +775,14 @@ exports.ERRORS = {
|
|
|
775
775
|
message: 'Delete hwid user devices error',
|
|
776
776
|
httpCode: 500,
|
|
777
777
|
},
|
|
778
|
+
CREATE_USER_SUBSCRIPTION_REQUEST_HISTORY_ERROR: {
|
|
779
|
+
code: 'A156',
|
|
780
|
+
message: 'Create user subscription request history error',
|
|
781
|
+
httpCode: 500,
|
|
782
|
+
},
|
|
783
|
+
GET_USER_SUBSCRIPTION_REQUEST_HISTORY_ERROR: {
|
|
784
|
+
code: 'A157',
|
|
785
|
+
message: 'Get user subscription request history error',
|
|
786
|
+
httpCode: 500,
|
|
787
|
+
},
|
|
778
788
|
};
|