@remnawave/backend-contract 2.0.0-alpha.38 → 2.0.0-alpha.39

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.
@@ -3,5 +3,6 @@ export declare const SUBSCRIPTION_ROUTES: {
3
3
  readonly GET: "";
4
4
  readonly GET_OUTLINE: "/outline";
5
5
  readonly GET_INFO: (shortUuid: string) => string;
6
+ readonly GET_RAW: (shortUuid: string) => string;
6
7
  };
7
8
  //# sourceMappingURL=subscription.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../../../api/controllers/subscription.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,EAAG,KAAc,CAAC;AAEtD,eAAO,MAAM,mBAAmB;;;mCAGN,MAAM;CACtB,CAAC"}
1
+ {"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../../../api/controllers/subscription.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,EAAG,KAAc,CAAC;AAEtD,eAAO,MAAM,mBAAmB;;;mCAGN,MAAM;kCACP,MAAM;CACrB,CAAC"}
@@ -6,4 +6,5 @@ exports.SUBSCRIPTION_ROUTES = {
6
6
  GET: '',
7
7
  GET_OUTLINE: '/outline',
8
8
  GET_INFO: (shortUuid) => `${shortUuid}/info`,
9
+ GET_RAW: (shortUuid) => `${shortUuid}/raw`,
9
10
  };
@@ -83,6 +83,7 @@ export declare const REST_API: {
83
83
  readonly GET: (shortUuid: string) => string;
84
84
  readonly GET_OUTLINE: (shortUuid: string) => string;
85
85
  readonly GET_INFO: (shortUuid: string) => string;
86
+ readonly GET_RAW: (shortUuid: string) => string;
86
87
  };
87
88
  readonly HOSTS: {
88
89
  readonly CREATE: "/api/hosts/";
@@ -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;;;;;;;;;;;;;gCAcE,MAAM;;;;;;;;;qCAYD,MAAM;;gCAGX,MAAM;;oCAIF,MAAM;qCAIL,MAAM;qCAIN,MAAM;;;;;;iDAUM,MAAM;;;;;;;;gCAWvB,MAAM;qCAGD,MAAM;0CAED,MAAM;;qCAIX,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;;;;;;;;;;;;;;;;;;;;;;qCAwBD,MAAM;;;;;;;;;mDAYQ,MAAM;;;;;;0CASf,MAAM;;;;;;;qCAUX,MAAM;gCAIX,MAAM;sDAIgB,MAAM;;;;;;;qCAUvB,MAAM;gCAIX,MAAM;;uCAMC,MAAM;0CAEH,MAAM;;;;;;;yCASP,MAAM;8CAED,MAAM;;;;6CAMP,MAAM;;;gDAKH,MAAM;;CAGnC,CAAC"}
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;;;;;;;;;;;;;gCAcE,MAAM;;;;;;;;;qCAYD,MAAM;;gCAGX,MAAM;;oCAIF,MAAM;qCAIL,MAAM;qCAIN,MAAM;;;;;;iDAUM,MAAM;;;;;;;;gCAWvB,MAAM;qCAGD,MAAM;0CAED,MAAM;;qCAIX,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;sCAIP,MAAM;;;;;;qCASP,MAAM;gCAEX,MAAM;;;;;;;;;;;;;;;;;;;;;;qCAwBD,MAAM;;;;;;;;;mDAYQ,MAAM;;;;;;0CASf,MAAM;;;;;;;qCAUX,MAAM;gCAIX,MAAM;sDAIgB,MAAM;;;;;;;qCAUvB,MAAM;gCAIX,MAAM;;uCAMC,MAAM;0CAEH,MAAM;;;;;;;yCASP,MAAM;8CAED,MAAM;;;;6CAMP,MAAM;;;gDAKH,MAAM;;CAGnC,CAAC"}
@@ -120,6 +120,7 @@ exports.REST_API = {
120
120
  GET: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET}${shortUuid}`,
121
121
  GET_OUTLINE: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_OUTLINE}/${shortUuid}`,
122
122
  GET_INFO: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_INFO(shortUuid)}`,
123
+ GET_RAW: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_RAW(shortUuid)}`,
123
124
  },
