@remnawave/backend-contract 2.8.29 → 2.8.30
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/commands/api-tokens/create.command.d.ts +22 -13
- package/build/backend/commands/api-tokens/create.command.d.ts.map +1 -1
- package/build/backend/commands/api-tokens/create.command.js +5 -2
- package/build/backend/commands/api-tokens/find.command.d.ts +26 -26
- package/build/backend/commands/api-tokens/find.command.js +2 -2
- package/build/backend/commands/bandwidth-stats/nodes/get-stats-nodes-usage.command.d.ts +12 -12
- package/build/backend/commands/bandwidth-stats/users/get-stats-user-usage.command.d.ts +12 -12
- package/build/backend/commands/config-profiles/actions/reorder.command.d.ts +16 -16
- package/build/backend/commands/config-profiles/create-config-profile.command.d.ts +10 -10
- package/build/backend/commands/config-profiles/get-computed-config-profile-by-uuid.command.d.ts +10 -10
- package/build/backend/commands/config-profiles/get-config-profile-by-uuid.command.d.ts +10 -10
- package/build/backend/commands/config-profiles/get-config-profiles.command.d.ts +14 -14
- package/build/backend/commands/config-profiles/update-config-profile.command.d.ts +10 -10
- package/build/backend/commands/external-squads/actions/reorder.command.d.ts +6 -6
- package/build/backend/commands/external-squads/create-external-squad.command.d.ts +4 -4
- package/build/backend/commands/external-squads/get-external-squad-by-uuid.command.d.ts +4 -4
- package/build/backend/commands/external-squads/get-external-squads.command.d.ts +6 -6
- package/build/backend/commands/external-squads/update-external-squad.command.d.ts +4 -4
- package/build/backend/commands/infra-billing/create-billing-node.command.d.ts +28 -28
- package/build/backend/commands/infra-billing/create-infra-provider.command.d.ts +4 -4
- package/build/backend/commands/infra-billing/delete-billing-node-by-uuid.command.d.ts +26 -26
- package/build/backend/commands/infra-billing/get-billing-nodes.command.d.ts +26 -26
- package/build/backend/commands/infra-billing/get-infra-provider-by-uuid.command.d.ts +4 -4
- package/build/backend/commands/infra-billing/get-infra-providers.command.d.ts +6 -6
- package/build/backend/commands/infra-billing/update-billing-node.command.d.ts +26 -26
- package/build/backend/commands/infra-billing/update-infra-provider.command.d.ts +4 -4
- package/build/backend/commands/internal-squads/actions/reorder.command.d.ts +6 -6
- package/build/backend/commands/internal-squads/create-internal-squad.command.d.ts +4 -4
- package/build/backend/commands/internal-squads/get-internal-squad-by-uuid.d.ts +4 -4
- package/build/backend/commands/internal-squads/get-internal-squads.command.d.ts +6 -6
- package/build/backend/commands/internal-squads/update-internal-squad.command.d.ts +4 -4
- package/build/backend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports-stats.command.d.ts +6 -6
- package/build/backend/commands/node-plugins/torrent-blocker/get-torrent-blocker-reports.command.d.ts +11 -11
- package/build/backend/commands/node-plugins/torrent-blocker/truncate-torrent-blocker-reports.command.d.ts +11 -11
- package/build/backend/commands/nodes/actions/disable.command.d.ts +10 -10
- package/build/backend/commands/nodes/actions/enable.command.d.ts +10 -10
- package/build/backend/commands/nodes/actions/reorder.command.d.ts +12 -12
- package/build/backend/commands/nodes/create.command.d.ts +11 -11
- package/build/backend/commands/nodes/get-all.command.d.ts +10 -10
- package/build/backend/commands/nodes/get-one.command.d.ts +10 -10
- package/build/backend/commands/nodes/update.command.d.ts +14 -14
- package/build/backend/commands/passkeys/delete-passkeys.command.d.ts +6 -6
- package/build/backend/commands/passkeys/get-active-passkeys.command.d.ts +6 -6
- package/build/backend/commands/passkeys/update-passkey.command.d.ts +6 -6
- package/build/backend/commands/subscription-settings/get-subscription-settings.command.d.ts +8 -8
- package/build/backend/commands/subscription-settings/update-subscription-settings.command.d.ts +14 -14
- package/build/backend/commands/subscriptions/get-by/get-raw-subscription-by-short-uuid.command.d.ts +6 -6
- package/build/backend/commands/system/testers/test-srr-matcher.command.d.ts +12 -12
- package/build/backend/commands/users/actions/disable-user.command.d.ts +4 -4
- package/build/backend/commands/users/actions/enable-user.command.d.ts +4 -4
- package/build/backend/commands/users/actions/reset-user-traffic.command.d.ts +4 -4
- package/build/backend/commands/users/actions/revoke-user-subscription.command.d.ts +4 -4
- package/build/backend/commands/users/bulk/bulk-update-users.command.d.ts +4 -4
- package/build/backend/commands/users/bulk-all/bulk-all-update-users.command.d.ts +2 -2
- package/build/backend/commands/users/create-user.command.d.ts +6 -6
- package/build/backend/commands/users/get-all-users.command.d.ts +6 -6
- package/build/backend/commands/users/get-by/get-user-by-email.command.d.ts +4 -4
- package/build/backend/commands/users/get-by/get-user-by-id.command.d.ts +4 -4
- package/build/backend/commands/users/get-by/get-user-by-short-uuid.command.d.ts +4 -4
- package/build/backend/commands/users/get-by/get-user-by-tag.command.d.ts +4 -4
- package/build/backend/commands/users/get-by/get-user-by-telegram-id.command.d.ts +4 -4
- package/build/backend/commands/users/get-by/get-user-by-username.command.d.ts +4 -4
- package/build/backend/commands/users/get-user-by-uuid.command.d.ts +4 -4
- package/build/backend/commands/users/get-users-stream.command.d.ts +6 -6
- package/build/backend/commands/users/update-user.command.d.ts +8 -8
- package/build/backend/constants/events/events.d.ts +2 -0
- package/build/backend/constants/events/events.d.ts.map +1 -1
- package/build/backend/constants/events/events.js +2 -0
- package/build/backend/models/api-tokens.schema.d.ts +6 -6
- package/build/backend/models/api-tokens.schema.d.ts.map +1 -1
- package/build/backend/models/api-tokens.schema.js +5 -2
- package/build/backend/models/config-profile.schema.d.ts +6 -6
- package/build/backend/models/extended-users.schema.d.ts +2 -2
- package/build/backend/models/external-squad.schema.d.ts +2 -2
- package/build/backend/models/infra-billing-available-node.schema.d.ts +5 -5
- package/build/backend/models/infra-billing-node.schema.d.ts +9 -9
- package/build/backend/models/infra-provider.schema.d.ts +4 -4
- package/build/backend/models/internal-squad.schema.d.ts +2 -2
- package/build/backend/models/nodes.schema.d.ts +6 -6
- package/build/backend/models/response-rules/response-rule.schema.d.ts +4 -4
- package/build/backend/models/response-rules/response-rules-config.schema.d.ts +4 -4
- package/build/backend/models/subscription-settings.schema.d.ts +6 -6
- package/build/backend/models/torrent-blocker-report.schema.d.ts +7 -7
- package/build/backend/models/users.schema.d.ts +2 -2
- package/build/backend/models/webhook/webhook.schema.d.ts +86 -86
- package/build/frontend/commands/api-tokens/create.command.js +5 -2
- package/build/frontend/commands/api-tokens/find.command.js +2 -2
- package/build/frontend/constants/events/events.js +2 -0
- package/build/frontend/models/api-tokens.schema.js +5 -2
- package/package.json +1 -1
|
@@ -11,10 +11,13 @@ var CreateApiTokenCommand;
|
|
|
11
11
|
CreateApiTokenCommand.TSQ_url = CreateApiTokenCommand.url;
|
|
12
12
|
CreateApiTokenCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.API_TOKENS_ROUTES.CREATE, 'post', 'Create a new API token', { scope: 'create', kind: 'write' }, 'This endpoint is forbidden to use via "API-key". It can only be used with an admin JWT-token.');
|
|
13
13
|
CreateApiTokenCommand.RequestSchema = zod_1.z.object({
|
|
14
|
-
|
|
14
|
+
name: zod_1.z.string().min(2).max(30),
|
|
15
|
+
expiresInDays: zod_1.z.number().min(1),
|
|
15
16
|
scopes: zod_1.z.array(zod_1.z.string()).optional().default(['*']),
|
|
16
17
|
});
|
|
17
18
|
CreateApiTokenCommand.ResponseSchema = zod_1.z.object({
|
|
18
|
-
response: api_tokens_schema_1.ApiTokensSchema
|
|
19
|
+
response: api_tokens_schema_1.ApiTokensSchema.extend({
|
|
20
|
+
token: zod_1.z.string(),
|
|
21
|
+
}),
|
|
19
22
|
});
|
|
20
23
|
})(CreateApiTokenCommand || (exports.CreateApiTokenCommand = CreateApiTokenCommand = {}));
|
|
@@ -12,9 +12,9 @@ var FindAllApiTokensCommand;
|
|
|
12
12
|
FindAllApiTokensCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.API_TOKENS_ROUTES.GET, 'get', 'Get all API tokens', { scope: 'list', kind: 'read' }, 'This endpoint is forbidden to use via "API-key". It can only be used with admin JWT-token.');
|
|
13
13
|
FindAllApiTokensCommand.ResponseSchema = zod_1.z.object({
|
|
14
14
|
response: zod_1.z.object({
|
|
15
|
-
|
|
15
|
+
tokens: zod_1.z.array(api_tokens_schema_1.ApiTokensSchema),
|
|
16
16
|
docs: zod_1.z.object({
|
|
17
|
-
|
|
17
|
+
enabled: zod_1.z.boolean(),
|
|
18
18
|
scalarPath: zod_1.z.string().nullable(),
|
|
19
19
|
swaggerPath: zod_1.z.string().nullable(),
|
|
20
20
|
}),
|
|
@@ -54,6 +54,8 @@ exports.EVENTS = {
|
|
|
54
54
|
LOGIN_ATTEMPT_FAILED: 'service.login_attempt_failed',
|
|
55
55
|
LOGIN_ATTEMPT_SUCCESS: 'service.login_attempt_success',
|
|
56
56
|
SUBPAGE_CONFIG_CHANGED: 'service.subpage_config_changed',
|
|
57
|
+
API_TOKEN_CREATED: 'service.api_token_created',
|
|
58
|
+
API_TOKEN_DELETED: 'service.api_token_deleted',
|
|
57
59
|
},
|
|
58
60
|
ERRORS: {
|
|
59
61
|
BANDWIDTH_USAGE_THRESHOLD_REACHED_MAX_NOTIFICATIONS: 'errors.bandwidth_usage_threshold_reached_max_notifications',
|
|
@@ -4,8 +4,11 @@ exports.ApiTokensSchema = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.ApiTokensSchema = zod_1.z.object({
|
|
6
6
|
uuid: zod_1.z.string().uuid(),
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
name: zod_1.z.string(),
|
|
8
|
+
expireAt: zod_1.z
|
|
9
|
+
.string()
|
|
10
|
+
.datetime()
|
|
11
|
+
.transform((str) => new Date(str)),
|
|
9
12
|
scopes: zod_1.z.array(zod_1.z.string()),
|
|
10
13
|
createdAt: zod_1.z
|
|
11
14
|
.string()
|
package/package.json
CHANGED