@remnawave/backend-contract 2.1.31 → 2.1.33

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.
Files changed (36) hide show
  1. package/build/backend/api/controllers/subscription.d.ts +0 -1
  2. package/build/backend/api/controllers/subscription.d.ts.map +1 -1
  3. package/build/backend/api/controllers/subscription.js +0 -1
  4. package/build/backend/api/controllers/subscriptions.d.ts +1 -0
  5. package/build/backend/api/controllers/subscriptions.d.ts.map +1 -1
  6. package/build/backend/api/controllers/subscriptions.js +1 -0
  7. package/build/backend/api/controllers-info.d.ts +79 -0
  8. package/build/backend/api/controllers-info.d.ts.map +1 -0
  9. package/build/backend/api/controllers-info.js +81 -0
  10. package/build/backend/api/index.d.ts +1 -0
  11. package/build/backend/api/index.d.ts.map +1 -1
  12. package/build/backend/api/index.js +1 -0
  13. package/build/backend/api/routes.d.ts +1 -1
  14. package/build/backend/api/routes.d.ts.map +1 -1
  15. package/build/backend/api/routes.js +1 -1
  16. package/build/backend/commands/subscription/get-subscription-info-by-short-uuid.command.js +1 -1
  17. package/build/backend/commands/subscription/index.d.ts +1 -1
  18. package/build/backend/commands/subscription/index.d.ts.map +1 -1
  19. package/build/backend/commands/subscription/index.js +1 -1
  20. package/build/backend/commands/{subscription → subscriptions/get-by}/get-raw-subscription-by-short-uuid.command.d.ts +302 -71
  21. package/build/backend/commands/subscriptions/get-by/get-raw-subscription-by-short-uuid.command.d.ts.map +1 -0
  22. package/build/backend/commands/{subscription → subscriptions/get-by}/get-raw-subscription-by-short-uuid.command.js +10 -23
  23. package/build/backend/commands/subscriptions/get-by/index.d.ts +1 -0
  24. package/build/backend/commands/subscriptions/get-by/index.d.ts.map +1 -1
  25. package/build/backend/commands/subscriptions/get-by/index.js +1 -0
  26. package/build/frontend/api/controllers/subscription.js +0 -1
  27. package/build/frontend/api/controllers/subscriptions.js +1 -0
  28. package/build/frontend/api/controllers-info.js +81 -0
  29. package/build/frontend/api/index.js +1 -0
  30. package/build/frontend/api/routes.js +1 -1
  31. package/build/frontend/commands/subscription/get-subscription-info-by-short-uuid.command.js +1 -1
  32. package/build/frontend/commands/subscription/index.js +1 -1
  33. package/build/frontend/commands/{subscription → subscriptions/get-by}/get-raw-subscription-by-short-uuid.command.js +10 -23
  34. package/build/frontend/commands/subscriptions/get-by/index.js +1 -0
  35. package/package.json +1 -1
  36. package/build/backend/commands/subscription/get-raw-subscription-by-short-uuid.command.d.ts.map +0 -1
@@ -3,6 +3,5 @@ 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;
7
6
  };
8
7
  //# 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;kCACP,MAAM;CACrB,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;CACtB,CAAC"}
@@ -6,5 +6,4 @@ exports.SUBSCRIPTION_ROUTES = {
6
6
  GET: '',
7
7
  GET_OUTLINE: '/outline',
8
8
  GET_INFO: (shortUuid) => `${shortUuid}/info`,
9
- GET_RAW: (shortUuid) => `${shortUuid}/raw`,
10
9
  };
@@ -5,6 +5,7 @@ export declare const SUBSCRIPTIONS_ROUTES: {
5
5
  readonly USERNAME: (username: string) => string;
6
6
  readonly UUID: (uuid: string) => string;
7
7
  readonly SHORT_UUID: (shortUuid: string) => string;
8
+ readonly SHORT_UUID_RAW: (shortUuid: string) => string;
8
9
  };
9
10
  };
10
11
  //# sourceMappingURL=subscriptions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"subscriptions.d.ts","sourceRoot":"","sources":["../../../../api/controllers/subscriptions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,EAAG,eAAwB,CAAC;AAEjE,eAAO,MAAM,oBAAoB;;;sCAGJ,MAAM;8BACd,MAAM;yCACK,MAAM;;CAE5B,CAAC"}
1
+ {"version":3,"file":"subscriptions.d.ts","sourceRoot":"","sources":["../../../../api/controllers/subscriptions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,EAAG,eAAwB,CAAC;AAEjE,eAAO,MAAM,oBAAoB;;;sCAGJ,MAAM;8BACd,MAAM;yCACK,MAAM;6CACF,MAAM;;CAEhC,CAAC"}
@@ -8,5 +8,6 @@ exports.SUBSCRIPTIONS_ROUTES = {
8
8
  USERNAME: (username) => `by-username/${username}`,
9
9
  UUID: (uuid) => `by-uuid/${uuid}`,
10
10
  SHORT_UUID: (shortUuid) => `by-short-uuid/${shortUuid}`,
11
+ SHORT_UUID_RAW: (shortUuid) => `by-short-uuid/${shortUuid}/raw`,
11
12
  },
12
13
  };
