@remnawave/backend-contract 2.1.25 → 2.1.26
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/subscriptions.d.ts +2 -0
- package/build/backend/api/controllers/subscriptions.d.ts.map +1 -1
- package/build/backend/api/controllers/subscriptions.js +2 -0
- package/build/backend/api/routes.d.ts +2 -0
- package/build/backend/api/routes.d.ts.map +1 -1
- package/build/backend/api/routes.js +2 -0
- package/build/backend/commands/subscription/get-subscription-info-by-short-uuid.command.d.ts +4 -4
- package/build/backend/commands/subscription/get-subscription-info-by-short-uuid.command.d.ts.map +1 -1
- package/build/backend/commands/subscription/get-subscription-info-by-short-uuid.command.js +3 -28
- package/build/backend/commands/subscriptions/get-all-subscriptions.command.d.ts +6 -6
- package/build/backend/commands/subscriptions/get-by/get-subscription-by-short-uuid-protected.command.d.ts +180 -0
- package/build/backend/commands/subscriptions/get-by/get-subscription-by-short-uuid-protected.command.d.ts.map +1 -0
- package/build/backend/commands/subscriptions/get-by/get-subscription-by-short-uuid-protected.command.js +19 -0
- package/build/backend/commands/subscriptions/get-by/get-subscription-by-username.command.d.ts +51 -4
- package/build/backend/commands/subscriptions/get-by/get-subscription-by-username.command.d.ts.map +1 -1
- package/build/backend/commands/subscriptions/get-by/get-subscription-by-username.command.js +3 -21
- package/build/backend/commands/subscriptions/get-by/get-subscription-by-uuid.command.d.ts +180 -0
- package/build/backend/commands/subscriptions/get-by/get-subscription-by-uuid.command.d.ts.map +1 -0
- package/build/backend/commands/subscriptions/get-by/get-subscription-by-uuid.command.js +19 -0
- package/build/backend/commands/subscriptions/get-by/index.d.ts +2 -0
- package/build/backend/commands/subscriptions/get-by/index.d.ts.map +1 -1
- package/build/backend/commands/subscriptions/get-by/index.js +2 -0
- package/build/backend/models/index.d.ts +1 -0
- package/build/backend/models/index.d.ts.map +1 -1
- package/build/backend/models/index.js +1 -0
- package/build/backend/models/subscription-info.schema.d.ts +114 -0
- package/build/backend/models/subscription-info.schema.d.ts.map +1 -0
- package/build/backend/models/subscription-info.schema.js +31 -0
- package/build/frontend/api/controllers/subscriptions.js +2 -0
- package/build/frontend/api/routes.js +2 -0
- package/build/frontend/commands/subscription/get-subscription-info-by-short-uuid.command.js +3 -28
- package/build/frontend/commands/subscriptions/get-by/get-subscription-by-short-uuid-protected.command.js +19 -0
- package/build/frontend/commands/subscriptions/get-by/get-subscription-by-username.command.js +3 -21
- package/build/frontend/commands/subscriptions/get-by/get-subscription-by-uuid.command.js +19 -0
- package/build/frontend/commands/subscriptions/get-by/index.js +2 -0
- package/build/frontend/models/index.js +1 -0
- package/build/frontend/models/subscription-info.schema.js +31 -0
- package/package.json +1 -1
@@ -0,0 +1,180 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
export declare namespace GetSubscriptionByUuidCommand {
|
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
|
+
isFound: z.ZodBoolean;
|
17
|
+
user: z.ZodObject<{
|
18
|
+
shortUuid: z.ZodString;
|
19
|
+
daysLeft: z.ZodNumber;
|
20
|
+
trafficUsed: z.ZodString;
|
21
|
+
trafficLimit: z.ZodString;
|
22
|
+
lifetimeTrafficUsed: z.ZodString;
|
23
|
+
trafficUsedBytes: z.ZodString;
|
24
|
+
trafficLimitBytes: z.ZodString;
|
25
|
+
lifetimeTrafficUsedBytes: z.ZodString;
|
26
|
+
username: z.ZodString;
|
27
|
+
expiresAt: z.ZodEffects<z.ZodString, Date, string>;
|
28
|
+
isActive: z.ZodBoolean;
|
29
|
+
userStatus: z.ZodNativeEnum<{
|
30
|
+
readonly ACTIVE: "ACTIVE";
|
31
|
+
readonly DISABLED: "DISABLED";
|
32
|
+
readonly LIMITED: "LIMITED";
|
33
|
+
readonly EXPIRED: "EXPIRED";
|
34
|
+
}>;
|
35
|
+
trafficLimitStrategy: z.ZodNativeEnum<{
|
36
|
+
readonly NO_RESET: "NO_RESET";
|
37
|
+
readonly DAY: "DAY";
|
38
|
+
readonly WEEK: "WEEK";
|
39
|
+
readonly MONTH: "MONTH";
|
40
|
+
}>;
|
41
|
+
}, "strip", z.ZodTypeAny, {
|
42
|
+
username: string;
|
43
|
+
shortUuid: string;
|
44
|
+
trafficLimitBytes: string;
|
45
|
+
trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
|
46
|
+
trafficUsedBytes: string;
|
47
|
+
daysLeft: number;
|
48
|
+
trafficUsed: string;
|
49
|
+
trafficLimit: string;
|
50
|
+
lifetimeTrafficUsed: string;
|
51
|
+
lifetimeTrafficUsedBytes: string;
|
52
|
+
expiresAt: Date;
|
53
|
+
isActive: boolean;
|
54
|
+
userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
55
|
+
}, {
|
56
|
+
username: string;
|
57
|
+
shortUuid: string;
|
58
|
+
trafficLimitBytes: string;
|
59
|
+
trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
|
60
|
+
trafficUsedBytes: string;
|
61
|
+
daysLeft: number;
|
62
|
+
trafficUsed: string;
|
63
|
+
trafficLimit: string;
|
64
|
+
lifetimeTrafficUsed: string;
|
65
|
+
lifetimeTrafficUsedBytes: string;
|
66
|
+
expiresAt: string;
|
67
|
+
isActive: boolean;
|
68
|
+
userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
69
|
+
}>;
|
70
|
+
links: z.ZodArray<z.ZodString, "many">;
|
71
|
+
ssConfLinks: z.ZodRecord<z.ZodString, z.ZodString>;
|
72
|
+
subscriptionUrl: z.ZodString;
|
73
|
+
happ: z.ZodObject<{
|
74
|
+
cryptoLink: z.ZodString;
|
75
|
+
}, "strip", z.ZodTypeAny, {
|
76
|
+
cryptoLink: string;
|
77
|
+
}, {
|
78
|
+
cryptoLink: string;
|
79
|
+
}>;
|
80
|
+
}, "strip", z.ZodTypeAny, {
|
81
|
+
subscriptionUrl: string;
|
82
|
+
happ: {
|
83
|
+
cryptoLink: string;
|
84
|
+
};
|
85
|
+
isFound: boolean;
|
86
|
+
user: {
|
87
|
+
username: string;
|
88
|
+
shortUuid: string;
|
89
|
+
trafficLimitBytes: string;
|
90
|
+
trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
|
91
|
+
trafficUsedBytes: string;
|
92
|
+
daysLeft: number;
|
93
|
+
trafficUsed: string;
|
94
|
+
trafficLimit: string;
|
95
|
+
lifetimeTrafficUsed: string;
|
96
|
+
lifetimeTrafficUsedBytes: string;
|
97
|
+
expiresAt: Date;
|
98
|
+
isActive: boolean;
|
99
|
+
userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
100
|
+
};
|
101
|
+
links: string[];
|
102
|
+
ssConfLinks: Record<string, string>;
|
103
|
+
}, {
|
104
|
+
subscriptionUrl: string;
|
105
|
+
happ: {
|
106
|
+
cryptoLink: string;
|
107
|
+
};
|
108
|
+
isFound: boolean;
|
109
|
+
user: {
|
110
|
+
username: string;
|
111
|
+
shortUuid: string;
|
112
|
+
trafficLimitBytes: string;
|
113
|
+
trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
|
114
|
+
trafficUsedBytes: string;
|
115
|
+
daysLeft: number;
|
116
|
+
trafficUsed: string;
|
117
|
+
trafficLimit: string;
|
118
|
+
lifetimeTrafficUsed: string;
|
119
|
+
lifetimeTrafficUsedBytes: string;
|
120
|
+
expiresAt: string;
|
121
|
+
isActive: boolean;
|
122
|
+
userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
123
|
+
};
|
124
|
+
links: string[];
|
125
|
+
ssConfLinks: Record<string, string>;
|
126
|
+
}>;
|
127
|
+
}, "strip", z.ZodTypeAny, {
|
128
|
+
response: {
|
129
|
+
subscriptionUrl: string;
|
130
|
+
happ: {
|
131
|
+
cryptoLink: string;
|
132
|
+
};
|
133
|
+
isFound: boolean;
|
134
|
+
user: {
|
135
|
+
username: string;
|
136
|
+
shortUuid: string;
|
137
|
+
trafficLimitBytes: string;
|
138
|
+
trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
|
139
|
+
trafficUsedBytes: string;
|
140
|
+
daysLeft: number;
|
141
|
+
trafficUsed: string;
|
142
|
+
trafficLimit: string;
|
143
|
+
lifetimeTrafficUsed: string;
|
144
|
+
lifetimeTrafficUsedBytes: string;
|
145
|
+
expiresAt: Date;
|
146
|
+
isActive: boolean;
|
147
|
+
userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
148
|
+
};
|
149
|
+
links: string[];
|
150
|
+
ssConfLinks: Record<string, string>;
|
151
|
+
};
|
152
|
+
}, {
|
153
|
+
response: {
|
154
|
+
subscriptionUrl: string;
|
155
|
+
happ: {
|
156
|
+
cryptoLink: string;
|
157
|
+
};
|
158
|
+
isFound: boolean;
|
159
|
+
user: {
|
160
|
+
username: string;
|
161
|
+
shortUuid: string;
|
162
|
+
trafficLimitBytes: string;
|
163
|
+
trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
|
164
|
+
trafficUsedBytes: string;
|
165
|
+
daysLeft: number;
|
166
|
+
trafficUsed: string;
|
167
|
+
trafficLimit: string;
|
168
|
+
lifetimeTrafficUsed: string;
|
169
|
+
lifetimeTrafficUsedBytes: string;
|
170
|
+
expiresAt: string;
|
171
|
+
isActive: boolean;
|
172
|
+
userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
173
|
+
};
|
174
|
+
links: string[];
|
175
|
+
ssConfLinks: Record<string, string>;
|
176
|
+
};
|
177
|
+
}>;
|
178
|
+
type Response = z.infer<typeof ResponseSchema>;
|
179
|
+
}
|
180
|
+
//# sourceMappingURL=get-subscription-by-uuid.command.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"get-subscription-by-uuid.command.d.ts","sourceRoot":"","sources":["../../../../../commands/subscriptions/get-by/get-subscription-by-uuid.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,4BAA4B,CAAC;IACnC,MAAM,GAAG,0BAAqC,CAAC;IAC/C,MAAM,OAAO,QAAe,CAAC;IAE7B,MAAM,eAAe,8CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,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"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetSubscriptionByUuidCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../../api");
|
6
|
+
const models_1 = require("../../../models");
|
7
|
+
const constants_1 = require("../../../constants");
|
8
|
+
var GetSubscriptionByUuidCommand;
|
9
|
+
(function (GetSubscriptionByUuidCommand) {
|
10
|
+
GetSubscriptionByUuidCommand.url = api_1.REST_API.SUBSCRIPTIONS.GET_BY.UUID;
|
11
|
+
GetSubscriptionByUuidCommand.TSQ_url = GetSubscriptionByUuidCommand.url(':uuid');
|
12
|
+
GetSubscriptionByUuidCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTIONS_ROUTES.GET_BY.UUID(':uuid'), 'get', 'Get subscription by uuid');
|
13
|
+
GetSubscriptionByUuidCommand.RequestSchema = zod_1.z.object({
|
14
|
+
uuid: zod_1.z.string(),
|
15
|
+
});
|
16
|
+
GetSubscriptionByUuidCommand.ResponseSchema = zod_1.z.object({
|
17
|
+
response: models_1.SubscriptionInfoSchema,
|
18
|
+
});
|
19
|
+
})(GetSubscriptionByUuidCommand || (exports.GetSubscriptionByUuidCommand = GetSubscriptionByUuidCommand = {}));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../commands/subscriptions/get-by/index.ts"],"names":[],"mappings":"AAAA,cAAc,wCAAwC,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../commands/subscriptions/get-by/index.ts"],"names":[],"mappings":"AAAA,cAAc,oDAAoD,CAAC;AACnE,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC"}
|
@@ -14,4 +14,6 @@ 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("./get-subscription-by-short-uuid-protected.command"), exports);
|
17
18
|
__exportStar(require("./get-subscription-by-username.command"), exports);
|
19
|
+
__exportStar(require("./get-subscription-by-uuid.command"), exports);
|
@@ -15,6 +15,7 @@ export * from './infra-provider.schema';
|
|
15
15
|
export * from './internal-squad.schema';
|
16
16
|
export * from './last-connected-node.schema';
|
17
17
|
export * from './nodes.schema';
|
18
|
+
export * from './subscription-info.schema';
|
18
19
|
export * from './subscription-settings.schema';
|
19
20
|
export * from './users.schema';
|
20
21
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../models/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,kCAAkC,CAAC;AACjD,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gBAAgB,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../models/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,kCAAkC,CAAC;AACjD,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gBAAgB,CAAC"}
|
@@ -31,5 +31,6 @@ __exportStar(require("./infra-provider.schema"), exports);
|
|
31
31
|
__exportStar(require("./internal-squad.schema"), exports);
|
32
32
|
__exportStar(require("./last-connected-node.schema"), exports);
|
33
33
|
__exportStar(require("./nodes.schema"), exports);
|
34
|
+
__exportStar(require("./subscription-info.schema"), exports);
|
34
35
|
__exportStar(require("./subscription-settings.schema"), exports);
|
35
36
|
__exportStar(require("./users.schema"), exports);
|
@@ -0,0 +1,114 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
export declare const SubscriptionInfoSchema: z.ZodObject<{
|
3
|
+
isFound: z.ZodBoolean;
|
4
|
+
user: z.ZodObject<{
|
5
|
+
shortUuid: z.ZodString;
|
6
|
+
daysLeft: z.ZodNumber;
|
7
|
+
trafficUsed: z.ZodString;
|
8
|
+
trafficLimit: z.ZodString;
|
9
|
+
lifetimeTrafficUsed: z.ZodString;
|
10
|
+
trafficUsedBytes: z.ZodString;
|
11
|
+
trafficLimitBytes: z.ZodString;
|
12
|
+
lifetimeTrafficUsedBytes: z.ZodString;
|
13
|
+
username: z.ZodString;
|
14
|
+
expiresAt: z.ZodEffects<z.ZodString, Date, string>;
|
15
|
+
isActive: z.ZodBoolean;
|
16
|
+
userStatus: z.ZodNativeEnum<{
|
17
|
+
readonly ACTIVE: "ACTIVE";
|
18
|
+
readonly DISABLED: "DISABLED";
|
19
|
+
readonly LIMITED: "LIMITED";
|
20
|
+
readonly EXPIRED: "EXPIRED";
|
21
|
+
}>;
|
22
|
+
trafficLimitStrategy: z.ZodNativeEnum<{
|
23
|
+
readonly NO_RESET: "NO_RESET";
|
24
|
+
readonly DAY: "DAY";
|
25
|
+
readonly WEEK: "WEEK";
|
26
|
+
readonly MONTH: "MONTH";
|
27
|
+
}>;
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
29
|
+
username: string;
|
30
|
+
shortUuid: string;
|
31
|
+
trafficLimitBytes: string;
|
32
|
+
trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
|
33
|
+
trafficUsedBytes: string;
|
34
|
+
daysLeft: number;
|
35
|
+
trafficUsed: string;
|
36
|
+
trafficLimit: string;
|
37
|
+
lifetimeTrafficUsed: string;
|
38
|
+
lifetimeTrafficUsedBytes: string;
|
39
|
+
expiresAt: Date;
|
40
|
+
isActive: boolean;
|
41
|
+
userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
42
|
+
}, {
|
43
|
+
username: string;
|
44
|
+
shortUuid: string;
|
45
|
+
trafficLimitBytes: string;
|
46
|
+
trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
|
47
|
+
trafficUsedBytes: string;
|
48
|
+
daysLeft: number;
|
49
|
+
trafficUsed: string;
|
50
|
+
trafficLimit: string;
|
51
|
+
lifetimeTrafficUsed: string;
|
52
|
+
lifetimeTrafficUsedBytes: string;
|
53
|
+
expiresAt: string;
|
54
|
+
isActive: boolean;
|
55
|
+
userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
56
|
+
}>;
|
57
|
+
links: z.ZodArray<z.ZodString, "many">;
|
58
|
+
ssConfLinks: z.ZodRecord<z.ZodString, z.ZodString>;
|
59
|
+
subscriptionUrl: z.ZodString;
|
60
|
+
happ: z.ZodObject<{
|
61
|
+
cryptoLink: z.ZodString;
|
62
|
+
}, "strip", z.ZodTypeAny, {
|
63
|
+
cryptoLink: string;
|
64
|
+
}, {
|
65
|
+
cryptoLink: string;
|
66
|
+
}>;
|
67
|
+
}, "strip", z.ZodTypeAny, {
|
68
|
+
subscriptionUrl: string;
|
69
|
+
happ: {
|
70
|
+
cryptoLink: string;
|
71
|
+
};
|
72
|
+
isFound: boolean;
|
73
|
+
user: {
|
74
|
+
username: string;
|
75
|
+
shortUuid: string;
|
76
|
+
trafficLimitBytes: string;
|
77
|
+
trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
|
78
|
+
trafficUsedBytes: string;
|
79
|
+
daysLeft: number;
|
80
|
+
trafficUsed: string;
|
81
|
+
trafficLimit: string;
|
82
|
+
lifetimeTrafficUsed: string;
|
83
|
+
lifetimeTrafficUsedBytes: string;
|
84
|
+
expiresAt: Date;
|
85
|
+
isActive: boolean;
|
86
|
+
userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
87
|
+
};
|
88
|
+
links: string[];
|
89
|
+
ssConfLinks: Record<string, string>;
|
90
|
+
}, {
|
91
|
+
subscriptionUrl: string;
|
92
|
+
happ: {
|
93
|
+
cryptoLink: string;
|
94
|
+
};
|
95
|
+
isFound: boolean;
|
96
|
+
user: {
|
97
|
+
username: string;
|
98
|
+
shortUuid: string;
|
99
|
+
trafficLimitBytes: string;
|
100
|
+
trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
|
101
|
+
trafficUsedBytes: string;
|
102
|
+
daysLeft: number;
|
103
|
+
trafficUsed: string;
|
104
|
+
trafficLimit: string;
|
105
|
+
lifetimeTrafficUsed: string;
|
106
|
+
lifetimeTrafficUsedBytes: string;
|
107
|
+
expiresAt: string;
|
108
|
+
isActive: boolean;
|
109
|
+
userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
|
110
|
+
};
|
111
|
+
links: string[];
|
112
|
+
ssConfLinks: Record<string, string>;
|
113
|
+
}>;
|
114
|
+
//# sourceMappingURL=subscription-info.schema.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"subscription-info.schema.d.ts","sourceRoot":"","sources":["../../../models/subscription-info.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBjC,CAAC"}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.SubscriptionInfoSchema = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const constants_1 = require("../constants");
|
6
|
+
const happ_schema_1 = require("./happ.schema");
|
7
|
+
exports.SubscriptionInfoSchema = zod_1.z.object({
|
8
|
+
isFound: zod_1.z.boolean(),
|
9
|
+
user: zod_1.z.object({
|
10
|
+
shortUuid: zod_1.z.string(),
|
11
|
+
daysLeft: zod_1.z.number(),
|
12
|
+
trafficUsed: zod_1.z.string(),
|
13
|
+
trafficLimit: zod_1.z.string(),
|
14
|
+
lifetimeTrafficUsed: zod_1.z.string(),
|
15
|
+
trafficUsedBytes: zod_1.z.string(),
|
16
|
+
trafficLimitBytes: zod_1.z.string(),
|
17
|
+
lifetimeTrafficUsedBytes: zod_1.z.string(),
|
18
|
+
username: zod_1.z.string(),
|
19
|
+
expiresAt: zod_1.z
|
20
|
+
.string()
|
21
|
+
.datetime()
|
22
|
+
.transform((str) => new Date(str)),
|
23
|
+
isActive: zod_1.z.boolean(),
|
24
|
+
userStatus: zod_1.z.nativeEnum(constants_1.USERS_STATUS),
|
25
|
+
trafficLimitStrategy: zod_1.z.nativeEnum(constants_1.RESET_PERIODS),
|
26
|
+
}),
|
27
|
+
links: zod_1.z.array(zod_1.z.string()),
|
28
|
+
ssConfLinks: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
|
29
|
+
subscriptionUrl: zod_1.z.string(),
|
30
|
+
happ: happ_schema_1.HappSchema,
|
31
|
+
});
|
@@ -169,6 +169,8 @@ exports.REST_API = {
|
|
169
169
|
GET: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTIONS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTIONS_ROUTES.GET}`,
|
170
170
|
GET_BY: {
|
171
171
|
USERNAME: (username) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTIONS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTIONS_ROUTES.GET_BY.USERNAME(username)}`,
|
172
|
+
UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTIONS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTIONS_ROUTES.GET_BY.UUID(uuid)}`,
|
173
|
+
SHORT_UUID: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTIONS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTIONS_ROUTES.GET_BY.SHORT_UUID(shortUuid)}`,
|
172
174
|
},
|
173
175
|
},
|
174
176
|
CONFIG_PROFILES: {
|
@@ -2,43 +2,18 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.GetSubscriptionInfoByShortUuidCommand = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
|
-
const constants_1 = require("../../constants");
|
6
5
|
const api_1 = require("../../api");
|
7
|
-
const constants_2 = require("../../constants");
|
8
6
|
const models_1 = require("../../models");
|
7
|
+
const constants_1 = require("../../constants");
|
9
8
|
var GetSubscriptionInfoByShortUuidCommand;
|
10
9
|
(function (GetSubscriptionInfoByShortUuidCommand) {
|
11
10
|
GetSubscriptionInfoByShortUuidCommand.url = api_1.REST_API.SUBSCRIPTION.GET_INFO;
|
12
11
|
GetSubscriptionInfoByShortUuidCommand.TSQ_url = GetSubscriptionInfoByShortUuidCommand.url(':shortUuid');
|
13
|
-
GetSubscriptionInfoByShortUuidCommand.endpointDetails = (0,
|
12
|
+
GetSubscriptionInfoByShortUuidCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTION_ROUTES.GET_INFO(':shortUuid'), 'get', 'Public endpoint: Get Subscription Info by Short UUID');
|
14
13
|
GetSubscriptionInfoByShortUuidCommand.RequestSchema = zod_1.z.object({
|
15
14
|
shortUuid: zod_1.z.string(),
|
16
15
|
});
|
17
16
|
GetSubscriptionInfoByShortUuidCommand.ResponseSchema = zod_1.z.object({
|
18
|
-
response:
|
19
|
-
isFound: zod_1.z.boolean(),
|
20
|
-
user: zod_1.z.object({
|
21
|
-
shortUuid: zod_1.z.string(),
|
22
|
-
daysLeft: zod_1.z.number(),
|
23
|
-
trafficUsed: zod_1.z.string(),
|
24
|
-
trafficLimit: zod_1.z.string(),
|
25
|
-
lifetimeTrafficUsed: zod_1.z.string(),
|
26
|
-
trafficUsedBytes: zod_1.z.string(),
|
27
|
-
trafficLimitBytes: zod_1.z.string(),
|
28
|
-
lifetimeTrafficUsedBytes: zod_1.z.string(),
|
29
|
-
username: zod_1.z.string(),
|
30
|
-
expiresAt: zod_1.z
|
31
|
-
.string()
|
32
|
-
.datetime()
|
33
|
-
.transform((str) => new Date(str)),
|
34
|
-
isActive: zod_1.z.boolean(),
|
35
|
-
userStatus: zod_1.z.nativeEnum(constants_1.USERS_STATUS),
|
36
|
-
trafficLimitStrategy: zod_1.z.nativeEnum(constants_1.RESET_PERIODS),
|
37
|
-
}),
|
38
|
-
links: zod_1.z.array(zod_1.z.string()),
|
39
|
-
ssConfLinks: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
|
40
|
-
subscriptionUrl: zod_1.z.string(),
|
41
|
-
happ: models_1.HappSchema,
|
42
|
-
}),
|
17
|
+
response: models_1.SubscriptionInfoSchema,
|
43
18
|
});
|
44
19
|
})(GetSubscriptionInfoByShortUuidCommand || (exports.GetSubscriptionInfoByShortUuidCommand = GetSubscriptionInfoByShortUuidCommand = {}));
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetSubscriptionByShortUuidProtectedCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../../api");
|
6
|
+
const models_1 = require("../../../models");
|
7
|
+
const constants_1 = require("../../../constants");
|
8
|
+
var GetSubscriptionByShortUuidProtectedCommand;
|
9
|
+
(function (GetSubscriptionByShortUuidProtectedCommand) {
|
10
|
+
GetSubscriptionByShortUuidProtectedCommand.url = api_1.REST_API.SUBSCRIPTIONS.GET_BY.SHORT_UUID;
|
11
|
+
GetSubscriptionByShortUuidProtectedCommand.TSQ_url = GetSubscriptionByShortUuidProtectedCommand.url(':shortUuid');
|
12
|
+
GetSubscriptionByShortUuidProtectedCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTIONS_ROUTES.GET_BY.SHORT_UUID(':shortUuid'), 'get', 'Get subscription by short uuid (protected route)');
|
13
|
+
GetSubscriptionByShortUuidProtectedCommand.RequestSchema = zod_1.z.object({
|
14
|
+
shortUuid: zod_1.z.string(),
|
15
|
+
});
|
16
|
+
GetSubscriptionByShortUuidProtectedCommand.ResponseSchema = zod_1.z.object({
|
17
|
+
response: models_1.SubscriptionInfoSchema,
|
18
|
+
});
|
19
|
+
})(GetSubscriptionByShortUuidProtectedCommand || (exports.GetSubscriptionByShortUuidProtectedCommand = GetSubscriptionByShortUuidProtectedCommand = {}));
|
package/build/frontend/commands/subscriptions/get-by/get-subscription-by-username.command.js
CHANGED
@@ -2,8 +2,9 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.GetSubscriptionByUsernameCommand = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
|
-
const constants_1 = require("../../../constants");
|
6
5
|
const api_1 = require("../../../api");
|
6
|
+
const models_1 = require("../../../models");
|
7
|
+
const constants_1 = require("../../../constants");
|
7
8
|
var GetSubscriptionByUsernameCommand;
|
8
9
|
(function (GetSubscriptionByUsernameCommand) {
|
9
10
|
GetSubscriptionByUsernameCommand.url = api_1.REST_API.SUBSCRIPTIONS.GET_BY.USERNAME;
|
@@ -13,25 +14,6 @@ var GetSubscriptionByUsernameCommand;
|
|
13
14
|
username: zod_1.z.string(),
|
14
15
|
});
|
15
16
|
GetSubscriptionByUsernameCommand.ResponseSchema = zod_1.z.object({
|
16
|
-
response:
|
17
|
-
isFound: zod_1.z.boolean(),
|
18
|
-
user: zod_1.z.object({
|
19
|
-
shortUuid: zod_1.z.string(),
|
20
|
-
daysLeft: zod_1.z.number(),
|
21
|
-
trafficUsed: zod_1.z.string(),
|
22
|
-
trafficLimit: zod_1.z.string(),
|
23
|
-
username: zod_1.z.string(),
|
24
|
-
expiresAt: zod_1.z
|
25
|
-
.string()
|
26
|
-
.datetime()
|
27
|
-
.transform((str) => new Date(str)),
|
28
|
-
isActive: zod_1.z.boolean(),
|
29
|
-
userStatus: zod_1.z.nativeEnum(constants_1.USERS_STATUS),
|
30
|
-
trafficLimitStrategy: zod_1.z.nativeEnum(constants_1.RESET_PERIODS),
|
31
|
-
}),
|
32
|
-
links: zod_1.z.array(zod_1.z.string()),
|
33
|
-
ssConfLinks: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
|
34
|
-
subscriptionUrl: zod_1.z.string(),
|
35
|
-
}),
|
17
|
+
response: models_1.SubscriptionInfoSchema,
|
36
18
|
});
|
37
19
|
})(GetSubscriptionByUsernameCommand || (exports.GetSubscriptionByUsernameCommand = GetSubscriptionByUsernameCommand = {}));
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetSubscriptionByUuidCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../../api");
|
6
|
+
const models_1 = require("../../../models");
|
7
|
+
const constants_1 = require("../../../constants");
|
8
|
+
var GetSubscriptionByUuidCommand;
|
9
|
+
(function (GetSubscriptionByUuidCommand) {
|
10
|
+
GetSubscriptionByUuidCommand.url = api_1.REST_API.SUBSCRIPTIONS.GET_BY.UUID;
|
11
|
+
GetSubscriptionByUuidCommand.TSQ_url = GetSubscriptionByUuidCommand.url(':uuid');
|
12
|
+
GetSubscriptionByUuidCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTIONS_ROUTES.GET_BY.UUID(':uuid'), 'get', 'Get subscription by uuid');
|
13
|
+
GetSubscriptionByUuidCommand.RequestSchema = zod_1.z.object({
|
14
|
+
uuid: zod_1.z.string(),
|
15
|
+
});
|
16
|
+
GetSubscriptionByUuidCommand.ResponseSchema = zod_1.z.object({
|
17
|
+
response: models_1.SubscriptionInfoSchema,
|
18
|
+
});
|
19
|
+
})(GetSubscriptionByUuidCommand || (exports.GetSubscriptionByUuidCommand = GetSubscriptionByUuidCommand = {}));
|
@@ -14,4 +14,6 @@ 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("./get-subscription-by-short-uuid-protected.command"), exports);
|
17
18
|
__exportStar(require("./get-subscription-by-username.command"), exports);
|
19
|
+
__exportStar(require("./get-subscription-by-uuid.command"), exports);
|
@@ -31,5 +31,6 @@ __exportStar(require("./infra-provider.schema"), exports);
|
|
31
31
|
__exportStar(require("./internal-squad.schema"), exports);
|
32
32
|
__exportStar(require("./last-connected-node.schema"), exports);
|
33
33
|
__exportStar(require("./nodes.schema"), exports);
|
34
|
+
__exportStar(require("./subscription-info.schema"), exports);
|
34
35
|
__exportStar(require("./subscription-settings.schema"), exports);
|
35
36
|
__exportStar(require("./users.schema"), exports);
|
@@ -0,0 +1,31 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.SubscriptionInfoSchema = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const constants_1 = require("../constants");
|
6
|
+
const happ_schema_1 = require("./happ.schema");
|
7
|
+
exports.SubscriptionInfoSchema = zod_1.z.object({
|
8
|
+
isFound: zod_1.z.boolean(),
|
9
|
+
user: zod_1.z.object({
|
10
|
+
shortUuid: zod_1.z.string(),
|
11
|
+
daysLeft: zod_1.z.number(),
|
12
|
+
trafficUsed: zod_1.z.string(),
|
13
|
+
trafficLimit: zod_1.z.string(),
|
14
|
+
lifetimeTrafficUsed: zod_1.z.string(),
|
15
|
+
trafficUsedBytes: zod_1.z.string(),
|
16
|
+
trafficLimitBytes: zod_1.z.string(),
|
17
|
+
lifetimeTrafficUsedBytes: zod_1.z.string(),
|
18
|
+
username: zod_1.z.string(),
|
19
|
+
expiresAt: zod_1.z
|
20
|
+
.string()
|
21
|
+
.datetime()
|
22
|
+
.transform((str) => new Date(str)),
|
23
|
+
isActive: zod_1.z.boolean(),
|
24
|
+
userStatus: zod_1.z.nativeEnum(constants_1.USERS_STATUS),
|
25
|
+
trafficLimitStrategy: zod_1.z.nativeEnum(constants_1.RESET_PERIODS),
|
26
|
+
}),
|
27
|
+
links: zod_1.z.array(zod_1.z.string()),
|
28
|
+
ssConfLinks: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
|
29
|
+
subscriptionUrl: zod_1.z.string(),
|
30
|
+
happ: happ_schema_1.HappSchema,
|
31
|
+
});
|