124
125
  HOSTS: {
125
126
  CREATE: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.CREATE}`,
@@ -0,0 +1,354 @@
1
+ import { z } from 'zod';
2
+ export declare namespace GetRawSubscriptionByShortUuidCommand {
3
+ const url: (shortUuid: string) => string;
4
+ const TSQ_url: string;
5
+ const endpointDetails: import("../../constants").EndpointDetails;
6
+ const RequestSchema: z.ZodObject<{
7
+ shortUuid: z.ZodString;
8
+ }, "strip", z.ZodTypeAny, {
9
+ shortUuid: string;
10
+ }, {
11
+ shortUuid: string;
12
+ }>;
13
+ type Request = z.infer<typeof RequestSchema>;
14
+ const ResponseSchema: z.ZodObject<{
15
+ response: z.ZodObject<{
16
+ user: z.ZodObject<{
17
+ shortUuid: z.ZodString;
18
+ daysLeft: z.ZodNumber;
19
+ trafficUsed: z.ZodString;
20
+ trafficLimit: z.ZodString;
21
+ username: z.ZodString;
22
+ expiresAt: z.ZodEffects<z.ZodString, Date, string>;
23
+ isActive: z.ZodBoolean;
24
+ userStatus: z.ZodNativeEnum<{
25
+ readonly ACTIVE: "ACTIVE";
26
+ readonly DISABLED: "DISABLED";
27
+ readonly LIMITED: "LIMITED";
28
+ readonly EXPIRED: "EXPIRED";
29
+ }>;
30
+ trafficLimitStrategy: z.ZodNativeEnum<{
31
+ readonly NO_RESET: "NO_RESET";
32
+ readonly DAY: "DAY";
33
+ readonly WEEK: "WEEK";
34
+ readonly MONTH: "MONTH";
35
+ }>;
36
+ }, "strip", z.ZodTypeAny, {
37
+ username: string;
38
+ shortUuid: string;
39
+ trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
40
+ daysLeft: number;
41
+ trafficUsed: string;
42
+ trafficLimit: string;
43
+ expiresAt: Date;
44
+ isActive: boolean;
45
+ userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
46
+ }, {
47
+ username: string;
48
+ shortUuid: string;
49
+ trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
50
+ daysLeft: number;
51
+ trafficUsed: string;
52
+ trafficLimit: string;
53
+ expiresAt: string;
54
+ isActive: boolean;
55
+ userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
56
+ }>;
57
+ subscriptionUrl: z.ZodString;
58
+ rawHosts: z.ZodArray<z.ZodObject<{
59
+ address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
60
+ alpn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
61
+ fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
62
+ host: z.ZodOptional<z.ZodNullable<z.ZodString>>;
63
+ network: z.ZodOptional<z.ZodNullable<z.ZodString>>;
64
+ password: z.ZodOptional<z.ZodNullable<z.ZodString>>;
65
+ path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
66
+ publicKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
67
+ port: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
68
+ protocol: z.ZodOptional<z.ZodNullable<z.ZodString>>;
69
+ remark: z.ZodOptional<z.ZodNullable<z.ZodString>>;
70
+ shortId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
71
+ sni: z.ZodOptional<z.ZodNullable<z.ZodString>>;
72
+ spiderX: z.ZodOptional<z.ZodNullable<z.ZodString>>;
73
+ tls: z.ZodOptional<z.ZodNullable<z.ZodString>>;
74
+ headerType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
75
+ additionalParams: z.ZodOptional<z.ZodNullable<z.ZodObject<{
76
+ mode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
77
+ heartbeatPeriod: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
78
+ }, "strip", z.ZodTypeAny, {
79
+ mode?: string | null | undefined;
80
+ heartbeatPeriod?: number | null | undefined;
81
+ }, {
82
+ mode?: string | null | undefined;
83
+ heartbeatPeriod?: number | null | undefined;
84
+ }>>>;
85
+ xHttpExtraParams: z.ZodOptional<z.ZodNullable<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>>;
86
+ serverDescription: z.ZodOptional<z.ZodNullable<z.ZodString>>;
87
+ flow: z.ZodOptional<z.ZodNullable<z.ZodString>>;
88
+ protocolOptions: z.ZodOptional<z.ZodNullable<z.ZodObject<{
89
+ ss: z.ZodOptional<z.ZodNullable<z.ZodObject<{
90
+ method: z.ZodOptional<z.ZodNullable<z.ZodString>>;
91
+ }, "strip", z.ZodTypeAny, {
92
+ method?: string | null | undefined;
93
+ }, {
94
+ method?: string | null | undefined;
95
+ }>>>;
96
+ }, "strip", z.ZodTypeAny, {
97
+ ss?: {
98
+ method?: string | null | undefined;
99
+ } | null | undefined;
100
+ }, {
101
+ ss?: {
102
+ method?: string | null | undefined;
103
+ } | null | undefined;
104
+ }>>>;
105
+ }, "strip", z.ZodTypeAny, {
106
+ path?: string | null | undefined;
107
+ password?: string | null | undefined;
108
+ network?: string | null | undefined;
109
+ port?: number | null | undefined;
110
+ remark?: string | null | undefined;
111
+ address?: string | null | undefined;
112
+ sni?: string | null | undefined;
113
+ host?: string | null | undefined;
114
+ alpn?: string | null | undefined;
115
+ fingerprint?: string | null | undefined;
116
+ xHttpExtraParams?: {} | null | undefined;
117
+ serverDescription?: string | null | undefined;
118
+ publicKey?: string | null | undefined;
119
+ protocol?: string | null | undefined;
120
+ shortId?: string | null | undefined;
121
+ spiderX?: string | null | undefined;
122
+ tls?: string | null | undefined;
123
+ headerType?: string | null | undefined;
124
+ additionalParams?: {
125
+ mode?: string | null | undefined;
126
+ heartbeatPeriod?: number | null | undefined;
127
+ } | null | undefined;
128
+ flow?: string | null | undefined;
129
+ protocolOptions?: {
130
+ ss?: {
131
+ method?: string | null | undefined;
132
+ } | null | undefined;
133
+ } | null | undefined;
134
+ }, {
135
+ path?: string | null | undefined;
136
+ password?: string | null | undefined;
137
+ network?: string | null | undefined;
138
+ port?: number | null | undefined;
139
+ remark?: string | null | undefined;
140
+ address?: string | null | undefined;
141
+ sni?: string | null | undefined;
142
+ host?: string | null | undefined;
143
+ alpn?: string | null | undefined;
144
+ fingerprint?: string | null | undefined;
145
+ xHttpExtraParams?: {} | null | undefined;
146
+ serverDescription?: string | null | undefined;
147
+ publicKey?: string | null | undefined;
148
+ protocol?: string | null | undefined;
149
+ shortId?: string | null | undefined;
150
+ spiderX?: string | null | undefined;
151
+ tls?: string | null | undefined;
152
+ headerType?: string | null | undefined;
153
+ additionalParams?: {
154
+ mode?: string | null | undefined;
155
+ heartbeatPeriod?: number | null | undefined;
156
+ } | null | undefined;
157
+ flow?: string | null | undefined;
158
+ protocolOptions?: {
159
+ ss?: {
160
+ method?: string | null | undefined;
161
+ } | null | undefined;
162
+ } | null | undefined;
163
+ }>, "many">;
164
+ headers: z.ZodRecord<z.ZodString, z.ZodString>;
165
+ isHwidLimited: z.ZodBoolean;
166
+ }, "strip", z.ZodTypeAny, {
167
+ subscriptionUrl: string;
168
+ user: {
169
+ username: string;
170
+ shortUuid: string;
171
+ trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
172
+ daysLeft: number;
173
+ trafficUsed: string;
174
+ trafficLimit: string;
175
+ expiresAt: Date;
176
+ isActive: boolean;
177
+ userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
178
+ };
179
+ rawHosts: {
180
+ path?: string | null | undefined;
181
+ password?: string | null | undefined;
182
+ network?: string | null | undefined;
183
+ port?: number | null | undefined;
184
+ remark?: string | null | undefined;
185
+ address?: string | null | undefined;
186
+ sni?: string | null | undefined;
187
+ host?: string | null | undefined;
188
+ alpn?: string | null | undefined;
189
+ fingerprint?: string | null | undefined;
190
+ xHttpExtraParams?: {} | null | undefined;
191
+ serverDescription?: string | null | undefined;
192
+ publicKey?: string | null | undefined;
193
+ protocol?: string | null | undefined;
194
+ shortId?: string | null | undefined;
195
+ spiderX?: string | null | undefined;
196
+ tls?: string | null | undefined;
197
+ headerType?: string | null | undefined;
198
+ additionalParams?: {
199
+ mode?: string | null | undefined;
200
+ heartbeatPeriod?: number | null | undefined;
201
+ } | null | undefined;
202
+ flow?: string | null | undefined;
203
+ protocolOptions?: {
204
+ ss?: {
205
+ method?: string | null | undefined;
206
+ } | null | undefined;
207
+ } | null | undefined;
208
+ }[];
209
+ headers: Record<string, string>;
210
+ isHwidLimited: boolean;
211
+ }, {
212
+ subscriptionUrl: string;
213
+ user: {
214
+ username: string;
215
+ shortUuid: string;
216
+ trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
217
+ daysLeft: number;
218
+ trafficUsed: string;
219
+ trafficLimit: string;
220
+ expiresAt: string;
221
+ isActive: boolean;
222
+ userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
223
+ };
224
+ rawHosts: {
225
+ path?: string | null | undefined;
226
+ password?: string | null | undefined;
227
+ network?: string | null | undefined;
228
+ port?: number | null | undefined;
229
+ remark?: string | null | undefined;
230
+ address?: string | null | undefined;
231
+ sni?: string | null | undefined;
232
+ host?: string | null | undefined;
233
+ alpn?: string | null | undefined;
234
+ fingerprint?: string | null | undefined;
235
+ xHttpExtraParams?: {} | null | undefined;
236
+ serverDescription?: string | null | undefined;
237
+ publicKey?: string | null | undefined;
238
+ protocol?: string | null | undefined;
239
+ shortId?: string | null | undefined;
240
+ spiderX?: string | null | undefined;
241
+ tls?: string | null | undefined;
242
+ headerType?: string | null | undefined;
243
+ additionalParams?: {
244
+ mode?: string | null | undefined;
245
+ heartbeatPeriod?: number | null | undefined;
246
+ } | null | undefined;
247
+ flow?: string | null | undefined;
248
+ protocolOptions?: {
249
+ ss?: {
250
+ method?: string | null | undefined;
251
+ } | null | undefined;
252
+ } | null | undefined;
253
+ }[];
254
+ headers: Record<string, string>;
255
+ isHwidLimited: boolean;
256
+ }>;
257
+ }, "strip", z.ZodTypeAny, {
258
+ response: {
259
+ subscriptionUrl: string;
260
+ user: {
261
+ username: string;
262
+ shortUuid: string;
263
+ trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
264
+ daysLeft: number;
265
+ trafficUsed: string;
266
+ trafficLimit: string;
267
+ expiresAt: Date;
268
+ isActive: boolean;
269
+ userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
270
+ };
271
+ rawHosts: {
272
+ path?: string | null | undefined;
273
+ password?: string | null | undefined;
274
+ network?: string | null | undefined;
275
+ port?: number | null | undefined;
276
+ remark?: string | null | undefined;
277
+ address?: string | null | undefined;
278
+ sni?: string | null | undefined;
279
+ host?: string | null | undefined;
280
+ alpn?: string | null | undefined;
281
+ fingerprint?: string | null | undefined;
282
+ xHttpExtraParams?: {} | null | undefined;
283
+ serverDescription?: string | null | undefined;
284
+ publicKey?: string | null | undefined;
285
+ protocol?: string | null | undefined;
286
+ shortId?: string | null | undefined;
287
+ spiderX?: string | null | undefined;
288
+ tls?: string | null | undefined;
289
+ headerType?: string | null | undefined;
290
+ additionalParams?: {
291
+ mode?: string | null | undefined;
292
+ heartbeatPeriod?: number | null | undefined;
293
+ } | null | undefined;
294
+ flow?: string | null | undefined;
295
+ protocolOptions?: {
296
+ ss?: {
297
+ method?: string | null | undefined;
298
+ } | null | undefined;
299
+ } | null | undefined;
300
+ }[];
301
+ headers: Record<string, string>;
302
+ isHwidLimited: boolean;
303
+ };
304
+ }, {
305
+ response: {
306
+ subscriptionUrl: string;
307
+ user: {
308
+ username: string;
309
+ shortUuid: string;
310
+ trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
311
+ daysLeft: number;
312
+ trafficUsed: string;
313
+ trafficLimit: string;
314
+ expiresAt: string;
315
+ isActive: boolean;
316
+ userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
317
+ };
318
+ rawHosts: {
319
+ path?: string | null | undefined;
320
+ password?: string | null | undefined;
321
+ network?: string | null | undefined;
322
+ port?: number | null | undefined;
323
+ remark?: string | null | undefined;
324
+ address?: string | null | undefined;
325
+ sni?: string | null | undefined;
326
+ host?: string | null | undefined;
327
+ alpn?: string | null | undefined;
328
+ fingerprint?: string | null | undefined;
329
+ xHttpExtraParams?: {} | null | undefined;
330
+ serverDescription?: string | null | undefined;
331
+ publicKey?: string | null | undefined;
332
+ protocol?: string | null | undefined;
333
+ shortId?: string | null | undefined;
334
+ spiderX?: string | null | undefined;
335
+ tls?: string | null | undefined;
336
+ headerType?: string | null | undefined;
337
+ additionalParams?: {
338
+ mode?: string | null | undefined;
339
+ heartbeatPeriod?: number | null | undefined;
340
+ } | null | undefined;
341
+ flow?: string | null | undefined;
342
+ protocolOptions?: {
343
+ ss?: {
344
+ method?: string | null | undefined;
345
+ } | null | undefined;
346
+ } | null | undefined;
347
+ }[];
348
+ headers: Record<string, string>;
349
+ isHwidLimited: boolean;
350
+ };
351
+ }>;
352
+ type Response = z.infer<typeof ResponseSchema>;
353
+ }
354
+ //# sourceMappingURL=get-raw-subscription-by-short-uuid.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-raw-subscription-by-short-uuid.command.d.ts","sourceRoot":"","sources":["../../../../commands/subscription/get-raw-subscription-by-short-uuid.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,oCAAoC,CAAC;IAC3C,MAAM,GAAG,+BAAgC,CAAC;IAC1C,MAAM,OAAO,QAAoB,CAAC;IAElC,MAAM,eAAe,2CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAgEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetRawSubscriptionByShortUuidCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const constants_1 = require("../../constants");
6
+ const api_1 = require("../../api");
7
+ const constants_2 = require("../../constants");
8
+ var GetRawSubscriptionByShortUuidCommand;
9
+ (function (GetRawSubscriptionByShortUuidCommand) {
10
+ GetRawSubscriptionByShortUuidCommand.url = api_1.REST_API.SUBSCRIPTION.GET_RAW;
11
+ GetRawSubscriptionByShortUuidCommand.TSQ_url = GetRawSubscriptionByShortUuidCommand.url(':shortUuid');
12
+ GetRawSubscriptionByShortUuidCommand.endpointDetails = (0, constants_2.getEndpointDetails)(api_1.SUBSCRIPTION_ROUTES.GET_RAW(':shortUuid'), 'get', 'Get Raw Subscription by Short UUID');
13
+ GetRawSubscriptionByShortUuidCommand.RequestSchema = zod_1.z.object({
14
+ shortUuid: zod_1.z.string(),
15
+ });
16
+ GetRawSubscriptionByShortUuidCommand.ResponseSchema = zod_1.z.object({
17
+ response: zod_1.z.object({
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
+ subscriptionUrl: zod_1.z.string(),
33
+ rawHosts: zod_1.z.array(zod_1.z.object({
34
+ address: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
35
+ alpn: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
36
+ fingerprint: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
37
+ host: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
38
+ network: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
39
+ password: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
40
+ path: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
41
+ publicKey: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
42
+ port: zod_1.z.optional(zod_1.z.nullable(zod_1.z.number())),
43
+ protocol: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
44
+ remark: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
45
+ shortId: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
46
+ sni: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
47
+ spiderX: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
48
+ tls: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
49
+ headerType: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
50
+ additionalParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.object({
51
+ mode: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
52
+ heartbeatPeriod: zod_1.z.optional(zod_1.z.nullable(zod_1.z.number())),
53
+ }))),
54
+ xHttpExtraParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.object({}))),
55
+ serverDescription: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
56
+ flow: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
57
+ protocolOptions: zod_1.z.optional(zod_1.z.nullable(zod_1.z.object({
58
+ ss: zod_1.z.optional(zod_1.z.nullable(zod_1.z.object({
59
+ method: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
60
+ }))),
61
+ }))),
62
+ })),
63
+ headers: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
64
+ isHwidLimited: zod_1.z.boolean(),
65
+ }),
66
+ });
67
+ })(GetRawSubscriptionByShortUuidCommand || (exports.GetRawSubscriptionByShortUuidCommand = GetRawSubscriptionByShortUuidCommand = {}));
@@ -70,7 +70,6 @@ export declare namespace GetSubscriptionInfoByShortUuidCommand {
70
70
  happ: {
71
71
  cryptoLink: string;
72
72
  };
73
- isFound: boolean;
74
73
  user: {
75
74
  username: string;
76
75
  shortUuid: string;
@@ -82,6 +81,7 @@ export declare namespace GetSubscriptionInfoByShortUuidCommand {
82
81
  isActive: boolean;
83
82
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
84
83
  };
84
+ isFound: boolean;
85
85
  links: string[];
86
86
  ssConfLinks: Record<string, string>;
87
87
  }, {
@@ -89,7 +89,6 @@ export declare namespace GetSubscriptionInfoByShortUuidCommand {
89
89
  happ: {
90
90
  cryptoLink: string;
91
91
  };
92
- isFound: boolean;
93
92
  user: {
94
93
  username: string;
95
94
  shortUuid: string;
@@ -101,6 +100,7 @@ export declare namespace GetSubscriptionInfoByShortUuidCommand {
101
100
  isActive: boolean;
102
101
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
103
102
  };
103
+ isFound: boolean;
104
104
  links: string[];
105
105
  ssConfLinks: Record<string, string>;
106
106
  }>;
@@ -110,7 +110,6 @@ export declare namespace GetSubscriptionInfoByShortUuidCommand {
110
110
  happ: {
111
111
  cryptoLink: string;
112
112
  };
113
- isFound: boolean;
114
113
  user: {
115
114
  username: string;
116
115
  shortUuid: string;
@@ -122,6 +121,7 @@ export declare namespace GetSubscriptionInfoByShortUuidCommand {
122
121
  isActive: boolean;
123
122
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
124
123
  };
124
+ isFound: boolean;
125
125
  links: string[];
126
126
  ssConfLinks: Record<string, string>;
127
127
  };
@@ -131,7 +131,6 @@ export declare namespace GetSubscriptionInfoByShortUuidCommand {
131
131
  happ: {
132
132
  cryptoLink: string;
133
133
  };
134
- isFound: boolean;
135
134
  user: {
136
135
  username: string;
137
136
  shortUuid: string;
@@ -143,6 +142,7 @@ export declare namespace GetSubscriptionInfoByShortUuidCommand {
143
142
  isActive: boolean;
144
143
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
145
144
  };
145
+ isFound: boolean;
146
146
  links: string[];
147
147
  ssConfLinks: Record<string, string>;
148
148
  };
@@ -1,4 +1,5 @@
1
1
  export * from './get-outline-subscription-by-short-uuid.command';
2
+ export * from './get-raw-subscription-by-short-uuid.command';
2
3
  export * from './get-subscription-by-short-uuid-by-client-type.command';
3
4
  export * from './get-subscription-by-short-uuid.command';
4
5
  export * from './get-subscription-info-by-short-uuid.command';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/subscription/index.ts"],"names":[],"mappings":"AAAA,cAAc,kDAAkD,CAAC;AACjE,cAAc,yDAAyD,CAAC;AACxE,cAAc,0CAA0C,CAAC;AACzD,cAAc,+CAA+C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/subscription/index.ts"],"names":[],"mappings":"AAAA,cAAc,kDAAkD,CAAC;AACjE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,yDAAyD,CAAC;AACxE,cAAc,0CAA0C,CAAC;AACzD,cAAc,+CAA+C,CAAC"}
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./get-outline-subscription-by-short-uuid.command"), exports);
18
+ __exportStar(require("./get-raw-subscription-by-short-uuid.command"), exports);
18
19
  __exportStar(require("./get-subscription-by-short-uuid-by-client-type.command"), exports);
19
20
  __exportStar(require("./get-subscription-by-short-uuid.command"), exports);
20
21
  __exportStar(require("./get-subscription-info-by-short-uuid.command"), exports);
@@ -64,7 +64,6 @@ export declare namespace GetAllSubscriptionsCommand {
64
64
  subscriptionUrl: z.ZodString;
65
65
  }, "strip", z.ZodTypeAny, {
66
66
  subscriptionUrl: string;
67
- isFound: boolean;
68
67
  user: {
69
68
  username: string;
70
69
  shortUuid: string;
@@ -76,11 +75,11 @@ export declare namespace GetAllSubscriptionsCommand {
76
75
  isActive: boolean;
77
76
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
78
77
  };
78
+ isFound: boolean;
79
79
  links: string[];
80
80
  ssConfLinks: Record<string, string>;
81
81
  }, {
82
82
  subscriptionUrl: string;
83
- isFound: boolean;
84
83
  user: {
85
84
  username: string;
86
85
  shortUuid: string;
@@ -92,6 +91,7 @@ export declare namespace GetAllSubscriptionsCommand {
92
91
  isActive: boolean;
93
92
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
94
93
  };
94
+ isFound: boolean;
95
95
  links: string[];
96
96
  ssConfLinks: Record<string, string>;
97
97
  }>, "many">;
@@ -99,7 +99,6 @@ export declare namespace GetAllSubscriptionsCommand {
99
99
  }, "strip", z.ZodTypeAny, {
100
100
  subscriptions: {
101
101
  subscriptionUrl: string;
102
- isFound: boolean;
103
102
  user: {
104
103
  username: string;
105
104
  shortUuid: string;
@@ -111,6 +110,7 @@ export declare namespace GetAllSubscriptionsCommand {
111
110
  isActive: boolean;
112
111
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
113
112
  };
113
+ isFound: boolean;
114
114
  links: string[];
115
115
  ssConfLinks: Record<string, string>;
116
116
  }[];
@@ -118,7 +118,6 @@ export declare namespace GetAllSubscriptionsCommand {
118
118
  }, {
119
119
  subscriptions: {
120
120
  subscriptionUrl: string;
121
- isFound: boolean;
122
121
  user: {
123
122
  username: string;
124
123
  shortUuid: string;
@@ -130,6 +129,7 @@ export declare namespace GetAllSubscriptionsCommand {
130
129
  isActive: boolean;
131
130
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
132
131
  };
132
+ isFound: boolean;
133
133
  links: string[];
134
134
  ssConfLinks: Record<string, string>;
135
135
  }[];
@@ -139,7 +139,6 @@ export declare namespace GetAllSubscriptionsCommand {
139
139
  response: {
140
140
  subscriptions: {
141
141
  subscriptionUrl: string;
142
- isFound: boolean;
143
142
  user: {
144
143
  username: string;
145
144
  shortUuid: string;
@@ -151,6 +150,7 @@ export declare namespace GetAllSubscriptionsCommand {
151
150
  isActive: boolean;
152
151
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
153
152
  };
153
+ isFound: boolean;
154
154
  links: string[];
155
155
  ssConfLinks: Record<string, string>;
156
156
  }[];
@@ -160,7 +160,6 @@ export declare namespace GetAllSubscriptionsCommand {
160
160
  response: {
161
161
  subscriptions: {
162
162
  subscriptionUrl: string;
163
- isFound: boolean;
164
163
  user: {
165
164
  username: string;
166
165
  shortUuid: string;
@@ -172,6 +171,7 @@ export declare namespace GetAllSubscriptionsCommand {
172
171
  isActive: boolean;
173
172
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
174
173
  };
174
+ isFound: boolean;
175
175
  links: string[];
176
176
  ssConfLinks: Record<string, string>;
177
177
  }[];
@@ -60,7 +60,6 @@ export declare namespace GetSubscriptionByUsernameCommand {
60
60
  subscriptionUrl: z.ZodString;
61
61
  }, "strip", z.ZodTypeAny, {
62
62
  subscriptionUrl: string;
63
- isFound: boolean;
64
63
  user: {
65
64
  username: string;
66
65
  shortUuid: string;
@@ -72,11 +71,11 @@ export declare namespace GetSubscriptionByUsernameCommand {
72
71
  isActive: boolean;
73
72
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
74
73
  };
74
+ isFound: boolean;
75
75
  links: string[];
76
76
  ssConfLinks: Record<string, string>;
77
77
  }, {
78
78
  subscriptionUrl: string;
79
- isFound: boolean;
80
79
  user: {
81
80
  username: string;
82
81
  shortUuid: string;
@@ -88,13 +87,13 @@ export declare namespace GetSubscriptionByUsernameCommand {
88
87
  isActive: boolean;
89
88
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
90
89
  };
90
+ isFound: boolean;
91
91
  links: string[];
92
92
  ssConfLinks: Record<string, string>;
93
93
  }>;
94
94
  }, "strip", z.ZodTypeAny, {
95
95
  response: {
96
96
  subscriptionUrl: string;
97
- isFound: boolean;
98
97
  user: {
99
98
  username: string;
100
99
  shortUuid: string;
@@ -106,13 +105,13 @@ export declare namespace GetSubscriptionByUsernameCommand {
106
105
  isActive: boolean;
107
106
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
108
107
  };
108
+ isFound: boolean;
109
109
  links: string[];
110
110
  ssConfLinks: Record<string, string>;
111
111
  };
112
112
  }, {
113
113
  response: {
114
114
  subscriptionUrl: string;
115
- isFound: boolean;
116
115
  user: {
117
116
  username: string;
118
117
  shortUuid: string;
@@ -124,6 +123,7 @@ export declare namespace GetSubscriptionByUsernameCommand {
124
123
  isActive: boolean;
125
124
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
126
125
  };
126
+ isFound: boolean;
127
127
  links: string[];
128
128
  ssConfLinks: Record<string, string>;
129
129
  };
@@ -6,4 +6,5 @@ exports.SUBSCRIPTION_ROUTES = {
6
6
  GET: '',
7
7
  GET_OUTLINE: '/outline',
8
8
  GET_INFO: (shortUuid) => `${shortUuid}/info`,
9
+ GET_RAW: (shortUuid) => `${shortUuid}/raw`,
9
10
  };
@@ -120,6 +120,7 @@ exports.REST_API = {
120
120
  GET: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET}${shortUuid}`,
