@remnawave/backend-contract 2.1.24 → 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.
Files changed (38) hide show
  1. package/build/backend/api/controllers/subscriptions.d.ts +2 -0
  2. package/build/backend/api/controllers/subscriptions.d.ts.map +1 -1
  3. package/build/backend/api/controllers/subscriptions.js +2 -0
  4. package/build/backend/api/routes.d.ts +2 -0
  5. package/build/backend/api/routes.d.ts.map +1 -1
  6. package/build/backend/api/routes.js +2 -0
  7. package/build/backend/commands/subscription/get-subscription-info-by-short-uuid.command.d.ts +4 -4
  8. package/build/backend/commands/subscription/get-subscription-info-by-short-uuid.command.d.ts.map +1 -1
  9. package/build/backend/commands/subscription/get-subscription-info-by-short-uuid.command.js +3 -28
  10. package/build/backend/commands/subscriptions/get-all-subscriptions.command.d.ts +6 -6
  11. package/build/backend/commands/subscriptions/get-by/get-subscription-by-short-uuid-protected.command.d.ts +180 -0
  12. package/build/backend/commands/subscriptions/get-by/get-subscription-by-short-uuid-protected.command.d.ts.map +1 -0
  13. package/build/backend/commands/subscriptions/get-by/get-subscription-by-short-uuid-protected.command.js +19 -0
  14. package/build/backend/commands/subscriptions/get-by/get-subscription-by-username.command.d.ts +51 -4
  15. package/build/backend/commands/subscriptions/get-by/get-subscription-by-username.command.d.ts.map +1 -1
  16. package/build/backend/commands/subscriptions/get-by/get-subscription-by-username.command.js +3 -21
  17. package/build/backend/commands/subscriptions/get-by/get-subscription-by-uuid.command.d.ts +180 -0
  18. package/build/backend/commands/subscriptions/get-by/get-subscription-by-uuid.command.d.ts.map +1 -0
  19. package/build/backend/commands/subscriptions/get-by/get-subscription-by-uuid.command.js +19 -0
  20. package/build/backend/commands/subscriptions/get-by/index.d.ts +2 -0
  21. package/build/backend/commands/subscriptions/get-by/index.d.ts.map +1 -1
  22. package/build/backend/commands/subscriptions/get-by/index.js +2 -0
  23. package/build/backend/models/index.d.ts +1 -0
  24. package/build/backend/models/index.d.ts.map +1 -1
  25. package/build/backend/models/index.js +1 -0
  26. package/build/backend/models/subscription-info.schema.d.ts +114 -0
  27. package/build/backend/models/subscription-info.schema.d.ts.map +1 -0
  28. package/build/backend/models/subscription-info.schema.js +31 -0
  29. package/build/frontend/api/controllers/subscriptions.js +2 -0
  30. package/build/frontend/api/routes.js +2 -0
  31. package/build/frontend/commands/subscription/get-subscription-info-by-short-uuid.command.js +3 -28
  32. package/build/frontend/commands/subscriptions/get-by/get-subscription-by-short-uuid-protected.command.js +19 -0
  33. package/build/frontend/commands/subscriptions/get-by/get-subscription-by-username.command.js +3 -21
  34. package/build/frontend/commands/subscriptions/get-by/get-subscription-by-uuid.command.js +19 -0
  35. package/build/frontend/commands/subscriptions/get-by/index.js +2 -0
  36. package/build/frontend/models/index.js +1 -0
  37. package/build/frontend/models/subscription-info.schema.js +31 -0
  38. package/package.json +1 -1
@@ -3,6 +3,8 @@ export declare const SUBSCRIPTIONS_ROUTES: {
3
3
  readonly GET: "";
4
4
  readonly GET_BY: {
5
5
  readonly USERNAME: (username: string) => string;
6
+ readonly UUID: (uuid: string) => string;
7
+ readonly SHORT_UUID: (shortUuid: string) => string;
6
8
  };
7
9
  };
