@remnawave/backend-contract 0.3.1 → 0.3.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.
- package/build/backend/commands/subscription-template/get-template.command.d.ts +21 -7
- package/build/backend/commands/subscription-template/get-template.command.d.ts.map +1 -1
- package/build/backend/commands/subscription-template/get-template.command.js +2 -0
- package/build/backend/commands/subscription-template/update-template.command.d.ts +23 -3
- package/build/backend/commands/subscription-template/update-template.command.d.ts.map +1 -1
- package/build/backend/commands/subscription-template/update-template.command.js +4 -1
- package/build/backend/constants/subscription-template/subscription-type/subscription-type.constant.d.ts +5 -6
- package/build/backend/constants/subscription-template/subscription-type/subscription-type.constant.d.ts.map +1 -1
- package/build/backend/constants/subscription-template/subscription-type/subscription-type.constant.js +4 -5
- package/build/frontend/commands/subscription-template/get-template.command.js +2 -0
- package/build/frontend/commands/subscription-template/update-template.command.js +4 -1
- package/build/frontend/constants/subscription-template/subscription-type/subscription-type.constant.js +4 -5
- package/package.json +1 -1
@@ -4,36 +4,50 @@ export declare namespace GetSubscriptionTemplateCommand {
|
|
4
4
|
const TSQ_url: string;
|
5
5
|
const RequestSchema: z.ZodObject<{
|
6
6
|
subscriptionType: z.ZodNativeEnum<{
|
7
|
-
readonly
|
8
|
-
readonly
|
9
|
-
readonly
|
10
|
-
readonly
|
11
|
-
readonly MIHOMO: "mihomo";
|
7
|
+
readonly STASH: "STASH";
|
8
|
+
readonly SINGBOX: "SINGBOX";
|
9
|
+
readonly SINGBOX_LEGACY: "SINGBOX_LEGACY";
|
10
|
+
readonly MIHOMO: "MIHOMO";
|
12
11
|
}>;
|
13
12
|
}, "strip", z.ZodTypeAny, {
|
14
|
-
subscriptionType: "
|
13
|
+
subscriptionType: "STASH" | "SINGBOX" | "SINGBOX_LEGACY" | "MIHOMO";
|
15
14
|
}, {
|
16
|
-
subscriptionType: "
|
15
|
+
subscriptionType: "STASH" | "SINGBOX" | "SINGBOX_LEGACY" | "MIHOMO";
|
17
16
|
}>;
|
18
17
|
type Request = z.infer<typeof RequestSchema>;
|
19
18
|
const ResponseSchema: z.ZodObject<{
|
20
19
|
response: z.ZodObject<{
|
20
|
+
uuid: z.ZodString;
|
21
|
+
subscriptionType: z.ZodNativeEnum<{
|
22
|
+
readonly STASH: "STASH";
|
23
|
+
readonly SINGBOX: "SINGBOX";
|
24
|
+
readonly SINGBOX_LEGACY: "SINGBOX_LEGACY";
|
25
|
+
readonly MIHOMO: "MIHOMO";
|
26
|
+
}>;
|
21
27
|
templateJson: z.ZodNullable<z.ZodUnknown>;
|
22
28
|
encodedTemplateYaml: z.ZodNullable<z.ZodString>;
|
23
29
|
}, "strip", z.ZodTypeAny, {
|
30
|
+
uuid: string;
|
31
|
+
subscriptionType: "STASH" | "SINGBOX" | "SINGBOX_LEGACY" | "MIHOMO";
|
24
32
|
encodedTemplateYaml: string | null;
|
25
33
|
templateJson?: unknown;
|
26
34
|
}, {
|
35
|
+
uuid: string;
|
36
|
+
subscriptionType: "STASH" | "SINGBOX" | "SINGBOX_LEGACY" | "MIHOMO";
|
27
37
|
encodedTemplateYaml: string | null;
|
28
38
|
templateJson?: unknown;
|
29
39
|
}>;
|
30
40
|
}, "strip", z.ZodTypeAny, {
|
31
41
|
response: {
|
42
|
+
uuid: string;
|
43
|
+
subscriptionType: "STASH" | "SINGBOX" | "SINGBOX_LEGACY" | "MIHOMO";
|
32
44
|
encodedTemplateYaml: string | null;
|
33
45
|
templateJson?: unknown;
|
34
46
|
};
|
35
47
|
}, {
|
36
48
|
response: {
|
49
|
+
uuid: string;
|
50
|
+
subscriptionType: "STASH" | "SINGBOX" | "SINGBOX_LEGACY" | "MIHOMO";
|
37
51
|
encodedTemplateYaml: string | null;
|
38
52
|
templateJson?: unknown;
|
39
53
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"get-template.command.d.ts","sourceRoot":"","sources":["../../../../commands/subscription-template/get-template.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,8BAA8B,CAAC;IACrC,MAAM,GAAG,sCAA0C,CAAC;IACpD,MAAM,OAAO,QAA2B,CAAC;IAEzC,MAAM,aAAa
|
1
|
+
{"version":3,"file":"get-template.command.d.ts","sourceRoot":"","sources":["../../../../commands/subscription-template/get-template.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,8BAA8B,CAAC;IACrC,MAAM,GAAG,sCAA0C,CAAC;IACpD,MAAM,OAAO,QAA2B,CAAC;IAEzC,MAAM,aAAa;;;;;;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAOzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
@@ -13,6 +13,8 @@ var GetSubscriptionTemplateCommand;
|
|
13
13
|
});
|
14
14
|
GetSubscriptionTemplateCommand.ResponseSchema = zod_1.z.object({
|
15
15
|
response: zod_1.z.object({
|
16
|
+
uuid: zod_1.z.string().uuid(),
|
17
|
+
subscriptionType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TYPE),
|
16
18
|
templateJson: zod_1.z.nullable(zod_1.z.unknown()),
|
17
19
|
encodedTemplateYaml: zod_1.z.nullable(zod_1.z.string()),
|
18
20
|
}),
|
@@ -3,37 +3,57 @@ export declare namespace UpdateSubscriptionTemplateCommand {
|
|
3
3
|
const url: "/api/subscription-templates/update-template";
|
4
4
|
const TSQ_url: "/api/subscription-templates/update-template";
|
5
5
|
const RequestSchema: z.ZodObject<{
|
6
|
-
|
6
|
+
subscriptionType: z.ZodNativeEnum<{
|
7
|
+
readonly STASH: "STASH";
|
8
|
+
readonly SINGBOX: "SINGBOX";
|
9
|
+
readonly SINGBOX_LEGACY: "SINGBOX_LEGACY";
|
10
|
+
readonly MIHOMO: "MIHOMO";
|
11
|
+
}>;
|
7
12
|
templateJson: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
|
8
13
|
encodedTemplateYaml: z.ZodOptional<z.ZodString>;
|
9
14
|
}, "strip", z.ZodTypeAny, {
|
10
|
-
|
15
|
+
subscriptionType: "STASH" | "SINGBOX" | "SINGBOX_LEGACY" | "MIHOMO";
|
11
16
|
templateJson?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
12
17
|
encodedTemplateYaml?: string | undefined;
|
13
18
|
}, {
|
14
|
-
|
19
|
+
subscriptionType: "STASH" | "SINGBOX" | "SINGBOX_LEGACY" | "MIHOMO";
|
15
20
|
templateJson?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
|
16
21
|
encodedTemplateYaml?: string | undefined;
|
17
22
|
}>;
|
18
23
|
type Request = z.infer<typeof RequestSchema>;
|
19
24
|
const ResponseSchema: z.ZodObject<{
|
20
25
|
response: z.ZodObject<{
|
26
|
+
uuid: z.ZodString;
|
27
|
+
subscriptionType: z.ZodNativeEnum<{
|
28
|
+
readonly STASH: "STASH";
|
29
|
+
readonly SINGBOX: "SINGBOX";
|
30
|
+
readonly SINGBOX_LEGACY: "SINGBOX_LEGACY";
|
31
|
+
readonly MIHOMO: "MIHOMO";
|
32
|
+
}>;
|
21
33
|
templateJson: z.ZodNullable<z.ZodUnknown>;
|
22
34
|
encodedTemplateYaml: z.ZodNullable<z.ZodString>;
|
23
35
|
}, "strip", z.ZodTypeAny, {
|
36
|
+
uuid: string;
|
37
|
+
subscriptionType: "STASH" | "SINGBOX" | "SINGBOX_LEGACY" | "MIHOMO";
|
24
38
|
encodedTemplateYaml: string | null;
|
25
39
|
templateJson?: unknown;
|
26
40
|
}, {
|
41
|
+
uuid: string;
|
42
|
+
subscriptionType: "STASH" | "SINGBOX" | "SINGBOX_LEGACY" | "MIHOMO";
|
27
43
|
encodedTemplateYaml: string | null;
|
28
44
|
templateJson?: unknown;
|
29
45
|
}>;
|
30
46
|
}, "strip", z.ZodTypeAny, {
|
31
47
|
response: {
|
48
|
+
uuid: string;
|
49
|
+
subscriptionType: "STASH" | "SINGBOX" | "SINGBOX_LEGACY" | "MIHOMO";
|
32
50
|
encodedTemplateYaml: string | null;
|
33
51
|
templateJson?: unknown;
|
34
52
|
};
|
35
53
|
}, {
|
36
54
|
response: {
|
55
|
+
uuid: string;
|
56
|
+
subscriptionType: "STASH" | "SINGBOX" | "SINGBOX_LEGACY" | "MIHOMO";
|
37
57
|
encodedTemplateYaml: string | null;
|
38
58
|
templateJson?: unknown;
|
39
59
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"update-template.command.d.ts","sourceRoot":"","sources":["../../../../commands/subscription-template/update-template.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
1
|
+
{"version":3,"file":"update-template.command.d.ts","sourceRoot":"","sources":["../../../../commands/subscription-template/update-template.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,iCAAiC,CAAC;IACxC,MAAM,GAAG,+CAAiD,CAAC;IAC3D,MAAM,OAAO,+CAAM,CAAC;IAEpB,MAAM,aAAa;;;;;;;;;;;;;;;;;MAIxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAOzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
@@ -2,18 +2,21 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.UpdateSubscriptionTemplateCommand = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
|
+
const constants_1 = require("../../constants");
|
5
6
|
const api_1 = require("../../api");
|
6
7
|
var UpdateSubscriptionTemplateCommand;
|
7
8
|
(function (UpdateSubscriptionTemplateCommand) {
|
8
9
|
UpdateSubscriptionTemplateCommand.url = api_1.REST_API.SUBSCRIPTION_TEMPLATE.UPDATE_TEMPLATE;
|
9
10
|
UpdateSubscriptionTemplateCommand.TSQ_url = UpdateSubscriptionTemplateCommand.url;
|
10
11
|
UpdateSubscriptionTemplateCommand.RequestSchema = zod_1.z.object({
|
11
|
-
|
12
|
+
subscriptionType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TYPE),
|
12
13
|
templateJson: zod_1.z.optional(zod_1.z.object({}).passthrough()),
|
13
14
|
encodedTemplateYaml: zod_1.z.optional(zod_1.z.string()),
|
14
15
|
});
|
15
16
|
UpdateSubscriptionTemplateCommand.ResponseSchema = zod_1.z.object({
|
16
17
|
response: zod_1.z.object({
|
18
|
+
uuid: zod_1.z.string().uuid(),
|
19
|
+
subscriptionType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TYPE),
|
17
20
|
templateJson: zod_1.z.nullable(zod_1.z.unknown()),
|
18
21
|
encodedTemplateYaml: zod_1.z.nullable(zod_1.z.string()),
|
19
22
|
}),
|
@@ -1,10 +1,9 @@
|
|
1
1
|
export declare const SUBSCRIPTION_TYPE: {
|
2
|
-
readonly
|
3
|
-
readonly
|
4
|
-
readonly
|
5
|
-
readonly
|
6
|
-
readonly MIHOMO: "mihomo";
|
2
|
+
readonly STASH: "STASH";
|
3
|
+
readonly SINGBOX: "SINGBOX";
|
4
|
+
readonly SINGBOX_LEGACY: "SINGBOX_LEGACY";
|
5
|
+
readonly MIHOMO: "MIHOMO";
|
7
6
|
};
|
8
7
|
export type TSubscriptionType = [keyof typeof SUBSCRIPTION_TYPE][number];
|
9
|
-
export declare const SUBSCRIPTION_TYPE_VALUES: ("
|
8
|
+
export declare const SUBSCRIPTION_TYPE_VALUES: ("STASH" | "SINGBOX" | "SINGBOX_LEGACY" | "MIHOMO")[];
|
10
9
|
//# sourceMappingURL=subscription-type.constant.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"subscription-type.constant.d.ts","sourceRoot":"","sources":["../../../../../constants/subscription-template/subscription-type/subscription-type.constant.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB
|
1
|
+
{"version":3,"file":"subscription-type.constant.d.ts","sourceRoot":"","sources":["../../../../../constants/subscription-template/subscription-type/subscription-type.constant.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB;;;;;CAKpB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AACzE,eAAO,MAAM,wBAAwB,uDAAmC,CAAC"}
|
@@ -2,10 +2,9 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.SUBSCRIPTION_TYPE_VALUES = exports.SUBSCRIPTION_TYPE = void 0;
|
4
4
|
exports.SUBSCRIPTION_TYPE = {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
MIHOMO: 'mihomo',
|
5
|
+
STASH: 'STASH',
|
6
|
+
SINGBOX: 'SINGBOX',
|
7
|
+
SINGBOX_LEGACY: 'SINGBOX_LEGACY',
|
8
|
+
MIHOMO: 'MIHOMO',
|
10
9
|
};
|
11
10
|
exports.SUBSCRIPTION_TYPE_VALUES = Object.values(exports.SUBSCRIPTION_TYPE);
|
@@ -13,6 +13,8 @@ var GetSubscriptionTemplateCommand;
|
|
13
13
|
});
|
14
14
|
GetSubscriptionTemplateCommand.ResponseSchema = zod_1.z.object({
|
15
15
|
response: zod_1.z.object({
|
16
|
+
uuid: zod_1.z.string().uuid(),
|
17
|
+
subscriptionType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TYPE),
|
16
18
|
templateJson: zod_1.z.nullable(zod_1.z.unknown()),
|
17
19
|
encodedTemplateYaml: zod_1.z.nullable(zod_1.z.string()),
|
18
20
|
}),
|
@@ -2,18 +2,21 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.UpdateSubscriptionTemplateCommand = void 0;
|
4
4
|
const zod_1 = require("zod");
|
5
|
+
const constants_1 = require("../../constants");
|
5
6
|
const api_1 = require("../../api");
|
6
7
|
var UpdateSubscriptionTemplateCommand;
|
7
8
|
(function (UpdateSubscriptionTemplateCommand) {
|
8
9
|
UpdateSubscriptionTemplateCommand.url = api_1.REST_API.SUBSCRIPTION_TEMPLATE.UPDATE_TEMPLATE;
|
9
10
|
UpdateSubscriptionTemplateCommand.TSQ_url = UpdateSubscriptionTemplateCommand.url;
|
10
11
|
UpdateSubscriptionTemplateCommand.RequestSchema = zod_1.z.object({
|
11
|
-
|
12
|
+
subscriptionType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TYPE),
|
12
13
|
templateJson: zod_1.z.optional(zod_1.z.object({}).passthrough()),
|
13
14
|
encodedTemplateYaml: zod_1.z.optional(zod_1.z.string()),
|
14
15
|
});
|
15
16
|
UpdateSubscriptionTemplateCommand.ResponseSchema = zod_1.z.object({
|
16
17
|
response: zod_1.z.object({
|
18
|
+
uuid: zod_1.z.string().uuid(),
|
19
|
+
subscriptionType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TYPE),
|
17
20
|
templateJson: zod_1.z.nullable(zod_1.z.unknown()),
|
18
21
|
encodedTemplateYaml: zod_1.z.nullable(zod_1.z.string()),
|
19
22
|
}),
|
@@ -2,10 +2,9 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.SUBSCRIPTION_TYPE_VALUES = exports.SUBSCRIPTION_TYPE = void 0;
|
4
4
|
exports.SUBSCRIPTION_TYPE = {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
MIHOMO: 'mihomo',
|
5
|
+
STASH: 'STASH',
|
6
|
+
SINGBOX: 'SINGBOX',
|
7
|
+
SINGBOX_LEGACY: 'SINGBOX_LEGACY',
|
8
|
+
MIHOMO: 'MIHOMO',
|
10
9
|
};
|
11
10
|
exports.SUBSCRIPTION_TYPE_VALUES = Object.values(exports.SUBSCRIPTION_TYPE);
|