@remnawave/backend-contract 2.5.1 → 2.5.3

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.
@@ -12,13 +12,17 @@ export declare namespace RevokeUserSubscriptionCommand {
12
12
  }>;
13
13
  type Request = z.infer<typeof RequestSchema>;
14
14
  const RequestBodySchema: z.ZodEffects<z.ZodObject<{
15
+ revokeOnlyPasswords: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
15
16
  shortUuid: z.ZodOptional<z.ZodString>;
16
17
  }, "strip", z.ZodTypeAny, {
17
18
  shortUuid?: string | undefined;
19
+ revokeOnlyPasswords?: boolean | undefined;
18
20
  }, {
19
21
  shortUuid?: string | undefined;
22
+ revokeOnlyPasswords?: boolean | undefined;
20
23
  }>, {
21
24
  shortUuid?: string | undefined;
25
+ revokeOnlyPasswords?: boolean | undefined;
22
26
  }, unknown>;
23
27
  type RequestBody = z.infer<typeof RequestBodySchema>;
24
28
  const ResponseSchema: z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"revoke-user-subscription.command.d.ts","sourceRoot":"","sources":["../../../../../commands/users/actions/revoke-user-subscription.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,6BAA6B,CAAC;IACpC,MAAM,GAAG,0BAA6C,CAAC;IACvD,MAAM,OAAO,QAAe,CAAC;IAE7B,MAAM,eAAe,8CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,iBAAiB;;;;;;;;eAa7B,CAAC;IAEF,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;IAErD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"revoke-user-subscription.command.d.ts","sourceRoot":"","sources":["../../../../../commands/users/actions/revoke-user-subscription.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,yBAAiB,6BAA6B,CAAC;IACpC,MAAM,GAAG,0BAA6C,CAAC;IACvD,MAAM,OAAO,QAAe,CAAC;IAE7B,MAAM,eAAe,8CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,iBAAiB;;;;;;;;;;;;eAsB7B,CAAC;IAEF,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;IAErD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -14,6 +14,10 @@ var RevokeUserSubscriptionCommand;
14
14
  uuid: zod_1.z.string().uuid(),
15
15
  });
