@webzaytsev/support-sdk 0.1.4 → 0.1.6
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/dist/plugins.d.mts +26 -5
- package/dist/plugins.d.ts +26 -5
- package/package.json +1 -1
package/dist/plugins.d.mts
CHANGED
|
@@ -15,17 +15,38 @@ import { g as WebProfileDto } from './types.gen-Bkafu1bx.mjs';
|
|
|
15
15
|
* Extra fields consumed by the Remnawave plugin (/sub command, ticket info card).
|
|
16
16
|
*
|
|
17
17
|
* The plugin looks for a Remnawave user identifier in this priority order:
|
|
18
|
-
* 1. extra.userId
|
|
18
|
+
* 1. extra.userId ← recommended
|
|
19
19
|
* 2. extra.remnawave_user_id
|
|
20
20
|
* 3. extra.user_id
|
|
21
21
|
*
|
|
22
|
-
*
|
|
22
|
+
* ## How the plugin builds the config link
|
|
23
|
+
*
|
|
24
|
+
* The support-bot fetches the user's subscriptionUrl from the Remnawave API
|
|
25
|
+
* and builds a shareable link for the operator. You control the format via
|
|
26
|
+
* env variables on the support-bot side — no extra fields needed here:
|
|
27
|
+
*
|
|
28
|
+
* DEEPLINK_BASE_URL=https://your-vpn.ru
|
|
29
|
+
* HAPP_ENCRYPTION_ENABLED=true # encrypts via @kastov/cryptohapp v4
|
|
30
|
+
*
|
|
31
|
+
* With HAPP_ENCRYPTION_ENABLED=true:
|
|
32
|
+
* → {DEEPLINK_BASE_URL}?b64=BASE64URL
|
|
33
|
+
* Your frontend: atob(?b64=BASE64URL) → full happ://crypt4/... deep link
|
|
34
|
+
*
|
|
35
|
+
* Without (or HAPP_ENCRYPTION_ENABLED=false):
|
|
36
|
+
* → {DEEPLINK_BASE_URL}/?sub=SLUG
|
|
37
|
+
* Your frontend: handle ?sub= as you wish
|
|
38
|
+
*
|
|
39
|
+
* See docs/plugin-remnawave.md for the full integration guide.
|
|
23
40
|
*/
|
|
24
41
|
interface RemnawaveExtra {
|
|
25
42
|
/**
|
|
26
|
-
* Remnawave user
|
|
27
|
-
*
|
|
28
|
-
*
|
|
43
|
+
* Remnawave user UUID.
|
|
44
|
+
*
|
|
45
|
+
* For web-channel tickets: passed as extra.userId when your backend issues
|
|
46
|
+
* the support JWT (POST /web/auth/token).
|
|
47
|
+
*
|
|
48
|
+
* For TG-channel tickets: not needed — the plugin looks up the user by
|
|
49
|
+
* Telegram ID automatically.
|
|
29
50
|
*/
|
|
30
51
|
userId: string;
|
|
31
52
|
}
|
package/dist/plugins.d.ts
CHANGED
|
@@ -15,17 +15,38 @@ import { g as WebProfileDto } from './types.gen-Bkafu1bx.js';
|
|
|
15
15
|
* Extra fields consumed by the Remnawave plugin (/sub command, ticket info card).
|
|
16
16
|
*
|
|
17
17
|
* The plugin looks for a Remnawave user identifier in this priority order:
|
|
18
|
-
* 1. extra.userId
|
|
18
|
+
* 1. extra.userId ← recommended
|
|
19
19
|
* 2. extra.remnawave_user_id
|
|
20
20
|
* 3. extra.user_id
|
|
21
21
|
*
|
|
22
|
-
*
|
|
22
|
+
* ## How the plugin builds the config link
|
|
23
|
+
*
|
|
24
|
+
* The support-bot fetches the user's subscriptionUrl from the Remnawave API
|
|
25
|
+
* and builds a shareable link for the operator. You control the format via
|
|
26
|
+
* env variables on the support-bot side — no extra fields needed here:
|
|
27
|
+
*
|
|
28
|
+
* DEEPLINK_BASE_URL=https://your-vpn.ru
|
|
29
|
+
* HAPP_ENCRYPTION_ENABLED=true # encrypts via @kastov/cryptohapp v4
|
|
30
|
+
*
|
|
31
|
+
* With HAPP_ENCRYPTION_ENABLED=true:
|
|
32
|
+
* → {DEEPLINK_BASE_URL}?b64=BASE64URL
|
|
33
|
+
* Your frontend: atob(?b64=BASE64URL) → full happ://crypt4/... deep link
|
|
34
|
+
*
|
|
35
|
+
* Without (or HAPP_ENCRYPTION_ENABLED=false):
|
|
36
|
+
* → {DEEPLINK_BASE_URL}/?sub=SLUG
|
|
37
|
+
* Your frontend: handle ?sub= as you wish
|
|
38
|
+
*
|
|
39
|
+
* See docs/plugin-remnawave.md for the full integration guide.
|
|
23
40
|
*/
|
|
24
41
|
interface RemnawaveExtra {
|
|
25
42
|
/**
|
|
26
|
-
* Remnawave user
|
|
27
|
-
*
|
|
28
|
-
*
|
|
43
|
+
* Remnawave user UUID.
|
|
44
|
+
*
|
|
45
|
+
* For web-channel tickets: passed as extra.userId when your backend issues
|
|
46
|
+
* the support JWT (POST /web/auth/token).
|
|
47
|
+
*
|
|
48
|
+
* For TG-channel tickets: not needed — the plugin looks up the user by
|
|
49
|
+
* Telegram ID automatically.
|
|
29
50
|
*/
|
|
30
51
|
userId: string;
|
|
31
52
|
}
|