@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,34 @@
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
+ output: {
9
+ name: string;
10
+ id: number;
11
+ type: string | null;
12
+ fixed_fee: number | null;
13
+ percent_fee: number | null;
14
+ method: import("../generated/prisma/client").$Enums.PaymentMethod;
15
+ }[];
16
+ outputFormat: "json";
17
+ status: import("hono/utils/http-status").ContentfulStatusCode;
18
+ };
19
+ };
20
+ } & {
21
+ "/:id/callback": {
22
+ [x: `$${Lowercase<string>}`]: {
23
+ input: {
24
+ param: {
25
+ id: string;
26
+ };
27
+ };
28
+ output: string;
29
+ outputFormat: "text";
30
+ status: import("hono/utils/http-status").ContentfulStatusCode;
31
+ };
32
+ };
33
+ }, "/">;
34
+ 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
+ output: {
9
+ name: string;
10
+ id: number;
11
+ order_by: number;
12
+ created_at: string;
13
+ updated_at: string;
14
+ status: import("../generated/prisma/client").$Enums.Status;
15
+ ip_limit: number | null;
16
+ bandwidth_limit: number | null;
17
+ traffic: number | null;
18
+ price: number;
19
+ max_tunnels: number | null;
20
+ description: string | null;
21
+ original_price: number | null;
22
+ allow_custom_in_node_group: boolean;
23
+ allow_custom_out_node_group: boolean;
24
+ all_in_node_groups: boolean;
25
+ all_out_node_groups: boolean;
26
+ setup_fee: number | null;
27
+ billing_cycle: import("../generated/prisma/client").$Enums.BillingCycle;
28
+ renewable: boolean;
29
+ stock: number | null;
30
+ }[];
31
+ outputFormat: "json";
32
+ status: import("hono/utils/http-status").ContentfulStatusCode;
33
+ };
34
+ };
35
+ } & {
36
+ "/:id/detail": {
37
+ $get: {
38
+ input: {
39
+ param: {
40
+ id: string;
41
+ };
42
+ };
43
+ output: {
44
+ name: string;
45
+ id: number;
46
+ order_by: number;
47
+ created_at: string;
48
+ updated_at: string;
49
+ status: import("../generated/prisma/client").$Enums.Status;
50
+ ip_limit: number | null;
51
+ bandwidth_limit: number | null;
52
+ traffic: number | null;
53
+ price: number;
54
+ max_tunnels: number | null;
55
+ description: string | null;
56
+ original_price: number | null;
57
+ allow_custom_in_node_group: boolean;
58
+ allow_custom_out_node_group: boolean;
59
+ all_in_node_groups: boolean;
60
+ all_out_node_groups: boolean;
61
+ setup_fee: number | null;
62
+ billing_cycle: import("../generated/prisma/client").$Enums.BillingCycle;
63
+ renewable: boolean;
64
+ stock: number | null;
65
+ } | null;
66
+ outputFormat: "json";
67
+ status: import("hono/utils/http-status").ContentfulStatusCode;
68
+ };
69
+ };
70
+ } & {
71
+ "/:id/subscribe": {
72
+ $post: {
73
+ input: {
74
+ param: {
75
+ id: string;
76
+ };
77
+ } & {
78
+ query: {
79
+ code?: string | undefined;
80
+ };
81
+ };
82
+ output: null;
83
+ outputFormat: "body";
84
+ status: 201;
85
+ };
86
+ };
87
+ } & {
88
+ "/renew": {
89
+ $post: {
90
+ input: {};
91
+ output: null;
92
+ outputFormat: "body";
93
+ status: 201;
94
+ };
95
+ };
96
+ } & {
97
+ "/orders": {
98
+ $get: {
99
+ input: {
100
+ query: {
101
+ plan_id?: string | string[] | undefined;
102
+ sort?: string | string[] | undefined;
103
+ page?: string | string[] | undefined;
104
+ perPage?: string | string[] | undefined;
105
+ };
106
+ };
107
+ output: {
108
+ data: {
109
+ user: {
110
+ email: string;
111
+ };
112
+ plan: {
113
+ name: string;
114
+ price: number;
115
+ };
116
+ coupon: {
117
+ type: import("../generated/prisma/client").$Enums.CouponType;
118
+ value: number;
119
+ } | null;
120
+ id: number;
121
+ created_at: string;
122
+ updated_at: string;
123
+ user_id: number;
124
+ balance: number;
125
+ plan_id: number;
126
+ price: number;
127
+ coupon_id: number | null;
128
+ }[];
129
+ total: number;
130
+ };
131
+ outputFormat: "json";
132
+ status: import("hono/utils/http-status").ContentfulStatusCode;
133
+ };
134
+ };
135
+ } & {
136
+ "/summary": {
137
+ $get: {
138
+ input: {};
139
+ output: {
140
+ name: string;
141
+ id: number;
142
+ }[];
143
+ outputFormat: "json";
144
+ status: import("hono/utils/http-status").ContentfulStatusCode;
145
+ };
146
+ };
147
+ }, "/">;
148
+ export default app;
@@ -0,0 +1,22 @@
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
+ code: string;
10
+ cycle: "month" | "quarter" | "half_year" | "year" | "lifetime";
11
+ };
12
+ };
13
+ output: {
14
+ type: import("../generated/prisma/client").$Enums.CouponType;
15
+ value: number;
16
+ };
17
+ outputFormat: "json";
18
+ status: import("hono/utils/http-status").ContentfulStatusCode;
19
+ };
20
+ };
21
+ }, "/">;
22
+ export default app;
@@ -0,0 +1,87 @@
1
+ import { Variables } from "../schemas/context";
2
+ declare const app: import("hono/hono-base").HonoBase<{
3
+ Variables: Variables;
4
+ }, {
5
+ "/site": {
6
+ $get: {
7
+ input: {};
8
+ output: {
9
+ MIN_TOPUP_AMOUNT: string | number | boolean;
10
+ NOTICE: string | number | boolean;
11
+ NOTICE_POPUP: string | number | boolean;
12
+ NOTICE_POPUP_INTERVAL_HOURS: string | number | boolean;
13
+ SITE_NAME: string | number | boolean;
14
+ SITE_DESCRIPTION: string | number | boolean;
15
+ ALLOW_REGISTER: string | number | boolean;
16
+ LOGO_URL: string | number | boolean;
17
+ HIDE_NODE_STATUS: string | number | boolean;
18
+ AUTO_UPDATE_AGENT: string | number | boolean;
19
+ CHATWOOT_BASE_URL: string | number | boolean;
20
+ CHATWOOT_TOKEN: string | number | boolean;
21
+ TUNNEL_TRAFFIC_RETENTION_DAYS: string | number | boolean;
22
+ HIDE_FOOTER: string | number | boolean;
23
+ HIDE_DOCS: string | number | boolean;
24
+ LANDING_PAGE_URL: string | number | boolean;
25
+ REFERRAL_COMMISSION_RATE: string | number | boolean;
26
+ REFERRAL_FIRST_ONLY: string | number | boolean;
27
+ REFERRAL_MODE: string | number | boolean;
28
+ OBSERVER_PERIOD: string | number | boolean;
29
+ EMAIL_PROVIDER: string | number | boolean;
30
+ SMTP_HOST: string | number | boolean;
31
+ SMTP_PORT: string | number | boolean;
32
+ SMTP_SECURE: string | number | boolean;
33
+ SMTP_USER: string | number | boolean;
34
+ SMTP_PASS: string | number | boolean;
35
+ SMTP_FROM: string | number | boolean;
36
+ RESEND_API_KEY: string | number | boolean;
37
+ RESEND_FROM: string | number | boolean;
38
+ };
39
+ outputFormat: "json";
40
+ status: import("hono/utils/http-status").ContentfulStatusCode;
41
+ };
42
+ };
43
+ } & {
44
+ "/": {
45
+ $get: {
46
+ input: {
47
+ query: {
48
+ name: string;
49
+ };
50
+ };
51
+ output: {
52
+ MIN_TOPUP_AMOUNT: string | number | boolean;
53
+ NOTICE: string | number | boolean;
54
+ NOTICE_POPUP: string | number | boolean;
55
+ NOTICE_POPUP_INTERVAL_HOURS: string | number | boolean;
56
+ SITE_NAME: string | number | boolean;
57
+ SITE_DESCRIPTION: string | number | boolean;
58
+ ALLOW_REGISTER: string | number | boolean;
59
+ LOGO_URL: string | number | boolean;
60
+ HIDE_NODE_STATUS: string | number | boolean;
61
+ AUTO_UPDATE_AGENT: string | number | boolean;
62
+ CHATWOOT_BASE_URL: string | number | boolean;
63
+ CHATWOOT_TOKEN: string | number | boolean;
64
+ TUNNEL_TRAFFIC_RETENTION_DAYS: string | number | boolean;
65
+ HIDE_FOOTER: string | number | boolean;
66
+ HIDE_DOCS: string | number | boolean;
67
+ LANDING_PAGE_URL: string | number | boolean;
68
+ REFERRAL_COMMISSION_RATE: string | number | boolean;
69
+ REFERRAL_FIRST_ONLY: string | number | boolean;
70
+ REFERRAL_MODE: string | number | boolean;
71
+ OBSERVER_PERIOD: string | number | boolean;
72
+ EMAIL_PROVIDER: string | number | boolean;
73
+ SMTP_HOST: string | number | boolean;
74
+ SMTP_PORT: string | number | boolean;
75
+ SMTP_SECURE: string | number | boolean;
76
+ SMTP_USER: string | number | boolean;
77
+ SMTP_PASS: string | number | boolean;
78
+ SMTP_FROM: string | number | boolean;
79
+ RESEND_API_KEY: string | number | boolean;
80
+ RESEND_FROM: string | number | boolean;
81
+ };
82
+ outputFormat: "json";
83
+ status: import("hono/utils/http-status").ContentfulStatusCode;
84
+ };
85
+ };
86
+ }, "/">;
87
+ export default app;
@@ -0,0 +1,129 @@
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
+ sort?: string | string[] | undefined;
11
+ page?: string | string[] | undefined;
12
+ perPage?: string | string[] | undefined;
13
+ };
14
+ };
15
+ output: {
16
+ data: {
17
+ id: number;
18
+ created_at: string;
19
+ updated_at: string;
20
+ user_id: number;
21
+ status: import("../generated/prisma/client").$Enums.TicketStatus;
22
+ title: string;
23
+ content: string;
24
+ }[];
25
+ total: number;
26
+ };
27
+ outputFormat: "json";
28
+ status: import("hono/utils/http-status").ContentfulStatusCode;
29
+ };
30
+ };
31
+ } & {
32
+ "/": {
33
+ $post: {
34
+ input: {
35
+ json: {
36
+ title: string;
37
+ content: string;
38
+ };
39
+ };
40
+ output: {
41
+ id: number;
42
+ created_at: string;
43
+ updated_at: string;
44
+ user_id: number;
45
+ status: import("../generated/prisma/client").$Enums.TicketStatus;
46
+ title: string;
47
+ content: string;
48
+ };
49
+ outputFormat: "json";
50
+ status: 201;
51
+ };
52
+ };
53
+ } & {
54
+ "/:id": {
55
+ $get: {
56
+ input: {
57
+ param: {
58
+ id: string;
59
+ };
60
+ };
61
+ output: {
62
+ replies: {
63
+ user: {
64
+ email: string;
65
+ };
66
+ id: number;
67
+ created_at: string;
68
+ updated_at: string;
69
+ user_id: number;
70
+ content: string;
71
+ is_admin: boolean;
72
+ ticket_id: number;
73
+ }[];
74
+ id: number;
75
+ created_at: string;
76
+ updated_at: string;
77
+ user_id: number;
78
+ status: import("../generated/prisma/client").$Enums.TicketStatus;
79
+ title: string;
80
+ content: string;
81
+ };
82
+ outputFormat: "json";
83
+ status: import("hono/utils/http-status").ContentfulStatusCode;
84
+ };
85
+ };
86
+ } & {
87
+ "/:id": {
88
+ $patch: {
89
+ input: {
90
+ param: {
91
+ id: string;
92
+ };
93
+ } & {
94
+ json: {
95
+ status: "open" | "closed";
96
+ };
97
+ };
98
+ output: null;
99
+ outputFormat: "body";
100
+ status: 204;
101
+ };
102
+ };
103
+ } & {
104
+ "/:id/reply": {
105
+ $post: {
106
+ input: {
107
+ param: {
108
+ id: string;
109
+ };
110
+ } & {
111
+ json: {
112
+ content: string;
113
+ };
114
+ };
115
+ output: {
116
+ id: number;
117
+ created_at: string;
118
+ updated_at: string;
119
+ user_id: number;
120
+ content: string;
121
+ is_admin: boolean;
122
+ ticket_id: number;
123
+ };
124
+ outputFormat: "json";
125
+ status: 201;
126
+ };
127
+ };
128
+ }, "/">;
129
+ export default app;
@@ -0,0 +1,93 @@
1
+ import { Variables } from "../schemas/context";
2
+ declare const app: import("hono/hono-base").HonoBase<{
3
+ Variables: Variables;
4
+ }, {
5
+ "/activities": {
6
+ $get: {
7
+ input: {};
8
+ output: {
9
+ id: number;
10
+ created_at: string;
11
+ updated_at: string;
12
+ type: import("../generated/prisma/client").$Enums.TopupActivityType;
13
+ value: number;
14
+ min_amount: number | null;
15
+ max_amount: number | null;
16
+ valid_start: string | null;
17
+ valid_end: string | null;
18
+ }[];
19
+ outputFormat: "json";
20
+ status: import("hono/utils/http-status").ContentfulStatusCode;
21
+ };
22
+ };
23
+ } & {
24
+ "/": {
25
+ $get: {
26
+ input: {
27
+ query: {
28
+ email?: string | string[] | undefined;
29
+ status?: string | string[] | undefined;
30
+ order_id?: string | string[] | undefined;
31
+ payment?: string | string[] | undefined;
32
+ sort?: string | string[] | undefined;
33
+ page?: string | string[] | undefined;
34
+ perPage?: string | string[] | undefined;
35
+ };
36
+ };
37
+ output: {
38
+ data: {
39
+ user: {
40
+ email: string;
41
+ };
42
+ payment: {
43
+ name: string;
44
+ };
45
+ id: number;
46
+ created_at: string;
47
+ updated_at: string;
48
+ user_id: number;
49
+ balance: number;
50
+ status: import("../generated/prisma/client").$Enums.TopupOrderStatus;
51
+ price: number;
52
+ bonus: number;
53
+ payment_id: number;
54
+ pay_url: string;
55
+ order_id: string;
56
+ trade_id: string | null;
57
+ }[];
58
+ total: number;
59
+ };
60
+ outputFormat: "json";
61
+ status: import("hono/utils/http-status").ContentfulStatusCode;
62
+ };
63
+ };
64
+ } & {
65
+ "/": {
66
+ $post: {
67
+ input: {
68
+ json: {
69
+ price: number;
70
+ payment_id: number;
71
+ redirect_url: string;
72
+ };
73
+ };
74
+ output: {};
75
+ outputFormat: "json";
76
+ status: import("hono/utils/http-status").ContentfulStatusCode;
77
+ };
78
+ };
79
+ } & {
80
+ "/:id/cancel": {
81
+ $patch: {
82
+ input: {
83
+ param: {
84
+ id: string;
85
+ };
86
+ };
87
+ output: null;
88
+ outputFormat: "body";
89
+ status: 204;
90
+ };
91
+ };
92
+ }, "/">;
93
+ export default app;