@remnawave/backend-contract 0.3.8 → 0.3.10

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 (41) hide show
  1. package/build/backend/api/controllers/index.d.ts +1 -0
  2. package/build/backend/api/controllers/index.d.ts.map +1 -1
  3. package/build/backend/api/controllers/index.js +1 -0
  4. package/build/backend/api/controllers/subscription-settings.d.ts +6 -0
  5. package/build/backend/api/controllers/subscription-settings.d.ts.map +1 -0
  6. package/build/backend/api/controllers/subscription-settings.js +8 -0
  7. package/build/backend/api/routes.d.ts +4 -0
  8. package/build/backend/api/routes.d.ts.map +1 -1
  9. package/build/backend/api/routes.js +4 -0
  10. package/build/backend/commands/index.d.ts +1 -0
  11. package/build/backend/commands/index.d.ts.map +1 -1
  12. package/build/backend/commands/index.js +1 -0
  13. package/build/backend/commands/subscription-settings/get-subscription-settings.command.d.ts +79 -0
  14. package/build/backend/commands/subscription-settings/get-subscription-settings.command.d.ts.map +1 -0
  15. package/build/backend/commands/subscription-settings/get-subscription-settings.command.js +14 -0
  16. package/build/backend/commands/subscription-settings/index.d.ts +3 -0
  17. package/build/backend/commands/subscription-settings/index.d.ts.map +1 -0
  18. package/build/backend/commands/subscription-settings/index.js +18 -0
  19. package/build/backend/commands/subscription-settings/update-subscription-settings.command.d.ts +114 -0
  20. package/build/backend/commands/subscription-settings/update-subscription-settings.command.d.ts.map +1 -0
  21. package/build/backend/commands/subscription-settings/update-subscription-settings.command.js +26 -0
  22. package/build/backend/constants/errors/errors.d.ts +15 -0
  23. package/build/backend/constants/errors/errors.d.ts.map +1 -1
  24. package/build/backend/constants/errors/errors.js +15 -0
  25. package/build/backend/models/index.d.ts +1 -0
  26. package/build/backend/models/index.d.ts.map +1 -1
  27. package/build/backend/models/index.js +1 -0
  28. package/build/backend/models/subscription-settings.schema.d.ts +42 -0
  29. package/build/backend/models/subscription-settings.schema.d.ts.map +1 -0
  30. package/build/backend/models/subscription-settings.schema.js +24 -0
  31. package/build/frontend/api/controllers/index.js +1 -0
  32. package/build/frontend/api/controllers/subscription-settings.js +8 -0
  33. package/build/frontend/api/routes.js +4 -0
  34. package/build/frontend/commands/index.js +1 -0
  35. package/build/frontend/commands/subscription-settings/get-subscription-settings.command.js +14 -0
  36. package/build/frontend/commands/subscription-settings/index.js +18 -0
  37. package/build/frontend/commands/subscription-settings/update-subscription-settings.command.js +26 -0
  38. package/build/frontend/constants/errors/errors.js +15 -0
  39. package/build/frontend/models/index.js +1 -0
  40. package/build/frontend/models/subscription-settings.schema.js +24 -0
  41. package/package.json +1 -1
@@ -5,6 +5,7 @@ export * from './inbounds';
5
5
  export * from './keygen';
6
6
  export * from './nodes';
7
7
  export * from './subscription';
8
+ export * from './subscription-settings';
8
9
  export * from './subscription-template';
9
10
  export * from './system';
10
11
  export * from './users';
@@ -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,6 @@
1
+ export declare const SUBSCRIPTION_SETTINGS_CONTROLLER: "subscription-settings";
2
+ export declare const SUBSCRIPTION_SETTINGS_ROUTES: {
3
+ readonly GET_SETTINGS: "get";
4
+ readonly UPDATE_SETTINGS: "update";
5
+ };
6
+ //# sourceMappingURL=subscription-settings.d.ts.map
@@ -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;;;CAIjC,CAAC"}
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
  };
@@ -5,6 +5,7 @@ export * from './inbounds';
5
5
  export * from './keygen';
6
6
  export * from './nodes';
7
7
  export * from './subscription';
8
+ export * from './subscription-settings';
8
9
  export * from './subscription-template';
9
10
  export * from './system';
10
11
  export * from './users';