16
16
  RevokeUserSubscriptionCommand.RequestBodySchema = zod_1.z.preprocess((val) => val || {}, zod_1.z.object({
17
+ revokeOnlyPasswords: zod_1.z.optional(zod_1.z
18
+ .boolean()
19
+ .default(false)
20
+ .describe('Optional. If true, only passwords will be revoked, without changing the short UUID (Subscription URL).')),
17
21
  shortUuid: zod_1.z.optional(zod_1.z
18
22
  .string()
19
23
  .min(6, { message: 'Short UUID must be at least 6 characters' })
@@ -85,4 +85,8 @@ export declare const EVENTS_SCOPES: {
85
85
  readonly CRM: "crm";
86
86
  };
87
87
  export type TEventsScope = (typeof EVENTS_SCOPES)[keyof typeof EVENTS_SCOPES];
88
+ type ObjectValues<T> = T[keyof T];
89
+ type NonEmptyArray<T> = [T, ...T[]];
90
+ export declare const toZodEnum: <T extends Record<string, string>>(obj: T) => NonEmptyArray<ObjectValues<T>>;
91
+ export {};
88
92
  //# sourceMappingURL=events.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../constants/events/events.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;QAmBX;;;;;WAKG;;;IAGP;;;;;;OAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCG,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;AACzE,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;AACzE,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC;AAClF,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,MA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AAC,CAAC;AAC/E,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;AACtE,MAAM,MAAM,sBAAsB,GAC9B,CAAC,OAAO,MAAM,CAAC,iBAAiB,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAE7E,MAAM,MAAM,UAAU,GAChB,WAAW,GACX,WAAW,GACX,cAAc,GACd,aAAa,GACb,UAAU,GACV,sBAAsB,CAAC;AAC7B,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,SAAS,CAAC;AAEvD,eAAO,MAAM,aAAa;;;;;;;CAOhB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAE9E,KAAK,YAAY,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAClC,KAAK,aAAa,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;AAEpC,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,KAAK,CAAC,KACxC,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EVENTS_SCOPES = exports.EVENTS = void 0;
3
+ exports.toZodEnum = exports.EVENTS_SCOPES = exports.EVENTS = void 0;
4
4
  exports.EVENTS = {
5
5
  USER: {
6
6
  CREATED: 'user.created',
@@ -79,3 +79,5 @@ exports.EVENTS_SCOPES = {
79
79
  ERRORS: 'errors',
80
80
  CRM: 'crm',
81
81
  };
82
+ const toZodEnum = (obj) => Object.values(obj);
83
+ exports.toZodEnum = toZodEnum;
@@ -1,7 +1,7 @@
1
1
  import z from 'zod';
2
2
  export declare const RemnawaveWebhookUserEvents: z.ZodObject<{
3
3
  scope: z.ZodLiteral<"user">;
4
- event: z.ZodEnum<["user.created", ...("user.created" | "user.modified" | "user.deleted" | "user.revoked" | "user.disabled" | "user.enabled" | "user.limited" | "user.expired" | "user.traffic_reset" | "user.expires_in_72_hours" | "user.expires_in_48_hours" | "user.expires_in_24_hours" | "user.expired_24_hours_ago" | "user.first_connected" | "user.bandwidth_usage_threshold_reached" | "user.not_connected")[]]>;
4
+ event: z.ZodEnum<["user.created" | "user.modified" | "user.deleted" | "user.revoked" | "user.disabled" | "user.enabled" | "user.limited" | "user.expired" | "user.traffic_reset" | "user.expires_in_72_hours" | "user.expires_in_48_hours" | "user.expires_in_24_hours" | "user.expired_24_hours_ago" | "user.first_connected" | "user.bandwidth_usage_threshold_reached" | "user.not_connected", ...("user.created" | "user.modified" | "user.deleted" | "user.revoked" | "user.disabled" | "user.enabled" | "user.limited" | "user.expired" | "user.traffic_reset" | "user.expires_in_72_hours" | "user.expires_in_48_hours" | "user.expires_in_24_hours" | "user.expired_24_hours_ago" | "user.first_connected" | "user.bandwidth_usage_threshold_reached" | "user.not_connected")[]]>;
5
5
  timestamp: z.ZodEffects<z.ZodString, Date, string>;
6
6
  data: z.ZodObject<{
7
7
  uuid: z.ZodString;
@@ -244,7 +244,7 @@ export declare const RemnawaveWebhookUserEvents: z.ZodObject<{
244
244
  }>;
245
245
  export declare const RemnawaveWebhookUserHwidDevicesEvents: z.ZodObject<{
246
246
  scope: z.ZodLiteral<"user_hwid_devices">;
247
- event: z.ZodEnum<["user_hwid_devices.added", ...("user_hwid_devices.added" | "user_hwid_devices.deleted")[]]>;
247
+ event: z.ZodEnum<["user_hwid_devices.added" | "user_hwid_devices.deleted", ...("user_hwid_devices.added" | "user_hwid_devices.deleted")[]]>;
248
248
  timestamp: z.ZodEffects<z.ZodString, Date, string>;
249
249
  data: z.ZodObject<{
250
250
  user: z.ZodObject<{
@@ -626,7 +626,7 @@ export declare const RemnawaveWebhookUserHwidDevicesEvents: z.ZodObject<{
626
626
  }>;
627
627
  export declare const RemnawaveWebhookNodeEvents: z.ZodObject<{
628
628
  scope: z.ZodLiteral<"node">;
629
- event: z.ZodEnum<["node.created", ...("node.created" | "node.modified" | "node.disabled" | "node.enabled" | "node.deleted" | "node.connection_lost" | "node.connection_restored" | "node.traffic_notify")[]]>;
629
+ event: z.ZodEnum<["node.created" | "node.modified" | "node.disabled" | "node.enabled" | "node.deleted" | "node.connection_lost" | "node.connection_restored" | "node.traffic_notify", ...("node.created" | "node.modified" | "node.disabled" | "node.enabled" | "node.deleted" | "node.connection_lost" | "node.connection_restored" | "node.traffic_notify")[]]>;
630
630
  timestamp: z.ZodEffects<z.ZodString, Date, string>;
631
631
  data: z.ZodObject<{
632
632
  uuid: z.ZodString;
@@ -948,7 +948,7 @@ export declare const RemnawaveWebhookNodeEvents: z.ZodObject<{
948
948
  }>;
949
949
  export declare const RemnawaveWebhookServiceEvents: z.ZodObject<{
950
950
  scope: z.ZodLiteral<"service">;
951
- event: z.ZodEnum<["service.panel_started", ...("service.panel_started" | "service.login_attempt_failed" | "service.login_attempt_success")[]]>;
951
+ event: z.ZodEnum<["service.panel_started" | "service.login_attempt_failed" | "service.login_attempt_success", ...("service.panel_started" | "service.login_attempt_failed" | "service.login_attempt_success")[]]>;
952
952
  timestamp: z.ZodEffects<z.ZodString, Date, string>;
953
953
  data: z.ZodObject<{
954
954
  loginAttempt: z.ZodOptional<z.ZodObject<{
@@ -1047,7 +1047,7 @@ export declare const RemnawaveWebhookErrorsEvents: z.ZodObject<{
1047
1047
  }>;
1048
1048
  export declare const RemnawaveWebhookCrmEvents: z.ZodObject<{
1049
1049
  scope: z.ZodLiteral<"crm">;
1050
- event: z.ZodEnum<["crm.infra_billing_node_payment_in_7_days", ...("crm.infra_billing_node_payment_in_7_days" | "crm.infra_billing_node_payment_in_48hrs" | "crm.infra_billing_node_payment_in_24hrs" | "crm.infra_billing_node_payment_due_today" | "crm.infra_billing_node_payment_overdue_24hrs" | "crm.infra_billing_node_payment_overdue_48hrs" | "crm.infra_billing_node_payment_overdue_7_days")[]]>;
1050
+ event: z.ZodEnum<["crm.infra_billing_node_payment_in_7_days" | "crm.infra_billing_node_payment_in_48hrs" | "crm.infra_billing_node_payment_in_24hrs" | "crm.infra_billing_node_payment_due_today" | "crm.infra_billing_node_payment_overdue_24hrs" | "crm.infra_billing_node_payment_overdue_48hrs" | "crm.infra_billing_node_payment_overdue_7_days", ...("crm.infra_billing_node_payment_in_7_days" | "crm.infra_billing_node_payment_in_48hrs" | "crm.infra_billing_node_payment_in_24hrs" | "crm.infra_billing_node_payment_due_today" | "crm.infra_billing_node_payment_overdue_24hrs" | "crm.infra_billing_node_payment_overdue_48hrs" | "crm.infra_billing_node_payment_overdue_7_days")[]]>;
1051
1051
  timestamp: z.ZodEffects<z.ZodString, Date, string>;
1052
1052
  data: z.ZodObject<{
1053
1053
  providerName: z.ZodString;
@@ -1088,7 +1088,7 @@ export declare const RemnawaveWebhookCrmEvents: z.ZodObject<{
1088
1088
  }>;
1089
1089
  export declare const RemnawaveWebhookEventSchema: z.ZodDiscriminatedUnion<"scope", [z.ZodObject<{
1090
1090
  scope: z.ZodLiteral<"user">;
1091
- event: z.ZodEnum<["user.created", ...("user.created" | "user.modified" | "user.deleted" | "user.revoked" | "user.disabled" | "user.enabled" | "user.limited" | "user.expired" | "user.traffic_reset" | "user.expires_in_72_hours" | "user.expires_in_48_hours" | "user.expires_in_24_hours" | "user.expired_24_hours_ago" | "user.first_connected" | "user.bandwidth_usage_threshold_reached" | "user.not_connected")[]]>;
1091
+ event: z.ZodEnum<["user.created" | "user.modified" | "user.deleted" | "user.revoked" | "user.disabled" | "user.enabled" | "user.limited" | "user.expired" | "user.traffic_reset" | "user.expires_in_72_hours" | "user.expires_in_48_hours" | "user.expires_in_24_hours" | "user.expired_24_hours_ago" | "user.first_connected" | "user.bandwidth_usage_threshold_reached" | "user.not_connected", ...("user.created" | "user.modified" | "user.deleted" | "user.revoked" | "user.disabled" | "user.enabled" | "user.limited" | "user.expired" | "user.traffic_reset" | "user.expires_in_72_hours" | "user.expires_in_48_hours" | "user.expires_in_24_hours" | "user.expired_24_hours_ago" | "user.first_connected" | "user.bandwidth_usage_threshold_reached" | "user.not_connected")[]]>;
1092
1092
  timestamp: z.ZodEffects<z.ZodString, Date, string>;
1093
1093
  data: z.ZodObject<{
1094
1094
  uuid: z.ZodString;
@@ -1330,7 +1330,7 @@ export declare const RemnawaveWebhookEventSchema: z.ZodDiscriminatedUnion<"scope
1330
1330
  } | null;
1331
1331
  }>, z.ZodObject<{
1332
1332
  scope: z.ZodLiteral<"user_hwid_devices">;
1333
- event: z.ZodEnum<["user_hwid_devices.added", ...("user_hwid_devices.added" | "user_hwid_devices.deleted")[]]>;
1333
+ event: z.ZodEnum<["user_hwid_devices.added" | "user_hwid_devices.deleted", ...("user_hwid_devices.added" | "user_hwid_devices.deleted")[]]>;
1334
1334
  timestamp: z.ZodEffects<z.ZodString, Date, string>;
1335
1335
  data: z.ZodObject<{
1336
1336
  user: z.ZodObject<{
@@ -1711,7 +1711,7 @@ export declare const RemnawaveWebhookEventSchema: z.ZodDiscriminatedUnion<"scope
1711
1711
  timestamp: string;
1712
1712
  }>, z.ZodObject<{
1713
1713
  scope: z.ZodLiteral<"node">;
1714
- event: z.ZodEnum<["node.created", ...("node.created" | "node.modified" | "node.disabled" | "node.enabled" | "node.deleted" | "node.connection_lost" | "node.connection_restored" | "node.traffic_notify")[]]>;
1714
+ event: z.ZodEnum<["node.created" | "node.modified" | "node.disabled" | "node.enabled" | "node.deleted" | "node.connection_lost" | "node.connection_restored" | "node.traffic_notify", ...("node.created" | "node.modified" | "node.disabled" | "node.enabled" | "node.deleted" | "node.connection_lost" | "node.connection_restored" | "node.traffic_notify")[]]>;
1715
1715
  timestamp: z.ZodEffects<z.ZodString, Date, string>;
1716
1716
  data: z.ZodObject<{
1717
1717
  uuid: z.ZodString;
@@ -2032,7 +2032,7 @@ export declare const RemnawaveWebhookEventSchema: z.ZodDiscriminatedUnion<"scope
2032
2032
  timestamp: string;
2033
2033
  }>, z.ZodObject<{
2034
2034
  scope: z.ZodLiteral<"service">;
2035
- event: z.ZodEnum<["service.panel_started", ...("service.panel_started" | "service.login_attempt_failed" | "service.login_attempt_success")[]]>;
2035
+ event: z.ZodEnum<["service.panel_started" | "service.login_attempt_failed" | "service.login_attempt_success", ...("service.panel_started" | "service.login_attempt_failed" | "service.login_attempt_success")[]]>;
2036
2036
  timestamp: z.ZodEffects<z.ZodString, Date, string>;
2037
2037
  data: z.ZodObject<{
2038
2038
  loginAttempt: z.ZodOptional<z.ZodObject<{
@@ -2129,7 +2129,7 @@ export declare const RemnawaveWebhookEventSchema: z.ZodDiscriminatedUnion<"scope
2129
2129
  timestamp: string;
2130
2130
  }>, z.ZodObject<{
2131
2131
  scope: z.ZodLiteral<"crm">;
2132
- event: z.ZodEnum<["crm.infra_billing_node_payment_in_7_days", ...("crm.infra_billing_node_payment_in_7_days" | "crm.infra_billing_node_payment_in_48hrs" | "crm.infra_billing_node_payment_in_24hrs" | "crm.infra_billing_node_payment_due_today" | "crm.infra_billing_node_payment_overdue_24hrs" | "crm.infra_billing_node_payment_overdue_48hrs" | "crm.infra_billing_node_payment_overdue_7_days")[]]>;
2132
+ event: z.ZodEnum<["crm.infra_billing_node_payment_in_7_days" | "crm.infra_billing_node_payment_in_48hrs" | "crm.infra_billing_node_payment_in_24hrs" | "crm.infra_billing_node_payment_due_today" | "crm.infra_billing_node_payment_overdue_24hrs" | "crm.infra_billing_node_payment_overdue_48hrs" | "crm.infra_billing_node_payment_overdue_7_days", ...("crm.infra_billing_node_payment_in_7_days" | "crm.infra_billing_node_payment_in_48hrs" | "crm.infra_billing_node_payment_in_24hrs" | "crm.infra_billing_node_payment_due_today" | "crm.infra_billing_node_payment_overdue_24hrs" | "crm.infra_billing_node_payment_overdue_48hrs" | "crm.infra_billing_node_payment_overdue_7_days")[]]>;
2133
2133
  timestamp: z.ZodEffects<z.ZodString, Date, string>;
2134
2134
  data: z.ZodObject<{
2135
2135
  providerName: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"webhook.schema.d.ts","sourceRoot":"","sources":["../../../../models/webhook/webhook.schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAOpB,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAarC,CAAC;AAEH,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWhD,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAOtC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEjF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AACpF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AACpF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAC1F,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AACxF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAClF,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,qCAAqC,CAC/C,CAAC"}
@@ -5,13 +5,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.RemnawaveWebhookEventSchema = exports.RemnawaveWebhookCrmEvents = exports.RemnawaveWebhookErrorsEvents = exports.RemnawaveWebhookServiceEvents = exports.RemnawaveWebhookNodeEvents = exports.RemnawaveWebhookUserHwidDevicesEvents = exports.RemnawaveWebhookUserEvents = void 0;
7
7
  const zod_1 = __importDefault(require("zod"));
8
+ const constants_1 = require("../../constants");
8
9
  const hwid_user_device_schema_1 = require("../hwid-user-device.schema");
9
10
  const extended_users_schema_1 = require("../extended-users.schema");
10
- const constants_1 = require("../../constants");
11
11
  const nodes_schema_1 = require("../nodes.schema");
12
12
  exports.RemnawaveWebhookUserEvents = zod_1.default.object({
13
13
  scope: zod_1.default.literal(constants_1.EVENTS_SCOPES.USER),
14
- event: zod_1.default.enum([constants_1.EVENTS.USER.CREATED, ...Object.values(constants_1.EVENTS.USER)]),
14
+ event: zod_1.default.enum((0, constants_1.toZodEnum)(constants_1.EVENTS.USER)),
15
15
  timestamp: zod_1.default
16
16
  .string()
17
17
  .datetime()
@@ -25,7 +25,7 @@ exports.RemnawaveWebhookUserEvents = zod_1.default.object({
25
25
  });
26
26
  exports.RemnawaveWebhookUserHwidDevicesEvents = zod_1.default.object({
27
27
  scope: zod_1.default.literal(constants_1.EVENTS_SCOPES.USER_HWID_DEVICES),
28
- event: zod_1.default.enum([constants_1.EVENTS.USER_HWID_DEVICES.ADDED, ...Object.values(constants_1.EVENTS.USER_HWID_DEVICES)]),
28
+ event: zod_1.default.enum((0, constants_1.toZodEnum)(constants_1.EVENTS.USER_HWID_DEVICES)),
29
29
  timestamp: zod_1.default
30
30
  .string()
31
31
  .datetime()
@@ -37,7 +37,7 @@ exports.RemnawaveWebhookUserHwidDevicesEvents = zod_1.default.object({
37
37
  });
38
38
  exports.RemnawaveWebhookNodeEvents = zod_1.default.object({
39
39
  scope: zod_1.default.literal(constants_1.EVENTS_SCOPES.NODE),
40
- event: zod_1.default.enum([constants_1.EVENTS.NODE.CREATED, ...Object.values(constants_1.EVENTS.NODE)]),
40
+ event: zod_1.default.enum((0, constants_1.toZodEnum)(constants_1.EVENTS.NODE)),
41
41
  timestamp: zod_1.default
42
42
  .string()
43
43
  .datetime()
@@ -46,7 +46,7 @@ exports.RemnawaveWebhookNodeEvents = zod_1.default.object({
46
46
  });
47
47
  exports.RemnawaveWebhookServiceEvents = zod_1.default.object({
48
48
  scope: zod_1.default.literal(constants_1.EVENTS_SCOPES.SERVICE),
49
- event: zod_1.default.enum([constants_1.EVENTS.SERVICE.PANEL_STARTED, ...Object.values(constants_1.EVENTS.SERVICE)]),
49
+ event: zod_1.default.enum((0, constants_1.toZodEnum)(constants_1.EVENTS.SERVICE)),
50
50
  timestamp: zod_1.default
51
51
  .string()
52
52
  .datetime()
@@ -66,10 +66,7 @@ exports.RemnawaveWebhookServiceEvents = zod_1.default.object({
66
66
  });
67
67
  exports.RemnawaveWebhookErrorsEvents = zod_1.default.object({
68
68
  scope: zod_1.default.literal(constants_1.EVENTS_SCOPES.ERRORS),
69
- event: zod_1.default.enum([
70
- constants_1.EVENTS.ERRORS.BANDWIDTH_USAGE_THRESHOLD_REACHED_MAX_NOTIFICATIONS,
71
- ...Object.values(constants_1.EVENTS.ERRORS),
72
- ]),
69
+ event: zod_1.default.enum((0, constants_1.toZodEnum)(constants_1.EVENTS.ERRORS)),
73
70
  timestamp: zod_1.default
74
71
  .string()
75
72
  .datetime()
@@ -80,7 +77,7 @@ exports.RemnawaveWebhookErrorsEvents = zod_1.default.object({
80
77
  });
81
78
  exports.RemnawaveWebhookCrmEvents = zod_1.default.object({
82
79
  scope: zod_1.default.literal(constants_1.EVENTS_SCOPES.CRM),
83
- event: zod_1.default.enum([constants_1.EVENTS.CRM.INFRA_BILLING_NODE_PAYMENT_IN_7_DAYS, ...Object.values(constants_1.EVENTS.CRM)]),
80
+ event: zod_1.default.enum((0, constants_1.toZodEnum)(constants_1.EVENTS.CRM)),
84
81
  timestamp: zod_1.default
85
82
  .string()
86
83
  .datetime()
@@ -14,6 +14,10 @@ var RevokeUserSubscriptionCommand;
14
14
  uuid: zod_1.z.string().uuid(),
15
15
  });
16
16
  RevokeUserSubscriptionCommand.RequestBodySchema = zod_1.z.preprocess((val) => val || {}, zod_1.z.object({
17
+ revokeOnlyPasswords: zod_1.z.optional(zod_1.z
18
+ .boolean()
19
+ .default(false)
20
+ .describe('Optional. If true, only passwords will be revoked, without changing the short UUID (Subscription URL).')),
17
21
  shortUuid: zod_1.z.optional(zod_1.z
18
22
  .string()
19
23
  .min(6, { message: 'Short UUID must be at least 6 characters' })
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EVENTS_SCOPES = exports.EVENTS = void 0;
3
+ exports.toZodEnum = exports.EVENTS_SCOPES = exports.EVENTS = void 0;
4
4
  exports.EVENTS = {
5
5
  USER: {
6
6
  CREATED: 'user.created',
@@ -79,3 +79,5 @@ exports.EVENTS_SCOPES = {
79
79
  ERRORS: 'errors',
80
80
  CRM: 'crm',
81
81
  };
82
+ const toZodEnum = (obj) => Object.values(obj);
83
+ exports.toZodEnum = toZodEnum;
@@ -5,13 +5,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.RemnawaveWebhookEventSchema = exports.RemnawaveWebhookCrmEvents = exports.RemnawaveWebhookErrorsEvents = exports.RemnawaveWebhookServiceEvents = exports.RemnawaveWebhookNodeEvents = exports.RemnawaveWebhookUserHwidDevicesEvents = exports.RemnawaveWebhookUserEvents = void 0;
7
7
  const zod_1 = __importDefault(require("zod"));
8
+ const constants_1 = require("../../constants");
8
9
  const hwid_user_device_schema_1 = require("../hwid-user-device.schema");
9
10
  const extended_users_schema_1 = require("../extended-users.schema");
10
- const constants_1 = require("../../constants");
11
11
  const nodes_schema_1 = require("../nodes.schema");
12
12
  exports.RemnawaveWebhookUserEvents = zod_1.default.object({
13
13
  scope: zod_1.default.literal(constants_1.EVENTS_SCOPES.USER),
14
- event: zod_1.default.enum([constants_1.EVENTS.USER.CREATED, ...Object.values(constants_1.EVENTS.USER)]),
14
+ event: zod_1.default.enum((0, constants_1.toZodEnum)(constants_1.EVENTS.USER)),
15
15
  timestamp: zod_1.default
16
16
  .string()
17
17
  .datetime()
@@ -25,7 +25,7 @@ exports.RemnawaveWebhookUserEvents = zod_1.default.object({
25
25
  });
26
26
  exports.RemnawaveWebhookUserHwidDevicesEvents = zod_1.default.object({
27
27
  scope: zod_1.default.literal(constants_1.EVENTS_SCOPES.USER_HWID_DEVICES),
28
- event: zod_1.default.enum([constants_1.EVENTS.USER_HWID_DEVICES.ADDED, ...Object.values(constants_1.EVENTS.USER_HWID_DEVICES)]),
28
+ event: zod_1.default.enum((0, constants_1.toZodEnum)(constants_1.EVENTS.USER_HWID_DEVICES)),
29
29
  timestamp: zod_1.default
30
30
  .string()
31
31
  .datetime()
@@ -37,7 +37,7 @@ exports.RemnawaveWebhookUserHwidDevicesEvents = zod_1.default.object({
37
37
  });
38
38
  exports.RemnawaveWebhookNodeEvents = zod_1.default.object({
39
39
  scope: zod_1.default.literal(constants_1.EVENTS_SCOPES.NODE),
40
- event: zod_1.default.enum([constants_1.EVENTS.NODE.CREATED, ...Object.values(constants_1.EVENTS.NODE)]),
40
+ event: zod_1.default.enum((0, constants_1.toZodEnum)(constants_1.EVENTS.NODE)),
41
41
  timestamp: zod_1.default
42
42
  .string()
43
43
  .datetime()
@@ -46,7 +46,7 @@ exports.RemnawaveWebhookNodeEvents = zod_1.default.object({
46
46
  });
47
47
  exports.RemnawaveWebhookServiceEvents = zod_1.default.object({
48
48
  scope: zod_1.default.literal(constants_1.EVENTS_SCOPES.SERVICE),
49
- event: zod_1.default.enum([constants_1.EVENTS.SERVICE.PANEL_STARTED, ...Object.values(constants_1.EVENTS.SERVICE)]),
49
+ event: zod_1.default.enum((0, constants_1.toZodEnum)(constants_1.EVENTS.SERVICE)),
50
50
  timestamp: zod_1.default
51
51
  .string()
52
52
  .datetime()
@@ -66,10 +66,7 @@ exports.RemnawaveWebhookServiceEvents = zod_1.default.object({
66
66
  });
67
67
  exports.RemnawaveWebhookErrorsEvents = zod_1.default.object({
68
68
  scope: zod_1.default.literal(constants_1.EVENTS_SCOPES.ERRORS),
69
- event: zod_1.default.enum([
70
- constants_1.EVENTS.ERRORS.BANDWIDTH_USAGE_THRESHOLD_REACHED_MAX_NOTIFICATIONS,
71
- ...Object.values(constants_1.EVENTS.ERRORS),
72
- ]),
69
+ event: zod_1.default.enum((0, constants_1.toZodEnum)(constants_1.EVENTS.ERRORS)),
73
70
  timestamp: zod_1.default
74
71
  .string()
75
72
  .datetime()
@@ -80,7 +77,7 @@ exports.RemnawaveWebhookErrorsEvents = zod_1.default.object({
80
77
  });
81
78
  exports.RemnawaveWebhookCrmEvents = zod_1.default.object({
82
79
  scope: zod_1.default.literal(constants_1.EVENTS_SCOPES.CRM),
83
- event: zod_1.default.enum([constants_1.EVENTS.CRM.INFRA_BILLING_NODE_PAYMENT_IN_7_DAYS, ...Object.values(constants_1.EVENTS.CRM)]),
80
+ event: zod_1.default.enum((0, constants_1.toZodEnum)(constants_1.EVENTS.CRM)),
84
81
  timestamp: zod_1.default
85
82
  .string()
86
83
  .datetime()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "2.5.1",
3
+ "version": "2.5.3",
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.",