@long2ice/relayx-backend 0.0.1

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 (88) hide show
  1. package/README.md +13 -0
  2. package/dist/app.d.ts +8592 -0
  3. package/dist/bullmq/index.d.ts +1 -0
  4. package/dist/bullmq/jobs.d.ts +34 -0
  5. package/dist/bullmq/queue.d.ts +6 -0
  6. package/dist/bullmq/queuedash.d.ts +12 -0
  7. package/dist/bullmq/worker.d.ts +1 -0
  8. package/dist/config.d.ts +16 -0
  9. package/dist/db.d.ts +3 -0
  10. package/dist/generated/prisma/zod/index.d.ts +2289 -0
  11. package/dist/index.d.ts +1 -0
  12. package/dist/middlewares/auth.d.ts +3 -0
  13. package/dist/middlewares/ip.d.ts +2 -0
  14. package/dist/middlewares/license.d.ts +2 -0
  15. package/dist/middlewares/plan.d.ts +2 -0
  16. package/dist/routes/admin/license.d.ts +90 -0
  17. package/dist/routes/admin/node.d.ts +919 -0
  18. package/dist/routes/admin/node_group.d.ts +2115 -0
  19. package/dist/routes/admin/pay.d.ts +261 -0
  20. package/dist/routes/admin/plan.d.ts +198 -0
  21. package/dist/routes/admin/plan_coupon.d.ts +92 -0
  22. package/dist/routes/admin/stats.d.ts +77 -0
  23. package/dist/routes/admin/system_config.d.ts +68 -0
  24. package/dist/routes/admin/ticket.d.ts +113 -0
  25. package/dist/routes/admin/topup.d.ts +88 -0
  26. package/dist/routes/admin/topup_activity.d.ts +84 -0
  27. package/dist/routes/admin/tunnel.d.ts +566 -0
  28. package/dist/routes/admin/user.d.ts +299 -0
  29. package/dist/routes/admin/user_plan.d.ts +109 -0
  30. package/dist/routes/bot.d.ts +13 -0
  31. package/dist/routes/dns_provider.d.ts +240 -0
  32. package/dist/routes/health.d.ts +3 -0
  33. package/dist/routes/in_node_group_dns.d.ts +132 -0
  34. package/dist/routes/license.d.ts +50 -0
  35. package/dist/routes/node.d.ts +148 -0
  36. package/dist/routes/node_group.d.ts +1498 -0
  37. package/dist/routes/pay.d.ts +34 -0
  38. package/dist/routes/plan.d.ts +148 -0
  39. package/dist/routes/plan_coupon.d.ts +22 -0
  40. package/dist/routes/system_config.d.ts +87 -0
  41. package/dist/routes/ticket.d.ts +129 -0
  42. package/dist/routes/topup.d.ts +93 -0
  43. package/dist/routes/tunnel.d.ts +742 -0
  44. package/dist/routes/user.d.ts +293 -0
  45. package/dist/schemas/context.d.ts +9 -0
  46. package/dist/schemas/license.d.ts +7 -0
  47. package/dist/schemas/request.d.ts +1181 -0
  48. package/dist/schemas/response.d.ts +2439 -0
  49. package/dist/schemas/socket.io.d.ts +33 -0
  50. package/dist/schemas/tunnel.d.ts +10 -0
  51. package/dist/services/dns/cloudflare.d.ts +12 -0
  52. package/dist/services/dns/huawei.d.ts +12 -0
  53. package/dist/services/dns/index.d.ts +4 -0
  54. package/dist/services/dns/interface.d.ts +8 -0
  55. package/dist/services/dns_provider.d.ts +46 -0
  56. package/dist/services/email.d.ts +11 -0
  57. package/dist/services/fernet.d.ts +2 -0
  58. package/dist/services/in_node_group_dns.d.ts +65 -0
  59. package/dist/services/license.d.ts +87 -0
  60. package/dist/services/logger.d.ts +7 -0
  61. package/dist/services/node.d.ts +39 -0
  62. package/dist/services/node_group.d.ts +75 -0
  63. package/dist/services/notify.d.ts +44 -0
  64. package/dist/services/order.d.ts +3 -0
  65. package/dist/services/pay.d.ts +6 -0
  66. package/dist/services/plan.d.ts +119 -0
  67. package/dist/services/plan_coupon.d.ts +16 -0
  68. package/dist/services/redis.d.ts +59 -0
  69. package/dist/services/stackauth.d.ts +25 -0
  70. package/dist/services/sysinfo.d.ts +7 -0
  71. package/dist/services/system_config.d.ts +7 -0
  72. package/dist/services/telegram.d.ts +8 -0
  73. package/dist/services/ticket.d.ts +134 -0
  74. package/dist/services/topup.d.ts +37 -0
  75. package/dist/services/topup_activity.d.ts +21 -0
  76. package/dist/services/tunnel.d.ts +1235 -0
  77. package/dist/services/user.d.ts +25 -0
  78. package/dist/socket-io/events.d.ts +13 -0
  79. package/dist/socket-io/handlers/disconnect.d.ts +2 -0
  80. package/dist/socket-io/handlers/listen.d.ts +3 -0
  81. package/dist/socket-io/handlers/register.d.ts +2 -0
  82. package/dist/socket-io/handlers/sysinfo.d.ts +2 -0
  83. package/dist/socket-io/index.d.ts +3 -0
  84. package/dist/socket-io/utils.d.ts +8 -0
  85. package/dist/utils/date.d.ts +1 -0
  86. package/dist/utils/ip.d.ts +2 -0
  87. package/dist/utils/uuid.d.ts +1 -0
  88. package/package.json +82 -0