8
10
  //# 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;;CAEzB,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;;CAE5B,CAAC"}
@@ -6,5 +6,7 @@ exports.SUBSCRIPTIONS_ROUTES = {
6
6
  GET: '',
7
7
  GET_BY: {
8
8
  USERNAME: (username) => `by-username/${username}`,
9
+ UUID: (uuid) => `by-uuid/${uuid}`,
10
+ SHORT_UUID: (shortUuid) => `by-short-uuid/${shortUuid}`,
9
11
  },
10
12
  };
@@ -132,6 +132,8 @@ export declare const REST_API: {
132
132
  readonly GET: "/api/subscriptions/";
133
133
  readonly GET_BY: {
134
134
  readonly USERNAME: (username: string) => string;
135
+ readonly UUID: (uuid: string) => string;
136
+ readonly SHORT_UUID: (shortUuid: string) => string;
135
137
  };
136
138
  };
137
139
  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;;;;;;;;;;;;;;;;;;;;;;;;;qCA4BD,MAAM;;;;;;;;;mDAYQ,MAAM;;;;;;0CASf,MAAM;;;;;;;qCAUX,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;sCAIP,MAAM;;;;;;qCASP,MAAM;gCAEX,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;qCA4BD,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"}
@@ -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: {
@@ -82,6 +82,7 @@ export declare namespace GetSubscriptionInfoByShortUuidCommand {
82
82
  happ: {
83
83
  cryptoLink: string;
84
84
  };
85
+ isFound: boolean;
85
86
  user: {
86
87
  username: string;
87
88
  shortUuid: string;
@@ -97,7 +98,6 @@ export declare namespace GetSubscriptionInfoByShortUuidCommand {
97
98
  isActive: boolean;
98
99
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
99
100
  };
100
- isFound: boolean;
101
101
  links: string[];
102
102
  ssConfLinks: Record<string, string>;
103
103
  }, {
@@ -105,6 +105,7 @@ export declare namespace GetSubscriptionInfoByShortUuidCommand {
105
105
  happ: {
106
106
  cryptoLink: string;
107
107
  };
108
+ isFound: boolean;
108
109
  user: {
109
110
  username: string;
110
111
  shortUuid: string;
@@ -120,7 +121,6 @@ export declare namespace GetSubscriptionInfoByShortUuidCommand {
120
121
  isActive: boolean;
121
122
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
122
123
  };
123
- isFound: boolean;
124
124
  links: string[];
125
125
  ssConfLinks: Record<string, string>;
126
126
  }>;
@@ -130,6 +130,7 @@ export declare namespace GetSubscriptionInfoByShortUuidCommand {
130
130
  happ: {
131
131
  cryptoLink: string;
132
132
  };
133
+ isFound: boolean;
133
134
  user: {
134
135
  username: string;
135
136
  shortUuid: string;
@@ -145,7 +146,6 @@ export declare namespace GetSubscriptionInfoByShortUuidCommand {
145
146
  isActive: boolean;
146
147
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
147
148
  };
148
- isFound: boolean;
149
149
  links: string[];
150
150
  ssConfLinks: Record<string, string>;
151
151
  };
@@ -155,6 +155,7 @@ export declare namespace GetSubscriptionInfoByShortUuidCommand {
155
155
  happ: {
156
156
  cryptoLink: string;
157
157
  };
158
+ isFound: boolean;
158
159
  user: {
159
160
  username: string;
160
161
  shortUuid: string;
@@ -170,7 +171,6 @@ export declare namespace GetSubscriptionInfoByShortUuidCommand {
170
171
  isActive: boolean;
171
172
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
172
173
  };
173
- isFound: boolean;
174
174
  links: string[];
175
175
  ssConfLinks: Record<string, string>;
176
176
  };
@@ -1 +1 @@
1
- {"version":3,"file":"get-subscription-info-by-short-uuid.command.d.ts","sourceRoot":"","sources":["../../../../commands/subscription/get-subscription-info-by-short-uuid.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,yBAAiB,qCAAqC,CAAC;IAC5C,MAAM,GAAG,+BAAiC,CAAC;IAC3C,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA0BzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"get-subscription-info-by-short-uuid.command.d.ts","sourceRoot":"","sources":["../../../../commands/subscription/get-subscription-info-by-short-uuid.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,qCAAqC,CAAC;IAC5C,MAAM,GAAG,+BAAiC,CAAC;IAC3C,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -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, constants_2.getEndpointDetails)(api_1.SUBSCRIPTION_ROUTES.GET_INFO(':shortUuid'), 'get', 'Get Subscription Info by Short UUID');
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: zod_1.z.object({
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 = {}));
@@ -64,6 +64,7 @@ export declare namespace GetAllSubscriptionsCommand {
64
64
  subscriptionUrl: z.ZodString;
65
65
  }, "strip", z.ZodTypeAny, {
66
66
  subscriptionUrl: string;
67
+ isFound: boolean;
67
68
  user: {
68
69
  username: string;
69
70
  shortUuid: string;
@@ -75,11 +76,11 @@ export declare namespace GetAllSubscriptionsCommand {
75
76
  isActive: boolean;
76
77
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
77
78
  };
78
- isFound: boolean;
79
79
  links: string[];
80
80
  ssConfLinks: Record<string, string>;
81
81
  }, {
82
82
  subscriptionUrl: string;
83
+ isFound: boolean;
83
84
  user: {
84
85
  username: string;
85
86
  shortUuid: string;
@@ -91,7 +92,6 @@ export declare namespace GetAllSubscriptionsCommand {
91
92
  isActive: boolean;
92
93
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
93
94
  };
94
- isFound: boolean;
95
95
  links: string[];
96
96
  ssConfLinks: Record<string, string>;
97
97
  }>, "many">;
@@ -99,6 +99,7 @@ export declare namespace GetAllSubscriptionsCommand {
99
99
  }, "strip", z.ZodTypeAny, {
100
100
  subscriptions: {
101
101
  subscriptionUrl: string;
102
+ isFound: boolean;
102
103
  user: {
103
104
  username: string;
104
105
  shortUuid: string;
@@ -110,7 +111,6 @@ export declare namespace GetAllSubscriptionsCommand {
110
111
  isActive: boolean;
111
112
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
112
113
  };
113
- isFound: boolean;
114
114
  links: string[];
115
115
  ssConfLinks: Record<string, string>;
116
116
  }[];
@@ -118,6 +118,7 @@ export declare namespace GetAllSubscriptionsCommand {
118
118
  }, {
119
119
  subscriptions: {
120
120
  subscriptionUrl: string;
121
+ isFound: boolean;
121
122
  user: {
122
123
  username: string;
123
124
  shortUuid: string;
@@ -129,7 +130,6 @@ export declare namespace GetAllSubscriptionsCommand {
129
130
  isActive: boolean;
130
131
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
131
132
  };
132
- isFound: boolean;
133
133
  links: string[];
134
134
  ssConfLinks: Record<string, string>;
135
135
  }[];
@@ -139,6 +139,7 @@ export declare namespace GetAllSubscriptionsCommand {
139
139
  response: {
140
140
  subscriptions: {
141
141
  subscriptionUrl: string;
142
+ isFound: boolean;
142
143
  user: {
143
144
  username: string;
144
145
  shortUuid: string;
@@ -150,7 +151,6 @@ export declare namespace GetAllSubscriptionsCommand {
150
151
  isActive: boolean;
151
152
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
152
153
  };
153
- isFound: boolean;
154
154
  links: string[];
155
155
  ssConfLinks: Record<string, string>;
156
156
  }[];
@@ -160,6 +160,7 @@ export declare namespace GetAllSubscriptionsCommand {
160
160
  response: {
161
161
  subscriptions: {
162
162
  subscriptionUrl: string;
163
+ isFound: boolean;
163
164
  user: {
164
165
  username: string;
165
166
  shortUuid: string;
@@ -171,7 +172,6 @@ export declare namespace GetAllSubscriptionsCommand {
171
172
  isActive: boolean;
172
173
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
173
174
  };
174
- isFound: boolean;
175
175
  links: string[];
176
176
  ssConfLinks: Record<string, string>;
177
177
  }[];
@@ -0,0 +1,180 @@
1
+ import { z } from 'zod';
2
+ export declare namespace GetSubscriptionByShortUuidProtectedCommand {
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
+ 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-short-uuid-protected.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-subscription-by-short-uuid-protected.command.d.ts","sourceRoot":"","sources":["../../../../../commands/subscriptions/get-by/get-subscription-by-short-uuid-protected.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,0CAA0C,CAAC;IACjD,MAAM,GAAG,+BAA2C,CAAC;IACrD,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,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.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 = {}));
@@ -19,6 +19,10 @@ export declare namespace GetSubscriptionByUsernameCommand {
19
19
  daysLeft: z.ZodNumber;
20
20
  trafficUsed: z.ZodString;
21
21
  trafficLimit: z.ZodString;
22
+ lifetimeTrafficUsed: z.ZodString;
23
+ trafficUsedBytes: z.ZodString;
24
+ trafficLimitBytes: z.ZodString;
25
+ lifetimeTrafficUsedBytes: z.ZodString;
22
26
  username: z.ZodString;
23
27
  expiresAt: z.ZodEffects<z.ZodString, Date, string>;
24
28
  isActive: z.ZodBoolean;
@@ -37,20 +41,28 @@ export declare namespace GetSubscriptionByUsernameCommand {
37
41
  }, "strip", z.ZodTypeAny, {
38
42
  username: string;
39
43
  shortUuid: string;
44
+ trafficLimitBytes: string;
40
45
  trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
46
+ trafficUsedBytes: string;
41
47
  daysLeft: number;
42
48
  trafficUsed: string;
43
49
  trafficLimit: string;
50
+ lifetimeTrafficUsed: string;
51
+ lifetimeTrafficUsedBytes: string;
44
52
  expiresAt: Date;
45
53
  isActive: boolean;
46
54
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
47
55
  }, {
48
56
  username: string;
49
57
  shortUuid: string;
58
+ trafficLimitBytes: string;
50
59
  trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
60
+ trafficUsedBytes: string;
51
61
  daysLeft: number;
52
62
  trafficUsed: string;
53
63
  trafficLimit: string;
64
+ lifetimeTrafficUsed: string;
65
+ lifetimeTrafficUsedBytes: string;
54
66
  expiresAt: string;
55
67
  isActive: boolean;
56
68
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
@@ -58,72 +70,107 @@ export declare namespace GetSubscriptionByUsernameCommand {
58
70
  links: z.ZodArray<z.ZodString, "many">;
59
71
  ssConfLinks: z.ZodRecord<z.ZodString, z.ZodString>;
60
72
  subscriptionUrl: z.ZodString;
73
+ happ: z.ZodObject<{
74
+ cryptoLink: z.ZodString;
75
+ }, "strip", z.ZodTypeAny, {
76
+ cryptoLink: string;
77
+ }, {
78
+ cryptoLink: string;
79
+ }>;
61
80
  }, "strip", z.ZodTypeAny, {
62
81
  subscriptionUrl: string;
82
+ happ: {
83
+ cryptoLink: string;
84
+ };
85
+ isFound: boolean;
63
86
  user: {
64
87
  username: string;
65
88
  shortUuid: string;
89
+ trafficLimitBytes: string;
66
90
  trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
91
+ trafficUsedBytes: string;
67
92
  daysLeft: number;
68
93
  trafficUsed: string;
69
94
  trafficLimit: string;
95
+ lifetimeTrafficUsed: string;
96
+ lifetimeTrafficUsedBytes: string;
70
97
  expiresAt: Date;
71
98
  isActive: boolean;
72
99
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
73
100
  };
74
- isFound: boolean;
75
101
  links: string[];
76
102
  ssConfLinks: Record<string, string>;
77
103
  }, {
78
104
  subscriptionUrl: string;
105
+ happ: {
106
+ cryptoLink: string;
107
+ };
108
+ isFound: boolean;
79
109
  user: {
80
110
  username: string;
81
111
  shortUuid: string;
112
+ trafficLimitBytes: string;
82
113
  trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
114
+ trafficUsedBytes: string;
83
115
  daysLeft: number;
84
116
  trafficUsed: string;
85
117
  trafficLimit: string;
118
+ lifetimeTrafficUsed: string;
119
+ lifetimeTrafficUsedBytes: string;
86
120
  expiresAt: string;
87
121
  isActive: boolean;
88
122
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
89
123
  };
90
- isFound: boolean;
91
124
  links: string[];
92
125
  ssConfLinks: Record<string, string>;
93
126
  }>;
94
127
  }, "strip", z.ZodTypeAny, {
95
128
  response: {
96
129
  subscriptionUrl: string;
130
+ happ: {
131
+ cryptoLink: string;
132
+ };
133
+ isFound: boolean;
97
134
  user: {
98
135
  username: string;
99
136
  shortUuid: string;
137
+ trafficLimitBytes: string;
100
138
  trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
139
+ trafficUsedBytes: string;
101
140
  daysLeft: number;
102
141
  trafficUsed: string;
103
142
  trafficLimit: string;
143
+ lifetimeTrafficUsed: string;
144
+ lifetimeTrafficUsedBytes: string;
104
145
  expiresAt: Date;
105
146
  isActive: boolean;
106
147
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
107
148
  };
108
- isFound: boolean;
109
149
  links: string[];
110
150
  ssConfLinks: Record<string, string>;
111
151
  };
112
152
  }, {
113
153
  response: {
114
154
  subscriptionUrl: string;
155
+ happ: {
156
+ cryptoLink: string;
157
+ };
158
+ isFound: boolean;
115
159
  user: {
116
160
  username: string;
117
161
  shortUuid: string;
162
+ trafficLimitBytes: string;
118
163
  trafficLimitStrategy: "MONTH" | "NO_RESET" | "DAY" | "WEEK";
164
+ trafficUsedBytes: string;
119
165
  daysLeft: number;
120
166
  trafficUsed: string;
121
167
  trafficLimit: string;
168
+ lifetimeTrafficUsed: string;
169
+ lifetimeTrafficUsedBytes: string;
122
170
  expiresAt: string;
123
171
  isActive: boolean;
124
172
  userStatus: "DISABLED" | "LIMITED" | "EXPIRED" | "ACTIVE";
125
173
  };
126
- isFound: boolean;
127
174
  links: string[];
128
175
  ssConfLinks: Record<string, string>;
129
176
  };
@@ -1 +1 @@
1
- {"version":3,"file":"get-subscription-by-username.command.d.ts","sourceRoot":"","sources":["../../../../../commands/subscriptions/get-by/get-subscription-by-username.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,gCAAgC,CAAC;IACvC,MAAM,GAAG,8BAAyC,CAAC;IACnD,MAAM,OAAO,QAAmB,CAAC;IAEjC,MAAM,eAAe,8CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAqBzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"get-subscription-by-username.command.d.ts","sourceRoot":"","sources":["../../../../../commands/subscriptions/get-by/get-subscription-by-username.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,gCAAgC,CAAC;IACvC,MAAM,GAAG,8BAAyC,CAAC;IACnD,MAAM,OAAO,QAAmB,CAAC;IAEjC,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"}
@@ -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: zod_1.z.object({
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 = {}));