@@ -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,79 @@
1
+ import { z } from 'zod';
2
+ export declare namespace GetSubscriptionSettingsCommand {
3
+ const url: "/api/subscription-settings/get";
4
+ const TSQ_url: "/api/subscription-settings/get";
5
+ const ResponseSchema: z.ZodObject<{
6
+ response: z.ZodObject<{
7
+ uuid: z.ZodString;
8
+ profileTitle: z.ZodString;
9
+ supportLink: z.ZodString;
10
+ profileWebpageUrl: z.ZodString;
11
+ profileUpdateInterval: z.ZodNumber;
12
+ happAnnounce: z.ZodNullable<z.ZodString>;
13
+ happRouting: z.ZodNullable<z.ZodString>;
14
+ expiredUsersRemarks: z.ZodArray<z.ZodString, "many">;
15
+ limitedUsersRemarks: z.ZodArray<z.ZodString, "many">;
16
+ disabledUsersRemarks: z.ZodArray<z.ZodString, "many">;
17
+ createdAt: z.ZodEffects<z.ZodString, Date, string>;
18
+ updatedAt: z.ZodEffects<z.ZodString, Date, string>;
19
+ }, "strip", z.ZodTypeAny, {
20
+ uuid: string;
21
+ createdAt: Date;
22
+ updatedAt: Date;
23
+ profileTitle: string;
24
+ supportLink: string;
25
+ profileWebpageUrl: string;
26
+ profileUpdateInterval: number;
27
+ happAnnounce: string | null;
28
+ happRouting: string | null;
29
+ expiredUsersRemarks: string[];
30
+ limitedUsersRemarks: string[];
31
+ disabledUsersRemarks: string[];
32
+ }, {
33
+ uuid: string;
34
+ createdAt: string;
35
+ updatedAt: string;
36
+ profileTitle: string;
37
+ supportLink: string;
38
+ profileWebpageUrl: string;
39
+ profileUpdateInterval: number;
40
+ happAnnounce: string | null;
41
+ happRouting: string | null;
42
+ expiredUsersRemarks: string[];
43
+ limitedUsersRemarks: string[];
44
+ disabledUsersRemarks: string[];
45
+ }>;
46
+ }, "strip", z.ZodTypeAny, {
47
+ response: {
48
+ uuid: string;
49
+ createdAt: Date;
50
+ updatedAt: Date;
51
+ profileTitle: string;
52
+ supportLink: string;
53
+ profileWebpageUrl: string;
54
+ profileUpdateInterval: number;
55
+ happAnnounce: string | null;
56
+ happRouting: string | null;
57
+ expiredUsersRemarks: string[];
58
+ limitedUsersRemarks: string[];
59
+ disabledUsersRemarks: string[];
60
+ };
61
+ }, {
62
+ response: {
63
+ uuid: string;
64
+ createdAt: string;
65
+ updatedAt: string;
66
+ profileTitle: string;
67
+ supportLink: string;
68
+ profileWebpageUrl: string;
69
+ profileUpdateInterval: number;
70
+ happAnnounce: string | null;
71
+ happRouting: string | null;
72
+ expiredUsersRemarks: string[];
73
+ limitedUsersRemarks: string[];
74
+ disabledUsersRemarks: string[];
75
+ };
76
+ }>;
77
+ type Response = z.infer<typeof ResponseSchema>;
78
+ }
79
+ //# sourceMappingURL=get-subscription-settings.command.d.ts.map
@@ -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;IACxD,MAAM,OAAO,kCAAM,CAAC;IAEpB,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -0,0 +1,14 @@
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.TSQ_url = GetSubscriptionSettingsCommand.url;
11
+ GetSubscriptionSettingsCommand.ResponseSchema = zod_1.z.object({
12
+ response: models_1.SubscriptionSettingsSchema,
13
+ });
14
+ })(GetSubscriptionSettingsCommand || (exports.GetSubscriptionSettingsCommand = GetSubscriptionSettingsCommand = {}));
@@ -0,0 +1,3 @@
1
+ export * from './get-subscription-settings.command';
2
+ export * from './update-subscription-settings.command';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -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);
@@ -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
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2C3B,CAAC"}
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,14 @@
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.TSQ_url = GetSubscriptionSettingsCommand.url;
11
+ GetSubscriptionSettingsCommand.ResponseSchema = zod_1.z.object({
12
+ response: models_1.SubscriptionSettingsSchema,
13
+ });
14
+ })(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
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "0.3.8",
3
+ "version": "0.3.10",
4
4
  "public": true,
5
5
  "license": "AGPL-3.0-only",
6
6
  "description": "A contract library for Remnawave Backend. It can be used in backend and frontend.",