@remnawave/backend-contract 2.2.2 → 2.2.4
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/subscription-template.d.ts +4 -1
- package/build/backend/api/controllers/subscription-template.d.ts.map +1 -1
- package/build/backend/api/controllers/subscription-template.js +5 -2
- package/build/backend/api/routes.d.ts +4 -1
- package/build/backend/api/routes.d.ts.map +1 -1
- package/build/backend/api/routes.js +4 -1
- package/build/backend/commands/subscription-settings/get-subscription-settings.command.d.ts +33 -22
- package/build/backend/commands/subscription-settings/get-subscription-settings.command.d.ts.map +1 -1
- package/build/backend/commands/subscription-settings/update-subscription-settings.command.d.ts +60 -40
- package/build/backend/commands/subscription-settings/update-subscription-settings.command.d.ts.map +1 -1
- package/build/backend/commands/subscription-template/create-template.command.d.ts +70 -0
- package/build/backend/commands/subscription-template/create-template.command.d.ts.map +1 -0
- package/build/backend/commands/subscription-template/create-template.command.js +26 -0
- package/build/backend/commands/subscription-template/delete-subscription-template.command.d.ts +33 -0
- package/build/backend/commands/subscription-template/delete-subscription-template.command.d.ts.map +1 -0
- package/build/backend/commands/subscription-template/delete-subscription-template.command.js +20 -0
- package/build/backend/commands/subscription-template/get-template.command.d.ts +9 -11
- package/build/backend/commands/subscription-template/get-template.command.d.ts.map +1 -1
- package/build/backend/commands/subscription-template/get-template.command.js +4 -3
- package/build/backend/commands/subscription-template/get-templates.command.d.ts +79 -0
- package/build/backend/commands/subscription-template/get-templates.command.d.ts.map +1 -0
- package/build/backend/commands/subscription-template/get-templates.command.js +25 -0
- package/build/backend/commands/subscription-template/index.d.ts +3 -0
- package/build/backend/commands/subscription-template/index.d.ts.map +1 -1
- package/build/backend/commands/subscription-template/index.js +3 -0
- package/build/backend/commands/subscription-template/update-template.command.d.ts +11 -10
- 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 -2
- package/build/backend/commands/system/testers/test-srr-matcher.command.d.ts +54 -36
- package/build/backend/commands/system/testers/test-srr-matcher.command.d.ts.map +1 -1
- package/build/backend/constants/cache-keys/cache-keys.constants.d.ts +2 -0
- package/build/backend/constants/cache-keys/cache-keys.constants.d.ts.map +1 -1
- package/build/backend/constants/cache-keys/cache-keys.constants.js +1 -0
- package/build/backend/constants/errors/errors.d.ts +60 -0
- package/build/backend/constants/errors/errors.d.ts.map +1 -1
- package/build/backend/constants/errors/errors.js +60 -0
- package/build/backend/models/response-rules/response-rule-modifications.schema.d.ts +9 -6
- package/build/backend/models/response-rules/response-rule-modifications.schema.d.ts.map +1 -1
- package/build/backend/models/response-rules/response-rule-modifications.schema.js +8 -0
- package/build/backend/models/response-rules/response-rule.schema.d.ts +30 -20
- package/build/backend/models/response-rules/response-rule.schema.d.ts.map +1 -1
- package/build/backend/models/response-rules/response-rules-config.schema.d.ts +21 -14
- package/build/backend/models/response-rules/response-rules-config.schema.d.ts.map +1 -1
- package/build/backend/models/subscription-settings.schema.d.ts +27 -18
- package/build/backend/models/subscription-settings.schema.d.ts.map +1 -1
- package/build/frontend/api/controllers/subscription-template.js +5 -2
- package/build/frontend/api/routes.js +4 -1
- package/build/frontend/commands/subscription-template/create-template.command.js +26 -0
- package/build/frontend/commands/subscription-template/delete-subscription-template.command.js +20 -0
- package/build/frontend/commands/subscription-template/get-template.command.js +4 -3
- package/build/frontend/commands/subscription-template/get-templates.command.js +25 -0
- package/build/frontend/commands/subscription-template/index.js +3 -0
- package/build/frontend/commands/subscription-template/update-template.command.js +4 -2
- package/build/frontend/constants/cache-keys/cache-keys.constants.js +1 -0
- package/build/frontend/constants/errors/errors.js +60 -0
- package/build/frontend/models/response-rules/response-rule-modifications.schema.js +8 -0
- package/package.json +1 -1
|
@@ -864,5 +864,65 @@ export declare const ERRORS: {
|
|
|
864
864
|
readonly message: "Snippet cannot contain empty objects";
|
|
865
865
|
readonly httpCode: 400;
|
|
866
866
|
};
|
|
867
|
+
readonly GET_ALL_SUBSCRIPTION_TEMPLATES_ERROR: {
|
|
868
|
+
readonly code: "A168";
|
|
869
|
+
readonly message: "Get all subscription templates error";
|
|
870
|
+
readonly httpCode: 500;
|
|
871
|
+
};
|
|
872
|
+
readonly GET_SUBSCRIPTION_TEMPLATE_BY_UUID_ERROR: {
|
|
873
|
+
readonly code: "A169";
|
|
874
|
+
readonly message: "Get subscription template by UUID error";
|
|
875
|
+
readonly httpCode: 500;
|
|
876
|
+
};
|
|
877
|
+
readonly SUBSCRIPTION_TEMPLATE_NOT_FOUND: {
|
|
878
|
+
readonly code: "A170";
|
|
879
|
+
readonly message: "Subscription template not found";
|
|
880
|
+
readonly httpCode: 404;
|
|
881
|
+
};
|
|
882
|
+
readonly UPDATE_SUBSCRIPTION_TEMPLATE_ERROR: {
|
|
883
|
+
readonly code: "A171";
|
|
884
|
+
readonly message: "Update subscription template error";
|
|
885
|
+
readonly httpCode: 500;
|
|
886
|
+
};
|
|
887
|
+
readonly RESERVED_TEMPLATE_NAME: {
|
|
888
|
+
readonly code: "A172";
|
|
889
|
+
readonly message: "This name is reserved. Please use a different name.";
|
|
890
|
+
readonly httpCode: 400;
|
|
891
|
+
};
|
|
892
|
+
readonly TEMPLATE_JSON_NOT_ALLOWED_FOR_YAML_TEMPLATE: {
|
|
893
|
+
readonly code: "A173";
|
|
894
|
+
readonly message: "Template JSON is not allowed for YAML template";
|
|
895
|
+
readonly httpCode: 400;
|
|
896
|
+
};
|
|
897
|
+
readonly TEMPLATE_YAML_NOT_ALLOWED_FOR_JSON_TEMPLATE: {
|
|
898
|
+
readonly code: "A174";
|
|
899
|
+
readonly message: "Template YAML is not allowed for JSON template";
|
|
900
|
+
readonly httpCode: 400;
|
|
901
|
+
};
|
|
902
|
+
readonly TEMPLATE_JSON_AND_YAML_CANNOT_BE_UPDATED_SIMULTANEOUSLY: {
|
|
903
|
+
readonly code: "A175";
|
|
904
|
+
readonly message: "Template JSON and YAML cannot be updated simultaneously";
|
|
905
|
+
readonly httpCode: 400;
|
|
906
|
+
};
|
|
907
|
+
readonly TEMPLATE_NAME_ALREADY_EXISTS_FOR_THIS_TYPE: {
|
|
908
|
+
readonly code: "A176";
|
|
909
|
+
readonly message: "Template name already exists for this type";
|
|
910
|
+
readonly httpCode: 400;
|
|
911
|
+
};
|
|
912
|
+
readonly DELETE_SUBSCRIPTION_TEMPLATE_ERROR: {
|
|
913
|
+
readonly code: "A177";
|
|
914
|
+
readonly message: "Delete subscription template error";
|
|
915
|
+
readonly httpCode: 500;
|
|
916
|
+
};
|
|
917
|
+
readonly RESERVED_TEMPLATE_CANNOT_BE_DELETED: {
|
|
918
|
+
readonly code: "A178";
|
|
919
|
+
readonly message: "Reserved template cannot be deleted";
|
|
920
|
+
readonly httpCode: 400;
|
|
921
|
+
};
|
|
922
|
+
readonly CREATE_SUBSCRIPTION_TEMPLATE_ERROR: {
|
|
923
|
+
readonly code: "A179";
|
|
924
|
+
readonly message: "Create subscription template error";
|
|
925
|
+
readonly httpCode: 500;
|
|
926
|
+
};
|
|
867
927
|
};
|
|
868
928
|
//# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAklB3B,CAAC"}
|
|
@@ -835,4 +835,64 @@ exports.ERRORS = {
|
|
|
835
835
|
message: 'Snippet cannot contain empty objects',
|
|
836
836
|
httpCode: 400,
|
|
837
837
|
},
|
|
838
|
+
GET_ALL_SUBSCRIPTION_TEMPLATES_ERROR: {
|
|
839
|
+
code: 'A168',
|
|
840
|
+
message: 'Get all subscription templates error',
|
|
841
|
+
httpCode: 500,
|
|
842
|
+
},
|
|
843
|
+
GET_SUBSCRIPTION_TEMPLATE_BY_UUID_ERROR: {
|
|
844
|
+
code: 'A169',
|
|
845
|
+
message: 'Get subscription template by UUID error',
|
|
846
|
+
httpCode: 500,
|
|
847
|
+
},
|
|
848
|
+
SUBSCRIPTION_TEMPLATE_NOT_FOUND: {
|
|
849
|
+
code: 'A170',
|
|
850
|
+
message: 'Subscription template not found',
|
|
851
|
+
httpCode: 404,
|
|
852
|
+
},
|
|
853
|
+
UPDATE_SUBSCRIPTION_TEMPLATE_ERROR: {
|
|
854
|
+
code: 'A171',
|
|
855
|
+
message: 'Update subscription template error',
|
|
856
|
+
httpCode: 500,
|
|
857
|
+
},
|
|
858
|
+
RESERVED_TEMPLATE_NAME: {
|
|
859
|
+
code: 'A172',
|
|
860
|
+
message: 'This name is reserved. Please use a different name.',
|
|
861
|
+
httpCode: 400,
|
|
862
|
+
},
|
|
863
|
+
TEMPLATE_JSON_NOT_ALLOWED_FOR_YAML_TEMPLATE: {
|
|
864
|
+
code: 'A173',
|
|
865
|
+
message: 'Template JSON is not allowed for YAML template',
|
|
866
|
+
httpCode: 400,
|
|
867
|
+
},
|
|
868
|
+
TEMPLATE_YAML_NOT_ALLOWED_FOR_JSON_TEMPLATE: {
|
|
869
|
+
code: 'A174',
|
|
870
|
+
message: 'Template YAML is not allowed for JSON template',
|
|
871
|
+
httpCode: 400,
|
|
872
|
+
},
|
|
873
|
+
TEMPLATE_JSON_AND_YAML_CANNOT_BE_UPDATED_SIMULTANEOUSLY: {
|
|
874
|
+
code: 'A175',
|
|
875
|
+
message: 'Template JSON and YAML cannot be updated simultaneously',
|
|
876
|
+
httpCode: 400,
|
|
877
|
+
},
|
|
878
|
+
TEMPLATE_NAME_ALREADY_EXISTS_FOR_THIS_TYPE: {
|
|
879
|
+
code: 'A176',
|
|
880
|
+
message: 'Template name already exists for this type',
|
|
881
|
+
httpCode: 400,
|
|
882
|
+
},
|
|
883
|
+
DELETE_SUBSCRIPTION_TEMPLATE_ERROR: {
|
|
884
|
+
code: 'A177',
|
|
885
|
+
message: 'Delete subscription template error',
|
|
886
|
+
httpCode: 500,
|
|
887
|
+
},
|
|
888
|
+
RESERVED_TEMPLATE_CANNOT_BE_DELETED: {
|
|
889
|
+
code: 'A178',
|
|
890
|
+
message: 'Reserved template cannot be deleted',
|
|
891
|
+
httpCode: 400,
|
|
892
|
+
},
|
|
893
|
+
CREATE_SUBSCRIPTION_TEMPLATE_ERROR: {
|
|
894
|
+
code: 'A179',
|
|
895
|
+
message: 'Create subscription template error',
|
|
896
|
+
httpCode: 500,
|
|
897
|
+
},
|
|
838
898
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
2
|
export declare const ResponseRuleModificationsSchema: z.ZodOptional<z.ZodObject<{
|
|
3
|
-
headers: z.ZodArray<z.ZodObject<{
|
|
3
|
+
headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
4
4
|
key: z.ZodString;
|
|
5
5
|
value: z.ZodString;
|
|
6
6
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -9,16 +9,19 @@ export declare const ResponseRuleModificationsSchema: z.ZodOptional<z.ZodObject<
|
|
|
9
9
|
}, {
|
|
10
10
|
value: string;
|
|
11
11
|
key: string;
|
|
12
|
-
}>, "many"
|
|
12
|
+
}>, "many">>;
|
|
13
|
+
overrideSubscriptionTemplateWith: z.ZodOptional<z.ZodString>;
|
|
13
14
|
}, "strip", z.ZodTypeAny, {
|
|
14
|
-
headers
|
|
15
|
+
headers?: {
|
|
15
16
|
value: string;
|
|
16
17
|
key: string;
|
|
17
|
-
}[];
|
|
18
|
+
}[] | undefined;
|
|
19
|
+
overrideSubscriptionTemplateWith?: string | undefined;
|
|
18
20
|
}, {
|
|
19
|
-
headers
|
|
21
|
+
headers?: {
|
|
20
22
|
value: string;
|
|
21
23
|
key: string;
|
|
22
|
-
}[];
|
|
24
|
+
}[] | undefined;
|
|
25
|
+
overrideSubscriptionTemplateWith?: string | undefined;
|
|
23
26
|
}>>;
|
|
24
27
|
//# sourceMappingURL=response-rule-modifications.schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response-rule-modifications.schema.d.ts","sourceRoot":"","sources":["../../../../models/response-rules/response-rule-modifications.schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,eAAO,MAAM,+BAA+B
|
|
1
|
+
{"version":3,"file":"response-rule-modifications.schema.d.ts","sourceRoot":"","sources":["../../../../models/response-rules/response-rule-modifications.schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;GAgFvC,CAAC"}
|
|
@@ -40,6 +40,14 @@ exports.ResponseRuleModificationsSchema = zod_1.default
|
|
|
40
40
|
},
|
|
41
41
|
],
|
|
42
42
|
markdownDescription: 'Array of headers to be added when the rule is matched.',
|
|
43
|
+
}))
|
|
44
|
+
.optional(),
|
|
45
|
+
overrideSubscriptionTemplateWith: zod_1.default
|
|
46
|
+
.string()
|
|
47
|
+
.min(1, 'Override subscription template with is required')
|
|
48
|
+
.optional()
|
|
49
|
+
.describe(JSON.stringify({
|
|
50
|
+
markdownDescription: 'Override the subscription template with the given name. If not provided, the default subscription template will be used. If the template name is not found, the default subscription template for this type will be used.',
|
|
43
51
|
})),
|
|
44
52
|
})
|
|
45
53
|
.optional()
|
|
@@ -48,7 +48,7 @@ export declare const ResponseRuleSchemaBase: z.ZodObject<{
|
|
|
48
48
|
readonly SINGBOX: "SINGBOX";
|
|
49
49
|
}>;
|
|
50
50
|
responseModifications: z.ZodOptional<z.ZodObject<{
|
|
51
|
-
headers: z.ZodArray<z.ZodObject<{
|
|
51
|
+
headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
52
52
|
key: z.ZodString;
|
|
53
53
|
value: z.ZodString;
|
|
54
54
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -57,17 +57,20 @@ export declare const ResponseRuleSchemaBase: z.ZodObject<{
|
|
|
57
57
|
}, {
|
|
58
58
|
value: string;
|
|
59
59
|
key: string;
|
|
60
|
-
}>, "many"
|
|
60
|
+
}>, "many">>;
|
|
61
|
+
overrideSubscriptionTemplateWith: z.ZodOptional<z.ZodString>;
|
|
61
62
|
}, "strip", z.ZodTypeAny, {
|
|
62
|
-
headers
|
|
63
|
+
headers?: {
|
|
63
64
|
value: string;
|
|
64
65
|
key: string;
|
|
65
|
-
}[];
|
|
66
|
+
}[] | undefined;
|
|
67
|
+
overrideSubscriptionTemplateWith?: string | undefined;
|
|
66
68
|
}, {
|
|
67
|
-
headers
|
|
69
|
+
headers?: {
|
|
68
70
|
value: string;
|
|
69
71
|
key: string;
|
|
70
|
-
}[];
|
|
72
|
+
}[] | undefined;
|
|
73
|
+
overrideSubscriptionTemplateWith?: string | undefined;
|
|
71
74
|
}>>;
|
|
72
75
|
}, "strip", z.ZodTypeAny, {
|
|
73
76
|
name: string;
|
|
@@ -82,10 +85,11 @@ export declare const ResponseRuleSchemaBase: z.ZodObject<{
|
|
|
82
85
|
responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
|
|
83
86
|
description?: string | undefined;
|
|
84
87
|
responseModifications?: {
|
|
85
|
-
headers
|
|
88
|
+
headers?: {
|
|
86
89
|
value: string;
|
|
87
90
|
key: string;
|
|
88
|
-
}[];
|
|
91
|
+
}[] | undefined;
|
|
92
|
+
overrideSubscriptionTemplateWith?: string | undefined;
|
|
89
93
|
} | undefined;
|
|
90
94
|
}, {
|
|
91
95
|
name: string;
|
|
@@ -100,10 +104,11 @@ export declare const ResponseRuleSchemaBase: z.ZodObject<{
|
|
|
100
104
|
responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
|
|
101
105
|
description?: string | undefined;
|
|
102
106
|
responseModifications?: {
|
|
103
|
-
headers
|
|
107
|
+
headers?: {
|
|
104
108
|
value: string;
|
|
105
109
|
key: string;
|
|
106
|
-
}[];
|
|
110
|
+
}[] | undefined;
|
|
111
|
+
overrideSubscriptionTemplateWith?: string | undefined;
|
|
107
112
|
} | undefined;
|
|
108
113
|
}>;
|
|
109
114
|
export declare const ResponseRuleSchema: z.ZodObject<{
|
|
@@ -155,7 +160,7 @@ export declare const ResponseRuleSchema: z.ZodObject<{
|
|
|
155
160
|
readonly SINGBOX: "SINGBOX";
|
|
156
161
|
}>;
|
|
157
162
|
responseModifications: z.ZodOptional<z.ZodObject<{
|
|
158
|
-
headers: z.ZodArray<z.ZodObject<{
|
|
163
|
+
headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
159
164
|
key: z.ZodString;
|
|
160
165
|
value: z.ZodString;
|
|
161
166
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -164,17 +169,20 @@ export declare const ResponseRuleSchema: z.ZodObject<{
|
|
|
164
169
|
}, {
|
|
165
170
|
value: string;
|
|
166
171
|
key: string;
|
|
167
|
-
}>, "many"
|
|
172
|
+
}>, "many">>;
|
|
173
|
+
overrideSubscriptionTemplateWith: z.ZodOptional<z.ZodString>;
|
|
168
174
|
}, "strip", z.ZodTypeAny, {
|
|
169
|
-
headers
|
|
175
|
+
headers?: {
|
|
170
176
|
value: string;
|
|
171
177
|
key: string;
|
|
172
|
-
}[];
|
|
178
|
+
}[] | undefined;
|
|
179
|
+
overrideSubscriptionTemplateWith?: string | undefined;
|
|
173
180
|
}, {
|
|
174
|
-
headers
|
|
181
|
+
headers?: {
|
|
175
182
|
value: string;
|
|
176
183
|
key: string;
|
|
177
|
-
}[];
|
|
184
|
+
}[] | undefined;
|
|
185
|
+
overrideSubscriptionTemplateWith?: string | undefined;
|
|
178
186
|
}>>;
|
|
179
187
|
}, "strip", z.ZodTypeAny, {
|
|
180
188
|
name: string;
|
|
@@ -189,10 +197,11 @@ export declare const ResponseRuleSchema: z.ZodObject<{
|
|
|
189
197
|
responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
|
|
190
198
|
description?: string | undefined;
|
|
191
199
|
responseModifications?: {
|
|
192
|
-
headers
|
|
200
|
+
headers?: {
|
|
193
201
|
value: string;
|
|
194
202
|
key: string;
|
|
195
|
-
}[];
|
|
203
|
+
}[] | undefined;
|
|
204
|
+
overrideSubscriptionTemplateWith?: string | undefined;
|
|
196
205
|
} | undefined;
|
|
197
206
|
}, {
|
|
198
207
|
name: string;
|
|
@@ -207,10 +216,11 @@ export declare const ResponseRuleSchema: z.ZodObject<{
|
|
|
207
216
|
responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
|
|
208
217
|
description?: string | undefined;
|
|
209
218
|
responseModifications?: {
|
|
210
|
-
headers
|
|
219
|
+
headers?: {
|
|
211
220
|
value: string;
|
|
212
221
|
key: string;
|
|
213
|
-
}[];
|
|
222
|
+
}[] | undefined;
|
|
223
|
+
overrideSubscriptionTemplateWith?: string | undefined;
|
|
214
224
|
} | undefined;
|
|
215
225
|
}>;
|
|
216
226
|
//# sourceMappingURL=response-rule.schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response-rule.schema.d.ts","sourceRoot":"","sources":["../../../../models/response-rules/response-rule.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"response-rule.schema.d.ts","sourceRoot":"","sources":["../../../../models/response-rules/response-rule.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgDjC,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqB9B,CAAC"}
|
|
@@ -52,7 +52,7 @@ export declare const ResponseRulesConfigSchema: z.ZodObject<{
|
|
|
52
52
|
readonly SINGBOX: "SINGBOX";
|
|
53
53
|
}>;
|
|
54
54
|
responseModifications: z.ZodOptional<z.ZodObject<{
|
|
55
|
-
headers: z.ZodArray<z.ZodObject<{
|
|
55
|
+
headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
56
56
|
key: z.ZodString;
|
|
57
57
|
value: z.ZodString;
|
|
58
58
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -61,17 +61,20 @@ export declare const ResponseRulesConfigSchema: z.ZodObject<{
|
|
|
61
61
|
}, {
|
|
62
62
|
value: string;
|
|
63
63
|
key: string;
|
|
64
|
-
}>, "many"
|
|
64
|
+
}>, "many">>;
|
|
65
|
+
overrideSubscriptionTemplateWith: z.ZodOptional<z.ZodString>;
|
|
65
66
|
}, "strip", z.ZodTypeAny, {
|
|
66
|
-
headers
|
|
67
|
+
headers?: {
|
|
67
68
|
value: string;
|
|
68
69
|
key: string;
|
|
69
|
-
}[];
|
|
70
|
+
}[] | undefined;
|
|
71
|
+
overrideSubscriptionTemplateWith?: string | undefined;
|
|
70
72
|
}, {
|
|
71
|
-
headers
|
|
73
|
+
headers?: {
|
|
72
74
|
value: string;
|
|
73
75
|
key: string;
|
|
74
|
-
}[];
|
|
76
|
+
}[] | undefined;
|
|
77
|
+
overrideSubscriptionTemplateWith?: string | undefined;
|
|
75
78
|
}>>;
|
|
76
79
|
}, "strip", z.ZodTypeAny, {
|
|
77
80
|
name: string;
|
|
@@ -86,10 +89,11 @@ export declare const ResponseRulesConfigSchema: z.ZodObject<{
|
|
|
86
89
|
responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
|
|
87
90
|
description?: string | undefined;
|
|
88
91
|
responseModifications?: {
|
|
89
|
-
headers
|
|
92
|
+
headers?: {
|
|
90
93
|
value: string;
|
|
91
94
|
key: string;
|
|
92
|
-
}[];
|
|
95
|
+
}[] | undefined;
|
|
96
|
+
overrideSubscriptionTemplateWith?: string | undefined;
|
|
93
97
|
} | undefined;
|
|
94
98
|
}, {
|
|
95
99
|
name: string;
|
|
@@ -104,10 +108,11 @@ export declare const ResponseRulesConfigSchema: z.ZodObject<{
|
|
|
104
108
|
responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
|
|
105
109
|
description?: string | undefined;
|
|
106
110
|
responseModifications?: {
|
|
107
|
-
headers
|
|
111
|
+
headers?: {
|
|
108
112
|
value: string;
|
|
109
113
|
key: string;
|
|
110
|
-
}[];
|
|
114
|
+
}[] | undefined;
|
|
115
|
+
overrideSubscriptionTemplateWith?: string | undefined;
|
|
111
116
|
} | undefined;
|
|
112
117
|
}>, "many">;
|
|
113
118
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -125,10 +130,11 @@ export declare const ResponseRulesConfigSchema: z.ZodObject<{
|
|
|
125
130
|
responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
|
|
126
131
|
description?: string | undefined;
|
|
127
132
|
responseModifications?: {
|
|
128
|
-
headers
|
|
133
|
+
headers?: {
|
|
129
134
|
value: string;
|
|
130
135
|
key: string;
|
|
131
|
-
}[];
|
|
136
|
+
}[] | undefined;
|
|
137
|
+
overrideSubscriptionTemplateWith?: string | undefined;
|
|
132
138
|
} | undefined;
|
|
133
139
|
}[];
|
|
134
140
|
}, {
|
|
@@ -146,10 +152,11 @@ export declare const ResponseRulesConfigSchema: z.ZodObject<{
|
|
|
146
152
|
responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
|
|
147
153
|
description?: string | undefined;
|
|
148
154
|
responseModifications?: {
|
|
149
|
-
headers
|
|
155
|
+
headers?: {
|
|
150
156
|
value: string;
|
|
151
157
|
key: string;
|
|
152
|
-
}[];
|
|
158
|
+
}[] | undefined;
|
|
159
|
+
overrideSubscriptionTemplateWith?: string | undefined;
|
|
153
160
|
} | undefined;
|
|
154
161
|
}[];
|
|
155
162
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response-rules-config.schema.d.ts","sourceRoot":"","sources":["../../../../models/response-rules/response-rules-config.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,yBAAyB
|
|
1
|
+
{"version":3,"file":"response-rules-config.schema.d.ts","sourceRoot":"","sources":["../../../../models/response-rules/response-rules-config.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAepC,CAAC"}
|
|
@@ -68,7 +68,7 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
|
|
|
68
68
|
readonly SINGBOX: "SINGBOX";
|
|
69
69
|
}>;
|
|
70
70
|
responseModifications: z.ZodOptional<z.ZodObject<{
|
|
71
|
-
headers: z.ZodArray<z.ZodObject<{
|
|
71
|
+
headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
72
72
|
key: z.ZodString;
|
|
73
73
|
value: z.ZodString;
|
|
74
74
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -77,17 +77,20 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
|
|
|
77
77
|
}, {
|
|
78
78
|
value: string;
|
|
79
79
|
key: string;
|
|
80
|
-
}>, "many"
|
|
80
|
+
}>, "many">>;
|
|
81
|
+
overrideSubscriptionTemplateWith: z.ZodOptional<z.ZodString>;
|
|
81
82
|
}, "strip", z.ZodTypeAny, {
|
|
82
|
-
headers
|
|
83
|
+
headers?: {
|
|
83
84
|
value: string;
|
|
84
85
|
key: string;
|
|
85
|
-
}[];
|
|
86
|
+
}[] | undefined;
|
|
87
|
+
overrideSubscriptionTemplateWith?: string | undefined;
|
|
86
88
|
}, {
|
|
87
|
-
headers
|
|
89
|
+
headers?: {
|
|
88
90
|
value: string;
|
|
89
91
|
key: string;
|
|
90
|
-
}[];
|
|
92
|
+
}[] | undefined;
|
|
93
|
+
overrideSubscriptionTemplateWith?: string | undefined;
|
|
91
94
|
}>>;
|
|
92
95
|
}, "strip", z.ZodTypeAny, {
|
|
93
96
|
name: string;
|
|
@@ -102,10 +105,11 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
|
|
|
102
105
|
responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
|
|
103
106
|
description?: string | undefined;
|
|
104
107
|
responseModifications?: {
|
|
105
|
-
headers
|
|
108
|
+
headers?: {
|
|
106
109
|
value: string;
|
|
107
110
|
key: string;
|
|
108
|
-
}[];
|
|
111
|
+
}[] | undefined;
|
|
112
|
+
overrideSubscriptionTemplateWith?: string | undefined;
|
|
109
113
|
} | undefined;
|
|
110
114
|
}, {
|
|
111
115
|
name: string;
|
|
@@ -120,10 +124,11 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
|
|
|
120
124
|
responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
|
|
121
125
|
description?: string | undefined;
|
|
122
126
|
responseModifications?: {
|
|
123
|
-
headers
|
|
127
|
+
headers?: {
|
|
124
128
|
value: string;
|
|
125
129
|
key: string;
|
|
126
|
-
}[];
|
|
130
|
+
}[] | undefined;
|
|
131
|
+
overrideSubscriptionTemplateWith?: string | undefined;
|
|
127
132
|
} | undefined;
|
|
128
133
|
}>, "many">;
|
|
129
134
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -141,10 +146,11 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
|
|
|
141
146
|
responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
|
|
142
147
|
description?: string | undefined;
|
|
143
148
|
responseModifications?: {
|
|
144
|
-
headers
|
|
149
|
+
headers?: {
|
|
145
150
|
value: string;
|
|
146
151
|
key: string;
|
|
147
|
-
}[];
|
|
152
|
+
}[] | undefined;
|
|
153
|
+
overrideSubscriptionTemplateWith?: string | undefined;
|
|
148
154
|
} | undefined;
|
|
149
155
|
}[];
|
|
150
156
|
}, {
|
|
@@ -162,10 +168,11 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
|
|
|
162
168
|
responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
|
|
163
169
|
description?: string | undefined;
|
|
164
170
|
responseModifications?: {
|
|
165
|
-
headers
|
|
171
|
+
headers?: {
|
|
166
172
|
value: string;
|
|
167
173
|
key: string;
|
|
168
|
-
}[];
|
|
174
|
+
}[] | undefined;
|
|
175
|
+
overrideSubscriptionTemplateWith?: string | undefined;
|
|
169
176
|
} | undefined;
|
|
170
177
|
}[];
|
|
171
178
|
}>>;
|
|
@@ -204,10 +211,11 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
|
|
|
204
211
|
responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
|
|
205
212
|
description?: string | undefined;
|
|
206
213
|
responseModifications?: {
|
|
207
|
-
headers
|
|
214
|
+
headers?: {
|
|
208
215
|
value: string;
|
|
209
216
|
key: string;
|
|
210
|
-
}[];
|
|
217
|
+
}[] | undefined;
|
|
218
|
+
overrideSubscriptionTemplateWith?: string | undefined;
|
|
211
219
|
} | undefined;
|
|
212
220
|
}[];
|
|
213
221
|
} | null;
|
|
@@ -244,10 +252,11 @@ export declare const SubscriptionSettingsSchema: z.ZodObject<{
|
|
|
244
252
|
responseType: "STASH" | "SINGBOX" | "MIHOMO" | "XRAY_JSON" | "CLASH" | "XRAY_BASE64" | "BROWSER" | "BLOCK" | "STATUS_CODE_404" | "STATUS_CODE_451" | "SOCKET_DROP";
|
|
245
253
|
description?: string | undefined;
|
|
246
254
|
responseModifications?: {
|
|
247
|
-
headers
|
|
255
|
+
headers?: {
|
|
248
256
|
value: string;
|
|
249
257
|
key: string;
|
|
250
|
-
}[];
|
|
258
|
+
}[] | undefined;
|
|
259
|
+
overrideSubscriptionTemplateWith?: string | undefined;
|
|
251
260
|
} | undefined;
|
|
252
261
|
}[];
|
|
253
262
|
} | null;
|
|
@@ -1 +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;AAIxB,eAAO,MAAM,0BAA0B
|
|
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;AAIxB,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCrC,CAAC"}
|
|
@@ -3,6 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SUBSCRIPTION_TEMPLATE_ROUTES = exports.SUBSCRIPTION_TEMPLATE_CONTROLLER = void 0;
|
|
4
4
|
exports.SUBSCRIPTION_TEMPLATE_CONTROLLER = 'subscription-templates';
|
|
5
5
|
exports.SUBSCRIPTION_TEMPLATE_ROUTES = {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
GET_ALL: '', // get
|
|
7
|
+
GET: (uuid) => `${uuid}`, // get
|
|
8
|
+
UPDATE: '', // patch
|
|
9
|
+
DELETE: (uuid) => `${uuid}`, // delete
|
|
10
|
+
CREATE: '', // post
|
|
8
11
|
};
|
|
@@ -160,8 +160,11 @@ exports.REST_API = {
|
|
|
160
160
|
},
|
|
161
161
|
},
|
|
162
162
|
SUBSCRIPTION_TEMPLATE: {
|
|
163
|
-
GET: (
|
|
163
|
+
GET: (uuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_ROUTES.GET(uuid)}`,
|
|
164
164
|
UPDATE: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_ROUTES.UPDATE}`,
|
|
165
|
+
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_ROUTES.DELETE(uuid)}`,
|
|
166
|
+
GET_ALL: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_ROUTES.GET_ALL}`,
|
|
167
|
+
CREATE: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_TEMPLATE_ROUTES.CREATE}`,
|
|
165
168
|
},
|
|
166
169
|
SUBSCRIPTION_SETTINGS: {
|
|
167
170
|
GET: `${exports.ROOT}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_CONTROLLER}/${CONTROLLERS.SUBSCRIPTION_SETTINGS_ROUTES.GET}`,
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateSubscriptionTemplateCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../api");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
const constants_2 = require("../../constants");
|
|
8
|
+
var CreateSubscriptionTemplateCommand;
|
|
9
|
+
(function (CreateSubscriptionTemplateCommand) {
|
|
10
|
+
CreateSubscriptionTemplateCommand.url = api_1.REST_API.SUBSCRIPTION_TEMPLATE.CREATE;
|
|
11
|
+
CreateSubscriptionTemplateCommand.TSQ_url = CreateSubscriptionTemplateCommand.url;
|
|
12
|
+
CreateSubscriptionTemplateCommand.endpointDetails = (0, constants_2.getEndpointDetails)(api_1.SUBSCRIPTION_TEMPLATE_ROUTES.CREATE, 'post', 'Create subscription template');
|
|
13
|
+
CreateSubscriptionTemplateCommand.RequestSchema = zod_1.z.object({
|
|
14
|
+
name: zod_1.z.string(),
|
|
15
|
+
templateType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TEMPLATE_TYPE),
|
|
16
|
+
});
|
|
17
|
+
CreateSubscriptionTemplateCommand.ResponseSchema = zod_1.z.object({
|
|
18
|
+
response: zod_1.z.object({
|
|
19
|
+
uuid: zod_1.z.string().uuid(),
|
|
20
|
+
name: zod_1.z.string(),
|
|
21
|
+
templateType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TEMPLATE_TYPE),
|
|
22
|
+
templateJson: zod_1.z.nullable(zod_1.z.unknown()),
|
|
23
|
+
encodedTemplateYaml: zod_1.z.nullable(zod_1.z.string()),
|
|
24
|
+
}),
|
|
25
|
+
});
|
|
26
|
+
})(CreateSubscriptionTemplateCommand || (exports.CreateSubscriptionTemplateCommand = CreateSubscriptionTemplateCommand = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteSubscriptionTemplateCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../api");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
var DeleteSubscriptionTemplateCommand;
|
|
8
|
+
(function (DeleteSubscriptionTemplateCommand) {
|
|
9
|
+
DeleteSubscriptionTemplateCommand.url = api_1.REST_API.SUBSCRIPTION_TEMPLATE.DELETE;
|
|
10
|
+
DeleteSubscriptionTemplateCommand.TSQ_url = DeleteSubscriptionTemplateCommand.url(':uuid');
|
|
11
|
+
DeleteSubscriptionTemplateCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.SUBSCRIPTION_TEMPLATE_ROUTES.DELETE(':uuid'), 'delete', 'Delete subscription template');
|
|
12
|
+
DeleteSubscriptionTemplateCommand.RequestSchema = zod_1.z.object({
|
|
13
|
+
uuid: zod_1.z.string().uuid(),
|
|
14
|
+
});
|
|
15
|
+
DeleteSubscriptionTemplateCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
+
response: zod_1.z.object({
|
|
17
|
+
isDeleted: zod_1.z.boolean(),
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
})(DeleteSubscriptionTemplateCommand || (exports.DeleteSubscriptionTemplateCommand = DeleteSubscriptionTemplateCommand = {}));
|
|
@@ -8,14 +8,15 @@ const constants_2 = require("../../constants");
|
|
|
8
8
|
var GetSubscriptionTemplateCommand;
|
|
9
9
|
(function (GetSubscriptionTemplateCommand) {
|
|
10
10
|
GetSubscriptionTemplateCommand.url = api_1.REST_API.SUBSCRIPTION_TEMPLATE.GET;
|
|
11
|
-
GetSubscriptionTemplateCommand.TSQ_url = GetSubscriptionTemplateCommand.url(':
|
|
12
|
-
GetSubscriptionTemplateCommand.endpointDetails = (0, constants_2.getEndpointDetails)(api_1.SUBSCRIPTION_TEMPLATE_ROUTES.GET(':
|
|
11
|
+
GetSubscriptionTemplateCommand.TSQ_url = GetSubscriptionTemplateCommand.url(':uuid');
|
|
12
|
+
GetSubscriptionTemplateCommand.endpointDetails = (0, constants_2.getEndpointDetails)(api_1.SUBSCRIPTION_TEMPLATE_ROUTES.GET(':uuid'), 'get', 'Get subscription template by uuid');
|
|
13
13
|
GetSubscriptionTemplateCommand.RequestSchema = zod_1.z.object({
|
|
14
|
-
|
|
14
|
+
uuid: zod_1.z.string().uuid(),
|
|
15
15
|
});
|
|
16
16
|
GetSubscriptionTemplateCommand.ResponseSchema = zod_1.z.object({
|
|
17
17
|
response: zod_1.z.object({
|
|
18
18
|
uuid: zod_1.z.string().uuid(),
|
|
19
|
+
name: zod_1.z.string(),
|
|
19
20
|
templateType: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_TEMPLATE_TYPE),
|
|
20
21
|
templateJson: zod_1.z.nullable(zod_1.z.unknown()),
|
|
21
22
|
encodedTemplateYaml: zod_1.z.nullable(zod_1.z.string()),
|