@remnawave/backend-contract 3.4.0 → 3.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/build/backend/api/controllers/connections.d.ts +2 -0
  2. package/build/backend/api/controllers/connections.d.ts.map +1 -1
  3. package/build/backend/api/controllers/connections.js +4 -0
  4. package/build/backend/api/routes.d.ts +2 -0
  5. package/build/backend/api/routes.d.ts.map +1 -1
  6. package/build/backend/api/routes.js +2 -0
  7. package/build/backend/commands/connections/geocheck-by-node-result.command.d.ts +37 -0
  8. package/build/backend/commands/connections/geocheck-by-node-result.command.d.ts.map +1 -0
  9. package/build/backend/commands/connections/geocheck-by-node-result.command.js +39 -0
  10. package/build/backend/commands/connections/geocheck-by-node.command.d.ts +22 -0
  11. package/build/backend/commands/connections/geocheck-by-node.command.d.ts.map +1 -0
  12. package/build/backend/commands/connections/geocheck-by-node.command.js +29 -0
  13. package/build/backend/commands/connections/index.d.ts +2 -0
  14. package/build/backend/commands/connections/index.d.ts.map +1 -1
  15. package/build/backend/commands/connections/index.js +2 -0
  16. package/build/backend/commands/hosts/bulk/update-many-hosts.command.d.ts +12 -0
  17. package/build/backend/commands/hosts/bulk/update-many-hosts.command.d.ts.map +1 -1
  18. package/build/backend/commands/hosts/create.command.d.ts +24 -0
  19. package/build/backend/commands/hosts/create.command.d.ts.map +1 -1
  20. package/build/backend/commands/hosts/get-host.command.d.ts +12 -0
  21. package/build/backend/commands/hosts/get-host.command.d.ts.map +1 -1
  22. package/build/backend/commands/hosts/get-hosts.command.d.ts +12 -0
  23. package/build/backend/commands/hosts/get-hosts.command.d.ts.map +1 -1
  24. package/build/backend/commands/hosts/host.response.d.ts +12 -0
  25. package/build/backend/commands/hosts/host.response.d.ts.map +1 -1
  26. package/build/backend/commands/hosts/update.command.d.ts +24 -0
  27. package/build/backend/commands/hosts/update.command.d.ts.map +1 -1
  28. package/build/backend/commands/subscriptions/get-by/get-raw-subscription-by-short-uuid.command.d.ts +12 -0
  29. package/build/backend/commands/subscriptions/get-by/get-raw-subscription-by-short-uuid.command.d.ts.map +1 -1
  30. package/build/backend/models/host-mapper/host-mapper.schema.d.ts +24 -0
  31. package/build/backend/models/host-mapper/host-mapper.schema.d.ts.map +1 -1
  32. package/build/backend/models/host-mapper/host-mapper.schema.js +45 -3
  33. package/build/backend/models/hosts.schema.d.ts +12 -0
  34. package/build/backend/models/hosts.schema.d.ts.map +1 -1
  35. package/build/backend/models/resolved-proxy-config.schema.d.ts +24 -0
  36. package/build/backend/models/resolved-proxy-config.schema.d.ts.map +1 -1
  37. package/build/frontend/api/controllers/connections.js +4 -0
  38. package/build/frontend/api/routes.js +2 -0
  39. package/build/frontend/commands/connections/geocheck-by-node-result.command.js +39 -0
  40. package/build/frontend/commands/connections/geocheck-by-node.command.js +29 -0
  41. package/build/frontend/commands/connections/index.js +2 -0
  42. package/build/frontend/models/host-mapper/host-mapper.schema.js +45 -3
  43. package/package.json +1 -1
@@ -4,6 +4,8 @@ export declare const CONNECTIONS_ROUTES: {
4
4
  readonly CONNECTIONS_BY_USER_RESULT: (jobId: string) => string;
5
5
  readonly CONNECTIONS_BY_NODE: (uuid: string) => string;
6
6
  readonly CONNECTIONS_BY_NODE_RESULT: (jobId: string) => string;
7
+ readonly GEOCHECK_BY_NODE: (uuid: string) => string;
8
+ readonly GEOCHECK_BY_NODE_RESULT: (jobId: string) => string;
7
9
  readonly DROP_CONNECTIONS: "drop";
8
10
  };
9
11
  //# sourceMappingURL=connections.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"connections.d.ts","sourceRoot":"","sources":["../../../../api/controllers/connections.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,EAAG,aAAsB,CAAC;AAE7D,eAAO,MAAM,kBAAkB;2CAEG,MAAM;iDAEA,MAAM;yCAGd,MAAM;iDAEE,MAAM;;CAIpC,CAAC"}
