@remnawave/backend-contract 0.0.57 → 0.0.60
Sign up to get free protection for your applications and to get access to all the features.
- package/build/backend/api/controllers/api-tokens.d.ts +7 -0
- package/build/backend/api/controllers/api-tokens.d.ts.map +1 -0
- package/build/backend/api/controllers/auth.d.ts +5 -0
- package/build/backend/api/controllers/auth.d.ts.map +1 -0
- package/build/backend/api/controllers/hosts.d.ts +10 -0
- package/build/backend/api/controllers/hosts.d.ts.map +1 -0
- package/build/backend/api/controllers/inbounds.d.ts +5 -0
- package/build/backend/api/controllers/inbounds.d.ts.map +1 -0
- package/{api/controllers/index.ts → build/backend/api/controllers/index.d.ts} +1 -0
- package/build/backend/api/controllers/index.d.ts.map +1 -0
- package/build/backend/api/controllers/keygen.d.ts +5 -0
- package/build/backend/api/controllers/keygen.d.ts.map +1 -0
- package/build/backend/api/controllers/nodes.d.ts +13 -0
- package/build/backend/api/controllers/nodes.d.ts.map +1 -0
- package/build/backend/api/controllers/subscription.d.ts +6 -0
- package/build/backend/api/controllers/subscription.d.ts.map +1 -0
- package/build/backend/api/controllers/system.d.ts +9 -0
- package/build/backend/api/controllers/system.d.ts.map +1 -0
- package/build/backend/api/controllers/users.d.ts +15 -0
- package/build/backend/api/controllers/users.d.ts.map +1 -0
- package/build/backend/api/controllers/xray.d.ts +6 -0
- package/build/backend/api/controllers/xray.d.ts.map +1 -0
- package/{api/index.ts → build/backend/api/index.d.ts} +1 -0
- package/build/backend/api/index.d.ts.map +1 -0
- package/build/backend/api/routes.d.ts +63 -0
- package/build/backend/api/routes.d.ts.map +1 -0
- package/build/backend/commands/api-tokens/create.command.d.ts +40 -0
- package/build/backend/commands/api-tokens/create.command.d.ts.map +1 -0
- package/build/backend/commands/api-tokens/delete.command.d.ts +22 -0
- package/build/backend/commands/api-tokens/delete.command.d.ts.map +1 -0
- package/build/backend/commands/api-tokens/find.command.d.ts +49 -0
- package/build/backend/commands/api-tokens/find.command.d.ts.map +1 -0
- package/{commands/api-tokens/index.ts → build/backend/commands/api-tokens/index.d.ts} +1 -0
- package/build/backend/commands/api-tokens/index.d.ts.map +1 -0
- package/build/backend/commands/auth/index.d.ts +2 -0
- package/build/backend/commands/auth/index.d.ts.map +1 -0
- package/build/backend/commands/auth/login.command.d.ts +35 -0
- package/build/backend/commands/auth/login.command.d.ts.map +1 -0
- package/build/backend/commands/hosts/create.command.d.ts +122 -0
- package/build/backend/commands/hosts/create.command.d.ts.map +1 -0
- package/build/backend/commands/hosts/delete.command.d.ts +32 -0
- package/build/backend/commands/hosts/delete.command.d.ts.map +1 -0
- package/build/backend/commands/hosts/get-all.command.d.ts +84 -0
- package/build/backend/commands/hosts/get-all.command.d.ts.map +1 -0
- package/{commands/hosts/index.ts → build/backend/commands/hosts/index.d.ts} +1 -0
- package/build/backend/commands/hosts/index.d.ts.map +1 -0
- package/build/backend/commands/hosts/reorder.command.d.ts +58 -0
- package/build/backend/commands/hosts/reorder.command.d.ts.map +1 -0
- package/build/backend/commands/hosts/update.command.d.ts +138 -0
- package/build/backend/commands/hosts/update.command.d.ts.map +1 -0
- package/build/backend/commands/inbounds/get-inbounds.command.d.ts +34 -0
- package/build/backend/commands/inbounds/get-inbounds.command.d.ts.map +1 -0
- package/{commands/inbounds/index.ts → build/backend/commands/inbounds/index.d.ts} +1 -0
- package/build/backend/commands/inbounds/index.d.ts.map +1 -0
- package/{commands/index.ts → build/backend/commands/index.d.ts} +1 -0
- package/build/backend/commands/index.d.ts.map +1 -0
- package/build/backend/commands/keygen/get-pubkey.command.d.ts +24 -0
- package/build/backend/commands/keygen/get-pubkey.command.d.ts.map +1 -0
- package/{commands/keygen/index.ts → build/backend/commands/keygen/index.d.ts} +1 -0
- package/build/backend/commands/keygen/index.d.ts.map +1 -0
- package/build/backend/commands/nodes/create.command.d.ts +155 -0
- package/build/backend/commands/nodes/create.command.d.ts.map +1 -0
- package/build/backend/commands/nodes/delete.command.d.ts +32 -0
- package/build/backend/commands/nodes/delete.command.d.ts.map +1 -0
- package/build/backend/commands/nodes/disable.command.d.ts +137 -0
- package/build/backend/commands/nodes/disable.command.d.ts.map +1 -0
- package/build/backend/commands/nodes/enable.command.d.ts +137 -0
- package/build/backend/commands/nodes/enable.command.d.ts.map +1 -0
- package/build/backend/commands/nodes/get-all.command.d.ts +129 -0
- package/build/backend/commands/nodes/get-all.command.d.ts.map +1 -0
- package/build/backend/commands/nodes/get-one.command.d.ts +137 -0
- package/build/backend/commands/nodes/get-one.command.d.ts.map +1 -0
- package/{commands/nodes/index.ts → build/backend/commands/nodes/index.d.ts} +1 -0
- package/build/backend/commands/nodes/index.d.ts.map +1 -0
- package/build/backend/commands/nodes/restart-all.command.d.ts +24 -0
- package/build/backend/commands/nodes/restart-all.command.d.ts.map +1 -0
- package/build/backend/commands/nodes/restart.command.d.ts +32 -0
- package/build/backend/commands/nodes/restart.command.d.ts.map +1 -0
- package/build/backend/commands/nodes/update.command.d.ts +180 -0
- package/build/backend/commands/nodes/update.command.d.ts.map +1 -0
- package/build/backend/commands/subscription/get-subscription-by-short-uuid.command.d.ts +14 -0
- package/build/backend/commands/subscription/get-subscription-by-short-uuid.command.d.ts.map +1 -0
- package/build/backend/commands/subscription/get-subscription-info-by-short-uuid.command.d.ts +100 -0
- package/build/backend/commands/subscription/get-subscription-info-by-short-uuid.command.d.ts.map +1 -0
- package/{commands/subscription/index.ts → build/backend/commands/subscription/index.d.ts} +1 -0
- package/build/backend/commands/subscription/index.d.ts.map +1 -0
- package/build/backend/commands/system/get-bandwidth-stats.command.d.ts +192 -0
- package/build/backend/commands/system/get-bandwidth-stats.command.d.ts.map +1 -0
- package/build/backend/commands/system/get-nodes-statistics.d.ts +60 -0
- package/build/backend/commands/system/get-nodes-statistics.d.ts.map +1 -0
- package/build/backend/commands/system/get-stats.command.d.ts +150 -0
- package/build/backend/commands/system/get-stats.command.d.ts.map +1 -0
- package/{commands/system/index.ts → build/backend/commands/system/index.d.ts} +1 -0
- package/build/backend/commands/system/index.d.ts.map +1 -0
- package/build/backend/commands/users/create-user.command.d.ts +191 -0
- package/build/backend/commands/users/create-user.command.d.ts.map +1 -0
- package/build/backend/commands/users/delete-user.command.d.ts +32 -0
- package/build/backend/commands/users/delete-user.command.d.ts.map +1 -0
- package/build/backend/commands/users/disable-user.command.ts.d.ts +155 -0
- package/build/backend/commands/users/disable-user.command.ts.d.ts.map +1 -0
- package/build/backend/commands/users/enable-user.command.d.ts +155 -0
- package/build/backend/commands/users/enable-user.command.d.ts.map +1 -0
- package/build/backend/commands/users/get-all-users-v2.command.d.ts +273 -0
- package/build/backend/commands/users/get-all-users-v2.command.d.ts.map +1 -0
- package/build/backend/commands/users/get-all-users.command.d.ts +247 -0
- package/build/backend/commands/users/get-all-users.command.d.ts.map +1 -0
- package/build/backend/commands/users/get-user-by-short-uuid.command.d.ts +155 -0
- package/build/backend/commands/users/get-user-by-short-uuid.command.d.ts.map +1 -0
- package/build/backend/commands/users/get-user-by-subscription-uuid.command.d.ts +155 -0
- package/build/backend/commands/users/get-user-by-subscription-uuid.command.d.ts.map +1 -0
- package/build/backend/commands/users/get-user-by-uuid.command.d.ts +155 -0
- package/build/backend/commands/users/get-user-by-uuid.command.d.ts.map +1 -0
- package/{commands/users/index.ts → build/backend/commands/users/index.d.ts} +1 -0
- package/build/backend/commands/users/index.d.ts.map +1 -0
- package/build/backend/commands/users/revoke-user-subscription.command.d.ts +155 -0
- package/build/backend/commands/users/revoke-user-subscription.command.d.ts.map +1 -0
- package/build/backend/commands/users/update-user.command.d.ts +202 -0
- package/build/backend/commands/users/update-user.command.d.ts.map +1 -0
- package/build/backend/commands/xray/get-config.command.d.ts +24 -0
- package/build/backend/commands/xray/get-config.command.d.ts.map +1 -0
- package/{commands/xray/index.ts → build/backend/commands/xray/index.d.ts} +1 -0
- package/build/backend/commands/xray/index.d.ts.map +1 -0
- package/build/backend/commands/xray/update-config.command.d.ts +26 -0
- package/build/backend/commands/xray/update-config.command.d.ts.map +1 -0
- package/build/backend/constants/errors/errors.d.ts +293 -0
- package/build/backend/constants/errors/errors.d.ts.map +1 -0
- package/build/backend/constants/errors/index.d.ts +2 -0
- package/build/backend/constants/errors/index.d.ts.map +1 -0
- package/build/backend/constants/events/events.d.ts +25 -0
- package/build/backend/constants/events/events.d.ts.map +1 -0
- package/build/backend/constants/events/index.d.ts +2 -0
- package/build/backend/constants/events/index.d.ts.map +1 -0
- package/build/backend/constants/hosts/alpn.d.ts +8 -0
- package/build/backend/constants/hosts/alpn.d.ts.map +1 -0
- package/build/backend/constants/hosts/fingerprints.d.ts +14 -0
- package/build/backend/constants/hosts/fingerprints.d.ts.map +1 -0
- package/{constants/hosts/index.ts → build/backend/constants/hosts/index.d.ts} +1 -0
- package/build/backend/constants/hosts/index.d.ts.map +1 -0
- package/{constants/index.ts → build/backend/constants/index.d.ts} +1 -0
- package/build/backend/constants/index.d.ts.map +1 -0
- package/build/backend/constants/nodes/cycle/cycle.d.ts +7 -0
- package/build/backend/constants/nodes/cycle/cycle.d.ts.map +1 -0
- package/build/backend/constants/nodes/cycle/index.d.ts +2 -0
- package/build/backend/constants/nodes/cycle/index.d.ts.map +1 -0
- package/{constants/nodes/index.ts → build/backend/constants/nodes/index.d.ts} +1 -0
- package/build/backend/constants/nodes/index.d.ts.map +1 -0
- package/{constants/nodes/status/index.ts → build/backend/constants/nodes/status/index.d.ts} +1 -0
- package/build/backend/constants/nodes/status/index.d.ts.map +1 -0
- package/build/backend/constants/nodes/status/status.constant.d.ts +8 -0
- package/build/backend/constants/nodes/status/status.constant.d.ts.map +1 -0
- package/build/backend/constants/roles/index.d.ts +2 -0
- package/build/backend/constants/roles/index.d.ts.map +1 -0
- package/build/backend/constants/roles/role.d.ts +7 -0
- package/build/backend/constants/roles/role.d.ts.map +1 -0
- package/{constants/templates/index.ts → build/backend/constants/templates/index.d.ts} +1 -0
- package/build/backend/constants/templates/index.d.ts.map +1 -0
- package/build/backend/constants/templates/template-keys.d.ts +3 -0
- package/build/backend/constants/templates/template-keys.d.ts.map +1 -0
- package/build/backend/constants/templates/user-statuses.d.ts +7 -0
- package/build/backend/constants/templates/user-statuses.d.ts.map +1 -0
- package/{constants/users/index.ts → build/backend/constants/users/index.d.ts} +1 -0
- package/build/backend/constants/users/index.d.ts.map +1 -0
- package/{constants/users/reset-periods/index.ts → build/backend/constants/users/reset-periods/index.d.ts} +1 -0
- package/build/backend/constants/users/reset-periods/index.d.ts.map +1 -0
- package/build/backend/constants/users/reset-periods/reset-periods.constant.d.ts +10 -0
- package/build/backend/constants/users/reset-periods/reset-periods.constant.d.ts.map +1 -0
- package/{constants/users/status/index.ts → build/backend/constants/users/status/index.d.ts} +1 -0
- package/build/backend/constants/users/status/index.d.ts.map +1 -0
- package/build/backend/constants/users/status/status.constant.d.ts +9 -0
- package/build/backend/constants/users/status/status.constant.d.ts.map +1 -0
- package/{index.ts → build/backend/index.d.ts} +1 -0
- package/build/backend/index.d.ts.map +1 -0
- package/build/backend/models/api-tokens.schema.d.ts +24 -0
- package/build/backend/models/api-tokens.schema.d.ts.map +1 -0
- package/build/backend/models/auth.schema.d.ts +9 -0
- package/build/backend/models/auth.schema.d.ts.map +1 -0
- package/build/backend/models/base-stat.schema.d.ts +15 -0
- package/build/backend/models/base-stat.schema.d.ts.map +1 -0
- package/build/backend/models/hosts.schema.d.ts +45 -0
- package/build/backend/models/hosts.schema.d.ts.map +1 -0
- package/build/backend/models/inbounds.schema.d.ts +15 -0
- package/build/backend/models/inbounds.schema.d.ts.map +1 -0
- package/{models/index.ts → build/backend/models/index.d.ts} +1 -0
- package/build/backend/models/index.d.ts.map +1 -0
- package/build/backend/models/nodes.schema.d.ts +72 -0
- package/build/backend/models/nodes.schema.d.ts.map +1 -0
- package/build/backend/models/users.schema.d.ts +86 -0
- package/build/backend/models/users.schema.d.ts.map +1 -0
- package/build/frontend/api/controllers/api-tokens.js +9 -0
- package/build/frontend/api/controllers/auth.js +7 -0
- package/build/frontend/api/controllers/hosts.js +12 -0
- package/build/frontend/api/controllers/inbounds.js +7 -0
- package/build/frontend/api/controllers/index.js +26 -0
- package/build/frontend/api/controllers/keygen.js +7 -0
- package/{api/controllers/nodes.ts → build/frontend/api/controllers/nodes.js} +6 -5
- package/build/frontend/api/controllers/subscription.js +8 -0
- package/build/frontend/api/controllers/system.js +11 -0
- package/{api/controllers/users.ts → build/frontend/api/controllers/users.js} +6 -4
- package/build/frontend/api/controllers/xray.js +8 -0
- package/build/frontend/api/index.js +18 -0
- package/build/frontend/api/routes.js +99 -0
- package/build/frontend/commands/api-tokens/create.command.js +20 -0
- package/build/frontend/commands/api-tokens/delete.command.js +16 -0
- package/build/frontend/commands/api-tokens/find.command.js +14 -0
- package/build/frontend/commands/api-tokens/index.js +19 -0
- package/build/frontend/commands/auth/index.js +17 -0
- package/build/frontend/commands/auth/login.command.js +19 -0
- package/build/frontend/commands/hosts/create.command.js +45 -0
- package/build/frontend/commands/hosts/delete.command.js +18 -0
- package/build/frontend/commands/hosts/get-all.command.js +14 -0
- package/build/frontend/commands/hosts/index.js +21 -0
- package/build/frontend/commands/hosts/reorder.command.js +22 -0
- package/build/frontend/commands/hosts/update.command.js +52 -0
- package/build/frontend/commands/inbounds/get-inbounds.command.js +14 -0
- package/build/frontend/commands/inbounds/index.js +17 -0
- package/build/frontend/commands/index.js +26 -0
- package/build/frontend/commands/keygen/get-pubkey.command.js +15 -0
- package/build/frontend/commands/keygen/index.js +17 -0
- package/build/frontend/commands/nodes/create.command.js +31 -0
- package/build/frontend/commands/nodes/delete.command.js +18 -0
- package/build/frontend/commands/nodes/disable.command.js +17 -0
- package/build/frontend/commands/nodes/enable.command.js +17 -0
- package/build/frontend/commands/nodes/get-all.command.js +14 -0
- package/build/frontend/commands/nodes/get-one.command.js +17 -0
- package/build/frontend/commands/nodes/index.js +25 -0
- package/build/frontend/commands/nodes/restart-all.command.js +15 -0
- package/build/frontend/commands/nodes/restart.command.js +18 -0
- package/build/frontend/commands/nodes/update.command.js +31 -0
- package/build/frontend/commands/subscription/get-subscription-by-short-uuid.command.js +13 -0
- package/build/frontend/commands/subscription/get-subscription-info-by-short-uuid.command.js +29 -0
- package/build/frontend/commands/subscription/index.js +18 -0
- package/build/frontend/commands/system/get-bandwidth-stats.command.js +23 -0
- package/build/frontend/commands/system/get-nodes-statistics.js +22 -0
- package/build/frontend/commands/system/get-stats.command.js +37 -0
- package/build/frontend/commands/system/index.js +19 -0
- package/build/frontend/commands/users/create-user.command.js +111 -0
- package/build/frontend/commands/users/delete-user.command.js +18 -0
- package/build/frontend/commands/users/disable-user.command.ts.js +17 -0
- package/build/frontend/commands/users/enable-user.command.js +17 -0
- package/build/frontend/commands/users/get-all-users-v2.command.js +42 -0
- package/build/frontend/commands/users/get-all-users.command.js +49 -0
- package/build/frontend/commands/users/get-user-by-short-uuid.command.js +17 -0
- package/build/frontend/commands/users/get-user-by-subscription-uuid.command.js +17 -0
- package/build/frontend/commands/users/get-user-by-uuid.command.js +17 -0
- package/build/frontend/commands/users/index.js +27 -0
- package/build/frontend/commands/users/revoke-user-subscription.command.js +17 -0
- package/build/frontend/commands/users/update-user.command.js +57 -0
- package/build/frontend/commands/xray/get-config.command.js +15 -0
- package/build/frontend/commands/xray/index.js +18 -0
- package/build/frontend/commands/xray/update-config.command.js +16 -0
- package/{constants/errors/errors.ts → build/frontend/constants/errors/errors.js} +7 -5
- package/build/frontend/constants/errors/index.js +17 -0
- package/{constants/events/events.ts → build/frontend/constants/events/events.js} +4 -1
- package/build/frontend/constants/events/index.js +17 -0
- package/build/frontend/constants/hosts/alpn.js +9 -0
- package/build/frontend/constants/hosts/fingerprints.js +15 -0
- package/build/frontend/constants/hosts/index.js +18 -0
- package/build/frontend/constants/index.js +23 -0
- package/build/frontend/constants/nodes/cycle/cycle.js +8 -0
- package/build/frontend/constants/nodes/cycle/index.js +17 -0
- package/build/frontend/constants/nodes/index.js +18 -0
- package/build/frontend/constants/nodes/status/index.js +17 -0
- package/build/frontend/constants/nodes/status/status.constant.js +9 -0
- package/build/frontend/constants/roles/index.js +17 -0
- package/build/frontend/constants/roles/role.js +7 -0
- package/build/frontend/constants/templates/index.js +18 -0
- package/build/frontend/constants/templates/template-keys.js +10 -0
- package/build/frontend/constants/templates/user-statuses.js +9 -0
- package/build/frontend/constants/users/index.js +18 -0
- package/build/frontend/constants/users/reset-periods/index.js +17 -0
- package/build/frontend/constants/users/reset-periods/reset-periods.constant.js +11 -0
- package/build/frontend/constants/users/status/index.js +17 -0
- package/build/frontend/constants/users/status/status.constant.js +10 -0
- package/build/frontend/index.js +20 -0
- package/build/frontend/models/api-tokens.schema.js +12 -0
- package/build/frontend/models/auth.schema.js +7 -0
- package/build/frontend/models/base-stat.schema.js +9 -0
- package/build/frontend/models/hosts.schema.js +19 -0
- package/build/frontend/models/inbounds.schema.js +9 -0
- package/build/frontend/models/index.js +23 -0
- package/build/frontend/models/nodes.schema.js +28 -0
- package/build/frontend/models/users.schema.js +34 -0
- package/package.json +13 -5
- package/api/controllers/api-tokens.ts +0 -7
- package/api/controllers/auth.ts +0 -5
- package/api/controllers/hosts.ts +0 -10
- package/api/controllers/inbounds.ts +0 -5
- package/api/controllers/keygen.ts +0 -5
- package/api/controllers/subscription.ts +0 -6
- package/api/controllers/system.ts +0 -9
- package/api/controllers/xray.ts +0 -6
- package/api/routes.ts +0 -81
- package/commands/api-tokens/create.command.ts +0 -23
- package/commands/api-tokens/delete.command.ts +0 -19
- package/commands/api-tokens/find.command.ts +0 -14
- package/commands/auth/index.ts +0 -1
- package/commands/auth/login.command.ts +0 -21
- package/commands/hosts/create.command.ts +0 -49
- package/commands/hosts/delete.command.ts +0 -21
- package/commands/hosts/get-all.command.ts +0 -14
- package/commands/hosts/reorder.command.ts +0 -26
- package/commands/hosts/update.command.ts +0 -56
- package/commands/inbounds/get-inbounds.command.ts +0 -14
- package/commands/keygen/get-pubkey.command.ts +0 -15
- package/commands/nodes/create.command.ts +0 -40
- package/commands/nodes/delete.command.ts +0 -21
- package/commands/nodes/disable.command.ts +0 -20
- package/commands/nodes/enable.command.ts +0 -20
- package/commands/nodes/get-all.command.ts +0 -14
- package/commands/nodes/get-one.command.ts +0 -20
- package/commands/nodes/restart-all.command.ts +0 -14
- package/commands/nodes/restart.command.ts +0 -21
- package/commands/nodes/update.command.ts +0 -38
- package/commands/subscription/get-subscription-by-short-uuid.command.ts +0 -13
- package/commands/subscription/get-subscription-info-by-short-uuid.command.ts +0 -32
- package/commands/system/get-bandwidth-stats.command.ts +0 -26
- package/commands/system/get-nodes-statistics.ts +0 -27
- package/commands/system/get-stats.command.ts +0 -43
- package/commands/users/create-user.command.ts +0 -117
- package/commands/users/delete-user.command.ts +0 -20
- package/commands/users/disable-user.command.ts.ts +0 -19
- package/commands/users/enable-user.command.ts +0 -20
- package/commands/users/get-all-users-v2.command.ts +0 -62
- package/commands/users/get-all-users.command.ts +0 -62
- package/commands/users/get-user-by-short-uuid.command.ts +0 -20
- package/commands/users/get-user-by-subscription-uuid.command.ts +0 -20
- package/commands/users/get-user-by-uuid.command.ts +0 -20
- package/commands/users/revoke-user-subscription.command.ts +0 -20
- package/commands/users/update-user.command.ts +0 -60
- package/commands/xray/get-config.command.ts +0 -14
- package/commands/xray/update-config.command.ts +0 -19
- package/constants/errors/index.ts +0 -1
- package/constants/events/index.ts +0 -1
- package/constants/hosts/alpn.ts +0 -8
- package/constants/hosts/fingerprints.ts +0 -14
- package/constants/nodes/cycle/cycle.ts +0 -7
- package/constants/nodes/cycle/index.ts +0 -1
- package/constants/nodes/status/status.constant.ts +0 -8
- package/constants/roles/index.ts +0 -1
- package/constants/roles/role.ts +0 -7
- package/constants/templates/template-keys.ts +0 -8
- package/constants/templates/user-statuses.ts +0 -6
- package/constants/users/reset-periods/reset-periods.constant.ts +0 -10
- package/constants/users/status/status.constant.ts +0 -9
- package/models/api-tokens.schema.ts +0 -11
- package/models/auth.schema.ts +0 -5
- package/models/base-stat.schema.ts +0 -7
- package/models/hosts.schema.ts +0 -17
- package/models/inbounds.schema.ts +0 -7
- package/models/nodes.schema.ts +0 -28
- package/models/users.schema.ts +0 -38
- package/tsconfig.json +0 -103
- /package/build/{api → backend/api}/controllers/api-tokens.js +0 -0
- /package/build/{api → backend/api}/controllers/auth.js +0 -0
- /package/build/{api → backend/api}/controllers/hosts.js +0 -0
- /package/build/{api → backend/api}/controllers/inbounds.js +0 -0
- /package/build/{api → backend/api}/controllers/index.js +0 -0
- /package/build/{api → backend/api}/controllers/keygen.js +0 -0
- /package/build/{api → backend/api}/controllers/nodes.js +0 -0
- /package/build/{api → backend/api}/controllers/subscription.js +0 -0
- /package/build/{api → backend/api}/controllers/system.js +0 -0
- /package/build/{api → backend/api}/controllers/users.js +0 -0
- /package/build/{api → backend/api}/controllers/xray.js +0 -0
- /package/build/{api → backend/api}/index.js +0 -0
- /package/build/{api → backend/api}/routes.js +0 -0
- /package/build/{commands → backend/commands}/api-tokens/create.command.js +0 -0
- /package/build/{commands → backend/commands}/api-tokens/delete.command.js +0 -0
- /package/build/{commands → backend/commands}/api-tokens/find.command.js +0 -0
- /package/build/{commands → backend/commands}/api-tokens/index.js +0 -0
- /package/build/{commands → backend/commands}/auth/index.js +0 -0
- /package/build/{commands → backend/commands}/auth/login.command.js +0 -0
- /package/build/{commands → backend/commands}/hosts/create.command.js +0 -0
- /package/build/{commands → backend/commands}/hosts/delete.command.js +0 -0
- /package/build/{commands → backend/commands}/hosts/get-all.command.js +0 -0
- /package/build/{commands → backend/commands}/hosts/index.js +0 -0
- /package/build/{commands → backend/commands}/hosts/reorder.command.js +0 -0
- /package/build/{commands → backend/commands}/hosts/update.command.js +0 -0
- /package/build/{commands → backend/commands}/inbounds/get-inbounds.command.js +0 -0
- /package/build/{commands → backend/commands}/inbounds/index.js +0 -0
- /package/build/{commands → backend/commands}/index.js +0 -0
- /package/build/{commands → backend/commands}/keygen/get-pubkey.command.js +0 -0
- /package/build/{commands → backend/commands}/keygen/index.js +0 -0
- /package/build/{commands → backend/commands}/nodes/create.command.js +0 -0
- /package/build/{commands → backend/commands}/nodes/delete.command.js +0 -0
- /package/build/{commands → backend/commands}/nodes/disable.command.js +0 -0
- /package/build/{commands → backend/commands}/nodes/enable.command.js +0 -0
- /package/build/{commands → backend/commands}/nodes/get-all.command.js +0 -0
- /package/build/{commands → backend/commands}/nodes/get-one.command.js +0 -0
- /package/build/{commands → backend/commands}/nodes/index.js +0 -0
- /package/build/{commands → backend/commands}/nodes/restart-all.command.js +0 -0
- /package/build/{commands → backend/commands}/nodes/restart.command.js +0 -0
- /package/build/{commands → backend/commands}/nodes/update.command.js +0 -0
- /package/build/{commands → backend/commands}/subscription/get-subscription-by-short-uuid.command.js +0 -0
- /package/build/{commands → backend/commands}/subscription/get-subscription-info-by-short-uuid.command.js +0 -0
- /package/build/{commands → backend/commands}/subscription/index.js +0 -0
- /package/build/{commands → backend/commands}/system/get-bandwidth-stats.command.js +0 -0
- /package/build/{commands → backend/commands}/system/get-nodes-statistics.js +0 -0
- /package/build/{commands → backend/commands}/system/get-stats.command.js +0 -0
- /package/build/{commands → backend/commands}/system/index.js +0 -0
- /package/build/{commands → backend/commands}/users/create-user.command.js +0 -0
- /package/build/{commands → backend/commands}/users/delete-user.command.js +0 -0
- /package/build/{commands → backend/commands}/users/disable-user.command.ts.js +0 -0
- /package/build/{commands → backend/commands}/users/enable-user.command.js +0 -0
- /package/build/{commands → backend/commands}/users/get-all-users-v2.command.js +0 -0
- /package/build/{commands → backend/commands}/users/get-all-users.command.js +0 -0
- /package/build/{commands → backend/commands}/users/get-user-by-short-uuid.command.js +0 -0
- /package/build/{commands → backend/commands}/users/get-user-by-subscription-uuid.command.js +0 -0
- /package/build/{commands → backend/commands}/users/get-user-by-uuid.command.js +0 -0
- /package/build/{commands → backend/commands}/users/index.js +0 -0
- /package/build/{commands → backend/commands}/users/revoke-user-subscription.command.js +0 -0
- /package/build/{commands → backend/commands}/users/update-user.command.js +0 -0
- /package/build/{commands → backend/commands}/xray/get-config.command.js +0 -0
- /package/build/{commands → backend/commands}/xray/index.js +0 -0
- /package/build/{commands → backend/commands}/xray/update-config.command.js +0 -0
- /package/build/{constants → backend/constants}/errors/errors.js +0 -0
- /package/build/{constants → backend/constants}/errors/index.js +0 -0
- /package/build/{constants → backend/constants}/events/events.js +0 -0
- /package/build/{constants → backend/constants}/events/index.js +0 -0
- /package/build/{constants → backend/constants}/hosts/alpn.js +0 -0
- /package/build/{constants → backend/constants}/hosts/fingerprints.js +0 -0
- /package/build/{constants → backend/constants}/hosts/index.js +0 -0
- /package/build/{constants → backend/constants}/index.js +0 -0
- /package/build/{constants → backend/constants}/nodes/cycle/cycle.js +0 -0
- /package/build/{constants → backend/constants}/nodes/cycle/index.js +0 -0
- /package/build/{constants → backend/constants}/nodes/index.js +0 -0
- /package/build/{constants → backend/constants}/nodes/status/index.js +0 -0
- /package/build/{constants → backend/constants}/nodes/status/status.constant.js +0 -0
- /package/build/{constants → backend/constants}/roles/index.js +0 -0
- /package/build/{constants → backend/constants}/roles/role.js +0 -0
- /package/build/{constants → backend/constants}/templates/index.js +0 -0
- /package/build/{constants → backend/constants}/templates/template-keys.js +0 -0
- /package/build/{constants → backend/constants}/templates/user-statuses.js +0 -0
- /package/build/{constants → backend/constants}/users/index.js +0 -0
- /package/build/{constants → backend/constants}/users/reset-periods/index.js +0 -0
- /package/build/{constants → backend/constants}/users/reset-periods/reset-periods.constant.js +0 -0
- /package/build/{constants → backend/constants}/users/status/index.js +0 -0
- /package/build/{constants → backend/constants}/users/status/status.constant.js +0 -0
- /package/build/{index.js → backend/index.js} +0 -0
- /package/build/{models → backend/models}/api-tokens.schema.js +0 -0
- /package/build/{models → backend/models}/auth.schema.js +0 -0
- /package/build/{models → backend/models}/base-stat.schema.js +0 -0
- /package/build/{models → backend/models}/hosts.schema.js +0 -0
- /package/build/{models → backend/models}/inbounds.schema.js +0 -0
- /package/build/{models → backend/models}/index.js +0 -0
- /package/build/{models → backend/models}/nodes.schema.js +0 -0
- /package/build/{models → backend/models}/users.schema.js +0 -0
@@ -0,0 +1,25 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./create.command"), exports);
|
18
|
+
__exportStar(require("./delete.command"), exports);
|
19
|
+
__exportStar(require("./disable.command"), exports);
|
20
|
+
__exportStar(require("./enable.command"), exports);
|
21
|
+
__exportStar(require("./get-all.command"), exports);
|
22
|
+
__exportStar(require("./get-one.command"), exports);
|
23
|
+
__exportStar(require("./restart-all.command"), exports);
|
24
|
+
__exportStar(require("./restart.command"), exports);
|
25
|
+
__exportStar(require("./update.command"), exports);
|
@@ -0,0 +1,15 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.RestartAllNodesCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../api");
|
6
|
+
var RestartAllNodesCommand;
|
7
|
+
(function (RestartAllNodesCommand) {
|
8
|
+
RestartAllNodesCommand.url = api_1.REST_API.NODES.RESTART_ALL;
|
9
|
+
RestartAllNodesCommand.TSQ_url = RestartAllNodesCommand.url;
|
10
|
+
RestartAllNodesCommand.ResponseSchema = zod_1.z.object({
|
11
|
+
response: zod_1.z.object({
|
12
|
+
eventSent: zod_1.z.boolean(),
|
13
|
+
}),
|
14
|
+
});
|
15
|
+
})(RestartAllNodesCommand || (exports.RestartAllNodesCommand = RestartAllNodesCommand = {}));
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.RestartNodeCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../api");
|
6
|
+
var RestartNodeCommand;
|
7
|
+
(function (RestartNodeCommand) {
|
8
|
+
RestartNodeCommand.url = api_1.REST_API.NODES.RESTART;
|
9
|
+
RestartNodeCommand.TSQ_url = RestartNodeCommand.url(':uuid');
|
10
|
+
RestartNodeCommand.RequestSchema = zod_1.z.object({
|
11
|
+
uuid: zod_1.z.string().uuid(),
|
12
|
+
});
|
13
|
+
RestartNodeCommand.ResponseSchema = zod_1.z.object({
|
14
|
+
response: zod_1.z.object({
|
15
|
+
eventSent: zod_1.z.boolean(),
|
16
|
+
}),
|
17
|
+
});
|
18
|
+
})(RestartNodeCommand || (exports.RestartNodeCommand = RestartNodeCommand = {}));
|
@@ -0,0 +1,31 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.UpdateNodeCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../api");
|
6
|
+
const models_1 = require("../../models");
|
7
|
+
var UpdateNodeCommand;
|
8
|
+
(function (UpdateNodeCommand) {
|
9
|
+
UpdateNodeCommand.url = api_1.REST_API.NODES.UPDATE;
|
10
|
+
UpdateNodeCommand.TSQ_url = UpdateNodeCommand.url;
|
11
|
+
UpdateNodeCommand.RequestSchema = models_1.NodesSchema.pick({
|
12
|
+
uuid: true,
|
13
|
+
}).extend({
|
14
|
+
name: zod_1.z.optional(zod_1.z.string().min(5, 'Min. 5 characters')),
|
15
|
+
address: zod_1.z.optional(zod_1.z.string().min(2, 'Min. 2 characters')),
|
16
|
+
port: zod_1.z.optional(zod_1.z.number()),
|
17
|
+
isTrafficTrackingActive: zod_1.z.optional(zod_1.z.boolean()),
|
18
|
+
trafficLimitBytes: zod_1.z.optional(zod_1.z.number().min(0, 'Traffic limit must be greater than 0')),
|
19
|
+
notifyPercent: zod_1.z.optional(zod_1.z
|
20
|
+
.number()
|
21
|
+
.min(0, 'Notify percent must be greater than 0')
|
22
|
+
.max(100, 'Notify percent must be less than 100')),
|
23
|
+
trafficResetDay: zod_1.z.optional(zod_1.z
|
24
|
+
.number()
|
25
|
+
.min(1, 'Traffic reset day must be greater than 0')
|
26
|
+
.max(31, 'Traffic reset day must be less than 31')),
|
27
|
+
});
|
28
|
+
UpdateNodeCommand.ResponseSchema = zod_1.z.object({
|
29
|
+
response: models_1.NodesSchema,
|
30
|
+
});
|
31
|
+
})(UpdateNodeCommand || (exports.UpdateNodeCommand = UpdateNodeCommand = {}));
|
@@ -0,0 +1,13 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetSubscriptionByShortUuidCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../api");
|
6
|
+
var GetSubscriptionByShortUuidCommand;
|
7
|
+
(function (GetSubscriptionByShortUuidCommand) {
|
8
|
+
GetSubscriptionByShortUuidCommand.url = api_1.REST_API.SUBSCRIPTION.GET;
|
9
|
+
GetSubscriptionByShortUuidCommand.TSQ_url = GetSubscriptionByShortUuidCommand.url(':shortUuid');
|
10
|
+
GetSubscriptionByShortUuidCommand.RequestSchema = zod_1.z.object({
|
11
|
+
shortUuid: zod_1.z.string(),
|
12
|
+
});
|
13
|
+
})(GetSubscriptionByShortUuidCommand || (exports.GetSubscriptionByShortUuidCommand = GetSubscriptionByShortUuidCommand = {}));
|
@@ -0,0 +1,29 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetSubscriptionInfoByShortUuidCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../api");
|
6
|
+
const constants_1 = require("../../constants");
|
7
|
+
var GetSubscriptionInfoByShortUuidCommand;
|
8
|
+
(function (GetSubscriptionInfoByShortUuidCommand) {
|
9
|
+
GetSubscriptionInfoByShortUuidCommand.url = api_1.REST_API.SUBSCRIPTION.GET_INFO;
|
10
|
+
GetSubscriptionInfoByShortUuidCommand.TSQ_url = GetSubscriptionInfoByShortUuidCommand.url(':shortUuid');
|
11
|
+
GetSubscriptionInfoByShortUuidCommand.RequestSchema = zod_1.z.object({
|
12
|
+
shortUuid: zod_1.z.string(),
|
13
|
+
});
|
14
|
+
GetSubscriptionInfoByShortUuidCommand.ResponseSchema = zod_1.z.object({
|
15
|
+
response: zod_1.z.object({
|
16
|
+
isFound: zod_1.z.boolean(),
|
17
|
+
user: zod_1.z.object({
|
18
|
+
shortUuid: zod_1.z.string(),
|
19
|
+
daysLeft: zod_1.z.number(),
|
20
|
+
trafficUsed: zod_1.z.string(),
|
21
|
+
trafficLimit: zod_1.z.string(),
|
22
|
+
username: zod_1.z.string(),
|
23
|
+
expiresAt: zod_1.z.string().transform((str) => new Date(str)),
|
24
|
+
isActive: zod_1.z.boolean(),
|
25
|
+
userStatus: zod_1.z.enum([constants_1.USERS_STATUS_VALUES[0], ...constants_1.USERS_STATUS_VALUES]),
|
26
|
+
}),
|
27
|
+
}),
|
28
|
+
});
|
29
|
+
})(GetSubscriptionInfoByShortUuidCommand || (exports.GetSubscriptionInfoByShortUuidCommand = GetSubscriptionInfoByShortUuidCommand = {}));
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./get-subscription-by-short-uuid.command"), exports);
|
18
|
+
__exportStar(require("./get-subscription-info-by-short-uuid.command"), exports);
|
@@ -0,0 +1,23 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetBandwidthStatsCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../api");
|
6
|
+
const base_stat_schema_1 = require("../../models/base-stat.schema");
|
7
|
+
var GetBandwidthStatsCommand;
|
8
|
+
(function (GetBandwidthStatsCommand) {
|
9
|
+
GetBandwidthStatsCommand.url = api_1.REST_API.SYSTEM.BANDWIDTH;
|
10
|
+
GetBandwidthStatsCommand.TSQ_url = GetBandwidthStatsCommand.url;
|
11
|
+
GetBandwidthStatsCommand.RequestQuerySchema = zod_1.z.object({
|
12
|
+
tz: zod_1.z.string().optional(),
|
13
|
+
});
|
14
|
+
GetBandwidthStatsCommand.ResponseSchema = zod_1.z.object({
|
15
|
+
response: zod_1.z.object({
|
16
|
+
bandwidthLastTwoDays: base_stat_schema_1.BaseStatSchema,
|
17
|
+
bandwidthLastSevenDays: base_stat_schema_1.BaseStatSchema,
|
18
|
+
bandwidthLast30Days: base_stat_schema_1.BaseStatSchema,
|
19
|
+
bandwidthCalendarMonth: base_stat_schema_1.BaseStatSchema,
|
20
|
+
bandwidthCurrentYear: base_stat_schema_1.BaseStatSchema,
|
21
|
+
}),
|
22
|
+
});
|
23
|
+
})(GetBandwidthStatsCommand || (exports.GetBandwidthStatsCommand = GetBandwidthStatsCommand = {}));
|
@@ -0,0 +1,22 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetNodesStatisticsCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../api");
|
6
|
+
var GetNodesStatisticsCommand;
|
7
|
+
(function (GetNodesStatisticsCommand) {
|
8
|
+
GetNodesStatisticsCommand.url = api_1.REST_API.SYSTEM.NODES_STATISTIC;
|
9
|
+
GetNodesStatisticsCommand.TSQ_url = GetNodesStatisticsCommand.url;
|
10
|
+
GetNodesStatisticsCommand.RequestQuerySchema = zod_1.z.object({
|
11
|
+
tz: zod_1.z.string().optional(),
|
12
|
+
});
|
13
|
+
GetNodesStatisticsCommand.ResponseSchema = zod_1.z.object({
|
14
|
+
response: zod_1.z.object({
|
15
|
+
lastSevenDays: zod_1.z.array(zod_1.z.object({
|
16
|
+
nodeName: zod_1.z.string(),
|
17
|
+
date: zod_1.z.string(),
|
18
|
+
totalBytes: zod_1.z.string(),
|
19
|
+
})),
|
20
|
+
}),
|
21
|
+
});
|
22
|
+
})(GetNodesStatisticsCommand || (exports.GetNodesStatisticsCommand = GetNodesStatisticsCommand = {}));
|
@@ -0,0 +1,37 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetStatsCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../api");
|
6
|
+
const constants_1 = require("../../constants");
|
7
|
+
var GetStatsCommand;
|
8
|
+
(function (GetStatsCommand) {
|
9
|
+
GetStatsCommand.url = api_1.REST_API.SYSTEM.STATS;
|
10
|
+
GetStatsCommand.TSQ_url = GetStatsCommand.url;
|
11
|
+
GetStatsCommand.RequestQuerySchema = zod_1.z.object({
|
12
|
+
tz: zod_1.z.string().optional(),
|
13
|
+
});
|
14
|
+
GetStatsCommand.ResponseSchema = zod_1.z.object({
|
15
|
+
response: zod_1.z.object({
|
16
|
+
cpu: zod_1.z.object({
|
17
|
+
cores: zod_1.z.number(),
|
18
|
+
physicalCores: zod_1.z.number(),
|
19
|
+
}),
|
20
|
+
memory: zod_1.z.object({
|
21
|
+
total: zod_1.z.number(),
|
22
|
+
free: zod_1.z.number(),
|
23
|
+
used: zod_1.z.number(),
|
24
|
+
active: zod_1.z.number(),
|
25
|
+
available: zod_1.z.number(),
|
26
|
+
}),
|
27
|
+
uptime: zod_1.z.number(),
|
28
|
+
timestamp: zod_1.z.number(),
|
29
|
+
users: zod_1.z.object({
|
30
|
+
onlineLastMinute: zod_1.z.number(),
|
31
|
+
statusCounts: zod_1.z.record(zod_1.z.enum(Object.values(constants_1.USERS_STATUS)), zod_1.z.number()),
|
32
|
+
totalUsers: zod_1.z.number(),
|
33
|
+
totalTrafficBytes: zod_1.z.string(),
|
34
|
+
}),
|
35
|
+
}),
|
36
|
+
});
|
37
|
+
})(GetStatsCommand || (exports.GetStatsCommand = GetStatsCommand = {}));
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./get-bandwidth-stats.command"), exports);
|
18
|
+
__exportStar(require("./get-nodes-statistics"), exports);
|
19
|
+
__exportStar(require("./get-stats.command"), exports);
|
@@ -0,0 +1,111 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.CreateUserCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../api");
|
6
|
+
const constants_1 = require("../../constants");
|
7
|
+
const models_1 = require("../../models");
|
8
|
+
var CreateUserCommand;
|
9
|
+
(function (CreateUserCommand) {
|
10
|
+
CreateUserCommand.url = api_1.REST_API.USERS.CREATE;
|
11
|
+
CreateUserCommand.TSQ_url = CreateUserCommand.url;
|
12
|
+
CreateUserCommand.RequestSchema = zod_1.z.object({
|
13
|
+
username: zod_1.z
|
14
|
+
.string({
|
15
|
+
required_error: 'Username is required',
|
16
|
+
invalid_type_error: 'Username must be a string',
|
17
|
+
})
|
18
|
+
.regex(/^[a-zA-Z0-9_-]+$/, 'Username can only contain letters, numbers, underscores and dashes')
|
19
|
+
.max(32, 'Username must be less than 32 characters')
|
20
|
+
.min(6, 'Username must be at least 6 characters'),
|
21
|
+
status: models_1.UsersSchema.shape.status.optional().default(constants_1.USERS_STATUS.ACTIVE),
|
22
|
+
subscriptionUuid: zod_1.z
|
23
|
+
.string({
|
24
|
+
invalid_type_error: 'Subscription UUID must be a string',
|
25
|
+
})
|
26
|
+
.uuid('Invalid subscription UUID format')
|
27
|
+
.optional(),
|
28
|
+
shortUuid: zod_1.z
|
29
|
+
.string({
|
30
|
+
invalid_type_error: 'Short UUID must be a string',
|
31
|
+
})
|
32
|
+
.optional(),
|
33
|
+
trojanPassword: zod_1.z
|
34
|
+
.string({
|
35
|
+
invalid_type_error: 'Trojan password must be a string',
|
36
|
+
})
|
37
|
+
.min(8, 'Trojan password must be at least 8 characters')
|
38
|
+
.max(32, 'Trojan password must be less than 32 characters')
|
39
|
+
.optional(),
|
40
|
+
vlessUuid: zod_1.z
|
41
|
+
.string({
|
42
|
+
invalid_type_error: 'Vless UUID must be a string',
|
43
|
+
})
|
44
|
+
.uuid('Invalid Vless UUID format')
|
45
|
+
.optional(),
|
46
|
+
ssPassword: zod_1.z
|
47
|
+
.string({
|
48
|
+
invalid_type_error: 'SS password must be a string',
|
49
|
+
})
|
50
|
+
.min(8, 'SS password must be at least 8 characters')
|
51
|
+
.max(32, 'SS password must be less than 32 characters')
|
52
|
+
.optional(),
|
53
|
+
trafficLimitBytes: zod_1.z
|
54
|
+
.number({
|
55
|
+
invalid_type_error: 'Traffic limit must be a number',
|
56
|
+
})
|
57
|
+
.int('Traffic limit must be an integer')
|
58
|
+
.min(0, 'Traffic limit must be greater than 0')
|
59
|
+
.describe('Traffic limit in bytes. 0 - unlimited')
|
60
|
+
.optional(),
|
61
|
+
trafficLimitStrategy: models_1.UsersSchema.shape.trafficLimitStrategy
|
62
|
+
.describe('Traffic limit reset strategy')
|
63
|
+
.optional()
|
64
|
+
.default(constants_1.RESET_PERIODS.NO_RESET)
|
65
|
+
.superRefine((val, ctx) => {
|
66
|
+
if (val && !Object.values(constants_1.RESET_PERIODS).includes(val)) {
|
67
|
+
ctx.addIssue({
|
68
|
+
code: zod_1.z.ZodIssueCode.invalid_enum_value,
|
69
|
+
message: 'Invalid traffic limit strategy',
|
70
|
+
path: ['trafficLimitStrategy'],
|
71
|
+
received: val,
|
72
|
+
options: Object.values(constants_1.RESET_PERIODS),
|
73
|
+
});
|
74
|
+
}
|
75
|
+
}),
|
76
|
+
activeUserInbounds: zod_1.z
|
77
|
+
.array(zod_1.z.string().uuid(), {
|
78
|
+
invalid_type_error: 'Enabled inbounds must be an array',
|
79
|
+
})
|
80
|
+
.optional(),
|
81
|
+
expireAt: zod_1.z.coerce
|
82
|
+
.date({
|
83
|
+
required_error: 'Expiration date is required',
|
84
|
+
invalid_type_error: 'Invalid expiration date format',
|
85
|
+
})
|
86
|
+
.refine(() => new Date(), {
|
87
|
+
message: 'Expiration date cannot be in the past',
|
88
|
+
}),
|
89
|
+
createdAt: zod_1.z.coerce
|
90
|
+
.date({
|
91
|
+
required_error: 'Expiration date is required',
|
92
|
+
invalid_type_error: 'Invalid expiration date format',
|
93
|
+
})
|
94
|
+
.refine(() => new Date(), {
|
95
|
+
message: 'Expiration date cannot be in the past',
|
96
|
+
})
|
97
|
+
.optional(),
|
98
|
+
lastTrafficResetAt: zod_1.z.coerce
|
99
|
+
.date({
|
100
|
+
required_error: 'Expiration date is required',
|
101
|
+
invalid_type_error: 'Invalid expiration date format',
|
102
|
+
})
|
103
|
+
.refine(() => new Date(), {
|
104
|
+
message: 'Expiration date cannot be in the past',
|
105
|
+
})
|
106
|
+
.optional(),
|
107
|
+
});
|
108
|
+
CreateUserCommand.ResponseSchema = zod_1.z.object({
|
109
|
+
response: models_1.UsersSchema,
|
110
|
+
});
|
111
|
+
})(CreateUserCommand || (exports.CreateUserCommand = CreateUserCommand = {}));
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.DeleteUserCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../api");
|
6
|
+
var DeleteUserCommand;
|
7
|
+
(function (DeleteUserCommand) {
|
8
|
+
DeleteUserCommand.url = api_1.REST_API.USERS.DELETE_USER;
|
9
|
+
DeleteUserCommand.TSQ_url = DeleteUserCommand.url(':uuid');
|
10
|
+
DeleteUserCommand.RequestSchema = zod_1.z.object({
|
11
|
+
uuid: zod_1.z.string().uuid(),
|
12
|
+
});
|
13
|
+
DeleteUserCommand.ResponseSchema = zod_1.z.object({
|
14
|
+
response: zod_1.z.object({
|
15
|
+
isDeleted: zod_1.z.boolean(),
|
16
|
+
}),
|
17
|
+
});
|
18
|
+
})(DeleteUserCommand || (exports.DeleteUserCommand = DeleteUserCommand = {}));
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.DisableUserCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../api");
|
6
|
+
const users_schema_1 = require("../../models/users.schema");
|
7
|
+
var DisableUserCommand;
|
8
|
+
(function (DisableUserCommand) {
|
9
|
+
DisableUserCommand.url = api_1.REST_API.USERS.DISABLE_USER;
|
10
|
+
DisableUserCommand.TSQ_url = DisableUserCommand.url(':uuid');
|
11
|
+
DisableUserCommand.RequestSchema = zod_1.z.object({
|
12
|
+
uuid: zod_1.z.string().uuid(),
|
13
|
+
});
|
14
|
+
DisableUserCommand.ResponseSchema = zod_1.z.object({
|
15
|
+
response: users_schema_1.UsersSchema,
|
16
|
+
});
|
17
|
+
})(DisableUserCommand || (exports.DisableUserCommand = DisableUserCommand = {}));
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.EnableUserCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../api");
|
6
|
+
const users_schema_1 = require("../../models/users.schema");
|
7
|
+
var EnableUserCommand;
|
8
|
+
(function (EnableUserCommand) {
|
9
|
+
EnableUserCommand.url = api_1.REST_API.USERS.ENABLE_USER;
|
10
|
+
EnableUserCommand.TSQ_url = EnableUserCommand.url(':uuid');
|
11
|
+
EnableUserCommand.RequestSchema = zod_1.z.object({
|
12
|
+
uuid: zod_1.z.string().uuid(),
|
13
|
+
});
|
14
|
+
EnableUserCommand.ResponseSchema = zod_1.z.object({
|
15
|
+
response: users_schema_1.UsersSchema,
|
16
|
+
});
|
17
|
+
})(EnableUserCommand || (exports.EnableUserCommand = EnableUserCommand = {}));
|
@@ -0,0 +1,42 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetAllUsersV2Command = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../api");
|
6
|
+
const users_schema_1 = require("../../models/users.schema");
|
7
|
+
var GetAllUsersV2Command;
|
8
|
+
(function (GetAllUsersV2Command) {
|
9
|
+
GetAllUsersV2Command.url = api_1.REST_API.USERS.GET_ALL_V2;
|
10
|
+
GetAllUsersV2Command.TSQ_url = GetAllUsersV2Command.url;
|
11
|
+
const FilterSchema = zod_1.z.object({
|
12
|
+
id: zod_1.z.string(),
|
13
|
+
value: zod_1.z.unknown(),
|
14
|
+
});
|
15
|
+
const SortingSchema = zod_1.z.object({
|
16
|
+
id: zod_1.z.string(),
|
17
|
+
desc: zod_1.z.boolean(),
|
18
|
+
});
|
19
|
+
// Основная схема для запроса
|
20
|
+
GetAllUsersV2Command.RequestQuerySchema = zod_1.z.object({
|
21
|
+
start: zod_1.z.coerce.number().optional(),
|
22
|
+
size: zod_1.z.coerce.number().optional(),
|
23
|
+
filters: zod_1.z
|
24
|
+
.preprocess((str) => (typeof str === 'string' ? JSON.parse(str) : str), zod_1.z.array(FilterSchema))
|
25
|
+
.optional(),
|
26
|
+
filterModes: zod_1.z
|
27
|
+
.preprocess((str) => (typeof str === 'string' ? JSON.parse(str) : str), zod_1.z.record(zod_1.z.string(), zod_1.z.string()))
|
28
|
+
.optional(),
|
29
|
+
globalFilterMode: zod_1.z.string().optional(),
|
30
|
+
sorting: zod_1.z
|
31
|
+
.preprocess((str) => (typeof str === 'string' ? JSON.parse(str) : str), zod_1.z.array(SortingSchema))
|
32
|
+
.optional(),
|
33
|
+
});
|
34
|
+
GetAllUsersV2Command.ResponseSchema = zod_1.z.object({
|
35
|
+
response: zod_1.z.object({
|
36
|
+
users: zod_1.z.array(users_schema_1.UsersSchema.extend({
|
37
|
+
totalUsedBytes: zod_1.z.string(),
|
38
|
+
})),
|
39
|
+
total: zod_1.z.number(),
|
40
|
+
}),
|
41
|
+
});
|
42
|
+
})(GetAllUsersV2Command || (exports.GetAllUsersV2Command = GetAllUsersV2Command = {}));
|
@@ -0,0 +1,49 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetAllUsersCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../api");
|
6
|
+
const users_schema_1 = require("../../models/users.schema");
|
7
|
+
var GetAllUsersCommand;
|
8
|
+
(function (GetAllUsersCommand) {
|
9
|
+
GetAllUsersCommand.url = api_1.REST_API.USERS.GET_ALL;
|
10
|
+
GetAllUsersCommand.TSQ_url = GetAllUsersCommand.url;
|
11
|
+
GetAllUsersCommand.SortableFields = [
|
12
|
+
'username',
|
13
|
+
'status',
|
14
|
+
'expireAt',
|
15
|
+
'createdAt',
|
16
|
+
'onlineAt',
|
17
|
+
'usedTrafficBytes',
|
18
|
+
'trafficLimitBytes',
|
19
|
+
];
|
20
|
+
GetAllUsersCommand.SearchableFields = [
|
21
|
+
'username',
|
22
|
+
'shortUuid',
|
23
|
+
'subscriptionUuid',
|
24
|
+
'uuid',
|
25
|
+
'status',
|
26
|
+
];
|
27
|
+
GetAllUsersCommand.RequestQuerySchema = zod_1.z.object({
|
28
|
+
limit: zod_1.z
|
29
|
+
.string()
|
30
|
+
.default('10')
|
31
|
+
.transform((val) => parseInt(val)),
|
32
|
+
offset: zod_1.z
|
33
|
+
.string()
|
34
|
+
.default('0')
|
35
|
+
.transform((val) => parseInt(val)),
|
36
|
+
orderBy: zod_1.z.enum(GetAllUsersCommand.SortableFields).default('createdAt'),
|
37
|
+
orderDir: zod_1.z.enum(['asc', 'desc']).default('desc'),
|
38
|
+
search: zod_1.z.string().optional(),
|
39
|
+
searchBy: zod_1.z.enum(GetAllUsersCommand.SearchableFields).default('username'),
|
40
|
+
});
|
41
|
+
GetAllUsersCommand.ResponseSchema = zod_1.z.object({
|
42
|
+
response: zod_1.z.object({
|
43
|
+
users: zod_1.z.array(users_schema_1.UsersSchema.extend({
|
44
|
+
totalUsedBytes: zod_1.z.string(),
|
45
|
+
})),
|
46
|
+
total: zod_1.z.number(),
|
47
|
+
}),
|
48
|
+
});
|
49
|
+
})(GetAllUsersCommand || (exports.GetAllUsersCommand = GetAllUsersCommand = {}));
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetUserByShortUuidCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../api");
|
6
|
+
const users_schema_1 = require("../../models/users.schema");
|
7
|
+
var GetUserByShortUuidCommand;
|
8
|
+
(function (GetUserByShortUuidCommand) {
|
9
|
+
GetUserByShortUuidCommand.url = api_1.REST_API.USERS.GET_BY_SHORT_UUID;
|
10
|
+
GetUserByShortUuidCommand.TSQ_url = GetUserByShortUuidCommand.url(':shortUuid');
|
11
|
+
GetUserByShortUuidCommand.RequestSchema = zod_1.z.object({
|
12
|
+
shortUuid: zod_1.z.string(),
|
13
|
+
});
|
14
|
+
GetUserByShortUuidCommand.ResponseSchema = zod_1.z.object({
|
15
|
+
response: users_schema_1.UsersSchema,
|
16
|
+
});
|
17
|
+
})(GetUserByShortUuidCommand || (exports.GetUserByShortUuidCommand = GetUserByShortUuidCommand = {}));
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetUserBySubscriptionUuidCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../api");
|
6
|
+
const users_schema_1 = require("../../models/users.schema");
|
7
|
+
var GetUserBySubscriptionUuidCommand;
|
8
|
+
(function (GetUserBySubscriptionUuidCommand) {
|
9
|
+
GetUserBySubscriptionUuidCommand.url = api_1.REST_API.USERS.GET_BY_SUBSCRIPTION_UUID;
|
10
|
+
GetUserBySubscriptionUuidCommand.TSQ_url = GetUserBySubscriptionUuidCommand.url(':subscriptionUuid');
|
11
|
+
GetUserBySubscriptionUuidCommand.RequestSchema = zod_1.z.object({
|
12
|
+
subscriptionUuid: zod_1.z.string(),
|
13
|
+
});
|
14
|
+
GetUserBySubscriptionUuidCommand.ResponseSchema = zod_1.z.object({
|
15
|
+
response: users_schema_1.UsersSchema,
|
16
|
+
});
|
17
|
+
})(GetUserBySubscriptionUuidCommand || (exports.GetUserBySubscriptionUuidCommand = GetUserBySubscriptionUuidCommand = {}));
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetUserByUuidCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../api");
|
6
|
+
const users_schema_1 = require("../../models/users.schema");
|
7
|
+
var GetUserByUuidCommand;
|
8
|
+
(function (GetUserByUuidCommand) {
|
9
|
+
GetUserByUuidCommand.url = api_1.REST_API.USERS.GET_BY_UUID;
|
10
|
+
GetUserByUuidCommand.TSQ_url = GetUserByUuidCommand.url(':uuid');
|
11
|
+
GetUserByUuidCommand.RequestSchema = zod_1.z.object({
|
12
|
+
uuid: zod_1.z.string().uuid(),
|
13
|
+
});
|
14
|
+
GetUserByUuidCommand.ResponseSchema = zod_1.z.object({
|
15
|
+
response: users_schema_1.UsersSchema,
|
16
|
+
});
|
17
|
+
})(GetUserByUuidCommand || (exports.GetUserByUuidCommand = GetUserByUuidCommand = {}));
|
@@ -0,0 +1,27 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./create-user.command"), exports);
|
18
|
+
__exportStar(require("./delete-user.command"), exports);
|
19
|
+
__exportStar(require("./disable-user.command.ts"), exports);
|
20
|
+
__exportStar(require("./enable-user.command"), exports);
|
21
|
+
__exportStar(require("./get-all-users-v2.command"), exports);
|
22
|
+
__exportStar(require("./get-all-users.command"), exports);
|
23
|
+
__exportStar(require("./get-user-by-short-uuid.command"), exports);
|
24
|
+
__exportStar(require("./get-user-by-subscription-uuid.command"), exports);
|
25
|
+
__exportStar(require("./get-user-by-uuid.command"), exports);
|
26
|
+
__exportStar(require("./revoke-user-subscription.command"), exports);
|
27
|
+
__exportStar(require("./update-user.command"), exports);
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.RevokeUserSubscriptionCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const api_1 = require("../../api");
|
6
|
+
const users_schema_1 = require("../../models/users.schema");
|
7
|
+
var RevokeUserSubscriptionCommand;
|
8
|
+
(function (RevokeUserSubscriptionCommand) {
|
9
|
+
RevokeUserSubscriptionCommand.url = api_1.REST_API.USERS.REVOKE_SUBSCRIPTION;
|
10
|
+
RevokeUserSubscriptionCommand.TSQ_url = RevokeUserSubscriptionCommand.url(':uuid');
|
11
|
+
RevokeUserSubscriptionCommand.RequestSchema = zod_1.z.object({
|
12
|
+
uuid: zod_1.z.string().uuid(),
|
13
|
+
});
|
14
|
+
RevokeUserSubscriptionCommand.ResponseSchema = zod_1.z.object({
|
15
|
+
response: users_schema_1.UsersSchema,
|
16
|
+
});
|
17
|
+
})(RevokeUserSubscriptionCommand || (exports.RevokeUserSubscriptionCommand = RevokeUserSubscriptionCommand = {}));
|