@remnawave/backend-contract 2.9.14 → 2.9.21
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.
- package/build/backend/api/controllers/bandwidth-stats.d.ts +7 -8
- package/build/backend/api/controllers/bandwidth-stats.d.ts.map +1 -1
- package/build/backend/api/controllers/bandwidth-stats.js +8 -20
- package/build/backend/api/controllers/connections.d.ts +1 -1
- package/build/backend/api/controllers/connections.d.ts.map +1 -1
- package/build/backend/api/controllers/connections.js +1 -1
- package/build/backend/api/controllers/hwid.d.ts +1 -1
- package/build/backend/api/controllers/hwid.d.ts.map +1 -1
- package/build/backend/api/controllers/hwid.js +1 -1
- package/build/backend/api/controllers/internal-squads.d.ts +2 -0
- package/build/backend/api/controllers/internal-squads.d.ts.map +1 -1
- package/build/backend/api/controllers/internal-squads.js +2 -0
- package/build/backend/api/controllers/metadata.d.ts +4 -4
- package/build/backend/api/controllers/metadata.d.ts.map +1 -1
- package/build/backend/api/controllers/metadata.js +4 -4
- package/build/backend/api/controllers/remnawave-settings.d.ts +2 -2
- package/build/backend/api/controllers/remnawave-settings.d.ts.map +1 -1
- package/build/backend/api/controllers/remnawave-settings.js +3 -3
- package/build/backend/api/controllers/subscriptions.d.ts +2 -2
- package/build/backend/api/controllers/subscriptions.d.ts.map +1 -1
- package/build/backend/api/controllers/subscriptions.js +2 -2
- package/build/backend/api/controllers/users.d.ts +9 -13
- package/build/backend/api/controllers/users.d.ts.map +1 -1
- package/build/backend/api/controllers/users.js +9 -13
- package/build/backend/api/controllers-info.d.ts +15 -15
- package/build/backend/api/controllers-info.js +15 -15
- package/build/backend/api/routes.d.ts +22 -23
- package/build/backend/api/routes.d.ts.map +1 -1
- package/build/backend/api/routes.js +24 -25
- package/build/backend/commands/bandwidth-stats/index.d.ts +1 -1
- package/build/backend/commands/bandwidth-stats/index.d.ts.map +1 -1
- package/build/backend/commands/bandwidth-stats/index.js +1 -1
- package/build/backend/commands/bandwidth-stats/internal-squads/get-internal-squad-usage.command.d.ts +31 -0
- package/build/backend/commands/bandwidth-stats/internal-squads/get-internal-squad-usage.command.d.ts.map +1 -0
- package/build/backend/commands/bandwidth-stats/internal-squads/get-internal-squad-usage.command.js +50 -0
- package/build/backend/commands/bandwidth-stats/internal-squads/get-internal-squad-user-usage.command.d.ts +29 -0
- package/build/backend/commands/bandwidth-stats/internal-squads/get-internal-squad-user-usage.command.d.ts.map +1 -0
- package/build/backend/commands/bandwidth-stats/internal-squads/get-internal-squad-user-usage.command.js +34 -0
- package/build/backend/commands/bandwidth-stats/internal-squads/index.d.ts +3 -0
- package/build/backend/commands/bandwidth-stats/internal-squads/index.d.ts.map +1 -0
- package/build/backend/commands/bandwidth-stats/{legacy → internal-squads}/index.js +2 -2
- package/build/backend/commands/bandwidth-stats/nodes/get-node-usage.command.d.ts +29 -0
- package/build/backend/commands/bandwidth-stats/nodes/get-node-usage.command.d.ts.map +1 -0
- package/build/backend/commands/bandwidth-stats/nodes/get-node-usage.command.js +38 -0
- package/build/backend/commands/bandwidth-stats/nodes/index.d.ts +1 -0
- package/build/backend/commands/bandwidth-stats/nodes/index.d.ts.map +1 -1
- package/build/backend/commands/bandwidth-stats/nodes/index.js +1 -0
- package/build/backend/commands/bandwidth-stats/users/get-stats-user-usage.command.d.ts +2 -2
- package/build/backend/commands/bandwidth-stats/users/get-stats-user-usage.command.d.ts.map +1 -1
- package/build/backend/commands/bandwidth-stats/users/get-stats-user-usage.command.js +5 -4
- package/build/backend/commands/connections/connections-by-node-result.command.d.ts +1 -1
- package/build/backend/commands/connections/connections-by-node-result.command.js +1 -1
- package/build/backend/commands/connections/connections-by-user-result.command.d.ts +1 -2
- package/build/backend/commands/connections/connections-by-user-result.command.d.ts.map +1 -1
- package/build/backend/commands/connections/connections-by-user-result.command.js +1 -2
- package/build/backend/commands/connections/connections-by-user.command.d.ts +2 -2
- package/build/backend/commands/connections/connections-by-user.command.d.ts.map +1 -1
- package/build/backend/commands/connections/connections-by-user.command.js +4 -3
- package/build/backend/commands/connections/drop-connections.command.d.ts +4 -4
- package/build/backend/commands/connections/drop-connections.command.js +3 -3
- package/build/backend/commands/hwid/create-user-hwid-device.command.d.ts +1 -1
- package/build/backend/commands/hwid/create-user-hwid-device.command.js +1 -1
- package/build/backend/commands/hwid/delete-all-user-hwid-devices.command.d.ts +1 -1
- package/build/backend/commands/hwid/delete-all-user-hwid-devices.command.js +1 -1
- package/build/backend/commands/hwid/delete-user-hwid-device.command.d.ts +1 -1
- package/build/backend/commands/hwid/delete-user-hwid-device.command.js +1 -1
- package/build/backend/commands/hwid/get-top-users-by-hwid-devices.command.d.ts +0 -1
- package/build/backend/commands/hwid/get-top-users-by-hwid-devices.command.d.ts.map +1 -1
- package/build/backend/commands/hwid/get-top-users-by-hwid-devices.command.js +0 -1
- package/build/backend/commands/hwid/get-user-hwid-devices.command.d.ts +2 -2
- package/build/backend/commands/hwid/get-user-hwid-devices.command.d.ts.map +1 -1
- package/build/backend/commands/hwid/get-user-hwid-devices.command.js +3 -3
- package/build/backend/commands/internal-squads/bulk-actions/add-many-users-to-internal-squad.command.d.ts +15 -0
- package/build/backend/commands/internal-squads/bulk-actions/add-many-users-to-internal-squad.command.d.ts.map +1 -0
- package/build/backend/commands/internal-squads/bulk-actions/add-many-users-to-internal-squad.command.js +18 -0
- package/build/backend/commands/internal-squads/bulk-actions/delete-many-users-from-internal-squad.command.d.ts +15 -0
- package/build/backend/commands/internal-squads/bulk-actions/delete-many-users-from-internal-squad.command.d.ts.map +1 -0
- package/build/backend/commands/internal-squads/bulk-actions/delete-many-users-from-internal-squad.command.js +18 -0
- package/build/backend/commands/internal-squads/bulk-actions/index.d.ts +2 -0
- package/build/backend/commands/internal-squads/bulk-actions/index.d.ts.map +1 -1
- package/build/backend/commands/internal-squads/bulk-actions/index.js +2 -0
- package/build/backend/commands/metadata/user/get-user-metadata.command.d.ts +2 -2
- package/build/backend/commands/metadata/user/get-user-metadata.command.d.ts.map +1 -1
- package/build/backend/commands/metadata/user/get-user-metadata.command.js +4 -3
- package/build/backend/commands/metadata/user/upsert-user-metadata.command.d.ts +2 -2
- package/build/backend/commands/metadata/user/upsert-user-metadata.command.d.ts.map +1 -1
- package/build/backend/commands/metadata/user/upsert-user-metadata.command.js +3 -3
- package/build/backend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports-stats.command.d.ts +1 -1
- package/build/backend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports-stats.command.js +1 -1
- package/build/backend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports.command.d.ts +0 -1
- package/build/backend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports.command.d.ts.map +1 -1
- package/build/backend/commands/remnawave-settings/get-remnawave-settings.command.js +1 -1
- package/build/backend/commands/remnawave-settings/update-remnawave-settings.command.js +1 -1
- package/build/backend/commands/subscriptions/get-by/{get-connection-keys-by-uuid.command.d.ts → get-connection-keys-by-user-id.command.d.ts} +4 -4
- package/build/backend/commands/subscriptions/get-by/get-connection-keys-by-user-id.command.d.ts.map +1 -0
- package/build/backend/commands/subscriptions/get-by/get-connection-keys-by-user-id.command.js +23 -0
- package/build/backend/commands/subscriptions/get-by/get-raw-subscription-by-short-uuid.command.d.ts +0 -1
- package/build/backend/commands/subscriptions/get-by/get-raw-subscription-by-short-uuid.command.d.ts.map +1 -1
- package/build/backend/commands/subscriptions/get-by/{get-subscription-by-uuid.command.d.ts → get-subscription-by-user-id.command.d.ts} +4 -4
- package/build/backend/commands/subscriptions/get-by/get-subscription-by-user-id.command.d.ts.map +1 -0
- package/build/backend/commands/subscriptions/get-by/get-subscription-by-user-id.command.js +19 -0
- package/build/backend/commands/subscriptions/get-by/index.d.ts +2 -2
- package/build/backend/commands/subscriptions/get-by/index.d.ts.map +1 -1
- package/build/backend/commands/subscriptions/get-by/index.js +2 -2
- package/build/backend/commands/users/actions/disable-user.command.d.ts +2 -3
- package/build/backend/commands/users/actions/disable-user.command.d.ts.map +1 -1
- package/build/backend/commands/users/actions/disable-user.command.js +4 -3
- package/build/backend/commands/users/actions/enable-user.command.d.ts +2 -3
- package/build/backend/commands/users/actions/enable-user.command.d.ts.map +1 -1
- package/build/backend/commands/users/actions/enable-user.command.js +4 -3
- package/build/backend/commands/users/{get-by/get-user-by-id.command.d.ts → actions/extend-user.command.d.ts} +8 -5
- package/build/backend/commands/users/actions/extend-user.command.d.ts.map +1 -0
- package/build/backend/commands/users/actions/extend-user.command.js +21 -0
- package/build/backend/commands/users/actions/index.d.ts +1 -0
- package/build/backend/commands/users/actions/index.d.ts.map +1 -1
- package/build/backend/commands/users/actions/index.js +1 -0
- package/build/backend/commands/users/actions/reset-user-traffic.command.d.ts +2 -3
- package/build/backend/commands/users/actions/reset-user-traffic.command.d.ts.map +1 -1
- package/build/backend/commands/users/actions/reset-user-traffic.command.js +4 -3
- package/build/backend/commands/users/actions/revoke-user-subscription.command.d.ts +2 -3
- package/build/backend/commands/users/actions/revoke-user-subscription.command.d.ts.map +1 -1
- package/build/backend/commands/users/actions/revoke-user-subscription.command.js +4 -3
- package/build/backend/commands/users/bulk/bulk-delete-users.command.d.ts +1 -1
- package/build/backend/commands/users/bulk/bulk-delete-users.command.js +2 -2
- package/build/backend/commands/users/bulk/bulk-extend-expiration-date.command.d.ts +1 -1
- package/build/backend/commands/users/bulk/bulk-extend-expiration-date.command.js +1 -1
- package/build/backend/commands/users/bulk/bulk-reset-traffic-users.command.d.ts +1 -1
- package/build/backend/commands/users/bulk/bulk-reset-traffic-users.command.js +2 -2
- package/build/backend/commands/users/bulk/bulk-revoke-users-subscription.command.d.ts +1 -1
- package/build/backend/commands/users/bulk/bulk-revoke-users-subscription.command.js +2 -2
- package/build/backend/commands/users/bulk/bulk-update-users-squads.command.d.ts +1 -1
- package/build/backend/commands/users/bulk/bulk-update-users-squads.command.js +2 -2
- package/build/backend/commands/users/bulk/bulk-update-users.command.d.ts +1 -1
- package/build/backend/commands/users/bulk/bulk-update-users.command.js +2 -2
- package/build/backend/commands/users/create-user.command.d.ts +0 -2
- package/build/backend/commands/users/create-user.command.d.ts.map +1 -1
- package/build/backend/commands/users/create-user.command.js +0 -3
- package/build/backend/commands/users/delete-user.command.d.ts +2 -2
- package/build/backend/commands/users/delete-user.command.d.ts.map +1 -1
- package/build/backend/commands/users/delete-user.command.js +4 -3
- package/build/backend/commands/users/get-by/get-user-by-short-uuid.command.d.ts +0 -1
- package/build/backend/commands/users/get-by/get-user-by-short-uuid.command.d.ts.map +1 -1
- package/build/backend/commands/users/get-by/get-user-by-username.command.d.ts +0 -1
- package/build/backend/commands/users/get-by/get-user-by-username.command.d.ts.map +1 -1
- package/build/backend/commands/users/get-by/index.d.ts +0 -1
- package/build/backend/commands/users/get-by/index.d.ts.map +1 -1
- package/build/backend/commands/users/get-by/index.js +0 -1
- package/build/backend/commands/users/get-user-accessible-nodes.command.d.ts +3 -3
- package/build/backend/commands/users/get-user-accessible-nodes.command.d.ts.map +1 -1
- package/build/backend/commands/users/get-user-accessible-nodes.command.js +5 -4
- package/build/backend/commands/users/{get-user-by-uuid.command.d.ts → get-user-by-id.command.d.ts} +4 -5
- package/build/backend/commands/users/get-user-by-id.command.d.ts.map +1 -0
- package/build/backend/commands/users/{get-by/get-user-by-id.command.js → get-user-by-id.command.js} +8 -7
- package/build/backend/commands/users/get-user-subscription-request-history.command.d.ts +2 -2
- package/build/backend/commands/users/get-user-subscription-request-history.command.d.ts.map +1 -1
- package/build/backend/commands/users/get-user-subscription-request-history.command.js +5 -5
- package/build/backend/commands/users/get-users-stream.command.d.ts +0 -1
- package/build/backend/commands/users/get-users-stream.command.d.ts.map +1 -1
- package/build/backend/commands/users/get-users.command.d.ts +0 -1
- package/build/backend/commands/users/get-users.command.d.ts.map +1 -1
- package/build/backend/commands/users/index.d.ts +1 -1
- package/build/backend/commands/users/index.d.ts.map +1 -1
- package/build/backend/commands/users/index.js +1 -1
- package/build/backend/commands/users/resolve-user.command.d.ts +2 -2
- package/build/backend/commands/users/resolve-user.command.d.ts.map +1 -1
- package/build/backend/commands/users/resolve-user.command.js +5 -5
- package/build/backend/commands/users/update-user.command.d.ts +1 -2
- package/build/backend/commands/users/update-user.command.d.ts.map +1 -1
- package/build/backend/commands/users/update-user.command.js +4 -6
- package/build/backend/commands/users/user.response.d.ts +0 -1
- package/build/backend/commands/users/user.response.d.ts.map +1 -1
- package/build/backend/constants/errors/errors.d.ts +18 -8
- package/build/backend/constants/errors/errors.d.ts.map +1 -1
- package/build/backend/constants/errors/errors.js +18 -8
- package/build/backend/models/extended-users.schema.d.ts +0 -1
- package/build/backend/models/extended-users.schema.d.ts.map +1 -1
- package/build/backend/models/index.d.ts +1 -0
- package/build/backend/models/index.d.ts.map +1 -1
- package/build/backend/models/index.js +1 -0
- package/build/backend/models/path-params.schema.d.ts +3 -0
- package/build/backend/models/path-params.schema.d.ts.map +1 -0
- package/build/backend/models/path-params.schema.js +5 -0
- package/build/backend/models/torrent-blocker-report.schema.d.ts +0 -1
- package/build/backend/models/torrent-blocker-report.schema.d.ts.map +1 -1
- package/build/backend/models/torrent-blocker-report.schema.js +0 -1
- package/build/backend/models/users.schema.d.ts +0 -1
- package/build/backend/models/users.schema.d.ts.map +1 -1
- package/build/backend/models/users.schema.js +0 -1
- package/build/backend/models/webhook/webhook.schema.d.ts +0 -6
- package/build/backend/models/webhook/webhook.schema.d.ts.map +1 -1
- package/build/frontend/api/controllers/bandwidth-stats.js +8 -20
- package/build/frontend/api/controllers/connections.js +1 -1
- package/build/frontend/api/controllers/hwid.js +1 -1
- package/build/frontend/api/controllers/internal-squads.js +2 -0
- package/build/frontend/api/controllers/metadata.js +4 -4
- package/build/frontend/api/controllers/remnawave-settings.js +3 -3
- package/build/frontend/api/controllers/subscriptions.js +2 -2
- package/build/frontend/api/controllers/users.js +9 -13
- package/build/frontend/api/controllers-info.js +15 -15
- package/build/frontend/api/routes.js +24 -25
- package/build/frontend/commands/bandwidth-stats/index.js +1 -1
- package/build/frontend/commands/bandwidth-stats/internal-squads/get-internal-squad-usage.command.js +50 -0
- package/build/frontend/commands/bandwidth-stats/internal-squads/get-internal-squad-user-usage.command.js +34 -0
- package/build/frontend/commands/bandwidth-stats/{legacy → internal-squads}/index.js +2 -2
- package/build/frontend/commands/bandwidth-stats/nodes/get-node-usage.command.js +38 -0
- package/build/frontend/commands/bandwidth-stats/nodes/index.js +1 -0
- package/build/frontend/commands/bandwidth-stats/users/get-stats-user-usage.command.js +5 -4
- package/build/frontend/commands/connections/connections-by-node-result.command.js +1 -1
- package/build/frontend/commands/connections/connections-by-user-result.command.js +1 -2
- package/build/frontend/commands/connections/connections-by-user.command.js +4 -3
- package/build/frontend/commands/connections/drop-connections.command.js +3 -3
- package/build/frontend/commands/hwid/create-user-hwid-device.command.js +1 -1
- package/build/frontend/commands/hwid/delete-all-user-hwid-devices.command.js +1 -1
- package/build/frontend/commands/hwid/delete-user-hwid-device.command.js +1 -1
- package/build/frontend/commands/hwid/get-top-users-by-hwid-devices.command.js +0 -1
- package/build/frontend/commands/hwid/get-user-hwid-devices.command.js +3 -3
- package/build/frontend/commands/internal-squads/bulk-actions/add-many-users-to-internal-squad.command.js +18 -0
- package/build/frontend/commands/internal-squads/bulk-actions/delete-many-users-from-internal-squad.command.js +18 -0
- package/build/frontend/commands/internal-squads/bulk-actions/index.js +2 -0
- package/build/frontend/commands/metadata/user/get-user-metadata.command.js +4 -3
- package/build/frontend/commands/metadata/user/upsert-user-metadata.command.js +3 -3
- package/build/frontend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports-stats.command.js +1 -1
- package/build/frontend/commands/remnawave-settings/get-remnawave-settings.command.js +1 -1
- package/build/frontend/commands/remnawave-settings/update-remnawave-settings.command.js +1 -1
- package/build/frontend/commands/subscriptions/get-by/get-connection-keys-by-user-id.command.js +23 -0
- package/build/frontend/commands/subscriptions/get-by/get-subscription-by-user-id.command.js +19 -0
- package/build/frontend/commands/subscriptions/get-by/index.js +2 -2
- package/build/frontend/commands/users/actions/disable-user.command.js +4 -3
- package/build/frontend/commands/users/actions/enable-user.command.js +4 -3
- package/build/frontend/commands/users/actions/extend-user.command.js +21 -0
- package/build/frontend/commands/users/actions/index.js +1 -0
- package/build/frontend/commands/users/actions/reset-user-traffic.command.js +4 -3
- package/build/frontend/commands/users/actions/revoke-user-subscription.command.js +4 -3
- package/build/frontend/commands/users/bulk/bulk-delete-users.command.js +2 -2
- package/build/frontend/commands/users/bulk/bulk-extend-expiration-date.command.js +1 -1
- package/build/frontend/commands/users/bulk/bulk-reset-traffic-users.command.js +2 -2
- package/build/frontend/commands/users/bulk/bulk-revoke-users-subscription.command.js +2 -2
- package/build/frontend/commands/users/bulk/bulk-update-users-squads.command.js +2 -2
- package/build/frontend/commands/users/bulk/bulk-update-users.command.js +2 -2
- package/build/frontend/commands/users/create-user.command.js +0 -3
- package/build/frontend/commands/users/delete-user.command.js +4 -3
- package/build/frontend/commands/users/get-by/index.js +0 -1
- package/build/frontend/commands/users/get-user-accessible-nodes.command.js +5 -4
- package/build/frontend/commands/users/{get-by/get-user-by-id.command.js → get-user-by-id.command.js} +8 -7
- package/build/frontend/commands/users/get-user-subscription-request-history.command.js +5 -5
- package/build/frontend/commands/users/index.js +1 -1
- package/build/frontend/commands/users/resolve-user.command.js +5 -5
- package/build/frontend/commands/users/update-user.command.js +4 -6
- package/build/frontend/constants/errors/errors.js +18 -8
- package/build/frontend/models/index.js +1 -0
- package/build/frontend/models/path-params.schema.js +5 -0
- package/build/frontend/models/torrent-blocker-report.schema.js +0 -1
- package/build/frontend/models/users.schema.js +0 -1
- package/package.json +1 -1
- package/build/backend/commands/bandwidth-stats/legacy/get-legacy-stats-node-user-usage.command.d.ts +0 -26
- package/build/backend/commands/bandwidth-stats/legacy/get-legacy-stats-node-user-usage.command.d.ts.map +0 -1
- package/build/backend/commands/bandwidth-stats/legacy/get-legacy-stats-node-user-usage.command.js +0 -28
- package/build/backend/commands/bandwidth-stats/legacy/get-legacy-user-usage.command.d.ts +0 -27
- package/build/backend/commands/bandwidth-stats/legacy/get-legacy-user-usage.command.d.ts.map +0 -1
- package/build/backend/commands/bandwidth-stats/legacy/get-legacy-user-usage.command.js +0 -29
- package/build/backend/commands/bandwidth-stats/legacy/index.d.ts +0 -3
- package/build/backend/commands/bandwidth-stats/legacy/index.d.ts.map +0 -1
- package/build/backend/commands/subscriptions/get-by/get-connection-keys-by-uuid.command.d.ts.map +0 -1
- package/build/backend/commands/subscriptions/get-by/get-connection-keys-by-uuid.command.js +0 -22
- package/build/backend/commands/subscriptions/get-by/get-subscription-by-uuid.command.d.ts.map +0 -1
- package/build/backend/commands/subscriptions/get-by/get-subscription-by-uuid.command.js +0 -19
- package/build/backend/commands/users/get-by/get-user-by-id.command.d.ts.map +0 -1
- package/build/backend/commands/users/get-user-by-uuid.command.d.ts.map +0 -1
- package/build/backend/commands/users/get-user-by-uuid.command.js +0 -17
- package/build/frontend/commands/bandwidth-stats/legacy/get-legacy-stats-node-user-usage.command.js +0 -28
- package/build/frontend/commands/bandwidth-stats/legacy/get-legacy-user-usage.command.js +0 -29
- package/build/frontend/commands/subscriptions/get-by/get-connection-keys-by-uuid.command.js +0 -22
- package/build/frontend/commands/subscriptions/get-by/get-subscription-by-uuid.command.js +0 -19
- package/build/frontend/commands/users/get-user-by-uuid.command.js +0 -17
|
@@ -102,18 +102,18 @@ exports.REST_API = {
|
|
|
102
102
|
UPDATE: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.UPDATE}`,
|
|
103
103
|
GET: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET}`,
|
|
104
104
|
STREAM: `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.STREAM}`,
|
|
105
|
-
DELETE: (
|
|
106
|
-
|
|
107
|
-
ACCESSIBLE_NODES: (
|
|
108
|
-
SUBSCRIPTION_REQUEST_HISTORY: (
|
|
105
|
+
DELETE: (userId) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.DELETE(userId)}`,
|
|
106
|
+
GET_BY_ID: (userId) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY_ID(userId)}`,
|
|
107
|
+
ACCESSIBLE_NODES: (userId) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ACCESSIBLE_NODES(userId)}`,
|
|
108
|
+
SUBSCRIPTION_REQUEST_HISTORY: (userId) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.SUBSCRIPTION_REQUEST_HISTORY(userId)}`,
|
|
109
109
|
ACTIONS: {
|
|
110
|
-
DISABLE: (
|
|
111
|
-
ENABLE: (
|
|
112
|
-
RESET_TRAFFIC: (
|
|
113
|
-
REVOKE_SUBSCRIPTION: (
|
|
110
|
+
DISABLE: (userId) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ACTIONS.DISABLE(userId)}`,
|
|
111
|
+
ENABLE: (userId) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ACTIONS.ENABLE(userId)}`,
|
|
112
|
+
RESET_TRAFFIC: (userId) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ACTIONS.RESET_TRAFFIC(userId)}`,
|
|
113
|
+
REVOKE_SUBSCRIPTION: (userId) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ACTIONS.REVOKE_SUBSCRIPTION(userId)}`,
|
|
114
|
+
EXTEND_EXPIRATION_DATE: (userId) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.ACTIONS.EXTEND_EXPIRATION_DATE(userId)}`,
|
|
114
115
|
},
|
|
115
116
|
GET_BY: {
|
|
116
|
-
ID: (id) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY.ID(id)}`,
|
|
117
117
|
SHORT_UUID: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY.SHORT_UUID(shortUuid)}`,
|
|
118
118
|
USERNAME: (username) => `${exports.ROOT}/${CONTROLLERS.USERS_CONTROLLER}/${CONTROLLERS.USERS_ROUTES.GET_BY.USERNAME(username)}`,
|
|
119
119
|
},
|
|
@@ -194,7 +194,7 @@ exports.REST_API = {
|
|
|
194
194
|
HWID: {
|
|
195
195
|
GET_ALL_HWID_DEVICES: `${exports.ROOT}/${CONTROLLERS.HWID_CONTROLLER}/${CONTROLLERS.HWID_ROUTES.GET_ALL_HWID_DEVICES}`,
|
|
196
196
|
CREATE_USER_HWID_DEVICE: `${exports.ROOT}/${CONTROLLERS.HWID_CONTROLLER}/${CONTROLLERS.HWID_ROUTES.CREATE_USER_HWID_DEVICE}`,
|
|
197
|
-
GET_USER_HWID_DEVICES: (
|
|
197
|
+
GET_USER_HWID_DEVICES: (userId) => `${exports.ROOT}/${CONTROLLERS.HWID_CONTROLLER}/${CONTROLLERS.HWID_ROUTES.GET_USER_HWID_DEVICES(userId)}`,
|
|
198
198
|
DELETE_USER_HWID_DEVICE: `${exports.ROOT}/${CONTROLLERS.HWID_CONTROLLER}/${CONTROLLERS.HWID_ROUTES.DELETE_USER_HWID_DEVICE}`,
|
|
199
199
|
DELETE_ALL_USER_HWID_DEVICES: `${exports.ROOT}/${CONTROLLERS.HWID_CONTROLLER}/${CONTROLLERS.HWID_ROUTES.DELETE_ALL_USER_HWID_DEVICES}`,
|
|
200
200
|
STATS: `${exports.ROOT}/${CONTROLLERS.HWID_CONTROLLER}/${CONTROLLERS.HWID_ROUTES.STATS}`,
|
|
@@ -204,14 +204,14 @@ exports.REST_API = {
|
|
|
204
204
|
GET: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTIONS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTIONS_ROUTES.GET}`,
|
|
205
205
|
GET_BY: {
|
|
206
206
|
USERNAME: (username) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTIONS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTIONS_ROUTES.GET_BY.USERNAME(username)}`,
|
|
207
|
-
UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTIONS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTIONS_ROUTES.GET_BY.UUID(uuid)}`,
|
|
208
207
|
SHORT_UUID: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTIONS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTIONS_ROUTES.GET_BY.SHORT_UUID(shortUuid)}`,
|
|
209
208
|
SHORT_UUID_RAW: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTIONS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTIONS_ROUTES.GET_BY.SHORT_UUID_RAW(shortUuid)}`,
|
|
209
|
+
ID: (userId) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTIONS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTIONS_ROUTES.GET_BY.ID(userId)}`,
|
|
210
210
|
},
|
|
211
211
|
SUBPAGE: {
|
|
212
212
|
GET_CONFIG: (shortUuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTIONS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTIONS_ROUTES.SUBPAGE.GET_CONFIG(shortUuid)}`,
|
|
213
213
|
},
|
|
214
|
-
|
|
214
|
+
GET_CONNECTION_KEYS_BY_USER_ID: (userId) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTIONS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTIONS_ROUTES.GET_CONNECTION_KEYS_BY_USER_ID(userId)}`,
|
|
215
215
|
},
|
|
216
216
|
CONFIG_PROFILES: {
|
|
217
217
|
GET: `${exports.ROOT}/${CONTROLLERS.CONFIG_PROFILES_CONTROLLER}/${CONTROLLERS.CONFIG_PROFILES_ROUTES.GET}`,
|
|
@@ -236,6 +236,8 @@ exports.REST_API = {
|
|
|
236
236
|
BULK_ACTIONS: {
|
|
237
237
|
ADD_USERS: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.BULK_ACTIONS.ADD_USERS(uuid)}`,
|
|
238
238
|
REMOVE_USERS: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.BULK_ACTIONS.REMOVE_USERS(uuid)}`,
|
|
239
|
+
ADD_MANY_USERS: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.BULK_ACTIONS.ADD_MANY_USERS(uuid)}`,
|
|
240
|
+
REMOVE_MANY_USERS: (uuid) => `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.BULK_ACTIONS.REMOVE_MANY_USERS(uuid)}`,
|
|
239
241
|
},
|
|
240
242
|
ACTIONS: {
|
|
241
243
|
REORDER: `${exports.ROOT}/${CONTROLLERS.INTERNAL_SQUADS_CONTROLLER}/${CONTROLLERS.INTERNAL_SQUADS_ROUTES.ACTIONS.REORDER}`,
|
|
@@ -280,8 +282,8 @@ exports.REST_API = {
|
|
|
280
282
|
},
|
|
281
283
|
},
|
|
282
284
|
REMNAAWAVE_SETTINGS: {
|
|
283
|
-
GET: `${exports.ROOT}/${CONTROLLERS.
|
|
284
|
-
UPDATE: `${exports.ROOT}/${CONTROLLERS.
|
|
285
|
+
GET: `${exports.ROOT}/${CONTROLLERS.REMNAWAVE_SETTINGS_CONTROLLER}/${CONTROLLERS.REMNAWAVE_SETTINGS_ROUTES.GET}`,
|
|
286
|
+
UPDATE: `${exports.ROOT}/${CONTROLLERS.REMNAWAVE_SETTINGS_CONTROLLER}/${CONTROLLERS.REMNAWAVE_SETTINGS_ROUTES.UPDATE}`,
|
|
285
287
|
},
|
|
286
288
|
SUBSCRIPTION_PAGE_CONFIGS: {
|
|
287
289
|
GET: (uuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_PAGE_CONFIGS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_PAGE_CONFIGS_ROUTES.GET(uuid)}`,
|
|
@@ -317,21 +319,18 @@ exports.REST_API = {
|
|
|
317
319
|
GET_REALTIME: `${exports.ROOT}/${CONTROLLERS.BANDWIDTH_STATS_CONTROLLER}/${CONTROLLERS.BANDWIDTH_STATS_NODES_ROUTE}/${CONTROLLERS.BANDWIDTH_STATS_ROUTES.NODES.GET_REALTIME}`,
|
|
318
320
|
GET_USERS: (uuid) => `${exports.ROOT}/${CONTROLLERS.BANDWIDTH_STATS_CONTROLLER}/${CONTROLLERS.BANDWIDTH_STATS_NODES_ROUTE}/${CONTROLLERS.BANDWIDTH_STATS_ROUTES.NODES.GET_USERS(uuid)}`,
|
|
319
321
|
GET_USERS_BY_NODES: `${exports.ROOT}/${CONTROLLERS.BANDWIDTH_STATS_CONTROLLER}/${CONTROLLERS.BANDWIDTH_STATS_NODES_ROUTE}/${CONTROLLERS.BANDWIDTH_STATS_ROUTES.NODES.GET_USERS_BY_NODES}`,
|
|
322
|
+
GET_USAGE: `${exports.ROOT}/${CONTROLLERS.BANDWIDTH_STATS_CONTROLLER}/${CONTROLLERS.BANDWIDTH_STATS_NODES_ROUTE}/${CONTROLLERS.BANDWIDTH_STATS_ROUTES.NODES.GET_USAGE}`,
|
|
320
323
|
},
|
|
321
324
|
USERS: {
|
|
322
|
-
|
|
325
|
+
GET_BY_ID: (userId) => `${exports.ROOT}/${CONTROLLERS.BANDWIDTH_STATS_CONTROLLER}/${CONTROLLERS.BANDWIDTH_STATS_USERS_ROUTE}/${CONTROLLERS.BANDWIDTH_STATS_ROUTES.USERS.GET_BY_ID(userId)}`,
|
|
323
326
|
},
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
},
|
|
328
|
-
USERS: {
|
|
329
|
-
GET_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.BANDWIDTH_STATS_CONTROLLER}/${CONTROLLERS.BANDWIDTH_STATS_USERS_ROUTE}/${CONTROLLERS.BANDWIDTH_STATS_ROUTES.LEGACY.USERS.GET_BY_UUID(uuid)}`,
|
|
330
|
-
},
|
|
327
|
+
INTERNAL_SQUADS: {
|
|
328
|
+
GET_USAGE: (uuid) => `${exports.ROOT}/${CONTROLLERS.BANDWIDTH_STATS_CONTROLLER}/${CONTROLLERS.BANDWIDTH_STATS_INTERNAL_SQUADS_ROUTE}/${CONTROLLERS.BANDWIDTH_STATS_ROUTES.INTERNAL_SQUADS.GET_USAGE(uuid)}`,
|
|
329
|
+
USER_USAGE: (squadUuid, userId) => `${exports.ROOT}/${CONTROLLERS.BANDWIDTH_STATS_CONTROLLER}/${CONTROLLERS.BANDWIDTH_STATS_INTERNAL_SQUADS_ROUTE}/${CONTROLLERS.BANDWIDTH_STATS_ROUTES.INTERNAL_SQUADS.USER_USAGE(squadUuid, userId)}`,
|
|
331
330
|
},
|
|
332
331
|
},
|
|
333
332
|
CONNECTIONS: {
|
|
334
|
-
CONNECTIONS_BY_USER: (
|
|
333
|
+
CONNECTIONS_BY_USER: (userId) => `${exports.ROOT}/${CONTROLLERS.CONNECTIONS_CONTROLLER}/${CONTROLLERS.CONNECTIONS_ROUTES.CONNECTIONS_BY_USER(userId)}`,
|
|
335
334
|
CONNECTIONS_BY_USER_RESULT: (jobId) => `${exports.ROOT}/${CONTROLLERS.CONNECTIONS_CONTROLLER}/${CONTROLLERS.CONNECTIONS_ROUTES.CONNECTIONS_BY_USER_RESULT(jobId)}`,
|
|
336
335
|
CONNECTIONS_BY_NODE: (uuid) => `${exports.ROOT}/${CONTROLLERS.CONNECTIONS_CONTROLLER}/${CONTROLLERS.CONNECTIONS_ROUTES.CONNECTIONS_BY_NODE(uuid)}`,
|
|
337
336
|
CONNECTIONS_BY_NODE_RESULT: (jobId) => `${exports.ROOT}/${CONTROLLERS.CONNECTIONS_CONTROLLER}/${CONTROLLERS.CONNECTIONS_ROUTES.CONNECTIONS_BY_NODE_RESULT(jobId)}`,
|
|
@@ -343,8 +342,8 @@ exports.REST_API = {
|
|
|
343
342
|
UPSERT: (uuid) => `${exports.ROOT}/${CONTROLLERS.METADATA_CONTROLLER}/${CONTROLLERS.METADATA_ROUTES.NODE.UPSERT(uuid)}`,
|
|
344
343
|
},
|
|
345
344
|
USER: {
|
|
346
|
-
GET: (
|
|
347
|
-
UPSERT: (
|
|
345
|
+
GET: (userId) => `${exports.ROOT}/${CONTROLLERS.METADATA_CONTROLLER}/${CONTROLLERS.METADATA_ROUTES.USER.GET(userId)}`,
|
|
346
|
+
UPSERT: (userId) => `${exports.ROOT}/${CONTROLLERS.METADATA_CONTROLLER}/${CONTROLLERS.METADATA_ROUTES.USER.UPSERT(userId)}`,
|
|
348
347
|
},
|
|
349
348
|
},
|
|
350
349
|
};
|
|
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./legacy"), exports);
|
|
18
17
|
__exportStar(require("./nodes"), exports);
|
|
19
18
|
__exportStar(require("./users"), exports);
|
|
19
|
+
__exportStar(require("./internal-squads"), exports);
|
package/build/frontend/commands/bandwidth-stats/internal-squads/get-internal-squad-usage.command.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetInternalSquadUsageCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../../api");
|
|
6
|
+
const constants_1 = require("../../../constants");
|
|
7
|
+
var GetInternalSquadUsageCommand;
|
|
8
|
+
(function (GetInternalSquadUsageCommand) {
|
|
9
|
+
GetInternalSquadUsageCommand.url = api_1.REST_API.BANDWIDTH_STATS.INTERNAL_SQUADS.GET_USAGE;
|
|
10
|
+
GetInternalSquadUsageCommand.TSQ_url = GetInternalSquadUsageCommand.url(':uuid');
|
|
11
|
+
GetInternalSquadUsageCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.BANDWIDTH_STATS_ROUTES.INTERNAL_SQUADS.GET_USAGE(':uuid'), 'get', 'Get internal squad users traffic usage for a period', { scope: 'internal-squad-usage', kind: 'read' }, 'Returns users whose total usage over the period on the given nodes is >= minTotalBytes, scoped to the nodes reachable via the internal squad inbounds. Underlying usage data is flushed to the database roughly every 2 minutes.');
|
|
12
|
+
GetInternalSquadUsageCommand.RequestParamSchema = zod_1.z.object({
|
|
13
|
+
uuid: zod_1.z.uuid().describe('Internal squad UUID'),
|
|
14
|
+
});
|
|
15
|
+
GetInternalSquadUsageCommand.RequestQuerySchema = zod_1.z.object({
|
|
16
|
+
start: zod_1.z.iso.date().describe('Start date (YYYY-MM-DD)'),
|
|
17
|
+
end: zod_1.z.iso.date().describe('End date (YYYY-MM-DD)'),
|
|
18
|
+
minTotalBytes: zod_1.z.coerce
|
|
19
|
+
.number()
|
|
20
|
+
.min(0)
|
|
21
|
+
.optional()
|
|
22
|
+
.default(0)
|
|
23
|
+
.describe('Only include users whose total usage over the period is >= this (bytes)'),
|
|
24
|
+
limit: zod_1.z.coerce
|
|
25
|
+
.number()
|
|
26
|
+
.min(1)
|
|
27
|
+
.max(1000)
|
|
28
|
+
.optional()
|
|
29
|
+
.default(250)
|
|
30
|
+
.describe('Number of users to return, no more than 1000'),
|
|
31
|
+
cursor: zod_1.z.coerce
|
|
32
|
+
.number()
|
|
33
|
+
.optional()
|
|
34
|
+
.describe('Pass the nextCursor from the previous response. Omit on the first request.'),
|
|
35
|
+
});
|
|
36
|
+
GetInternalSquadUsageCommand.ResponseSchema = zod_1.z.object({
|
|
37
|
+
response: zod_1.z.object({
|
|
38
|
+
squadUuid: zod_1.z.uuid(),
|
|
39
|
+
users: zod_1.z.array(zod_1.z.object({
|
|
40
|
+
id: zod_1.z.number(),
|
|
41
|
+
totalBytes: zod_1.z.number().describe('Total used bytes over the period (raw bytes)'),
|
|
42
|
+
})),
|
|
43
|
+
nextCursor: zod_1.z
|
|
44
|
+
.string()
|
|
45
|
+
.nullable()
|
|
46
|
+
.describe('Cursor to fetch the next page, or null if there are no more results'),
|
|
47
|
+
hasMore: zod_1.z.boolean().describe('Whether there are more results to fetch'),
|
|
48
|
+
}),
|
|
49
|
+
});
|
|
50
|
+
})(GetInternalSquadUsageCommand || (exports.GetInternalSquadUsageCommand = GetInternalSquadUsageCommand = {}));
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetInternalSquadUserUsageCommand = 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 GetInternalSquadUserUsageCommand;
|
|
9
|
+
(function (GetInternalSquadUserUsageCommand) {
|
|
10
|
+
GetInternalSquadUserUsageCommand.url = api_1.REST_API.BANDWIDTH_STATS.INTERNAL_SQUADS.USER_USAGE;
|
|
11
|
+
GetInternalSquadUserUsageCommand.TSQ_url = GetInternalSquadUserUsageCommand.url(':squadUuid', ':userId');
|
|
12
|
+
GetInternalSquadUserUsageCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.BANDWIDTH_STATS_ROUTES.INTERNAL_SQUADS.USER_USAGE(':squadUuid', ':userId'), 'get', 'Get a single user daily traffic usage on the internal squad nodes for a period', { scope: 'internal-squad-user-usage', kind: 'read' }, 'Returns users whose total usage over the period on the given nodes is >= minTotalBytes, scoped to the nodes reachable via the Internal Squad inbounds. Every day in the range is present (zero-filled). Underlying usage data is flushed to the database roughly every 2 minutes.');
|
|
13
|
+
GetInternalSquadUserUsageCommand.RequestParamSchema = zod_1.z.object({
|
|
14
|
+
squadUuid: zod_1.z.uuid().describe('Internal squad UUID'),
|
|
15
|
+
userId: models_1.numberParamSchema,
|
|
16
|
+
});
|
|
17
|
+
GetInternalSquadUserUsageCommand.RequestQuerySchema = zod_1.z.object({
|
|
18
|
+
start: zod_1.z.iso.date().describe('Start date (YYYY-MM-DD)'),
|
|
19
|
+
end: zod_1.z.iso.date().describe('End date (YYYY-MM-DD)'),
|
|
20
|
+
});
|
|
21
|
+
GetInternalSquadUserUsageCommand.ResponseSchema = zod_1.z.object({
|
|
22
|
+
response: zod_1.z.object({
|
|
23
|
+
days: zod_1.z.array(zod_1.z.object({
|
|
24
|
+
date: zod_1.z.string().describe('Day (YYYY-MM-DD)'),
|
|
25
|
+
nodes: zod_1.z.array(zod_1.z.object({
|
|
26
|
+
uuid: zod_1.z.uuid(),
|
|
27
|
+
totalBytes: zod_1.z
|
|
28
|
+
.number()
|
|
29
|
+
.describe('Used bytes on this node that day (raw bytes)'),
|
|
30
|
+
})),
|
|
31
|
+
})),
|
|
32
|
+
}),
|
|
33
|
+
});
|
|
34
|
+
})(GetInternalSquadUserUsageCommand || (exports.GetInternalSquadUserUsageCommand = GetInternalSquadUserUsageCommand = {}));
|
|
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./get-
|
|
18
|
-
__exportStar(require("./get-
|
|
17
|
+
__exportStar(require("./get-internal-squad-usage.command"), exports);
|
|
18
|
+
__exportStar(require("./get-internal-squad-user-usage.command"), exports);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetNodeUsageCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../../api");
|
|
6
|
+
const constants_1 = require("../../../constants");
|
|
7
|
+
var GetNodeUsageCommand;
|
|
8
|
+
(function (GetNodeUsageCommand) {
|
|
9
|
+
GetNodeUsageCommand.url = api_1.REST_API.BANDWIDTH_STATS.NODES.GET_USAGE;
|
|
10
|
+
GetNodeUsageCommand.TSQ_url = GetNodeUsageCommand.url;
|
|
11
|
+
GetNodeUsageCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.BANDWIDTH_STATS_ROUTES.NODES.GET_USAGE, 'post', 'Get users exceeding a traffic threshold on the given nodes for a period', { scope: 'node-usage', kind: 'read' }, 'Returns users whose total usage over the period on the given nodes is >= minTotalBytes. Underlying usage data is flushed to the database roughly every 2 minutes.');
|
|
12
|
+
GetNodeUsageCommand.RequestBodySchema = zod_1.z.object({
|
|
13
|
+
nodesUuids: zod_1.z.array(zod_1.z.uuid()).min(1).describe('Node UUIDs to include'),
|
|
14
|
+
});
|
|
15
|
+
GetNodeUsageCommand.RequestQuerySchema = zod_1.z.object({
|
|
16
|
+
start: zod_1.z.iso.date().describe('Start date (YYYY-MM-DD)'),
|
|
17
|
+
end: zod_1.z.iso.date().describe('End date (YYYY-MM-DD)'),
|
|
18
|
+
minTotalBytes: zod_1.z.coerce
|
|
19
|
+
.number()
|
|
20
|
+
.min(0)
|
|
21
|
+
.optional()
|
|
22
|
+
.default(0)
|
|
23
|
+
.describe('Only include users whose total usage over the period is >= this (bytes)'),
|
|
24
|
+
});
|
|
25
|
+
GetNodeUsageCommand.ResponseSchema = zod_1.z.object({
|
|
26
|
+
response: zod_1.z.object({
|
|
27
|
+
nodes: zod_1.z.array(zod_1.z.object({
|
|
28
|
+
uuid: zod_1.z.uuid(),
|
|
29
|
+
users: zod_1.z.array(zod_1.z.object({
|
|
30
|
+
id: zod_1.z.number(),
|
|
31
|
+
totalBytes: zod_1.z
|
|
32
|
+
.number()
|
|
33
|
+
.describe('Total used bytes over the period (raw bytes)'),
|
|
34
|
+
})),
|
|
35
|
+
})),
|
|
36
|
+
}),
|
|
37
|
+
});
|
|
38
|
+
})(GetNodeUsageCommand || (exports.GetNodeUsageCommand = GetNodeUsageCommand = {}));
|
|
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./get-stats-node-users-usage.command"), exports);
|
|
18
18
|
__exportStar(require("./get-stats-nodes-usage.command"), exports);
|
|
19
19
|
__exportStar(require("./get-stats-nodes-users-usage.command"), exports);
|
|
20
|
+
__exportStar(require("./get-node-usage.command"), exports);
|
|
@@ -4,13 +4,14 @@ exports.GetStatsUserUsageCommand = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const api_1 = require("../../../api");
|
|
6
6
|
const constants_1 = require("../../../constants");
|
|
7
|
+
const models_1 = require("../../../models");
|
|
7
8
|
var GetStatsUserUsageCommand;
|
|
8
9
|
(function (GetStatsUserUsageCommand) {
|
|
9
|
-
GetStatsUserUsageCommand.url = api_1.REST_API.BANDWIDTH_STATS.USERS.
|
|
10
|
-
GetStatsUserUsageCommand.TSQ_url = GetStatsUserUsageCommand.url(':
|
|
11
|
-
GetStatsUserUsageCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.BANDWIDTH_STATS_ROUTES.USERS.
|
|
10
|
+
GetStatsUserUsageCommand.url = api_1.REST_API.BANDWIDTH_STATS.USERS.GET_BY_ID;
|
|
11
|
+
GetStatsUserUsageCommand.TSQ_url = GetStatsUserUsageCommand.url(':userId');
|
|
12
|
+
GetStatsUserUsageCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.BANDWIDTH_STATS_ROUTES.USERS.GET_BY_ID(':userId'), 'get', 'Get User Usage by Range', { scope: 'user-usage', kind: 'read' });
|
|
12
13
|
GetStatsUserUsageCommand.RequestParamSchema = zod_1.z.object({
|
|
13
|
-
|
|
14
|
+
userId: models_1.numberParamSchema.describe('ID of the user'),
|
|
14
15
|
});
|
|
15
16
|
GetStatsUserUsageCommand.RequestQuerySchema = zod_1.z.object({
|
|
16
17
|
start: zod_1.z.iso.date().describe('Start date (YYYY-MM-DD)'),
|
|
@@ -21,7 +21,7 @@ var ConnectionsByNodeResultCommand;
|
|
|
21
21
|
success: zod_1.z.boolean(),
|
|
22
22
|
nodeUuid: zod_1.z.uuid(),
|
|
23
23
|
users: zod_1.z.array(zod_1.z.object({
|
|
24
|
-
userId: zod_1.z.
|
|
24
|
+
userId: zod_1.z.number(),
|
|
25
25
|
ips: zod_1.z.array(zod_1.z.object({
|
|
26
26
|
ip: zod_1.z.string(),
|
|
27
27
|
lastSeen: zod_1.z.iso
|
|
@@ -24,8 +24,7 @@ var ConnectionsByUserResultCommand;
|
|
|
24
24
|
result: zod_1.z
|
|
25
25
|
.object({
|
|
26
26
|
success: zod_1.z.boolean(),
|
|
27
|
-
|
|
28
|
-
userId: zod_1.z.string(),
|
|
27
|
+
userId: zod_1.z.number(),
|
|
29
28
|
nodes: zod_1.z.array(zod_1.z.object({
|
|
30
29
|
nodeUuid: zod_1.z.uuid(),
|
|
31
30
|
nodeName: zod_1.z.string(),
|
|
@@ -4,13 +4,14 @@ exports.ConnectionsByUserCommand = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const api_1 = require("../../api");
|
|
6
6
|
const constants_1 = require("../../constants");
|
|
7
|
+
const models_1 = require("../../models");
|
|
7
8
|
var ConnectionsByUserCommand;
|
|
8
9
|
(function (ConnectionsByUserCommand) {
|
|
9
10
|
ConnectionsByUserCommand.url = api_1.REST_API.CONNECTIONS.CONNECTIONS_BY_USER;
|
|
10
|
-
ConnectionsByUserCommand.TSQ_url = ConnectionsByUserCommand.url(':
|
|
11
|
-
ConnectionsByUserCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.CONNECTIONS_ROUTES.CONNECTIONS_BY_USER(':
|
|
11
|
+
ConnectionsByUserCommand.TSQ_url = ConnectionsByUserCommand.url(':userId');
|
|
12
|
+
ConnectionsByUserCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.CONNECTIONS_ROUTES.CONNECTIONS_BY_USER(':userId'), 'post', 'Request Connections for User', { scope: 'by-user', kind: 'read' });
|
|
12
13
|
ConnectionsByUserCommand.RequestParamSchema = zod_1.z.object({
|
|
13
|
-
|
|
14
|
+
userId: models_1.numberParamSchema,
|
|
14
15
|
});
|
|
15
16
|
ConnectionsByUserCommand.ResponseSchema = zod_1.z.object({
|
|
16
17
|
response: zod_1.z.object({
|
|
@@ -12,10 +12,10 @@ var DropConnectionsCommand;
|
|
|
12
12
|
DropConnectionsCommand.DropBySchema = zod_1.z.discriminatedUnion('by', [
|
|
13
13
|
zod_1.z
|
|
14
14
|
.object({
|
|
15
|
-
by: zod_1.z.literal('
|
|
16
|
-
|
|
15
|
+
by: zod_1.z.literal('userIds'),
|
|
16
|
+
userIds: zod_1.z.array(zod_1.z.number()).min(1),
|
|
17
17
|
})
|
|
18
|
-
.describe('Drop by user
|
|
18
|
+
.describe('Drop by user IDs'),
|
|
19
19
|
zod_1.z
|
|
20
20
|
.object({
|
|
21
21
|
by: zod_1.z.literal('ipAddresses'),
|
|
@@ -12,7 +12,7 @@ var CreateUserHwidDeviceCommand;
|
|
|
12
12
|
CreateUserHwidDeviceCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.HWID_ROUTES.CREATE_USER_HWID_DEVICE, 'post', 'Create a user HWID device', { scope: 'create', kind: 'write' });
|
|
13
13
|
CreateUserHwidDeviceCommand.RequestBodySchema = zod_1.z.object({
|
|
14
14
|
hwid: zod_1.z.string().regex(/^[a-zA-Z0-9=-]{10,64}$/),
|
|
15
|
-
|
|
15
|
+
userId: zod_1.z.number(),
|
|
16
16
|
platform: zod_1.z.optional(zod_1.z.string()),
|
|
17
17
|
osVersion: zod_1.z.optional(zod_1.z.string()),
|
|
18
18
|
deviceModel: zod_1.z.optional(zod_1.z.string()),
|
|
@@ -11,7 +11,7 @@ var DeleteAllUserHwidDevicesCommand;
|
|
|
11
11
|
DeleteAllUserHwidDevicesCommand.TSQ_url = DeleteAllUserHwidDevicesCommand.url;
|
|
12
12
|
DeleteAllUserHwidDevicesCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.HWID_ROUTES.DELETE_ALL_USER_HWID_DEVICES, 'post', 'Delete all user HWID devices', { scope: 'delete-all', kind: 'write' });
|
|
13
13
|
DeleteAllUserHwidDevicesCommand.RequestBodySchema = zod_1.z.object({
|
|
14
|
-
|
|
14
|
+
userId: zod_1.z.number(),
|
|
15
15
|
});
|
|
16
16
|
DeleteAllUserHwidDevicesCommand.ResponseSchema = zod_1.z.object({
|
|
17
17
|
response: zod_1.z.object({
|
|
@@ -11,7 +11,7 @@ var DeleteUserHwidDeviceCommand;
|
|
|
11
11
|
DeleteUserHwidDeviceCommand.TSQ_url = DeleteUserHwidDeviceCommand.url;
|
|
12
12
|
DeleteUserHwidDeviceCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.HWID_ROUTES.DELETE_USER_HWID_DEVICE, 'post', 'Delete a user HWID device', { scope: 'delete', kind: 'write' });
|
|
13
13
|
DeleteUserHwidDeviceCommand.RequestBodySchema = zod_1.z.object({
|
|
14
|
-
|
|
14
|
+
userId: zod_1.z.number(),
|
|
15
15
|
hwid: zod_1.z.string(),
|
|
16
16
|
});
|
|
17
17
|
DeleteUserHwidDeviceCommand.ResponseSchema = zod_1.z.object({
|
|
@@ -24,7 +24,6 @@ var GetTopUsersByHwidDevicesCommand;
|
|
|
24
24
|
GetTopUsersByHwidDevicesCommand.ResponseSchema = zod_1.z.object({
|
|
25
25
|
response: zod_1.z.object({
|
|
26
26
|
users: zod_1.z.array(zod_1.z.object({
|
|
27
|
-
userUuid: zod_1.z.uuid(),
|
|
28
27
|
id: zod_1.z.number(),
|
|
29
28
|
username: zod_1.z.string(),
|
|
30
29
|
devicesCount: zod_1.z.number(),
|
|
@@ -8,10 +8,10 @@ const models_1 = require("../../models");
|
|
|
8
8
|
var GetUserHwidDevicesCommand;
|
|
9
9
|
(function (GetUserHwidDevicesCommand) {
|
|
10
10
|
GetUserHwidDevicesCommand.url = api_1.REST_API.HWID.GET_USER_HWID_DEVICES;
|
|
11
|
-
GetUserHwidDevicesCommand.TSQ_url = GetUserHwidDevicesCommand.url(':
|
|
12
|
-
GetUserHwidDevicesCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.HWID_ROUTES.GET_USER_HWID_DEVICES(':
|
|
11
|
+
GetUserHwidDevicesCommand.TSQ_url = GetUserHwidDevicesCommand.url(':userId');
|
|
12
|
+
GetUserHwidDevicesCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.HWID_ROUTES.GET_USER_HWID_DEVICES(':userId'), 'get', 'Get user HWID devices', { scope: 'list-by-user', kind: 'read' });
|
|
13
13
|
GetUserHwidDevicesCommand.RequestParamSchema = zod_1.z.object({
|
|
14
|
-
|
|
14
|
+
userId: zod_1.z.coerce.number(),
|
|
15
15
|
});
|
|
16
16
|
GetUserHwidDevicesCommand.ResponseSchema = zod_1.z.object({
|
|
17
17
|
response: zod_1.z.object({
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AddManyUsersToInternalSquadCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../../api");
|
|
6
|
+
const constants_1 = require("../../../constants");
|
|
7
|
+
var AddManyUsersToInternalSquadCommand;
|
|
8
|
+
(function (AddManyUsersToInternalSquadCommand) {
|
|
9
|
+
AddManyUsersToInternalSquadCommand.url = api_1.REST_API.INTERNAL_SQUADS.BULK_ACTIONS.ADD_MANY_USERS;
|
|
10
|
+
AddManyUsersToInternalSquadCommand.TSQ_url = AddManyUsersToInternalSquadCommand.url(':uuid');
|
|
11
|
+
AddManyUsersToInternalSquadCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INTERNAL_SQUADS_ROUTES.BULK_ACTIONS.ADD_MANY_USERS(':uuid'), 'post', 'Add many users to internal squad', { scope: 'add-many-users', kind: 'write' });
|
|
12
|
+
AddManyUsersToInternalSquadCommand.RequestParamSchema = zod_1.z.object({
|
|
13
|
+
uuid: zod_1.z.uuid(),
|
|
14
|
+
});
|
|
15
|
+
AddManyUsersToInternalSquadCommand.RequestBodySchema = zod_1.z.object({
|
|
16
|
+
userIds: zod_1.z.array(zod_1.z.number()).min(1).max(1000),
|
|
17
|
+
});
|
|
18
|
+
})(AddManyUsersToInternalSquadCommand || (exports.AddManyUsersToInternalSquadCommand = AddManyUsersToInternalSquadCommand = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteManyUsersFromInternalSquadCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../../api");
|
|
6
|
+
const constants_1 = require("../../../constants");
|
|
7
|
+
var DeleteManyUsersFromInternalSquadCommand;
|
|
8
|
+
(function (DeleteManyUsersFromInternalSquadCommand) {
|
|
9
|
+
DeleteManyUsersFromInternalSquadCommand.url = api_1.REST_API.INTERNAL_SQUADS.BULK_ACTIONS.REMOVE_MANY_USERS;
|
|
10
|
+
DeleteManyUsersFromInternalSquadCommand.TSQ_url = DeleteManyUsersFromInternalSquadCommand.url(':uuid');
|
|
11
|
+
DeleteManyUsersFromInternalSquadCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.INTERNAL_SQUADS_ROUTES.BULK_ACTIONS.REMOVE_MANY_USERS(':uuid'), 'delete', 'Delete many users from internal squad', { scope: 'remove-many-users', kind: 'write' });
|
|
12
|
+
DeleteManyUsersFromInternalSquadCommand.RequestParamSchema = zod_1.z.object({
|
|
13
|
+
uuid: zod_1.z.uuid(),
|
|
14
|
+
});
|
|
15
|
+
DeleteManyUsersFromInternalSquadCommand.RequestBodySchema = zod_1.z.object({
|
|
16
|
+
userIds: zod_1.z.array(zod_1.z.number()).min(1).max(1000),
|
|
17
|
+
});
|
|
18
|
+
})(DeleteManyUsersFromInternalSquadCommand || (exports.DeleteManyUsersFromInternalSquadCommand = DeleteManyUsersFromInternalSquadCommand = {}));
|
|
@@ -16,3 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./add-users-to-internal-squad.command"), exports);
|
|
18
18
|
__exportStar(require("./delete-users-from-internal-squad.command"), exports);
|
|
19
|
+
__exportStar(require("./add-many-users-to-internal-squad.command"), exports);
|
|
20
|
+
__exportStar(require("./delete-many-users-from-internal-squad.command"), exports);
|
|
@@ -4,13 +4,14 @@ exports.GetUserMetadataCommand = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const api_1 = require("../../../api");
|
|
6
6
|
const constants_1 = require("../../../constants");
|
|
7
|
+
const models_1 = require("../../../models");
|
|
7
8
|
var GetUserMetadataCommand;
|
|
8
9
|
(function (GetUserMetadataCommand) {
|
|
9
10
|
GetUserMetadataCommand.url = api_1.REST_API.METADATA.USER.GET;
|
|
10
|
-
GetUserMetadataCommand.TSQ_url = GetUserMetadataCommand.url(':
|
|
11
|
-
GetUserMetadataCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.METADATA_ROUTES.USER.GET(':
|
|
11
|
+
GetUserMetadataCommand.TSQ_url = GetUserMetadataCommand.url(':userId');
|
|
12
|
+
GetUserMetadataCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.METADATA_ROUTES.USER.GET(':userId'), 'get', 'Get user metadata', { scope: 'get-user', kind: 'read' });
|
|
12
13
|
GetUserMetadataCommand.RequestParamsSchema = zod_1.z.object({
|
|
13
|
-
|
|
14
|
+
userId: models_1.numberParamSchema,
|
|
14
15
|
});
|
|
15
16
|
GetUserMetadataCommand.ResponseSchema = zod_1.z.object({
|
|
16
17
|
response: zod_1.z.object({
|
|
@@ -7,10 +7,10 @@ const constants_1 = require("../../../constants");
|
|
|
7
7
|
var UpsertUserMetadataCommand;
|
|
8
8
|
(function (UpsertUserMetadataCommand) {
|
|
9
9
|
UpsertUserMetadataCommand.url = api_1.REST_API.METADATA.USER.UPSERT;
|
|
10
|
-
UpsertUserMetadataCommand.TSQ_url = UpsertUserMetadataCommand.url(':
|
|
11
|
-
UpsertUserMetadataCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.METADATA_ROUTES.USER.UPSERT(':
|
|
10
|
+
UpsertUserMetadataCommand.TSQ_url = UpsertUserMetadataCommand.url(':userId');
|
|
11
|
+
UpsertUserMetadataCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.METADATA_ROUTES.USER.UPSERT(':userId'), 'put', 'Update or create User Metadata', { scope: 'upsert-user', kind: 'write' });
|
|
12
12
|
UpsertUserMetadataCommand.RequestParamsSchema = zod_1.z.object({
|
|
13
|
-
|
|
13
|
+
userId: zod_1.z.coerce.number(),
|
|
14
14
|
});
|
|
15
15
|
UpsertUserMetadataCommand.RequestBodySchema = zod_1.z.object({
|
|
16
16
|
metadata: zod_1.z.looseObject({}),
|
|
@@ -18,7 +18,7 @@ var GetTorrentBlockerReportsStatsCommand;
|
|
|
18
18
|
reportsLast24Hours: zod_1.z.number(),
|
|
19
19
|
}),
|
|
20
20
|
topUsers: zod_1.z.array(zod_1.z.object({
|
|
21
|
-
|
|
21
|
+
userId: zod_1.z.number(),
|
|
22
22
|
color: zod_1.z.string(),
|
|
23
23
|
username: zod_1.z.string(),
|
|
24
24
|
total: zod_1.z.number(),
|
|
@@ -9,7 +9,7 @@ var GetRemnawaveSettingsCommand;
|
|
|
9
9
|
(function (GetRemnawaveSettingsCommand) {
|
|
10
10
|
GetRemnawaveSettingsCommand.url = api_1.REST_API.REMNAAWAVE_SETTINGS.GET;
|
|
11
11
|
GetRemnawaveSettingsCommand.TSQ_url = GetRemnawaveSettingsCommand.url;
|
|
12
|
-
GetRemnawaveSettingsCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.
|
|
12
|
+
GetRemnawaveSettingsCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.REMNAWAVE_SETTINGS_ROUTES.GET, 'get', 'Get Remnawave settings', { scope: 'get', kind: 'read' });
|
|
13
13
|
GetRemnawaveSettingsCommand.ResponseSchema = zod_1.z.object({
|
|
14
14
|
response: models_1.RemnawaveSettingsSchema,
|
|
15
15
|
});
|
|
@@ -9,7 +9,7 @@ var UpdateRemnawaveSettingsCommand;
|
|
|
9
9
|
(function (UpdateRemnawaveSettingsCommand) {
|
|
10
10
|
UpdateRemnawaveSettingsCommand.url = api_1.REST_API.REMNAAWAVE_SETTINGS.UPDATE;
|
|
11
11
|
UpdateRemnawaveSettingsCommand.TSQ_url = UpdateRemnawaveSettingsCommand.url;
|
|
12
|
-
UpdateRemnawaveSettingsCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.
|
|
12
|
+
UpdateRemnawaveSettingsCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.REMNAWAVE_SETTINGS_ROUTES.UPDATE, 'patch', 'Update Remnawave settings', { scope: 'update', kind: 'write' });
|
|
13
13
|
UpdateRemnawaveSettingsCommand.RequestBodySchema = zod_1.z.object({
|
|
14
14
|
passkeySettings: models_1.PasskeySettingsSchema.optional(),
|
|
15
15
|
oauth2Settings: models_1.Oauth2SettingsSchema.optional(),
|
package/build/frontend/commands/subscriptions/get-by/get-connection-keys-by-user-id.command.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetConnectionKeysByUserIdCommand = 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 GetConnectionKeysByUserIdCommand;
|
|
9
|
+
(function (GetConnectionKeysByUserIdCommand) {
|
|
10
|
+
GetConnectionKeysByUserIdCommand.url = api_1.REST_API.SUBSCRIPTIONS.GET_CONNECTION_KEYS_BY_USER_ID;
|
|
11
|
+
GetConnectionKeysByUserIdCommand.TSQ_url = GetConnectionKeysByUserIdCommand.url(':userId');
|
|
12
|
+
GetConnectionKeysByUserIdCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTIONS_ROUTES.GET_CONNECTION_KEYS_BY_USER_ID(':userId'), 'get', 'Get connection keys (base64 format) by user id', { scope: 'connection-keys', kind: 'read' });
|
|
13
|
+
GetConnectionKeysByUserIdCommand.RequestParamSchema = zod_1.z.object({
|
|
14
|
+
userId: models_1.numberParamSchema.describe('User ID'),
|
|
15
|
+
});
|
|
16
|
+
GetConnectionKeysByUserIdCommand.ResponseSchema = zod_1.z.object({
|
|
17
|
+
response: zod_1.z.object({
|
|
18
|
+
enabledKeys: zod_1.z.array(zod_1.z.string()),
|
|
19
|
+
hiddenKeys: zod_1.z.array(zod_1.z.string()),
|
|
20
|
+
disabledKeys: zod_1.z.array(zod_1.z.string()),
|
|
21
|
+
}),
|
|
22
|
+
});
|
|
23
|
+
})(GetConnectionKeysByUserIdCommand || (exports.GetConnectionKeysByUserIdCommand = GetConnectionKeysByUserIdCommand = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetSubscriptionByIdCommand = 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 GetSubscriptionByIdCommand;
|
|
9
|
+
(function (GetSubscriptionByIdCommand) {
|
|
10
|
+
GetSubscriptionByIdCommand.url = api_1.REST_API.SUBSCRIPTIONS.GET_BY.ID;
|
|
11
|
+
GetSubscriptionByIdCommand.TSQ_url = GetSubscriptionByIdCommand.url(':userId');
|
|
12
|
+
GetSubscriptionByIdCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTIONS_ROUTES.GET_BY.ID(':userId'), 'get', 'Get subscription by User ID', { scope: 'by-id', kind: 'read' });
|
|
13
|
+
GetSubscriptionByIdCommand.RequestParamSchema = zod_1.z.object({
|
|
14
|
+
userId: models_1.numberParamSchema.describe('User ID'),
|
|
15
|
+
});
|
|
16
|
+
GetSubscriptionByIdCommand.ResponseSchema = zod_1.z.object({
|
|
17
|
+
response: models_1.SubscriptionInfoSchema,
|
|
18
|
+
});
|
|
19
|
+
})(GetSubscriptionByIdCommand || (exports.GetSubscriptionByIdCommand = GetSubscriptionByIdCommand = {}));
|
|
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./get-connection-keys-by-
|
|
17
|
+
__exportStar(require("./get-connection-keys-by-user-id.command"), exports);
|
|
18
18
|
__exportStar(require("./get-raw-subscription-by-short-uuid.command"), exports);
|
|
19
19
|
__exportStar(require("./get-subscription-by-short-uuid-protected.command"), exports);
|
|
20
20
|
__exportStar(require("./get-subscription-by-username.command"), exports);
|
|
21
|
-
__exportStar(require("./get-subscription-by-
|
|
21
|
+
__exportStar(require("./get-subscription-by-user-id.command"), exports);
|
|
@@ -4,14 +4,15 @@ exports.DisableUserCommand = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const api_1 = require("../../../api");
|
|
6
6
|
const constants_1 = require("../../../constants");
|
|
7
|
+
const models_1 = require("../../../models");
|
|
7
8
|
const user_response_1 = require("../user.response");
|
|
8
9
|
var DisableUserCommand;
|
|
9
10
|
(function (DisableUserCommand) {
|
|
10
11
|
DisableUserCommand.url = api_1.REST_API.USERS.ACTIONS.DISABLE;
|
|
11
|
-
DisableUserCommand.TSQ_url = DisableUserCommand.url(':
|
|
12
|
-
DisableUserCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.USERS_ROUTES.ACTIONS.DISABLE(':
|
|
12
|
+
DisableUserCommand.TSQ_url = DisableUserCommand.url(':userId');
|
|
13
|
+
DisableUserCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.USERS_ROUTES.ACTIONS.DISABLE(':userId'), 'post', 'Disable user', { scope: 'disable', kind: 'write' });
|
|
13
14
|
DisableUserCommand.RequestParamSchema = zod_1.z.object({
|
|
14
|
-
|
|
15
|
+
userId: models_1.numberParamSchema,
|
|
15
16
|
});
|
|
16
17
|
DisableUserCommand.ResponseSchema = user_response_1.UserResponseSchema;
|
|
17
18
|
})(DisableUserCommand || (exports.DisableUserCommand = DisableUserCommand = {}));
|