1
+ {"version":3,"file":"connections.d.ts","sourceRoot":"","sources":["../../../../api/controllers/connections.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,EAAG,aAAsB,CAAC;AAE7D,eAAO,MAAM,kBAAkB;2CAEG,MAAM;iDAEA,MAAM;yCAGd,MAAM;iDAEE,MAAM;sCAGjB,MAAM;8CAEE,MAAM;;CAIjC,CAAC"}
@@ -12,5 +12,9 @@ exports.CONNECTIONS_ROUTES = {
12
12
  // GET
13
13
  CONNECTIONS_BY_NODE_RESULT: (jobId) => `by-node/${jobId}`,
14
14
  // POST
15
+ GEOCHECK_BY_NODE: (uuid) => `geocheck/${uuid}`,
16
+ // GET
17
+ GEOCHECK_BY_NODE_RESULT: (jobId) => `geocheck/${jobId}`,
18
+ // POST
15
19
  DROP_CONNECTIONS: 'drop',
16
20
  };
@@ -320,6 +320,8 @@ export declare const REST_API: {
320
320
  readonly CONNECTIONS_BY_USER_RESULT: (jobId: string) => string;
321
321
  readonly CONNECTIONS_BY_NODE: (uuid: string) => string;
322
322
  readonly CONNECTIONS_BY_NODE_RESULT: (jobId: string) => string;
323
+ readonly GEOCHECK_BY_NODE: (uuid: string) => string;
324
+ readonly GEOCHECK_BY_NODE_RESULT: (jobId: string) => string;
323
325
  readonly DROP_CONNECTIONS: "/api/connections/drop";
324
326
  };
325
327
  readonly METADATA: {
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AACpC,eAAO,MAAM,YAAY,EAAG,UAAmB,CAAC;AAChD,eAAO,MAAM,WAAW,EAAG,SAAkB,CAAC;AAE9C,eAAO,MAAM,kBAAkB,EAAG,gBAAyB,CAAC;AAC5D,eAAO,MAAM,cAAc,EAAG,uBAAgC,CAAC;AAC/D,eAAO,MAAM,YAAY,EAAG,wBAAiC,CAAC;AAC9D,eAAO,MAAM,WAAW,EAAG,uBAAgC,CAAC;AAE5D,eAAO,MAAM,QAAQ;;;;;;;;;;;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M;;;;6CAMP,MAAM;;;gDAKH,MAAM;;;;;;;;;;;;;;;;;;;qCAqBjB,MAAM;gCAIX,MAAM;;uCAKC,MAAM;0CAEH,MAAM;;;;;;;;;;;6BAYnB,MAAM;;;gCAIH,MAAM;;;;;;;;6BAST,MAAM;;;gCAIH,MAAM;;;;6BAKT,MAAM;;;gCAIH,MAAM;;;;;;;;;;iCAWL,MAAM;;;oCAIH,MAAM;;;;;;;;;;;;;;;uCAiBH,MAAM;;;;;yCAMJ,MAAM;;;uCAIR,MAAM;6CAEA,MAAM,UAAU,MAAM;;;;+CAKpB,MAAM;qDAEA,MAAM;6CAEd,MAAM;qDAEE,MAAM;0CAEjB,MAAM;kDAEE,MAAM;;;;;iCAMvB,MAAM;oCAEH,MAAM;;;mCAIP,MAAM;sCAEH,MAAM;;;CAIzB,CAAC"}
@@ -357,6 +357,8 @@ exports.REST_API = {
357
357
  CONNECTIONS_BY_USER_RESULT: (jobId) => `${exports.ROOT}/${CONTROLLERS.CONNECTIONS_CONTROLLER}/${CONTROLLERS.CONNECTIONS_ROUTES.CONNECTIONS_BY_USER_RESULT(jobId)}`,
358
358
  CONNECTIONS_BY_NODE: (uuid) => `${exports.ROOT}/${CONTROLLERS.CONNECTIONS_CONTROLLER}/${CONTROLLERS.CONNECTIONS_ROUTES.CONNECTIONS_BY_NODE(uuid)}`,
359
359
  CONNECTIONS_BY_NODE_RESULT: (jobId) => `${exports.ROOT}/${CONTROLLERS.CONNECTIONS_CONTROLLER}/${CONTROLLERS.CONNECTIONS_ROUTES.CONNECTIONS_BY_NODE_RESULT(jobId)}`,
360
+ GEOCHECK_BY_NODE: (uuid) => `${exports.ROOT}/${CONTROLLERS.CONNECTIONS_CONTROLLER}/${CONTROLLERS.CONNECTIONS_ROUTES.GEOCHECK_BY_NODE(uuid)}`,
361
+ GEOCHECK_BY_NODE_RESULT: (jobId) => `${exports.ROOT}/${CONTROLLERS.CONNECTIONS_CONTROLLER}/${CONTROLLERS.CONNECTIONS_ROUTES.GEOCHECK_BY_NODE_RESULT(jobId)}`,
360
362
  DROP_CONNECTIONS: `${exports.ROOT}/${CONTROLLERS.CONNECTIONS_CONTROLLER}/${CONTROLLERS.CONNECTIONS_ROUTES.DROP_CONNECTIONS}`,
361
363
  },
362
364
  METADATA: {
@@ -0,0 +1,37 @@
1
+ import { z } from 'zod';
2
+ export declare namespace GeocheckByNodeResultCommand {
3
+ const url: (jobId: string) => string;
4
+ const TSQ_url: string;
5
+ const endpointDetails: import("../../constants").EndpointDetails;
6
+ const RequestParamSchema: z.ZodObject<{
7
+ jobId: z.ZodString;
8
+ }, z.core.$strip>;
9
+ const GeocheckImageSchema: z.ZodObject<{
10
+ format: z.ZodLiteral<"svg">;
11
+ media_type: z.ZodLiteral<"image/svg+xml">;
12
+ encoding: z.ZodLiteral<"base64">;
13
+ data: z.ZodString;
14
+ }, z.core.$strip>;
15
+ const ResponseSchema: z.ZodObject<{
16
+ response: z.ZodObject<{
17
+ isCompleted: z.ZodBoolean;
18
+ isFailed: z.ZodBoolean;
19
+ result: z.ZodNullable<z.ZodObject<{
20
+ success: z.ZodBoolean;
21
+ nodeUuid: z.ZodUUID;
22
+ image: z.ZodNullable<z.ZodObject<{
23
+ format: z.ZodLiteral<"svg">;
24
+ media_type: z.ZodLiteral<"image/svg+xml">;
25
+ encoding: z.ZodLiteral<"base64">;
26
+ data: z.ZodString;
27
+ }, z.core.$strip>>;
28
+ rawReport: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
29
+ message: z.ZodNullable<z.ZodString>;
30
+ }, z.core.$strip>>;
31
+ }, z.core.$strip>;
32
+ }, z.core.$strip>;
33
+ type GeocheckImage = z.infer<typeof GeocheckImageSchema>;
34
+ type RequestParam = z.infer<typeof RequestParamSchema>;
35
+ type Response = z.infer<typeof ResponseSchema>;
36
+ }
37
+ //# sourceMappingURL=geocheck-by-node-result.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geocheck-by-node-result.command.d.ts","sourceRoot":"","sources":["../../../../commands/connections/geocheck-by-node-result.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,2BAA2B,CAAC;IAClC,MAAM,GAAG,2BAA+C,CAAC;IACzD,MAAM,OAAO,QAAgB,CAAC;IAE9B,MAAM,eAAe,2CAK3B,CAAC;IAEK,MAAM,kBAAkB;;qBAE7B,CAAC;IAEI,MAAM,mBAAmB;;;;;qBAK9B,CAAC;IAEI,MAAM,cAAc;;;;;;;;;;;;;;;;;qBAiBzB,CAAC;IAEH,KAAY,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;IAChE,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAC9D,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GeocheckByNodeResultCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const api_1 = require("../../api");
6
+ const constants_1 = require("../../constants");
7
+ var GeocheckByNodeResultCommand;
8
+ (function (GeocheckByNodeResultCommand) {
9
+ GeocheckByNodeResultCommand.url = api_1.REST_API.CONNECTIONS.GEOCHECK_BY_NODE_RESULT;
10
+ GeocheckByNodeResultCommand.TSQ_url = GeocheckByNodeResultCommand.url(':jobId');
11
+ GeocheckByNodeResultCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.CONNECTIONS_ROUTES.GEOCHECK_BY_NODE_RESULT(':jobId'), 'get', 'Get Geocheck for Node by Job ID', { scope: 'geocheck-result', kind: 'read' });
12
+ GeocheckByNodeResultCommand.RequestParamSchema = zod_1.z.object({
13
+ jobId: zod_1.z.string(),
14
+ });
15
+ GeocheckByNodeResultCommand.GeocheckImageSchema = zod_1.z.object({
16
+ format: zod_1.z.literal('svg'),
17
+ media_type: zod_1.z.literal('image/svg+xml'),
18
+ encoding: zod_1.z.literal('base64'),
19
+ data: zod_1.z.string().describe('Base64-encoded image, ready for a data: URL'),
20
+ });
21
+ GeocheckByNodeResultCommand.ResponseSchema = zod_1.z.object({
22
+ response: zod_1.z.object({
23
+ isCompleted: zod_1.z.boolean(),
24
+ isFailed: zod_1.z.boolean(),
25
+ result: zod_1.z
26
+ .object({
27
+ success: zod_1.z.boolean(),
28
+ nodeUuid: zod_1.z.uuid(),
29
+ image: GeocheckByNodeResultCommand.GeocheckImageSchema.nullable(),
30
+ rawReport: zod_1.z
31
+ .record(zod_1.z.string(), zod_1.z.unknown())
32
+ .nullable()
33
+ .describe('The full node report with the image object stripped out'),
34
+ message: zod_1.z.string().nullable(),
35
+ })
36
+ .nullable(),
37
+ }),
38
+ });
39
+ })(GeocheckByNodeResultCommand || (exports.GeocheckByNodeResultCommand = GeocheckByNodeResultCommand = {}));
@@ -0,0 +1,22 @@
1
+ import { z } from 'zod';
2
+ export declare namespace GeocheckByNodeCommand {
3
+ const url: (uuid: string) => string;
4
+ const TSQ_url: string;
5
+ const endpointDetails: import("../../constants").EndpointDetails;
6
+ const RequestParamSchema: z.ZodObject<{
7
+ nodeUuid: z.ZodUUID;
8
+ }, z.core.$strip>;
9
+ const RequestBodySchema: z.ZodObject<{
10
+ ip: z.ZodOptional<z.ZodString>;
11
+ interface: z.ZodOptional<z.ZodString>;
12
+ }, z.core.$strip>;
13
+ const ResponseSchema: z.ZodObject<{
14
+ response: z.ZodObject<{
15
+ jobId: z.ZodString;
16
+ }, z.core.$strip>;
17
+ }, z.core.$strip>;
18
+ type RequestBody = z.infer<typeof RequestBodySchema>;
19
+ type RequestParam = z.infer<typeof RequestParamSchema>;
20
+ type Response = z.infer<typeof ResponseSchema>;
21
+ }
22
+ //# sourceMappingURL=geocheck-by-node.command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geocheck-by-node.command.d.ts","sourceRoot":"","sources":["../../../../commands/connections/geocheck-by-node.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,qBAAqB,CAAC;IAC5B,MAAM,GAAG,0BAAwC,CAAC;IAClD,MAAM,OAAO,QAAmB,CAAC;IAEjC,MAAM,eAAe,2CAM3B,CAAC;IAEK,MAAM,kBAAkB;;qBAE7B,CAAC;IAEI,MAAM,iBAAiB;;;qBAQxB,CAAC;IAEA,MAAM,cAAc;;;;qBAIzB,CAAC;IAEH,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;IAC5D,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAC9D,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GeocheckByNodeCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const api_1 = require("../../api");
6
+ const constants_1 = require("../../constants");
7
+ var GeocheckByNodeCommand;
8
+ (function (GeocheckByNodeCommand) {
9
+ GeocheckByNodeCommand.url = api_1.REST_API.CONNECTIONS.GEOCHECK_BY_NODE;
10
+ GeocheckByNodeCommand.TSQ_url = GeocheckByNodeCommand.url(':nodeUuid');
11
+ GeocheckByNodeCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.CONNECTIONS_ROUTES.GEOCHECK_BY_NODE(':nodeUuid'), 'post', 'Request Geocheck for Node', { scope: 'geocheck', kind: 'read' }, 'Queues a geocheck on the node and returns a job ID. Poll "Get Geocheck for Node by Job ID" for the result, the node may take up to a minute to answer.');
12
+ GeocheckByNodeCommand.RequestParamSchema = zod_1.z.object({
13
+ nodeUuid: zod_1.z.uuid().describe('Node UUID'),
14
+ });
15
+ GeocheckByNodeCommand.RequestBodySchema = zod_1.z
16
+ .object({
17
+ ip: zod_1.z.string().optional().describe('Check from this IP address'),
18
+ interface: zod_1.z.string().optional().describe('Check from this network interface'),
19
+ })
20
+ .refine((data) => !(data.ip && data.interface), {
21
+ message: 'Only one of "ip" or "interface" can be specified',
22
+ path: ['ip'],
23
+ });
24
+ GeocheckByNodeCommand.ResponseSchema = zod_1.z.object({
25
+ response: zod_1.z.object({
26
+ jobId: zod_1.z.string(),
27
+ }),
28
+ });
29
+ })(GeocheckByNodeCommand || (exports.GeocheckByNodeCommand = GeocheckByNodeCommand = {}));
@@ -3,4 +3,6 @@ export * from './connections-by-user-result.command';
3
3
  export * from './connections-by-user.command';
4
4
  export * from './connections-by-node-result.command';
5
5
  export * from './connections-by-node.command';
6
+ export * from './geocheck-by-node-result.command';
7
+ export * from './geocheck-by-node.command';
6
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/connections/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sCAAsC,CAAC;AACrD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sCAAsC,CAAC;AACrD,cAAc,+BAA+B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/connections/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sCAAsC,CAAC;AACrD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sCAAsC,CAAC;AACrD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mCAAmC,CAAC;AAClD,cAAc,4BAA4B,CAAC"}
@@ -19,3 +19,5 @@ __exportStar(require("./connections-by-user-result.command"), exports);
19
19
  __exportStar(require("./connections-by-user.command"), exports);
20
20
  __exportStar(require("./connections-by-node-result.command"), exports);
21
21
  __exportStar(require("./connections-by-node.command"), exports);
22
+ __exportStar(require("./geocheck-by-node-result.command"), exports);
23
+ __exportStar(require("./geocheck-by-node.command"), exports);
@@ -55,6 +55,18 @@ export declare namespace UpdateManyHostsCommand {
55
55
  op: z.ZodLiteral<"unset">;
56
56
  to: z.ZodString;
57
57
  }, z.core.$strip>], "op">>>;