@@ -0,0 +1,79 @@
1
+ export declare const CONTROLLERS_INFO: {
2
+ readonly AUTH: {
3
+ readonly tag: "Auth Controller";
4
+ readonly description: "Used to authenticate admin users.";
5
+ };
6
+ readonly API_TOKENS: {
7
+ readonly tag: "API Tokens Controller";
8
+ readonly description: "Manage API tokens to use in your code. This controller can't be used with API token, only with Admin JWT token";
9
+ };
10
+ readonly USERS: {
11
+ readonly tag: "Users Controller";
12
+ readonly description: "Manage users, change their status, reset traffic, etc.";
13
+ };
14
+ readonly USERS_BULK_ACTIONS: {
15
+ readonly tag: "Users Bulk Actions Controller";
16
+ readonly description: "Bulk actions with users.";
17
+ };
18
+ readonly USERS_STATS: {
19
+ readonly tag: "Users Stats Controller";
20
+ readonly description: "";
21
+ };
22
+ readonly HWID_USER_DEVICES: {
23
+ readonly tag: "HWID User Devices Controller";
24
+ readonly description: "";
25
+ };
26
+ readonly SUBSCRIPTION: {
27
+ readonly tag: "[Public] Subscription Controller";
28
+ readonly description: "Public Subscription Controller. Methods of this controller are not protected with auth. Use it only for public requests.";
29
+ };
30
+ readonly SUBSCRIPTIONS: {
31
+ readonly tag: "[Protected] Subscriptions Controller";
32
+ readonly description: "Methods of this controller are protected with auth, most of them is returning the same informations as public Subscription Controller.";
33
+ };
34
+ readonly CONFIG_PROFILES: {
35
+ readonly tag: "Config Profiles Controller";
36
+ readonly description: "Management of Config Profiles.";
37
+ };
38
+ readonly INTERNAL_SQUADS: {
39
+ readonly tag: "Internal Squads Controller";
40
+ readonly description: "Management of Internal Squads.";
41
+ };
42
+ readonly NODES: {
43
+ readonly tag: "Nodes Controller";
44
+ readonly description: "";
45
+ };
46
+ readonly HOSTS: {
47
+ readonly tag: "Hosts Controller";
48
+ readonly description: "";
49
+ };
50
+ readonly HOSTS_BULK_ACTIONS: {
51
+ readonly tag: "Hosts Bulk Actions Controller";
52
+ readonly description: "";
53
+ };
54
+ readonly SUBSCRIPTION_TEMPLATE: {
55
+ readonly tag: "Subscription Template Controller";
56
+ readonly description: "";
57
+ };
58
+ readonly SUBSCRIPTION_SETTINGS: {
59
+ readonly tag: "Subscription Settings Controller";
60
+ readonly description: "";
61
+ };
62
+ readonly INFRA_BILLING: {
63
+ readonly tag: "Infra Billing Controller";
64
+ readonly description: "";
65
+ };
66
+ readonly SYSTEM: {
67
+ readonly tag: "System Controller";
68
+ readonly description: "";
69
+ };
70
+ readonly BANDWIDTH_STATS: {
71
+ readonly tag: "Bandwidth Stats Controller";
72
+ readonly description: "";
73
+ };
74
+ readonly KEYGEN: {
75
+ readonly tag: "Keygen Controller";
76
+ readonly description: "Generation of SSL_CERT for Remnawave Node.";
77
+ };
78
+ };
79
+ //# sourceMappingURL=controllers-info.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controllers-info.d.ts","sourceRoot":"","sources":["../../../api/controllers-info.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgFnB,CAAC"}
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CONTROLLERS_INFO = void 0;
4
+ exports.CONTROLLERS_INFO = {
5
+ AUTH: {
6
+ tag: 'Auth Controller',
7
+ description: 'Used to authenticate admin users.',
8
+ },
9
+ API_TOKENS: {
10
+ tag: 'API Tokens Controller',
11
+ description: "Manage API tokens to use in your code. This controller can't be used with API token, only with Admin JWT token",
12
+ },
13
+ USERS: {
14
+ tag: 'Users Controller',
15
+ description: 'Manage users, change their status, reset traffic, etc.',
16
+ },
17
+ USERS_BULK_ACTIONS: {
18
+ tag: 'Users Bulk Actions Controller',
19
+ description: 'Bulk actions with users.',
20
+ },
21
+ USERS_STATS: {
22
+ tag: 'Users Stats Controller',
23
+ description: '',
24
+ },
25
+ HWID_USER_DEVICES: {
26
+ tag: 'HWID User Devices Controller',
27
+ description: '',
28
+ },
29
+ SUBSCRIPTION: {
30
+ tag: '[Public] Subscription Controller',
31
+ description: 'Public Subscription Controller. Methods of this controller are not protected with auth. Use it only for public requests.',
32
+ },
33
+ SUBSCRIPTIONS: {
34
+ tag: '[Protected] Subscriptions Controller',
35
+ description: 'Methods of this controller are protected with auth, most of them is returning the same informations as public Subscription Controller.',
36
+ },
37
+ CONFIG_PROFILES: {
38
+ tag: 'Config Profiles Controller',
39
+ description: 'Management of Config Profiles.',
40
+ },
41
+ INTERNAL_SQUADS: {
42
+ tag: 'Internal Squads Controller',
43
+ description: 'Management of Internal Squads.',
44
+ },
45
+ NODES: {
46
+ tag: 'Nodes Controller',
47
+ description: '',
48
+ },
49
+ HOSTS: {
50
+ tag: 'Hosts Controller',
51
+ description: '',
52
+ },
53
+ HOSTS_BULK_ACTIONS: {
54
+ tag: 'Hosts Bulk Actions Controller',
55
+ description: '',
56
+ },
57
+ SUBSCRIPTION_TEMPLATE: {
58
+ tag: 'Subscription Template Controller',
59
+ description: '',
60
+ },
61
+ SUBSCRIPTION_SETTINGS: {
62
+ tag: 'Subscription Settings Controller',
63
+ description: '',
64
+ },
65
+ INFRA_BILLING: {
66
+ tag: 'Infra Billing Controller',
67
+ description: '',
68
+ },
69
+ SYSTEM: {
70
+ tag: 'System Controller',
71
+ description: '',
72
+ },
73
+ BANDWIDTH_STATS: {
74
+ tag: 'Bandwidth Stats Controller',
75
+ description: '',
76
+ },
77
+ KEYGEN: {
78
+ tag: 'Keygen Controller',
79
+ description: 'Generation of SSL_CERT for Remnawave Node.',
80
+ },
81
+ };
@@ -1,3 +1,4 @@
1
1
  export * from './controllers';
2
+ export * from './controllers-info';
2
3
  export * from './routes';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../api/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../api/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC"}
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./controllers"), exports);
18
+ __exportStar(require("./controllers-info"), exports);
18
19
  __exportStar(require("./routes"), exports);
@@ -84,7 +84,6 @@ export declare const REST_API: {
84
84
  readonly GET: (shortUuid: string) => string;
85
85
  readonly GET_OUTLINE: (shortUuid: string) => string;
86
86
  readonly GET_INFO: (shortUuid: string) => string;
87
- readonly GET_RAW: (shortUuid: string) => string;
88
87
  };
89
88
  readonly HOSTS: {
90
89
  readonly CREATE: "/api/hosts/";
@@ -137,6 +136,7 @@ export declare const REST_API: {
137
136
  readonly USERNAME: (username: string) => string;
138
137
  readonly UUID: (uuid: string) => string;
139
138
  readonly SHORT_UUID: (shortUuid: string) => string;
139
+ readonly SHORT_UUID_RAW: (shortUuid: string) => string;
140
140
  };
141
141
  };