@@ -0,0 +1,132 @@
1
+ import { Variables } from "../schemas/context";
2
+ declare const app: import("hono/hono-base").HonoBase<{
3
+ Variables: Variables;
4
+ }, {
5
+ "/": {
6
+ $get: {
7
+ input: {
8
+ query: {
9
+ status?: string | string[] | undefined;
10
+ in_node_group_id?: string | string[] | undefined;
11
+ dns_provider_id?: string | string[] | undefined;
12
+ sort?: string | string[] | undefined;
13
+ page?: string | string[] | undefined;
14
+ perPage?: string | string[] | undefined;
15
+ };
16
+ };
17
+ output: {
18
+ data: {
19
+ in_node_group: {
20
+ name: string;
21
+ id: number;
22
+ connect_ip: string | null;
23
+ nodes: {
24
+ id: number;
25
+ node_id: string;
26
+ custom_line: string | null;
27
+ dns_status: boolean;
28
+ }[];
29
+ };
30
+ dns_provider: {
31
+ name: string;
32
+ id: number;
33
+ type: import("../generated/prisma/client").$Enums.DNSProviderType;
34
+ };
35
+ id: number;
36
+ created_at: string;
37
+ updated_at: string;
38
+ status: import("../generated/prisma/client").$Enums.Status;
39
+ in_node_group_id: number;
40
+ ipv6: boolean;
41
+ dns_provider_id: number;
42
+ ttl: number;
43
+ }[];
44
+ total: number;
45
+ };
46
+ outputFormat: "json";
47
+ status: import("hono/utils/http-status").ContentfulStatusCode;
48
+ };
49
+ };
50
+ } & {
51
+ "/dns_providers": {
52
+ $get: {
53
+ input: {};
54
+ output: {
55
+ name: string;
56
+ id: number;
57
+ type: import("../generated/prisma/client").$Enums.DNSProviderType;
58
+ }[];
59
+ outputFormat: "json";
60
+ status: import("hono/utils/http-status").ContentfulStatusCode;
61
+ };
62
+ };
63
+ } & {
64
+ "/": {
65
+ $post: {
66
+ input: {
67
+ json: {
68
+ in_node_group_id: number;
69
+ dns_provider_id: number;
70
+ status?: "active" | "inactive" | undefined;
71
+ ipv6?: boolean | undefined;
72
+ custom_line?: Record<string, string> | null | undefined;
73
+ ttl?: number | undefined;
74
+ };
75
+ };
76
+ output: null;
77
+ outputFormat: "body";
78
+ status: 204;
79
+ };
80
+ };
81
+ } & {
82
+ "/:id": {
83
+ $patch: {
84
+ input: {
85
+ param: {
86
+ id: string;
87
+ };
88
+ } & {
89
+ json: {
90
+ in_node_group_id: number;
91
+ dns_provider_id: number;
92
+ status?: "active" | "inactive" | undefined;
93
+ ipv6?: boolean | undefined;
94
+ custom_line?: Record<string, string> | null | undefined;
95
+ ttl?: number | undefined;
96
+ };
97
+ };
98
+ output: null;
99
+ outputFormat: "body";
100
+ status: 204;
101
+ };
102
+ };
103
+ } & {
104
+ "/": {
105
+ $delete: {
106
+ input: {
107
+ query: {
108
+ ids: string;
109
+ };
110
+ };
111
+ output: null;
112
+ outputFormat: "body";
113
+ status: 204;
114
+ };
115
+ };
116
+ } & {
117
+ "/:id/sync": {
118
+ $post: {
119
+ input: {
120
+ param: {
121
+ id: string;
122
+ };
123
+ };
124
+ output: {
125
+ synced: number;
126
+ };
127
+ outputFormat: "json";
128
+ status: import("hono/utils/http-status").ContentfulStatusCode;
129
+ };
130
+ };
131
+ }, "/">;
132
+ export default app;
@@ -0,0 +1,50 @@
1
+ import { CouponValidCycle, LicenseType } from "../services/license";
2
+ declare const app: import("hono/hono-base").HonoBase<import("hono/types").BlankEnv, {
3
+ "/": {
4
+ $get: {
5
+ input: {
6
+ query: {
7
+ force?: string | undefined;
8
+ };
9
+ };
10
+ output: {
11
+ expired_at: string | undefined;
12
+ created_at: string | undefined;
13
+ site_url: string | undefined;
14
+ type: "personal" | "business" | undefined;
15
+ };
16
+ outputFormat: "json";
17
+ status: import("hono/utils/http-status").ContentfulStatusCode;
18
+ };
19
+ };
20
+ } & {
21
+ "/notify": {
22
+ $get: {
23
+ input: {};
24
+ output: null;
25
+ outputFormat: "body";
26
+ status: 204;
27
+ };
28
+ };
29
+ } & {
30
+ "/coupon": {
31
+ $get: {
32
+ input: {
33
+ query: {
34
+ type: LicenseType;
35
+ coupon: string;
36
+ cycle: CouponValidCycle;
37
+ };
38
+ };
39
+ output: {
40
+ type: string;
41
+ value: number;
42
+ validType: string;
43
+ validCycle: string;
44
+ } | null;
45
+ outputFormat: "json";
46
+ status: import("hono/utils/http-status").ContentfulStatusCode;
47
+ };
48
+ };
49
+ }, "/">;
50
+ export default app;
@@ -0,0 +1,148 @@
1
+ import { Variables } from "../schemas/context";
2
+ declare const app: import("hono/hono-base").HonoBase<{
3
+ Variables: Variables;
4
+ }, {
5
+ "/": {
6
+ $get: {
7
+ input: {
8
+ query: {
9
+ node_type?: string | string[] | undefined;
10
+ status?: string | string[] | undefined;
11
+ node_id?: string | string[] | undefined;
12
+ version?: string | string[] | undefined;
13
+ backup?: string | string[] | undefined;
14
+ node_group_id?: string | string[] | undefined;
15
+ sort?: string | string[] | undefined;
16
+ ip?: string | string[] | undefined;
17
+ page?: string | string[] | undefined;
18
+ perPage?: string | string[] | undefined;
19
+ };
20
+ };
21
+ output: {
22
+ data: {
23
+ upgradeable: boolean;
24
+ last_active: any;
25
+ node_group: {
26
+ name: string;
27
+ node_type: import("../generated/prisma/client").$Enums.NodeType;
28
+ traffic_rate: number;
29
+ };
30
+ id: number;
31
+ connect_ip: string;
32
+ order_by: number;
33
+ created_at: string;
34
+ updated_at: string;
35
+ status: import("../generated/prisma/client").$Enums.Status;
36
+ weight: number;
37
+ node_id: string;
38
+ version: string;
39
+ backup: boolean;
40
+ custom_line: string | null;
41
+ dns_status: boolean;
42
+ node_group_id: number;
43
+ }[];
44
+ total: number;
45
+ };
46
+ outputFormat: "json";
47
+ status: import("hono/utils/http-status").ContentfulStatusCode;
48
+ };
49
+ };
50
+ } & {
51
+ "/": {
52
+ $delete: {
53
+ input: {
54
+ query: {
55
+ ids: string;
56
+ };
57
+ };
58
+ output: null;
59
+ outputFormat: "body";
60
+ status: 204;
61
+ };
62
+ };
63
+ } & {
64
+ "/:id": {
65
+ $patch: {
66
+ input: {
67
+ param: {
68
+ id: string;
69
+ };
70
+ } & {
71
+ json: {
72
+ status: "active" | "inactive";
73
+ weight: number;
74
+ backup: boolean;
75
+ };
76
+ };
77
+ output: null;
78
+ outputFormat: "body";
79
+ status: 204;
80
+ };
81
+ };
82
+ } & {
83
+ "/:id/order": {
84
+ $patch: {
85
+ input: {
86
+ param: {
87
+ id: string;
88
+ };
89
+ } & {
90
+ json: {
91
+ order_by: number;
92
+ };
93
+ };
94
+ output: null;
95
+ outputFormat: "body";
96
+ status: 204;
97
+ };
98
+ };
99
+ } & {
100
+ "/sysinfo/clean": {
101
+ $delete: {
102
+ input: {};
103
+ output: null;
104
+ outputFormat: "body";
105
+ status: 204;
106
+ };
107
+ };
108
+ } & {
109
+ "/upgrade": {
110
+ $post: {
111
+ input: {};
112
+ output: null;
113
+ outputFormat: "body";
114
+ status: 204;
115
+ };
116
+ };
117
+ } & {
118
+ "/check": {
119
+ $post: {
120
+ input: {
121
+ json: {
122
+ node_id: string;
123
+ };
124
+ };
125
+ output: null;
126
+ outputFormat: "body";
127
+ status: 204;
128
+ };
129
+ };
130
+ } & {
131
+ "/sysinfo": {
132
+ $get: {
133
+ input: {};
134
+ output: {
135
+ id: number;
136
+ name: string;
137
+ node_type: import("../generated/prisma/client").$Enums.NodeType;
138
+ sysinfo: {
139
+ node_id: number;
140
+ last_active: string;
141
+ }[] | undefined;
142
+ }[];
143
+ outputFormat: "json";
144
+ status: import("hono/utils/http-status").ContentfulStatusCode;
145
+ };
146
+ };
147
+ }, "/">;
148
+ export default app;