58
+ singbox: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
59
+ op: z.ZodLiteral<"copy">;
60
+ from: z.ZodString;
61
+ to: z.ZodString;
62
+ }, z.core.$strip>, z.ZodObject<{
63
+ op: z.ZodLiteral<"set">;
64
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
65
+ to: z.ZodString;
66
+ }, z.core.$strip>, z.ZodObject<{
67
+ op: z.ZodLiteral<"unset">;
68
+ to: z.ZodString;
69
+ }, z.core.$strip>], "op">>>;
58
70
  }, z.core.$strip>>>;
59
71
  remark: z.ZodOptional<z.ZodOptional<z.ZodString>>;
60
72
  address: z.ZodOptional<z.ZodOptional<z.ZodString>>;
@@ -1 +1 @@
1
- {"version":3,"file":"update-many-hosts.command.d.ts","sourceRoot":"","sources":["../../../../../commands/hosts/bulk/update-many-hosts.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,sBAAsB,CAAC;IAC7B,MAAM,GAAG,0BAA6B,CAAC;IACvC,MAAM,OAAO,0BAAM,CAAC;IAEpB,MAAM,eAAe,8CAK3B,CAAC;IAEK,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAIxB,CAAC;IAEP,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;CAC/D"}
1
+ {"version":3,"file":"update-many-hosts.command.d.ts","sourceRoot":"","sources":["../../../../../commands/hosts/bulk/update-many-hosts.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,sBAAsB,CAAC;IAC7B,MAAM,GAAG,0BAA6B,CAAC;IACvC,MAAM,OAAO,0BAAM,CAAC;IAEpB,MAAM,eAAe,8CAK3B,CAAC;IAEK,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAIxB,CAAC;IAEP,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;CAC/D"}
@@ -98,6 +98,18 @@ export declare namespace CreateHostCommand {
98
98
  op: z.ZodLiteral<"unset">;
99
99
  to: z.ZodString;
100
100
  }, z.core.$strip>], "op">>>;
101
+ singbox: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
102
+ op: z.ZodLiteral<"copy">;
103
+ from: z.ZodString;
104
+ to: z.ZodString;
105
+ }, z.core.$strip>, z.ZodObject<{
106
+ op: z.ZodLiteral<"set">;
107
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
108
+ to: z.ZodString;
109
+ }, z.core.$strip>, z.ZodObject<{
110
+ op: z.ZodLiteral<"unset">;
111
+ to: z.ZodString;
112
+ }, z.core.$strip>], "op">>>;
101
113
  }, z.core.$strip>>;