142
142
  readonly CONFIG_PROFILES: {
@@ -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;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCA+BD,MAAM;;;;;;;;;mDAYQ,MAAM;;;;;;0CASf,MAAM;kCAId,MAAM;6CAIK,MAAM;;;;;;;qCAUd,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"}
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;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCA+BD,MAAM;;;;;;;;;mDAYQ,MAAM;;;;;;0CASf,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"}
@@ -121,7 +121,6 @@ exports.REST_API = {
121
121
  GET: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET}${shortUuid}`,
122
122
  GET_OUTLINE: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_OUTLINE}/${shortUuid}`,
123
123
  GET_INFO: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_INFO(shortUuid)}`,
124
- GET_RAW: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_RAW(shortUuid)}`,
125
124
  },
126
125
  HOSTS: {
127
126
  CREATE: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.CREATE}`,
@@ -174,6 +173,7 @@ exports.REST_API = {
174
173
  USERNAME: (username) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTIONS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTIONS_ROUTES.GET_BY.USERNAME(username)}`,
175
174
  UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTIONS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTIONS_ROUTES.GET_BY.UUID(uuid)}`,
176
175
  SHORT_UUID: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTIONS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTIONS_ROUTES.GET_BY.SHORT_UUID(shortUuid)}`,
176
+ SHORT_UUID_RAW: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTIONS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTIONS_ROUTES.GET_BY.SHORT_UUID_RAW(shortUuid)}`,
177
177
  },
178
178
  },
179
179
  CONFIG_PROFILES: {
@@ -9,7 +9,7 @@ var GetSubscriptionInfoByShortUuidCommand;
9
9
  (function (GetSubscriptionInfoByShortUuidCommand) {
10
10
  GetSubscriptionInfoByShortUuidCommand.url = api_1.REST_API.SUBSCRIPTION.GET_INFO;
11
11
  GetSubscriptionInfoByShortUuidCommand.TSQ_url = GetSubscriptionInfoByShortUuidCommand.url(':shortUuid');
12
- GetSubscriptionInfoByShortUuidCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTION_ROUTES.GET_INFO(':shortUuid'), 'get', 'Public endpoint: Get Subscription Info by Short UUID');
12
+ GetSubscriptionInfoByShortUuidCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTION_ROUTES.GET_INFO(':shortUuid'), 'get', 'Get Subscription Info by Short UUID');
13
13
  GetSubscriptionInfoByShortUuidCommand.RequestSchema = zod_1.z.object({
14
14
  shortUuid: zod_1.z.string(),
15
15
  });
@@ -1,5 +1,5 @@
1
+ export * from '../subscriptions/get-by/get-raw-subscription-by-short-uuid.command';
1
2
  export * from './get-outline-subscription-by-short-uuid.command';
2
- export * from './get-raw-subscription-by-short-uuid.command';
3
3
  export * from './get-subscription-by-short-uuid-by-client-type.command';
4
4
  export * from './get-subscription-by-short-uuid.command';
5
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,8CAA8C,CAAC;AAC7D,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,oEAAoE,CAAC;AACnF,cAAc,kDAAkD,CAAC;AACjE,cAAc,yDAAyD,CAAC;AACxE,cAAc,0CAA0C,CAAC;AACzD,cAAc,+CAA+C,CAAC"}
@@ -14,8 +14,8 @@ 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("../subscriptions/get-by/get-raw-subscription-by-short-uuid.command"), exports);
17
18
  __exportStar(require("./get-outline-subscription-by-short-uuid.command"), exports);
18
- __exportStar(require("./get-raw-subscription-by-short-uuid.command"), exports);
19
19
  __exportStar(require("./get-subscription-by-short-uuid-by-client-type.command"), exports);
20
20
  __exportStar(require("./get-subscription-by-short-uuid.command"), exports);
21
21
  __exportStar(require("./get-subscription-info-by-short-uuid.command"), exports);
@@ -2,7 +2,7 @@ import { z } from 'zod';
2
2
  export declare namespace GetRawSubscriptionByShortUuidCommand {
3
3
  const url: (shortUuid: string) => string;
4
4
  const TSQ_url: string;
5
- const endpointDetails: import("../../constants").EndpointDetails;
5
+ const endpointDetails: import("../../../constants").EndpointDetails;
6
6
  const RequestSchema: z.ZodObject<{
7
7
  shortUuid: z.ZodString;
8
8
  }, "strip", z.ZodTypeAny, {
@@ -22,62 +22,175 @@ export declare namespace GetRawSubscriptionByShortUuidCommand {
22
22
  const ResponseSchema: z.ZodObject<{
23
23
  response: z.ZodObject<{
24
24
  user: z.ZodObject<{
25
+ uuid: z.ZodString;
25
26
  shortUuid: z.ZodString;
26
- daysLeft: z.ZodNumber;
27
- trafficUsed: z.ZodString;
28
- trafficLimit: z.ZodString;
29
- lifetimeTrafficUsed: z.ZodString;
30
- trafficUsedBytes: z.ZodString;
31
- trafficLimitBytes: z.ZodString;
32
- lifetimeTrafficUsedBytes: z.ZodString;
33
27
  username: z.ZodString;
34
- expiresAt: z.ZodEffects<z.ZodString, Date, string>;
35
- isActive: z.ZodBoolean;
36
- userStatus: z.ZodNativeEnum<{
28
+ status: z.ZodDefault<z.ZodNativeEnum<{
37
29
  readonly ACTIVE: "ACTIVE";
38
30
  readonly DISABLED: "DISABLED";
39
31
  readonly LIMITED: "LIMITED";
40
32
  readonly EXPIRED: "EXPIRED";
41
- }>;
42
- trafficLimitStrategy: z.ZodNativeEnum<{
33
+ }>>;
34
+ usedTrafficBytes: z.ZodNumber;
35
+ lifetimeUsedTrafficBytes: z.ZodNumber;
36
+ trafficLimitBytes: z.ZodDefault<z.ZodNumber>;
37
+ trafficLimitStrategy: z.ZodDefault<z.ZodNativeEnum<{
43
38
  readonly NO_RESET: "NO_RESET";
44
39
  readonly DAY: "DAY";
45
40
  readonly WEEK: "WEEK";
46
41
  readonly MONTH: "MONTH";
47
- }>;
42
+ }>>;
43
+ subLastUserAgent: z.ZodNullable<z.ZodString>;
44
+ subLastOpenedAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
45
+ expireAt: z.ZodEffects<z.ZodString, Date, string>;
46
+ onlineAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
47
+ subRevokedAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
48
+ lastTrafficResetAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
49
+ trojanPassword: z.ZodString;
50
+ vlessUuid: z.ZodString;
51
+ ssPassword: z.ZodString;
52
+ description: z.ZodNullable<z.ZodString>;
48
53
  tag: z.ZodNullable<z.ZodString>;
54
+ telegramId: z.ZodNullable<z.ZodNumber>;
55
+ email: z.ZodNullable<z.ZodString>;
56
+ hwidDeviceLimit: z.ZodNullable<z.ZodNumber>;
57
+ firstConnectedAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
58
+ lastTriggeredThreshold: z.ZodDefault<z.ZodNumber>;
59
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
60
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
61
+ activeInternalSquads: z.ZodArray<z.ZodObject<{
62
+ uuid: z.ZodString;
63
+ name: z.ZodString;
64
+ }, "strip", z.ZodTypeAny, {
65
+ uuid: string;
66
+ name: string;
67
+ }, {
68
+ uuid: string;
69
+ name: string;
70
+ }>, "many">;
71
+ } & {
72
+ subscriptionUrl: z.ZodString;
73
+ lastConnectedNode: z.ZodNullable<z.ZodObject<{
74
+ connectedAt: z.ZodEffects<z.ZodString, Date, string>;
75
+ nodeName: z.ZodString;
76
+ countryCode: z.ZodString;
77
+ }, "strip", z.ZodTypeAny, {
78
+ countryCode: string;
79
+ connectedAt: Date;
80
+ nodeName: string;
81
+ }, {
82
+ countryCode: string;
83
+ connectedAt: string;
84
+ nodeName: string;
85
+ }>>;
86
+ happ: z.ZodObject<{
87
+ cryptoLink: z.ZodString;
88
+ }, "strip", z.ZodTypeAny, {
89
+ cryptoLink: string;
90
+ }, {
91
+ cryptoLink: string;
92
+ }>;
49
93
  }, "strip", z.ZodTypeAny, {
94
+ status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
95
+ uuid: string;
96
+ createdAt: Date;
97
+ updatedAt: Date;
50
98
  username: string;
51
99
  tag: string | null;
52
100
  shortUuid: string;
53
- trafficLimitBytes: string;
101
+ usedTrafficBytes: number;
102
+ lifetimeUsedTrafficBytes: number;
103
+ trafficLimitBytes: number;
104
+ description: string | null;
54
105
  trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
55
- trafficUsedBytes: string;
106
+ subLastUserAgent: string | null;
107
+ subLastOpenedAt: Date | null;
108
+ expireAt: Date;
109
+ onlineAt: Date | null;
110
+ subRevokedAt: Date | null;
111
+ lastTrafficResetAt: Date | null;
112
+ trojanPassword: string;
113
+ vlessUuid: string;
114
+ ssPassword: string;
115
+ telegramId: number | null;
116
+ email: string | null;
117
+ hwidDeviceLimit: number | null;
118
+ firstConnectedAt: Date | null;
119
+ lastTriggeredThreshold: number;
120
+ activeInternalSquads: {
121
+ uuid: string;
122
+ name: string;
123
+ }[];
124
+ subscriptionUrl: string;
125
+ lastConnectedNode: {
126
+ countryCode: string;
127
+ connectedAt: Date;
128
+ nodeName: string;
129
+ } | null;
130
+ happ: {
131
+ cryptoLink: string;
132
+ };
133
+ }, {
134
+ uuid: string;
135
+ createdAt: string;
136
+ updatedAt: string;
137
+ username: string;
138
+ tag: string | null;
139
+ shortUuid: string;
140
+ usedTrafficBytes: number;
141
+ lifetimeUsedTrafficBytes: number;
142
+ description: string | null;
143
+ subLastUserAgent: string | null;
144
+ subLastOpenedAt: string | null;
145
+ expireAt: string;
146
+ onlineAt: string | null;
147
+ subRevokedAt: string | null;
148
+ lastTrafficResetAt: string | null;
149
+ trojanPassword: string;
150
+ vlessUuid: string;
151
+ ssPassword: string;
152
+ telegramId: number | null;
153
+ email: string | null;
154
+ hwidDeviceLimit: number | null;
155
+ firstConnectedAt: string | null;
156
+ activeInternalSquads: {
157
+ uuid: string;
158
+ name: string;
159
+ }[];
160
+ subscriptionUrl: string;
161
+ lastConnectedNode: {
162
+ countryCode: string;
163
+ connectedAt: string;
164
+ nodeName: string;
165
+ } | null;
166
+ happ: {
167
+ cryptoLink: string;
168
+ };
169
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
170
+ trafficLimitBytes?: number | undefined;
171
+ trafficLimitStrategy?: "MONTH" | "NO_RESET" | "DAY" | "WEEK" | undefined;
172
+ lastTriggeredThreshold?: number | undefined;
173
+ }>;
174
+ convertedUserInfo: z.ZodObject<{
175
+ daysLeft: z.ZodNumber;
176
+ trafficLimit: z.ZodString;
177
+ trafficUsed: z.ZodString;
178
+ lifetimeTrafficUsed: z.ZodString;
179
+ isHwidLimited: z.ZodBoolean;
180
+ }, "strip", z.ZodTypeAny, {
56
181
  daysLeft: number;
57
182
  trafficUsed: string;
58
183
  trafficLimit: string;
59
184
  lifetimeTrafficUsed: string;
60
- lifetimeTrafficUsedBytes: string;
61
- expiresAt: Date;
62
- isActive: boolean;
63
- userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
185
+ isHwidLimited: boolean;
64
186
  }, {
65
- username: string;
66
- tag: string | null;
67
- shortUuid: string;
68
- trafficLimitBytes: string;
69
- trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
70
- trafficUsedBytes: string;
71
187
  daysLeft: number;
72
188
  trafficUsed: string;
73
189
  trafficLimit: string;
74
190
  lifetimeTrafficUsed: string;
75
- lifetimeTrafficUsedBytes: string;
76
- expiresAt: string;
77
- isActive: boolean;
78
- userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
191
+ isHwidLimited: boolean;
79
192
  }>;
80
- subscriptionUrl: z.ZodString;
193
+ headers: z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>;
81
194
  rawHosts: z.ZodArray<z.ZodObject<{
82
195
  address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
83
196
  alpn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -273,26 +386,56 @@ export declare namespace GetRawSubscriptionByShortUuidCommand {
273
386
  inboundTag: string;
274
387
  } | undefined;
275
388
  }>, "many">;
276
- headers: z.ZodRecord<z.ZodString, z.ZodString>;
277
- isHwidLimited: z.ZodBoolean;
278
389
  }, "strip", z.ZodTypeAny, {
279
- subscriptionUrl: string;
280
390
  user: {
391
+ status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
392
+ uuid: string;
393
+ createdAt: Date;
394
+ updatedAt: Date;
281
395
  username: string;
282
396
  tag: string | null;
283
397
  shortUuid: string;
284
- trafficLimitBytes: string;
398
+ usedTrafficBytes: number;
399
+ lifetimeUsedTrafficBytes: number;
400
+ trafficLimitBytes: number;
401
+ description: string | null;
285
402
  trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
286
- trafficUsedBytes: string;
403
+ subLastUserAgent: string | null;
404
+ subLastOpenedAt: Date | null;
405
+ expireAt: Date;
406
+ onlineAt: Date | null;
407
+ subRevokedAt: Date | null;
408
+ lastTrafficResetAt: Date | null;
409
+ trojanPassword: string;
410
+ vlessUuid: string;
411
+ ssPassword: string;
412
+ telegramId: number | null;
413
+ email: string | null;
414
+ hwidDeviceLimit: number | null;
415
+ firstConnectedAt: Date | null;
416
+ lastTriggeredThreshold: number;
417
+ activeInternalSquads: {
418
+ uuid: string;
419
+ name: string;
420
+ }[];
421
+ subscriptionUrl: string;
422
+ lastConnectedNode: {
423
+ countryCode: string;
424
+ connectedAt: Date;
425
+ nodeName: string;
426
+ } | null;
427
+ happ: {
428
+ cryptoLink: string;
429
+ };
430
+ };
431
+ convertedUserInfo: {
287
432
  daysLeft: number;
288
433
  trafficUsed: string;
289
434
  trafficLimit: string;
290
435
  lifetimeTrafficUsed: string;
291
- lifetimeTrafficUsedBytes: string;
292
- expiresAt: Date;
293
- isActive: boolean;
294
- userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
436
+ isHwidLimited: boolean;
295
437
  };
438
+ headers: Record<string, string | undefined>;
296
439
  rawHosts: {
297
440
  password: {
298
441
  trojanPassword: string;
@@ -342,26 +485,56 @@ export declare namespace GetRawSubscriptionByShortUuidCommand {
342
485
  inboundTag: string;
343
486
  } | undefined;
344
487
  }[];
345
- headers: Record<string, string>;
346
- isHwidLimited: boolean;
347
488
  }, {
348
- subscriptionUrl: string;
349
489
  user: {
490
+ uuid: string;
491
+ createdAt: string;
492
+ updatedAt: string;
350
493
  username: string;
351
494
  tag: string | null;
352
495
  shortUuid: string;
353
- trafficLimitBytes: string;
354
- trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
355
- trafficUsedBytes: string;
496
+ usedTrafficBytes: number;
497
+ lifetimeUsedTrafficBytes: number;
498
+ description: string | null;
499
+ subLastUserAgent: string | null;
500
+ subLastOpenedAt: string | null;
501
+ expireAt: string;
502
+ onlineAt: string | null;
503
+ subRevokedAt: string | null;
504
+ lastTrafficResetAt: string | null;
505
+ trojanPassword: string;
506
+ vlessUuid: string;
507
+ ssPassword: string;
508
+ telegramId: number | null;
509
+ email: string | null;
510
+ hwidDeviceLimit: number | null;
511
+ firstConnectedAt: string | null;
512
+ activeInternalSquads: {
513
+ uuid: string;
514
+ name: string;
515
+ }[];
516
+ subscriptionUrl: string;
517
+ lastConnectedNode: {
518
+ countryCode: string;
519
+ connectedAt: string;
520
+ nodeName: string;
521
+ } | null;
522
+ happ: {
523
+ cryptoLink: string;
524
+ };
525
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
526
+ trafficLimitBytes?: number | undefined;
527
+ trafficLimitStrategy?: "MONTH" | "NO_RESET" | "DAY" | "WEEK" | undefined;
528
+ lastTriggeredThreshold?: number | undefined;
529
+ };
530
+ convertedUserInfo: {
356
531
  daysLeft: number;
357
532
  trafficUsed: string;
358
533
  trafficLimit: string;
359
534
  lifetimeTrafficUsed: string;
360
- lifetimeTrafficUsedBytes: string;
361
- expiresAt: string;
362
- isActive: boolean;
363
- userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
535
+ isHwidLimited: boolean;
364
536
  };
537
+ headers: Record<string, string | undefined>;
365
538
  rawHosts: {
366
539
  password: {
367
540
  trojanPassword: string;
@@ -411,28 +584,58 @@ export declare namespace GetRawSubscriptionByShortUuidCommand {
411
584
  inboundTag: string;
412
585
  } | undefined;
413
586
  }[];
414
- headers: Record<string, string>;
415
- isHwidLimited: boolean;
416
587
  }>;
417
588
  }, "strip", z.ZodTypeAny, {
418
589
  response: {
419
- subscriptionUrl: string;
420
590
  user: {
591
+ status: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
592
+ uuid: string;
593
+ createdAt: Date;
594
+ updatedAt: Date;
421
595
  username: string;
422
596
  tag: string | null;
423
597
  shortUuid: string;
424
- trafficLimitBytes: string;
598
+ usedTrafficBytes: number;
599
+ lifetimeUsedTrafficBytes: number;
600
+ trafficLimitBytes: number;
601
+ description: string | null;
425
602
  trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
426
- trafficUsedBytes: string;
603
+ subLastUserAgent: string | null;
604
+ subLastOpenedAt: Date | null;
605
+ expireAt: Date;
606
+ onlineAt: Date | null;
607
+ subRevokedAt: Date | null;
608
+ lastTrafficResetAt: Date | null;
609
+ trojanPassword: string;
610
+ vlessUuid: string;
611
+ ssPassword: string;
612
+ telegramId: number | null;
613
+ email: string | null;
614
+ hwidDeviceLimit: number | null;
615
+ firstConnectedAt: Date | null;
616
+ lastTriggeredThreshold: number;
617
+ activeInternalSquads: {
618
+ uuid: string;
619
+ name: string;
620
+ }[];
621
+ subscriptionUrl: string;
622
+ lastConnectedNode: {
623
+ countryCode: string;
624
+ connectedAt: Date;
625
+ nodeName: string;
626
+ } | null;
627
+ happ: {
628
+ cryptoLink: string;
629
+ };
630
+ };
631
+ convertedUserInfo: {
427
632
  daysLeft: number;
428
633
  trafficUsed: string;
429
634
  trafficLimit: string;
430
635
  lifetimeTrafficUsed: string;
431
- lifetimeTrafficUsedBytes: string;
432
- expiresAt: Date;
433
- isActive: boolean;
434
- userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
636
+ isHwidLimited: boolean;
435
637
  };
638
+ headers: Record<string, string | undefined>;
436
639
  rawHosts: {
437
640
  password: {
438
641
  trojanPassword: string;
@@ -482,28 +685,58 @@ export declare namespace GetRawSubscriptionByShortUuidCommand {
482
685
  inboundTag: string;
483
686
  } | undefined;
484
687
  }[];
485
- headers: Record<string, string>;
486
- isHwidLimited: boolean;
487
688
  };
488
689
  }, {
489
690
  response: {
490
- subscriptionUrl: string;
491
691
  user: {
692
+ uuid: string;
693
+ createdAt: string;
694
+ updatedAt: string;
492
695
  username: string;
493
696
  tag: string | null;
494
697
  shortUuid: string;
495
- trafficLimitBytes: string;
496
- trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
497
- trafficUsedBytes: string;
698
+ usedTrafficBytes: number;
699
+ lifetimeUsedTrafficBytes: number;
700
+ description: string | null;
701
+ subLastUserAgent: string | null;
702
+ subLastOpenedAt: string | null;
703
+ expireAt: string;
704
+ onlineAt: string | null;
705
+ subRevokedAt: string | null;
706
+ lastTrafficResetAt: string | null;
707
+ trojanPassword: string;
708
+ vlessUuid: string;
709
+ ssPassword: string;
710
+ telegramId: number | null;
711
+ email: string | null;
712
+ hwidDeviceLimit: number | null;
713
+ firstConnectedAt: string | null;
714
+ activeInternalSquads: {
715
+ uuid: string;
716
+ name: string;
717
+ }[];
718
+ subscriptionUrl: string;
719
+ lastConnectedNode: {
720
+ countryCode: string;
721
+ connectedAt: string;
722
+ nodeName: string;
723
+ } | null;
724
+ happ: {
725
+ cryptoLink: string;
726
+ };
727
+ status?: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE" | undefined;
728
+ trafficLimitBytes?: number | undefined;
729
+ trafficLimitStrategy?: "MONTH" | "NO_RESET" | "DAY" | "WEEK" | undefined;
730
+ lastTriggeredThreshold?: number | undefined;
731
+ };
732
+ convertedUserInfo: {
498
733
  daysLeft: number;
499
734
  trafficUsed: string;
500
735
  trafficLimit: string;
501
736
  lifetimeTrafficUsed: string;
502
- lifetimeTrafficUsedBytes: string;
503
- expiresAt: string;
504
- isActive: boolean;
505
- userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
737
+ isHwidLimited: boolean;
506
738
  };
739
+ headers: Record<string, string | undefined>;
507
740
  rawHosts: {
508
741
  password: {
509
742
  trojanPassword: string;
@@ -553,8 +786,6 @@ export declare namespace GetRawSubscriptionByShortUuidCommand {
553
786
  inboundTag: string;
554
787
  } | undefined;
555
788
  }[];
556
- headers: Record<string, string>;
557
- isHwidLimited: boolean;
558
789
  };
559
790
  }>;
560
791
  type Response = z.infer<typeof ResponseSchema>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-raw-subscription-by-short-uuid.command.d.ts","sourceRoot":"","sources":["../../../../../commands/subscriptions/get-by/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,+BAA+C,CAAC;IACzD,MAAM,OAAO,QAAoB,CAAC;IAElC,MAAM,eAAe,8CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,kBAAkB;;;;;;MAM7B,CAAC;IAEH,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAEvD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6EzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -2,14 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetRawSubscriptionByShortUuidCommand = void 0;
4
4
  const zod_1 = require("zod");
5
- const constants_1 = require("../../constants");
6
- const api_1 = require("../../api");
7
- const constants_2 = require("../../constants");
5
+ const api_1 = require("../../../api");
6
+ const constants_1 = require("../../../constants");
7
+ const models_1 = require("../../../models");
8
8
  var GetRawSubscriptionByShortUuidCommand;
9
9
  (function (GetRawSubscriptionByShortUuidCommand) {
10
- GetRawSubscriptionByShortUuidCommand.url = api_1.REST_API.SUBSCRIPTION.GET_RAW;
10
+ GetRawSubscriptionByShortUuidCommand.url = api_1.REST_API.SUBSCRIPTIONS.GET_BY.SHORT_UUID_RAW;
11
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');
12
+ GetRawSubscriptionByShortUuidCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTIONS_ROUTES.GET_BY.SHORT_UUID_RAW(':shortUuid'), 'get', 'Get Raw Subscription by Short UUID');
13
13
  GetRawSubscriptionByShortUuidCommand.RequestSchema = zod_1.z.object({
14
14
  shortUuid: zod_1.z.string(),
15
15
  });
@@ -22,26 +22,15 @@ var GetRawSubscriptionByShortUuidCommand;
22
22
  });
23
23
  GetRawSubscriptionByShortUuidCommand.ResponseSchema = zod_1.z.object({
24
24
  response: zod_1.z.object({
25
- user: zod_1.z.object({
26
- shortUuid: zod_1.z.string(),
25
+ user: models_1.ExtendedUsersSchema,
26
+ convertedUserInfo: zod_1.z.object({
27
27
  daysLeft: zod_1.z.number(),
28
- trafficUsed: zod_1.z.string(),
29
28
  trafficLimit: zod_1.z.string(),
29
+ trafficUsed: zod_1.z.string(),
30
30
  lifetimeTrafficUsed: zod_1.z.string(),
31
- trafficUsedBytes: zod_1.z.string(),
32
- trafficLimitBytes: zod_1.z.string(),
33
- lifetimeTrafficUsedBytes: zod_1.z.string(),
34
- username: zod_1.z.string(),
35
- expiresAt: zod_1.z
36
- .string()
37
- .datetime()
38
- .transform((str) => new Date(str)),
39
- isActive: zod_1.z.boolean(),
40
- userStatus: zod_1.z.nativeEnum(constants_1.USERS_STATUS),
41
- trafficLimitStrategy: zod_1.z.nativeEnum(constants_1.RESET_PERIODS),
42
- tag: zod_1.z.nullable(zod_1.z.string()),
31
+ isHwidLimited: zod_1.z.boolean(),
43
32
  }),
44
- subscriptionUrl: zod_1.z.string(),
33
+ headers: zod_1.z.record(zod_1.z.string(), zod_1.z.string().optional()),
45
34
  rawHosts: zod_1.z.array(zod_1.z.object({
46
35
  address: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
47
36
  alpn: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
@@ -91,8 +80,6 @@ var GetRawSubscriptionByShortUuidCommand;
91
80
  vlessRouteId: zod_1.z.number().int().nullable(),
92
81
  })),
93
82
  })),
94
- headers: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
95
- isHwidLimited: zod_1.z.boolean(),
96
83
  }),
97
84
  });
98
85
  })(GetRawSubscriptionByShortUuidCommand || (exports.GetRawSubscriptionByShortUuidCommand = GetRawSubscriptionByShortUuidCommand = {}));
@@ -1,3 +1,4 @@
1
+ export * from './get-raw-subscription-by-short-uuid.command';
1
2
  export * from './get-subscription-by-short-uuid-protected.command';
2
3
  export * from './get-subscription-by-username.command';
3
4
  export * from './get-subscription-by-uuid.command';
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../commands/subscriptions/get-by/index.ts"],"names":[],"mappings":"AAAA,cAAc,8CAA8C,CAAC;AAC7D,cAAc,oDAAoD,CAAC;AACnE,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC"}
@@ -14,6 +14,7 @@ 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-raw-subscription-by-short-uuid.command"), exports);
17
18
  __exportStar(require("./get-subscription-by-short-uuid-protected.command"), exports);
18
19
  __exportStar(require("./get-subscription-by-username.command"), exports);
19
20
  __exportStar(require("./get-subscription-by-uuid.command"), exports);
@@ -6,5 +6,4 @@ exports.SUBSCRIPTION_ROUTES = {
6
6
  GET: '',
7
7
  GET_OUTLINE: '/outline',
8
8
  GET_INFO: (shortUuid) => `${shortUuid}/info`,
9
- GET_RAW: (shortUuid) => `${shortUuid}/raw`,
10
9
  };
@@ -8,5 +8,6 @@ exports.SUBSCRIPTIONS_ROUTES = {
8
8
  USERNAME: (username) => `by-username/${username}`,
9
9
  UUID: (uuid) => `by-uuid/${uuid}`,
10
10
  SHORT_UUID: (shortUuid) => `by-short-uuid/${shortUuid}`,
11
+ SHORT_UUID_RAW: (shortUuid) => `by-short-uuid/${shortUuid}/raw`,
11
12
  },
12
13
  };
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CONTROLLERS_INFO = void 0;
4
+ exports.CONTROLLERS_INFO = {
5
+ AUTH: {
6
+ tag: 'Auth Controller',
7
+ description: 'Used to authenticate admin users.',
8
+ },
9
+ API_TOKENS: {
10
+ tag: 'API Tokens Controller',
11
+ description: "Manage API tokens to use in your code. This controller can't be used with API token, only with Admin JWT token",
12
+ },
13
+ USERS: {
14
+ tag: 'Users Controller',
15
+ description: 'Manage users, change their status, reset traffic, etc.',
16
+ },
17
+ USERS_BULK_ACTIONS: {
18
+ tag: 'Users Bulk Actions Controller',
19
+ description: 'Bulk actions with users.',
20
+ },
21
+ USERS_STATS: {
22
+ tag: 'Users Stats Controller',
23
+ description: '',
24
+ },
25
+ HWID_USER_DEVICES: {
26
+ tag: 'HWID User Devices Controller',
27
+ description: '',
28
+ },
29
+ SUBSCRIPTION: {
30
+ tag: '[Public] Subscription Controller',
31
+ description: 'Public Subscription Controller. Methods of this controller are not protected with auth. Use it only for public requests.',
32
+ },
33
+ SUBSCRIPTIONS: {
34
+ tag: '[Protected] Subscriptions Controller',
35
+ description: 'Methods of this controller are protected with auth, most of them is returning the same informations as public Subscription Controller.',
36
+ },
37
+ CONFIG_PROFILES: {
38
+ tag: 'Config Profiles Controller',
39
+ description: 'Management of Config Profiles.',
40
+ },
41
+ INTERNAL_SQUADS: {
42
+ tag: 'Internal Squads Controller',
43
+ description: 'Management of Internal Squads.',
44
+ },
45
+ NODES: {
46
+ tag: 'Nodes Controller',
47
+ description: '',
48
+ },
49
+ HOSTS: {
50
+ tag: 'Hosts Controller',
51
+ description: '',
52
+ },
53
+ HOSTS_BULK_ACTIONS: {
54
+ tag: 'Hosts Bulk Actions Controller',
55
+ description: '',
56
+ },
57
+ SUBSCRIPTION_TEMPLATE: {
58
+ tag: 'Subscription Template Controller',
59
+ description: '',
60
+ },
61
+ SUBSCRIPTION_SETTINGS: {
62
+ tag: 'Subscription Settings Controller',
63
+ description: '',
64
+ },
65
+ INFRA_BILLING: {
66
+ tag: 'Infra Billing Controller',
67
+ description: '',
68
+ },
69
+ SYSTEM: {
70
+ tag: 'System Controller',
71
+ description: '',
72
+ },
73
+ BANDWIDTH_STATS: {
74
+ tag: 'Bandwidth Stats Controller',
75
+ description: '',
76
+ },
77
+ KEYGEN: {
78
+ tag: 'Keygen Controller',
79
+ description: 'Generation of SSL_CERT for Remnawave Node.',
80
+ },
81
+ };
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./controllers"), exports);
18
+ __exportStar(require("./controllers-info"), exports);
18
19
  __exportStar(require("./routes"), exports);
@@ -121,7 +121,6 @@ exports.REST_API = {
121
121
  GET: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET}${shortUuid}`,
