@remnawave/backend-contract 0.3.8 → 0.3.9
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/index.d.ts +1 -0
- package/build/backend/api/controllers/index.d.ts.map +1 -1
- package/build/backend/api/controllers/index.js +1 -0
- package/build/backend/api/controllers/subscription-settings.d.ts +6 -0
- package/build/backend/api/controllers/subscription-settings.d.ts.map +1 -0
- package/build/backend/api/controllers/subscription-settings.js +8 -0
- package/build/backend/api/routes.d.ts +4 -0
- package/build/backend/api/routes.d.ts.map +1 -1
- package/build/backend/api/routes.js +4 -0
- package/build/backend/commands/index.d.ts +1 -0
- package/build/backend/commands/index.d.ts.map +1 -1
- package/build/backend/commands/index.js +1 -0
- package/build/backend/commands/subscription-settings/get-subscription-settings.command.d.ts +78 -0
- package/build/backend/commands/subscription-settings/get-subscription-settings.command.d.ts.map +1 -0
- package/build/backend/commands/subscription-settings/get-subscription-settings.command.js +13 -0
- package/build/backend/commands/subscription-settings/index.d.ts +3 -0
- package/build/backend/commands/subscription-settings/index.d.ts.map +1 -0
- package/build/backend/commands/subscription-settings/index.js +18 -0
- package/build/backend/commands/subscription-settings/update-subscription-settings.command.d.ts +114 -0
- package/build/backend/commands/subscription-settings/update-subscription-settings.command.d.ts.map +1 -0
- package/build/backend/commands/subscription-settings/update-subscription-settings.command.js +26 -0
- package/build/backend/constants/errors/errors.d.ts +15 -0
- package/build/backend/constants/errors/errors.d.ts.map +1 -1
- package/build/backend/constants/errors/errors.js +15 -0
- 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/subscription-settings.schema.d.ts +42 -0
- package/build/backend/models/subscription-settings.schema.d.ts.map +1 -0
- package/build/backend/models/subscription-settings.schema.js +24 -0
- package/build/frontend/api/controllers/index.js +1 -0
- package/build/frontend/api/controllers/subscription-settings.js +8 -0
- package/build/frontend/api/routes.js +4 -0
- package/build/frontend/commands/index.js +1 -0
- package/build/frontend/commands/subscription-settings/get-subscription-settings.command.js +13 -0
- package/build/frontend/commands/subscription-settings/index.js +18 -0
- package/build/frontend/commands/subscription-settings/update-subscription-settings.command.js +26 -0
- package/build/frontend/constants/errors/errors.js +15 -0
- package/build/frontend/models/index.js +1 -0
- package/build/frontend/models/subscription-settings.schema.js +24 -0
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../api/controllers/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../api/controllers/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC"}
|
@@ -21,6 +21,7 @@ __exportStar(require("./inbounds"), exports);
|
|
21
21
|
__exportStar(require("./keygen"), exports);
|
22
22
|
__exportStar(require("./nodes"), exports);
|
23
23
|
__exportStar(require("./subscription"), exports);
|
24
|
+
__exportStar(require("./subscription-settings"), exports);
|
24
25
|
__exportStar(require("./subscription-template"), exports);
|
25
26
|
__exportStar(require("./system"), exports);
|
26
27
|
__exportStar(require("./users"), exports);
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"subscription-settings.d.ts","sourceRoot":"","sources":["../../../../api/controllers/subscription-settings.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC,EAAG,uBAAgC,CAAC;AAEjF,eAAO,MAAM,4BAA4B;;;CAG/B,CAAC"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.SUBSCRIPTION_SETTINGS_ROUTES = exports.SUBSCRIPTION_SETTINGS_CONTROLLER = void 0;
|
4
|
+
exports.SUBSCRIPTION_SETTINGS_CONTROLLER = 'subscription-settings';
|
5
|
+
exports.SUBSCRIPTION_SETTINGS_ROUTES = {
|
6
|
+
GET_SETTINGS: 'get',
|
7
|
+
UPDATE_SETTINGS: 'update',
|
8
|
+
};
|
@@ -78,5 +78,9 @@ export declare const REST_API: {
|
|
78
78
|
readonly GET_INFO: (subscriptionType: string) => string;
|
79
79
|
readonly UPDATE_TEMPLATE: "/api/subscription-templates/update-template";
|
80
80
|
};
|
81
|
+
readonly SUBSCRIPTION_SETTINGS: {
|
82
|
+
readonly GET_SETTINGS: "/api/subscription-settings/get";
|
83
|
+
readonly UPDATE_SETTINGS: "/api/subscription-settings/update";
|
84
|
+
};
|
81
85
|
};
|
82
86
|
//# sourceMappingURL=routes.d.ts.map
|
@@ -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,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;gCAQE,MAAM;;;;;;;;gCASN,MAAM;;;iCAIL,MAAM;iCAEN,MAAM;iCAEN,MAAM;gCAEP,MAAM;;;;;;;;;;;;;;;;qCAiBD,MAAM;gDAEK,MAAM;6CAET,MAAM;8DAEW,MAAM;6CAEvB,MAAM;sCAEb,MAAM;qCAEP,MAAM;qCAEN,MAAM;;;4CAIC,MAAM;;;;kDAKA,MAAM;uCAEjB,MAAM;;;kCAIX,MAAM;uCAED,MAAM;;;;;;;;gCASb,MAAM;iCAEL,MAAM;;;;;;;;8CASO,MAAM
|
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,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;gCAQE,MAAM;;;;;;;;gCASN,MAAM;;;iCAIL,MAAM;iCAEN,MAAM;iCAEN,MAAM;gCAEP,MAAM;;;;;;;;;;;;;;;;qCAiBD,MAAM;gDAEK,MAAM;6CAET,MAAM;8DAEW,MAAM;6CAEvB,MAAM;sCAEb,MAAM;qCAEP,MAAM;qCAEN,MAAM;;;4CAIC,MAAM;;;;kDAKA,MAAM;uCAEjB,MAAM;;;kCAIX,MAAM;uCAED,MAAM;;;;;;;;gCASb,MAAM;iCAEL,MAAM;;;;;;;;8CASO,MAAM;;;;;;;CAQjC,CAAC"}
|
@@ -115,4 +115,8 @@ exports.REST_API = {
|
|
115
115
|
GET_INFO: (subscriptionType) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_ROUTES.GET_TEMPLATE}/${subscriptionType}`,
|
116
116
|
UPDATE_TEMPLATE: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_ROUTES.UPDATE_TEMPLATE}`,
|
117
117
|
},
|
118
|
+
SUBSCRIPTION_SETTINGS: {
|
119
|
+
GET_SETTINGS: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_ROUTES.GET_SETTINGS}`,
|
120
|
+
UPDATE_SETTINGS: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_ROUTES.UPDATE_SETTINGS}`,
|
121
|
+
},
|
118
122
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC"}
|
@@ -21,6 +21,7 @@ __exportStar(require("./inbounds"), exports);
|
|
21
21
|
__exportStar(require("./keygen"), exports);
|
22
22
|
__exportStar(require("./nodes"), exports);
|
23
23
|
__exportStar(require("./subscription"), exports);
|
24
|
+
__exportStar(require("./subscription-settings"), exports);
|
24
25
|
__exportStar(require("./subscription-template"), exports);
|
25
26
|
__exportStar(require("./system"), exports);
|
26
27
|
__exportStar(require("./users"), exports);
|
@@ -0,0 +1,78 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
export declare namespace GetSubscriptionSettingsCommand {
|
3
|
+
const url: "/api/subscription-settings/get";
|
4
|
+
const ResponseSchema: z.ZodObject<{
|
5
|
+
response: z.ZodObject<{
|
6
|
+
uuid: z.ZodString;
|
7
|
+
profileTitle: z.ZodString;
|
8
|
+
supportLink: z.ZodString;
|
9
|
+
profileWebpageUrl: z.ZodString;
|
10
|
+
profileUpdateInterval: z.ZodNumber;
|
11
|
+
happAnnounce: z.ZodNullable<z.ZodString>;
|
12
|
+
happRouting: z.ZodNullable<z.ZodString>;
|
13
|
+
expiredUsersRemarks: z.ZodArray<z.ZodString, "many">;
|
14
|
+
limitedUsersRemarks: z.ZodArray<z.ZodString, "many">;
|
15
|
+
disabledUsersRemarks: z.ZodArray<z.ZodString, "many">;
|
16
|
+
createdAt: z.ZodEffects<z.ZodString, Date, string>;
|
17
|
+
updatedAt: z.ZodEffects<z.ZodString, Date, string>;
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
19
|
+
uuid: string;
|
20
|
+
createdAt: Date;
|
21
|
+
updatedAt: Date;
|
22
|
+
profileTitle: string;
|
23
|
+
supportLink: string;
|
24
|
+
profileWebpageUrl: string;
|
25
|
+
profileUpdateInterval: number;
|
26
|
+
happAnnounce: string | null;
|
27
|
+
happRouting: string | null;
|
28
|
+
expiredUsersRemarks: string[];
|
29
|
+
limitedUsersRemarks: string[];
|
30
|
+
disabledUsersRemarks: string[];
|
31
|
+
}, {
|
32
|
+
uuid: string;
|
33
|
+
createdAt: string;
|
34
|
+
updatedAt: string;
|
35
|
+
profileTitle: string;
|
36
|
+
supportLink: string;
|
37
|
+
profileWebpageUrl: string;
|
38
|
+
profileUpdateInterval: number;
|
39
|
+
happAnnounce: string | null;
|
40
|
+
happRouting: string | null;
|
41
|
+
expiredUsersRemarks: string[];
|
42
|
+
limitedUsersRemarks: string[];
|
43
|
+
disabledUsersRemarks: string[];
|
44
|
+
}>;
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
46
|
+
response: {
|
47
|
+
uuid: string;
|
48
|
+
createdAt: Date;
|
49
|
+
updatedAt: Date;
|
50
|
+
profileTitle: string;
|
51
|
+
supportLink: string;
|
52
|
+
profileWebpageUrl: string;
|
53
|
+
profileUpdateInterval: number;
|
54
|
+
happAnnounce: string | null;
|
55
|
+
happRouting: string | null;
|
56
|
+
expiredUsersRemarks: string[];
|
57
|
+
limitedUsersRemarks: string[];
|
58
|
+
disabledUsersRemarks: string[];
|
59
|
+
};
|
60
|
+
}, {
|
61
|
+
response: {
|
62
|
+
uuid: string;
|
63
|
+
createdAt: string;
|
64
|
+
updatedAt: string;
|
65
|
+
profileTitle: string;
|
66
|
+
supportLink: string;
|
67
|
+
profileWebpageUrl: string;
|
68
|
+
profileUpdateInterval: number;
|
69
|
+
happAnnounce: string | null;
|
70
|
+
happRouting: string | null;
|
71
|
+
expiredUsersRemarks: string[];
|
72
|
+
limitedUsersRemarks: string[];
|
73
|
+
disabledUsersRemarks: string[];
|
74
|
+
};
|
75
|
+
}>;
|
76
|
+
type Response = z.infer<typeof ResponseSchema>;
|
77
|
+
}
|
78
|
+
//# sourceMappingURL=get-subscription-settings.command.d.ts.map
|
package/build/backend/commands/subscription-settings/get-subscription-settings.command.d.ts.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"get-subscription-settings.command.d.ts","sourceRoot":"","sources":["../../../../commands/subscription-settings/get-subscription-settings.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,8BAA8B,CAAC;IACrC,MAAM,GAAG,kCAA8C,CAAC;IAExD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetSubscriptionSettingsCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const models_1 = require("../../models");
|
6
|
+
const api_1 = require("../../api");
|
7
|
+
var GetSubscriptionSettingsCommand;
|
8
|
+
(function (GetSubscriptionSettingsCommand) {
|
9
|
+
GetSubscriptionSettingsCommand.url = api_1.REST_API.SUBSCRIPTION_SETTINGS.GET_SETTINGS;
|
10
|
+
GetSubscriptionSettingsCommand.ResponseSchema = zod_1.z.object({
|
11
|
+
response: models_1.SubscriptionSettingsSchema,
|
12
|
+
});
|
13
|
+
})(GetSubscriptionSettingsCommand || (exports.GetSubscriptionSettingsCommand = GetSubscriptionSettingsCommand = {}));
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/subscription-settings/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AACpD,cAAc,wCAAwC,CAAC"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./get-subscription-settings.command"), exports);
|
18
|
+
__exportStar(require("./update-subscription-settings.command"), exports);
|
package/build/backend/commands/subscription-settings/update-subscription-settings.command.d.ts
ADDED
@@ -0,0 +1,114 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
export declare namespace UpdateSubscriptionSettingsCommand {
|
3
|
+
const url: "/api/subscription-settings/update";
|
4
|
+
const TSQ_url: "/api/subscription-settings/update";
|
5
|
+
const RequestSchema: z.ZodObject<{
|
6
|
+
uuid: z.ZodString;
|
7
|
+
profileTitle: z.ZodOptional<z.ZodString>;
|
8
|
+
supportLink: z.ZodOptional<z.ZodString>;
|
9
|
+
profileWebpageUrl: z.ZodOptional<z.ZodString>;
|
10
|
+
profileUpdateInterval: z.ZodOptional<z.ZodNumber>;
|
11
|
+
happAnnounce: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
12
|
+
happRouting: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
13
|
+
expiredUsersRemarks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
14
|
+
limitedUsersRemarks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
15
|
+
disabledUsersRemarks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
17
|
+
uuid: string;
|
18
|
+
profileTitle?: string | undefined;
|
19
|
+
supportLink?: string | undefined;
|
20
|
+
profileWebpageUrl?: string | undefined;
|
21
|
+
profileUpdateInterval?: number | undefined;
|
22
|
+
happAnnounce?: string | null | undefined;
|
23
|
+
happRouting?: string | null | undefined;
|
24
|
+
expiredUsersRemarks?: string[] | undefined;
|
25
|
+
limitedUsersRemarks?: string[] | undefined;
|
26
|
+
disabledUsersRemarks?: string[] | undefined;
|
27
|
+
}, {
|
28
|
+
uuid: string;
|
29
|
+
profileTitle?: string | undefined;
|
30
|
+
supportLink?: string | undefined;
|
31
|
+
profileWebpageUrl?: string | undefined;
|
32
|
+
profileUpdateInterval?: number | undefined;
|
33
|
+
happAnnounce?: string | null | undefined;
|
34
|
+
happRouting?: string | null | undefined;
|
35
|
+
expiredUsersRemarks?: string[] | undefined;
|
36
|
+
limitedUsersRemarks?: string[] | undefined;
|
37
|
+
disabledUsersRemarks?: string[] | undefined;
|
38
|
+
}>;
|
39
|
+
type Request = z.infer<typeof RequestSchema>;
|
40
|
+
const ResponseSchema: z.ZodObject<{
|
41
|
+
response: z.ZodObject<{
|
42
|
+
uuid: z.ZodString;
|
43
|
+
profileTitle: z.ZodString;
|
44
|
+
supportLink: z.ZodString;
|
45
|
+
profileWebpageUrl: z.ZodString;
|
46
|
+
profileUpdateInterval: z.ZodNumber;
|
47
|
+
happAnnounce: z.ZodNullable<z.ZodString>;
|
48
|
+
happRouting: z.ZodNullable<z.ZodString>;
|
49
|
+
expiredUsersRemarks: z.ZodArray<z.ZodString, "many">;
|
50
|
+
limitedUsersRemarks: z.ZodArray<z.ZodString, "many">;
|
51
|
+
disabledUsersRemarks: z.ZodArray<z.ZodString, "many">;
|
52
|
+
createdAt: z.ZodEffects<z.ZodString, Date, string>;
|
53
|
+
updatedAt: z.ZodEffects<z.ZodString, Date, string>;
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
55
|
+
uuid: string;
|
56
|
+
createdAt: Date;
|
57
|
+
updatedAt: Date;
|
58
|
+
profileTitle: string;
|
59
|
+
supportLink: string;
|
60
|
+
profileWebpageUrl: string;
|
61
|
+
profileUpdateInterval: number;
|
62
|
+
happAnnounce: string | null;
|
63
|
+
happRouting: string | null;
|
64
|
+
expiredUsersRemarks: string[];
|
65
|
+
limitedUsersRemarks: string[];
|
66
|
+
disabledUsersRemarks: string[];
|
67
|
+
}, {
|
68
|
+
uuid: string;
|
69
|
+
createdAt: string;
|
70
|
+
updatedAt: string;
|
71
|
+
profileTitle: string;
|
72
|
+
supportLink: string;
|
73
|
+
profileWebpageUrl: string;
|
74
|
+
profileUpdateInterval: number;
|
75
|
+
happAnnounce: string | null;
|
76
|
+
happRouting: string | null;
|
77
|
+
expiredUsersRemarks: string[];
|
78
|
+
limitedUsersRemarks: string[];
|
79
|
+
disabledUsersRemarks: string[];
|
80
|
+
}>;
|
81
|
+
}, "strip", z.ZodTypeAny, {
|
82
|
+
response: {
|
83
|
+
uuid: string;
|
84
|
+
createdAt: Date;
|
85
|
+
updatedAt: Date;
|
86
|
+
profileTitle: string;
|
87
|
+
supportLink: string;
|
88
|
+
profileWebpageUrl: string;
|
89
|
+
profileUpdateInterval: number;
|
90
|
+
happAnnounce: string | null;
|
91
|
+
happRouting: string | null;
|
92
|
+
expiredUsersRemarks: string[];
|
93
|
+
limitedUsersRemarks: string[];
|
94
|
+
disabledUsersRemarks: string[];
|
95
|
+
};
|
96
|
+
}, {
|
97
|
+
response: {
|
98
|
+
uuid: string;
|
99
|
+
createdAt: string;
|
100
|
+
updatedAt: string;
|
101
|
+
profileTitle: string;
|
102
|
+
supportLink: string;
|
103
|
+
profileWebpageUrl: string;
|
104
|
+
profileUpdateInterval: number;
|
105
|
+
happAnnounce: string | null;
|
106
|
+
happRouting: string | null;
|
107
|
+
expiredUsersRemarks: string[];
|
108
|
+
limitedUsersRemarks: string[];
|
109
|
+
disabledUsersRemarks: string[];
|
110
|
+
};
|
111
|
+
}>;
|
112
|
+
type Response = z.infer<typeof ResponseSchema>;
|
113
|
+
}
|
114
|
+
//# sourceMappingURL=update-subscription-settings.command.d.ts.map
|
package/build/backend/commands/subscription-settings/update-subscription-settings.command.d.ts.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"update-subscription-settings.command.d.ts","sourceRoot":"","sources":["../../../../commands/subscription-settings/update-subscription-settings.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,iCAAiC,CAAC;IACxC,MAAM,GAAG,qCAAiD,CAAC;IAC3D,MAAM,OAAO,qCAAM,CAAC;IAEpB,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAcxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.UpdateSubscriptionSettingsCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const models_1 = require("../../models");
|
6
|
+
const api_1 = require("../../api");
|
7
|
+
var UpdateSubscriptionSettingsCommand;
|
8
|
+
(function (UpdateSubscriptionSettingsCommand) {
|
9
|
+
UpdateSubscriptionSettingsCommand.url = api_1.REST_API.SUBSCRIPTION_SETTINGS.UPDATE_SETTINGS;
|
10
|
+
UpdateSubscriptionSettingsCommand.TSQ_url = UpdateSubscriptionSettingsCommand.url;
|
11
|
+
UpdateSubscriptionSettingsCommand.RequestSchema = zod_1.z.object({
|
12
|
+
uuid: zod_1.z.string().uuid(),
|
13
|
+
profileTitle: zod_1.z.optional(zod_1.z.string()),
|
14
|
+
supportLink: zod_1.z.optional(zod_1.z.string()),
|
15
|
+
profileWebpageUrl: zod_1.z.optional(zod_1.z.string()),
|
16
|
+
profileUpdateInterval: zod_1.z.optional(zod_1.z.number().int()),
|
17
|
+
happAnnounce: zod_1.z.optional(zod_1.z.string().nullable()),
|
18
|
+
happRouting: zod_1.z.optional(zod_1.z.string().nullable()),
|
19
|
+
expiredUsersRemarks: zod_1.z.optional(zod_1.z.array(zod_1.z.string())),
|
20
|
+
limitedUsersRemarks: zod_1.z.optional(zod_1.z.array(zod_1.z.string())),
|
21
|
+
disabledUsersRemarks: zod_1.z.optional(zod_1.z.array(zod_1.z.string())),
|
22
|
+
});
|
23
|
+
UpdateSubscriptionSettingsCommand.ResponseSchema = zod_1.z.object({
|
24
|
+
response: models_1.SubscriptionSettingsSchema,
|
25
|
+
});
|
26
|
+
})(UpdateSubscriptionSettingsCommand || (exports.UpdateSubscriptionSettingsCommand = UpdateSubscriptionSettingsCommand = {}));
|
@@ -374,5 +374,20 @@ export declare const ERRORS: {
|
|
374
374
|
readonly message: "Get one host error";
|
375
375
|
readonly httpCode: 500;
|
376
376
|
};
|
377
|
+
readonly SUBSCRIPTION_SETTINGS_NOT_FOUND: {
|
378
|
+
readonly code: "A071";
|
379
|
+
readonly message: "Subscription settings not found";
|
380
|
+
readonly httpCode: 404;
|
381
|
+
};
|
382
|
+
readonly GET_SUBSCRIPTION_SETTINGS_ERROR: {
|
383
|
+
readonly code: "A072";
|
384
|
+
readonly message: "Get subscription settings error";
|
385
|
+
readonly httpCode: 500;
|
386
|
+
};
|
387
|
+
readonly UPDATE_SUBSCRIPTION_SETTINGS_ERROR: {
|
388
|
+
readonly code: "A073";
|
389
|
+
readonly message: "Update subscription settings error";
|
390
|
+
readonly httpCode: 500;
|
391
|
+
};
|
377
392
|
};
|
378
393
|
//# sourceMappingURL=errors.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../constants/errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAwJY,MAAM;;;;;;;;;;wCAUN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA4IN,MAAM
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../constants/errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAwJY,MAAM;;;;;;;;;;wCAUN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA4IN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0D3B,CAAC"}
|
@@ -345,4 +345,19 @@ exports.ERRORS = {
|
|
345
345
|
message: 'Get one host error',
|
346
346
|
httpCode: 500,
|
347
347
|
},
|
348
|
+
SUBSCRIPTION_SETTINGS_NOT_FOUND: {
|
349
|
+
code: 'A071',
|
350
|
+
message: 'Subscription settings not found',
|
351
|
+
httpCode: 404,
|
352
|
+
},
|
353
|
+
GET_SUBSCRIPTION_SETTINGS_ERROR: {
|
354
|
+
code: 'A072',
|
355
|
+
message: 'Get subscription settings error',
|
356
|
+
httpCode: 500,
|
357
|
+
},
|
358
|
+
UPDATE_SUBSCRIPTION_SETTINGS_ERROR: {
|
359
|
+
code: 'A073',
|
360
|
+
message: 'Update subscription settings error',
|
361
|
+
httpCode: 500,
|
362
|
+
},
|
348
363
|
};
|
@@ -5,5 +5,6 @@ export * from './hosts.schema';
|
|
5
5
|
export * from './inbounds.schema';
|
6
6
|
export * from './last-connected-node.schema';
|
7
7
|
export * from './nodes.schema';
|
8
|
+
export * from './subscription-settings.schema';
|
8
9
|
export * from './users.schema';
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../models/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../models/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gBAAgB,CAAC"}
|
@@ -21,4 +21,5 @@ __exportStar(require("./hosts.schema"), exports);
|
|
21
21
|
__exportStar(require("./inbounds.schema"), exports);
|
22
22
|
__exportStar(require("./last-connected-node.schema"), exports);
|
23
23
|
__exportStar(require("./nodes.schema"), exports);
|
24
|
+
__exportStar(require("./subscription-settings.schema"), exports);
|
24
25
|
__exportStar(require("./users.schema"), exports);
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
export declare const SubscriptionSettingsSchema: z.ZodObject<{
|
3
|
+
uuid: z.ZodString;
|
4
|
+
profileTitle: z.ZodString;
|
5
|
+
supportLink: z.ZodString;
|
6
|
+
profileWebpageUrl: z.ZodString;
|
7
|
+
profileUpdateInterval: z.ZodNumber;
|
8
|
+
happAnnounce: z.ZodNullable<z.ZodString>;
|
9
|
+
happRouting: z.ZodNullable<z.ZodString>;
|
10
|
+
expiredUsersRemarks: z.ZodArray<z.ZodString, "many">;
|
11
|
+
limitedUsersRemarks: z.ZodArray<z.ZodString, "many">;
|
12
|
+
disabledUsersRemarks: z.ZodArray<z.ZodString, "many">;
|
13
|
+
createdAt: z.ZodEffects<z.ZodString, Date, string>;
|
14
|
+
updatedAt: z.ZodEffects<z.ZodString, Date, string>;
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
16
|
+
uuid: string;
|
17
|
+
createdAt: Date;
|
18
|
+
updatedAt: Date;
|
19
|
+
profileTitle: string;
|
20
|
+
supportLink: string;
|
21
|
+
profileWebpageUrl: string;
|
22
|
+
profileUpdateInterval: number;
|
23
|
+
happAnnounce: string | null;
|
24
|
+
happRouting: string | null;
|
25
|
+
expiredUsersRemarks: string[];
|
26
|
+
limitedUsersRemarks: string[];
|
27
|
+
disabledUsersRemarks: string[];
|
28
|
+
}, {
|
29
|
+
uuid: string;
|
30
|
+
createdAt: string;
|
31
|
+
updatedAt: string;
|
32
|
+
profileTitle: string;
|
33
|
+
supportLink: string;
|
34
|
+
profileWebpageUrl: string;
|
35
|
+
profileUpdateInterval: number;
|
36
|
+
happAnnounce: string | null;
|
37
|
+
happRouting: string | null;
|
38
|
+
expiredUsersRemarks: string[];
|
39
|
+
limitedUsersRemarks: string[];
|
40
|
+
disabledUsersRemarks: string[];
|
41
|
+
}>;
|
42
|
+
//# sourceMappingURL=subscription-settings.schema.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"subscription-settings.schema.d.ts","sourceRoot":"","sources":["../../../models/subscription-settings.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBrC,CAAC"}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.SubscriptionSettingsSchema = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
exports.SubscriptionSettingsSchema = zod_1.z.object({
|
6
|
+
uuid: zod_1.z.string().uuid(),
|
7
|
+
profileTitle: zod_1.z.string(),
|
8
|
+
supportLink: zod_1.z.string(),
|
9
|
+
profileWebpageUrl: zod_1.z.string(),
|
10
|
+
profileUpdateInterval: zod_1.z.number().int(),
|
11
|
+
happAnnounce: zod_1.z.string().nullable(),
|
12
|
+
happRouting: zod_1.z.string().nullable(),
|
13
|
+
expiredUsersRemarks: zod_1.z.array(zod_1.z.string()),
|
14
|
+
limitedUsersRemarks: zod_1.z.array(zod_1.z.string()),
|
15
|
+
disabledUsersRemarks: zod_1.z.array(zod_1.z.string()),
|
16
|
+
createdAt: zod_1.z
|
17
|
+
.string()
|
18
|
+
.datetime()
|
19
|
+
.transform((str) => new Date(str)),
|
20
|
+
updatedAt: zod_1.z
|
21
|
+
.string()
|
22
|
+
.datetime()
|
23
|
+
.transform((str) => new Date(str)),
|
24
|
+
});
|
@@ -21,6 +21,7 @@ __exportStar(require("./inbounds"), exports);
|
|
21
21
|
__exportStar(require("./keygen"), exports);
|
22
22
|
__exportStar(require("./nodes"), exports);
|
23
23
|
__exportStar(require("./subscription"), exports);
|
24
|
+
__exportStar(require("./subscription-settings"), exports);
|
24
25
|
__exportStar(require("./subscription-template"), exports);
|
25
26
|
__exportStar(require("./system"), exports);
|
26
27
|
__exportStar(require("./users"), exports);
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.SUBSCRIPTION_SETTINGS_ROUTES = exports.SUBSCRIPTION_SETTINGS_CONTROLLER = void 0;
|
4
|
+
exports.SUBSCRIPTION_SETTINGS_CONTROLLER = 'subscription-settings';
|
5
|
+
exports.SUBSCRIPTION_SETTINGS_ROUTES = {
|
6
|
+
GET_SETTINGS: 'get',
|
7
|
+
UPDATE_SETTINGS: 'update',
|
8
|
+
};
|
@@ -115,4 +115,8 @@ exports.REST_API = {
|
|
115
115
|
GET_INFO: (subscriptionType) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_ROUTES.GET_TEMPLATE}/${subscriptionType}`,
|
116
116
|
UPDATE_TEMPLATE: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_ROUTES.UPDATE_TEMPLATE}`,
|
117
117
|
},
|
118
|
+
SUBSCRIPTION_SETTINGS: {
|
119
|
+
GET_SETTINGS: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_ROUTES.GET_SETTINGS}`,
|
120
|
+
UPDATE_SETTINGS: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_ROUTES.UPDATE_SETTINGS}`,
|
121
|
+
},
|
118
122
|
};
|
@@ -21,6 +21,7 @@ __exportStar(require("./inbounds"), exports);
|
|
21
21
|
__exportStar(require("./keygen"), exports);
|
22
22
|
__exportStar(require("./nodes"), exports);
|
23
23
|
__exportStar(require("./subscription"), exports);
|
24
|
+
__exportStar(require("./subscription-settings"), exports);
|
24
25
|
__exportStar(require("./subscription-template"), exports);
|
25
26
|
__exportStar(require("./system"), exports);
|
26
27
|
__exportStar(require("./users"), exports);
|
@@ -0,0 +1,13 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.GetSubscriptionSettingsCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const models_1 = require("../../models");
|
6
|
+
const api_1 = require("../../api");
|
7
|
+
var GetSubscriptionSettingsCommand;
|
8
|
+
(function (GetSubscriptionSettingsCommand) {
|
9
|
+
GetSubscriptionSettingsCommand.url = api_1.REST_API.SUBSCRIPTION_SETTINGS.GET_SETTINGS;
|
10
|
+
GetSubscriptionSettingsCommand.ResponseSchema = zod_1.z.object({
|
11
|
+
response: models_1.SubscriptionSettingsSchema,
|
12
|
+
});
|
13
|
+
})(GetSubscriptionSettingsCommand || (exports.GetSubscriptionSettingsCommand = GetSubscriptionSettingsCommand = {}));
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./get-subscription-settings.command"), exports);
|
18
|
+
__exportStar(require("./update-subscription-settings.command"), exports);
|
@@ -0,0 +1,26 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.UpdateSubscriptionSettingsCommand = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
const models_1 = require("../../models");
|
6
|
+
const api_1 = require("../../api");
|
7
|
+
var UpdateSubscriptionSettingsCommand;
|
8
|
+
(function (UpdateSubscriptionSettingsCommand) {
|
9
|
+
UpdateSubscriptionSettingsCommand.url = api_1.REST_API.SUBSCRIPTION_SETTINGS.UPDATE_SETTINGS;
|
10
|
+
UpdateSubscriptionSettingsCommand.TSQ_url = UpdateSubscriptionSettingsCommand.url;
|
11
|
+
UpdateSubscriptionSettingsCommand.RequestSchema = zod_1.z.object({
|
12
|
+
uuid: zod_1.z.string().uuid(),
|
13
|
+
profileTitle: zod_1.z.optional(zod_1.z.string()),
|
14
|
+
supportLink: zod_1.z.optional(zod_1.z.string()),
|
15
|
+
profileWebpageUrl: zod_1.z.optional(zod_1.z.string()),
|
16
|
+
profileUpdateInterval: zod_1.z.optional(zod_1.z.number().int()),
|
17
|
+
happAnnounce: zod_1.z.optional(zod_1.z.string().nullable()),
|
18
|
+
happRouting: zod_1.z.optional(zod_1.z.string().nullable()),
|
19
|
+
expiredUsersRemarks: zod_1.z.optional(zod_1.z.array(zod_1.z.string())),
|
20
|
+
limitedUsersRemarks: zod_1.z.optional(zod_1.z.array(zod_1.z.string())),
|
21
|
+
disabledUsersRemarks: zod_1.z.optional(zod_1.z.array(zod_1.z.string())),
|
22
|
+
});
|
23
|
+
UpdateSubscriptionSettingsCommand.ResponseSchema = zod_1.z.object({
|
24
|
+
response: models_1.SubscriptionSettingsSchema,
|
25
|
+
});
|
26
|
+
})(UpdateSubscriptionSettingsCommand || (exports.UpdateSubscriptionSettingsCommand = UpdateSubscriptionSettingsCommand = {}));
|
@@ -345,4 +345,19 @@ exports.ERRORS = {
|
|
345
345
|
message: 'Get one host error',
|
346
346
|
httpCode: 500,
|
347
347
|
},
|
348
|
+
SUBSCRIPTION_SETTINGS_NOT_FOUND: {
|
349
|
+
code: 'A071',
|
350
|
+
message: 'Subscription settings not found',
|
351
|
+
httpCode: 404,
|
352
|
+
},
|
353
|
+
GET_SUBSCRIPTION_SETTINGS_ERROR: {
|
354
|
+
code: 'A072',
|
355
|
+
message: 'Get subscription settings error',
|
356
|
+
httpCode: 500,
|
357
|
+
},
|
358
|
+
UPDATE_SUBSCRIPTION_SETTINGS_ERROR: {
|
359
|
+
code: 'A073',
|
360
|
+
message: 'Update subscription settings error',
|
361
|
+
httpCode: 500,
|
362
|
+
},
|
348
363
|
};
|
@@ -21,4 +21,5 @@ __exportStar(require("./hosts.schema"), exports);
|
|
21
21
|
__exportStar(require("./inbounds.schema"), exports);
|
22
22
|
__exportStar(require("./last-connected-node.schema"), exports);
|
23
23
|
__exportStar(require("./nodes.schema"), exports);
|
24
|
+
__exportStar(require("./subscription-settings.schema"), exports);
|
24
25
|
__exportStar(require("./users.schema"), exports);
|
@@ -0,0 +1,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.SubscriptionSettingsSchema = void 0;
|
4
|
+
const zod_1 = require("zod");
|
5
|
+
exports.SubscriptionSettingsSchema = zod_1.z.object({
|
6
|
+
uuid: zod_1.z.string().uuid(),
|
7
|
+
profileTitle: zod_1.z.string(),
|
8
|
+
supportLink: zod_1.z.string(),
|
9
|
+
profileWebpageUrl: zod_1.z.string(),
|
10
|
+
profileUpdateInterval: zod_1.z.number().int(),
|
11
|
+
happAnnounce: zod_1.z.string().nullable(),
|
12
|
+
happRouting: zod_1.z.string().nullable(),
|
13
|
+
expiredUsersRemarks: zod_1.z.array(zod_1.z.string()),
|
14
|
+
limitedUsersRemarks: zod_1.z.array(zod_1.z.string()),
|
15
|
+
disabledUsersRemarks: zod_1.z.array(zod_1.z.string()),
|
16
|
+
createdAt: zod_1.z
|
17
|
+
.string()
|
18
|
+
.datetime()
|
19
|
+
.transform((str) => new Date(str)),
|
20
|
+
updatedAt: zod_1.z
|
21
|
+
.string()
|
22
|
+
.datetime()
|
23
|
+
.transform((str) => new Date(str)),
|
24
|
+
});
|