102
114
  }, z.core.$strip>;
103
115
  const ResponseSchema: z.ZodObject<{
@@ -198,6 +210,18 @@ export declare namespace CreateHostCommand {
198
210
  op: z.ZodLiteral<"unset">;
199
211
  to: z.ZodString;
200
212
  }, z.core.$strip>], "op">>>;
213
+ singbox: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
214
+ op: z.ZodLiteral<"copy">;
215
+ from: z.ZodString;
216
+ to: z.ZodString;
217
+ }, z.core.$strip>, z.ZodObject<{
218
+ op: z.ZodLiteral<"set">;
219
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
220
+ to: z.ZodString;
221
+ }, z.core.$strip>, z.ZodObject<{
222
+ op: z.ZodLiteral<"unset">;
223
+ to: z.ZodString;
224
+ }, z.core.$strip>], "op">>>;
201
225
  }, z.core.$strip>;
202
226
  }, z.core.$strip>;
203
227
  }, z.core.$strip>;
@@ -1 +1 @@
1
- {"version":3,"file":"create.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/create.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,eAAwB,CAAC;IAClC,MAAM,OAAO,eAAM,CAAC;IAEpB,MAAM,eAAe,2CAK3B,CAAC;IAEK,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAqD5B,CAAC;IAEI,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAqB,CAAC;IAEjD,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;IAC5D,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"create.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/create.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,eAAwB,CAAC;IAClC,MAAM,OAAO,eAAM,CAAC;IAEpB,MAAM,eAAe,2CAK3B,CAAC;IAEK,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAqD5B,CAAC;IAEI,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAqB,CAAC;IAEjD,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;IAC5D,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -104,6 +104,18 @@ export declare namespace GetHostCommand {
104
104
  op: z.ZodLiteral<"unset">;
105
105
  to: z.ZodString;
106
106
  }, z.core.$strip>], "op">>>;
107
+ singbox: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
108
+ op: z.ZodLiteral<"copy">;
109
+ from: z.ZodString;
110
+ to: z.ZodString;
111
+ }, z.core.$strip>, z.ZodObject<{
112
+ op: z.ZodLiteral<"set">;
113
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
114
+ to: z.ZodString;
115
+ }, z.core.$strip>, z.ZodObject<{
116
+ op: z.ZodLiteral<"unset">;
117
+ to: z.ZodString;
118
+ }, z.core.$strip>], "op">>>;
107
119
  }, z.core.$strip>;
108
120
  }, z.core.$strip>;
109
121
  }, z.core.$strip>;
@@ -1 +1 @@
1
- {"version":3,"file":"get-host.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/get-host.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,cAAc,CAAC;IACrB,MAAM,GAAG,0BAA6B,CAAC;IACvC,MAAM,OAAO,QAAe,CAAC;IAE7B,MAAM,eAAe,2CAK3B,CAAC;IAEK,MAAM,kBAAkB;;qBAE7B,CAAC;IAEI,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAqB,CAAC;IAEjD,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAC9D,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"get-host.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/get-host.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,cAAc,CAAC;IACrB,MAAM,GAAG,0BAA6B,CAAC;IACvC,MAAM,OAAO,QAAe,CAAC;IAE7B,MAAM,eAAe,2CAK3B,CAAC;IAEK,MAAM,kBAAkB;;qBAE7B,CAAC;IAEI,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAqB,CAAC;IAEjD,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAC9D,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -101,6 +101,18 @@ export declare namespace GetHostsCommand {
101
101
  op: z.ZodLiteral<"unset">;
102
102
  to: z.ZodString;
103
103
  }, z.core.$strip>], "op">>>;
104
+ singbox: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
105
+ op: z.ZodLiteral<"copy">;
106
+ from: z.ZodString;
107
+ to: z.ZodString;
108
+ }, z.core.$strip>, z.ZodObject<{
109
+ op: z.ZodLiteral<"set">;
110
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
111
+ to: z.ZodString;
112
+ }, z.core.$strip>, z.ZodObject<{
113
+ op: z.ZodLiteral<"unset">;
114
+ to: z.ZodString;
115
+ }, z.core.$strip>], "op">>>;
104
116
  }, z.core.$strip>;
105
117
  }, z.core.$strip>>;
106
118
  }, z.core.$strip>;
@@ -1 +1 @@
1
- {"version":3,"file":"get-hosts.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/get-hosts.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,eAAe,CAAC;IACtB,MAAM,GAAG,eAAqB,CAAC;IAC/B,MAAM,OAAO,eAAM,CAAC;IAEpB,MAAM,eAAe,2CAG1B,CAAC;IAEI,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"get-hosts.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/get-hosts.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,eAAe,CAAC;IACtB,MAAM,GAAG,eAAqB,CAAC;IAC/B,MAAM,OAAO,eAAM,CAAC;IAEpB,MAAM,eAAe,2CAG1B,CAAC;IAEI,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -97,6 +97,18 @@ export declare const HostResponseSchema: z.ZodObject<{
97
97
  op: z.ZodLiteral<"unset">;
98
98
  to: z.ZodString;
99
99
  }, z.core.$strip>], "op">>>;
100
+ singbox: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
101
+ op: z.ZodLiteral<"copy">;
102
+ from: z.ZodString;
103
+ to: z.ZodString;
104
+ }, z.core.$strip>, z.ZodObject<{
105
+ op: z.ZodLiteral<"set">;
106
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
107
+ to: z.ZodString;
108
+ }, z.core.$strip>, z.ZodObject<{
109
+ op: z.ZodLiteral<"unset">;
110
+ to: z.ZodString;
111
+ }, z.core.$strip>], "op">>>;
100
112
  }, z.core.$strip>;
101
113
  }, z.core.$strip>;
102
114
  }, z.core.$strip>;