122
122
  GET_OUTLINE: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_OUTLINE}/${shortUuid}`,
123
123
  GET_INFO: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_INFO(shortUuid)}`,
124
- GET_RAW: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_ROUTES.GET_RAW(shortUuid)}`,
125
124
  },
126
125
  HOSTS: {
127
126
  CREATE: `${exports.ROOT}/${CONTROLLERS.HOSTS_CONTROLLER}/${CONTROLLERS.HOSTS_ROUTES.CREATE}`,
@@ -174,6 +173,7 @@ exports.REST_API = {
174
173
  USERNAME: (username) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTIONS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTIONS_ROUTES.GET_BY.USERNAME(username)}`,
175
174
  UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTIONS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTIONS_ROUTES.GET_BY.UUID(uuid)}`,
176
175
  SHORT_UUID: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTIONS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTIONS_ROUTES.GET_BY.SHORT_UUID(shortUuid)}`,
176
+ SHORT_UUID_RAW: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTIONS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTIONS_ROUTES.GET_BY.SHORT_UUID_RAW(shortUuid)}`,
177
177
  },
178
178
  },
179
179
  CONFIG_PROFILES: {
@@ -9,7 +9,7 @@ var GetSubscriptionInfoByShortUuidCommand;
9
9
  (function (GetSubscriptionInfoByShortUuidCommand) {
10
10
  GetSubscriptionInfoByShortUuidCommand.url = api_1.REST_API.SUBSCRIPTION.GET_INFO;
11
11
  GetSubscriptionInfoByShortUuidCommand.TSQ_url = GetSubscriptionInfoByShortUuidCommand.url(':shortUuid');
12
- GetSubscriptionInfoByShortUuidCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTION_ROUTES.GET_INFO(':shortUuid'), 'get', 'Public endpoint: Get Subscription Info by Short UUID');
12
+ GetSubscriptionInfoByShortUuidCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTION_ROUTES.GET_INFO(':shortUuid'), 'get', 'Get Subscription Info by Short UUID');
13
13
  GetSubscriptionInfoByShortUuidCommand.RequestSchema = zod_1.z.object({
14
14
  shortUuid: zod_1.z.string(),
15
15
  });
@@ -14,8 +14,8 @@ 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("../subscriptions/get-by/get-raw-subscription-by-short-uuid.command"), exports);
17
18
  __exportStar(require("./get-outline-subscription-by-short-uuid.command"), exports);
18
- __exportStar(require("./get-raw-subscription-by-short-uuid.command"), exports);
19
19
  __exportStar(require("./get-subscription-by-short-uuid-by-client-type.command"), exports);
20
20
  __exportStar(require("./get-subscription-by-short-uuid.command"), exports);
21
21
  __exportStar(require("./get-subscription-info-by-short-uuid.command"), exports);
@@ -2,14 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetRawSubscriptionByShortUuidCommand = void 0;
4
4
  const zod_1 = require("zod");
5
- const constants_1 = require("../../constants");
6
- const api_1 = require("../../api");
7
- const constants_2 = require("../../constants");
5
+ const api_1 = require("../../../api");
6
+ const constants_1 = require("../../../constants");
7
+ const models_1 = require("../../../models");
8
8
  var GetRawSubscriptionByShortUuidCommand;
9
9
  (function (GetRawSubscriptionByShortUuidCommand) {
10
- GetRawSubscriptionByShortUuidCommand.url = api_1.REST_API.SUBSCRIPTION.GET_RAW;
10
+ GetRawSubscriptionByShortUuidCommand.url = api_1.REST_API.SUBSCRIPTIONS.GET_BY.SHORT_UUID_RAW;
11
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');
12
+ GetRawSubscriptionByShortUuidCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTIONS_ROUTES.GET_BY.SHORT_UUID_RAW(':shortUuid'), 'get', 'Get Raw Subscription by Short UUID');
13
13
  GetRawSubscriptionByShortUuidCommand.RequestSchema = zod_1.z.object({
14
14
  shortUuid: zod_1.z.string(),
15
15
  });
@@ -22,26 +22,15 @@ var GetRawSubscriptionByShortUuidCommand;
22
22
  });
23
23
  GetRawSubscriptionByShortUuidCommand.ResponseSchema = zod_1.z.object({
24
24
  response: zod_1.z.object({
25
- user: zod_1.z.object({
26
- shortUuid: zod_1.z.string(),
25
+ user: models_1.ExtendedUsersSchema,
26
+ convertedUserInfo: zod_1.z.object({
27
27
  daysLeft: zod_1.z.number(),
28
- trafficUsed: zod_1.z.string(),
29
28
  trafficLimit: zod_1.z.string(),
29
+ trafficUsed: zod_1.z.string(),
30
30
  lifetimeTrafficUsed: zod_1.z.string(),
31
- trafficUsedBytes: zod_1.z.string(),
32
- trafficLimitBytes: zod_1.z.string(),
33
- lifetimeTrafficUsedBytes: zod_1.z.string(),
34
- username: zod_1.z.string(),
35
- expiresAt: zod_1.z
36
- .string()
37
- .datetime()
38
- .transform((str) => new Date(str)),
39
- isActive: zod_1.z.boolean(),
40
- userStatus: zod_1.z.nativeEnum(constants_1.USERS_STATUS),
41
- trafficLimitStrategy: zod_1.z.nativeEnum(constants_1.RESET_PERIODS),
42
- tag: zod_1.z.nullable(zod_1.z.string()),
31
+ isHwidLimited: zod_1.z.boolean(),
43
32
  }),
44
- subscriptionUrl: zod_1.z.string(),
33
+ headers: zod_1.z.record(zod_1.z.string(), zod_1.z.string().optional()),
45
34
  rawHosts: zod_1.z.array(zod_1.z.object({
46
35
  address: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
47
36
  alpn: zod_1.z.optional(zod_1.z.nullable(zod_1.z.string())),
@@ -91,8 +80,6 @@ var GetRawSubscriptionByShortUuidCommand;
91
80
  vlessRouteId: zod_1.z.number().int().nullable(),
92
81
  })),
93
82
  })),
94
- headers: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
95
- isHwidLimited: zod_1.z.boolean(),
96
83
  }),
97
84
  });
98
85
  })(GetRawSubscriptionByShortUuidCommand || (exports.GetRawSubscriptionByShortUuidCommand = GetRawSubscriptionByShortUuidCommand = {}));
@@ -14,6 +14,7 @@ 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-raw-subscription-by-short-uuid.command"), exports);
17
18
  __exportStar(require("./get-subscription-by-short-uuid-protected.command"), exports);
18
19
  __exportStar(require("./get-subscription-by-username.command"), exports);
19
20
  __exportStar(require("./get-subscription-by-uuid.command"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "2.1.31",
3
+ "version": "2.1.33",
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.",
@@ -1 +0,0 @@
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,kBAAkB;;;;;;MAM7B,CAAC;IAEH,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAEvD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA0FzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}