121
121
  GET_OUTLINE: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_OUTLINE}/${shortUuid}`,
122
122
  GET_INFO: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_INFO(shortUuid)}`,
123
+ GET_RAW: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_RAW(shortUuid)}`,
123
124
  },
124
125
  HOSTS: {
125
126
  CREATE: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.CREATE}`,
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetRawSubscriptionByShortUuidCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const constants_1 = require("../../constants");
6
+ const api_1 = require("../../api");
7
+ const constants_2 = require("../../constants");
8
+ var GetRawSubscriptionByShortUuidCommand;
9
+ (function (GetRawSubscriptionByShortUuidCommand) {
10
+ GetRawSubscriptionByShortUuidCommand.url = api_1.REST_API.SUBSCRIPTION.GET_RAW;
11
+ GetRawSubscriptionByShortUuidCommand.TSQ_url = GetRawSubscriptionByShortUuidCommand.url(':shortUuid');
12
+ GetRawSubscriptionByShortUuidCommand.endpointDetails = (0, constants_2.getEndpointDetails)(api_1.SUBSCRIPTION_ROUTES.GET_RAW(':shortUuid'), 'get', 'Get Raw Subscription by Short UUID');
13
+ GetRawSubscriptionByShortUuidCommand.RequestSchema = zod_1.z.object({
14
+ shortUuid: zod_1.z.string(),
15
+ });
16
+ GetRawSubscriptionByShortUuidCommand.ResponseSchema = zod_1.z.object({
17
+ response: zod_1.z.object({
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
+ subscriptionUrl: zod_1.z.string(),
33
+ rawHosts: zod_1.z.array(zod_1.z.object({
34
+ address: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
35
+ alpn: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
36
+ fingerprint: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
37
+ host: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
38
+ network: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
39
+ password: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
40
+ path: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
41
+ publicKey: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
42
+ port: zod_1.z.optional(zod_1.z.nullable(zod_1.z.number())),
43
+ protocol: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
44
+ remark: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
45
+ shortId: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
46
+ sni: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
47
+ spiderX: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
48
+ tls: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
49
+ headerType: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
50
+ additionalParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.object({
51
+ mode: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
52
+ heartbeatPeriod: zod_1.z.optional(zod_1.z.nullable(zod_1.z.number())),
53
+ }))),
54
+ xHttpExtraParams: zod_1.z.optional(zod_1.z.nullable(zod_1.z.object({}))),
55
+ serverDescription: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
56
+ flow: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
57
+ protocolOptions: zod_1.z.optional(zod_1.z.nullable(zod_1.z.object({
58
+ ss: zod_1.z.optional(zod_1.z.nullable(zod_1.z.object({
59
+ method: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
60
+ }))),
61
+ }))),
62
+ })),
63
+ headers: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
64
+ isHwidLimited: zod_1.z.boolean(),
65
+ }),
66
+ });
67
+ })(GetRawSubscriptionByShortUuidCommand || (exports.GetRawSubscriptionByShortUuidCommand = GetRawSubscriptionByShortUuidCommand = {}));
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./get-outline-subscription-by-short-uuid.command"), exports);
18
+ __exportStar(require("./get-raw-subscription-by-short-uuid.command"), exports);
18
19
  __exportStar(require("./get-subscription-by-short-uuid-by-client-type.command"), exports);
19
20
  __exportStar(require("./get-subscription-by-short-uuid.command"), exports);
20
21
  __exportStar(require("./get-subscription-info-by-short-uuid.command"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "2.0.0-alpha.38",
3
+ "version": "2.0.0-alpha.39",
4
4
  "public": true,
5
5
  "license": "AGPL-3.0-only",
6
6
  "description": "A contract library for Remnawave Backend. It can be used in backend and frontend.",