@@ -1 +1 @@
1
- {"version":3,"file":"host.response.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/host.response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE7B,CAAC"}
1
+ {"version":3,"file":"host.response.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/host.response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE7B,CAAC"}
@@ -99,6 +99,18 @@ export declare namespace UpdateHostCommand {
99
99
  op: z.ZodLiteral<"unset">;
100
100
  to: z.ZodString;
101
101
  }, z.core.$strip>], "op">>>;
102
+ singbox: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
103
+ op: z.ZodLiteral<"copy">;
104
+ from: z.ZodString;
105
+ to: z.ZodString;
106
+ }, z.core.$strip>, z.ZodObject<{
107
+ op: z.ZodLiteral<"set">;
108
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
109
+ to: z.ZodString;
110
+ }, z.core.$strip>, z.ZodObject<{
111
+ op: z.ZodLiteral<"unset">;
112
+ to: z.ZodString;
113
+ }, z.core.$strip>], "op">>>;
102
114
  }, z.core.$strip>>;
103
115
  }, z.core.$strip>;
104
116
  const ResponseSchema: z.ZodObject<{
@@ -199,6 +211,18 @@ export declare namespace UpdateHostCommand {
199
211
  op: z.ZodLiteral<"unset">;
200
212
  to: z.ZodString;
201
213
  }, z.core.$strip>], "op">>>;
214
+ singbox: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
215
+ op: z.ZodLiteral<"copy">;
216
+ from: z.ZodString;
217
+ to: z.ZodString;
218
+ }, z.core.$strip>, z.ZodObject<{
219
+ op: z.ZodLiteral<"set">;
220
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
221
+ to: z.ZodString;
222
+ }, z.core.$strip>, z.ZodObject<{
223
+ op: z.ZodLiteral<"unset">;
224
+ to: z.ZodString;
225
+ }, z.core.$strip>], "op">>>;
202
226
  }, z.core.$strip>;
203
227
  }, z.core.$strip>;
204
228
  }, z.core.$strip>;
@@ -1 +1 @@
1
- {"version":3,"file":"update.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/update.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,eAAwB,CAAC;IAClC,MAAM,OAAO,eAAM,CAAC;IAEpB,MAAM,eAAe,2CAK3B,CAAC;IAEK,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAuD5B,CAAC;IAEI,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAqB,CAAC;IAEjD,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;IAC5D,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"update.command.d.ts","sourceRoot":"","sources":["../../../../commands/hosts/update.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,GAAG,eAAwB,CAAC;IAClC,MAAM,OAAO,eAAM,CAAC;IAEpB,MAAM,eAAe,2CAK3B,CAAC;IAEK,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAuD5B,CAAC;IAEI,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAqB,CAAC;IAEjD,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;IAC5D,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -128,6 +128,18 @@ export declare namespace GetRawSubscriptionByShortUuidCommand {
128
128
  op: z.ZodLiteral<"unset">;
129
129
  to: z.ZodString;
130
130
  }, z.core.$strip>], "op">>>;
131
+ singbox: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
132
+ op: z.ZodLiteral<"copy">;
133
+ from: z.ZodString;
134
+ to: z.ZodString;
135
+ }, z.core.$strip>, z.ZodObject<{
136
+ op: z.ZodLiteral<"set">;
137
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
138
+ to: z.ZodString;
139
+ }, z.core.$strip>, z.ZodObject<{
140
+ op: z.ZodLiteral<"unset">;
141
+ to: z.ZodString;
142
+ }, z.core.$strip>], "op">>>;
131
143
  }, z.core.$strip>;
132
144
  }, z.core.$strip>;
133
145
  metadata: z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"get-raw-subscription-by-short-uuid.command.d.ts","sourceRoot":"","sources":["../../../../../commands/subscriptions/get-by/get-raw-subscription-by-short-uuid.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,oCAAoC,CAAC;IAC3C,MAAM,GAAG,+BAA+C,CAAC;IACzD,MAAM,OAAO,QAAoB,CAAC;IAElC,MAAM,eAAe,8CAK3B,CAAC;IAEK,MAAM,kBAAkB;;qBAE7B,CAAC;IAEI,MAAM,kBAAkB;;qBAM7B,CAAC;IAEI,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAoBzB,CAAC;IAEH,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAC9D,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAC9D,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"get-raw-subscription-by-short-uuid.command.d.ts","sourceRoot":"","sources":["../../../../../commands/subscriptions/get-by/get-raw-subscription-by-short-uuid.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,oCAAoC,CAAC;IAC3C,MAAM,GAAG,+BAA+C,CAAC;IACzD,MAAM,OAAO,QAAoB,CAAC;IAElC,MAAM,eAAe,8CAK3B,CAAC;IAEK,MAAM,kBAAkB;;qBAE7B,CAAC;IAEI,MAAM,kBAAkB;;qBAM7B,CAAC;IAEI,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAoBzB,CAAC;IAEH,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAC9D,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAC9D,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -23,6 +23,18 @@ export declare const MihomoHostMapperOperationsSchema: z.ZodDiscriminatedUnion<[
23
23
  op: z.ZodLiteral<"unset">;
24
24
  to: z.ZodString;
25
25
  }, z.core.$strip>], "op">;
26
+ export declare const SingBoxHostMapperOperationsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
27
+ op: z.ZodLiteral<"copy">;
28
+ from: z.ZodString;
29
+ to: z.ZodString;
30
+ }, z.core.$strip>, z.ZodObject<{
31
+ op: z.ZodLiteral<"set">;
32
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
33
+ to: z.ZodString;
34
+ }, z.core.$strip>, z.ZodObject<{
35
+ op: z.ZodLiteral<"unset">;
36
+ to: z.ZodString;
37
+ }, z.core.$strip>], "op">;
26
38
  export declare const Base64HostMapperOperationsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
27
39
  op: z.ZodLiteral<"copy">;
28
40
  from: z.ZodString;
@@ -84,6 +96,18 @@ export declare const HostMapperSchema: z.ZodObject<{
84
96
  op: z.ZodLiteral<"unset">;
85
97
  to: z.ZodString;
86
98
  }, z.core.$strip>], "op">>>;
99
+ singbox: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
100
+ op: z.ZodLiteral<"copy">;
101
+ from: z.ZodString;
102
+ to: z.ZodString;
103
+ }, z.core.$strip>, z.ZodObject<{
104
+ op: z.ZodLiteral<"set">;
105
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
106
+ to: z.ZodString;
107
+ }, z.core.$strip>, z.ZodObject<{
108
+ op: z.ZodLiteral<"unset">;
109
+ to: z.ZodString;
110
+ }, z.core.$strip>], "op">>>;
87
111
  }, z.core.$strip>;
88
112
  export type THostMapper = z.infer<typeof HostMapperSchema>;
89
113
  export type THostMapperOperation = z.infer<typeof HostMapperOperationsSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"host-mapper.schema.d.ts","sourceRoot":"","sources":["../../../../models/host-mapper/host-mapper.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAuJxB,eAAO,MAAM,kCAAkC;;;;;;;;;;;yBAY7C,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;;;;;;;;;yBAM3C,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;;;;;;;;;yBAmC3C,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;yBAAqC,CAAC;AAE7E,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2EvB,CAAC;AAEP,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC3D,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
1
+ {"version":3,"file":"host-mapper.schema.d.ts","sourceRoot":"","sources":["../../../../models/host-mapper/host-mapper.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiKxB,eAAO,MAAM,kCAAkC;;;;;;;;;;;yBAY7C,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;;;;;;;;;yBAM3C,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;;;;;;;;;yBAa5C,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;;;;;;;;;yBAmC3C,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;yBAAqC,CAAC;AAE7E,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiGvB,CAAC;AAEP,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC3D,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HostMapperSchema = exports.HostMapperOperationsSchema = exports.Base64HostMapperOperationsSchema = exports.MihomoHostMapperOperationsSchema = exports.XrayJsonHostMapperOperationsSchema = void 0;
3
+ exports.HostMapperSchema = exports.HostMapperOperationsSchema = exports.Base64HostMapperOperationsSchema = exports.SingBoxHostMapperOperationsSchema = exports.MihomoHostMapperOperationsSchema = exports.XrayJsonHostMapperOperationsSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const buildFromSchema = () => zod_1.z
6
6
  .string()
@@ -11,12 +11,22 @@ const buildFromSchema = () => zod_1.z
11
11
  markdownDescription: [
12
12
  'Dot-separated path inside the **raw inbound** of the config profile this host belongs to. Array items are addressed by index.',
13
13
  '',
14
- '> If the path resolves to nothing, the operation is skipped and the target key is **not** created.',
14
+ 'With a `$host.` prefix the value is read from the **host** itself, after overrides have been resolved – `$host.securityOptions.serverName` holds the SNI that actually went into the config.',
15
+ '',
16
+ 'Only a part of the host is readable. Each entry below also opens everything nested under it:',
17
+ '',
18
+ '`address`, `port`, `finalRemark`, `protocol`, `transport`, `security`, `protocolOptions`, `transportOptions`, `securityOptions`, `mux`, `streamOverrides.finalMask`, `streamOverrides.sockopt`, `clientOverrides.serverDescription`, `metadata.remark`, `metadata.tags`, `metadata.inboundTag`',
19
+ '',
20
+ '> If the path resolves to nothing – or points outside the list above – the operation is skipped and the target key is **not** created.',
15
21
  ].join('\n'),
16
22
  examples: [
17
23
  'streamSettings.tlsSettings.cipherSuites',
18
24
  'streamSettings.tlsSettings.alpn',
19
25
  'streamSettings.realitySettings.serverNames.0',
26
+ '$host.address',
27
+ '$host.securityOptions.serverName',
28
+ '$host.transportOptions.path',
29
+ '$host.mux.smux',
20
30
  ],
21
31
  });
22
32
  const buildToSchema = (client) => zod_1.z
@@ -155,6 +165,20 @@ exports.MihomoHostMapperOperationsSchema = buildOperationsSchema({
155
165
  setSnippet: { to: 'reality-opts.support-x25519mlkem768', value: true },
156
166
  unsetSnippet: { to: 'smux' },
157
167
  });
168
+ exports.SingBoxHostMapperOperationsSchema = buildOperationsSchema({
169
+ target: 'the generated **outbound**',
170
+ examples: [
171
+ 'domain_resolver',
172
+ 'multiplex.protocol',
173
+ 'packet_encoding',
174
+ 'tcp_fast_open',
175
+ 'tls.insecure',
176
+ 'tls.utls.fingerprint',
177
+ ],
178
+ copySnippet: { from: 'streamSettings.realitySettings.serverNames.0', to: 'tls.server_name' },
179
+ setSnippet: { to: 'tls.utls.fingerprint', value: 'chrome' },
180
+ unsetSnippet: { to: 'multiplex' },
181
+ });
158
182
  exports.Base64HostMapperOperationsSchema = buildOperationsSchema({
159
183
  target: 'the query string of the generated **share link**',
160
184
  examples: [
@@ -247,6 +271,24 @@ exports.HostMapperSchema = zod_1.z
247
271
  '```',
248
272
  ].join('\n'),
249
273
  }),
274
+ singbox: zod_1.z
275
+ .array(exports.SingBoxHostMapperOperationsSchema)
276
+ .optional()
277
+ .meta({
278
+ title: 'sing-box',
279
+ markdownDescription: [
280
+ 'Operations applied to the **outbound** generated for this host in the sing-box subscription. Paths are counted from the root of the outbound.',
281
+ '',
282
+ 'sing-box keys are written in snake_case, and the outbound of a Hysteria2 host has a shape of its own.',
283
+ '',
284
+ '```json',
285
+ JSON.stringify([
286
+ { op: 'set', to: 'tls.utls.fingerprint', value: 'chrome' },
287
+ { op: 'unset', to: 'multiplex' },
288
+ ], null, 2),
289
+ '```',
290
+ ].join('\n'),
291
+ }),
250
292
  })
251
293
  .meta({
252
294
  title: 'Host Mapper',
@@ -255,7 +297,7 @@ exports.HostMapperSchema = zod_1.z
255
297
  '',
256
298
  'Operations run **after** the generator has finished, so they can change or remove anything it produced.',
257
299
  '',
258
- 'The source for `copy` is always the raw inbound of the config profile this host belongs to.',
300
+ 'The source for `copy` is the raw inbound of the config profile this host belongs to, or the host itself when the path starts with `$host.`.',
259
301
  '',
260
302
  '> `to` is never checked against the target client. A misspelled key is written exactly like a real one.',
261
303
  ].join('\n'),
@@ -96,6 +96,18 @@ export declare const HostsSchema: z.ZodObject<{
96
96
  op: z.ZodLiteral<"unset">;
97
97
  to: z.ZodString;
98
98
  }, z.core.$strip>], "op">>>;
99
+ singbox: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
100
+ op: z.ZodLiteral<"copy">;
101
+ from: z.ZodString;
102
+ to: z.ZodString;
103
+ }, z.core.$strip>, z.ZodObject<{
104
+ op: z.ZodLiteral<"set">;
105
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
106
+ to: z.ZodString;
107
+ }, z.core.$strip>, z.ZodObject<{
108
+ op: z.ZodLiteral<"unset">;
109
+ to: z.ZodString;
110
+ }, z.core.$strip>], "op">>>;
99
111
  }, z.core.$strip>;
100
112
  }, z.core.$strip>;
101
113
  //# sourceMappingURL=hosts.schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hosts.schema.d.ts","sourceRoot":"","sources":["../../../models/hosts.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwCtB,CAAC"}
1
+ {"version":3,"file":"hosts.schema.d.ts","sourceRoot":"","sources":["../../../models/hosts.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwCtB,CAAC"}
@@ -301,6 +301,18 @@ export declare const ResolvedProxyConfigBaseSchema: z.ZodObject<{
301
301
  op: z.ZodLiteral<"unset">;
302
302
  to: z.ZodString;
303
303
  }, z.core.$strip>], "op">>>;
304
+ singbox: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
305
+ op: z.ZodLiteral<"copy">;
306
+ from: z.ZodString;
307
+ to: z.ZodString;
308
+ }, z.core.$strip>, z.ZodObject<{
309
+ op: z.ZodLiteral<"set">;
310
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
311
+ to: z.ZodString;
312
+ }, z.core.$strip>, z.ZodObject<{
313
+ op: z.ZodLiteral<"unset">;
314
+ to: z.ZodString;
315
+ }, z.core.$strip>], "op">>>;
304
316
  }, z.core.$strip>;
305
317
  }, z.core.$strip>;
306
318
  metadata: z.ZodObject<{
@@ -383,6 +395,18 @@ export declare const ResolvedProxyConfigSchema: z.ZodIntersection<z.ZodIntersect
383
395
  op: z.ZodLiteral<"unset">;
384
396
  to: z.ZodString;
385
397
  }, z.core.$strip>], "op">>>;
398
+ singbox: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
399
+ op: z.ZodLiteral<"copy">;
400
+ from: z.ZodString;
401
+ to: z.ZodString;
402
+ }, z.core.$strip>, z.ZodObject<{
403
+ op: z.ZodLiteral<"set">;
404
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodJSONSchema>, z.ZodRecord<z.ZodString, z.ZodJSONSchema>]>;
405
+ to: z.ZodString;
406
+ }, z.core.$strip>, z.ZodObject<{
407
+ op: z.ZodLiteral<"unset">;
408
+ to: z.ZodString;
409
+ }, z.core.$strip>], "op">>>;
386
410
  }, z.core.$strip>;
387
411
  }, z.core.$strip>;
388
412
  metadata: z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"resolved-proxy-config.schema.d.ts","sourceRoot":"","sources":["../../../models/resolved-proxy-config.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,0BAA0B;;;;;;;;iBAIrC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;iBAEtC,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;;;iBAK3C,CAAC;AA4BH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;iBAEpC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;iBAKtC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAEP,CAAC"}
@@ -12,5 +12,9 @@ exports.CONNECTIONS_ROUTES = {
12
12
  // GET
13
13
  CONNECTIONS_BY_NODE_RESULT: (jobId) => `by-node/${jobId}`,
14
14
  // POST
15
+ GEOCHECK_BY_NODE: (uuid) => `geocheck/${uuid}`,
16
+ // GET
17
+ GEOCHECK_BY_NODE_RESULT: (jobId) => `geocheck/${jobId}`,
18
+ // POST
15
19
  DROP_CONNECTIONS: 'drop',
16
20
  };
@@ -357,6 +357,8 @@ exports.REST_API = {
357
357
  CONNECTIONS_BY_USER_RESULT: (jobId) => `${exports.ROOT}/${CONTROLLERS.CONNECTIONS_CONTROLLER}/${CONTROLLERS.CONNECTIONS_ROUTES.CONNECTIONS_BY_USER_RESULT(jobId)}`,
358
358
  CONNECTIONS_BY_NODE: (uuid) => `${exports.ROOT}/${CONTROLLERS.CONNECTIONS_CONTROLLER}/${CONTROLLERS.CONNECTIONS_ROUTES.CONNECTIONS_BY_NODE(uuid)}`,
359
359
  CONNECTIONS_BY_NODE_RESULT: (jobId) => `${exports.ROOT}/${CONTROLLERS.CONNECTIONS_CONTROLLER}/${CONTROLLERS.CONNECTIONS_ROUTES.CONNECTIONS_BY_NODE_RESULT(jobId)}`,
360
+ GEOCHECK_BY_NODE: (uuid) => `${exports.ROOT}/${CONTROLLERS.CONNECTIONS_CONTROLLER}/${CONTROLLERS.CONNECTIONS_ROUTES.GEOCHECK_BY_NODE(uuid)}`,
361
+ GEOCHECK_BY_NODE_RESULT: (jobId) => `${exports.ROOT}/${CONTROLLERS.CONNECTIONS_CONTROLLER}/${CONTROLLERS.CONNECTIONS_ROUTES.GEOCHECK_BY_NODE_RESULT(jobId)}`,
360
362
  DROP_CONNECTIONS: `${exports.ROOT}/${CONTROLLERS.CONNECTIONS_CONTROLLER}/${CONTROLLERS.CONNECTIONS_ROUTES.DROP_CONNECTIONS}`,
361
363
  },
362
364
  METADATA: {
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GeocheckByNodeResultCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const api_1 = require("../../api");
6
+ const constants_1 = require("../../constants");
7
+ var GeocheckByNodeResultCommand;
8
+ (function (GeocheckByNodeResultCommand) {
9
+ GeocheckByNodeResultCommand.url = api_1.REST_API.CONNECTIONS.GEOCHECK_BY_NODE_RESULT;
10
+ GeocheckByNodeResultCommand.TSQ_url = GeocheckByNodeResultCommand.url(':jobId');
11
+ GeocheckByNodeResultCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.CONNECTIONS_ROUTES.GEOCHECK_BY_NODE_RESULT(':jobId'), 'get', 'Get Geocheck for Node by Job ID', { scope: 'geocheck-result', kind: 'read' });
12
+ GeocheckByNodeResultCommand.RequestParamSchema = zod_1.z.object({
13
+ jobId: zod_1.z.string(),
14
+ });
15
+ GeocheckByNodeResultCommand.GeocheckImageSchema = zod_1.z.object({
16
+ format: zod_1.z.literal('svg'),
17
+ media_type: zod_1.z.literal('image/svg+xml'),
18
+ encoding: zod_1.z.literal('base64'),
19
+ data: zod_1.z.string().describe('Base64-encoded image, ready for a data: URL'),
20
+ });
21
+ GeocheckByNodeResultCommand.ResponseSchema = zod_1.z.object({
22
+ response: zod_1.z.object({
23
+ isCompleted: zod_1.z.boolean(),
24
+ isFailed: zod_1.z.boolean(),
25
+ result: zod_1.z
26
+ .object({
27
+ success: zod_1.z.boolean(),
28
+ nodeUuid: zod_1.z.uuid(),
29
+ image: GeocheckByNodeResultCommand.GeocheckImageSchema.nullable(),
30
+ rawReport: zod_1.z
31
+ .record(zod_1.z.string(), zod_1.z.unknown())
32
+ .nullable()
33
+ .describe('The full node report with the image object stripped out'),
34
+ message: zod_1.z.string().nullable(),
35
+ })
36
+ .nullable(),
37
+ }),
38
+ });
39
+ })(GeocheckByNodeResultCommand || (exports.GeocheckByNodeResultCommand = GeocheckByNodeResultCommand = {}));
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GeocheckByNodeCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const api_1 = require("../../api");
6
+ const constants_1 = require("../../constants");
7
+ var GeocheckByNodeCommand;
8
+ (function (GeocheckByNodeCommand) {
9
+ GeocheckByNodeCommand.url = api_1.REST_API.CONNECTIONS.GEOCHECK_BY_NODE;
10
+ GeocheckByNodeCommand.TSQ_url = GeocheckByNodeCommand.url(':nodeUuid');
11
+ GeocheckByNodeCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.CONNECTIONS_ROUTES.GEOCHECK_BY_NODE(':nodeUuid'), 'post', 'Request Geocheck for Node', { scope: 'geocheck', kind: 'read' }, 'Queues a geocheck on the node and returns a job ID. Poll "Get Geocheck for Node by Job ID" for the result, the node may take up to a minute to answer.');
12
+ GeocheckByNodeCommand.RequestParamSchema = zod_1.z.object({
13
+ nodeUuid: zod_1.z.uuid().describe('Node UUID'),
14
+ });
15
+ GeocheckByNodeCommand.RequestBodySchema = zod_1.z
16
+ .object({
17
+ ip: zod_1.z.string().optional().describe('Check from this IP address'),
18
+ interface: zod_1.z.string().optional().describe('Check from this network interface'),
19
+ })
20
+ .refine((data) => !(data.ip && data.interface), {
21
+ message: 'Only one of "ip" or "interface" can be specified',
22
+ path: ['ip'],
23
+ });
24
+ GeocheckByNodeCommand.ResponseSchema = zod_1.z.object({
25
+ response: zod_1.z.object({
26
+ jobId: zod_1.z.string(),
27
+ }),
28
+ });
29
+ })(GeocheckByNodeCommand || (exports.GeocheckByNodeCommand = GeocheckByNodeCommand = {}));
@@ -19,3 +19,5 @@ __exportStar(require("./connections-by-user-result.command"), exports);
19
19
  __exportStar(require("./connections-by-user.command"), exports);
20
20
  __exportStar(require("./connections-by-node-result.command"), exports);
21
21
  __exportStar(require("./connections-by-node.command"), exports);
22
+ __exportStar(require("./geocheck-by-node-result.command"), exports);
23
+ __exportStar(require("./geocheck-by-node.command"), exports);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HostMapperSchema = exports.HostMapperOperationsSchema = exports.Base64HostMapperOperationsSchema = exports.MihomoHostMapperOperationsSchema = exports.XrayJsonHostMapperOperationsSchema = void 0;
3
+ exports.HostMapperSchema = exports.HostMapperOperationsSchema = exports.Base64HostMapperOperationsSchema = exports.SingBoxHostMapperOperationsSchema = exports.MihomoHostMapperOperationsSchema = exports.XrayJsonHostMapperOperationsSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const buildFromSchema = () => zod_1.z
6
6
  .string()
@@ -11,12 +11,22 @@ const buildFromSchema = () => zod_1.z
11
11
  markdownDescription: [
12
12
  'Dot-separated path inside the **raw inbound** of the config profile this host belongs to. Array items are addressed by index.',
13
13
  '',
14
- '> If the path resolves to nothing, the operation is skipped and the target key is **not** created.',
14
+ 'With a `$host.` prefix the value is read from the **host** itself, after overrides have been resolved – `$host.securityOptions.serverName` holds the SNI that actually went into the config.',
15
+ '',
16
+ 'Only a part of the host is readable. Each entry below also opens everything nested under it:',
17
+ '',
18
+ '`address`, `port`, `finalRemark`, `protocol`, `transport`, `security`, `protocolOptions`, `transportOptions`, `securityOptions`, `mux`, `streamOverrides.finalMask`, `streamOverrides.sockopt`, `clientOverrides.serverDescription`, `metadata.remark`, `metadata.tags`, `metadata.inboundTag`',
19
+ '',
20
+ '> If the path resolves to nothing – or points outside the list above – the operation is skipped and the target key is **not** created.',
15
21
  ].join('\n'),
16
22
  examples: [
17
23
  'streamSettings.tlsSettings.cipherSuites',
18
24
  'streamSettings.tlsSettings.alpn',
19
25
  'streamSettings.realitySettings.serverNames.0',
26
+ '$host.address',
27
+ '$host.securityOptions.serverName',
28
+ '$host.transportOptions.path',
29
+ '$host.mux.smux',
20
30
  ],
21
31
  });
22
32
  const buildToSchema = (client) => zod_1.z
@@ -155,6 +165,20 @@ exports.MihomoHostMapperOperationsSchema = buildOperationsSchema({
155
165
  setSnippet: { to: 'reality-opts.support-x25519mlkem768', value: true },
156
166
  unsetSnippet: { to: 'smux' },
157
167
  });
168
+ exports.SingBoxHostMapperOperationsSchema = buildOperationsSchema({
169
+ target: 'the generated **outbound**',
170
+ examples: [
171
+ 'domain_resolver',
172
+ 'multiplex.protocol',
173
+ 'packet_encoding',
174
+ 'tcp_fast_open',
175
+ 'tls.insecure',
176
+ 'tls.utls.fingerprint',
177
+ ],
178
+ copySnippet: { from: 'streamSettings.realitySettings.serverNames.0', to: 'tls.server_name' },
179
+ setSnippet: { to: 'tls.utls.fingerprint', value: 'chrome' },
180
+ unsetSnippet: { to: 'multiplex' },
181
+ });
158
182
  exports.Base64HostMapperOperationsSchema = buildOperationsSchema({
159
183
  target: 'the query string of the generated **share link**',
160
184
  examples: [
@@ -247,6 +271,24 @@ exports.HostMapperSchema = zod_1.z
247
271
  '```',
248
272
  ].join('\n'),
249
273
  }),
274
+ singbox: zod_1.z
275
+ .array(exports.SingBoxHostMapperOperationsSchema)
276
+ .optional()
277
+ .meta({
278
+ title: 'sing-box',
279
+ markdownDescription: [
280
+ 'Operations applied to the **outbound** generated for this host in the sing-box subscription. Paths are counted from the root of the outbound.',
281
+ '',
282
+ 'sing-box keys are written in snake_case, and the outbound of a Hysteria2 host has a shape of its own.',
283
+ '',
284
+ '```json',
285
+ JSON.stringify([
286
+ { op: 'set', to: 'tls.utls.fingerprint', value: 'chrome' },
287
+ { op: 'unset', to: 'multiplex' },
288
+ ], null, 2),
289
+ '```',
290
+ ].join('\n'),
291
+ }),
250
292
  })
251
293
  .meta({
252
294
  title: 'Host Mapper',
@@ -255,7 +297,7 @@ exports.HostMapperSchema = zod_1.z
255
297
  '',
256
298
  'Operations run **after** the generator has finished, so they can change or remove anything it produced.',
257
299
  '',
258
- 'The source for `copy` is always the raw inbound of the config profile this host belongs to.',
300
+ 'The source for `copy` is the raw inbound of the config profile this host belongs to, or the host itself when the path starts with `$host.`.',
259
301
  '',
260
302
  '> `to` is never checked against the target client. A misspelled key is written exactly like a real one.',
261
303
  ].join('\n'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "3.4.0",
3
+ "version": "3.4.2",
4
4
  "description": "A contract library for Remnawave Backend. It can be used in backend and frontend.",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/remnawave",